@jcheesepkg/nanobot 0.6.94 → 0.6.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"subagent.d.mts","names":[],"sources":["../../src/agent/subagent.ts"],"mappings":";;;;;;;AAcA;cAAa,eAAA;EAAA,QACH,QAAA;EAAA,QACA,SAAA;EAAA,QACA,GAAA;EAAA,QACA,KAAA;EAAA,QACA,WAAA;EAAA,QACA,UAAA;EAAA,QACA,mBAAA;EAAA,QACA,YAAA;cAEI,MAAA;IACV,QAAA,EAAU,WAAA;IACV,SAAA;IACA,GAAA,EAAK,UAAA;IACL,KAAA;IACA,WAAA;IACA,UAAA,GAAa,cAAA;IACb,mBAAA;EAAA;EANU;EAkBN,KAAA,CAAM,MAAA;IACV,IAAA;IACA,KAAA;IACA,aAAA;IACA,YAAA;EAAA,IACE,OAAA;EAAA,QAwBU,WAAA;EAAA,QA6FA,cAAA;EAAA,QA8BN,mBAAA;EAAA,IAgDJ,YAAA,CAAA;AAAA"}
1
+ {"version":3,"file":"subagent.d.mts","names":[],"sources":["../../src/agent/subagent.ts"],"mappings":";;;;;;;AAcA;cAAa,eAAA;EAAA,QACH,QAAA;EAAA,QACA,SAAA;EAAA,QACA,GAAA;EAAA,QACA,KAAA;EAAA,QACA,WAAA;EAAA,QACA,UAAA;EAAA,QACA,mBAAA;EAAA,QACA,YAAA;cAEI,MAAA;IACV,QAAA,EAAU,WAAA;IACV,SAAA;IACA,GAAA,EAAK,UAAA;IACL,KAAA;IACA,WAAA;IACA,UAAA,GAAa,cAAA;IACb,mBAAA;EAAA;EANU;EAkBN,KAAA,CAAM,MAAA;IACV,IAAA;IACA,KAAA;IACA,aAAA;IACA,YAAA;EAAA,IACE,OAAA;EAAA,QAwBU,WAAA;EAAA,QAqGA,cAAA;EAAA,QA8BN,mBAAA;EAAA,IAgDJ,YAAA,CAAA;AAAA"}
@@ -94,7 +94,11 @@ var SubagentManager = class {
94
94
  tool_calls: toolCallDicts
95
95
  });
96
96
  for (const tc of response.toolCalls) {
97
- console.log(`Subagent [${taskId}] executing: ${tc.name}`);
97
+ console.log(`Subagent [${taskId}] Tool: ${tc.name}(${JSON.stringify(tc.arguments)})`);
98
+ if (tc.name === "read_file") {
99
+ const skillMatch = String(tc.arguments?.path ?? "").match(/skills\/([^/]+)\/SKILL\.md$/);
100
+ if (skillMatch) console.log(`Skill activated: ${skillMatch[1]}`);
101
+ }
98
102
  const result = await tools.execute(tc.name, tc.arguments);
99
103
  messages.push({
100
104
  role: "tool",
@@ -1 +1 @@
1
- {"version":3,"file":"subagent.mjs","names":[],"sources":["../../src/agent/subagent.ts"],"sourcesContent":["import { randomUUID } from \"node:crypto\";\nimport type { LLMProvider, ChatMessage } from \"../providers/base.js\";\nimport type { MessageBus } from \"../bus/queue.js\";\nimport { createInboundMessage } from \"../bus/events.js\";\nimport { ToolRegistry } from \"./tools/registry.js\";\nimport { ReadFileTool, WriteFileTool, ListDirTool } from \"./tools/filesystem.js\";\nimport { ExecTool } from \"./tools/shell.js\";\nimport { WebSearchTool, WebFetchTool } from \"./tools/web.js\";\nimport { getBuiltinSkillsDir, SkillsLoader } from \"./skills.js\";\nimport type { ExecToolConfig } from \"../config/schema.js\";\n\n/**\n * Manages background subagent execution.\n */\nexport class SubagentManager {\n private provider: LLMProvider;\n private workspace: string;\n private bus: MessageBus;\n private model: string;\n private braveApiKey?: string;\n private execConfig: ExecToolConfig;\n private restrictToWorkspace: boolean;\n private runningTasks = new Map<string, AbortController>();\n\n constructor(params: {\n provider: LLMProvider;\n workspace: string;\n bus: MessageBus;\n model?: string;\n braveApiKey?: string;\n execConfig?: ExecToolConfig;\n restrictToWorkspace?: boolean;\n }) {\n this.provider = params.provider;\n this.workspace = params.workspace;\n this.bus = params.bus;\n this.model = params.model ?? params.provider.getDefaultModel();\n this.braveApiKey = params.braveApiKey;\n this.execConfig = params.execConfig ?? { timeout: 60 };\n this.restrictToWorkspace = params.restrictToWorkspace ?? false;\n }\n\n /** Spawn a subagent to execute a task in the background. */\n async spawn(params: {\n task: string;\n label?: string;\n originChannel?: string;\n originChatId?: string;\n }): Promise<string> {\n const taskId = randomUUID().slice(0, 8);\n const displayLabel =\n params.label ??\n (params.task.length > 30\n ? params.task.slice(0, 30) + \"...\"\n : params.task);\n\n const origin = {\n channel: params.originChannel ?? \"cli\",\n chatId: params.originChatId ?? \"direct\",\n };\n\n const controller = new AbortController();\n this.runningTasks.set(taskId, controller);\n\n // Run in background (don't await)\n this.runSubagent(taskId, params.task, displayLabel, origin)\n .finally(() => this.runningTasks.delete(taskId));\n\n console.log(`Spawned subagent [${taskId}]: ${displayLabel}`);\n return `Subagent [${displayLabel}] started (id: ${taskId}). I'll notify you when it completes.`;\n }\n\n private async runSubagent(\n taskId: string,\n task: string,\n label: string,\n origin: { channel: string; chatId: string },\n ): Promise<void> {\n console.log(`Subagent [${taskId}] starting task: ${label}`);\n\n try {\n // Build subagent tools (no message, no spawn)\n const tools = new ToolRegistry();\n const allowedDir = this.restrictToWorkspace ? this.workspace : undefined;\n const readOnlyPaths = this.restrictToWorkspace ? [getBuiltinSkillsDir()] : undefined;\n tools.register(new ReadFileTool({ allowedDir, readOnlyPaths }));\n tools.register(new WriteFileTool({ allowedDir }));\n tools.register(new ListDirTool({ allowedDir, readOnlyPaths }));\n tools.register(\n new ExecTool({\n workingDir: this.workspace,\n timeout: this.execConfig.timeout,\n restrictToWorkspace: this.restrictToWorkspace,\n }),\n );\n tools.register(new WebSearchTool({ apiKey: this.braveApiKey }));\n tools.register(new WebFetchTool());\n\n const systemPrompt = this.buildSubagentPrompt(task);\n const messages: ChatMessage[] = [\n { role: \"system\", content: systemPrompt },\n { role: \"user\", content: task },\n ];\n\n const maxIterations = 15;\n let finalResult: string | null = null;\n\n for (let i = 0; i < maxIterations; i++) {\n const response = await this.provider.chat({\n messages,\n tools: tools.getDefinitions(),\n model: this.model,\n });\n\n if (response.hasToolCalls) {\n const toolCallDicts = response.toolCalls.map((tc) => ({\n id: tc.id,\n type: \"function\" as const,\n function: {\n name: tc.name,\n arguments: JSON.stringify(tc.arguments),\n },\n }));\n\n messages.push({\n role: \"assistant\",\n content: response.content ?? \"\",\n tool_calls: toolCallDicts,\n });\n\n for (const tc of response.toolCalls) {\n console.log(\n `Subagent [${taskId}] executing: ${tc.name}`,\n );\n const result = await tools.execute(tc.name, tc.arguments);\n messages.push({\n role: \"tool\",\n tool_call_id: tc.id,\n name: tc.name,\n content: result,\n });\n }\n } else {\n finalResult = response.content;\n break;\n }\n }\n\n finalResult ??= \"Task completed but no final response was generated.\";\n console.log(`Subagent [${taskId}] completed successfully`);\n await this.announceResult(taskId, label, task, finalResult, origin, \"ok\");\n } catch (err) {\n const errorMsg = `Error: ${err instanceof Error ? err.message : err}`;\n console.error(`Subagent [${taskId}] failed:`, err);\n await this.announceResult(\n taskId,\n label,\n task,\n errorMsg,\n origin,\n \"error\",\n );\n }\n }\n\n private async announceResult(\n taskId: string,\n label: string,\n task: string,\n result: string,\n origin: { channel: string; chatId: string },\n status: string,\n ): Promise<void> {\n const statusText =\n status === \"ok\" ? \"completed successfully\" : \"failed\";\n\n const content = `[Subagent '${label}' ${statusText}]\n\nTask: ${task}\n\nResult:\n${result}\n\nSummarize this naturally for the user. Keep it brief (1-2 sentences). Do not mention technical details like \"subagent\" or task IDs.`;\n\n const msg = createInboundMessage({\n channel: \"system\",\n senderId: \"subagent\",\n chatId: `${origin.channel}:${origin.chatId}`,\n content,\n });\n\n await this.bus.publishInbound(msg);\n }\n\n private buildSubagentPrompt(task: string): string {\n const skills = new SkillsLoader(this.workspace);\n const alwaysSkills = skills.getAlwaysSkills();\n const alwaysContent = alwaysSkills.length > 0\n ? skills.loadSkillsForContext(alwaysSkills)\n : \"\";\n const skillsSummary = skills.buildSkillsSummary();\n\n let prompt = `# Subagent\n\nYou are a subagent spawned by the main agent to complete a specific task.\n\n## Your Task\n${task}\n\n## Rules\n1. Stay focused - complete only the assigned task, nothing else\n2. Your final response will be reported back to the main agent\n3. Do not initiate conversations or take on side tasks\n4. Be concise but informative in your findings\n\n## What You Can Do\n- Read and write files in the workspace\n- Execute shell commands\n- Search the web and fetch web pages\n- Complete the task thoroughly\n\n## What You Cannot Do\n- Send messages directly to users (no message tool available)\n- Spawn other subagents\n- Access the main agent's conversation history\n\n## Workspace\nYour workspace is at: ${this.workspace}`;\n\n if (alwaysContent) {\n prompt += `\\n\\n## Active Skills\\n\\n${alwaysContent}`;\n }\n\n if (skillsSummary) {\n prompt += `\\n\\n## Skills (mandatory)\\n\\nBefore starting, scan the <skills> entries below.\\n- If a skill clearly applies to the task: read its SKILL.md at the <location> path using read_file, then follow its instructions.\\n- If no skill applies: proceed normally.\\n\\n${skillsSummary}`;\n }\n\n prompt += `\\n\\nWhen you have completed the task, provide a clear summary of your findings or actions.`;\n\n return prompt;\n }\n\n get runningCount(): number {\n return this.runningTasks.size;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAcA,IAAa,kBAAb,MAA6B;CAC3B,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ,+BAAe,IAAI,KAA8B;CAEzD,YAAY,QAQT;AACD,OAAK,WAAW,OAAO;AACvB,OAAK,YAAY,OAAO;AACxB,OAAK,MAAM,OAAO;AAClB,OAAK,QAAQ,OAAO,SAAS,OAAO,SAAS,iBAAiB;AAC9D,OAAK,cAAc,OAAO;AAC1B,OAAK,aAAa,OAAO,cAAc,EAAE,SAAS,IAAI;AACtD,OAAK,sBAAsB,OAAO,uBAAuB;;;CAI3D,MAAM,MAAM,QAKQ;EAClB,MAAM,SAAS,YAAY,CAAC,MAAM,GAAG,EAAE;EACvC,MAAM,eACJ,OAAO,UACN,OAAO,KAAK,SAAS,KAClB,OAAO,KAAK,MAAM,GAAG,GAAG,GAAG,QAC3B,OAAO;EAEb,MAAM,SAAS;GACb,SAAS,OAAO,iBAAiB;GACjC,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Aa,GACzC;EACJ,MAAM,gBAAgB,OAAO,oBAAoB;EAEjD,IAAI,SAAS;;;;;EAKf,KAAK;;;;;;;;;;;;;;;;;;;;wBAoBiB,KAAK;AAEzB,MAAI,cACF,WAAU,2BAA2B;AAGvC,MAAI,cACF,WAAU,kQAAkQ;AAG9Q,YAAU;AAEV,SAAO;;CAGT,IAAI,eAAuB;AACzB,SAAO,KAAK,aAAa"}
1
+ {"version":3,"file":"subagent.mjs","names":[],"sources":["../../src/agent/subagent.ts"],"sourcesContent":["import { randomUUID } from \"node:crypto\";\nimport type { LLMProvider, ChatMessage } from \"../providers/base.js\";\nimport type { MessageBus } from \"../bus/queue.js\";\nimport { createInboundMessage } from \"../bus/events.js\";\nimport { ToolRegistry } from \"./tools/registry.js\";\nimport { ReadFileTool, WriteFileTool, ListDirTool } from \"./tools/filesystem.js\";\nimport { ExecTool } from \"./tools/shell.js\";\nimport { WebSearchTool, WebFetchTool } from \"./tools/web.js\";\nimport { getBuiltinSkillsDir, SkillsLoader } from \"./skills.js\";\nimport type { ExecToolConfig } from \"../config/schema.js\";\n\n/**\n * Manages background subagent execution.\n */\nexport class SubagentManager {\n private provider: LLMProvider;\n private workspace: string;\n private bus: MessageBus;\n private model: string;\n private braveApiKey?: string;\n private execConfig: ExecToolConfig;\n private restrictToWorkspace: boolean;\n private runningTasks = new Map<string, AbortController>();\n\n constructor(params: {\n provider: LLMProvider;\n workspace: string;\n bus: MessageBus;\n model?: string;\n braveApiKey?: string;\n execConfig?: ExecToolConfig;\n restrictToWorkspace?: boolean;\n }) {\n this.provider = params.provider;\n this.workspace = params.workspace;\n this.bus = params.bus;\n this.model = params.model ?? params.provider.getDefaultModel();\n this.braveApiKey = params.braveApiKey;\n this.execConfig = params.execConfig ?? { timeout: 60 };\n this.restrictToWorkspace = params.restrictToWorkspace ?? false;\n }\n\n /** Spawn a subagent to execute a task in the background. */\n async spawn(params: {\n task: string;\n label?: string;\n originChannel?: string;\n originChatId?: string;\n }): Promise<string> {\n const taskId = randomUUID().slice(0, 8);\n const displayLabel =\n params.label ??\n (params.task.length > 30\n ? params.task.slice(0, 30) + \"...\"\n : params.task);\n\n const origin = {\n channel: params.originChannel ?? \"cli\",\n chatId: params.originChatId ?? \"direct\",\n };\n\n const controller = new AbortController();\n this.runningTasks.set(taskId, controller);\n\n // Run in background (don't await)\n this.runSubagent(taskId, params.task, displayLabel, origin)\n .finally(() => this.runningTasks.delete(taskId));\n\n console.log(`Spawned subagent [${taskId}]: ${displayLabel}`);\n return `Subagent [${displayLabel}] started (id: ${taskId}). I'll notify you when it completes.`;\n }\n\n private async runSubagent(\n taskId: string,\n task: string,\n label: string,\n origin: { channel: string; chatId: string },\n ): Promise<void> {\n console.log(`Subagent [${taskId}] starting task: ${label}`);\n\n try {\n // Build subagent tools (no message, no spawn)\n const tools = new ToolRegistry();\n const allowedDir = this.restrictToWorkspace ? this.workspace : undefined;\n const readOnlyPaths = this.restrictToWorkspace ? [getBuiltinSkillsDir()] : undefined;\n tools.register(new ReadFileTool({ allowedDir, readOnlyPaths }));\n tools.register(new WriteFileTool({ allowedDir }));\n tools.register(new ListDirTool({ allowedDir, readOnlyPaths }));\n tools.register(\n new ExecTool({\n workingDir: this.workspace,\n timeout: this.execConfig.timeout,\n restrictToWorkspace: this.restrictToWorkspace,\n }),\n );\n tools.register(new WebSearchTool({ apiKey: this.braveApiKey }));\n tools.register(new WebFetchTool());\n\n const systemPrompt = this.buildSubagentPrompt(task);\n const messages: ChatMessage[] = [\n { role: \"system\", content: systemPrompt },\n { role: \"user\", content: task },\n ];\n\n const maxIterations = 15;\n let finalResult: string | null = null;\n\n for (let i = 0; i < maxIterations; i++) {\n const response = await this.provider.chat({\n messages,\n tools: tools.getDefinitions(),\n model: this.model,\n });\n\n if (response.hasToolCalls) {\n const toolCallDicts = response.toolCalls.map((tc) => ({\n id: tc.id,\n type: \"function\" as const,\n function: {\n name: tc.name,\n arguments: JSON.stringify(tc.arguments),\n },\n }));\n\n messages.push({\n role: \"assistant\",\n content: response.content ?? \"\",\n tool_calls: toolCallDicts,\n });\n\n for (const tc of response.toolCalls) {\n console.log(`Subagent [${taskId}] Tool: ${tc.name}(${JSON.stringify(tc.arguments)})`);\n\n // Detect skill reads\n if (tc.name === \"read_file\") {\n const path = String(tc.arguments?.path ?? \"\");\n const skillMatch = path.match(/skills\\/([^/]+)\\/SKILL\\.md$/);\n if (skillMatch) {\n console.log(`Skill activated: ${skillMatch[1]}`);\n }\n }\n \n const result = await tools.execute(tc.name, tc.arguments);\n messages.push({\n role: \"tool\",\n tool_call_id: tc.id,\n name: tc.name,\n content: result,\n });\n }\n } else {\n finalResult = response.content;\n break;\n }\n }\n\n finalResult ??= \"Task completed but no final response was generated.\";\n console.log(`Subagent [${taskId}] completed successfully`);\n await this.announceResult(taskId, label, task, finalResult, origin, \"ok\");\n } catch (err) {\n const errorMsg = `Error: ${err instanceof Error ? err.message : err}`;\n console.error(`Subagent [${taskId}] failed:`, err);\n await this.announceResult(\n taskId,\n label,\n task,\n errorMsg,\n origin,\n \"error\",\n );\n }\n }\n\n private async announceResult(\n taskId: string,\n label: string,\n task: string,\n result: string,\n origin: { channel: string; chatId: string },\n status: string,\n ): Promise<void> {\n const statusText =\n status === \"ok\" ? \"completed successfully\" : \"failed\";\n\n const content = `[Subagent '${label}' ${statusText}]\n\nTask: ${task}\n\nResult:\n${result}\n\nSummarize this naturally for the user. Keep it brief (1-2 sentences). Do not mention technical details like \"subagent\" or task IDs.`;\n\n const msg = createInboundMessage({\n channel: \"system\",\n senderId: \"subagent\",\n chatId: `${origin.channel}:${origin.chatId}`,\n content,\n });\n\n await this.bus.publishInbound(msg);\n }\n\n private buildSubagentPrompt(task: string): string {\n const skills = new SkillsLoader(this.workspace);\n const alwaysSkills = skills.getAlwaysSkills();\n const alwaysContent = alwaysSkills.length > 0\n ? skills.loadSkillsForContext(alwaysSkills)\n : \"\";\n const skillsSummary = skills.buildSkillsSummary();\n\n let prompt = `# Subagent\n\nYou are a subagent spawned by the main agent to complete a specific task.\n\n## Your Task\n${task}\n\n## Rules\n1. Stay focused - complete only the assigned task, nothing else\n2. Your final response will be reported back to the main agent\n3. Do not initiate conversations or take on side tasks\n4. Be concise but informative in your findings\n\n## What You Can Do\n- Read and write files in the workspace\n- Execute shell commands\n- Search the web and fetch web pages\n- Complete the task thoroughly\n\n## What You Cannot Do\n- Send messages directly to users (no message tool available)\n- Spawn other subagents\n- Access the main agent's conversation history\n\n## Workspace\nYour workspace is at: ${this.workspace}`;\n\n if (alwaysContent) {\n prompt += `\\n\\n## Active Skills\\n\\n${alwaysContent}`;\n }\n\n if (skillsSummary) {\n prompt += `\\n\\n## Skills (mandatory)\\n\\nBefore starting, scan the <skills> entries below.\\n- If a skill clearly applies to the task: read its SKILL.md at the <location> path using read_file, then follow its instructions.\\n- If no skill applies: proceed normally.\\n\\n${skillsSummary}`;\n }\n\n prompt += `\\n\\nWhen you have completed the task, provide a clear summary of your findings or actions.`;\n\n return prompt;\n }\n\n get runningCount(): number {\n return this.runningTasks.size;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAcA,IAAa,kBAAb,MAA6B;CAC3B,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ;CACR,AAAQ,+BAAe,IAAI,KAA8B;CAEzD,YAAY,QAQT;AACD,OAAK,WAAW,OAAO;AACvB,OAAK,YAAY,OAAO;AACxB,OAAK,MAAM,OAAO;AAClB,OAAK,QAAQ,OAAO,SAAS,OAAO,SAAS,iBAAiB;AAC9D,OAAK,cAAc,OAAO;AAC1B,OAAK,aAAa,OAAO,cAAc,EAAE,SAAS,IAAI;AACtD,OAAK,sBAAsB,OAAO,uBAAuB;;;CAI3D,MAAM,MAAM,QAKQ;EAClB,MAAM,SAAS,YAAY,CAAC,MAAM,GAAG,EAAE;EACvC,MAAM,eACJ,OAAO,UACN,OAAO,KAAK,SAAS,KAClB,OAAO,KAAK,MAAM,GAAG,GAAG,GAAG,QAC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ACV,QAAQ,GAAG,OAAO,QAAQ,GAAG,OAAO;GACpC;GACD,CAAC;AAEF,QAAM,KAAK,IAAI,eAAe,IAAI;;CAGpC,AAAQ,oBAAoB,MAAsB;EAChD,MAAM,SAAS,IAAI,aAAa,KAAK,UAAU;EAC/C,MAAM,eAAe,OAAO,iBAAiB;EAC7C,MAAM,gBAAgB,aAAa,SAAS,IACxC,OAAO,qBAAqB,aAAa,GACzC;EACJ,MAAM,gBAAgB,OAAO,oBAAoB;EAEjD,IAAI,SAAS;;;;;EAKf,KAAK;;;;;;;;;;;;;;;;;;;;wBAoBiB,KAAK;AAEzB,MAAI,cACF,WAAU,2BAA2B;AAGvC,MAAI,cACF,WAAU,kQAAkQ;AAG9Q,YAAU;AAEV,SAAO;;CAGT,IAAI,eAAuB;AACzB,SAAO,KAAK,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.mts","names":[],"sources":["../../../src/agent/tools/registry.ts"],"mappings":";;;;;;AAMA;cAAa,YAAA;EAAA,QACH,KAAA;EAGO;EAAf,QAAA,CAAS,IAAA,EAAM,IAAA;EAoBG;EAflB,UAAA,CAAW,IAAA;EAuBR;EAlBH,GAAA,CAAI,IAAA,WAAe,IAAA;EAkBT;EAbV,GAAA,CAAI,IAAA;EAfJ;EAoBA,cAAA,CAAA,GAAkB,cAAA;EApBT;EAyBH,OAAA,CACJ,IAAA,UACA,IAAA,EAAM,MAAA,oBACL,OAAA;EAvBQ;EAqCX,QAAA,CAAA;EAhCI;EAAA,IAqCA,IAAA,CAAA;AAAA"}
1
+ {"version":3,"file":"registry.d.mts","names":[],"sources":["../../../src/agent/tools/registry.ts"],"mappings":";;;;;;AAMA;cAAa,YAAA;EAAA,QACH,KAAA;EAGO;EAAf,QAAA,CAAS,IAAA,EAAM,IAAA;EAoBG;EAflB,UAAA,CAAW,IAAA;EAuBR;EAlBH,GAAA,CAAI,IAAA,WAAe,IAAA;EAkBT;EAbV,GAAA,CAAI,IAAA;EAfJ;EAoBA,cAAA,CAAA,GAAkB,cAAA;EApBT;EAyBH,OAAA,CACJ,IAAA,UACA,IAAA,EAAM,MAAA,oBACL,OAAA;EAvBQ;EAsCX,QAAA,CAAA;EAjCI;EAAA,IAsCA,IAAA,CAAA;AAAA"}
@@ -31,7 +31,9 @@ var ToolRegistry = class {
31
31
  try {
32
32
  return await tool.execute(args);
33
33
  } catch (err) {
34
- return `Error executing ${name}: ${err instanceof Error ? err.message : String(err)}`;
34
+ const message = err instanceof Error ? err.message : String(err);
35
+ console.error(`Error executing ${name}: ${message}`);
36
+ return `Error executing ${name}: ${message}`;
35
37
  }
36
38
  }
37
39
  /** Get all registered tool names. */
@@ -1 +1 @@
1
- {"version":3,"file":"registry.mjs","names":[],"sources":["../../../src/agent/tools/registry.ts"],"sourcesContent":["import type { ToolDefinition } from \"../../providers/base.js\";\nimport type { Tool } from \"./base.js\";\n\n/**\n * Dynamic tool registration and execution.\n */\nexport class ToolRegistry {\n private tools = new Map<string, Tool>();\n\n /** Register a tool. */\n register(tool: Tool): void {\n this.tools.set(tool.name, tool);\n }\n\n /** Unregister a tool by name. */\n unregister(name: string): boolean {\n return this.tools.delete(name);\n }\n\n /** Get a tool by name. */\n get(name: string): Tool | undefined {\n return this.tools.get(name);\n }\n\n /** Check if a tool exists. */\n has(name: string): boolean {\n return this.tools.has(name);\n }\n\n /** Get tool definitions for the LLM. */\n getDefinitions(): ToolDefinition[] {\n return Array.from(this.tools.values()).map((t) => t.getDefinition());\n }\n\n /** Execute a tool by name with arguments. */\n async execute(\n name: string,\n args: Record<string, unknown>,\n ): Promise<string> {\n const tool = this.tools.get(name);\n if (!tool) {\n return `Error: Unknown tool '${name}'`;\n }\n try {\n return await tool.execute(args);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return `Error executing ${name}: ${message}`;\n }\n }\n\n /** Get all registered tool names. */\n getNames(): string[] {\n return Array.from(this.tools.keys());\n }\n\n /** Get count of registered tools. */\n get size(): number {\n return this.tools.size;\n }\n}\n"],"mappings":";;;;AAMA,IAAa,eAAb,MAA0B;CACxB,AAAQ,wBAAQ,IAAI,KAAmB;;CAGvC,SAAS,MAAkB;AACzB,OAAK,MAAM,IAAI,KAAK,MAAM,KAAK;;;CAIjC,WAAW,MAAuB;AAChC,SAAO,KAAK,MAAM,OAAO,KAAK;;;CAIhC,IAAI,MAAgC;AAClC,SAAO,KAAK,MAAM,IAAI,KAAK;;;CAI7B,IAAI,MAAuB;AACzB,SAAO,KAAK,MAAM,IAAI,KAAK;;;CAI7B,iBAAmC;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,QAAQ,CAAC,CAAC,KAAK,MAAM,EAAE,eAAe,CAAC;;;CAItE,MAAM,QACJ,MACA,MACiB;EACjB,MAAM,OAAO,KAAK,MAAM,IAAI,KAAK;AACjC,MAAI,CAAC,KACH,QAAO,wBAAwB,KAAK;AAEtC,MAAI;AACF,UAAO,MAAM,KAAK,QAAQ,KAAK;WACxB,KAAK;AAEZ,UAAO,mBAAmB,KAAK,IADf,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;;;;CAMpE,WAAqB;AACnB,SAAO,MAAM,KAAK,KAAK,MAAM,MAAM,CAAC;;;CAItC,IAAI,OAAe;AACjB,SAAO,KAAK,MAAM"}
1
+ {"version":3,"file":"registry.mjs","names":[],"sources":["../../../src/agent/tools/registry.ts"],"sourcesContent":["import type { ToolDefinition } from \"../../providers/base.js\";\nimport type { Tool } from \"./base.js\";\n\n/**\n * Dynamic tool registration and execution.\n */\nexport class ToolRegistry {\n private tools = new Map<string, Tool>();\n\n /** Register a tool. */\n register(tool: Tool): void {\n this.tools.set(tool.name, tool);\n }\n\n /** Unregister a tool by name. */\n unregister(name: string): boolean {\n return this.tools.delete(name);\n }\n\n /** Get a tool by name. */\n get(name: string): Tool | undefined {\n return this.tools.get(name);\n }\n\n /** Check if a tool exists. */\n has(name: string): boolean {\n return this.tools.has(name);\n }\n\n /** Get tool definitions for the LLM. */\n getDefinitions(): ToolDefinition[] {\n return Array.from(this.tools.values()).map((t) => t.getDefinition());\n }\n\n /** Execute a tool by name with arguments. */\n async execute(\n name: string,\n args: Record<string, unknown>,\n ): Promise<string> {\n const tool = this.tools.get(name);\n if (!tool) {\n return `Error: Unknown tool '${name}'`;\n }\n try {\n return await tool.execute(args);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n console.error(`Error executing ${name}: ${message}`);\n return `Error executing ${name}: ${message}`;\n }\n }\n\n /** Get all registered tool names. */\n getNames(): string[] {\n return Array.from(this.tools.keys());\n }\n\n /** Get count of registered tools. */\n get size(): number {\n return this.tools.size;\n }\n}\n"],"mappings":";;;;AAMA,IAAa,eAAb,MAA0B;CACxB,AAAQ,wBAAQ,IAAI,KAAmB;;CAGvC,SAAS,MAAkB;AACzB,OAAK,MAAM,IAAI,KAAK,MAAM,KAAK;;;CAIjC,WAAW,MAAuB;AAChC,SAAO,KAAK,MAAM,OAAO,KAAK;;;CAIhC,IAAI,MAAgC;AAClC,SAAO,KAAK,MAAM,IAAI,KAAK;;;CAI7B,IAAI,MAAuB;AACzB,SAAO,KAAK,MAAM,IAAI,KAAK;;;CAI7B,iBAAmC;AACjC,SAAO,MAAM,KAAK,KAAK,MAAM,QAAQ,CAAC,CAAC,KAAK,MAAM,EAAE,eAAe,CAAC;;;CAItE,MAAM,QACJ,MACA,MACiB;EACjB,MAAM,OAAO,KAAK,MAAM,IAAI,KAAK;AACjC,MAAI,CAAC,KACH,QAAO,wBAAwB,KAAK;AAEtC,MAAI;AACF,UAAO,MAAM,KAAK,QAAQ,KAAK;WACxB,KAAK;GACZ,MAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;AAChE,WAAQ,MAAM,mBAAmB,KAAK,IAAI,UAAU;AACpD,UAAO,mBAAmB,KAAK,IAAI;;;;CAKvC,WAAqB;AACnB,SAAO,MAAM,KAAK,KAAK,MAAM,MAAM,CAAC;;;CAItC,IAAI,OAAe;AACjB,SAAO,KAAK,MAAM"}
@@ -70,31 +70,31 @@ declare const ChannelsConfigSchema: z.ZodObject<{
70
70
  channelAccessToken?: string | undefined;
71
71
  }>>;
72
72
  }, "strip", z.ZodTypeAny, {
73
- line: {
74
- enabled: boolean;
75
- allowFrom: string[];
76
- channelSecret: string;
77
- channelAccessToken: string;
78
- };
79
73
  telegram: {
80
74
  enabled: boolean;
81
75
  token: string;
82
76
  allowFrom: string[];
83
77
  proxy?: string | null | undefined;
84
78
  };
79
+ line: {
80
+ enabled: boolean;
81
+ allowFrom: string[];
82
+ channelSecret: string;
83
+ channelAccessToken: string;
84
+ };
85
85
  }, {
86
- line?: {
87
- enabled?: boolean | undefined;
88
- allowFrom?: string[] | undefined;
89
- channelSecret?: string | undefined;
90
- channelAccessToken?: string | undefined;
91
- } | undefined;
92
86
  telegram?: {
93
87
  enabled?: boolean | undefined;
94
88
  token?: string | undefined;
95
89
  allowFrom?: string[] | undefined;
96
90
  proxy?: string | null | undefined;
97
91
  } | undefined;
92
+ line?: {
93
+ enabled?: boolean | undefined;
94
+ allowFrom?: string[] | undefined;
95
+ channelSecret?: string | undefined;
96
+ channelAccessToken?: string | undefined;
97
+ } | undefined;
98
98
  }>;
99
99
  type ChannelsConfig = z.infer<typeof ChannelsConfigSchema>;
100
100
  declare const AgentDefaultsSchema: z.ZodObject<{
@@ -539,15 +539,15 @@ declare const ToolsConfigSchema: z.ZodObject<{
539
539
  export?: string | undefined;
540
540
  }>, "many">>;
541
541
  }, "strip", z.ZodTypeAny, {
542
- exec: {
543
- timeout: number;
544
- };
545
542
  web: {
546
543
  search: {
547
544
  apiKey: string;
548
545
  maxResults: number;
549
546
  };
550
547
  };
548
+ exec: {
549
+ timeout: number;
550
+ };
551
551
  restrictToWorkspace: boolean;
552
552
  enabled?: string[] | undefined;
553
553
  disabled?: string[] | undefined;
@@ -557,9 +557,6 @@ declare const ToolsConfigSchema: z.ZodObject<{
557
557
  export?: string | undefined;
558
558
  }[] | undefined;
559
559
  }, {
560
- exec?: {
561
- timeout?: number | undefined;
562
- } | undefined;
563
560
  enabled?: string[] | undefined;
564
561
  web?: {
565
562
  search?: {
@@ -567,6 +564,9 @@ declare const ToolsConfigSchema: z.ZodObject<{
567
564
  maxResults?: number | undefined;
568
565
  } | undefined;
569
566
  } | undefined;
567
+ exec?: {
568
+ timeout?: number | undefined;
569
+ } | undefined;
570
570
  restrictToWorkspace?: boolean | undefined;
571
571
  disabled?: string[] | undefined;
572
572
  custom?: {
@@ -648,31 +648,31 @@ declare const ConfigSchema: z.ZodObject<{
648
648
  channelAccessToken?: string | undefined;
649
649
  }>>;
650
650
  }, "strip", z.ZodTypeAny, {
651
- line: {
652
- enabled: boolean;
653
- allowFrom: string[];
654
- channelSecret: string;
655
- channelAccessToken: string;
656
- };
657
651
  telegram: {
658
652
  enabled: boolean;
659
653
  token: string;
660
654
  allowFrom: string[];
661
655
  proxy?: string | null | undefined;
662
656
  };
657
+ line: {
658
+ enabled: boolean;
659
+ allowFrom: string[];
660
+ channelSecret: string;
661
+ channelAccessToken: string;
662
+ };
663
663
  }, {
664
- line?: {
665
- enabled?: boolean | undefined;
666
- allowFrom?: string[] | undefined;
667
- channelSecret?: string | undefined;
668
- channelAccessToken?: string | undefined;
669
- } | undefined;
670
664
  telegram?: {
671
665
  enabled?: boolean | undefined;
672
666
  token?: string | undefined;
673
667
  allowFrom?: string[] | undefined;
674
668
  proxy?: string | null | undefined;
675
669
  } | undefined;
670
+ line?: {
671
+ enabled?: boolean | undefined;
672
+ allowFrom?: string[] | undefined;
673
+ channelSecret?: string | undefined;
674
+ channelAccessToken?: string | undefined;
675
+ } | undefined;
676
676
  }>>;
677
677
  providers: z.ZodDefault<z.ZodObject<{
678
678
  anthropic: z.ZodDefault<z.ZodObject<{
@@ -988,15 +988,15 @@ declare const ConfigSchema: z.ZodObject<{
988
988
  export?: string | undefined;
989
989
  }>, "many">>;
990
990
  }, "strip", z.ZodTypeAny, {
991
- exec: {
992
- timeout: number;
993
- };
994
991
  web: {
995
992
  search: {
996
993
  apiKey: string;
997
994
  maxResults: number;
998
995
  };
999
996
  };
997
+ exec: {
998
+ timeout: number;
999
+ };
1000
1000
  restrictToWorkspace: boolean;
1001
1001
  enabled?: string[] | undefined;
1002
1002
  disabled?: string[] | undefined;
@@ -1006,9 +1006,6 @@ declare const ConfigSchema: z.ZodObject<{
1006
1006
  export?: string | undefined;
1007
1007
  }[] | undefined;
1008
1008
  }, {
1009
- exec?: {
1010
- timeout?: number | undefined;
1011
- } | undefined;
1012
1009
  enabled?: string[] | undefined;
1013
1010
  web?: {
1014
1011
  search?: {
@@ -1016,6 +1013,9 @@ declare const ConfigSchema: z.ZodObject<{
1016
1013
  maxResults?: number | undefined;
1017
1014
  } | undefined;
1018
1015
  } | undefined;
1016
+ exec?: {
1017
+ timeout?: number | undefined;
1018
+ } | undefined;
1019
1019
  restrictToWorkspace?: boolean | undefined;
1020
1020
  disabled?: string[] | undefined;
1021
1021
  custom?: {
@@ -1035,18 +1035,18 @@ declare const ConfigSchema: z.ZodObject<{
1035
1035
  };
1036
1036
  };
1037
1037
  channels: {
1038
- line: {
1039
- enabled: boolean;
1040
- allowFrom: string[];
1041
- channelSecret: string;
1042
- channelAccessToken: string;
1043
- };
1044
1038
  telegram: {
1045
1039
  enabled: boolean;
1046
1040
  token: string;
1047
1041
  allowFrom: string[];
1048
1042
  proxy?: string | null | undefined;
1049
1043
  };
1044
+ line: {
1045
+ enabled: boolean;
1046
+ allowFrom: string[];
1047
+ channelSecret: string;
1048
+ channelAccessToken: string;
1049
+ };
1050
1050
  };
1051
1051
  providers: {
1052
1052
  anthropic: {
@@ -1110,15 +1110,15 @@ declare const ConfigSchema: z.ZodObject<{
1110
1110
  port: number;
1111
1111
  };
1112
1112
  tools: {
1113
- exec: {
1114
- timeout: number;
1115
- };
1116
1113
  web: {
1117
1114
  search: {
1118
1115
  apiKey: string;
1119
1116
  maxResults: number;
1120
1117
  };
1121
1118
  };
1119
+ exec: {
1120
+ timeout: number;
1121
+ };
1122
1122
  restrictToWorkspace: boolean;
1123
1123
  enabled?: string[] | undefined;
1124
1124
  disabled?: string[] | undefined;
@@ -1139,18 +1139,18 @@ declare const ConfigSchema: z.ZodObject<{
1139
1139
  } | undefined;
1140
1140
  } | undefined;
1141
1141
  channels?: {
1142
- line?: {
1143
- enabled?: boolean | undefined;
1144
- allowFrom?: string[] | undefined;
1145
- channelSecret?: string | undefined;
1146
- channelAccessToken?: string | undefined;
1147
- } | undefined;
1148
1142
  telegram?: {
1149
1143
  enabled?: boolean | undefined;
1150
1144
  token?: string | undefined;
1151
1145
  allowFrom?: string[] | undefined;
1152
1146
  proxy?: string | null | undefined;
1153
1147
  } | undefined;
1148
+ line?: {
1149
+ enabled?: boolean | undefined;
1150
+ allowFrom?: string[] | undefined;
1151
+ channelSecret?: string | undefined;
1152
+ channelAccessToken?: string | undefined;
1153
+ } | undefined;
1154
1154
  } | undefined;
1155
1155
  providers?: {
1156
1156
  anthropic?: {
@@ -1214,9 +1214,6 @@ declare const ConfigSchema: z.ZodObject<{
1214
1214
  port?: number | undefined;
1215
1215
  } | undefined;
1216
1216
  tools?: {
1217
- exec?: {
1218
- timeout?: number | undefined;
1219
- } | undefined;
1220
1217
  enabled?: string[] | undefined;
1221
1218
  web?: {
1222
1219
  search?: {
@@ -1224,6 +1221,9 @@ declare const ConfigSchema: z.ZodObject<{
1224
1221
  maxResults?: number | undefined;
1225
1222
  } | undefined;
1226
1223
  } | undefined;
1224
+ exec?: {
1225
+ timeout?: number | undefined;
1226
+ } | undefined;
1227
1227
  restrictToWorkspace?: boolean | undefined;
1228
1228
  disabled?: string[] | undefined;
1229
1229
  custom?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcheesepkg/nanobot",
3
- "version": "0.6.94",
3
+ "version": "0.6.96",
4
4
  "description": "Lightweight AI assistant - TypeScript port",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -15,15 +15,6 @@ Use this skill when the user:
15
15
  - Asks to transcribe or summarize a YouTube video
16
16
  - Sends a PDF and asks for a summary
17
17
 
18
- ## IMPORTANT: Always use spawn
19
-
20
- The `summarize` command is long-running (30-90 seconds). **Always** use the `spawn` tool to run it in the background. Never run `summarize` directly via `exec` — it will block the conversation.
21
-
22
- Example:
23
- ```
24
- spawn({ task: "Run: summarize \"https://example.com\" --model zai/glm-5 --language ja", label: "URL要約" })
25
- ```
26
-
27
18
  ## Quick start
28
19
 
29
20
  Always use `--model zai/glm-5` for summarization.