wave-agent-sdk 0.19.5 → 0.19.6
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/dist/agent.d.ts +21 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +21 -0
- package/dist/managers/aiManager.d.ts +14 -1
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +39 -2
- package/dist/managers/backgroundTaskManager.d.ts +1 -1
- package/dist/managers/backgroundTaskManager.d.ts.map +1 -1
- package/dist/managers/backgroundTaskManager.js +4 -3
- package/dist/managers/bangManager.d.ts.map +1 -1
- package/dist/managers/bangManager.js +2 -1
- package/dist/managers/messageManager.d.ts +7 -0
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +64 -5
- package/dist/managers/messageQueue.d.ts +8 -0
- package/dist/managers/messageQueue.d.ts.map +1 -1
- package/dist/managers/messageQueue.js +13 -0
- package/dist/managers/permissionManager.d.ts.map +1 -1
- package/dist/managers/permissionManager.js +3 -3
- package/dist/managers/subagentManager.d.ts.map +1 -1
- package/dist/managers/subagentManager.js +7 -1
- package/dist/prompts/index.d.ts +3 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +2 -4
- package/dist/services/hook.d.ts.map +1 -1
- package/dist/services/hook.js +6 -0
- package/dist/tools/bashTool.d.ts.map +1 -1
- package/dist/tools/bashTool.js +7 -5
- package/dist/tools/enterWorktreeTool.d.ts.map +1 -1
- package/dist/tools/enterWorktreeTool.js +3 -8
- package/dist/tools/exitWorktreeTool.d.ts.map +1 -1
- package/dist/tools/exitWorktreeTool.js +5 -8
- package/dist/types/hooks.d.ts +2 -0
- package/dist/types/hooks.d.ts.map +1 -1
- package/dist/types/messaging.d.ts +2 -0
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/utils/containerSetup.d.ts.map +1 -1
- package/dist/utils/containerSetup.js +3 -0
- package/dist/utils/shellResolver.d.ts.map +1 -1
- package/dist/utils/shellResolver.js +156 -7
- package/dist/utils/worktreeSession.d.ts +6 -6
- package/dist/utils/worktreeSession.d.ts.map +1 -1
- package/dist/utils/worktreeSession.js +7 -11
- package/package.json +1 -1
- package/src/agent.ts +31 -0
- package/src/managers/aiManager.ts +49 -2
- package/src/managers/backgroundTaskManager.ts +4 -2
- package/src/managers/bangManager.ts +2 -1
- package/src/managers/messageManager.ts +72 -6
- package/src/managers/messageQueue.ts +17 -0
- package/src/managers/permissionManager.ts +6 -3
- package/src/managers/subagentManager.ts +13 -1
- package/src/prompts/index.ts +4 -4
- package/src/services/hook.ts +9 -0
- package/src/tools/bashTool.ts +11 -5
- package/src/tools/enterWorktreeTool.ts +4 -14
- package/src/tools/exitWorktreeTool.ts +5 -13
- package/src/types/hooks.ts +2 -0
- package/src/types/messaging.ts +2 -0
- package/src/utils/containerSetup.ts +4 -0
- package/src/utils/shellResolver.ts +167 -8
- package/src/utils/worktreeSession.ts +6 -16
package/dist/prompts/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as os from "node:os";
|
|
2
2
|
import { isGitRepository } from "../utils/gitUtils.js";
|
|
3
|
-
import { getCurrentWorktreeSession } from "../utils/worktreeSession.js";
|
|
4
3
|
import { buildAutoMemoryPrompt } from "./autoMemory.js";
|
|
5
4
|
import { EXPLORE_SUBAGENT_TYPE, PLAN_SUBAGENT_TYPE, } from "../constants/subagents.js";
|
|
6
5
|
import { ASK_USER_QUESTION_TOOL_NAME, EDIT_TOOL_NAME, WRITE_TOOL_NAME, EXIT_PLAN_MODE_TOOL_NAME, AGENT_TOOL_NAME, BASH_TOOL_NAME, READ_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME, } from "../constants/tools.js";
|
|
@@ -230,7 +229,7 @@ export function buildSystemPrompt(basePrompt, tools, options = {}) {
|
|
|
230
229
|
: shell.includes("bash")
|
|
231
230
|
? "bash"
|
|
232
231
|
: shell;
|
|
233
|
-
const worktreeSession =
|
|
232
|
+
const worktreeSession = options.worktreeSession;
|
|
234
233
|
dynamicText += `
|
|
235
234
|
|
|
236
235
|
Here is useful information about the environment you are running in:
|
|
@@ -255,7 +254,7 @@ Today's date: ${today}
|
|
|
255
254
|
}
|
|
256
255
|
return blocks;
|
|
257
256
|
}
|
|
258
|
-
export function enhanceSystemPromptWithEnvDetails(existingSystemPrompt, workdir, originalWorkdir) {
|
|
257
|
+
export function enhanceSystemPromptWithEnvDetails(existingSystemPrompt, workdir, originalWorkdir, worktreeSession) {
|
|
259
258
|
const isGitRepo = isGitRepository(workdir);
|
|
260
259
|
const platform = os.platform();
|
|
261
260
|
const osVersion = `${os.type()} ${os.release()}`;
|
|
@@ -266,7 +265,6 @@ export function enhanceSystemPromptWithEnvDetails(existingSystemPrompt, workdir,
|
|
|
266
265
|
: shell.includes("bash")
|
|
267
266
|
? "bash"
|
|
268
267
|
: shell;
|
|
269
|
-
const worktreeSession = getCurrentWorktreeSession();
|
|
270
268
|
const notes = `Notes:
|
|
271
269
|
- Agent threads always have their cwd reset between bash calls, as a result please only use absolute file paths.${worktreeSession ? `\n- You are in a git worktree at ${worktreeSession.worktreePath} (branch: ${worktreeSession.worktreeBranch}). Absolute paths from prior context may refer to the original repo at ${worktreeSession.originalCwd}; translate them to your worktree. Do NOT edit files outside this worktree.` : ""}
|
|
272
270
|
- In your final response, share file paths (always absolute, never relative) that are relevant to the task. Include code snippets only when the exact text is load-bearing (e.g., a bug you found, a function signature the caller asked for) — do not recap code you merely read.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/services/hook.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAElC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/services/hook.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAElC,MAAM,mBAAmB,CAAC;AAuH3B;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,GAAG,4BAA4B,EAC5D,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CA6I9B;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,EAAE,oBAAoB,GAAG,4BAA4B,EAC5D,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAchC;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAMhC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAsBtD"}
|
package/dist/services/hook.js
CHANGED
|
@@ -89,6 +89,12 @@ async function buildHookJsonInput(context) {
|
|
|
89
89
|
jsonInput.background_tasks = context.backgroundTasks ?? [];
|
|
90
90
|
jsonInput.session_crons = context.sessionCrons ?? [];
|
|
91
91
|
}
|
|
92
|
+
// Add last_assistant_message for Stop and SubagentStop events.
|
|
93
|
+
// Omitted when undefined (no text content in last assistant message).
|
|
94
|
+
if ((context.event === "Stop" || context.event === "SubagentStop") &&
|
|
95
|
+
context.lastAssistantMessage !== undefined) {
|
|
96
|
+
jsonInput.last_assistant_message = context.lastAssistantMessage;
|
|
97
|
+
}
|
|
92
98
|
return jsonInput;
|
|
93
99
|
}
|
|
94
100
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bashTool.d.ts","sourceRoot":"","sources":["../../src/tools/bashTool.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AA0CtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"bashTool.d.ts","sourceRoot":"","sources":["../../src/tools/bashTool.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AA0CtE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,UAojBtB,CAAC"}
|
package/dist/tools/bashTool.js
CHANGED
|
@@ -152,13 +152,15 @@ The working directory persists between commands. Try to maintain your current wo
|
|
|
152
152
|
error: "Command parameter is required and must be a string",
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
// Resolve shell path: on Windows, use Git Bash; on
|
|
155
|
+
// Resolve shell path: on Windows, use Git Bash; on macOS/Linux, use bash or zsh
|
|
156
156
|
const shellPath = resolveShellPath();
|
|
157
|
-
if (
|
|
157
|
+
if (!shellPath) {
|
|
158
158
|
return {
|
|
159
159
|
success: false,
|
|
160
160
|
content: "",
|
|
161
|
-
error:
|
|
161
|
+
error: process.platform === "win32"
|
|
162
|
+
? "Git Bash not found. Please install Git for Windows or set WAVE_GIT_BASH_PATH environment variable."
|
|
163
|
+
: "No suitable shell found. Please ensure bash or zsh is installed, or set WAVE_SHELL environment variable.",
|
|
162
164
|
};
|
|
163
165
|
}
|
|
164
166
|
// Validate timeout
|
|
@@ -207,7 +209,7 @@ The working directory persists between commands. Try to maintain your current wo
|
|
|
207
209
|
error: "Background task manager not available",
|
|
208
210
|
};
|
|
209
211
|
}
|
|
210
|
-
const { id: taskId } = backgroundTaskManager.startShell(command);
|
|
212
|
+
const { id: taskId } = backgroundTaskManager.startShell(command, undefined, context.workdir);
|
|
211
213
|
const task = backgroundTaskManager.getTask(taskId);
|
|
212
214
|
const outputPath = task?.outputPath;
|
|
213
215
|
const backgroundMsg = [
|
|
@@ -230,7 +232,7 @@ The working directory persists between commands. Try to maintain your current wo
|
|
|
230
232
|
const tempCwdFileForBash = toPosixPath(tempCwdFile);
|
|
231
233
|
const wrappedCommand = wrapCommandForCwdTracking(command, tempCwdFileForBash);
|
|
232
234
|
const child = spawn(wrappedCommand, {
|
|
233
|
-
shell: shellPath
|
|
235
|
+
shell: shellPath,
|
|
234
236
|
stdio: "pipe",
|
|
235
237
|
detached: true,
|
|
236
238
|
cwd: context.workdir,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enterWorktreeTool.d.ts","sourceRoot":"","sources":["../../src/tools/enterWorktreeTool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"enterWorktreeTool.d.ts","sourceRoot":"","sources":["../../src/tools/enterWorktreeTool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAWtE,eAAO,MAAM,0BAA0B,qxCA0BtC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,UA+H/B,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* EnterWorktree tool - creates an isolated git worktree and switches the session into it.
|
|
3
3
|
* Mirrors Claude Code's EnterWorktree tool behavior and prompt.
|
|
4
4
|
*/
|
|
5
|
-
import { getCurrentWorktreeSession, setCurrentWorktreeSession, } from "../utils/worktreeSession.js";
|
|
6
5
|
import { createWorktree, validateWorktreeName, generateWorktreeName, } from "../utils/worktreeUtils.js";
|
|
7
6
|
import { getGitMainRepoRoot } from "../utils/gitUtils.js";
|
|
8
7
|
import { ENTER_WORKTREE_TOOL_NAME } from "../constants/tools.js";
|
|
@@ -55,7 +54,7 @@ export const enterWorktreeTool = {
|
|
|
55
54
|
prompt: () => ENTER_WORKTREE_TOOL_PROMPT,
|
|
56
55
|
async execute(args, context) {
|
|
57
56
|
// Validate not already in a worktree created by this session
|
|
58
|
-
if (
|
|
57
|
+
if (context.aiManager?.getWorktreeSession()) {
|
|
59
58
|
return {
|
|
60
59
|
success: false,
|
|
61
60
|
content: "Already in a worktree session. Use ExitWorktree to leave before creating a new one.",
|
|
@@ -95,16 +94,12 @@ export const enterWorktreeTool = {
|
|
|
95
94
|
repoRoot: worktreeInfo.repoRoot,
|
|
96
95
|
originalHeadCommit: worktreeInfo.originalHeadCommit,
|
|
97
96
|
};
|
|
98
|
-
// Set
|
|
99
|
-
setCurrentWorktreeSession(session);
|
|
100
|
-
// Update CWD via AIManager
|
|
97
|
+
// Set per-session worktree state and update CWD via AIManager
|
|
101
98
|
const aiManager = context.aiManager;
|
|
102
99
|
if (aiManager) {
|
|
100
|
+
aiManager.setWorktreeSession(session);
|
|
103
101
|
aiManager.setWorkdir(worktreeInfo.path);
|
|
104
102
|
}
|
|
105
|
-
// Also update the container's Workdir entry
|
|
106
|
-
// (Container is not directly accessible from ToolContext, but AIManager.setWorkdir
|
|
107
|
-
// handles both its internal field and process.chdir)
|
|
108
103
|
// Trigger WorktreeCreate hook if worktree is new
|
|
109
104
|
let hookTriggered = false;
|
|
110
105
|
if (session.isNew && context.hookManager) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exitWorktreeTool.d.ts","sourceRoot":"","sources":["../../src/tools/exitWorktreeTool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"exitWorktreeTool.d.ts","sourceRoot":"","sources":["../../src/tools/exitWorktreeTool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA2B,MAAM,YAAY,CAAC;AAQtE,eAAO,MAAM,yBAAyB,gvDA4BrC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UA6L9B,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* ExitWorktree tool - exits a worktree session and returns to the original directory.
|
|
3
3
|
* Mirrors Claude Code's ExitWorktree tool behavior and prompt.
|
|
4
4
|
*/
|
|
5
|
-
import { getCurrentWorktreeSession, setCurrentWorktreeSession, } from "../utils/worktreeSession.js";
|
|
6
5
|
import { removeWorktree, countWorktreeChanges, } from "../utils/worktreeUtils.js";
|
|
7
6
|
import { EXIT_WORKTREE_TOOL_NAME } from "../constants/tools.js";
|
|
8
7
|
import { logger } from "../utils/globalLogger.js";
|
|
@@ -70,8 +69,8 @@ export const exitWorktreeTool = {
|
|
|
70
69
|
error: 'Missing required parameter: "action"',
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
|
-
// Validate: must be in an active worktree session
|
|
74
|
-
const session =
|
|
72
|
+
// Validate: must be in an active worktree session (for this session)
|
|
73
|
+
const session = context.aiManager?.getWorktreeSession();
|
|
75
74
|
if (!session) {
|
|
76
75
|
return {
|
|
77
76
|
success: false,
|
|
@@ -109,10 +108,9 @@ export const exitWorktreeTool = {
|
|
|
109
108
|
const { originalCwd, worktreePath, worktreeBranch } = session;
|
|
110
109
|
if (action === "keep") {
|
|
111
110
|
// Clear session state
|
|
112
|
-
setCurrentWorktreeSession(null);
|
|
113
|
-
// Restore CWD
|
|
114
111
|
const aiManager = context.aiManager;
|
|
115
112
|
if (aiManager) {
|
|
113
|
+
aiManager.setWorktreeSession(null);
|
|
116
114
|
aiManager.setWorkdir(originalCwd);
|
|
117
115
|
}
|
|
118
116
|
return {
|
|
@@ -131,11 +129,10 @@ export const exitWorktreeTool = {
|
|
|
131
129
|
// Count changes BEFORE removing the worktree (directory will be gone after)
|
|
132
130
|
const summary = countWorktreeChanges(worktreePath, session.originalHeadCommit) ?? { changedFiles: 0, commits: 0 };
|
|
133
131
|
removeWorktree(worktreeInfo);
|
|
134
|
-
// Clear session state
|
|
135
|
-
setCurrentWorktreeSession(null);
|
|
136
|
-
// Restore CWD
|
|
132
|
+
// Clear session state and restore CWD
|
|
137
133
|
const aiManager = context.aiManager;
|
|
138
134
|
if (aiManager) {
|
|
135
|
+
aiManager.setWorktreeSession(null);
|
|
139
136
|
aiManager.setWorkdir(originalCwd);
|
|
140
137
|
}
|
|
141
138
|
// Trigger WorktreeRemove hook (non-blocking)
|
package/dist/types/hooks.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ export interface HookJsonInput {
|
|
|
81
81
|
compact_summary?: string;
|
|
82
82
|
background_tasks?: BackgroundTaskInfo[];
|
|
83
83
|
session_crons?: SessionCronInfo[];
|
|
84
|
+
last_assistant_message?: string;
|
|
84
85
|
}
|
|
85
86
|
export interface BackgroundTaskInfo {
|
|
86
87
|
id: string;
|
|
@@ -116,6 +117,7 @@ export interface ExtendedHookExecutionContext extends HookExecutionContext {
|
|
|
116
117
|
compactSummary?: string;
|
|
117
118
|
backgroundTasks?: BackgroundTaskInfo[];
|
|
118
119
|
sessionCrons?: SessionCronInfo[];
|
|
120
|
+
lastAssistantMessage?: string;
|
|
119
121
|
}
|
|
120
122
|
export interface HookEnvironment {
|
|
121
123
|
WAVE_PROJECT_DIR: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/types/hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,SAAS,GACjB,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,MAAM,GACN,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,aAAa,CAAC;AAGlB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IA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iBAAiB,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAClD,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,0BAA0B,GACvC,SAAS,CAsTX"}
|
|
@@ -42,6 +42,9 @@ export function setupAgentContainer(setupOptions) {
|
|
|
42
42
|
container.register("WorktreeName", options.worktreeName);
|
|
43
43
|
container.register("MainRepoRoot", getGitMainRepoRoot(workdir));
|
|
44
44
|
}
|
|
45
|
+
// Per-agent worktree session state (EnterWorktree/ExitWorktree). Stored in the
|
|
46
|
+
// container so it is isolated per session, not shared process-wide.
|
|
47
|
+
container.register("WorktreeSession", null);
|
|
45
48
|
const notificationQueue = new NotificationQueue();
|
|
46
49
|
container.register("NotificationQueue", notificationQueue);
|
|
47
50
|
const messageQueue = new MessageQueue();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shellResolver.d.ts","sourceRoot":"","sources":["../../src/utils/shellResolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shellResolver.d.ts","sourceRoot":"","sources":["../../src/utils/shellResolver.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,UAGlC,CAAC;AAgLF,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAMrD"}
|
|
@@ -1,25 +1,174 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { execFileSync } from "child_process";
|
|
2
4
|
export const WINDOWS_GIT_BASH_PATHS = [
|
|
3
5
|
"C:\\Program Files\\Git\\bin\\bash.exe",
|
|
4
6
|
"C:\\Program Files (x86)\\Git\\bin\\bash.exe",
|
|
5
7
|
];
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
// Common git.exe locations (checked before falling back to `where.exe`).
|
|
9
|
+
const WINDOWS_GIT_EXE_PATHS = [
|
|
10
|
+
"C:\\Program Files\\Git\\cmd\\git.exe",
|
|
11
|
+
"C:\\Program Files (x86)\\Git\\cmd\\git.exe",
|
|
12
|
+
];
|
|
13
|
+
// Common directories where bash/zsh may live, used as fallback after PATH lookup.
|
|
14
|
+
const FIXED_SHELL_DIRS = [
|
|
15
|
+
"/bin",
|
|
16
|
+
"/usr/bin",
|
|
17
|
+
"/usr/local/bin",
|
|
18
|
+
"/opt/homebrew/bin",
|
|
19
|
+
];
|
|
20
|
+
function isExecutable(shellPath) {
|
|
21
|
+
try {
|
|
22
|
+
fs.accessSync(shellPath, fs.constants.X_OK);
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** Resolve a command name (e.g. "bash") to an absolute path by searching $PATH. */
|
|
30
|
+
function which(command) {
|
|
31
|
+
const pathEnv = process.env.PATH;
|
|
32
|
+
if (!pathEnv)
|
|
33
|
+
return undefined;
|
|
34
|
+
for (const dir of pathEnv.split(":")) {
|
|
35
|
+
if (!dir)
|
|
36
|
+
continue;
|
|
37
|
+
const candidate = path.join(dir, command);
|
|
38
|
+
if (isExecutable(candidate)) {
|
|
39
|
+
return candidate;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
function isSupportedShell(shellPath) {
|
|
45
|
+
return shellPath.includes("bash") || shellPath.includes("zsh");
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Locate the `git` executable on Windows, then infer bash.exe from it.
|
|
49
|
+
* Checks common Git for Windows install locations first, then falls back
|
|
50
|
+
* to `where.exe git` (aligned with Claude Code's findExecutable('git')).
|
|
51
|
+
* Returns the inferred bash.exe path, or undefined if not found.
|
|
52
|
+
*/
|
|
53
|
+
function inferGitBashFromGit() {
|
|
54
|
+
// 1. Common git.exe locations
|
|
55
|
+
let gitExe;
|
|
56
|
+
for (const candidate of WINDOWS_GIT_EXE_PATHS) {
|
|
57
|
+
if (fs.existsSync(candidate)) {
|
|
58
|
+
gitExe = candidate;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// 2. Fallback: where.exe git
|
|
63
|
+
if (!gitExe) {
|
|
64
|
+
try {
|
|
65
|
+
const result = execFileSync("where", ["git"], {
|
|
66
|
+
stdio: "pipe",
|
|
67
|
+
encoding: "utf8",
|
|
68
|
+
timeout: 3000,
|
|
69
|
+
}).trim();
|
|
70
|
+
// where.exe may return multiple lines; take the first non-empty one.
|
|
71
|
+
gitExe = result.split(/\r?\n/).find((line) => line.trim()) || undefined;
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
gitExe = undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (!gitExe)
|
|
8
78
|
return undefined;
|
|
79
|
+
// git.exe is at <install>/cmd/git.exe → bash.exe is at <install>/bin/bash.exe
|
|
80
|
+
// join treats git.exe as a segment, so ".." cancels it (→ cmd dir),
|
|
81
|
+
// the second ".." cancels cmd (→ <install>), then bin/bash.exe.
|
|
82
|
+
const bashPath = path.win32.join(gitExe, "..", "..", "bin", "bash.exe");
|
|
83
|
+
if (fs.existsSync(bashPath)) {
|
|
84
|
+
return bashPath;
|
|
85
|
+
}
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Resolve a bash or zsh binary on macOS/Linux.
|
|
90
|
+
*
|
|
91
|
+
* Priority (aligned with Claude Code's findSuitableShell):
|
|
92
|
+
* 1. WAVE_SHELL env var (only if it points to an executable bash/zsh)
|
|
93
|
+
* 2. $SHELL (only if it is bash/zsh)
|
|
94
|
+
* 3. `which bash` / `which zsh` discovered on $PATH
|
|
95
|
+
* 4. Common fixed locations (/bin, /usr/bin, /usr/local/bin, /opt/homebrew/bin)
|
|
96
|
+
*
|
|
97
|
+
* When $SHELL is bash, bash is preferred; otherwise zsh is preferred. This
|
|
98
|
+
* matters because /bin/sh may be dash (Debian/Ubuntu) or POSIX-mode bash
|
|
99
|
+
* (macOS), neither of which supports bashisms like process substitution
|
|
100
|
+
* `<()`, causing `eval '<()...'` to fail at parse time.
|
|
101
|
+
*/
|
|
102
|
+
function resolveUnixShell() {
|
|
103
|
+
// 1. WAVE_SHELL env override
|
|
104
|
+
const waveShell = process.env.WAVE_SHELL;
|
|
105
|
+
if (waveShell && isSupportedShell(waveShell) && isExecutable(waveShell)) {
|
|
106
|
+
return waveShell;
|
|
107
|
+
}
|
|
108
|
+
// 2. $SHELL (only bash/zsh)
|
|
109
|
+
const envShell = process.env.SHELL;
|
|
110
|
+
const isEnvShellSupported = !!envShell && isSupportedShell(envShell);
|
|
111
|
+
const preferBash = envShell?.includes("bash") ?? false;
|
|
112
|
+
// 3. Locate via PATH
|
|
113
|
+
const bashPath = which("bash");
|
|
114
|
+
const zshPath = which("zsh");
|
|
115
|
+
// 4. Fixed common locations, ordered by user preference
|
|
116
|
+
const shellOrder = preferBash ? ["bash", "zsh"] : ["zsh", "bash"];
|
|
117
|
+
const candidates = shellOrder.flatMap((shell) => FIXED_SHELL_DIRS.map((dir) => `${dir}/${shell}`));
|
|
118
|
+
// Discovered PATH paths: preferred type first, the other as fallback
|
|
119
|
+
if (preferBash) {
|
|
120
|
+
if (bashPath)
|
|
121
|
+
candidates.unshift(bashPath);
|
|
122
|
+
if (zshPath)
|
|
123
|
+
candidates.push(zshPath);
|
|
9
124
|
}
|
|
10
|
-
|
|
11
|
-
|
|
125
|
+
else {
|
|
126
|
+
if (zshPath)
|
|
127
|
+
candidates.unshift(zshPath);
|
|
128
|
+
if (bashPath)
|
|
129
|
+
candidates.push(bashPath);
|
|
12
130
|
}
|
|
131
|
+
// Always prioritize $SHELL if it is a supported, executable shell
|
|
132
|
+
if (isEnvShellSupported && envShell && isExecutable(envShell)) {
|
|
133
|
+
candidates.unshift(envShell);
|
|
134
|
+
}
|
|
135
|
+
return candidates.find((candidate) => isExecutable(candidate));
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Resolve the Git Bash path on Windows.
|
|
139
|
+
*
|
|
140
|
+
* Priority (aligned with Claude Code's findGitBashPath):
|
|
141
|
+
* 1. WAVE_GIT_BASH_PATH env var
|
|
142
|
+
* 2. Infer from `git` executable location (<git dir>/../../bin/bash.exe)
|
|
143
|
+
* 3. Common install paths (C:\Program Files\Git\bin\bash.exe, etc.)
|
|
144
|
+
*/
|
|
145
|
+
function resolveWindowsShell() {
|
|
146
|
+
// 1. Env var override
|
|
147
|
+
if (process.env.WAVE_GIT_BASH_PATH) {
|
|
148
|
+
return process.env.WAVE_GIT_BASH_PATH;
|
|
149
|
+
}
|
|
150
|
+
// 2. Infer from git executable location
|
|
151
|
+
const inferred = inferGitBashFromGit();
|
|
152
|
+
if (inferred) {
|
|
153
|
+
return inferred;
|
|
154
|
+
}
|
|
155
|
+
// 4. Common install paths
|
|
13
156
|
const paths = [
|
|
14
157
|
...WINDOWS_GIT_BASH_PATHS,
|
|
15
158
|
process.env.LOCALAPPDATA
|
|
16
159
|
? `${process.env.LOCALAPPDATA}\\Programs\\Git\\bin\\bash.exe`
|
|
17
160
|
: null,
|
|
18
161
|
].filter(Boolean);
|
|
19
|
-
for (const
|
|
20
|
-
if (fs.existsSync(
|
|
21
|
-
return
|
|
162
|
+
for (const p of paths) {
|
|
163
|
+
if (fs.existsSync(p)) {
|
|
164
|
+
return p;
|
|
22
165
|
}
|
|
23
166
|
}
|
|
24
167
|
return undefined;
|
|
25
168
|
}
|
|
169
|
+
export function resolveShellPath() {
|
|
170
|
+
if (process.platform === "win32") {
|
|
171
|
+
return resolveWindowsShell();
|
|
172
|
+
}
|
|
173
|
+
return resolveUnixShell();
|
|
174
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Analogous to Claude Code's currentWorktreeSession in worktree.ts.
|
|
2
|
+
* Worktree session state tracking.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The session state is stored per-agent in each session's DI container (see the
|
|
5
|
+
* "WorktreeSession" container slot registered in containerSetup.ts and accessed via
|
|
6
|
+
* AIManager.getWorktreeSession()/setWorktreeSession()). This keeps worktree state
|
|
7
|
+
* isolated per session in stdio multi-agent mode — a process-level singleton would
|
|
8
|
+
* leak state across concurrent sessions (see specs/047-worktree.md FR-042).
|
|
7
9
|
*/
|
|
8
10
|
export interface WorktreeSession {
|
|
9
11
|
/** The working directory the session was in before EnterWorktree */
|
|
@@ -21,6 +23,4 @@ export interface WorktreeSession {
|
|
|
21
23
|
/** The HEAD commit of the original branch at worktree creation time */
|
|
22
24
|
originalHeadCommit?: string;
|
|
23
25
|
}
|
|
24
|
-
export declare function getCurrentWorktreeSession(): WorktreeSession | null;
|
|
25
|
-
export declare function setCurrentWorktreeSession(session: WorktreeSession | null): void;
|
|
26
26
|
//# sourceMappingURL=worktreeSession.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktreeSession.d.ts","sourceRoot":"","sources":["../../src/utils/worktreeSession.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"worktreeSession.d.ts","sourceRoot":"","sources":["../../src/utils/worktreeSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,WAAW,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,KAAK,EAAE,OAAO,CAAC;IACf,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Analogous to Claude Code's currentWorktreeSession in worktree.ts.
|
|
2
|
+
* Worktree session state tracking.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The session state is stored per-agent in each session's DI container (see the
|
|
5
|
+
* "WorktreeSession" container slot registered in containerSetup.ts and accessed via
|
|
6
|
+
* AIManager.getWorktreeSession()/setWorktreeSession()). This keeps worktree state
|
|
7
|
+
* isolated per session in stdio multi-agent mode — a process-level singleton would
|
|
8
|
+
* leak state across concurrent sessions (see specs/047-worktree.md FR-042).
|
|
7
9
|
*/
|
|
8
|
-
|
|
9
|
-
export function getCurrentWorktreeSession() {
|
|
10
|
-
return currentWorktreeSession;
|
|
11
|
-
}
|
|
12
|
-
export function setCurrentWorktreeSession(session) {
|
|
13
|
-
currentWorktreeSession = session;
|
|
14
|
-
}
|
|
10
|
+
export {};
|
package/package.json
CHANGED
package/src/agent.ts
CHANGED
|
@@ -42,6 +42,7 @@ import { TaskManager } from "./services/taskManager.js";
|
|
|
42
42
|
import { btw } from "./services/aiService.js";
|
|
43
43
|
import { convertMessagesForAPI } from "./utils/convertMessagesForAPI.js";
|
|
44
44
|
import { supportsVision } from "./utils/modelCapabilities.js";
|
|
45
|
+
import type { WorktreeSession } from "./utils/worktreeSession.js";
|
|
45
46
|
import { parseTaskNotificationXml } from "./utils/notificationXml.js";
|
|
46
47
|
import { InitializationService } from "./services/initializationService.js";
|
|
47
48
|
import { InteractionService } from "./services/interactionService.js";
|
|
@@ -298,6 +299,15 @@ export class Agent {
|
|
|
298
299
|
this.options.callbacks?.onWorkdirChange?.(newCwd);
|
|
299
300
|
}
|
|
300
301
|
|
|
302
|
+
/**
|
|
303
|
+
* Set this session's worktree session state (used by CLI -w startup to inject the
|
|
304
|
+
* session created before the agent existed). Delegates to AIManager so the state is
|
|
305
|
+
* stored in this agent's own DI container.
|
|
306
|
+
*/
|
|
307
|
+
public setWorktreeSession(session: WorktreeSession | null): void {
|
|
308
|
+
this.aiManager.setWorktreeSession(session);
|
|
309
|
+
}
|
|
310
|
+
|
|
301
311
|
/** Get project memory content */
|
|
302
312
|
public get projectMemory(): string {
|
|
303
313
|
const memoryService =
|
|
@@ -389,6 +399,27 @@ export class Agent {
|
|
|
389
399
|
return removed;
|
|
390
400
|
}
|
|
391
401
|
|
|
402
|
+
/**
|
|
403
|
+
* Update a queued message's content by its ID (does not change queue order)
|
|
404
|
+
* @param id - The ID of the message to update
|
|
405
|
+
* @param patch - The fields to update
|
|
406
|
+
* @returns true if the message was updated, false if not found
|
|
407
|
+
*/
|
|
408
|
+
public updateQueuedMessageById(
|
|
409
|
+
id: string,
|
|
410
|
+
patch: {
|
|
411
|
+
content?: string;
|
|
412
|
+
images?: Array<{ path: string; mimeType: string }>;
|
|
413
|
+
type?: "message" | "bang";
|
|
414
|
+
},
|
|
415
|
+
): boolean {
|
|
416
|
+
const updated = this.messageQueue.updateById(id, patch);
|
|
417
|
+
if (updated) {
|
|
418
|
+
this.options.callbacks?.onQueuedMessagesChange?.(this.queuedMessages);
|
|
419
|
+
}
|
|
420
|
+
return updated;
|
|
421
|
+
}
|
|
422
|
+
|
|
392
423
|
/**
|
|
393
424
|
* Unified dequeue trigger — checks state machine before processing.
|
|
394
425
|
* Called from onMessageEnqueued, onLoadingChange(false), and
|