diff --git a/extensions/lobster/clawdbot.plugin.json b/extensions/lobster/clawdbot.plugin.json new file mode 100644 index 000000000..c1070a87b --- /dev/null +++ b/extensions/lobster/clawdbot.plugin.json @@ -0,0 +1,10 @@ +{ + "id": "lobster", + "name": "Lobster", + "description": "Typed workflow tool with resumable approvals.", + "configSchema": { + "type": "object", + "additionalProperties": false, + "properties": {} + } +} diff --git a/extensions/lobster/src/lobster-tool.ts b/extensions/lobster/src/lobster-tool.ts index 2d76e0821..71dade859 100644 --- a/extensions/lobster/src/lobster-tool.ts +++ b/extensions/lobster/src/lobster-tool.ts @@ -40,14 +40,17 @@ async function runLobsterSubprocess(params: { const timeoutMs = Math.max(200, params.timeoutMs); const maxStdoutBytes = Math.max(1024, params.maxStdoutBytes); + const env = { ...process.env, LOBSTER_MODE: "tool" } as Record; + const nodeOptions = env.NODE_OPTIONS ?? ""; + if (nodeOptions.includes("--inspect")) { + delete env.NODE_OPTIONS; + } + return await new Promise<{ stdout: string }>((resolve, reject) => { const child = spawn(execPath, argv, { cwd, stdio: ["ignore", "pipe", "pipe"], - env: { - ...process.env, - LOBSTER_MODE: "tool", - }, + env, }); let stdout = "";