indusagi-coding-agent 0.1.25 → 0.1.27

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/dist/cli/file-processor.js +1 -1
  3. package/dist/cli/file-processor.js.map +1 -1
  4. package/dist/core/agent-session.d.ts +1 -1
  5. package/dist/core/agent-session.d.ts.map +1 -1
  6. package/dist/core/agent-session.js +3 -3
  7. package/dist/core/agent-session.js.map +1 -1
  8. package/dist/core/bash-executor.d.ts +1 -1
  9. package/dist/core/bash-executor.d.ts.map +1 -1
  10. package/dist/core/bash-executor.js +1 -1
  11. package/dist/core/bash-executor.js.map +1 -1
  12. package/dist/core/extensions/types.d.ts +1 -3
  13. package/dist/core/extensions/types.d.ts.map +1 -1
  14. package/dist/core/settings-manager.js +1 -1
  15. package/dist/core/settings-manager.js.map +1 -1
  16. package/dist/core/task-session-manager.d.ts.map +1 -1
  17. package/dist/core/task-session-manager.js +1 -7
  18. package/dist/core/task-session-manager.js.map +1 -1
  19. package/dist/core/tools/bg-process.d.ts +1 -1
  20. package/dist/core/tools/index.d.ts +60 -59
  21. package/dist/core/tools/index.d.ts.map +1 -1
  22. package/dist/core/tools/index.js +89 -24
  23. package/dist/core/tools/index.js.map +1 -1
  24. package/dist/core/tools/task.d.ts +21 -16
  25. package/dist/core/tools/task.d.ts.map +1 -1
  26. package/dist/core/tools/task.js +82 -43
  27. package/dist/core/tools/task.js.map +1 -1
  28. package/dist/core/tools/todo.d.ts +31 -20
  29. package/dist/core/tools/todo.d.ts.map +1 -1
  30. package/dist/core/tools/todo.js +67 -44
  31. package/dist/core/tools/todo.js.map +1 -1
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/index.js.map +1 -1
  36. package/dist/modes/interactive/components/bash-execution.d.ts +1 -1
  37. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  38. package/dist/modes/interactive/components/bash-execution.js +1 -1
  39. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  40. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  41. package/dist/modes/interactive/components/tool-execution.js +2 -2
  42. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  43. package/package.json +3 -3
  44. package/dist/core/todo-store.d.ts +0 -20
  45. package/dist/core/todo-store.d.ts.map +0 -1
  46. package/dist/core/todo-store.js +0 -55
  47. package/dist/core/todo-store.js.map +0 -1
  48. package/dist/core/tools/bash.d.ts +0 -428
  49. package/dist/core/tools/bash.d.ts.map +0 -1
  50. package/dist/core/tools/bash.js +0 -498
  51. package/dist/core/tools/bash.js.map +0 -1
  52. package/dist/core/tools/edit-diff.d.ts +0 -63
  53. package/dist/core/tools/edit-diff.d.ts.map +0 -1
  54. package/dist/core/tools/edit-diff.js +0 -243
  55. package/dist/core/tools/edit-diff.js.map +0 -1
  56. package/dist/core/tools/edit.d.ts +0 -315
  57. package/dist/core/tools/edit.d.ts.map +0 -1
  58. package/dist/core/tools/edit.js +0 -384
  59. package/dist/core/tools/edit.js.map +0 -1
  60. package/dist/core/tools/find.d.ts +0 -201
  61. package/dist/core/tools/find.d.ts.map +0 -1
  62. package/dist/core/tools/find.js +0 -342
  63. package/dist/core/tools/find.js.map +0 -1
  64. package/dist/core/tools/grep.d.ts +0 -323
  65. package/dist/core/tools/grep.d.ts.map +0 -1
  66. package/dist/core/tools/grep.js +0 -486
  67. package/dist/core/tools/grep.js.map +0 -1
  68. package/dist/core/tools/ls.d.ts +0 -44
  69. package/dist/core/tools/ls.d.ts.map +0 -1
  70. package/dist/core/tools/ls.js +0 -124
  71. package/dist/core/tools/ls.js.map +0 -1
  72. package/dist/core/tools/path-utils.d.ts +0 -8
  73. package/dist/core/tools/path-utils.d.ts.map +0 -1
  74. package/dist/core/tools/path-utils.js +0 -53
  75. package/dist/core/tools/path-utils.js.map +0 -1
  76. package/dist/core/tools/read.d.ts +0 -338
  77. package/dist/core/tools/read.d.ts.map +0 -1
  78. package/dist/core/tools/read.js +0 -397
  79. package/dist/core/tools/read.js.map +0 -1
  80. package/dist/core/tools/truncate.d.ts +0 -70
  81. package/dist/core/tools/truncate.d.ts.map +0 -1
  82. package/dist/core/tools/truncate.js +0 -205
  83. package/dist/core/tools/truncate.js.map +0 -1
  84. package/dist/core/tools/webfetch.d.ts +0 -174
  85. package/dist/core/tools/webfetch.d.ts.map +0 -1
  86. package/dist/core/tools/webfetch.js +0 -380
  87. package/dist/core/tools/webfetch.js.map +0 -1
  88. package/dist/core/tools/websearch.d.ts +0 -190
  89. package/dist/core/tools/websearch.d.ts.map +0 -1
  90. package/dist/core/tools/websearch.js +0 -267
  91. package/dist/core/tools/websearch.js.map +0 -1
  92. package/dist/core/tools/write.d.ts +0 -273
  93. package/dist/core/tools/write.d.ts.map +0 -1
  94. package/dist/core/tools/write.js +0 -288
  95. package/dist/core/tools/write.js.map +0 -1
@@ -1,28 +1,59 @@
1
- export { bashTool, createBashTool, } from "./bash.js";
2
- export { createEditTool, editTool } from "./edit.js";
3
- export { createFindTool, findTool } from "./find.js";
4
- export { createGrepTool, grepTool } from "./grep.js";
5
- export { createLsTool, lsTool } from "./ls.js";
6
- export { createReadTool, readTool, } from "./read.js";
7
- export { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, truncateHead, truncateLine, truncateTail, } from "./truncate.js";
8
- export { createTodoReadTool, createTodoWriteTool, todoReadTool, todoWriteTool, } from "./todo.js";
1
+ /**
2
+ * Tools Module - Re-exports from indusagi package + local custom tools
3
+ *
4
+ * Most tools are now imported from the `indusagi` package to avoid duplication.
5
+ * Local tools kept for custom integrations:
6
+ * - todo.ts: Uses local TodoStore with session manager integration
7
+ * - task.ts: Has extensive dependencies on model registry, subagent store, etc.
8
+ * - bg-process.ts: Not available in indusagi
9
+ * - registry.ts: Custom tool metadata for this project
10
+ */
11
+ // ============================================================================
12
+ // RE-EXPORT FROM INDUSAGI PACKAGE
13
+ // ============================================================================
14
+ export {
15
+ // Read tool
16
+ createReadTool, readTool,
17
+ // Write tool
18
+ createWriteTool, writeTool,
19
+ // Edit tool
20
+ createEditTool, editTool,
21
+ // Bash tool
22
+ createBashTool, bashTool,
23
+ // Grep tool
24
+ createGrepTool, grepTool,
25
+ // Find tool
26
+ createFindTool, findTool,
27
+ // Ls tool
28
+ createLsTool, lsTool,
29
+ // WebFetch tool
30
+ createWebFetchTool, webFetchTool,
31
+ // WebSearch tool
32
+ createWebSearchTool, webSearchTool,
33
+ // Truncation utilities
34
+ DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, truncateHead, truncateLine, truncateTail,
35
+ // Path utilities
36
+ expandPath, resolveReadPath, resolveToCwd,
37
+ // Edit diff utilities
38
+ computeEditDiff, generateDiffString,
39
+ // Tool registry from indusagi
40
+ ToolFactory, ToolRegistry as IndusagiToolRegistry, } from "indusagi/agent";
41
+ // ============================================================================
42
+ // LOCAL CUSTOM TOOLS
43
+ // ============================================================================
44
+ export { createTodoReadTool, createTodoWriteTool, createSessionTodoStore, todoReadTool, todoWriteTool, TodoStore, } from "./todo.js";
9
45
  export { createTaskTool, taskTool, } from "./task.js";
10
- export { createWriteTool, writeTool } from "./write.js";
11
- export { createWebFetchTool, webFetchTool, } from "./webfetch.js";
12
- export { createWebSearchTool, webSearchTool, } from "./websearch.js";
13
- export { ALL_AVAILABLE_TOOLS, CORE_TOOLS, EXTENSION_TOOLS, getToolInfo, listAllTools, } from "./registry.js";
14
- import { TodoStore } from "../todo-store.js";
15
- import { bashTool, createBashTool } from "./bash.js";
16
- import { createEditTool, editTool } from "./edit.js";
17
- import { createFindTool, findTool } from "./find.js";
18
- import { createGrepTool, grepTool } from "./grep.js";
19
- import { createLsTool, lsTool } from "./ls.js";
20
- import { createReadTool, readTool } from "./read.js";
46
+ export { createBgProcessTool } from "./bg-process.js";
47
+ import { TodoStore } from "./todo.js";
48
+ // ============================================================================
49
+ // IMPORT TOOLS FOR DEFAULT EXPORTS
50
+ // ============================================================================
51
+ import { readTool, bashTool, editTool, writeTool } from "indusagi/agent";
52
+ import { grepTool, findTool, lsTool } from "indusagi/agent";
53
+ import { webFetchTool, webSearchTool } from "indusagi/agent";
54
+ import { createReadTool, createBashTool, createEditTool, createWriteTool, createGrepTool, createFindTool, createLsTool, createWebFetchTool, createWebSearchTool, } from "indusagi/agent";
21
55
  import { createTodoReadTool, createTodoWriteTool, todoReadTool, todoWriteTool } from "./todo.js";
22
56
  import { createTaskTool, taskTool } from "./task.js";
23
- import { createWriteTool, writeTool } from "./write.js";
24
- import { createWebFetchTool, webFetchTool } from "./webfetch.js";
25
- import { createWebSearchTool, webSearchTool } from "./websearch.js";
26
57
  // Default tools for full access mode (using process.cwd())
27
58
  export const codingTools = [
28
59
  readTool,
@@ -53,15 +84,20 @@ export const allTools = {
53
84
  webfetch: webFetchTool,
54
85
  websearch: webSearchTool,
55
86
  };
87
+ // ============================================================================
88
+ // TOOL FACTORY FUNCTIONS
89
+ // ============================================================================
56
90
  /**
57
91
  * Create coding tools configured for a specific working directory.
92
+ * Note: hookRunner is not passed to indusagi's bash tool as they have incompatible interfaces.
93
+ * Shell environment hooks should be handled separately if needed.
58
94
  */
59
95
  export function createCodingTools(cwd, options) {
60
96
  const todoStore = options?.todoStore ?? new TodoStore();
61
97
  const taskOptions = options?.task ? { ...options.task, cwd } : undefined;
62
98
  return [
63
99
  createReadTool(cwd, options?.read),
64
- createBashTool(cwd, { ...options?.bash, hookRunner: options?.hookRunner }),
100
+ createBashTool(cwd, options?.bash),
65
101
  createEditTool(cwd),
66
102
  createWriteTool(cwd),
67
103
  createTaskTool(taskOptions),
@@ -87,13 +123,14 @@ export function createReadOnlyTools(cwd, options) {
87
123
  /**
88
124
  * Create all tools configured for a specific working directory.
89
125
  * Extension tools are registered separately by the extension system.
126
+ * Note: hookRunner is not passed to indusagi's bash tool as they have incompatible interfaces.
90
127
  */
91
128
  export function createAllTools(cwd, options) {
92
129
  const todoStore = options?.todoStore ?? new TodoStore();
93
130
  const taskOptions = options?.task ? { ...options.task, cwd } : undefined;
94
131
  return {
95
132
  read: createReadTool(cwd, options?.read),
96
- bash: createBashTool(cwd, { ...options?.bash, hookRunner: options?.hookRunner }),
133
+ bash: createBashTool(cwd, options?.bash),
97
134
  edit: createEditTool(cwd),
98
135
  write: createWriteTool(cwd),
99
136
  grep: createGrepTool(cwd),
@@ -106,4 +143,32 @@ export function createAllTools(cwd, options) {
106
143
  websearch: createWebSearchTool(),
107
144
  };
108
145
  }
146
+ /**
147
+ * Built-in tools documentation
148
+ *
149
+ * CORE TOOLS (from indusagi package):
150
+ * - read: Read file contents (text files and images)
151
+ * - bash: Execute bash commands
152
+ * - edit: Make surgical edits to files
153
+ * - write: Create or overwrite files
154
+ * - grep: Search files with patterns
155
+ * - find: Find files by name or pattern
156
+ * - ls: List directory contents
157
+ * - webfetch: Fetch and transform content from URLs
158
+ * - websearch: Real-time web search using Exa AI API
159
+ *
160
+ * LOCAL TOOLS (custom integrations):
161
+ * - task: Delegate work to subagents (with model registry, subagent store integration)
162
+ * - todoread: Read todo list (with session manager integration)
163
+ * - todowrite: Update todo list (with session manager integration)
164
+ *
165
+ * EXTENSION TOOLS (via @indusagi/bg-process):
166
+ * - bg-process: Manage background processes
167
+ * - start: Run command in background
168
+ * - list: Show all managed processes
169
+ * - output: Get recent stdout/stderr
170
+ * - logs: Get log file paths
171
+ * - kill: Terminate a process
172
+ * - clear: Remove finished processes
173
+ */
109
174
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,QAAQ,EACR,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAmE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACtH,OAAO,EAAE,cAAc,EAAmE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACtH,OAAO,EAAE,cA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;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW,EAAE,OAAsB;IACjE,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,IAAI,SAAS,EAAE,CAAC;IACxD,MAAM,WAAW,GAAG,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACzE,OAAO;QACN,IAAI,EAAE,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC;QACxC,IAAI,EAAE,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC;QACxC,IAAI,EAAE,cAAc,CAAC,GAAG,CAAC;QACzB,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC;QAC3B,IAAI,EAAE,cAAc,CAAC,GAAG,CAAC;QACzB,IAAI,EAAE,cAAc,CAAC,GAAG,CAAC;QACzB,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC;QACrB,IAAI,EAAE,cAAc,CAAC,WAAW,CAAC;QACjC,QAAQ,EAAE,kBAAkB,CAAC,SAAS,CAAC;QACvC,SAAS,EAAE,mBAAmB,CAAC,SAAS,CAAC;QACzC,QAAQ,EAAE,kBAAkB,EAAE;QAC9B,SAAS,EAAE,mBAAmB,EAAE;KAChC,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG"}
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Task Tool - Uses indusagi's task tool with custom TaskSessionManager executor
3
+ *
4
+ * @module core/tools/task
5
+ * @description
6
+ * Wraps indusagi's createTaskTool with a custom TaskExecutor that uses
7
+ * TaskSessionManager for actual subagent execution.
8
+ */
9
+ import { type TaskToolDetails } from "indusagi/agent";
1
10
  import type { AgentTool } from "indusagi/agent";
2
11
  import type { Model } from "indusagi/ai";
3
12
  import type { ThinkingLevel } from "indusagi/agent";
@@ -5,15 +14,10 @@ import type { ModelRegistry } from "../model-registry.js";
5
14
  import type { SettingsManager } from "../settings-manager.js";
6
15
  import type { Skill } from "../skills.js";
7
16
  import type { SubagentStore } from "../subagents.js";
8
- import { type TaskToolDetails } from "../task-session-manager.js";
9
17
  export type { TaskToolDetails };
10
- declare const taskSchema: import("@sinclair/typebox").TObject<{
11
- description: import("@sinclair/typebox").TString;
12
- prompt: import("@sinclair/typebox").TString;
13
- subagent_type: import("@sinclair/typebox").TString;
14
- task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
15
- command: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
16
- }>;
18
+ /**
19
+ * Task tool options - includes all dependencies for TaskSessionManager
20
+ */
17
21
  export interface TaskToolOptions {
18
22
  cwd?: string;
19
23
  settingsManager: SettingsManager;
@@ -27,12 +31,13 @@ export interface TaskToolOptions {
27
31
  }>;
28
32
  skills?: Skill[];
29
33
  }
30
- export declare function createTaskTool(options?: TaskToolOptions): AgentTool<typeof taskSchema, TaskToolDetails>;
31
- export declare const taskTool: AgentTool<import("@sinclair/typebox").TObject<{
32
- description: import("@sinclair/typebox").TString;
33
- prompt: import("@sinclair/typebox").TString;
34
- subagent_type: import("@sinclair/typebox").TString;
35
- task_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
36
- command: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
37
- }>, TaskToolDetails>;
34
+ /**
35
+ * Create task tool with custom executor using TaskSessionManager
36
+ */
37
+ export declare function createTaskTool(options?: TaskToolOptions): AgentTool<any, TaskToolDetails>;
38
+ /**
39
+ * Default task tool - throws error if used without configuration
40
+ * This is intentionally not functional - must use createTaskTool with options
41
+ */
42
+ export declare const taskTool: AgentTool<any, TaskToolDetails>;
38
43
  //# sourceMappingURL=task.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../src/core/tools/task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAA2B,MAA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,KAAK,EAAE,SAAS,EAA2B,MAAM,gBAAgB,CAAC;AACzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGzE,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,aAAa,CAAC;IAC7B,eAAe,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAC9C,uBAAuB,EAAE,MAAM,aAAa,CAAC;IAC7C,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CACjB;AA2ED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,GAAG,EAAE,eAAe,CAAC,CAczF;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,eAAe,CAQpD,CAAC"}
@@ -1,19 +1,21 @@
1
- import { Type } from "@sinclair/typebox";
1
+ /**
2
+ * Task Tool - Uses indusagi's task tool with custom TaskSessionManager executor
3
+ *
4
+ * @module core/tools/task
5
+ * @description
6
+ * Wraps indusagi's createTaskTool with a custom TaskExecutor that uses
7
+ * TaskSessionManager for actual subagent execution.
8
+ */
9
+ import { createTaskTool as createIndusagiTaskTool, } from "indusagi/agent";
2
10
  import { TaskSessionManager } from "../task-session-manager.js";
3
- const taskSchema = Type.Object({
4
- description: Type.String({ description: "A short (3-5 words) description of the task" }),
5
- prompt: Type.String({ description: "The task for the subagent to perform" }),
6
- subagent_type: Type.String({ description: "The type of specialized subagent to use for this task" }),
7
- task_id: Type.Optional(Type.String({
8
- description: "Only set to resume a previous task. The task will continue the same subagent session as before.",
9
- })),
10
- command: Type.Optional(Type.String({ description: "The command that triggered this task (optional)" })),
11
- });
11
+ /**
12
+ * Build task description with available subagent types
13
+ */
12
14
  function buildTaskDescription(subagentStore) {
13
15
  const header = "Launch a subagent to handle complex or multi-step work autonomously.";
14
- const instructions = "When using this tool, provide a clear description, a detailed prompt, and the subagent_type. Use task_id to resume a previous task.";
16
+ const instructions = "\n\nAvailable subagent types:\n- general: General-purpose subagent for multi-step tasks and research.\n- explore: Subagent specialized in codebase exploration and search.\n\nWhen using this tool, provide a clear description, a detailed prompt, and the subagent_type. Use task_id to resume a previous task.";
15
17
  if (!subagentStore) {
16
- return `${header}\n\n${instructions}`;
18
+ return `${header}${instructions}`;
17
19
  }
18
20
  const subagents = subagentStore
19
21
  .list()
@@ -21,45 +23,82 @@ function buildTaskDescription(subagentStore) {
21
23
  .map((agent) => `- ${agent.name}${agent.description ? `: ${agent.description}` : ""}`)
22
24
  .join("\n");
23
25
  return subagents
24
- ? `${header}\n\nAvailable subagent types:\n${subagents}\n\n${instructions}`
25
- : `${header}\n\n${instructions}`;
26
+ ? `${header}\n\nAvailable subagent types:\n${subagents}\n\nWhen using this tool, provide a clear description, a detailed prompt, and the subagent_type. Use task_id to resume a previous task.`
27
+ : `${header}${instructions}`;
26
28
  }
27
- export function createTaskTool(options) {
28
- const manager = options
29
- ? new TaskSessionManager({
30
- cwd: options.cwd ?? process.cwd(),
31
- settingsManager: options.settingsManager,
32
- modelRegistry: options.modelRegistry,
33
- subagentStore: options.subagentStore,
34
- getDefaultModel: options.getDefaultModel,
35
- getDefaultThinkingLevel: options.getDefaultThinkingLevel,
36
- contextFiles: options.contextFiles,
37
- skills: options.skills,
38
- })
39
- : undefined;
29
+ /**
30
+ * Create a task executor that uses TaskSessionManager
31
+ */
32
+ function createTaskExecutor(options) {
40
33
  return {
41
- name: "task",
42
- label: "task",
43
- description: buildTaskDescription(options?.subagentStore),
44
- parameters: taskSchema,
45
- execute: async (_toolCallId, { description, prompt, subagent_type, task_id }, signal, onUpdate) => {
46
- if (!manager) {
47
- throw new Error("Task tool is not configured. Provide TaskToolOptions when creating tools.");
48
- }
34
+ async runTask(params) {
35
+ const manager = new TaskSessionManager({
36
+ cwd: options.cwd ?? process.cwd(),
37
+ settingsManager: options.settingsManager,
38
+ modelRegistry: options.modelRegistry,
39
+ subagentStore: options.subagentStore,
40
+ getDefaultModel: options.getDefaultModel,
41
+ getDefaultThinkingLevel: options.getDefaultThinkingLevel,
42
+ contextFiles: options.contextFiles,
43
+ skills: options.skills,
44
+ });
45
+ // Convert TaskUpdate callback to AgentToolUpdateCallback
46
+ const adaptedOnUpdate = params.onUpdate
47
+ ? (partialResult) => {
48
+ // Extract text from content
49
+ const text = partialResult.content
50
+ .filter(c => c.type === "text" && c.text)
51
+ .map(c => c.text)
52
+ .join("");
53
+ params.onUpdate?.({
54
+ type: "chunk",
55
+ content: text,
56
+ details: partialResult.details,
57
+ });
58
+ }
59
+ : undefined;
49
60
  const result = await manager.runTask({
50
- description,
51
- prompt,
52
- subagentType: subagent_type,
53
- taskId: task_id,
54
- signal,
55
- onUpdate,
61
+ description: params.description,
62
+ prompt: params.prompt,
63
+ subagentType: params.subagentType,
64
+ taskId: params.taskId,
65
+ signal: params.signal,
66
+ onUpdate: adaptedOnUpdate, // Type cast to handle callback signature mismatch
56
67
  });
57
68
  return {
58
- content: [{ type: "text", text: result.output }],
69
+ output: result.output,
59
70
  details: result.details,
60
71
  };
61
72
  },
62
73
  };
63
74
  }
64
- export const taskTool = createTaskTool(undefined);
75
+ /**
76
+ * Create task tool with custom executor using TaskSessionManager
77
+ */
78
+ export function createTaskTool(options) {
79
+ if (!options) {
80
+ // Return a simple placeholder tool when no options provided
81
+ throw new Error("Task tool requires TaskToolOptions with settingsManager, modelRegistry, subagentStore, etc.");
82
+ }
83
+ const executor = createTaskExecutor(options);
84
+ return createIndusagiTaskTool({
85
+ cwd: options.cwd,
86
+ executor,
87
+ subagentStore: options.subagentStore, // Type cast to handle interface mismatch
88
+ buildDescription: (store) => buildTaskDescription(store),
89
+ });
90
+ }
91
+ /**
92
+ * Default task tool - throws error if used without configuration
93
+ * This is intentionally not functional - must use createTaskTool with options
94
+ */
95
+ export const taskTool = {
96
+ name: "task",
97
+ label: "task",
98
+ description: "Launch a subagent to handle complex or multi-step work autonomously.",
99
+ parameters: {},
100
+ execute: async () => {
101
+ throw new Error("Task tool is not configured. Use createTaskTool() with TaskToolOptions.");
102
+ },
103
+ };
65
104
  //# sourceMappingURL=task.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"task.js","sourceRoot":"","sources":["../../../src/core/tools/task.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAOzC,OAAO,EAAE,kBAAkB,EAAwB,MAAM,4BAA4B,CAAC;AAItF,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9B,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;IACxF,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;IAC5E,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,uDAAuD,EAAE,CAAC;IACpG,OAAO,EAAE,IAAI,CAAC,QAAQ,CACrB,IAAI,CAAC,MAAM,CAAC;QACX,WAAW,EACV,iGAAiG;KAClG,CAAC,CACF;IACD,OAAO,EAAE,IAA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,EAAE,EAAE,CAAC,oBAAoB,CAAC,KAAkC,CAAC;KACrF,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAoC;IACxD,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,sEAAsE;IACnF,UAAU,EAAE,EAAS;IACrB,OAAO,EAAE,KAAK,IAAI,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;IAC5F,CAAC;CACD,CAAC"}
@@ -1,26 +1,37 @@
1
- import type { AgentTool } from "indusagi/agent";
2
- import { TodoStore, type TodoItem } from "../todo-store.js";
3
- declare const TodoReadSchema: import("@sinclair/typebox").TObject<{}>;
4
- declare const TodoWriteSchema: import("@sinclair/typebox").TObject<{
1
+ /**
2
+ * Todo Tools - Uses indusagi's todo tools with session persistence
3
+ *
4
+ * @module core/tools/todo
5
+ * @description
6
+ * Wraps indusagi's createTodoReadTool/createTodoWriteTool with a TodoStore
7
+ * that uses TodoStoreOptions for session persistence.
8
+ */
9
+ import { createTodoReadTool as createIndusagiTodoReadTool, createTodoWriteTool as createIndusagiTodoWriteTool, TodoStore as IndusagiTodoStore, type TodoItem, type TodoPriority, type TodoStatus, type TodoToolDetails, type TodoStoreOptions } from "indusagi/agent";
10
+ import type { SessionManager } from "../session-manager.js";
11
+ /**
12
+ * Create a TodoStore with session persistence
13
+ */
14
+ export declare function createSessionTodoStore(sessionManager?: SessionManager): IndusagiTodoStore;
15
+ export type { TodoItem, TodoPriority, TodoStatus, TodoToolDetails, TodoStoreOptions };
16
+ export { IndusagiTodoStore as TodoStore };
17
+ /**
18
+ * Create todo read tool
19
+ */
20
+ export declare function createTodoReadTool(store: IndusagiTodoStore): ReturnType<typeof createIndusagiTodoReadTool>;
21
+ /**
22
+ * Create todo write tool
23
+ */
24
+ export declare function createTodoWriteTool(store: IndusagiTodoStore): ReturnType<typeof createIndusagiTodoWriteTool>;
25
+ /** Default todo read tool using in-memory store */
26
+ export declare const todoReadTool: import("indusagi/agent").AgentTool<import("@sinclair/typebox").TObject<{}>, TodoToolDetails>;
27
+ /** Default todo write tool using in-memory store */
28
+ export declare const todoWriteTool: import("indusagi/agent").AgentTool<import("@sinclair/typebox").TObject<{
5
29
  todos: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
6
30
  content: import("@sinclair/typebox").TString;
7
- status: import("@sinclair/typebox").TUnsafe<"cancelled" | "pending" | "in_progress" | "completed">;
8
- priority: import("@sinclair/typebox").TUnsafe<"low" | "medium" | "high">;
9
- }>>;
10
- }>;
11
- export interface TodoToolDetails {
12
- todos: TodoItem[];
13
- incompleteCount: number;
14
- }
15
- export declare function createTodoReadTool(store: TodoStore): AgentTool<typeof TodoReadSchema, TodoToolDetails>;
16
- export declare function createTodoWriteTool(store: TodoStore): AgentTool<typeof TodoWriteSchema, TodoToolDetails>;
17
- export declare const todoReadTool: AgentTool<import("@sinclair/typebox").TObject<{}>, TodoToolDetails>;
18
- export declare const todoWriteTool: AgentTool<import("@sinclair/typebox").TObject<{
19
- todos: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
20
- content: import("@sinclair/typebox").TString;
21
- status: import("@sinclair/typebox").TUnsafe<"cancelled" | "pending" | "in_progress" | "completed">;
31
+ status: import("@sinclair/typebox").TUnsafe<"in_progress" | "completed" | "cancelled" | "pending">;
22
32
  priority: import("@sinclair/typebox").TUnsafe<"low" | "medium" | "high">;
23
33
  }>>;
34
+ search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
35
+ status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"in_progress" | "completed" | "cancelled" | "pending">>;
24
36
  }>, TodoToolDetails>;
25
- export {};
26
37
  //# sourceMappingURL=todo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"todo.d.ts","sourceRoot":"","sources":["../../../src/core/tools/todo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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G,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAE1G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAE5G;AAKD,mDAAmD;AACnD,eAAO,MAAM,YAAY,8FAAmC,CAAC;AAE7D,oDAAoD;AACpD,eAAO,MAAM,aAAa;;;;;;;;oBAAoC,CAAC"}
@@ -1,52 +1,75 @@
1
- import { StringEnum } from "indusagi/ai";
2
- import { Type } from "@sinclair/typebox";
3
- import { TodoStore } from "../todo-store.js";
4
- const TodoItemSchema = Type.Object({
5
- content: Type.String({ description: "Brief description of the task" }),
6
- status: StringEnum(["pending", "in_progress", "completed", "cancelled"]),
7
- priority: StringEnum(["high", "medium", "low"]),
8
- });
9
- const TodoReadSchema = Type.Object({});
10
- const TodoWriteSchema = Type.Object({
11
- todos: Type.Array(TodoItemSchema, { description: "The updated todo list" }),
12
- });
13
- function formatTodos(todos) {
14
- return JSON.stringify(todos, null, 2);
15
- }
16
- function countIncomplete(todos) {
17
- return todos.filter((todo) => todo.status !== "completed").length;
1
+ /**
2
+ * Todo Tools - Uses indusagi's todo tools with session persistence
3
+ *
4
+ * @module core/tools/todo
5
+ * @description
6
+ * Wraps indusagi's createTodoReadTool/createTodoWriteTool with a TodoStore
7
+ * that uses TodoStoreOptions for session persistence.
8
+ */
9
+ import { createTodoReadTool as createIndusagiTodoReadTool, createTodoWriteTool as createIndusagiTodoWriteTool, TodoStore as IndusagiTodoStore, } from "indusagi/agent";
10
+ const TODO_CUSTOM_TYPE = "todo";
11
+ /**
12
+ * Create a TodoStore with session persistence
13
+ */
14
+ export function createSessionTodoStore(sessionManager) {
15
+ return new IndusagiTodoStore({
16
+ persist: (todos) => {
17
+ sessionManager?.appendCustomEntry(TODO_CUSTOM_TYPE, { todos });
18
+ },
19
+ load: () => {
20
+ if (!sessionManager)
21
+ return [];
22
+ const entries = sessionManager.getBranch();
23
+ for (let i = entries.length - 1; i >= 0; i--) {
24
+ const entry = entries[i];
25
+ if (entry?.type !== "custom")
26
+ continue;
27
+ if (entry.customType !== TODO_CUSTOM_TYPE)
28
+ continue;
29
+ const data = entry.data;
30
+ if (!data || !Array.isArray(data.todos))
31
+ continue;
32
+ return data.todos;
33
+ }
34
+ return [];
35
+ },
36
+ rebuildFromBranch: () => {
37
+ if (!sessionManager)
38
+ return [];
39
+ const entries = sessionManager.getBranch();
40
+ for (let i = entries.length - 1; i >= 0; i--) {
41
+ const entry = entries[i];
42
+ if (entry?.type !== "custom")
43
+ continue;
44
+ if (entry.customType !== TODO_CUSTOM_TYPE)
45
+ continue;
46
+ const data = entry.data;
47
+ if (!data || !Array.isArray(data.todos))
48
+ continue;
49
+ return data.todos;
50
+ }
51
+ return [];
52
+ },
53
+ });
18
54
  }
55
+ // Re-export TodoStore
56
+ export { IndusagiTodoStore as TodoStore };
57
+ /**
58
+ * Create todo read tool
59
+ */
19
60
  export function createTodoReadTool(store) {
20
- return {
21
- name: "todoread",
22
- label: "todoread",
23
- description: "Read the current todo list. Returns items with content, status, and priority.",
24
- parameters: TodoReadSchema,
25
- execute: async () => {
26
- const todos = store.getTodos();
27
- return {
28
- content: [{ type: "text", text: formatTodos(todos) }],
29
- details: { todos, incompleteCount: countIncomplete(todos) },
30
- };
31
- },
32
- };
61
+ return createIndusagiTodoReadTool(store);
33
62
  }
63
+ /**
64
+ * Create todo write tool
65
+ */
34
66
  export function createTodoWriteTool(store) {
35
- return {
36
- name: "todowrite",
37
- label: "todowrite",
38
- description: "Update the todo list. Provide the full list each time with content, status, and priority fields.",
39
- parameters: TodoWriteSchema,
40
- execute: async (_toolCallId, { todos }) => {
41
- store.setTodos(todos);
42
- return {
43
- content: [{ type: "text", text: formatTodos(todos) }],
44
- details: { todos: store.getTodos(), incompleteCount: countIncomplete(todos) },
45
- };
46
- },
47
- };
67
+ return createIndusagiTodoWriteTool(store);
48
68
  }
49
- const defaultStore = new TodoStore();
69
+ // Default store for simple mode (no session persistence)
70
+ const defaultStore = new IndusagiTodoStore();
71
+ /** Default todo read tool using in-memory store */
50
72
  export const todoReadTool = createTodoReadTool(defaultStore);
73
+ /** Default todo write tool using in-memory store */
51
74
  export const todoWriteTool = createTodoWriteTool(defaultStore);
52
75
  //# sourceMappingURL=todo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"todo.js","sourceRoot":"","sources":["../../../src/core/tools/todo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAiB,MAAM,kBAAkB,CAAC;AAE5D,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IACtE,MAAM,EAAE,UAAU,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,CAAU,CAAC;IACjF,QAAQ,EAAE,UAAU,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;CACxD,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;CAC3E,CAAC,CAAC;AAOH,SAAS,WAAW,CAAC,KAAiB;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,eAAe,CAAC,KAAiB;IACzC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,MAAM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