wave-agent-sdk 0.0.8 → 0.0.11
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 +92 -23
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +351 -137
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/managers/aiManager.d.ts +14 -36
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +74 -77
- package/dist/managers/backgroundBashManager.d.ts.map +1 -1
- package/dist/managers/backgroundBashManager.js +4 -3
- package/dist/managers/hookManager.d.ts +3 -8
- package/dist/managers/hookManager.d.ts.map +1 -1
- package/dist/managers/hookManager.js +39 -29
- package/dist/managers/liveConfigManager.d.ts +55 -18
- package/dist/managers/liveConfigManager.d.ts.map +1 -1
- package/dist/managers/liveConfigManager.js +372 -90
- package/dist/managers/lspManager.d.ts +43 -0
- package/dist/managers/lspManager.d.ts.map +1 -0
- package/dist/managers/lspManager.js +326 -0
- package/dist/managers/messageManager.d.ts +8 -16
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +52 -74
- package/dist/managers/permissionManager.d.ts +75 -0
- package/dist/managers/permissionManager.d.ts.map +1 -0
- package/dist/managers/permissionManager.js +368 -0
- package/dist/managers/skillManager.d.ts +1 -0
- package/dist/managers/skillManager.d.ts.map +1 -1
- package/dist/managers/skillManager.js +2 -1
- package/dist/managers/slashCommandManager.d.ts.map +1 -1
- package/dist/managers/slashCommandManager.js +0 -1
- package/dist/managers/subagentManager.d.ts +8 -23
- package/dist/managers/subagentManager.d.ts.map +1 -1
- package/dist/managers/subagentManager.js +97 -117
- package/dist/managers/toolManager.d.ts +38 -1
- package/dist/managers/toolManager.d.ts.map +1 -1
- package/dist/managers/toolManager.js +66 -2
- package/dist/services/aiService.d.ts +3 -1
- package/dist/services/aiService.d.ts.map +1 -1
- package/dist/services/aiService.js +123 -30
- package/dist/services/configurationService.d.ts +116 -0
- package/dist/services/configurationService.d.ts.map +1 -0
- package/dist/services/configurationService.js +585 -0
- package/dist/services/fileWatcher.d.ts.map +1 -1
- package/dist/services/fileWatcher.js +5 -6
- package/dist/services/hook.d.ts +7 -124
- package/dist/services/hook.d.ts.map +1 -1
- package/dist/services/hook.js +46 -458
- package/dist/services/jsonlHandler.d.ts +24 -15
- package/dist/services/jsonlHandler.d.ts.map +1 -1
- package/dist/services/jsonlHandler.js +67 -88
- package/dist/services/memory.d.ts +0 -9
- package/dist/services/memory.d.ts.map +1 -1
- package/dist/services/memory.js +2 -49
- package/dist/services/session.d.ts +82 -33
- package/dist/services/session.d.ts.map +1 -1
- package/dist/services/session.js +275 -181
- package/dist/tools/bashTool.d.ts.map +1 -1
- package/dist/tools/bashTool.js +109 -11
- package/dist/tools/deleteFileTool.d.ts.map +1 -1
- package/dist/tools/deleteFileTool.js +25 -0
- package/dist/tools/editTool.d.ts.map +1 -1
- package/dist/tools/editTool.js +30 -6
- package/dist/tools/lspTool.d.ts +6 -0
- package/dist/tools/lspTool.d.ts.map +1 -0
- package/dist/tools/lspTool.js +589 -0
- package/dist/tools/multiEditTool.d.ts.map +1 -1
- package/dist/tools/multiEditTool.js +26 -7
- package/dist/tools/readTool.d.ts.map +1 -1
- package/dist/tools/readTool.js +111 -2
- package/dist/tools/skillTool.js +2 -2
- package/dist/tools/todoWriteTool.d.ts.map +1 -1
- package/dist/tools/todoWriteTool.js +23 -0
- package/dist/tools/types.d.ts +11 -8
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/writeTool.d.ts.map +1 -1
- package/dist/tools/writeTool.js +25 -9
- package/dist/types/commands.d.ts +0 -1
- package/dist/types/commands.d.ts.map +1 -1
- package/dist/types/config.d.ts +4 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/configuration.d.ts +69 -0
- package/dist/types/configuration.d.ts.map +1 -0
- package/dist/types/configuration.js +8 -0
- package/dist/types/core.d.ts +10 -0
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/environment.d.ts +41 -0
- package/dist/types/environment.d.ts.map +1 -1
- package/dist/types/fileSearch.d.ts +5 -0
- package/dist/types/fileSearch.d.ts.map +1 -0
- package/dist/types/fileSearch.js +1 -0
- package/dist/types/hooks.d.ts +11 -2
- package/dist/types/hooks.d.ts.map +1 -1
- package/dist/types/hooks.js +1 -7
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +5 -0
- package/dist/types/lsp.d.ts +90 -0
- package/dist/types/lsp.d.ts.map +1 -0
- package/dist/types/lsp.js +4 -0
- package/dist/types/messaging.d.ts +6 -11
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/types/permissions.d.ts +39 -0
- package/dist/types/permissions.d.ts.map +1 -0
- package/dist/types/permissions.js +12 -0
- package/dist/types/session.d.ts +1 -6
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/skills.d.ts +1 -0
- package/dist/types/skills.d.ts.map +1 -1
- package/dist/types/tools.d.ts +35 -0
- package/dist/types/tools.d.ts.map +1 -0
- package/dist/types/tools.js +4 -0
- package/dist/utils/abortUtils.d.ts +34 -0
- package/dist/utils/abortUtils.d.ts.map +1 -0
- package/dist/utils/abortUtils.js +92 -0
- package/dist/utils/bashHistory.d.ts +4 -0
- package/dist/utils/bashHistory.d.ts.map +1 -1
- package/dist/utils/bashHistory.js +21 -4
- package/dist/utils/bashParser.d.ts +24 -0
- package/dist/utils/bashParser.d.ts.map +1 -0
- package/dist/utils/bashParser.js +413 -0
- package/dist/utils/builtinSubagents.d.ts +7 -0
- package/dist/utils/builtinSubagents.d.ts.map +1 -0
- package/dist/utils/builtinSubagents.js +65 -0
- package/dist/utils/cacheControlUtils.d.ts +8 -33
- package/dist/utils/cacheControlUtils.d.ts.map +1 -1
- package/dist/utils/cacheControlUtils.js +83 -126
- package/dist/utils/constants.d.ts +0 -12
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +1 -13
- package/dist/utils/convertMessagesForAPI.d.ts +2 -1
- package/dist/utils/convertMessagesForAPI.d.ts.map +1 -1
- package/dist/utils/convertMessagesForAPI.js +33 -14
- package/dist/utils/fileSearch.d.ts +14 -0
- package/dist/utils/fileSearch.d.ts.map +1 -0
- package/dist/utils/fileSearch.js +88 -0
- package/dist/utils/fileUtils.d.ts +14 -2
- package/dist/utils/fileUtils.d.ts.map +1 -1
- package/dist/utils/fileUtils.js +101 -17
- package/dist/utils/globalLogger.d.ts +0 -14
- package/dist/utils/globalLogger.d.ts.map +1 -1
- package/dist/utils/globalLogger.js +0 -16
- package/dist/utils/markdownParser.d.ts.map +1 -1
- package/dist/utils/markdownParser.js +1 -17
- package/dist/utils/messageOperations.d.ts +1 -11
- package/dist/utils/messageOperations.d.ts.map +1 -1
- package/dist/utils/messageOperations.js +7 -24
- package/dist/utils/pathEncoder.d.ts +4 -0
- package/dist/utils/pathEncoder.d.ts.map +1 -1
- package/dist/utils/pathEncoder.js +16 -9
- package/dist/utils/pathSafety.d.ts +10 -0
- package/dist/utils/pathSafety.d.ts.map +1 -0
- package/dist/utils/pathSafety.js +23 -0
- package/dist/utils/subagentParser.d.ts +2 -2
- package/dist/utils/subagentParser.d.ts.map +1 -1
- package/dist/utils/subagentParser.js +10 -7
- package/package.json +9 -9
- package/src/agent.ts +475 -216
- package/src/index.ts +3 -0
- package/src/managers/aiManager.ts +107 -111
- package/src/managers/backgroundBashManager.ts +4 -3
- package/src/managers/hookManager.ts +44 -39
- package/src/managers/liveConfigManager.ts +524 -138
- package/src/managers/lspManager.ts +434 -0
- package/src/managers/messageManager.ts +73 -103
- package/src/managers/permissionManager.ts +480 -0
- package/src/managers/skillManager.ts +3 -1
- package/src/managers/slashCommandManager.ts +1 -2
- package/src/managers/subagentManager.ts +116 -159
- package/src/managers/toolManager.ts +95 -3
- package/src/services/aiService.ts +207 -26
- package/src/services/configurationService.ts +762 -0
- package/src/services/fileWatcher.ts +5 -6
- package/src/services/hook.ts +50 -631
- package/src/services/jsonlHandler.ts +84 -100
- package/src/services/memory.ts +2 -59
- package/src/services/session.ts +338 -213
- package/src/tools/bashTool.ts +126 -13
- package/src/tools/deleteFileTool.ts +36 -0
- package/src/tools/editTool.ts +41 -7
- package/src/tools/lspTool.ts +760 -0
- package/src/tools/multiEditTool.ts +37 -8
- package/src/tools/readTool.ts +125 -2
- package/src/tools/skillTool.ts +2 -2
- package/src/tools/todoWriteTool.ts +33 -1
- package/src/tools/types.ts +15 -9
- package/src/tools/writeTool.ts +36 -10
- package/src/types/commands.ts +0 -1
- package/src/types/config.ts +5 -0
- package/src/types/configuration.ts +73 -0
- package/src/types/core.ts +11 -0
- package/src/types/environment.ts +44 -0
- package/src/types/fileSearch.ts +4 -0
- package/src/types/hooks.ts +14 -11
- package/src/types/index.ts +5 -0
- package/src/types/lsp.ts +96 -0
- package/src/types/messaging.ts +8 -13
- package/src/types/permissions.ts +52 -0
- package/src/types/session.ts +3 -8
- package/src/types/skills.ts +1 -0
- package/src/types/tools.ts +38 -0
- package/src/utils/abortUtils.ts +118 -0
- package/src/utils/bashHistory.ts +28 -4
- package/src/utils/bashParser.ts +444 -0
- package/src/utils/builtinSubagents.ts +71 -0
- package/src/utils/cacheControlUtils.ts +106 -171
- package/src/utils/constants.ts +1 -16
- package/src/utils/convertMessagesForAPI.ts +38 -14
- package/src/utils/fileSearch.ts +107 -0
- package/src/utils/fileUtils.ts +114 -19
- package/src/utils/globalLogger.ts +0 -17
- package/src/utils/markdownParser.ts +1 -19
- package/src/utils/messageOperations.ts +7 -35
- package/src/utils/pathEncoder.ts +24 -9
- package/src/utils/pathSafety.ts +26 -0
- package/src/utils/subagentParser.ts +11 -8
- package/dist/constants/events.d.ts +0 -28
- package/dist/constants/events.d.ts.map +0 -1
- package/dist/constants/events.js +0 -27
- package/dist/services/configurationWatcher.d.ts +0 -120
- package/dist/services/configurationWatcher.d.ts.map +0 -1
- package/dist/services/configurationWatcher.js +0 -439
- package/dist/services/memoryStore.d.ts +0 -81
- package/dist/services/memoryStore.d.ts.map +0 -1
- package/dist/services/memoryStore.js +0 -200
- package/dist/types/memoryStore.d.ts +0 -82
- package/dist/types/memoryStore.d.ts.map +0 -1
- package/dist/types/memoryStore.js +0 -7
- package/dist/utils/configResolver.d.ts +0 -65
- package/dist/utils/configResolver.d.ts.map +0 -1
- package/dist/utils/configResolver.js +0 -210
- package/src/constants/events.ts +0 -38
- package/src/services/configurationWatcher.ts +0 -622
- package/src/services/memoryStore.ts +0 -279
- package/src/types/memoryStore.ts +0 -94
- package/src/utils/configResolver.ts +0 -302
package/src/utils/fileUtils.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import { createReadStream } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { execSync } from "node:child_process";
|
|
5
|
+
import { homedir } from "node:os";
|
|
2
6
|
|
|
3
7
|
/**
|
|
4
8
|
* Reads the first line of a file efficiently using Node.js readline.
|
|
@@ -7,7 +11,6 @@ import fs from "node:fs";
|
|
|
7
11
|
* @return {Promise<string>} - The first non-empty line of the file, or an empty string otherwise.
|
|
8
12
|
*/
|
|
9
13
|
export async function readFirstLine(filePath: string): Promise<string> {
|
|
10
|
-
const { createReadStream } = fs;
|
|
11
14
|
const { createInterface } = await import("node:readline");
|
|
12
15
|
|
|
13
16
|
const fileStream = createReadStream(filePath);
|
|
@@ -34,32 +37,124 @@ export async function readFirstLine(filePath: string): Promise<string> {
|
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
/**
|
|
37
|
-
* Reads a file from the end and returns the
|
|
40
|
+
* Reads a file from the end and returns the last non-empty line.
|
|
41
|
+
*
|
|
42
|
+
* This version supports files that end with:
|
|
43
|
+
* - "\n" (Unix-style, including modern macOS)
|
|
44
|
+
* - "\r\n" (Windows-style)
|
|
45
|
+
* - "\r" (older Mac-style, HL7, etc.)
|
|
38
46
|
*
|
|
39
47
|
* @param {string} filePath - The path to the file.
|
|
48
|
+
* @param {number} [minLength=1] - Minimum length for the returned line.
|
|
40
49
|
* @return {Promise<string>} - The last non-empty line of the file, or an empty string if no non-empty lines found.
|
|
41
50
|
*/
|
|
42
|
-
export async function getLastLine(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
export async function getLastLine(
|
|
52
|
+
filePath: string,
|
|
53
|
+
minLength = 1,
|
|
54
|
+
): Promise<string> {
|
|
55
|
+
let fileHandle;
|
|
47
56
|
try {
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
const stats = await fs.stat(filePath);
|
|
58
|
+
const fileSize = stats.size;
|
|
59
|
+
|
|
60
|
+
if (fileSize === 0) return "";
|
|
61
|
+
|
|
62
|
+
fileHandle = await fs.open(filePath, "r");
|
|
63
|
+
const bufferSize = 8 * 1024; // 8KB buffer is usually enough for the last line
|
|
64
|
+
const buffer = Buffer.alloc(bufferSize);
|
|
65
|
+
|
|
66
|
+
let lineEnd: number | null = null;
|
|
67
|
+
let lineStart: number | null = null;
|
|
68
|
+
let currentPosition = fileSize;
|
|
69
|
+
|
|
70
|
+
while (currentPosition > 0 && lineStart === null) {
|
|
71
|
+
const readSize = Math.min(bufferSize, currentPosition);
|
|
72
|
+
currentPosition -= readSize;
|
|
73
|
+
|
|
74
|
+
const { bytesRead } = await fileHandle.read(
|
|
75
|
+
buffer,
|
|
76
|
+
0,
|
|
77
|
+
readSize,
|
|
78
|
+
currentPosition,
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
for (let i = bytesRead - 1; i >= 0; i--) {
|
|
82
|
+
const charCode = buffer[i];
|
|
83
|
+
if (lineEnd === null) {
|
|
84
|
+
// Still looking for the end of the last non-empty line (skip trailing newlines and whitespace)
|
|
85
|
+
if (charCode > 32) {
|
|
86
|
+
lineEnd = currentPosition + i + 1;
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
// Looking for the start of the line (the newline before it)
|
|
90
|
+
if (charCode === 10 || charCode === 13) {
|
|
91
|
+
lineStart = currentPosition + i + 1;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
57
95
|
}
|
|
58
96
|
}
|
|
59
97
|
|
|
60
|
-
return "";
|
|
98
|
+
if (lineEnd === null) return "";
|
|
99
|
+
if (lineStart === null) lineStart = 0;
|
|
100
|
+
|
|
101
|
+
const length = lineEnd - lineStart;
|
|
102
|
+
if (length < minLength) return "";
|
|
103
|
+
|
|
104
|
+
const resultBuffer = Buffer.alloc(length);
|
|
105
|
+
await fileHandle.read(resultBuffer, 0, length, lineStart);
|
|
106
|
+
const result = resultBuffer.toString("utf8").trim();
|
|
107
|
+
return result.length >= minLength ? result : "";
|
|
61
108
|
} catch {
|
|
62
|
-
// If
|
|
109
|
+
// If reading fails (e.g., file doesn't exist), return empty string
|
|
63
110
|
return "";
|
|
111
|
+
} finally {
|
|
112
|
+
if (fileHandle) {
|
|
113
|
+
await fileHandle.close();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Ensures that a pattern is present in the global git ignore file.
|
|
120
|
+
*
|
|
121
|
+
* @param {string} pattern - The pattern to add to global git ignore.
|
|
122
|
+
*/
|
|
123
|
+
export async function ensureGlobalGitIgnore(pattern: string): Promise<void> {
|
|
124
|
+
try {
|
|
125
|
+
let globalIgnorePath: string;
|
|
126
|
+
try {
|
|
127
|
+
globalIgnorePath = execSync("git config --get core.excludesfile", {
|
|
128
|
+
encoding: "utf8",
|
|
129
|
+
}).trim();
|
|
130
|
+
} catch {
|
|
131
|
+
// If not set, use default paths
|
|
132
|
+
const xdgConfigHome =
|
|
133
|
+
process.env.XDG_CONFIG_HOME || path.join(homedir(), ".config");
|
|
134
|
+
globalIgnorePath = path.join(xdgConfigHome, "git", "ignore");
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (!globalIgnorePath) return;
|
|
138
|
+
|
|
139
|
+
// Ensure directory exists
|
|
140
|
+
await fs.mkdir(path.dirname(globalIgnorePath), { recursive: true });
|
|
141
|
+
|
|
142
|
+
let content = "";
|
|
143
|
+
try {
|
|
144
|
+
content = await fs.readFile(globalIgnorePath, "utf8");
|
|
145
|
+
} catch {
|
|
146
|
+
// File doesn't exist
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const lines = content.split("\n").map((line) => line.trim());
|
|
150
|
+
if (!lines.includes(pattern)) {
|
|
151
|
+
const newContent =
|
|
152
|
+
content.endsWith("\n") || content === ""
|
|
153
|
+
? `${content}${pattern}\n`
|
|
154
|
+
: `${content}\n${pattern}\n`;
|
|
155
|
+
await fs.writeFile(globalIgnorePath, newContent, "utf8");
|
|
156
|
+
}
|
|
157
|
+
} catch {
|
|
158
|
+
// Ignore errors
|
|
64
159
|
}
|
|
65
160
|
}
|
|
@@ -46,23 +46,6 @@ export function setGlobalLogger(logger: Logger | null): void {
|
|
|
46
46
|
globalLogger = logger;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
/**
|
|
50
|
-
* Retrieve the current global logger instance
|
|
51
|
-
*
|
|
52
|
-
* @returns Current logger instance or null if unconfigured
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```typescript
|
|
56
|
-
* const currentLogger = getGlobalLogger();
|
|
57
|
-
* if (currentLogger) {
|
|
58
|
-
* currentLogger.info('Direct logger access');
|
|
59
|
-
* }
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
export function getGlobalLogger(): Logger | null {
|
|
63
|
-
return globalLogger;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
49
|
/**
|
|
67
50
|
* Reset global logger to unconfigured state
|
|
68
51
|
* Equivalent to setGlobalLogger(null)
|
|
@@ -37,18 +37,7 @@ function parseFrontmatter(content: string): {
|
|
|
37
37
|
const key = trimmedLine.slice(0, colonIndex).trim();
|
|
38
38
|
const value = trimmedLine.slice(colonIndex + 1).trim();
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
if (key === "allowed-tools" && value) {
|
|
42
|
-
// Simple array parsing: "tool1, tool2, tool3" or "[tool1, tool2]"
|
|
43
|
-
let arrayValue = value;
|
|
44
|
-
if (arrayValue.startsWith("[") && arrayValue.endsWith("]")) {
|
|
45
|
-
arrayValue = arrayValue.slice(1, -1);
|
|
46
|
-
}
|
|
47
|
-
frontmatter[key] = arrayValue
|
|
48
|
-
.split(",")
|
|
49
|
-
.map((s) => s.trim())
|
|
50
|
-
.filter(Boolean);
|
|
51
|
-
} else if (value) {
|
|
40
|
+
if (value) {
|
|
52
41
|
frontmatter[key] = value;
|
|
53
42
|
}
|
|
54
43
|
}
|
|
@@ -73,13 +62,6 @@ export function parseMarkdownFile(filePath: string): ParsedMarkdownFile {
|
|
|
73
62
|
if (frontmatter) {
|
|
74
63
|
config = {};
|
|
75
64
|
|
|
76
|
-
if (
|
|
77
|
-
frontmatter["allowed-tools"] &&
|
|
78
|
-
Array.isArray(frontmatter["allowed-tools"])
|
|
79
|
-
) {
|
|
80
|
-
config.allowedTools = frontmatter["allowed-tools"] as string[];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
65
|
if (frontmatter.model && typeof frontmatter.model === "string") {
|
|
84
66
|
config.model = frontmatter.model;
|
|
85
67
|
}
|
|
@@ -47,12 +47,6 @@ export type AgentToolBlockUpdateParams = Omit<
|
|
|
47
47
|
"messages"
|
|
48
48
|
>;
|
|
49
49
|
|
|
50
|
-
export interface AddDiffBlockParams {
|
|
51
|
-
messages: Message[];
|
|
52
|
-
path: string;
|
|
53
|
-
diffResult: Array<{ value: string; added?: boolean; removed?: boolean }>;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
50
|
export interface AddErrorBlockParams {
|
|
57
51
|
messages: Message[];
|
|
58
52
|
error: string;
|
|
@@ -186,7 +180,7 @@ export const addAssistantMessageToMessages = (
|
|
|
186
180
|
content?: string,
|
|
187
181
|
toolCalls?: ChatCompletionMessageFunctionToolCall[],
|
|
188
182
|
usage?: Usage,
|
|
189
|
-
|
|
183
|
+
additionalFields?: Record<string, unknown>,
|
|
190
184
|
): Message[] => {
|
|
191
185
|
const blocks: Message["blocks"] = [];
|
|
192
186
|
|
|
@@ -213,34 +207,12 @@ export const addAssistantMessageToMessages = (
|
|
|
213
207
|
role: "assistant",
|
|
214
208
|
blocks,
|
|
215
209
|
usage, // Include usage data if provided
|
|
216
|
-
...(
|
|
210
|
+
...(additionalFields ? { additionalFields: { ...additionalFields } } : {}),
|
|
217
211
|
};
|
|
218
212
|
|
|
219
213
|
return [...messages, initialAssistantMessage];
|
|
220
214
|
};
|
|
221
215
|
|
|
222
|
-
// Update File Operation Block of the last assistant message
|
|
223
|
-
export const addDiffBlockToMessage = ({
|
|
224
|
-
messages,
|
|
225
|
-
path,
|
|
226
|
-
diffResult,
|
|
227
|
-
}: AddDiffBlockParams): Message[] => {
|
|
228
|
-
const newMessages = [...messages];
|
|
229
|
-
// Find the last assistant message
|
|
230
|
-
for (let i = newMessages.length - 1; i >= 0; i--) {
|
|
231
|
-
if (newMessages[i].role === "assistant") {
|
|
232
|
-
// Directly add diff block instead of replacing existing blocks
|
|
233
|
-
newMessages[i].blocks.push({
|
|
234
|
-
type: "diff",
|
|
235
|
-
path: path,
|
|
236
|
-
diffResult: diffResult,
|
|
237
|
-
});
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
return newMessages;
|
|
242
|
-
};
|
|
243
|
-
|
|
244
216
|
// Update Tool Block of the last assistant message
|
|
245
217
|
export const updateToolBlockInMessage = ({
|
|
246
218
|
messages,
|
|
@@ -453,7 +425,7 @@ export const addCommandOutputMessage = ({
|
|
|
453
425
|
command,
|
|
454
426
|
}: AddCommandOutputParams): Message[] => {
|
|
455
427
|
const outputMessage: Message = {
|
|
456
|
-
role: "
|
|
428
|
+
role: "user",
|
|
457
429
|
blocks: [
|
|
458
430
|
{
|
|
459
431
|
type: "command_output",
|
|
@@ -475,10 +447,10 @@ export const updateCommandOutputInMessage = ({
|
|
|
475
447
|
output,
|
|
476
448
|
}: UpdateCommandOutputParams): Message[] => {
|
|
477
449
|
const newMessages = [...messages];
|
|
478
|
-
// Find the last
|
|
450
|
+
// Find the last user message with a command_output block for this command
|
|
479
451
|
for (let i = newMessages.length - 1; i >= 0; i--) {
|
|
480
452
|
const msg = newMessages[i];
|
|
481
|
-
if (msg.role === "
|
|
453
|
+
if (msg.role === "user") {
|
|
482
454
|
const commandBlock = msg.blocks.find(
|
|
483
455
|
(block) =>
|
|
484
456
|
block.type === "command_output" &&
|
|
@@ -501,10 +473,10 @@ export const completeCommandInMessage = ({
|
|
|
501
473
|
exitCode,
|
|
502
474
|
}: CompleteCommandParams): Message[] => {
|
|
503
475
|
const newMessages = [...messages];
|
|
504
|
-
// Find the last
|
|
476
|
+
// Find the last user message with a command_output block for this command
|
|
505
477
|
for (let i = newMessages.length - 1; i >= 0; i--) {
|
|
506
478
|
const msg = newMessages[i];
|
|
507
|
-
if (msg.role === "
|
|
479
|
+
if (msg.role === "user") {
|
|
508
480
|
const commandBlock = msg.blocks.find(
|
|
509
481
|
(block) =>
|
|
510
482
|
block.type === "command_output" &&
|
package/src/utils/pathEncoder.ts
CHANGED
|
@@ -190,9 +190,9 @@ export class PathEncoder {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
193
|
+
* Get project directory info without creating the directory
|
|
194
194
|
*/
|
|
195
|
-
async
|
|
195
|
+
async getProjectDirectory(
|
|
196
196
|
originalPath: string,
|
|
197
197
|
baseSessionDir: string,
|
|
198
198
|
): Promise<ProjectDirectory> {
|
|
@@ -221,13 +221,6 @@ export class PathEncoder {
|
|
|
221
221
|
pathHash = this.generateHash(resolvedPath, this.options.hashLength);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
// Ensure the encoded directory exists
|
|
225
|
-
try {
|
|
226
|
-
await mkdir(encodedPath, { recursive: true });
|
|
227
|
-
} catch {
|
|
228
|
-
// Ignore errors if directory already exists
|
|
229
|
-
}
|
|
230
|
-
|
|
231
224
|
return {
|
|
232
225
|
originalPath: resolvedPath,
|
|
233
226
|
encodedName,
|
|
@@ -237,6 +230,28 @@ export class PathEncoder {
|
|
|
237
230
|
};
|
|
238
231
|
}
|
|
239
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Create project directory entity from original path
|
|
235
|
+
*/
|
|
236
|
+
async createProjectDirectory(
|
|
237
|
+
originalPath: string,
|
|
238
|
+
baseSessionDir: string,
|
|
239
|
+
): Promise<ProjectDirectory> {
|
|
240
|
+
const projectDirectory = await this.getProjectDirectory(
|
|
241
|
+
originalPath,
|
|
242
|
+
baseSessionDir,
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
// Ensure the encoded directory exists
|
|
246
|
+
try {
|
|
247
|
+
await mkdir(projectDirectory.encodedPath, { recursive: true });
|
|
248
|
+
} catch {
|
|
249
|
+
// Ignore errors if directory already exists
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return projectDirectory;
|
|
253
|
+
}
|
|
254
|
+
|
|
240
255
|
/**
|
|
241
256
|
* Validate that an encoded name is filesystem-safe
|
|
242
257
|
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Check if a target path is inside a parent directory.
|
|
6
|
+
* Resolves symlinks and handles absolute paths.
|
|
7
|
+
* Returns true if target is the same as parent or is a subdirectory of parent.
|
|
8
|
+
* @param target The path to check
|
|
9
|
+
* @param parent The parent directory path
|
|
10
|
+
* @returns boolean
|
|
11
|
+
*/
|
|
12
|
+
export function isPathInside(target: string, parent: string): boolean {
|
|
13
|
+
try {
|
|
14
|
+
const absoluteTarget = path.resolve(target);
|
|
15
|
+
const absoluteParent = path.resolve(parent);
|
|
16
|
+
|
|
17
|
+
const realTarget = fs.realpathSync(absoluteTarget);
|
|
18
|
+
const realParent = fs.realpathSync(absoluteParent);
|
|
19
|
+
|
|
20
|
+
const relative = path.relative(realParent, realTarget);
|
|
21
|
+
|
|
22
|
+
return !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
23
|
+
} catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -9,7 +9,7 @@ export interface SubagentConfiguration {
|
|
|
9
9
|
model?: string;
|
|
10
10
|
systemPrompt: string;
|
|
11
11
|
filePath: string;
|
|
12
|
-
scope: "project" | "user";
|
|
12
|
+
scope: "project" | "user" | "builtin";
|
|
13
13
|
priority: number;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -101,11 +101,11 @@ function validateConfiguration(
|
|
|
101
101
|
throw new Error(`Missing required field 'description' in ${filePath}`);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// Validate name pattern
|
|
105
|
-
const namePattern = /^[a-
|
|
104
|
+
// Validate name pattern - allow letters (upper/lowercase), numbers, and hyphens
|
|
105
|
+
const namePattern = /^[a-zA-Z][a-zA-Z0-9-]*$/;
|
|
106
106
|
if (!namePattern.test(config.name)) {
|
|
107
107
|
throw new Error(
|
|
108
|
-
`Invalid subagent name '${config.name}' in ${filePath}. Must start with a letter and contain only
|
|
108
|
+
`Invalid subagent name '${config.name}' in ${filePath}. Must start with a letter and contain only letters, numbers, and hyphens.`,
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -187,7 +187,7 @@ function scanSubagentDirectory(
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* Load all subagent configurations from project and user directories
|
|
190
|
+
* Load all subagent configurations from project and user directories, plus built-in subagents
|
|
191
191
|
*/
|
|
192
192
|
export async function loadSubagentConfigurations(
|
|
193
193
|
workdir: string,
|
|
@@ -195,14 +195,17 @@ export async function loadSubagentConfigurations(
|
|
|
195
195
|
const projectDir = join(workdir, ".wave", "agents");
|
|
196
196
|
const userDir = join(process.env.HOME || "~", ".wave", "agents");
|
|
197
197
|
|
|
198
|
+
// Load configurations from all sources
|
|
199
|
+
const { getBuiltinSubagents } = await import("./builtinSubagents.js");
|
|
200
|
+
const builtinConfigs = getBuiltinSubagents();
|
|
198
201
|
const projectConfigs = scanSubagentDirectory(projectDir, "project");
|
|
199
202
|
const userConfigs = scanSubagentDirectory(userDir, "user");
|
|
200
203
|
|
|
201
|
-
// Merge configurations, with project configs taking precedence
|
|
204
|
+
// Merge configurations, with project configs taking highest precedence
|
|
202
205
|
const configMap = new Map<string, SubagentConfiguration>();
|
|
203
206
|
|
|
204
|
-
// Process in reverse priority order (
|
|
205
|
-
for (const config of [...userConfigs, ...projectConfigs]) {
|
|
207
|
+
// Process in reverse priority order (built-in first, then user, then project)
|
|
208
|
+
for (const config of [...builtinConfigs, ...userConfigs, ...projectConfigs]) {
|
|
206
209
|
configMap.set(config.name, config);
|
|
207
210
|
}
|
|
208
211
|
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event name constants to prevent typos and ensure consistency
|
|
3
|
-
*
|
|
4
|
-
* Using constants instead of magic strings prevents bugs like:
|
|
5
|
-
* - ConfigurationWatcher emitting 'configurationChange'
|
|
6
|
-
* - LiveConfigManager listening for 'configurationChanged'
|
|
7
|
-
*
|
|
8
|
-
* This pattern ensures compile-time validation of event names.
|
|
9
|
-
*/
|
|
10
|
-
export declare const CONFIGURATION_EVENTS: {
|
|
11
|
-
readonly CONFIGURATION_CHANGE: "configurationChange";
|
|
12
|
-
readonly WATCHER_ERROR: "watcherError";
|
|
13
|
-
};
|
|
14
|
-
export declare const FILE_WATCHER_EVENTS: {
|
|
15
|
-
readonly CHANGE: "change";
|
|
16
|
-
readonly CREATE: "create";
|
|
17
|
-
readonly DELETE: "delete";
|
|
18
|
-
readonly RENAME: "rename";
|
|
19
|
-
};
|
|
20
|
-
export declare const MEMORY_STORE_EVENTS: {
|
|
21
|
-
readonly FILE_ADDED: "fileAdded";
|
|
22
|
-
readonly FILE_CHANGED: "fileChanged";
|
|
23
|
-
readonly FILE_REMOVED: "fileRemoved";
|
|
24
|
-
};
|
|
25
|
-
export type ConfigurationEventName = (typeof CONFIGURATION_EVENTS)[keyof typeof CONFIGURATION_EVENTS];
|
|
26
|
-
export type FileWatcherEventName = (typeof FILE_WATCHER_EVENTS)[keyof typeof FILE_WATCHER_EVENTS];
|
|
27
|
-
export type MemoryStoreEventName = (typeof MEMORY_STORE_EVENTS)[keyof typeof MEMORY_STORE_EVENTS];
|
|
28
|
-
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/constants/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AAGX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AACnE,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AACjE,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/constants/events.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event name constants to prevent typos and ensure consistency
|
|
3
|
-
*
|
|
4
|
-
* Using constants instead of magic strings prevents bugs like:
|
|
5
|
-
* - ConfigurationWatcher emitting 'configurationChange'
|
|
6
|
-
* - LiveConfigManager listening for 'configurationChanged'
|
|
7
|
-
*
|
|
8
|
-
* This pattern ensures compile-time validation of event names.
|
|
9
|
-
*/
|
|
10
|
-
// Configuration Watcher Events
|
|
11
|
-
export const CONFIGURATION_EVENTS = {
|
|
12
|
-
CONFIGURATION_CHANGE: "configurationChange",
|
|
13
|
-
WATCHER_ERROR: "watcherError",
|
|
14
|
-
};
|
|
15
|
-
// File Watcher Events
|
|
16
|
-
export const FILE_WATCHER_EVENTS = {
|
|
17
|
-
CHANGE: "change",
|
|
18
|
-
CREATE: "create",
|
|
19
|
-
DELETE: "delete",
|
|
20
|
-
RENAME: "rename",
|
|
21
|
-
};
|
|
22
|
-
// Memory Store Events
|
|
23
|
-
export const MEMORY_STORE_EVENTS = {
|
|
24
|
-
FILE_ADDED: "fileAdded",
|
|
25
|
-
FILE_CHANGED: "fileChanged",
|
|
26
|
-
FILE_REMOVED: "fileRemoved",
|
|
27
|
-
};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration Watcher Service
|
|
3
|
-
*
|
|
4
|
-
* Orchestrates live configuration reload functionality by coordinating file watching,
|
|
5
|
-
* configuration validation, and error recovery. Provides automatic reload of settings.json
|
|
6
|
-
* changes without restart.
|
|
7
|
-
*/
|
|
8
|
-
import { EventEmitter } from "events";
|
|
9
|
-
import { type FileWatchEvent } from "./fileWatcher.js";
|
|
10
|
-
import type { WaveConfiguration } from "../types/hooks.js";
|
|
11
|
-
import type { Logger } from "../types/index.js";
|
|
12
|
-
export interface ConfigurationChangeEvent {
|
|
13
|
-
type: "settings_changed" | "memory_changed" | "env_changed";
|
|
14
|
-
path: string;
|
|
15
|
-
timestamp: number;
|
|
16
|
-
changes: {
|
|
17
|
-
added: string[];
|
|
18
|
-
modified: string[];
|
|
19
|
-
removed: string[];
|
|
20
|
-
};
|
|
21
|
-
isValid: boolean;
|
|
22
|
-
errorMessage?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface ConfigurationReloadService {
|
|
25
|
-
initializeWatching(userPaths: string[], projectPaths?: string[]): Promise<void>;
|
|
26
|
-
reloadConfiguration(): Promise<WaveConfiguration>;
|
|
27
|
-
getCurrentConfiguration(): WaveConfiguration | null;
|
|
28
|
-
validateEnvironmentVariables(env: Record<string, string>): {
|
|
29
|
-
isValid: boolean;
|
|
30
|
-
errors: string[];
|
|
31
|
-
warnings: string[];
|
|
32
|
-
};
|
|
33
|
-
shutdown(): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
export declare class ConfigurationWatcher extends EventEmitter implements ConfigurationReloadService {
|
|
36
|
-
private fileWatcher;
|
|
37
|
-
private logger?;
|
|
38
|
-
private currentConfiguration;
|
|
39
|
-
private lastValidConfiguration;
|
|
40
|
-
private userConfigPaths?;
|
|
41
|
-
private projectConfigPaths?;
|
|
42
|
-
private workdir;
|
|
43
|
-
private isWatching;
|
|
44
|
-
private reloadInProgress;
|
|
45
|
-
constructor(workdir: string, logger?: Logger);
|
|
46
|
-
/**
|
|
47
|
-
* Initialize configuration watching
|
|
48
|
-
* Maps to FR-004: System MUST watch settings.json files
|
|
49
|
-
* Supports watching multiple file paths (e.g., settings.local.json and settings.json)
|
|
50
|
-
*/
|
|
51
|
-
initializeWatching(userPaths: string[], projectPaths?: string[]): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Reload configuration from files
|
|
54
|
-
* Maps to FR-008: Continue with previous valid configuration on errors
|
|
55
|
-
*/
|
|
56
|
-
reloadConfiguration(): Promise<WaveConfiguration>;
|
|
57
|
-
/**
|
|
58
|
-
* Get current effective configuration
|
|
59
|
-
* Maps to FR-002: Merged configuration with project precedence
|
|
60
|
-
*/
|
|
61
|
-
getCurrentConfiguration(): WaveConfiguration | null;
|
|
62
|
-
/**
|
|
63
|
-
* Validate environment variables
|
|
64
|
-
* Maps to FR-003: Validate env field format
|
|
65
|
-
*/
|
|
66
|
-
validateEnvironmentVariables(env: Record<string, string>): {
|
|
67
|
-
isValid: boolean;
|
|
68
|
-
errors: string[];
|
|
69
|
-
warnings: string[];
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Stop watching and cleanup resources
|
|
73
|
-
* Maps to cleanup requirements
|
|
74
|
-
*/
|
|
75
|
-
shutdown(): Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* Watch an additional file (like AGENTS.md) for changes
|
|
78
|
-
* Maps to T033: Add AGENTS.md file watching to HookManager
|
|
79
|
-
*/
|
|
80
|
-
watchAdditionalFile(filePath: string, callback: (event: FileWatchEvent) => void): Promise<void>;
|
|
81
|
-
/**
|
|
82
|
-
* Stop watching an additional file
|
|
83
|
-
*/
|
|
84
|
-
unwatchAdditionalFile(filePath: string): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* Check if watching is active
|
|
87
|
-
*/
|
|
88
|
-
isWatchingActive(): boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Get watcher status for monitoring
|
|
91
|
-
*/
|
|
92
|
-
getWatcherStatus(): {
|
|
93
|
-
isActive: boolean;
|
|
94
|
-
configurationLoaded: boolean;
|
|
95
|
-
hasValidConfiguration: boolean;
|
|
96
|
-
reloadInProgress: boolean;
|
|
97
|
-
watchedFiles: {
|
|
98
|
-
path: string;
|
|
99
|
-
isActive: boolean;
|
|
100
|
-
method: "native" | "polling" | "failed";
|
|
101
|
-
errorCount: number;
|
|
102
|
-
}[];
|
|
103
|
-
};
|
|
104
|
-
private setupFileWatcherEvents;
|
|
105
|
-
private handleFileChange;
|
|
106
|
-
/**
|
|
107
|
-
* Validate configuration structure and content
|
|
108
|
-
*/
|
|
109
|
-
private validateConfiguration;
|
|
110
|
-
private detectChanges;
|
|
111
|
-
/**
|
|
112
|
-
* Get the first existing user config path for error reporting
|
|
113
|
-
*/
|
|
114
|
-
private getFirstExistingUserPath;
|
|
115
|
-
/**
|
|
116
|
-
* Get the first existing project config path for error reporting
|
|
117
|
-
*/
|
|
118
|
-
private getFirstExistingProjectPath;
|
|
119
|
-
}
|
|
120
|
-
//# sourceMappingURL=configurationWatcher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configurationWatcher.d.ts","sourceRoot":"","sources":["../../src/services/configurationWatcher.ts"],"names":[],"mappings":"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"}
|