omp packages

@omics-os/pi-lobster1.3.2

Clean, one-line rows for Lobster AI's MCP tools in the pi coding agent.

cewinharhar Published 6 days ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-lobster

Clean, one-line rows for Lobster AI's MCP tools in the pi coding agent.

Lobster AI is an open-source bioinformatics engine. Its MCP server (lobster mcp --stdio) lets a coding agent start analysis runs, wait for them and answer the questions a run asks. Without this package, pi shows each call with its raw JSON reply. With it, you see one line per call and no JSON.

Install

You need Lobster AI installed and a Lobster project set up. Then run these two commands:

pi install npm:@omics-os/pi-lobster
pi mcp add lobster --exposure direct -- lobster mcp --stdio

--exposure direct gives the model Lobster's tools as tools of their own (pi names them mcp__lobster__lobster_run and so on). Without it, pi's default code mode calls them from inside a script, and these rows never show.

Optional: pi ends a tool call after 60 seconds. A wait still returns early on its own when the run finishes or asks a question. To let one lobster_wait cover a whole run, add "timeout": 3600 to the lobster entry in ~/.pi/agent/mcp.json:

{
  "mcpServers": {
    "lobster": {
      "command": "lobster",
      "args": ["mcp", "--stdio"],
      "exposure": "direct",
      "timeout": 3600
    }
  }
}

The package also works with pi-mcp-adapter. Its keys for the same settings are "directTools": true, "toolPrefix": "none" and "requestTimeoutMs": 3600000.

What you see

🦞 run · "Run QC on my data" · ⏳ running

🦞 wait · run_3a6e · ? needs decision
   Plan: data_expert_agent runs one check on the loaded input. Go ahead? (Ctrl+O)

🦞 answer · Go ahead · ↳ answered (human)

🦞 wait · run_3a6e · ✓ completed · 38s · 2 files · 1 warning
  • One line per call: the tool, what the call is about, and the outcome. While the call runs, the line shows how long it has waited.
  • A question from the run adds up to three lines below its row.
  • Status is shown by the sign and its colour: ⏳ running, ? needs decision, ✓ completed, ✗ failed, ■ stopped.
  • Ctrl+O opens the details as labelled lines: the summary, the files with their sizes, the warnings, the options of a question, the run and its folders.
  • The model's input is unchanged. It still receives Lobster's full reply; only the transcript looks different.

Esc, timeouts and quitting

  • Esc stops the call the model is making, not the Lobster run. The row says so:

    🦞 wait · run_3a6e · ■ stopped watching · Lobster keeps working · ask me to check or cancel
    

    Ask the agent to check on the run, or to cancel it.

  • A timeout ends the wait the same way, and the row shows the run as still running:

    🦞 wait · run_3a6e · ⏳ still running · 1m00s
    
  • Quitting pi, or starting another session with /new, /resume, /fork or /reload, closes Lobster's server, and Lobster stops the run.

Versions

  • The package moved to @omics-os/pi-lobster. The old @omicsos/pi-lobster (up to 1.3.2) is deprecated. To switch: pi remove npm:@omicsos/pi-lobster, then pi install npm:@omics-os/pi-lobster.
  • pi-lobster's version follows Lobster AI's. pi-lobster 1.3.2 matches Lobster AI 1.3.2.
  • Lobster AI 1.3.2 and later put a one-line headline first in every reply, and the rows show it. For 1.3.1 and earlier, pi-lobster builds the same line from the reply, so the rows look the same.
  • pi needs pi.registerToolRenderer (pi 1.5.1 and later). An older pi loads the package and changes nothing.

More about Lobster's MCP server: Lobster MCP guide.

Development

npm install
npm test
npm run typecheck
node test/preview.ts 80 expanded   # print the rows for the recorded replies

The tests render recorded Lobster replies at widths 80 and 40. test/fixtures/headlines.json holds the engine's own headlines, so the line pi-lobster builds for older replies stays the same as the engine's.

License

MIT