sema-core 1.0.11 → 1.0.13
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/README.md +6 -11
- package/dist/core/Conversation.d.ts +6 -1
- package/dist/core/Conversation.d.ts.map +1 -1
- package/dist/core/Conversation.js +72 -28
- package/dist/core/Conversation.js.map +1 -1
- package/dist/core/RunTools.d.ts.map +1 -1
- package/dist/core/RunTools.js +1 -1
- package/dist/core/RunTools.js.map +1 -1
- package/dist/core/SemaCore.d.ts +16 -0
- package/dist/core/SemaCore.d.ts.map +1 -1
- package/dist/core/SemaCore.js +30 -3
- package/dist/core/SemaCore.js.map +1 -1
- package/dist/core/SemaEngine.d.ts +2 -18
- package/dist/core/SemaEngine.d.ts.map +1 -1
- package/dist/core/SemaEngine.js +101 -131
- package/dist/core/SemaEngine.js.map +1 -1
- package/dist/events/EventSystem.d.ts.map +1 -1
- package/dist/events/EventSystem.js +6 -2
- package/dist/events/EventSystem.js.map +1 -1
- package/dist/events/types.d.ts +60 -13
- package/dist/events/types.d.ts.map +1 -1
- package/dist/events/types.js +0 -1
- package/dist/events/types.js.map +1 -1
- package/dist/manager/ConfManager.d.ts.map +1 -1
- package/dist/manager/ConfManager.js +3 -1
- package/dist/manager/ConfManager.js.map +1 -1
- package/dist/manager/CronManager.d.ts +52 -0
- package/dist/manager/CronManager.d.ts.map +1 -0
- package/dist/manager/CronManager.js +426 -0
- package/dist/manager/CronManager.js.map +1 -0
- package/dist/manager/PermissionManager.d.ts +1 -1
- package/dist/manager/PermissionManager.d.ts.map +1 -1
- package/dist/manager/PermissionManager.js +63 -12
- package/dist/manager/PermissionManager.js.map +1 -1
- package/dist/manager/StateManager.d.ts +79 -11
- package/dist/manager/StateManager.d.ts.map +1 -1
- package/dist/manager/StateManager.js +287 -4
- package/dist/manager/StateManager.js.map +1 -1
- package/dist/manager/TaskManager.d.ts +106 -0
- package/dist/manager/TaskManager.d.ts.map +1 -0
- package/dist/manager/TaskManager.js +664 -0
- package/dist/manager/TaskManager.js.map +1 -0
- package/dist/services/agents/defaultBuiltInAgentsConfs.js +3 -3
- package/dist/services/agents/defaultBuiltInAgentsConfs.js.map +1 -1
- package/dist/services/agents/systemReminder.d.ts.map +1 -1
- package/dist/services/agents/systemReminder.js +8 -118
- package/dist/services/agents/systemReminder.js.map +1 -1
- package/dist/services/api/adapt/anthropic.js +2 -2
- package/dist/services/api/adapt/anthropic.js.map +1 -1
- package/dist/services/api/adapt/openai.js +2 -2
- package/dist/services/api/adapt/openai.js.map +1 -1
- package/dist/services/api/adapt/util.d.ts +1 -1
- package/dist/services/api/adapt/util.d.ts.map +1 -1
- package/dist/services/api/adapt/util.js +2 -2
- package/dist/services/api/adapt/util.js.map +1 -1
- package/dist/services/api/cache.d.ts.map +1 -1
- package/dist/services/api/cache.js +1 -3
- package/dist/services/api/cache.js.map +1 -1
- package/dist/services/api/queryLLM.d.ts.map +1 -1
- package/dist/services/api/queryLLM.js +5 -0
- package/dist/services/api/queryLLM.js.map +1 -1
- package/dist/services/commands/runCommand.d.ts.map +1 -1
- package/dist/services/commands/runCommand.js +12 -0
- package/dist/services/commands/runCommand.js.map +1 -1
- package/dist/services/mcp/MCPManager.d.ts.map +1 -1
- package/dist/services/mcp/MCPManager.js +6 -1
- package/dist/services/mcp/MCPManager.js.map +1 -1
- package/dist/services/plugins/pluginsManager.d.ts.map +1 -1
- package/dist/services/plugins/pluginsManager.js +8 -1
- package/dist/services/plugins/pluginsManager.js.map +1 -1
- package/dist/services/rules/rulesManager.d.ts +51 -0
- package/dist/services/rules/rulesManager.d.ts.map +1 -0
- package/dist/services/rules/rulesManager.js +192 -0
- package/dist/services/rules/rulesManager.js.map +1 -0
- package/dist/tools/Agent/Agent.d.ts +19 -11
- package/dist/tools/Agent/Agent.d.ts.map +1 -1
- package/dist/tools/Agent/Agent.js +249 -72
- package/dist/tools/Agent/Agent.js.map +1 -1
- package/dist/tools/Agent/prompt.d.ts.map +1 -1
- package/dist/tools/Agent/prompt.js +7 -9
- package/dist/tools/Agent/prompt.js.map +1 -1
- package/dist/tools/Bash/Bash.d.ts +21 -11
- package/dist/tools/Bash/Bash.d.ts.map +1 -1
- package/dist/tools/Bash/Bash.js +74 -17
- package/dist/tools/Bash/Bash.js.map +1 -1
- package/dist/tools/Bash/prompt.d.ts.map +1 -1
- package/dist/tools/Bash/prompt.js +53 -70
- package/dist/tools/Bash/prompt.js.map +1 -1
- package/dist/tools/Bash/utils.d.ts +5 -1
- package/dist/tools/Bash/utils.d.ts.map +1 -1
- package/dist/tools/Bash/utils.js +24 -4
- package/dist/tools/Bash/utils.js.map +1 -1
- package/dist/tools/CronCreate/CronCreate.d.ts +68 -0
- package/dist/tools/CronCreate/CronCreate.d.ts.map +1 -0
- package/dist/tools/CronCreate/CronCreate.js +75 -0
- package/dist/tools/CronCreate/CronCreate.js.map +1 -0
- package/dist/tools/CronCreate/prompt.d.ts +3 -0
- package/dist/tools/CronCreate/prompt.d.ts.map +1 -0
- package/dist/tools/CronCreate/prompt.js +41 -0
- package/dist/tools/CronCreate/prompt.js.map +1 -0
- package/dist/tools/CronDelete/CronDelete.d.ts +45 -0
- package/dist/tools/CronDelete/CronDelete.d.ts.map +1 -0
- package/dist/tools/CronDelete/CronDelete.js +51 -0
- package/dist/tools/CronDelete/CronDelete.js.map +1 -0
- package/dist/tools/CronDelete/prompt.d.ts +3 -0
- package/dist/tools/CronDelete/prompt.d.ts.map +1 -0
- package/dist/tools/CronDelete/prompt.js +6 -0
- package/dist/tools/CronDelete/prompt.js.map +1 -0
- package/dist/tools/CronList/CronList.d.ts +33 -0
- package/dist/tools/CronList/CronList.d.ts.map +1 -0
- package/dist/tools/CronList/CronList.js +55 -0
- package/dist/tools/CronList/CronList.js.map +1 -0
- package/dist/tools/CronList/prompt.d.ts +3 -0
- package/dist/tools/CronList/prompt.d.ts.map +1 -0
- package/dist/tools/CronList/prompt.js +6 -0
- package/dist/tools/CronList/prompt.js.map +1 -0
- package/dist/tools/Edit/Edit.d.ts.map +1 -1
- package/dist/tools/Edit/Edit.js +7 -3
- package/dist/tools/Edit/Edit.js.map +1 -1
- package/dist/tools/Edit/utils.d.ts.map +1 -1
- package/dist/tools/Edit/utils.js +14 -5
- package/dist/tools/Edit/utils.js.map +1 -1
- package/dist/tools/Grep/Grep.d.ts +4 -4
- package/dist/tools/NotebookEdit/NotebookEdit.js +1 -1
- package/dist/tools/NotebookEdit/NotebookEdit.js.map +1 -1
- package/dist/tools/Read/Read.d.ts +74 -3
- package/dist/tools/Read/Read.d.ts.map +1 -1
- package/dist/tools/Read/Read.js +188 -18
- package/dist/tools/Read/Read.js.map +1 -1
- package/dist/tools/Read/prompt.d.ts +1 -1
- package/dist/tools/Read/prompt.d.ts.map +1 -1
- package/dist/tools/Read/prompt.js +2 -1
- package/dist/tools/Read/prompt.js.map +1 -1
- package/dist/tools/Skill/Skill.d.ts +2 -1
- package/dist/tools/Skill/Skill.d.ts.map +1 -1
- package/dist/tools/Skill/Skill.js +3 -2
- package/dist/tools/Skill/Skill.js.map +1 -1
- package/dist/tools/TaskCreate/TaskCreate.d.ts +54 -0
- package/dist/tools/TaskCreate/TaskCreate.d.ts.map +1 -0
- package/dist/tools/TaskCreate/TaskCreate.js +51 -0
- package/dist/tools/TaskCreate/TaskCreate.js.map +1 -0
- package/dist/tools/TaskCreate/prompt.d.ts +3 -0
- package/dist/tools/TaskCreate/prompt.d.ts.map +1 -0
- package/dist/tools/TaskCreate/prompt.js +45 -0
- package/dist/tools/TaskCreate/prompt.js.map +1 -0
- package/dist/tools/TaskGet/TaskGet.d.ts +34 -0
- package/dist/tools/TaskGet/TaskGet.d.ts.map +1 -0
- package/dist/tools/TaskGet/TaskGet.js +57 -0
- package/dist/tools/TaskGet/TaskGet.js.map +1 -0
- package/dist/tools/TaskGet/prompt.d.ts +3 -0
- package/dist/tools/TaskGet/prompt.d.ts.map +1 -0
- package/dist/tools/TaskGet/prompt.js +26 -0
- package/dist/tools/TaskGet/prompt.js.map +1 -0
- package/dist/tools/TaskList/TaskList.d.ts +27 -0
- package/dist/tools/TaskList/TaskList.d.ts.map +1 -0
- package/dist/tools/TaskList/TaskList.js +56 -0
- package/dist/tools/TaskList/TaskList.js.map +1 -0
- package/dist/tools/TaskList/prompt.d.ts +3 -0
- package/dist/tools/TaskList/prompt.d.ts.map +1 -0
- package/dist/tools/TaskList/prompt.js +25 -0
- package/dist/tools/TaskList/prompt.js.map +1 -0
- package/dist/tools/TaskOutput/TaskOutput.d.ts +58 -0
- package/dist/tools/TaskOutput/TaskOutput.d.ts.map +1 -0
- package/dist/tools/TaskOutput/TaskOutput.js +95 -0
- package/dist/tools/TaskOutput/TaskOutput.js.map +1 -0
- package/dist/tools/TaskStop/TaskStop.d.ts +50 -0
- package/dist/tools/TaskStop/TaskStop.d.ts.map +1 -0
- package/dist/tools/TaskStop/TaskStop.js +69 -0
- package/dist/tools/TaskStop/TaskStop.js.map +1 -0
- package/dist/tools/TaskUpdate/TaskUpdate.d.ts +88 -0
- package/dist/tools/TaskUpdate/TaskUpdate.d.ts.map +1 -0
- package/dist/tools/TaskUpdate/TaskUpdate.js +115 -0
- package/dist/tools/TaskUpdate/TaskUpdate.js.map +1 -0
- package/dist/tools/TaskUpdate/prompt.d.ts +3 -0
- package/dist/tools/TaskUpdate/prompt.d.ts.map +1 -0
- package/dist/tools/TaskUpdate/prompt.js +80 -0
- package/dist/tools/TaskUpdate/prompt.js.map +1 -0
- package/dist/tools/WebFetch/WebFetch.d.ts +62 -0
- package/dist/tools/WebFetch/WebFetch.d.ts.map +1 -0
- package/dist/tools/WebFetch/WebFetch.js +143 -0
- package/dist/tools/WebFetch/WebFetch.js.map +1 -0
- package/dist/tools/WebFetch/prompt.d.ts +4 -0
- package/dist/tools/WebFetch/prompt.d.ts.map +1 -0
- package/dist/tools/WebFetch/prompt.js +38 -0
- package/dist/tools/WebFetch/prompt.js.map +1 -0
- package/dist/tools/WebFetch/utils.d.ts +20 -0
- package/dist/tools/WebFetch/utils.d.ts.map +1 -0
- package/dist/tools/WebFetch/utils.js +223 -0
- package/dist/tools/WebFetch/utils.js.map +1 -0
- package/dist/tools/Write/Write.js +1 -1
- package/dist/tools/Write/Write.js.map +1 -1
- package/dist/tools/base/Tool.d.ts +1 -0
- package/dist/tools/base/Tool.d.ts.map +1 -1
- package/dist/tools/base/tools.d.ts +4 -2
- package/dist/tools/base/tools.d.ts.map +1 -1
- package/dist/tools/base/tools.js +61 -14
- package/dist/tools/base/tools.js.map +1 -1
- package/dist/types/cron.d.ts +21 -0
- package/dist/types/cron.d.ts.map +1 -0
- package/dist/types/cron.js +6 -0
- package/dist/types/cron.js.map +1 -0
- package/dist/types/index.d.ts +9 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/rule.d.ts +8 -0
- package/dist/types/rule.d.ts.map +1 -0
- package/dist/types/rule.js +3 -0
- package/dist/types/rule.js.map +1 -0
- package/dist/types/task.d.ts +93 -0
- package/dist/types/task.d.ts.map +1 -0
- package/dist/types/task.js +3 -0
- package/dist/types/task.js.map +1 -0
- package/dist/types/todoTask.d.ts +29 -0
- package/dist/types/todoTask.d.ts.map +1 -0
- package/dist/types/todoTask.js +6 -0
- package/dist/types/todoTask.js.map +1 -0
- package/dist/util/assembleTools.d.ts +6 -0
- package/dist/util/assembleTools.d.ts.map +1 -0
- package/dist/util/assembleTools.js +17 -0
- package/dist/util/assembleTools.js.map +1 -0
- package/dist/util/btw.d.ts +6 -0
- package/dist/util/btw.d.ts.map +1 -0
- package/dist/util/btw.js +80 -0
- package/dist/util/btw.js.map +1 -0
- package/dist/util/compact.d.ts +16 -4
- package/dist/util/compact.d.ts.map +1 -1
- package/dist/util/compact.js +12 -18
- package/dist/util/compact.js.map +1 -1
- package/dist/util/cron.d.ts +17 -0
- package/dist/util/cron.d.ts.map +1 -0
- package/dist/util/cron.js +82 -0
- package/dist/util/cron.js.map +1 -0
- package/dist/util/file.d.ts +16 -0
- package/dist/util/file.d.ts.map +1 -1
- package/dist/util/file.js +55 -0
- package/dist/util/file.js.map +1 -1
- package/dist/util/fileReference.d.ts.map +1 -1
- package/dist/util/fileReference.js +10 -1
- package/dist/util/fileReference.js.map +1 -1
- package/dist/util/format.d.ts +6 -0
- package/dist/util/format.d.ts.map +1 -1
- package/dist/util/format.js +17 -0
- package/dist/util/format.js.map +1 -1
- package/dist/util/history.d.ts +4 -1
- package/dist/util/history.d.ts.map +1 -1
- package/dist/util/history.js +9 -5
- package/dist/util/history.js.map +1 -1
- package/dist/util/inputQueue.d.ts +19 -0
- package/dist/util/inputQueue.d.ts.map +1 -0
- package/dist/util/inputQueue.js +30 -0
- package/dist/util/inputQueue.js.map +1 -0
- package/dist/util/message.d.ts +4 -0
- package/dist/util/message.d.ts.map +1 -1
- package/dist/util/message.js +27 -0
- package/dist/util/message.js.map +1 -1
- package/dist/util/pdf.d.ts +83 -0
- package/dist/util/pdf.d.ts.map +1 -0
- package/dist/util/pdf.js +472 -0
- package/dist/util/pdf.js.map +1 -0
- package/dist/util/process.d.ts +10 -0
- package/dist/util/process.d.ts.map +1 -0
- package/dist/util/process.js +88 -0
- package/dist/util/process.js.map +1 -0
- package/dist/util/savePath.d.ts +0 -11
- package/dist/util/savePath.d.ts.map +1 -1
- package/dist/util/savePath.js +0 -17
- package/dist/util/savePath.js.map +1 -1
- package/dist/util/shell.d.ts +10 -1
- package/dist/util/shell.d.ts.map +1 -1
- package/dist/util/shell.js +89 -34
- package/dist/util/shell.js.map +1 -1
- package/dist/util/topic.d.ts +7 -0
- package/dist/util/topic.d.ts.map +1 -1
- package/dist/util/topic.js +40 -0
- package/dist/util/topic.js.map +1 -1
- package/package.json +2 -1
- package/dist/services/command/customCommands.d.ts +0 -1
- package/dist/services/command/customCommands.d.ts.map +0 -1
- package/dist/services/command/customCommands.js +0 -197
- package/dist/services/command/customCommands.js.map +0 -1
- package/dist/services/command/runCommand.d.ts +0 -18
- package/dist/services/command/runCommand.d.ts.map +0 -1
- package/dist/services/command/runCommand.js +0 -147
- package/dist/services/command/runCommand.js.map +0 -1
- package/dist/services/plugins/customCommands.d.ts +0 -29
- package/dist/services/plugins/customCommands.d.ts.map +0 -1
- package/dist/services/plugins/customCommands.js +0 -227
- package/dist/services/plugins/customCommands.js.map +0 -1
- package/dist/services/skill/skillLoader.d.ts +0 -17
- package/dist/services/skill/skillLoader.d.ts.map +0 -1
- package/dist/services/skill/skillLoader.js +0 -122
- package/dist/services/skill/skillLoader.js.map +0 -1
- package/dist/services/skill/skillParser.d.ts +0 -15
- package/dist/services/skill/skillParser.d.ts.map +0 -1
- package/dist/services/skill/skillParser.js +0 -66
- package/dist/services/skill/skillParser.js.map +0 -1
- package/dist/services/skill/skillRegistry.d.ts +0 -34
- package/dist/services/skill/skillRegistry.d.ts.map +0 -1
- package/dist/services/skill/skillRegistry.js +0 -98
- package/dist/services/skill/skillRegistry.js.map +0 -1
- package/dist/services/skill/skillsManager.d.ts +0 -79
- package/dist/services/skill/skillsManager.d.ts.map +0 -1
- package/dist/services/skill/skillsManager.js +0 -289
- package/dist/services/skill/skillsManager.js.map +0 -1
- package/dist/tools/Task/Task.d.ts +0 -59
- package/dist/tools/Task/Task.d.ts.map +0 -1
- package/dist/tools/Task/Task.js +0 -212
- package/dist/tools/Task/Task.js.map +0 -1
- package/dist/tools/Task/prompt.d.ts +0 -6
- package/dist/tools/Task/prompt.d.ts.map +0 -1
- package/dist/tools/Task/prompt.js +0 -75
- package/dist/tools/Task/prompt.js.map +0 -1
- package/dist/util/frontmatter.d.ts +0 -35
- package/dist/util/frontmatter.d.ts.map +0 -1
- package/dist/util/frontmatter.js +0 -119
- package/dist/util/frontmatter.js.map +0 -1
- package/dist/util/rules.d.ts +0 -6
- package/dist/util/rules.d.ts.map +0 -1
- package/dist/util/rules.js +0 -162
- package/dist/util/rules.js.map +0 -1
- package/dist/util/systemReminder.d.ts +0 -10
- package/dist/util/systemReminder.d.ts.map +0 -1
- package/dist/util/systemReminder.js +0 -177
- package/dist/util/systemReminder.js.map +0 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const inputSchema: z.ZodObject<{
|
|
3
|
+
subject: z.ZodString;
|
|
4
|
+
description: z.ZodString;
|
|
5
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
6
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7
|
+
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
subject: string;
|
|
9
|
+
description: string;
|
|
10
|
+
activeForm?: string | undefined;
|
|
11
|
+
metadata?: Record<string, unknown> | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
subject: string;
|
|
14
|
+
description: string;
|
|
15
|
+
activeForm?: string | undefined;
|
|
16
|
+
metadata?: Record<string, unknown> | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
type Out = {
|
|
19
|
+
task: {
|
|
20
|
+
id: string;
|
|
21
|
+
subject: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const TaskCreateTool: {
|
|
25
|
+
name: string;
|
|
26
|
+
description(): string;
|
|
27
|
+
inputSchema: z.ZodObject<{
|
|
28
|
+
subject: z.ZodString;
|
|
29
|
+
description: z.ZodString;
|
|
30
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
31
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
32
|
+
}, "strict", z.ZodTypeAny, {
|
|
33
|
+
subject: string;
|
|
34
|
+
description: string;
|
|
35
|
+
activeForm?: string | undefined;
|
|
36
|
+
metadata?: Record<string, unknown> | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
subject: string;
|
|
39
|
+
description: string;
|
|
40
|
+
activeForm?: string | undefined;
|
|
41
|
+
metadata?: Record<string, unknown> | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
isReadOnly(): false;
|
|
44
|
+
canRunConcurrently(): true;
|
|
45
|
+
genResultForAssistant(data: Out): string;
|
|
46
|
+
getDisplayTitle(input: any): string;
|
|
47
|
+
call({ subject, description, activeForm, metadata }: z.infer<typeof inputSchema>, agentContext: any): AsyncGenerator<{
|
|
48
|
+
type: "result";
|
|
49
|
+
data: Out;
|
|
50
|
+
resultForAssistant: string;
|
|
51
|
+
}, void, unknown>;
|
|
52
|
+
};
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=TaskCreate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskCreate.d.ts","sourceRoot":"","sources":["../../../src/tools/TaskCreate/TaskCreate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;EAKf,CAAA;AAEF,KAAK,GAAG,GAAG;IAAE,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAA;AAEpD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;gCAYG,GAAG;2BAGR,GAAG;yDAIwB,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,gBAC7D,GAAG;;;;;CAsBoB,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskCreateTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const prompt_1 = require("./prompt");
|
|
6
|
+
const StateManager_1 = require("../../manager/StateManager");
|
|
7
|
+
const inputSchema = zod_1.z.strictObject({
|
|
8
|
+
subject: zod_1.z.string().min(1).describe('A brief title for the task'),
|
|
9
|
+
description: zod_1.z.string().min(1).describe('A detailed description of what needs to be done'),
|
|
10
|
+
activeForm: zod_1.z.string().optional().describe("Present continuous form shown in spinner when in_progress (e.g., \"Running tests\")"),
|
|
11
|
+
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Arbitrary metadata to attach to the task'),
|
|
12
|
+
});
|
|
13
|
+
exports.TaskCreateTool = {
|
|
14
|
+
name: prompt_1.TOOL_NAME_FOR_PROMPT,
|
|
15
|
+
description() {
|
|
16
|
+
return prompt_1.DESCRIPTION;
|
|
17
|
+
},
|
|
18
|
+
inputSchema,
|
|
19
|
+
isReadOnly() {
|
|
20
|
+
return false;
|
|
21
|
+
},
|
|
22
|
+
canRunConcurrently() {
|
|
23
|
+
return true;
|
|
24
|
+
},
|
|
25
|
+
genResultForAssistant(data) {
|
|
26
|
+
return `Task #${data.task.id} created successfully: ${data.task.subject}`;
|
|
27
|
+
},
|
|
28
|
+
getDisplayTitle(input) {
|
|
29
|
+
return `TaskCreate: ${input?.subject ?? ''}`;
|
|
30
|
+
},
|
|
31
|
+
async *call({ subject, description, activeForm, metadata }, agentContext) {
|
|
32
|
+
const stateManager = (0, StateManager_1.getStateManager)();
|
|
33
|
+
const agentState = stateManager.forAgent(agentContext.agentId);
|
|
34
|
+
const id = agentState.createTodoTask({
|
|
35
|
+
subject,
|
|
36
|
+
description,
|
|
37
|
+
status: 'pending',
|
|
38
|
+
activeForm,
|
|
39
|
+
blocks: [],
|
|
40
|
+
blockedBy: [],
|
|
41
|
+
metadata,
|
|
42
|
+
});
|
|
43
|
+
const data = { task: { id, subject } };
|
|
44
|
+
yield {
|
|
45
|
+
type: 'result',
|
|
46
|
+
data,
|
|
47
|
+
resultForAssistant: `Task #${id} created successfully: ${subject}`,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=TaskCreate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskCreate.js","sourceRoot":"","sources":["../../../src/tools/TaskCreate/TaskCreate.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,qCAA4D;AAC5D,6DAA4D;AAE5D,MAAM,WAAW,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AAC;YACnC,OAAO;YACP,WAAW;YACX,MAAM,EAAE,SAAS;YACjB,UAAU;YACV,MAAM,EAAE,EAAE;YACV,SAAS,EAAE,EAAE;YACb,QAAQ;SACT,CAAC,CAAA;QAEF,MAAM,IAAI,GAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAAA;QAC3C,MAAM;YACJ,IAAI,EAAE,QAAiB;YACvB,IAAI;YACJ,kBAAkB,EAAE,SAAS,EAAE,0BAA0B,OAAO,EAAE;SACnE,CAAA;IACH,CAAC;CACsC,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const TOOL_NAME_FOR_PROMPT = "TaskCreate";
|
|
2
|
+
export declare const DESCRIPTION = "Use this tool to create a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.\nIt also helps the user understand the progress of the task and overall progress of their requests.\n\n## When to Use This Tool\n\nUse this tool proactively in these scenarios:\n\n- Complex multi-step tasks - When a task requires 3 or more distinct steps or actions\n- Non-trivial and complex tasks - Tasks that require careful planning or multiple operations\n- Plan mode - When using plan mode, create a task list to track the work\n- User explicitly requests todo list - When the user directly asks you to use the todo list\n- User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)\n- After receiving new instructions - Immediately capture user requirements as tasks\n- When you start working on a task - Mark it as in_progress BEFORE beginning work\n- After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation\n\n## When NOT to Use This Tool\n\nSkip using this tool when:\n- There is only a single, straightforward task\n- The task is trivial and tracking it provides no organizational benefit\n- The task can be completed in less than 3 trivial steps\n- The task is purely conversational or informational\n\nNOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.\n\n## Task Fields\n\n- **subject**: A brief, actionable title in imperative form (e.g., \"Fix authentication bug in login flow\")\n- **description**: Detailed description of what needs to be done, including context and acceptance criteria\n- **activeForm** (optional): Present continuous form shown in the spinner when the task is in_progress (e.g., \"Fixing authentication bug\"). If omitted, the spinner shows the subject instead.\n\nAll tasks are created with status `pending`.\n\n## Tips\n\n- Create tasks with clear, specific subjects that describe the outcome\n- Include enough detail in the description for another agent to understand and complete the task\n- After creating tasks, use TaskUpdate to set up dependencies (blocks/blockedBy) if needed\n- Check TaskList first to avoid creating duplicate tasks";
|
|
3
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/tools/TaskCreate/prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,eAAe,CAAA;AAEhD,eAAO,MAAM,WAAW,qzEAuCiC,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DESCRIPTION = exports.TOOL_NAME_FOR_PROMPT = void 0;
|
|
4
|
+
exports.TOOL_NAME_FOR_PROMPT = 'TaskCreate';
|
|
5
|
+
exports.DESCRIPTION = `Use this tool to create a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
|
|
6
|
+
It also helps the user understand the progress of the task and overall progress of their requests.
|
|
7
|
+
|
|
8
|
+
## When to Use This Tool
|
|
9
|
+
|
|
10
|
+
Use this tool proactively in these scenarios:
|
|
11
|
+
|
|
12
|
+
- Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
|
|
13
|
+
- Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
|
|
14
|
+
- Plan mode - When using plan mode, create a task list to track the work
|
|
15
|
+
- User explicitly requests todo list - When the user directly asks you to use the todo list
|
|
16
|
+
- User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
|
|
17
|
+
- After receiving new instructions - Immediately capture user requirements as tasks
|
|
18
|
+
- When you start working on a task - Mark it as in_progress BEFORE beginning work
|
|
19
|
+
- After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation
|
|
20
|
+
|
|
21
|
+
## When NOT to Use This Tool
|
|
22
|
+
|
|
23
|
+
Skip using this tool when:
|
|
24
|
+
- There is only a single, straightforward task
|
|
25
|
+
- The task is trivial and tracking it provides no organizational benefit
|
|
26
|
+
- The task can be completed in less than 3 trivial steps
|
|
27
|
+
- The task is purely conversational or informational
|
|
28
|
+
|
|
29
|
+
NOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.
|
|
30
|
+
|
|
31
|
+
## Task Fields
|
|
32
|
+
|
|
33
|
+
- **subject**: A brief, actionable title in imperative form (e.g., "Fix authentication bug in login flow")
|
|
34
|
+
- **description**: Detailed description of what needs to be done, including context and acceptance criteria
|
|
35
|
+
- **activeForm** (optional): Present continuous form shown in the spinner when the task is in_progress (e.g., "Fixing authentication bug"). If omitted, the spinner shows the subject instead.
|
|
36
|
+
|
|
37
|
+
All tasks are created with status \`pending\`.
|
|
38
|
+
|
|
39
|
+
## Tips
|
|
40
|
+
|
|
41
|
+
- Create tasks with clear, specific subjects that describe the outcome
|
|
42
|
+
- Include enough detail in the description for another agent to understand and complete the task
|
|
43
|
+
- After creating tasks, use TaskUpdate to set up dependencies (blocks/blockedBy) if needed
|
|
44
|
+
- Check TaskList first to avoid creating duplicate tasks`;
|
|
45
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/tools/TaskCreate/prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,YAAY,CAAA;AAEnC,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yDAuC8B,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TodoTask } from '../../types/todoTask';
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
taskId: z.ZodString;
|
|
5
|
+
}, "strict", z.ZodTypeAny, {
|
|
6
|
+
taskId: string;
|
|
7
|
+
}, {
|
|
8
|
+
taskId: string;
|
|
9
|
+
}>;
|
|
10
|
+
type Out = {
|
|
11
|
+
task: TodoTask | null;
|
|
12
|
+
};
|
|
13
|
+
export declare const TaskGetTool: {
|
|
14
|
+
name: string;
|
|
15
|
+
description(): string;
|
|
16
|
+
inputSchema: z.ZodObject<{
|
|
17
|
+
taskId: z.ZodString;
|
|
18
|
+
}, "strict", z.ZodTypeAny, {
|
|
19
|
+
taskId: string;
|
|
20
|
+
}, {
|
|
21
|
+
taskId: string;
|
|
22
|
+
}>;
|
|
23
|
+
isReadOnly(): true;
|
|
24
|
+
canRunConcurrently(): true;
|
|
25
|
+
genResultForAssistant(data: Out): string;
|
|
26
|
+
getDisplayTitle(input: any): string;
|
|
27
|
+
call({ taskId }: z.infer<typeof inputSchema>, agentContext: any): AsyncGenerator<{
|
|
28
|
+
type: "result";
|
|
29
|
+
data: Out;
|
|
30
|
+
resultForAssistant: string;
|
|
31
|
+
}, void, unknown>;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=TaskGet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskGet.d.ts","sourceRoot":"","sources":["../../../src/tools/TaskGet/TaskGet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,QAAA,MAAM,WAAW;;;;;;EAEf,CAAA;AAEF,KAAK,GAAG,GAAG;IAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAA;CAAE,CAAA;AAgBpC,eAAO,MAAM,WAAW;;;;;;;;;;;;gCAYM,GAAG;2BAGR,GAAG;qBAGF,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,gBAAgB,GAAG;;;;;CAY/B,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskGetTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const prompt_1 = require("./prompt");
|
|
6
|
+
const StateManager_1 = require("../../manager/StateManager");
|
|
7
|
+
const inputSchema = zod_1.z.strictObject({
|
|
8
|
+
taskId: zod_1.z.string().describe('The ID of the task to retrieve'),
|
|
9
|
+
});
|
|
10
|
+
function formatResult(data) {
|
|
11
|
+
if (!data.task)
|
|
12
|
+
return 'Task not found';
|
|
13
|
+
const t = data.task;
|
|
14
|
+
const lines = [
|
|
15
|
+
`Task #${t.id}: ${t.subject}`,
|
|
16
|
+
`Status: ${t.status}`,
|
|
17
|
+
`Description: ${t.description}`,
|
|
18
|
+
];
|
|
19
|
+
if (t.activeForm)
|
|
20
|
+
lines.push(`ActiveForm: ${t.activeForm}`);
|
|
21
|
+
if (t.blockedBy.length > 0)
|
|
22
|
+
lines.push(`Blocked by: ${t.blockedBy.map(id => `#${id}`).join(', ')}`);
|
|
23
|
+
if (t.blocks.length > 0)
|
|
24
|
+
lines.push(`Blocks: ${t.blocks.map(id => `#${id}`).join(', ')}`);
|
|
25
|
+
return lines.join('\n');
|
|
26
|
+
}
|
|
27
|
+
exports.TaskGetTool = {
|
|
28
|
+
name: prompt_1.TOOL_NAME_FOR_PROMPT,
|
|
29
|
+
description() {
|
|
30
|
+
return prompt_1.DESCRIPTION;
|
|
31
|
+
},
|
|
32
|
+
inputSchema,
|
|
33
|
+
isReadOnly() {
|
|
34
|
+
return true;
|
|
35
|
+
},
|
|
36
|
+
canRunConcurrently() {
|
|
37
|
+
return true;
|
|
38
|
+
},
|
|
39
|
+
genResultForAssistant(data) {
|
|
40
|
+
return formatResult(data);
|
|
41
|
+
},
|
|
42
|
+
getDisplayTitle(input) {
|
|
43
|
+
return `TaskGet: ${input?.taskId ?? ''}`;
|
|
44
|
+
},
|
|
45
|
+
async *call({ taskId }, agentContext) {
|
|
46
|
+
const stateManager = (0, StateManager_1.getStateManager)();
|
|
47
|
+
const agentState = stateManager.forAgent(agentContext.agentId);
|
|
48
|
+
const task = agentState.getTodoTask(taskId) ?? null;
|
|
49
|
+
const data = { task };
|
|
50
|
+
yield {
|
|
51
|
+
type: 'result',
|
|
52
|
+
data,
|
|
53
|
+
resultForAssistant: formatResult(data),
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=TaskGet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskGet.js","sourceRoot":"","sources":["../../../src/tools/TaskGet/TaskGet.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,qCAA4D;AAC5D,6DAA4D;AAG5D,MAAM,WAAW,GAAG,OAAC,CAAC,YAAY,CAAC;IACjC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;CAC9D,CAAC,CAAA;AAIF,SAAS,YAAY,CAAC,IAAS;IAC7B,IAAI,CAAC,IAAI,CAAC,IAAI;QAAE,OAAO,gBAAgB,CAAA;IACvC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAA;IACnB,MAAM,KAAK,GAAG;QACZ,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE;QAC7B,WAAW,CAAC,CAAC,MAAM,EAAE;QACrB,gBAAgB,CAAC,CAAC,WAAW,EAAE;KAChC,CAAA;IACD,IAAI,CAAC,CAAC,UAAU;QAAE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,UAAU,EAAE,CAAC,CAAA;IAC3D,IAAI,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAA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|
+
export declare const DESCRIPTION = "Use this tool to retrieve a task by its ID from the task list.\n\n## When to Use This Tool\n\n- When you need the full description and context before starting work on a task\n- To understand task dependencies (what it blocks, what blocks it)\n- After being assigned a task, to get complete requirements\n\n## Output\n\nReturns full task details:\n- **subject**: Task title\n- **description**: Detailed requirements and context\n- **status**: 'pending', 'in_progress', or 'completed'\n- **blocks**: Tasks waiting on this one to complete\n- **blockedBy**: Tasks that must complete before this one can start\n\n## Tips\n\n- After fetching a task, verify its blockedBy list is empty before beginning work.\n- Use TaskList to see all tasks in summary form.";
|
|
3
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/tools/TaskGet/prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,YAAY,CAAA;AAE7C,eAAO,MAAM,WAAW,ovBAoByB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DESCRIPTION = exports.TOOL_NAME_FOR_PROMPT = void 0;
|
|
4
|
+
exports.TOOL_NAME_FOR_PROMPT = 'TaskGet';
|
|
5
|
+
exports.DESCRIPTION = `Use this tool to retrieve a task by its ID from the task list.
|
|
6
|
+
|
|
7
|
+
## When to Use This Tool
|
|
8
|
+
|
|
9
|
+
- When you need the full description and context before starting work on a task
|
|
10
|
+
- To understand task dependencies (what it blocks, what blocks it)
|
|
11
|
+
- After being assigned a task, to get complete requirements
|
|
12
|
+
|
|
13
|
+
## Output
|
|
14
|
+
|
|
15
|
+
Returns full task details:
|
|
16
|
+
- **subject**: Task title
|
|
17
|
+
- **description**: Detailed requirements and context
|
|
18
|
+
- **status**: 'pending', 'in_progress', or 'completed'
|
|
19
|
+
- **blocks**: Tasks waiting on this one to complete
|
|
20
|
+
- **blockedBy**: Tasks that must complete before this one can start
|
|
21
|
+
|
|
22
|
+
## Tips
|
|
23
|
+
|
|
24
|
+
- After fetching a task, verify its blockedBy list is empty before beginning work.
|
|
25
|
+
- Use TaskList to see all tasks in summary form.`;
|
|
26
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/tools/TaskGet/prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,SAAS,CAAA;AAEhC,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;iDAoBsB,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const inputSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
3
|
+
type TaskSummary = {
|
|
4
|
+
id: string;
|
|
5
|
+
subject: string;
|
|
6
|
+
status: string;
|
|
7
|
+
blockedBy: string[];
|
|
8
|
+
};
|
|
9
|
+
type Out = {
|
|
10
|
+
tasks: TaskSummary[];
|
|
11
|
+
};
|
|
12
|
+
export declare const TaskListTool: {
|
|
13
|
+
name: string;
|
|
14
|
+
description(): string;
|
|
15
|
+
inputSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
|
|
16
|
+
isReadOnly(): true;
|
|
17
|
+
canRunConcurrently(): true;
|
|
18
|
+
genResultForAssistant(data: Out): string;
|
|
19
|
+
getDisplayTitle(): string;
|
|
20
|
+
call(_input: z.infer<typeof inputSchema>, agentContext: any): AsyncGenerator<{
|
|
21
|
+
type: "result";
|
|
22
|
+
data: Out;
|
|
23
|
+
resultForAssistant: string;
|
|
24
|
+
}, void, unknown>;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=TaskList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskList.d.ts","sourceRoot":"","sources":["../../../src/tools/TaskList/TaskList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,QAAA,MAAM,WAAW,iDAAqB,CAAA;AAEtC,KAAK,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AACvF,KAAK,GAAG,GAAG;IAAE,KAAK,EAAE,WAAW,EAAE,CAAA;CAAE,CAAA;AAWnC,eAAO,MAAM,YAAY;;;;;;gCAYK,GAAG;;iBAMX,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,gBAAgB,GAAG;;;;;CAwB3B,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskListTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const prompt_1 = require("./prompt");
|
|
6
|
+
const StateManager_1 = require("../../manager/StateManager");
|
|
7
|
+
const inputSchema = zod_1.z.strictObject({});
|
|
8
|
+
function formatResult(data) {
|
|
9
|
+
if (data.tasks.length === 0)
|
|
10
|
+
return 'No tasks found';
|
|
11
|
+
return data.tasks.map(t => {
|
|
12
|
+
let line = `#${t.id} [${t.status}] ${t.subject}`;
|
|
13
|
+
if (t.blockedBy.length > 0)
|
|
14
|
+
line += ` (blocked by ${t.blockedBy.map(id => `#${id}`).join(', ')})`;
|
|
15
|
+
return line;
|
|
16
|
+
}).join('\n');
|
|
17
|
+
}
|
|
18
|
+
exports.TaskListTool = {
|
|
19
|
+
name: prompt_1.TOOL_NAME_FOR_PROMPT,
|
|
20
|
+
description() {
|
|
21
|
+
return prompt_1.DESCRIPTION;
|
|
22
|
+
},
|
|
23
|
+
inputSchema,
|
|
24
|
+
isReadOnly() {
|
|
25
|
+
return true;
|
|
26
|
+
},
|
|
27
|
+
canRunConcurrently() {
|
|
28
|
+
return true;
|
|
29
|
+
},
|
|
30
|
+
genResultForAssistant(data) {
|
|
31
|
+
return formatResult(data);
|
|
32
|
+
},
|
|
33
|
+
getDisplayTitle() {
|
|
34
|
+
return 'TaskList';
|
|
35
|
+
},
|
|
36
|
+
async *call(_input, agentContext) {
|
|
37
|
+
const stateManager = (0, StateManager_1.getStateManager)();
|
|
38
|
+
const agentState = stateManager.forAgent(agentContext.agentId);
|
|
39
|
+
const allTasks = agentState.listTodoTasks();
|
|
40
|
+
// 构建已完成任务 ID 集合,用于过滤已解除的阻塞
|
|
41
|
+
const resolvedTaskIds = new Set(allTasks.filter(t => t.status === 'completed').map(t => t.id));
|
|
42
|
+
const tasks = allTasks.map(t => ({
|
|
43
|
+
id: t.id,
|
|
44
|
+
subject: t.subject,
|
|
45
|
+
status: t.status,
|
|
46
|
+
blockedBy: t.blockedBy.filter(id => !resolvedTaskIds.has(id)),
|
|
47
|
+
}));
|
|
48
|
+
const data = { tasks };
|
|
49
|
+
yield {
|
|
50
|
+
type: 'result',
|
|
51
|
+
data,
|
|
52
|
+
resultForAssistant: formatResult(data),
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=TaskList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskList.js","sourceRoot":"","sources":["../../../src/tools/TaskList/TaskList.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,qCAA4D;AAC5D,6DAA4D;AAE5D,MAAM,WAAW,GAAG,OAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;AAKtC,SAAS,YAAY,CAAC,IAAS;IAC7B,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,gBAAgB,CAAA;IACpD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QACxB,IAAI,IAAI,GAAG,IAAI,CAAC,CAAC,EAAE,KAAK,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,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,OAAO,EAAE,CAAC,CAAC,OAAO;YAClB,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SAC9D,CAAC,CAAC,CAAA;QAEH,MAAM,IAAI,GAAQ,EAAE,KAAK,EAAE,CAAA;QAC3B,MAAM;YACJ,IAAI,EAAE,QAAiB;YACvB,IAAI;YACJ,kBAAkB,EAAE,YAAY,CAAC,IAAI,CAAC;SACvC,CAAA;IACH,CAAC;CACsC,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const TOOL_NAME_FOR_PROMPT = "TaskList";
|
|
2
|
+
export declare const DESCRIPTION = "Use this tool to list all tasks in the task list.\n\n## When to Use This Tool\n\n- To see what tasks are available to work on (status: 'pending', no owner, not blocked)\n- To check overall progress on the project\n- To find tasks that are blocked and need dependencies resolved\n- After completing a task, to check for newly unblocked work or claim the next available task\n- **Prefer working on tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones\n\n## Output\n\nReturns a summary of each task:\n- **id**: Task identifier (use with TaskGet, TaskUpdate)\n- **subject**: Brief description of the task\n- **status**: 'pending', 'in_progress', or 'completed'\n- **owner**: Agent ID if assigned, empty if available\n- **blockedBy**: List of open task IDs that must be resolved first (tasks with blockedBy cannot be claimed until dependencies resolve)\n\nUse TaskGet with a specific task ID to view full details including description and comments.";
|
|
3
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/tools/TaskList/prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,aAAa,CAAA;AAE9C,eAAO,MAAM,WAAW,6/BAmBqE,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DESCRIPTION = exports.TOOL_NAME_FOR_PROMPT = void 0;
|
|
4
|
+
exports.TOOL_NAME_FOR_PROMPT = 'TaskList';
|
|
5
|
+
exports.DESCRIPTION = `Use this tool to list all tasks in the task list.
|
|
6
|
+
|
|
7
|
+
## When to Use This Tool
|
|
8
|
+
|
|
9
|
+
- To see what tasks are available to work on (status: 'pending', no owner, not blocked)
|
|
10
|
+
- To check overall progress on the project
|
|
11
|
+
- To find tasks that are blocked and need dependencies resolved
|
|
12
|
+
- After completing a task, to check for newly unblocked work or claim the next available task
|
|
13
|
+
- **Prefer working on tasks in ID order** (lowest ID first) when multiple tasks are available, as earlier tasks often set up context for later ones
|
|
14
|
+
|
|
15
|
+
## Output
|
|
16
|
+
|
|
17
|
+
Returns a summary of each task:
|
|
18
|
+
- **id**: Task identifier (use with TaskGet, TaskUpdate)
|
|
19
|
+
- **subject**: Brief description of the task
|
|
20
|
+
- **status**: 'pending', 'in_progress', or 'completed'
|
|
21
|
+
- **owner**: Agent ID if assigned, empty if available
|
|
22
|
+
- **blockedBy**: List of open task IDs that must be resolved first (tasks with blockedBy cannot be claimed until dependencies resolve)
|
|
23
|
+
|
|
24
|
+
Use TaskGet with a specific task ID to view full details including description and comments.`;
|
|
25
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/tools/TaskList/prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,UAAU,CAAA;AAEjC,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;6FAmBkE,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const inputSchema: z.ZodObject<{
|
|
3
|
+
task_id: z.ZodString;
|
|
4
|
+
block: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
5
|
+
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
timeout: number;
|
|
8
|
+
task_id: string;
|
|
9
|
+
block: boolean;
|
|
10
|
+
}, {
|
|
11
|
+
task_id: string;
|
|
12
|
+
timeout?: number | undefined;
|
|
13
|
+
block?: boolean | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
type Out = {
|
|
16
|
+
taskId: string;
|
|
17
|
+
retrievalStatus: string;
|
|
18
|
+
taskStatus: string;
|
|
19
|
+
taskType: string;
|
|
20
|
+
output: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const TaskOutputTool: {
|
|
23
|
+
name: string;
|
|
24
|
+
description(): string;
|
|
25
|
+
isReadOnly(): true;
|
|
26
|
+
supportsInterrupt(): true;
|
|
27
|
+
inputSchema: z.ZodObject<{
|
|
28
|
+
task_id: z.ZodString;
|
|
29
|
+
block: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
30
|
+
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
31
|
+
}, "strict", z.ZodTypeAny, {
|
|
32
|
+
timeout: number;
|
|
33
|
+
task_id: string;
|
|
34
|
+
block: boolean;
|
|
35
|
+
}, {
|
|
36
|
+
task_id: string;
|
|
37
|
+
timeout?: number | undefined;
|
|
38
|
+
block?: boolean | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
genToolResultMessage(data: Out): {
|
|
41
|
+
title: string;
|
|
42
|
+
summary: string;
|
|
43
|
+
content: string;
|
|
44
|
+
};
|
|
45
|
+
getDisplayTitle(input: any): string;
|
|
46
|
+
genResultForAssistant(data: Out): string;
|
|
47
|
+
call({ task_id, block, timeout }: {
|
|
48
|
+
task_id: string;
|
|
49
|
+
block?: boolean;
|
|
50
|
+
timeout?: number;
|
|
51
|
+
}, agentContext: any): AsyncGenerator<{
|
|
52
|
+
type: "result";
|
|
53
|
+
data: Out;
|
|
54
|
+
resultForAssistant: string | (import("@anthropic-ai/sdk/resources").TextBlockParam | import("@anthropic-ai/sdk/resources").ImageBlockParam)[] | undefined;
|
|
55
|
+
}, void, unknown>;
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=TaskOutput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskOutput.d.ts","sourceRoot":"","sources":["../../../src/tools/TaskOutput/TaskOutput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,WAAW;;;;;;;;;;;;EAYtB,CAAA;AAGF,KAAK,GAAG,GAAG;IACT,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;+BAYE,GAAG;;;;;2BAOP,GAAG;gCAGE,GAAG,GAAG,MAAM;sCASgB;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,gBAAgB,GAAG;;;;;CAyC1G,CAAA"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskOutputTool = exports.inputSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const TaskManager_1 = require("../../manager/TaskManager");
|
|
6
|
+
const EventSystem_1 = require("../../events/EventSystem");
|
|
7
|
+
const StateManager_1 = require("../../manager/StateManager");
|
|
8
|
+
const utils_1 = require("../Bash/utils");
|
|
9
|
+
exports.inputSchema = zod_1.z.strictObject({
|
|
10
|
+
task_id: zod_1.z.string().describe('The background task ID to retrieve output for'),
|
|
11
|
+
block: zod_1.z
|
|
12
|
+
.boolean()
|
|
13
|
+
.optional()
|
|
14
|
+
.default(true)
|
|
15
|
+
.describe('Whether to wait for the task to complete (default: true)'),
|
|
16
|
+
timeout: zod_1.z
|
|
17
|
+
.number()
|
|
18
|
+
.optional()
|
|
19
|
+
.default(30000)
|
|
20
|
+
.describe('Maximum milliseconds to wait when block=true (default: 30000)'),
|
|
21
|
+
});
|
|
22
|
+
exports.TaskOutputTool = {
|
|
23
|
+
name: 'TaskOutput',
|
|
24
|
+
description() {
|
|
25
|
+
return 'Retrieve the output of a background task started by the Bash tool with run_in_background=true. Use block=true (default) to wait for completion, or block=false to get the current snapshot immediately.';
|
|
26
|
+
},
|
|
27
|
+
isReadOnly() {
|
|
28
|
+
return true;
|
|
29
|
+
},
|
|
30
|
+
supportsInterrupt() {
|
|
31
|
+
return true;
|
|
32
|
+
},
|
|
33
|
+
inputSchema: exports.inputSchema,
|
|
34
|
+
genToolResultMessage(data) {
|
|
35
|
+
return {
|
|
36
|
+
title: data.taskId,
|
|
37
|
+
summary: '',
|
|
38
|
+
content: data.output || '(no content)',
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
getDisplayTitle(input) {
|
|
42
|
+
return `${input?.task_id}`;
|
|
43
|
+
},
|
|
44
|
+
genResultForAssistant(data) {
|
|
45
|
+
return `<retrieval_status>${data.retrievalStatus}</retrieval_status>
|
|
46
|
+
<task_id>${data.taskId}</task_id>
|
|
47
|
+
<task_type>${data.taskType}</task_type>
|
|
48
|
+
<status>${data.taskStatus}</status>
|
|
49
|
+
<output>
|
|
50
|
+
${data.output}
|
|
51
|
+
</output>`;
|
|
52
|
+
},
|
|
53
|
+
async *call({ task_id, block = true, timeout = 30000 }, agentContext) {
|
|
54
|
+
const manager = (0, TaskManager_1.getTaskManager)();
|
|
55
|
+
const record = manager.getTask(task_id);
|
|
56
|
+
if (!record) {
|
|
57
|
+
const data = { taskId: task_id, retrievalStatus: 'not_found', taskStatus: 'not_found', taskType: '', output: '' };
|
|
58
|
+
yield { type: 'result', data, resultForAssistant: this.genResultForAssistant(data) };
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// block=false 或任务已完成,直接返回当前快照
|
|
62
|
+
if (!block || record.status !== 'running') {
|
|
63
|
+
const output = truncateOutput(record.output);
|
|
64
|
+
const data = { taskId: task_id, retrievalStatus: record.status, taskStatus: record.status, taskType: record.type, output };
|
|
65
|
+
yield { type: 'result', data, resultForAssistant: this.genResultForAssistant(data) };
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
// block=true,等待任务完成
|
|
69
|
+
// Agent 任务无增量输出,只有 Bash 任务才流式推送
|
|
70
|
+
const isMainAgent = agentContext?.agentId === StateManager_1.MAIN_AGENT_ID;
|
|
71
|
+
const onChunk = (isMainAgent && record.type !== 'Agent') ? (delta) => {
|
|
72
|
+
const chunkData = {
|
|
73
|
+
agentId: agentContext.agentId,
|
|
74
|
+
toolId: agentContext.currentToolUseID || '',
|
|
75
|
+
toolName: 'TaskOutput',
|
|
76
|
+
title: `${task_id}`,
|
|
77
|
+
summary: '',
|
|
78
|
+
content: delta,
|
|
79
|
+
};
|
|
80
|
+
(0, EventSystem_1.getEventBus)().emit('tool:execution:chunk', chunkData);
|
|
81
|
+
} : undefined;
|
|
82
|
+
const abortSignal = agentContext?.abortController?.signal;
|
|
83
|
+
const finalRecord = await manager.waitForTask(task_id, timeout, onChunk, abortSignal);
|
|
84
|
+
const interrupted = abortSignal?.aborted ?? false;
|
|
85
|
+
const output = truncateOutput(finalRecord.output);
|
|
86
|
+
const retrievalStatus = interrupted ? 'not_ready' : (finalRecord.status === 'running' ? 'timeout' : 'completed');
|
|
87
|
+
const data = { taskId: task_id, retrievalStatus, taskStatus: finalRecord.status, taskType: finalRecord.type, output };
|
|
88
|
+
yield { type: 'result', data, resultForAssistant: this.genResultForAssistant(data) };
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
function truncateOutput(output) {
|
|
92
|
+
const { truncatedContent } = (0, utils_1.formatOutput)(output);
|
|
93
|
+
return truncatedContent;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=TaskOutput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskOutput.js","sourceRoot":"","sources":["../../../src/tools/TaskOutput/TaskOutput.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAEvB,2DAA0D;AAC1D,0DAAsD;AAEtD,6DAA0D;AAC1D,yCAA4C;AAE/B,QAAA,WAAW,GAAG,OAAC,CAAC,YAAY,CAAC;IACxC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IAC7E,KAAK,EAAE,OAAC;SACL,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,0DAA0D,CAAC;IACvE,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,+DAA+D,CAAC;CAC7E,CAAC,CAAA;AAWW,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,WAAW;QACT,OAAO,yMAAyM,CAAA;IAClN,CAAC;IACD,UAAU;QACR,OAAO,IAAI,CAAA;IACb,CAAC;IACD,iBAAiB;QACf,OAAO,IAAI,CAAA;IACb,CAAC;IACD,WAAW,EAAX,mBAAW;IACX,oBAAoB,CAAC,IAAS;QAC5B,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,MAAM,IAAI,cAAc;SACvC,CAAA;IACH,CAAC;IACD,eAAe,CAAC,KAAU;QACxB,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,CAAA;IAC5B,CAAC;IACD,qBAAqB,CAAC,IAAS;QAC7B,O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