mcp-subagents-opencode 1.0.0
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.
- package/LICENSE +21 -0
- package/README.md +602 -0
- package/build/config/timeouts.d.ts +9 -0
- package/build/config/timeouts.d.ts.map +1 -0
- package/build/config/timeouts.js +18 -0
- package/build/config/timeouts.js.map +1 -0
- package/build/helpers.d.ts +6 -0
- package/build/helpers.d.ts.map +1 -0
- package/build/helpers.js +47 -0
- package/build/helpers.js.map +1 -0
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +245 -0
- package/build/index.js.map +1 -0
- package/build/models.d.ts +32 -0
- package/build/models.d.ts.map +1 -0
- package/build/models.js +58 -0
- package/build/models.js.map +1 -0
- package/build/server/register-notifications.d.ts +3 -0
- package/build/server/register-notifications.d.ts.map +1 -0
- package/build/server/register-notifications.js +77 -0
- package/build/server/register-notifications.js.map +1 -0
- package/build/server/register-resources.d.ts +3 -0
- package/build/server/register-resources.d.ts.map +1 -0
- package/build/server/register-resources.js +210 -0
- package/build/server/register-resources.js.map +1 -0
- package/build/server/register-retry-execution.d.ts +2 -0
- package/build/server/register-retry-execution.d.ts.map +1 -0
- package/build/server/register-retry-execution.js +28 -0
- package/build/server/register-retry-execution.js.map +1 -0
- package/build/server/register-tasks.d.ts +3 -0
- package/build/server/register-tasks.d.ts.map +1 -0
- package/build/server/register-tasks.js +52 -0
- package/build/server/register-tasks.js.map +1 -0
- package/build/server/register-tools.d.ts +3 -0
- package/build/server/register-tools.d.ts.map +1 -0
- package/build/server/register-tools.js +32 -0
- package/build/server/register-tools.js.map +1 -0
- package/build/server/resource-helpers.d.ts +21 -0
- package/build/server/resource-helpers.d.ts.map +1 -0
- package/build/server/resource-helpers.js +84 -0
- package/build/server/resource-helpers.js.map +1 -0
- package/build/services/account-manager.d.ts +88 -0
- package/build/services/account-manager.d.ts.map +1 -0
- package/build/services/account-manager.js +239 -0
- package/build/services/account-manager.js.map +1 -0
- package/build/services/claude-code-runner.d.ts +15 -0
- package/build/services/claude-code-runner.d.ts.map +1 -0
- package/build/services/claude-code-runner.js +475 -0
- package/build/services/claude-code-runner.js.map +1 -0
- package/build/services/client-context.d.ts +31 -0
- package/build/services/client-context.d.ts.map +1 -0
- package/build/services/client-context.js +44 -0
- package/build/services/client-context.js.map +1 -0
- package/build/services/exhaustion-fallback.d.ts +27 -0
- package/build/services/exhaustion-fallback.d.ts.map +1 -0
- package/build/services/exhaustion-fallback.js +30 -0
- package/build/services/exhaustion-fallback.js.map +1 -0
- package/build/services/fallback-orchestrator.d.ts +16 -0
- package/build/services/fallback-orchestrator.d.ts.map +1 -0
- package/build/services/fallback-orchestrator.js +48 -0
- package/build/services/fallback-orchestrator.js.map +1 -0
- package/build/services/opencode-client.d.ts +40 -0
- package/build/services/opencode-client.d.ts.map +1 -0
- package/build/services/opencode-client.js +147 -0
- package/build/services/opencode-client.js.map +1 -0
- package/build/services/opencode-spawner.d.ts +56 -0
- package/build/services/opencode-spawner.d.ts.map +1 -0
- package/build/services/opencode-spawner.js +426 -0
- package/build/services/opencode-spawner.js.map +1 -0
- package/build/services/output-file.d.ts +24 -0
- package/build/services/output-file.d.ts.map +1 -0
- package/build/services/output-file.js +90 -0
- package/build/services/output-file.js.map +1 -0
- package/build/services/progress-registry.d.ts +12 -0
- package/build/services/progress-registry.d.ts.map +1 -0
- package/build/services/progress-registry.js +97 -0
- package/build/services/progress-registry.js.map +1 -0
- package/build/services/question-registry.d.ts +79 -0
- package/build/services/question-registry.d.ts.map +1 -0
- package/build/services/question-registry.js +249 -0
- package/build/services/question-registry.js.map +1 -0
- package/build/services/retry-queue.d.ts +41 -0
- package/build/services/retry-queue.d.ts.map +1 -0
- package/build/services/retry-queue.js +195 -0
- package/build/services/retry-queue.js.map +1 -0
- package/build/services/sdk-client-manager.d.ts +149 -0
- package/build/services/sdk-client-manager.d.ts.map +1 -0
- package/build/services/sdk-client-manager.js +632 -0
- package/build/services/sdk-client-manager.js.map +1 -0
- package/build/services/sdk-session-adapter.d.ts +203 -0
- package/build/services/sdk-session-adapter.d.ts.map +1 -0
- package/build/services/sdk-session-adapter.js +1088 -0
- package/build/services/sdk-session-adapter.js.map +1 -0
- package/build/services/sdk-spawner.d.ts +42 -0
- package/build/services/sdk-spawner.d.ts.map +1 -0
- package/build/services/sdk-spawner.js +488 -0
- package/build/services/sdk-spawner.js.map +1 -0
- package/build/services/session-hooks.d.ts +24 -0
- package/build/services/session-hooks.d.ts.map +1 -0
- package/build/services/session-hooks.js +130 -0
- package/build/services/session-hooks.js.map +1 -0
- package/build/services/session-snapshot.d.ts +19 -0
- package/build/services/session-snapshot.d.ts.map +1 -0
- package/build/services/session-snapshot.js +203 -0
- package/build/services/session-snapshot.js.map +1 -0
- package/build/services/subscription-registry.d.ts +12 -0
- package/build/services/subscription-registry.d.ts.map +1 -0
- package/build/services/subscription-registry.js +27 -0
- package/build/services/subscription-registry.js.map +1 -0
- package/build/services/task-manager.d.ts +150 -0
- package/build/services/task-manager.d.ts.map +1 -0
- package/build/services/task-manager.js +765 -0
- package/build/services/task-manager.js.map +1 -0
- package/build/services/task-persistence.d.ts +29 -0
- package/build/services/task-persistence.d.ts.map +1 -0
- package/build/services/task-persistence.js +159 -0
- package/build/services/task-persistence.js.map +1 -0
- package/build/services/task-status-mapper.d.ts +21 -0
- package/build/services/task-status-mapper.d.ts.map +1 -0
- package/build/services/task-status-mapper.js +171 -0
- package/build/services/task-status-mapper.js.map +1 -0
- package/build/templates/index.d.ts +22 -0
- package/build/templates/index.d.ts.map +1 -0
- package/build/templates/index.js +147 -0
- package/build/templates/index.js.map +1 -0
- package/build/templates/overlays/coder-csharp.mdx +58 -0
- package/build/templates/overlays/coder-go.mdx +53 -0
- package/build/templates/overlays/coder-java.mdx +54 -0
- package/build/templates/overlays/coder-kotlin.mdx +56 -0
- package/build/templates/overlays/coder-nextjs.mdx +65 -0
- package/build/templates/overlays/coder-python.mdx +53 -0
- package/build/templates/overlays/coder-react.mdx +55 -0
- package/build/templates/overlays/coder-ruby.mdx +59 -0
- package/build/templates/overlays/coder-rust.mdx +48 -0
- package/build/templates/overlays/coder-supabase.mdx +268 -0
- package/build/templates/overlays/coder-supastarter.mdx +313 -0
- package/build/templates/overlays/coder-swift.mdx +56 -0
- package/build/templates/overlays/coder-tauri.mdx +566 -0
- package/build/templates/overlays/coder-triggerdev.mdx +296 -0
- package/build/templates/overlays/coder-typescript.mdx +45 -0
- package/build/templates/overlays/coder-vue.mdx +62 -0
- package/build/templates/overlays/planner-architecture.mdx +78 -0
- package/build/templates/overlays/planner-bugfix.mdx +36 -0
- package/build/templates/overlays/planner-feature.mdx +38 -0
- package/build/templates/overlays/planner-migration.mdx +50 -0
- package/build/templates/overlays/planner-refactor.mdx +57 -0
- package/build/templates/overlays/researcher-library.mdx +59 -0
- package/build/templates/overlays/researcher-performance.mdx +68 -0
- package/build/templates/overlays/researcher-security.mdx +86 -0
- package/build/templates/overlays/tester-graphql.mdx +191 -0
- package/build/templates/overlays/tester-playwright.mdx +621 -0
- package/build/templates/overlays/tester-rest.mdx +101 -0
- package/build/templates/overlays/tester-suite.mdx +177 -0
- package/build/templates/super-coder.mdx +529 -0
- package/build/templates/super-planner.mdx +568 -0
- package/build/templates/super-researcher.mdx +406 -0
- package/build/templates/super-tester.mdx +243 -0
- package/build/tools/answer-question.d.ts +30 -0
- package/build/tools/answer-question.d.ts.map +1 -0
- package/build/tools/answer-question.js +108 -0
- package/build/tools/answer-question.js.map +1 -0
- package/build/tools/cancel-task.d.ts +44 -0
- package/build/tools/cancel-task.d.ts.map +1 -0
- package/build/tools/cancel-task.js +144 -0
- package/build/tools/cancel-task.js.map +1 -0
- package/build/tools/send-message.d.ts +39 -0
- package/build/tools/send-message.d.ts.map +1 -0
- package/build/tools/send-message.js +124 -0
- package/build/tools/send-message.js.map +1 -0
- package/build/tools/shared-spawn.d.ts +56 -0
- package/build/tools/shared-spawn.d.ts.map +1 -0
- package/build/tools/shared-spawn.js +114 -0
- package/build/tools/shared-spawn.js.map +1 -0
- package/build/tools/spawn-agent.d.ts +85 -0
- package/build/tools/spawn-agent.d.ts.map +1 -0
- package/build/tools/spawn-agent.js +133 -0
- package/build/tools/spawn-agent.js.map +1 -0
- package/build/tools/spawn-coder.d.ts +70 -0
- package/build/tools/spawn-coder.d.ts.map +1 -0
- package/build/tools/spawn-coder.js +71 -0
- package/build/tools/spawn-coder.js.map +1 -0
- package/build/tools/spawn-planner.d.ts +70 -0
- package/build/tools/spawn-planner.d.ts.map +1 -0
- package/build/tools/spawn-planner.js +71 -0
- package/build/tools/spawn-planner.js.map +1 -0
- package/build/tools/spawn-researcher.d.ts +70 -0
- package/build/tools/spawn-researcher.d.ts.map +1 -0
- package/build/tools/spawn-researcher.js +70 -0
- package/build/tools/spawn-researcher.js.map +1 -0
- package/build/tools/spawn-task.d.ts +74 -0
- package/build/tools/spawn-task.d.ts.map +1 -0
- package/build/tools/spawn-task.js +107 -0
- package/build/tools/spawn-task.js.map +1 -0
- package/build/tools/spawn-tester.d.ts +70 -0
- package/build/tools/spawn-tester.d.ts.map +1 -0
- package/build/tools/spawn-tester.js +69 -0
- package/build/tools/spawn-tester.js.map +1 -0
- package/build/types.d.ts +101 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +28 -0
- package/build/types.js.map +1 -0
- package/build/utils/brief-validator.d.ts +30 -0
- package/build/utils/brief-validator.d.ts.map +1 -0
- package/build/utils/brief-validator.js +254 -0
- package/build/utils/brief-validator.js.map +1 -0
- package/build/utils/format.d.ts +34 -0
- package/build/utils/format.d.ts.map +1 -0
- package/build/utils/format.js +55 -0
- package/build/utils/format.js.map +1 -0
- package/build/utils/sanitize.d.ts +240 -0
- package/build/utils/sanitize.d.ts.map +1 -0
- package/build/utils/sanitize.js +89 -0
- package/build/utils/sanitize.js.map +1 -0
- package/build/utils/task-id-generator.d.ts +10 -0
- package/build/utils/task-id-generator.d.ts.map +1 -0
- package/build/utils/task-id-generator.js +22 -0
- package/build/utils/task-id-generator.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Answer Question Tool - Submit answers to pending questions.
|
|
3
|
+
* Ported from mcp-supersubagents, adapted for OpenCode.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { taskManager } from '../services/task-manager.js';
|
|
7
|
+
import { questionRegistry } from '../services/question-registry.js';
|
|
8
|
+
import { mcpText, mcpError } from '../utils/format.js';
|
|
9
|
+
const AnswerQuestionSchema = z.object({
|
|
10
|
+
task_id: z.string().min(1).describe('Task ID with pending question'),
|
|
11
|
+
answer: z.string().min(1).describe('Answer: choice number (1, 2, 3...), exact choice text, or "CUSTOM: your answer"'),
|
|
12
|
+
});
|
|
13
|
+
export const answerQuestionTool = {
|
|
14
|
+
name: 'answer_question',
|
|
15
|
+
description: `Submit an answer to a pending question from the agent.
|
|
16
|
+
|
|
17
|
+
When a task is paused because the agent asked a question, use this to respond.
|
|
18
|
+
|
|
19
|
+
**Answer formats:**
|
|
20
|
+
- **Choice by number**: \`"1"\`, \`"2"\`, \`"3"\` - selects the corresponding option
|
|
21
|
+
- **Choice by text**: Exact text of a choice option
|
|
22
|
+
- **Custom answer**: \`"CUSTOM: your custom text"\` - for freeform responses
|
|
23
|
+
|
|
24
|
+
**Example:**
|
|
25
|
+
\`\`\`
|
|
26
|
+
answer_question { "task_id": "abc123", "answer": "2" }
|
|
27
|
+
answer_question { "task_id": "abc123", "answer": "CUSTOM: Use TypeScript instead" }
|
|
28
|
+
\`\`\`
|
|
29
|
+
|
|
30
|
+
Check pending questions via resource \`task:///all\`.`,
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
task_id: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'Task ID with pending question',
|
|
37
|
+
},
|
|
38
|
+
answer: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Answer: choice number (1, 2, 3...), exact choice text, or "CUSTOM: your answer"',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ['task_id', 'answer'],
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export async function handleAnswerQuestion(args) {
|
|
47
|
+
try {
|
|
48
|
+
const parsed = AnswerQuestionSchema.parse(args || {});
|
|
49
|
+
const taskId = parsed.task_id.toLowerCase().trim();
|
|
50
|
+
// Check if task exists
|
|
51
|
+
const task = taskManager.getTask(taskId);
|
|
52
|
+
if (!task) {
|
|
53
|
+
return mcpError('Task not found', 'Read resource `task:///all` to find valid task IDs.');
|
|
54
|
+
}
|
|
55
|
+
// Check if there's a pending question
|
|
56
|
+
if (!questionRegistry.hasPendingQuestion(taskId)) {
|
|
57
|
+
if (task.pendingQuestion) {
|
|
58
|
+
return mcpError('Question registry mismatch', 'Task shows pending question but registry is empty. The question may have timed out.');
|
|
59
|
+
}
|
|
60
|
+
return mcpError('No pending question', `Task \`${taskId}\` does not have a pending question. Read resource \`task:///all\` to check status.`);
|
|
61
|
+
}
|
|
62
|
+
// Get the question for context
|
|
63
|
+
const question = questionRegistry.getQuestion(taskId);
|
|
64
|
+
// Submit the answer
|
|
65
|
+
const result = questionRegistry.submitAnswer(taskId, parsed.answer);
|
|
66
|
+
if (!result.success) {
|
|
67
|
+
const parts = [`**Error:** ${result.error}`, ''];
|
|
68
|
+
if (question) {
|
|
69
|
+
parts.push(`**Question:** ${question.question}`);
|
|
70
|
+
if (question.choices && question.choices.length > 0) {
|
|
71
|
+
parts.push('');
|
|
72
|
+
parts.push('**Valid options:**');
|
|
73
|
+
question.choices.forEach((choice, i) => {
|
|
74
|
+
parts.push(`- \`${i + 1}\` -- ${choice}`);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (question.allowFreeform) {
|
|
78
|
+
parts.push('');
|
|
79
|
+
parts.push('**Custom answer:** `CUSTOM: your answer here`');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return { content: [{ type: 'text', text: parts.join('\n') }], isError: true };
|
|
83
|
+
}
|
|
84
|
+
// Success - build confirmation
|
|
85
|
+
const parts = [
|
|
86
|
+
`**Answer submitted**`,
|
|
87
|
+
`task_id: \`${taskId}\``,
|
|
88
|
+
task.outputFilePath ? `output_file: \`${task.outputFilePath}\`` : null,
|
|
89
|
+
'',
|
|
90
|
+
question ? `**Question:** ${question.question}` : null,
|
|
91
|
+
`**Answer:** ${result.resolvedAnswer}`,
|
|
92
|
+
'',
|
|
93
|
+
'Task execution resumed. MCP notifications will alert on completion.',
|
|
94
|
+
'',
|
|
95
|
+
'**Optional progress check:**',
|
|
96
|
+
task.outputFilePath ? `- \`tail -20 ${task.outputFilePath}\` -- Last 20 lines` : null,
|
|
97
|
+
`- Read resource: \`task:///${taskId}\``,
|
|
98
|
+
];
|
|
99
|
+
return mcpText(parts.filter(Boolean).join('\n'));
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
if (error instanceof z.ZodError) {
|
|
103
|
+
return mcpError('Invalid input', 'Required: task_id (string), answer (string)');
|
|
104
|
+
}
|
|
105
|
+
return mcpError(error instanceof Error ? error.message : 'Unknown error', 'Check task_id is valid and task has a pending question.');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=answer-question.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answer-question.js","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CA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CAAC;QACzF,CAAC;QAED,+BAA+B;QAC/B,MAAM,KAAK,GAAsB;YAC/B,sBAAsB;YACtB,cAAc,MAAM,IAAI;YACxB,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC,CAAC,IAAI;YACtE,EAAE;YACF,QAAQ,CAAC,CAAC,CAAC,iBAAiB,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI;YACtD,eAAe,MAAM,CAAC,cAAc,EAAE;YACtC,EAAE;YACF,qEAAqE;YACrE,EAAE;YACF,8BAA8B;YAC9B,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,cAAc,qBAAqB,CAAC,CAAC,CAAC,IAAI;YACrF,8BAA8B,MAAM,IAAI;SACzC,CAAC;QAEF,OAAO,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEnD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,CAAC,CAAC,QAAQ,EAAE,CAAC;YAChC,OAAO,QAAQ,CAAC,eAAe,EAAE,6CAA6C,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,QAAQ,CACb,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EACxD,yDAAyD,CAC1D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cancel Task Tool - Cancel running tasks or clear all tasks.
|
|
3
|
+
* Ported from mcp-supersubagents.
|
|
4
|
+
*/
|
|
5
|
+
export declare const cancelTaskTool: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object";
|
|
10
|
+
properties: {
|
|
11
|
+
task_id: {
|
|
12
|
+
oneOf: ({
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
items?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
type: string;
|
|
18
|
+
items: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
description: string;
|
|
22
|
+
})[];
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
clear: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
confirm: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
required: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare function handleCancelTask(args: unknown): Promise<{
|
|
38
|
+
content: Array<{
|
|
39
|
+
type: string;
|
|
40
|
+
text: string;
|
|
41
|
+
}>;
|
|
42
|
+
isError?: true;
|
|
43
|
+
}>;
|
|
44
|
+
//# sourceMappingURL=cancel-task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-task.d.ts","sourceRoot":"","sources":["../../src/tools/cancel-task.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC1B,CAAC;AASF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,CAsHjI"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cancel Task Tool - Cancel running tasks or clear all tasks.
|
|
3
|
+
* Ported from mcp-supersubagents.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { taskManager } from '../services/task-manager.js';
|
|
7
|
+
import { clientContext } from '../services/client-context.js';
|
|
8
|
+
import { deleteStorage } from '../services/task-persistence.js';
|
|
9
|
+
import { cancelTask as cancelOpenCodeTask } from '../services/opencode-spawner.js';
|
|
10
|
+
import { mcpText, mcpError, displayStatus, formatTable } from '../utils/format.js';
|
|
11
|
+
const CancelTaskSchema = z.object({
|
|
12
|
+
task_id: z.union([
|
|
13
|
+
z.string().min(1),
|
|
14
|
+
z.array(z.string().min(1)).min(1).max(50),
|
|
15
|
+
]).describe('Task ID, array of task IDs, or "all" to clear workspace'),
|
|
16
|
+
clear: z.boolean().optional().describe('When task_id="all", set true to clear all tasks'),
|
|
17
|
+
confirm: z.boolean().optional().describe('Required when clear=true'),
|
|
18
|
+
});
|
|
19
|
+
export const cancelTaskTool = {
|
|
20
|
+
name: 'cancel_task',
|
|
21
|
+
description: `Cancel or clear tasks. Accepts single ID, array of IDs, or "all" to clear workspace.
|
|
22
|
+
|
|
23
|
+
**Examples:**
|
|
24
|
+
- Cancel one: \`{ "task_id": "abc123" }\`
|
|
25
|
+
- Cancel many: \`{ "task_id": ["abc", "def", "ghi"] }\`
|
|
26
|
+
- Clear all: \`{ "task_id": "all", "clear": true, "confirm": true }\`
|
|
27
|
+
|
|
28
|
+
Running/pending tasks are killed. Completed/failed tasks are removed from memory.
|
|
29
|
+
Use MCP Resources to check task status: read \`task:///all\` or \`task:///{id}\`.`,
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
task_id: {
|
|
34
|
+
oneOf: [
|
|
35
|
+
{ type: 'string', description: 'Single task ID or "all"' },
|
|
36
|
+
{ type: 'array', items: { type: 'string' }, description: 'Array of task IDs to cancel' },
|
|
37
|
+
],
|
|
38
|
+
description: 'Task ID(s) to cancel, or "all" to clear workspace.',
|
|
39
|
+
},
|
|
40
|
+
clear: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
description: 'When task_id="all", set true to clear all tasks from workspace.',
|
|
43
|
+
},
|
|
44
|
+
confirm: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
description: 'Required confirmation when clear=true.',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
required: ['task_id'],
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
export async function handleCancelTask(args) {
|
|
53
|
+
try {
|
|
54
|
+
const parsed = CancelTaskSchema.parse(args || {});
|
|
55
|
+
// Handle "all" - clear workspace
|
|
56
|
+
if (parsed.task_id === 'all') {
|
|
57
|
+
if (!parsed.clear) {
|
|
58
|
+
return mcpError('Use clear=true to clear all tasks', '`{ "task_id": "all", "clear": true, "confirm": true }`');
|
|
59
|
+
}
|
|
60
|
+
if (!parsed.confirm) {
|
|
61
|
+
return mcpError('Confirmation required', '`{ "task_id": "all", "clear": true, "confirm": true }`');
|
|
62
|
+
}
|
|
63
|
+
const cwd = clientContext.getDefaultCwd();
|
|
64
|
+
const taskCount = await taskManager.clearAllTasks();
|
|
65
|
+
const deleted = await deleteStorage(cwd);
|
|
66
|
+
return mcpText(deleted
|
|
67
|
+
? `Cleared **${taskCount}** tasks from workspace.`
|
|
68
|
+
: 'No tasks to clear (workspace already clean).');
|
|
69
|
+
}
|
|
70
|
+
// Normalize to array
|
|
71
|
+
const taskIds = Array.isArray(parsed.task_id)
|
|
72
|
+
? parsed.task_id.map(id => id.toLowerCase().trim())
|
|
73
|
+
: [parsed.task_id.toLowerCase().trim()];
|
|
74
|
+
// Process each task
|
|
75
|
+
const results = [];
|
|
76
|
+
for (const taskId of taskIds) {
|
|
77
|
+
const task = taskManager.getTask(taskId);
|
|
78
|
+
if (!task) {
|
|
79
|
+
results.push({ task_id: taskId, success: false, error: 'Not found' });
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const previousStatus = task.status;
|
|
83
|
+
// Cancel via the spawner (aborts polling) then the task manager
|
|
84
|
+
await cancelOpenCodeTask(taskId);
|
|
85
|
+
const cancelResult = taskManager.cancelTask(taskId);
|
|
86
|
+
if (cancelResult.success) {
|
|
87
|
+
results.push({
|
|
88
|
+
task_id: taskId,
|
|
89
|
+
success: true,
|
|
90
|
+
previous_status: previousStatus,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
results.push({
|
|
95
|
+
task_id: taskId,
|
|
96
|
+
success: false,
|
|
97
|
+
previous_status: previousStatus,
|
|
98
|
+
error: cancelResult.error || 'Cannot cancel',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Format response
|
|
103
|
+
const succeeded = results.filter(r => r.success);
|
|
104
|
+
const failed = results.filter(r => !r.success);
|
|
105
|
+
// Single task response
|
|
106
|
+
if (taskIds.length === 1) {
|
|
107
|
+
const result = results[0];
|
|
108
|
+
const task = taskManager.getTask(result.task_id);
|
|
109
|
+
if (result.success) {
|
|
110
|
+
const parts = [
|
|
111
|
+
`**Task cancelled**`,
|
|
112
|
+
`task_id: \`${result.task_id}\``,
|
|
113
|
+
`previous_status: ${displayStatus(result.previous_status)}`,
|
|
114
|
+
task?.outputFilePath ? `output_file: \`${task.outputFilePath}\`` : null,
|
|
115
|
+
'',
|
|
116
|
+
task?.outputFilePath ? `Review output: \`cat ${task.outputFilePath}\`` : null,
|
|
117
|
+
];
|
|
118
|
+
return mcpText(parts.filter(Boolean).join('\n'));
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
return mcpError(`Failed to cancel **${result.task_id}**: ${result.error}`, 'Only running/pending/waiting tasks can be cancelled. Check task:///all for status.');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// Batch response
|
|
125
|
+
const parts = [];
|
|
126
|
+
parts.push(`## Cancel Results (${succeeded.length}/${results.length} succeeded)`);
|
|
127
|
+
parts.push('');
|
|
128
|
+
if (succeeded.length > 0) {
|
|
129
|
+
const rows = succeeded.map(r => [r.task_id, 'OK', displayStatus(r.previous_status)]);
|
|
130
|
+
parts.push(formatTable(['Task', 'Result', 'Was'], rows));
|
|
131
|
+
}
|
|
132
|
+
if (failed.length > 0) {
|
|
133
|
+
parts.push('');
|
|
134
|
+
parts.push('### Failed');
|
|
135
|
+
const rows = failed.map(r => [r.task_id, 'FAIL', r.error || 'Unknown']);
|
|
136
|
+
parts.push(formatTable(['Task', 'Result', 'Reason'], rows));
|
|
137
|
+
}
|
|
138
|
+
return mcpText(parts.join('\n'));
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
return mcpError(error instanceof Error ? error.message : 'Unknown error', 'Provide task_id as string, array, or "all". Check task:///all for valid IDs.');
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=cancel-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-task.js","sourceRoot":"","sources":["../../src/tools/cancel-task.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEnF,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC;QACf,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACjB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;KAC1C,CAAC,C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KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,QAAQ,CACb,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EACxD,8EAA8E,CAC/E,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send Message Tool - Send a new message to an existing task session.
|
|
3
|
+
* Ported from mcp-supersubagents, adapted for OpenCode.
|
|
4
|
+
*/
|
|
5
|
+
import type { ToolContext } from '../types.js';
|
|
6
|
+
export declare const sendMessageTool: {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: "object";
|
|
11
|
+
properties: {
|
|
12
|
+
task_id: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
message: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
timeout: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
cwd: {
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
required: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare function handleSendMessage(args: unknown, ctx?: ToolContext): Promise<{
|
|
33
|
+
content: Array<{
|
|
34
|
+
type: string;
|
|
35
|
+
text: string;
|
|
36
|
+
}>;
|
|
37
|
+
isError?: true;
|
|
38
|
+
}>;
|
|
39
|
+
//# sourceMappingURL=send-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-message.d.ts","sourceRoot":"","sources":["../../src/tools/send-message.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAW/C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CAsC3B,CAAC;AAEF,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,OAAO,EACb,GAAG,CAAC,EAAE,WAAW,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,CA6F7E"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send Message Tool - Send a new message to an existing task session.
|
|
3
|
+
* Ported from mcp-supersubagents, adapted for OpenCode.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { taskManager } from '../services/task-manager.js';
|
|
7
|
+
import { spawnOpenCodeTask } from '../services/opencode-spawner.js';
|
|
8
|
+
import { progressRegistry } from '../services/progress-registry.js';
|
|
9
|
+
import { TaskStatus } from '../types.js';
|
|
10
|
+
import { mcpText, mcpError } from '../utils/format.js';
|
|
11
|
+
import { TASK_TIMEOUT_MAX_MS, TASK_TIMEOUT_MIN_MS } from '../config/timeouts.js';
|
|
12
|
+
const SendMessageSchema = z.object({
|
|
13
|
+
task_id: z.string().min(1),
|
|
14
|
+
message: z.string().default('continue').optional().describe('Message to send (default: "continue")'),
|
|
15
|
+
timeout: z.number().int().min(TASK_TIMEOUT_MIN_MS).max(TASK_TIMEOUT_MAX_MS).optional(),
|
|
16
|
+
cwd: z.string().optional(),
|
|
17
|
+
});
|
|
18
|
+
export const sendMessageTool = {
|
|
19
|
+
name: 'send_message',
|
|
20
|
+
description: `Send a message to an existing task session to continue the conversation.
|
|
21
|
+
|
|
22
|
+
**Use this to:**
|
|
23
|
+
- Continue a completed task with follow-up ("now also add tests")
|
|
24
|
+
- Resume a failed/rate-limited task with "continue"
|
|
25
|
+
- Add to context without starting fresh
|
|
26
|
+
|
|
27
|
+
**Default message:** "continue" (picks up where it left off)
|
|
28
|
+
|
|
29
|
+
**Examples:**
|
|
30
|
+
- \`{ "task_id": "abc123" }\` -- Resume with "continue"
|
|
31
|
+
- \`{ "task_id": "abc123", "message": "now add unit tests" }\` -- Follow-up instruction
|
|
32
|
+
|
|
33
|
+
**Find task_id:** Read MCP Resource \`task:///all\` for task list with IDs and \`can_send_message\` flag.`,
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
task_id: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Task ID to send message to. Get from resource task:///all.',
|
|
40
|
+
},
|
|
41
|
+
message: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'Message to send to the session. Default: "continue" (resumes where it left off).',
|
|
44
|
+
},
|
|
45
|
+
timeout: {
|
|
46
|
+
type: 'number',
|
|
47
|
+
description: 'Optional. Max execution time in ms. Default: from original task.',
|
|
48
|
+
},
|
|
49
|
+
cwd: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Working directory. Auto-detected from original task if omitted.',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
required: ['task_id'],
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
export async function handleSendMessage(args, ctx) {
|
|
58
|
+
let parsed;
|
|
59
|
+
try {
|
|
60
|
+
parsed = SendMessageSchema.parse(args || {});
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
return mcpError('Invalid input', 'Required: task_id (string). Optional: message (string), timeout (number), cwd (string).');
|
|
64
|
+
}
|
|
65
|
+
const taskId = parsed.task_id.toLowerCase().trim();
|
|
66
|
+
const task = taskManager.getTask(taskId);
|
|
67
|
+
if (!task) {
|
|
68
|
+
return mcpError(`Task not found: "${taskId}"`, 'Read resource `task:///all` to find valid task IDs.');
|
|
69
|
+
}
|
|
70
|
+
if (!task.sessionId) {
|
|
71
|
+
return mcpError('Task has no session ID', 'This task cannot receive messages. Use `spawn_agent` to create a new task.');
|
|
72
|
+
}
|
|
73
|
+
// Check if task is in a state that can receive messages
|
|
74
|
+
const allowedStatuses = [
|
|
75
|
+
TaskStatus.COMPLETED,
|
|
76
|
+
TaskStatus.FAILED,
|
|
77
|
+
TaskStatus.RATE_LIMITED,
|
|
78
|
+
TaskStatus.TIMED_OUT,
|
|
79
|
+
];
|
|
80
|
+
if (!allowedStatuses.includes(task.status)) {
|
|
81
|
+
if (task.status === TaskStatus.RUNNING) {
|
|
82
|
+
return mcpError('Task is still running', 'Wait for the task to complete, or use `cancel_task` first.');
|
|
83
|
+
}
|
|
84
|
+
return mcpError(`Task status "${task.status}" does not support messaging`, 'Only completed, failed, rate_limited, or timed_out tasks can receive messages.');
|
|
85
|
+
}
|
|
86
|
+
const sessionId = task.sessionId;
|
|
87
|
+
const cwd = parsed.cwd || task.cwd || process.cwd();
|
|
88
|
+
const timeout = parsed.timeout || task.timeout;
|
|
89
|
+
const message = parsed.message || 'continue';
|
|
90
|
+
try {
|
|
91
|
+
const newTaskId = await spawnOpenCodeTask({
|
|
92
|
+
prompt: message,
|
|
93
|
+
timeout,
|
|
94
|
+
cwd,
|
|
95
|
+
autonomous: true,
|
|
96
|
+
resumeSessionId: sessionId,
|
|
97
|
+
labels: [`continued-from:${task.id}`],
|
|
98
|
+
});
|
|
99
|
+
const newTask = taskManager.getTask(newTaskId);
|
|
100
|
+
if (ctx?.progressToken != null) {
|
|
101
|
+
progressRegistry.register(newTaskId, ctx.progressToken, ctx.sendNotification);
|
|
102
|
+
progressRegistry.sendProgress(newTaskId, `Sent message to session ${sessionId} as task ${newTaskId}`);
|
|
103
|
+
}
|
|
104
|
+
const parts = [
|
|
105
|
+
`**Message sent**`,
|
|
106
|
+
`task_id: \`${newTaskId}\``,
|
|
107
|
+
newTask?.outputFilePath ? `output_file: \`${newTask.outputFilePath}\`` : null,
|
|
108
|
+
'',
|
|
109
|
+
`**Message:** "${message.slice(0, 50)}${message.length > 50 ? '...' : ''}"`,
|
|
110
|
+
`**Continued from:** \`${task.id}\``,
|
|
111
|
+
'',
|
|
112
|
+
'The agent is working in the background. MCP notifications will alert on completion.',
|
|
113
|
+
'',
|
|
114
|
+
'**Optional progress check:**',
|
|
115
|
+
newTask?.outputFilePath ? `- \`tail -20 ${newTask.outputFilePath}\` -- Last 20 lines` : null,
|
|
116
|
+
`- Read resource: \`task:///${newTaskId}\``,
|
|
117
|
+
];
|
|
118
|
+
return mcpText(parts.filter(Boolean).join('\n'));
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
return mcpError(error instanceof Error ? error.message : 'Failed to send message', 'Check that the task session is still valid. Try creating a new task with `spawn_agent` instead.');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=send-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-message.js","sourceRoot":"","sources":["../../src/tools/send-message.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjF,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,QA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Shared spawn logic used by all spawn tool handlers.
|
|
3
|
+
* Ported from mcp-supersubagents, adapted for OpenCode.
|
|
4
|
+
*/
|
|
5
|
+
import { type TaskType } from '../templates/index.js';
|
|
6
|
+
import { type ToolContext } from '../types.js';
|
|
7
|
+
import { type ContextFile } from '../utils/brief-validator.js';
|
|
8
|
+
export interface SharedSpawnParams {
|
|
9
|
+
prompt: string;
|
|
10
|
+
context_files?: ContextFile[];
|
|
11
|
+
model?: string;
|
|
12
|
+
cwd?: string;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
autonomous?: boolean;
|
|
15
|
+
depends_on?: string[];
|
|
16
|
+
labels?: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface SpawnToolConfig {
|
|
19
|
+
toolName: string;
|
|
20
|
+
taskType?: TaskType;
|
|
21
|
+
specialization?: string;
|
|
22
|
+
}
|
|
23
|
+
export type SpawnHandlerResult = Promise<{
|
|
24
|
+
content: Array<{
|
|
25
|
+
type: string;
|
|
26
|
+
text: string;
|
|
27
|
+
}>;
|
|
28
|
+
isError?: true;
|
|
29
|
+
}>;
|
|
30
|
+
export interface SpawnHandlerConfig<T> {
|
|
31
|
+
schema: {
|
|
32
|
+
parse: (args: unknown) => T;
|
|
33
|
+
};
|
|
34
|
+
toolName: string;
|
|
35
|
+
taskType?: TaskType;
|
|
36
|
+
validationHint: string;
|
|
37
|
+
getSpecialization?: (parsed: T) => string | undefined;
|
|
38
|
+
getModel?: (parsed: T) => string | undefined;
|
|
39
|
+
getTaskType?: (parsed: T) => TaskType | undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Generic factory that creates a spawn tool handler.
|
|
43
|
+
*/
|
|
44
|
+
export declare function createSpawnHandler<T extends SharedSpawnParams>(config: SpawnHandlerConfig<T>): (args: unknown, ctx?: ToolContext) => SpawnHandlerResult;
|
|
45
|
+
/**
|
|
46
|
+
* Shared spawn handler used by all spawn tools.
|
|
47
|
+
* Performs: brief validation -> context file assembly -> template application -> task spawn.
|
|
48
|
+
*/
|
|
49
|
+
export declare function handleSharedSpawn(params: SharedSpawnParams, config: SpawnToolConfig, ctx?: ToolContext): Promise<{
|
|
50
|
+
content: Array<{
|
|
51
|
+
type: string;
|
|
52
|
+
text: string;
|
|
53
|
+
}>;
|
|
54
|
+
isError?: true;
|
|
55
|
+
}>;
|
|
56
|
+
//# sourceMappingURL=shared-spawn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-spawn.d.ts","sourceRoot":"","sources":["../../src/tools/shared-spawn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtF,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAE7G,MAA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