wave-agent-sdk 0.15.1 → 0.15.2
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/builtin/skills/loop/SKILL.md +29 -3
- package/dist/agent.d.ts +7 -2
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +34 -11
- package/dist/constants/tools.d.ts +3 -0
- package/dist/constants/tools.d.ts.map +1 -1
- package/dist/constants/tools.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/managers/aiManager.d.ts +13 -1
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +69 -17
- package/dist/managers/hookManager.d.ts.map +1 -1
- package/dist/managers/hookManager.js +9 -0
- package/dist/managers/mcpManager.d.ts +4 -1
- package/dist/managers/mcpManager.d.ts.map +1 -1
- package/dist/managers/mcpManager.js +25 -5
- package/dist/managers/permissionManager.d.ts +0 -2
- package/dist/managers/permissionManager.d.ts.map +1 -1
- package/dist/managers/permissionManager.js +0 -30
- package/dist/managers/slashCommandManager.d.ts +1 -0
- package/dist/managers/slashCommandManager.d.ts.map +1 -1
- package/dist/managers/slashCommandManager.js +4 -0
- package/dist/managers/toolManager.d.ts +6 -0
- package/dist/managers/toolManager.d.ts.map +1 -1
- package/dist/managers/toolManager.js +41 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +14 -4
- package/dist/services/initializationService.d.ts +0 -2
- package/dist/services/initializationService.d.ts.map +1 -1
- package/dist/services/initializationService.js +3 -35
- package/dist/services/memory.d.ts +6 -0
- package/dist/services/memory.d.ts.map +1 -1
- package/dist/services/memory.js +27 -14
- package/dist/tools/cronCreateTool.d.ts.map +1 -1
- package/dist/tools/cronCreateTool.js +71 -6
- package/dist/tools/cronDeleteTool.d.ts.map +1 -1
- package/dist/tools/cronDeleteTool.js +5 -1
- package/dist/tools/cronListTool.d.ts.map +1 -1
- package/dist/tools/cronListTool.js +5 -1
- package/dist/tools/enterWorktreeTool.d.ts +8 -0
- package/dist/tools/enterWorktreeTool.d.ts.map +1 -0
- package/dist/tools/enterWorktreeTool.js +144 -0
- package/dist/tools/exitWorktreeTool.d.ts +8 -0
- package/dist/tools/exitWorktreeTool.d.ts.map +1 -0
- package/dist/tools/exitWorktreeTool.js +184 -0
- package/dist/tools/taskManagementTools.d.ts.map +1 -1
- package/dist/tools/taskManagementTools.js +4 -0
- package/dist/tools/toolSearchTool.d.ts +15 -0
- package/dist/tools/toolSearchTool.d.ts.map +1 -0
- package/dist/tools/toolSearchTool.js +185 -0
- package/dist/tools/types.d.ts +19 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/webFetchTool.d.ts.map +1 -1
- package/dist/tools/webFetchTool.js +1 -0
- package/dist/types/agent.d.ts +6 -1
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/hooks.d.ts +3 -1
- package/dist/types/hooks.d.ts.map +1 -1
- package/dist/types/hooks.js +1 -0
- package/dist/utils/containerSetup.d.ts.map +1 -1
- package/dist/utils/containerSetup.js +4 -6
- package/dist/utils/cronToHuman.d.ts +6 -0
- package/dist/utils/cronToHuman.d.ts.map +1 -0
- package/dist/utils/cronToHuman.js +79 -0
- package/dist/utils/isDeferredTool.d.ts +19 -0
- package/dist/utils/isDeferredTool.d.ts.map +1 -0
- package/dist/utils/isDeferredTool.js +31 -0
- package/dist/utils/mcpUtils.d.ts.map +1 -1
- package/dist/utils/mcpUtils.js +1 -0
- package/dist/utils/parseCronExpression.d.ts +6 -0
- package/dist/utils/parseCronExpression.d.ts.map +1 -0
- package/dist/utils/parseCronExpression.js +74 -0
- package/dist/utils/worktreeSession.d.ts +26 -0
- package/dist/utils/worktreeSession.d.ts.map +1 -0
- package/dist/utils/worktreeSession.js +14 -0
- package/dist/utils/worktreeUtils.d.ts +42 -0
- package/dist/utils/worktreeUtils.d.ts.map +1 -0
- package/dist/utils/worktreeUtils.js +236 -0
- package/package.json +1 -1
- package/src/agent.ts +49 -12
- package/src/constants/tools.ts +3 -0
- package/src/index.ts +1 -0
- package/src/managers/aiManager.ts +73 -18
- package/src/managers/hookManager.ts +10 -0
- package/src/managers/mcpManager.ts +32 -6
- package/src/managers/permissionManager.ts +0 -42
- package/src/managers/slashCommandManager.ts +6 -0
- package/src/managers/toolManager.ts +47 -1
- package/src/prompts/index.ts +17 -3
- package/src/services/initializationService.ts +2 -41
- package/src/services/memory.ts +30 -17
- package/src/tools/cronCreateTool.ts +81 -8
- package/src/tools/cronDeleteTool.ts +7 -2
- package/src/tools/cronListTool.ts +7 -2
- package/src/tools/enterWorktreeTool.ts +183 -0
- package/src/tools/exitWorktreeTool.ts +242 -0
- package/src/tools/taskManagementTools.ts +4 -0
- package/src/tools/toolSearchTool.ts +228 -0
- package/src/tools/types.ts +19 -0
- package/src/tools/webFetchTool.ts +1 -0
- package/src/types/agent.ts +6 -0
- package/src/types/hooks.ts +4 -0
- package/src/utils/containerSetup.ts +7 -8
- package/src/utils/cronToHuman.ts +99 -0
- package/src/utils/isDeferredTool.ts +36 -0
- package/src/utils/mcpUtils.ts +1 -0
- package/src/utils/parseCronExpression.ts +78 -0
- package/src/utils/worktreeSession.ts +36 -0
- package/src/utils/worktreeUtils.ts +288 -0
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: loop
|
|
3
|
-
description:
|
|
3
|
+
description: Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo, defaults to 10m)
|
|
4
4
|
allowed-tools: CronCreate, Skill
|
|
5
|
+
user-invocable: true
|
|
5
6
|
---
|
|
7
|
+
|
|
6
8
|
# /loop — schedule a recurring prompt
|
|
7
9
|
|
|
8
10
|
Parse the input below into `[interval] <prompt…>` and schedule it with CronCreate.
|
|
9
11
|
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/loop [interval] <prompt>
|
|
16
|
+
|
|
17
|
+
Run a prompt or slash command on a recurring interval.
|
|
18
|
+
|
|
19
|
+
Intervals: Ns, Nm, Nh, Nd (e.g. 5m, 30m, 2h, 1d). Minimum granularity is 1 minute.
|
|
20
|
+
If no interval is specified, defaults to 10m.
|
|
21
|
+
|
|
22
|
+
Examples:
|
|
23
|
+
/loop 5m /babysit-prs
|
|
24
|
+
/loop 30m check the deploy
|
|
25
|
+
/loop 1h /standup 1
|
|
26
|
+
/loop check the deploy (defaults to 10m)
|
|
27
|
+
/loop check the deploy every 20m
|
|
28
|
+
```
|
|
29
|
+
|
|
10
30
|
## Parsing (in priority order)
|
|
11
31
|
|
|
12
32
|
1. **Leading token**: if the first whitespace-delimited token matches `^\d+[smhd]$` (e.g. `5m`, `2h`), that's the interval; the rest is the prompt.
|
|
@@ -37,7 +57,13 @@ Supported suffixes: `s` (seconds, rounded up to nearest minute, min 1), `m` (min
|
|
|
37
57
|
|
|
38
58
|
**If the interval doesn't cleanly divide its unit** (e.g. `7m` → `*/7 * * * *` gives uneven gaps at :56→:00; `90m` → 1.5h which cron can't express), pick the nearest clean interval and tell the user what you rounded to before scheduling.
|
|
39
59
|
|
|
40
|
-
|
|
60
|
+
## Avoid the :00 and :30 minute marks
|
|
61
|
+
|
|
62
|
+
When the user's request is approximate, pick a minute that is NOT 0 or 30:
|
|
63
|
+
- "every morning around 9" → `57 8 * * *` or `3 9 * * *` (not `0 9 * * *`)
|
|
64
|
+
- "hourly" → `7 * * * *` (not `0 * * * *`)
|
|
65
|
+
|
|
66
|
+
Only use minute 0 or 30 when the user names that exact time and clearly means it ("at 9:00 sharp", "at half past").
|
|
41
67
|
|
|
42
68
|
## Action
|
|
43
69
|
|
|
@@ -46,7 +72,7 @@ Supported suffixes: `s` (seconds, rounded up to nearest minute, min 1), `m` (min
|
|
|
46
72
|
- `prompt`: the parsed prompt from above, verbatim (slash commands are passed through unchanged)
|
|
47
73
|
- `recurring`: `true`
|
|
48
74
|
2. Briefly confirm: what's scheduled, the cron expression, the human-readable cadence, that recurring tasks auto-expire after 7 days, and that they can cancel sooner with CronDelete (include the job ID).
|
|
49
|
-
3. **Then immediately execute the parsed prompt now** — don't wait for the first cron fire. If it's a slash command,
|
|
75
|
+
3. **Then immediately execute the parsed prompt now** — don't wait for the first cron fire. If it's a slash command, run it directly; otherwise act on it directly.
|
|
50
76
|
|
|
51
77
|
## Input
|
|
52
78
|
|
package/dist/agent.d.ts
CHANGED
|
@@ -33,8 +33,6 @@ export declare class Agent {
|
|
|
33
33
|
private systemPrompt?;
|
|
34
34
|
private stream;
|
|
35
35
|
private options;
|
|
36
|
-
private _projectMemoryContent;
|
|
37
|
-
private _userMemoryContent;
|
|
38
36
|
getGatewayConfig(): GatewayConfig;
|
|
39
37
|
getModelConfig(): ModelConfig;
|
|
40
38
|
getMaxInputTokens(): number;
|
|
@@ -141,6 +139,7 @@ export declare class Agent {
|
|
|
141
139
|
* @param options.messages - Optional initial messages for testing convenience
|
|
142
140
|
* @param options.workdir - Working directory (defaults to process.cwd())
|
|
143
141
|
* @param options.systemPrompt - Optional custom system prompt
|
|
142
|
+
* @param options.mcpServers - Optional MCP server configs to connect at startup
|
|
144
143
|
* @returns Promise that resolves to initialized Agent instance
|
|
145
144
|
*
|
|
146
145
|
* @example
|
|
@@ -194,6 +193,12 @@ export declare class Agent {
|
|
|
194
193
|
* Background the current foreground task
|
|
195
194
|
*/
|
|
196
195
|
backgroundCurrentTask(): Promise<void>;
|
|
196
|
+
/**
|
|
197
|
+
* Trigger WorktreeRemove hook before agent destruction.
|
|
198
|
+
* Called from CLI exit dialog when user chooses to remove the worktree.
|
|
199
|
+
* Non-blocking: errors logged but don't prevent removal.
|
|
200
|
+
*/
|
|
201
|
+
triggerWorktreeRemoveHook(worktreePath: string): Promise<void>;
|
|
197
202
|
/** Destroy managers, clean up resources */
|
|
198
203
|
destroy(): Promise<void>;
|
|
199
204
|
/**
|
package/dist/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../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I,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAIxD;;OAEG;IACI,iBAAiB,IAAI,cAAc;IAI1C;;;OAGG;IACI,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IASpD;;;OAGG;IACU,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1D;;OAEG;IACU,oBAAoB,IAAI,OAAO,CAAC;QAC3C,QAAQ,EAAE,OAAO,EAAE,CAAC;QACpB,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;IAIF;;OAEG;IACI,eAAe,IAAI,MAAM,GAAG,SAAS;IAI5C;;OAEG;IACI,eAAe,IAAI,MAAM,EAAE;IAOlC;;OAEG;IACI,mBAAmB,IAAI,MAAM,EAAE;IAItC;;OAEG;IACU,eAAe,CAC1B,OAAO,EAAE,OAAO,wBAAwB,EAAE,qBAAqB,GAC9D,OAAO,CAAC,OAAO,wBAAwB,EAAE,kBAAkB,CAAC;IAI/D;;;OAGG;IACU,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D;;;;OAIG;IACI,mBAAmB,CACxB,UAAU,EAAE,MAAM,GACjB,OAAO,+BAA+B,EAAE,gBAAgB,GAAG,IAAI;IAIlE;;OAEG;IACH,IAAW,UAAU,IAAI,MAAM,CAE9B;IAED;;OAEG;IACH,IAAW,wBAAwB,IAAI,OAAO,CAO7C;CACF"}
|
package/dist/agent.js
CHANGED
|
@@ -48,9 +48,6 @@ export class Agent {
|
|
|
48
48
|
constructor(options) {
|
|
49
49
|
this.bangManager = null;
|
|
50
50
|
this.pendingNotificationPromises = []; // Track pending notification processing
|
|
51
|
-
// Memory content storage
|
|
52
|
-
this._projectMemoryContent = "";
|
|
53
|
-
this._userMemoryContent = "";
|
|
54
51
|
const { logger, workdir, systemPrompt, stream = true } = options;
|
|
55
52
|
// Set working directory early as we need it for loading configuration
|
|
56
53
|
this.workdir = workdir || process.cwd();
|
|
@@ -174,11 +171,13 @@ export class Agent {
|
|
|
174
171
|
}
|
|
175
172
|
/** Get project memory content */
|
|
176
173
|
get projectMemory() {
|
|
177
|
-
|
|
174
|
+
const memoryService = this.container.get("MemoryService");
|
|
175
|
+
return memoryService?.cachedProjectMemory ?? "";
|
|
178
176
|
}
|
|
179
177
|
/** Get user memory content */
|
|
180
178
|
get userMemory() {
|
|
181
|
-
|
|
179
|
+
const memoryService = this.container.get("MemoryService");
|
|
180
|
+
return memoryService?.cachedUserMemory ?? "";
|
|
182
181
|
}
|
|
183
182
|
/** Get combined memory content (project + user + modular rules) */
|
|
184
183
|
async getCombinedMemory() {
|
|
@@ -273,6 +272,7 @@ export class Agent {
|
|
|
273
272
|
* @param options.messages - Optional initial messages for testing convenience
|
|
274
273
|
* @param options.workdir - Working directory (defaults to process.cwd())
|
|
275
274
|
* @param options.systemPrompt - Optional custom system prompt
|
|
275
|
+
* @param options.mcpServers - Optional MCP server configs to connect at startup
|
|
276
276
|
* @returns Promise that resolves to initialized Agent instance
|
|
277
277
|
*
|
|
278
278
|
* @example
|
|
@@ -330,12 +330,6 @@ export class Agent {
|
|
|
330
330
|
memoryRuleManager: this.memoryRuleManager,
|
|
331
331
|
liveConfigManager: this.liveConfigManager,
|
|
332
332
|
taskManager: this.taskManager,
|
|
333
|
-
setProjectMemory: (content) => {
|
|
334
|
-
this._projectMemoryContent = content;
|
|
335
|
-
},
|
|
336
|
-
setUserMemory: (content) => {
|
|
337
|
-
this._userMemoryContent = content;
|
|
338
|
-
},
|
|
339
333
|
resolveAndValidateConfig: () => this.resolveAndValidateConfig(),
|
|
340
334
|
}, options);
|
|
341
335
|
}
|
|
@@ -435,6 +429,35 @@ export class Agent {
|
|
|
435
429
|
await this.foregroundTaskManager.backgroundCurrentTask();
|
|
436
430
|
this.options.callbacks?.onBackgroundCurrentTask?.();
|
|
437
431
|
}
|
|
432
|
+
/**
|
|
433
|
+
* Trigger WorktreeRemove hook before agent destruction.
|
|
434
|
+
* Called from CLI exit dialog when user chooses to remove the worktree.
|
|
435
|
+
* Non-blocking: errors logged but don't prevent removal.
|
|
436
|
+
*/
|
|
437
|
+
async triggerWorktreeRemoveHook(worktreePath) {
|
|
438
|
+
if (!this.hookManager.hasHooks("WorktreeRemove")) {
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
try {
|
|
442
|
+
const sessionId = this.messageManager.getSessionId();
|
|
443
|
+
const transcriptPath = this.messageManager.getTranscriptPath();
|
|
444
|
+
const hookResults = await this.hookManager.executeHooks("WorktreeRemove", {
|
|
445
|
+
event: "WorktreeRemove",
|
|
446
|
+
projectDir: this.workdir,
|
|
447
|
+
timestamp: new Date(),
|
|
448
|
+
sessionId,
|
|
449
|
+
transcriptPath,
|
|
450
|
+
cwd: this.workdir,
|
|
451
|
+
worktreePath,
|
|
452
|
+
env: Object.fromEntries(Object.entries(process.env).filter((e) => e[1] !== undefined)),
|
|
453
|
+
});
|
|
454
|
+
// Process results via messageManager (may not be visible during shutdown)
|
|
455
|
+
this.hookManager.processHookResults("WorktreeRemove", hookResults, this.messageManager);
|
|
456
|
+
}
|
|
457
|
+
catch (error) {
|
|
458
|
+
this.logger?.warn("WorktreeRemove hooks execution failed:", error);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
438
461
|
/** Destroy managers, clean up resources */
|
|
439
462
|
async destroy() {
|
|
440
463
|
// Clear notification callback first to prevent any late triggers from
|
|
@@ -19,4 +19,7 @@ export declare const CRON_CREATE_TOOL_NAME = "CronCreate";
|
|
|
19
19
|
export declare const CRON_DELETE_TOOL_NAME = "CronDelete";
|
|
20
20
|
export declare const CRON_LIST_TOOL_NAME = "CronList";
|
|
21
21
|
export declare const WEB_FETCH_TOOL_NAME = "WebFetch";
|
|
22
|
+
export declare const ENTER_WORKTREE_TOOL_NAME = "EnterWorktree";
|
|
23
|
+
export declare const EXIT_WORKTREE_TOOL_NAME = "ExitWorktree";
|
|
24
|
+
export declare const TOOL_SEARCH_TOOL_NAME = "ToolSearch";
|
|
22
25
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/constants/tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AACzD,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,mBAAmB,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/constants/tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAC7D,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AACzD,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AACvD,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAClD,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AACxD,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AACtD,eAAO,MAAM,qBAAqB,eAAe,CAAC"}
|
package/dist/constants/tools.js
CHANGED
|
@@ -19,3 +19,6 @@ export const CRON_CREATE_TOOL_NAME = "CronCreate";
|
|
|
19
19
|
export const CRON_DELETE_TOOL_NAME = "CronDelete";
|
|
20
20
|
export const CRON_LIST_TOOL_NAME = "CronList";
|
|
21
21
|
export const WEB_FETCH_TOOL_NAME = "WebFetch";
|
|
22
|
+
export const ENTER_WORKTREE_TOOL_NAME = "EnterWorktree";
|
|
23
|
+
export const EXIT_WORKTREE_TOOL_NAME = "ExitWorktree";
|
|
24
|
+
export const TOOL_SEARCH_TOOL_NAME = "ToolSearch";
|
package/dist/index.d.ts
CHANGED
|
@@ -19,5 +19,6 @@ export * from "./utils/hookMatcher.js";
|
|
|
19
19
|
export * from "./utils/tokenCalculation.js";
|
|
20
20
|
export * from "./utils/gitUtils.js";
|
|
21
21
|
export * from "./utils/nameGenerator.js";
|
|
22
|
+
export * from "./utils/worktreeSession.js";
|
|
22
23
|
export * from "./types/index.js";
|
|
23
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAGlC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAG3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAGlC,cAAc,sBAAsB,CAAC;AAGrC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAG3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,13 +22,14 @@ export declare class AIManager {
|
|
|
22
22
|
private abortController;
|
|
23
23
|
onLoadingChange?: (loading: boolean) => void;
|
|
24
24
|
private toolAbortController;
|
|
25
|
-
private workdir;
|
|
26
25
|
private systemPrompt?;
|
|
27
26
|
private subagentType?;
|
|
28
27
|
private stream;
|
|
29
28
|
private modelOverride?;
|
|
30
29
|
private consecutiveCompactionFailures;
|
|
31
30
|
private readonly maxTurns?;
|
|
31
|
+
/** Tracks which deferred tools have been discovered via ToolSearch */
|
|
32
|
+
private discoveredTools;
|
|
32
33
|
constructor(container: Container, options: AIManagerOptions);
|
|
33
34
|
private get toolManager();
|
|
34
35
|
private get messageManager();
|
|
@@ -45,6 +46,11 @@ export declare class AIManager {
|
|
|
45
46
|
getLanguage(): string | undefined;
|
|
46
47
|
getAutoMemoryEnabled(): boolean;
|
|
47
48
|
getWorkdir(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Update the working directory mid-session (e.g., when entering/exiting a worktree).
|
|
51
|
+
* Also updates process.chdir() so bash commands use the new directory.
|
|
52
|
+
*/
|
|
53
|
+
setWorkdir(newWorkdir: string): void;
|
|
48
54
|
private isCompacting;
|
|
49
55
|
private callbacks;
|
|
50
56
|
/**
|
|
@@ -81,5 +87,11 @@ export declare class AIManager {
|
|
|
81
87
|
* Execute PostToolUse hooks after tool completion
|
|
82
88
|
*/
|
|
83
89
|
private executePostToolUseHooks;
|
|
90
|
+
/**
|
|
91
|
+
* Parse ToolSearch result content to extract discovered tool names.
|
|
92
|
+
* ToolSearch returns content like "ToolName: description\nParameters: {...}"
|
|
93
|
+
* or shortResult like "Discovered tools: ToolA, ToolB".
|
|
94
|
+
*/
|
|
95
|
+
private trackDiscoveredTools;
|
|
84
96
|
}
|
|
85
97
|
//# sourceMappingURL=aiManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiManager.d.ts","sourceRoot":"","sources":["../../src/managers/aiManager.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,KAAK,EAGN,MAAM,mBAAmB,CAAC;AAY3B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAOlD,MAAM,WAAW,kBAAkB;IACjC,uBAAuB,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"aiManager.d.ts","sourceRoot":"","sources":["../../src/managers/aiManager.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,KAAK,EAGN,MAAM,mBAAmB,CAAC;AAY3B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAOlD,MAAM,WAAW,kBAAkB;IACjC,uBAAuB,CA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E5B;IAED,OAAO,KAAK,oBAAoB,GAE/B;IAGM,gBAAgB,IAAI,aAAa;IAIjC,cAAc,IAAI,WAAW;IA6B7B,iBAAiB,IAAI,MAAM;IAI3B,WAAW,IAAI,MAAM,GAAG,SAAS;IAIjC,oBAAoB,IAAI,OAAO;IAI/B,UAAU,IAAI,MAAM;IAI3B;;;OAGG;IACI,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAK3C,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,SAAS,CAAqB;IAEtC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAgBvB,YAAY,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAUtC,cAAc,IAAI,IAAI;IAuB7B,OAAO,CAAC,qBAAqB;YAsBf,6BAA6B;IAwPpC,eAAe,IAAI,OAAO;IAI1B,eAAe,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI;IAOnD,OAAO,KAAK,eAAe,GAE1B;IAED,OAAO,KAAK,YAAY,GAEvB;IAEY,aAAa,CACxB,OAAO,GAAE;QACP,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,oEAAoE;QACpE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,IAAI,CAAC;IA2pBhB;;;;OAIG;YACW,gBAAgB;IAkF9B;;;OAGG;YACW,sBAAsB;IA+DpC;;OAEG;YACW,uBAAuB;IA2DrC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;CAkC7B"}
|
|
@@ -15,8 +15,9 @@ export class AIManager {
|
|
|
15
15
|
this.abortController = null;
|
|
16
16
|
this.toolAbortController = null;
|
|
17
17
|
this.consecutiveCompactionFailures = 0;
|
|
18
|
+
/** Tracks which deferred tools have been discovered via ToolSearch */
|
|
19
|
+
this.discoveredTools = new Set();
|
|
18
20
|
this.isCompacting = false;
|
|
19
|
-
this.workdir = options.workdir;
|
|
20
21
|
this.systemPrompt = options.systemPrompt;
|
|
21
22
|
this.subagentType = options.subagentType; // Store subagent type
|
|
22
23
|
this.stream = options.stream ?? true; // Default to true if not specified
|
|
@@ -81,7 +82,15 @@ export class AIManager {
|
|
|
81
82
|
return this.configurationService.resolveAutoMemoryEnabled();
|
|
82
83
|
}
|
|
83
84
|
getWorkdir() {
|
|
84
|
-
return this.
|
|
85
|
+
return this.container.get("Workdir") ?? process.cwd();
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Update the working directory mid-session (e.g., when entering/exiting a worktree).
|
|
89
|
+
* Also updates process.chdir() so bash commands use the new directory.
|
|
90
|
+
*/
|
|
91
|
+
setWorkdir(newWorkdir) {
|
|
92
|
+
this.container.register("Workdir", newWorkdir);
|
|
93
|
+
process.chdir(newWorkdir);
|
|
85
94
|
}
|
|
86
95
|
/**
|
|
87
96
|
* Get filtered tool configuration based on tools list
|
|
@@ -95,8 +104,9 @@ export class AIManager {
|
|
|
95
104
|
return this.toolManager.getToolsConfig({
|
|
96
105
|
availableSubagents,
|
|
97
106
|
availableSkills,
|
|
98
|
-
workdir: this.
|
|
107
|
+
workdir: this.getWorkdir(),
|
|
99
108
|
isSubagent: !!this.subagentType,
|
|
109
|
+
discoveredTools: this.discoveredTools,
|
|
100
110
|
});
|
|
101
111
|
}
|
|
102
112
|
setIsLoading(isLoading) {
|
|
@@ -134,7 +144,7 @@ export class AIManager {
|
|
|
134
144
|
.find((plugin) => plugin.name === toolName);
|
|
135
145
|
if (toolPlugin?.formatCompactParams) {
|
|
136
146
|
const context = {
|
|
137
|
-
workdir: this.
|
|
147
|
+
workdir: this.getWorkdir(),
|
|
138
148
|
taskManager: this.taskManager,
|
|
139
149
|
};
|
|
140
150
|
return toolPlugin.formatCompactParams(toolArgs, context);
|
|
@@ -211,7 +221,7 @@ export class AIManager {
|
|
|
211
221
|
break;
|
|
212
222
|
}
|
|
213
223
|
// 2. Working directory
|
|
214
|
-
contextParts.push(`\n\n[Working Directory]\nCurrent working directory: ${this.
|
|
224
|
+
contextParts.push(`\n\n[Working Directory]\nCurrent working directory: ${this.getWorkdir()}`);
|
|
215
225
|
// 3. Plan mode context
|
|
216
226
|
const currentMode = this.permissionManager?.getCurrentEffectiveMode(this.getModelConfig().permissionMode);
|
|
217
227
|
if (currentMode === "plan") {
|
|
@@ -431,8 +441,8 @@ export class AIManager {
|
|
|
431
441
|
}
|
|
432
442
|
let autoMemoryOptions;
|
|
433
443
|
if (this.getAutoMemoryEnabled()) {
|
|
434
|
-
const directory = this.memoryService.getAutoMemoryDirectory(this.
|
|
435
|
-
const content = await this.memoryService.getAutoMemoryContent(this.
|
|
444
|
+
const directory = this.memoryService.getAutoMemoryDirectory(this.getWorkdir());
|
|
445
|
+
const content = await this.memoryService.getAutoMemoryContent(this.getWorkdir());
|
|
436
446
|
autoMemoryOptions = { directory, content };
|
|
437
447
|
}
|
|
438
448
|
// Call AI service with streaming callbacks if enabled
|
|
@@ -442,11 +452,11 @@ export class AIManager {
|
|
|
442
452
|
messages: recentMessages,
|
|
443
453
|
sessionId: this.messageManager.getSessionId(),
|
|
444
454
|
abortSignal: abortController.signal,
|
|
445
|
-
workdir: this.
|
|
455
|
+
workdir: this.getWorkdir(), // Pass working directory
|
|
446
456
|
tools: toolsConfig, // Pass filtered tool configuration
|
|
447
457
|
model: model, // Use passed model
|
|
448
458
|
systemPrompt: buildSystemPrompt(this.systemPrompt, filteredToolPlugins, {
|
|
449
|
-
workdir: this.
|
|
459
|
+
workdir: this.getWorkdir(),
|
|
450
460
|
memory: combinedMemory,
|
|
451
461
|
language: this.getLanguage(),
|
|
452
462
|
isSubagent: !!this.subagentType,
|
|
@@ -649,7 +659,7 @@ export class AIManager {
|
|
|
649
659
|
const context = {
|
|
650
660
|
abortSignal: toolAbortController.signal,
|
|
651
661
|
backgroundTaskManager: this.backgroundTaskManager,
|
|
652
|
-
workdir: this.
|
|
662
|
+
workdir: this.getWorkdir(),
|
|
653
663
|
messageId: this.messageManager.getMessages().slice(-1)[0]?.id,
|
|
654
664
|
sessionId: this.messageManager.getSessionId(),
|
|
655
665
|
toolCallId: toolId,
|
|
@@ -695,6 +705,10 @@ export class AIManager {
|
|
|
695
705
|
});
|
|
696
706
|
// Execute PostToolUse hooks after successful tool completion
|
|
697
707
|
await this.executePostToolUseHooks(toolId, toolName, toolArgs, toolResult);
|
|
708
|
+
// Track discovered tools from ToolSearch results
|
|
709
|
+
if (toolName === "ToolSearch" && toolResult.success) {
|
|
710
|
+
this.trackDiscoveredTools(toolResult.content);
|
|
711
|
+
}
|
|
698
712
|
}
|
|
699
713
|
catch (toolError) {
|
|
700
714
|
const errorMessage = toolError instanceof Error
|
|
@@ -887,11 +901,11 @@ export class AIManager {
|
|
|
887
901
|
const hookName = this.subagentType ? "SubagentStop" : "Stop";
|
|
888
902
|
const context = {
|
|
889
903
|
event: hookName,
|
|
890
|
-
projectDir: this.
|
|
904
|
+
projectDir: this.getWorkdir(),
|
|
891
905
|
timestamp: new Date(),
|
|
892
906
|
sessionId: this.messageManager.getSessionId(),
|
|
893
907
|
transcriptPath: this.messageManager.getTranscriptPath(),
|
|
894
|
-
cwd: this.
|
|
908
|
+
cwd: this.getWorkdir(),
|
|
895
909
|
subagentType: this.subagentType, // Include subagent type in hook context
|
|
896
910
|
// Stop hooks don't need toolName, toolInput, toolResponse, or userPrompt
|
|
897
911
|
env: Object.fromEntries(Object.entries(process.env).filter((e) => e[1] !== undefined)), // Include environment variables
|
|
@@ -923,7 +937,7 @@ export class AIManager {
|
|
|
923
937
|
if (autoMemoryService) {
|
|
924
938
|
// Trigger extraction, but don't block the return.
|
|
925
939
|
// onTurnEnd itself returns quickly after forking.
|
|
926
|
-
autoMemoryService.onTurnEnd(this.
|
|
940
|
+
autoMemoryService.onTurnEnd(this.getWorkdir()).catch((err) => {
|
|
927
941
|
logger?.error("Auto-memory extraction trigger failed:", err);
|
|
928
942
|
});
|
|
929
943
|
}
|
|
@@ -946,12 +960,12 @@ export class AIManager {
|
|
|
946
960
|
try {
|
|
947
961
|
const context = {
|
|
948
962
|
event: "PreToolUse",
|
|
949
|
-
projectDir: this.
|
|
963
|
+
projectDir: this.getWorkdir(),
|
|
950
964
|
timestamp: new Date(),
|
|
951
965
|
toolName,
|
|
952
966
|
sessionId: this.messageManager.getSessionId(),
|
|
953
967
|
transcriptPath: this.messageManager.getTranscriptPath(),
|
|
954
|
-
cwd: this.
|
|
968
|
+
cwd: this.getWorkdir(),
|
|
955
969
|
toolInput,
|
|
956
970
|
subagentType: this.subagentType, // Include subagent type in hook context
|
|
957
971
|
env: Object.fromEntries(Object.entries(process.env).filter((e) => e[1] !== undefined)), // Include environment variables
|
|
@@ -991,12 +1005,12 @@ export class AIManager {
|
|
|
991
1005
|
try {
|
|
992
1006
|
const context = {
|
|
993
1007
|
event: "PostToolUse",
|
|
994
|
-
projectDir: this.
|
|
1008
|
+
projectDir: this.getWorkdir(),
|
|
995
1009
|
timestamp: new Date(),
|
|
996
1010
|
toolName,
|
|
997
1011
|
sessionId: this.messageManager.getSessionId(),
|
|
998
1012
|
transcriptPath: this.messageManager.getTranscriptPath(),
|
|
999
|
-
cwd: this.
|
|
1013
|
+
cwd: this.getWorkdir(),
|
|
1000
1014
|
toolInput,
|
|
1001
1015
|
toolResponse,
|
|
1002
1016
|
subagentType: this.subagentType, // Include subagent type in hook context
|
|
@@ -1023,4 +1037,42 @@ export class AIManager {
|
|
|
1023
1037
|
logger?.error("PostToolUse hook execution failed:", error);
|
|
1024
1038
|
}
|
|
1025
1039
|
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Parse ToolSearch result content to extract discovered tool names.
|
|
1042
|
+
* ToolSearch returns content like "ToolName: description\nParameters: {...}"
|
|
1043
|
+
* or shortResult like "Discovered tools: ToolA, ToolB".
|
|
1044
|
+
*/
|
|
1045
|
+
trackDiscoveredTools(content) {
|
|
1046
|
+
// Try to extract tool names from shortResult-style content
|
|
1047
|
+
const discoveredMatch = content.match(/Discovered tools?: ([\w-, ]+)/);
|
|
1048
|
+
if (discoveredMatch) {
|
|
1049
|
+
const names = discoveredMatch[1]
|
|
1050
|
+
.split(",")
|
|
1051
|
+
.map((n) => n.trim())
|
|
1052
|
+
.filter(Boolean);
|
|
1053
|
+
for (const name of names) {
|
|
1054
|
+
this.discoveredTools.add(name);
|
|
1055
|
+
}
|
|
1056
|
+
logger?.debug("Discovered tools:", names);
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1059
|
+
// Fallback: extract tool names from "ToolName: description" pattern
|
|
1060
|
+
const lines = content.split("\n");
|
|
1061
|
+
const nonToolKeywords = new Set([
|
|
1062
|
+
"parameters",
|
|
1063
|
+
"description",
|
|
1064
|
+
"result",
|
|
1065
|
+
"error",
|
|
1066
|
+
"content",
|
|
1067
|
+
"type",
|
|
1068
|
+
"properties",
|
|
1069
|
+
"required",
|
|
1070
|
+
]);
|
|
1071
|
+
for (const line of lines) {
|
|
1072
|
+
const toolMatch = line.match(/^([\w-]+):/);
|
|
1073
|
+
if (toolMatch && !nonToolKeywords.has(toolMatch[1].toLowerCase())) {
|
|
1074
|
+
this.discoveredTools.add(toolMatch[1]);
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1026
1078
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hookManager.d.ts","sourceRoot":"","sources":["../../src/managers/hookManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EAItB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAA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block
|
|
258
258
|
messageManager.addErrorBlock(errorMessage);
|
|
259
259
|
return { shouldBlock: false };
|
|
260
|
+
case "WorktreeRemove":
|
|
261
|
+
// Non-blocking for cleanup, log error but don't block
|
|
262
|
+
messageManager.addErrorBlock(errorMessage);
|
|
263
|
+
return { shouldBlock: false };
|
|
260
264
|
case "SessionStart":
|
|
261
265
|
// Non-blocking for startup, show error in error block
|
|
262
266
|
messageManager.addErrorBlock(errorMessage);
|
|
@@ -420,6 +424,7 @@ export class HookManager {
|
|
|
420
424
|
event === "Stop" ||
|
|
421
425
|
event === "SubagentStop" ||
|
|
422
426
|
event === "WorktreeCreate" ||
|
|
427
|
+
event === "WorktreeRemove" ||
|
|
423
428
|
event === "SessionStart" ||
|
|
424
429
|
event === "SessionEnd") &&
|
|
425
430
|
context.toolName !== undefined) {
|
|
@@ -472,6 +477,7 @@ export class HookManager {
|
|
|
472
477
|
event === "Stop" ||
|
|
473
478
|
event === "SubagentStop" ||
|
|
474
479
|
event === "WorktreeCreate" ||
|
|
480
|
+
event === "WorktreeRemove" ||
|
|
475
481
|
event === "SessionStart" ||
|
|
476
482
|
event === "SessionEnd") {
|
|
477
483
|
return true;
|
|
@@ -516,6 +522,7 @@ export class HookManager {
|
|
|
516
522
|
event === "Stop" ||
|
|
517
523
|
event === "SubagentStop" ||
|
|
518
524
|
event === "WorktreeCreate" ||
|
|
525
|
+
event === "WorktreeRemove" ||
|
|
519
526
|
event === "SessionStart" ||
|
|
520
527
|
event === "SessionEnd") &&
|
|
521
528
|
config.matcher) {
|
|
@@ -546,6 +553,7 @@ export class HookManager {
|
|
|
546
553
|
SubagentStop: 0,
|
|
547
554
|
PermissionRequest: 0,
|
|
548
555
|
WorktreeCreate: 0,
|
|
556
|
+
WorktreeRemove: 0,
|
|
549
557
|
SessionStart: 0,
|
|
550
558
|
SessionEnd: 0,
|
|
551
559
|
},
|
|
@@ -559,6 +567,7 @@ export class HookManager {
|
|
|
559
567
|
SubagentStop: 0,
|
|
560
568
|
PermissionRequest: 0,
|
|
561
569
|
WorktreeCreate: 0,
|
|
570
|
+
WorktreeRemove: 0,
|
|
562
571
|
SessionStart: 0,
|
|
563
572
|
SessionEnd: 0,
|
|
564
573
|
};
|
|
@@ -3,11 +3,13 @@ import type { ToolPlugin, ToolResult, ToolContext } from "../tools/types.js";
|
|
|
3
3
|
import { Container } from "../utils/container.js";
|
|
4
4
|
import type { Logger, McpServerConfig, McpConfig, McpTool, McpServerStatus } from "../types/index.js";
|
|
5
5
|
export interface McpManagerCallbacks {
|
|
6
|
-
|
|
6
|
+
onMcpServersChange?: (servers: McpServerStatus[]) => void;
|
|
7
7
|
}
|
|
8
8
|
export interface McpManagerOptions {
|
|
9
9
|
callbacks?: McpManagerCallbacks;
|
|
10
10
|
logger?: Logger;
|
|
11
|
+
/** Pre-configured MCP servers passed from constructor options */
|
|
12
|
+
mcpServers?: Record<string, McpServerConfig>;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Expand environment variables in a string value.
|
|
@@ -26,6 +28,7 @@ export declare class McpManager {
|
|
|
26
28
|
private configPath;
|
|
27
29
|
private workdir;
|
|
28
30
|
private callbacks;
|
|
31
|
+
private mcpServers;
|
|
29
32
|
constructor(container: Container, options?: McpManagerOptions);
|
|
30
33
|
/**
|
|
31
34
|
* Initialize MCP manager with working directory and optionally auto-connect
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpManager.d.ts","sourceRoot":"","sources":["../../src/managers/mcpManager.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EACV,MAAM,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAQ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