wave-agent-sdk 0.0.7 → 0.0.8
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 +32 -20
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +202 -20
- package/dist/constants/events.d.ts +28 -0
- package/dist/constants/events.d.ts.map +1 -0
- package/dist/constants/events.js +27 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/managers/aiManager.d.ts +34 -1
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +243 -128
- package/dist/managers/backgroundBashManager.d.ts.map +1 -1
- package/dist/managers/backgroundBashManager.js +7 -6
- package/dist/managers/hookManager.d.ts +9 -4
- package/dist/managers/hookManager.d.ts.map +1 -1
- package/dist/managers/hookManager.js +62 -30
- package/dist/managers/liveConfigManager.d.ts +58 -0
- package/dist/managers/liveConfigManager.d.ts.map +1 -0
- package/dist/managers/liveConfigManager.js +160 -0
- package/dist/managers/messageManager.d.ts +38 -13
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +163 -30
- package/dist/managers/slashCommandManager.d.ts.map +1 -1
- package/dist/managers/slashCommandManager.js +4 -1
- package/dist/managers/subagentManager.d.ts +51 -0
- package/dist/managers/subagentManager.d.ts.map +1 -1
- package/dist/managers/subagentManager.js +189 -18
- package/dist/services/aiService.d.ts +13 -5
- package/dist/services/aiService.d.ts.map +1 -1
- package/dist/services/aiService.js +350 -74
- package/dist/services/configurationWatcher.d.ts +120 -0
- package/dist/services/configurationWatcher.d.ts.map +1 -0
- package/dist/services/configurationWatcher.js +439 -0
- package/dist/services/fileWatcher.d.ts +69 -0
- package/dist/services/fileWatcher.d.ts.map +1 -0
- package/dist/services/fileWatcher.js +213 -0
- package/dist/services/hook.d.ts +91 -9
- package/dist/services/hook.d.ts.map +1 -1
- package/dist/services/hook.js +393 -43
- package/dist/services/jsonlHandler.d.ts +62 -0
- package/dist/services/jsonlHandler.d.ts.map +1 -0
- package/dist/services/jsonlHandler.js +257 -0
- package/dist/services/memory.d.ts +9 -0
- package/dist/services/memory.d.ts.map +1 -1
- package/dist/services/memory.js +81 -12
- package/dist/services/memoryStore.d.ts +81 -0
- package/dist/services/memoryStore.d.ts.map +1 -0
- package/dist/services/memoryStore.js +200 -0
- package/dist/services/session.d.ts +64 -49
- package/dist/services/session.d.ts.map +1 -1
- package/dist/services/session.js +310 -132
- package/dist/tools/bashTool.d.ts.map +1 -1
- package/dist/tools/bashTool.js +5 -4
- package/dist/tools/deleteFileTool.d.ts.map +1 -1
- package/dist/tools/deleteFileTool.js +2 -1
- package/dist/tools/editTool.d.ts.map +1 -1
- package/dist/tools/editTool.js +3 -2
- package/dist/tools/multiEditTool.d.ts.map +1 -1
- package/dist/tools/multiEditTool.js +4 -3
- package/dist/tools/readTool.d.ts.map +1 -1
- package/dist/tools/readTool.js +2 -1
- package/dist/tools/writeTool.d.ts.map +1 -1
- package/dist/tools/writeTool.js +5 -6
- package/dist/types/commands.d.ts +4 -0
- package/dist/types/commands.d.ts.map +1 -1
- package/dist/types/core.d.ts +35 -0
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/environment.d.ts +42 -0
- package/dist/types/environment.d.ts.map +1 -0
- package/dist/types/environment.js +21 -0
- package/dist/types/hooks.d.ts +8 -2
- package/dist/types/hooks.d.ts.map +1 -1
- package/dist/types/hooks.js +8 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/memoryStore.d.ts +82 -0
- package/dist/types/memoryStore.d.ts.map +1 -0
- package/dist/types/memoryStore.js +7 -0
- package/dist/types/messaging.d.ts +14 -2
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/types/session.d.ts +20 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +7 -0
- package/dist/utils/bashHistory.d.ts.map +1 -1
- package/dist/utils/bashHistory.js +27 -26
- package/dist/utils/cacheControlUtils.d.ts +121 -0
- package/dist/utils/cacheControlUtils.d.ts.map +1 -0
- package/dist/utils/cacheControlUtils.js +367 -0
- package/dist/utils/commandPathResolver.d.ts +52 -0
- package/dist/utils/commandPathResolver.d.ts.map +1 -0
- package/dist/utils/commandPathResolver.js +145 -0
- package/dist/utils/configPaths.d.ts +85 -0
- package/dist/utils/configPaths.d.ts.map +1 -0
- package/dist/utils/configPaths.js +121 -0
- package/dist/utils/configResolver.d.ts +37 -10
- package/dist/utils/configResolver.d.ts.map +1 -1
- package/dist/utils/configResolver.js +127 -23
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/convertMessagesForAPI.d.ts.map +1 -1
- package/dist/utils/convertMessagesForAPI.js +7 -5
- package/dist/utils/customCommands.d.ts.map +1 -1
- package/dist/utils/customCommands.js +66 -21
- package/dist/utils/fileUtils.d.ts +15 -0
- package/dist/utils/fileUtils.d.ts.map +1 -0
- package/dist/utils/fileUtils.js +61 -0
- package/dist/utils/globalLogger.d.ts +102 -0
- package/dist/utils/globalLogger.d.ts.map +1 -0
- package/dist/utils/globalLogger.js +136 -0
- package/dist/utils/mcpUtils.d.ts.map +1 -1
- package/dist/utils/mcpUtils.js +25 -3
- package/dist/utils/messageOperations.d.ts +20 -8
- package/dist/utils/messageOperations.d.ts.map +1 -1
- package/dist/utils/messageOperations.js +25 -16
- package/dist/utils/pathEncoder.d.ts +104 -0
- package/dist/utils/pathEncoder.d.ts.map +1 -0
- package/dist/utils/pathEncoder.js +272 -0
- package/dist/utils/subagentParser.d.ts.map +1 -1
- package/dist/utils/subagentParser.js +2 -1
- package/dist/utils/tokenCalculation.d.ts +26 -0
- package/dist/utils/tokenCalculation.d.ts.map +1 -0
- package/dist/utils/tokenCalculation.js +36 -0
- package/package.json +6 -3
- package/src/agent.ts +298 -34
- package/src/constants/events.ts +38 -0
- package/src/index.ts +2 -0
- package/src/managers/aiManager.ts +323 -170
- package/src/managers/backgroundBashManager.ts +7 -6
- package/src/managers/hookManager.ts +83 -40
- package/src/managers/liveConfigManager.ts +248 -0
- package/src/managers/messageManager.ts +230 -63
- package/src/managers/slashCommandManager.ts +4 -1
- package/src/managers/subagentManager.ts +283 -21
- package/src/services/aiService.ts +474 -83
- package/src/services/configurationWatcher.ts +622 -0
- package/src/services/fileWatcher.ts +301 -0
- package/src/services/hook.ts +538 -47
- package/src/services/jsonlHandler.ts +319 -0
- package/src/services/memory.ts +92 -12
- package/src/services/memoryStore.ts +279 -0
- package/src/services/session.ts +381 -157
- package/src/tools/bashTool.ts +5 -4
- package/src/tools/deleteFileTool.ts +2 -1
- package/src/tools/editTool.ts +3 -2
- package/src/tools/multiEditTool.ts +4 -3
- package/src/tools/readTool.ts +2 -1
- package/src/tools/writeTool.ts +7 -6
- package/src/types/commands.ts +6 -0
- package/src/types/core.ts +44 -0
- package/src/types/environment.ts +60 -0
- package/src/types/hooks.ts +21 -8
- package/src/types/index.ts +2 -0
- package/src/types/memoryStore.ts +94 -0
- package/src/types/messaging.ts +14 -2
- package/src/types/session.ts +25 -0
- package/src/utils/bashHistory.ts +27 -27
- package/src/utils/cacheControlUtils.ts +540 -0
- package/src/utils/commandPathResolver.ts +189 -0
- package/src/utils/configPaths.ts +163 -0
- package/src/utils/configResolver.ts +182 -22
- package/src/utils/constants.ts +1 -1
- package/src/utils/convertMessagesForAPI.ts +7 -5
- package/src/utils/customCommands.ts +90 -22
- package/src/utils/fileUtils.ts +65 -0
- package/src/utils/globalLogger.ts +145 -0
- package/src/utils/mcpUtils.ts +34 -3
- package/src/utils/messageOperations.ts +42 -20
- package/src/utils/pathEncoder.ts +379 -0
- package/src/utils/subagentParser.ts +2 -1
- package/src/utils/tokenCalculation.ts +43 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HookConfigurationError, isValidHookEvent, isValidHookEventConfig, } from "../types/hooks.js";
|
|
8
8
|
import { HookMatcher } from "../utils/hookMatcher.js";
|
|
9
|
-
import { executeCommand, isCommandSafe,
|
|
9
|
+
import { executeCommand, isCommandSafe, loadMergedWaveConfig, } from "../services/hook.js";
|
|
10
10
|
import { MessageSource } from "../types/index.js";
|
|
11
11
|
export class HookManager {
|
|
12
12
|
constructor(workdir, matcher = new HookMatcher(), logger) {
|
|
@@ -37,26 +37,28 @@ export class HookManager {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Load configuration from filesystem settings
|
|
40
|
-
* Automatically loads and merges user and project hooks
|
|
40
|
+
* Automatically loads and merges user and project Wave configuration (hooks + environment)
|
|
41
41
|
*/
|
|
42
42
|
loadConfigurationFromSettings() {
|
|
43
43
|
try {
|
|
44
44
|
this.logger?.debug(`[HookManager] Loading configuration...`);
|
|
45
|
-
const
|
|
46
|
-
this.logger?.debug(`[HookManager] Merged config result:`,
|
|
47
|
-
this.configuration =
|
|
45
|
+
const mergedWaveConfig = loadMergedWaveConfig(this.workdir);
|
|
46
|
+
this.logger?.debug(`[HookManager] Merged config result:`, mergedWaveConfig);
|
|
47
|
+
this.configuration = mergedWaveConfig?.hooks || undefined;
|
|
48
|
+
this.environmentVars = mergedWaveConfig?.env || undefined;
|
|
48
49
|
// Validate the loaded configuration if it exists
|
|
49
|
-
if (
|
|
50
|
-
const validation = this.validatePartialConfiguration(
|
|
50
|
+
if (mergedWaveConfig?.hooks) {
|
|
51
|
+
const validation = this.validatePartialConfiguration(mergedWaveConfig.hooks);
|
|
51
52
|
if (!validation.valid) {
|
|
52
53
|
throw new HookConfigurationError("filesystem settings", validation.errors);
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
this.logger?.debug(`[HookManager] Configuration loaded successfully with ${Object.keys(
|
|
56
|
+
this.logger?.debug(`[HookManager] Configuration loaded successfully with ${Object.keys(mergedWaveConfig?.hooks || {}).length} event types and ${Object.keys(this.environmentVars || {}).length} environment variables`);
|
|
56
57
|
}
|
|
57
58
|
catch (error) {
|
|
58
59
|
// If loading fails, start with undefined configuration (no hooks)
|
|
59
60
|
this.configuration = undefined;
|
|
61
|
+
this.environmentVars = undefined;
|
|
60
62
|
// Re-throw configuration errors, but handle file system errors gracefully
|
|
61
63
|
if (error instanceof HookConfigurationError) {
|
|
62
64
|
throw error;
|
|
@@ -108,14 +110,14 @@ export class HookManager {
|
|
|
108
110
|
const hookCommand = config.hooks[commandIndex];
|
|
109
111
|
try {
|
|
110
112
|
this.logger?.debug(`[HookManager] Executing command ${commandIndex + 1}/${config.hooks.length} in configuration ${configIndex + 1}`);
|
|
111
|
-
const result = await executeCommand(hookCommand.command, context);
|
|
113
|
+
const result = await executeCommand(hookCommand.command, context, undefined, this.environmentVars);
|
|
112
114
|
results.push(result);
|
|
113
115
|
// Report individual command result
|
|
114
116
|
if (result.success) {
|
|
115
117
|
this.logger?.debug(`[HookManager] Command ${commandIndex + 1} completed successfully in ${result.duration}ms`);
|
|
116
118
|
}
|
|
117
119
|
else {
|
|
118
|
-
this.logger?.
|
|
120
|
+
this.logger?.debug(`[HookManager] Command ${commandIndex + 1} failed in ${result.duration}ms (exit code: ${result.exitCode}, timed out: ${result.timedOut})`);
|
|
119
121
|
}
|
|
120
122
|
// Continue with next command even if this one fails
|
|
121
123
|
// This allows for non-critical hooks to fail without stopping the workflow
|
|
@@ -208,6 +210,7 @@ export class HookManager {
|
|
|
208
210
|
result: errorMessage,
|
|
209
211
|
success: false,
|
|
210
212
|
error: "Hook blocked tool execution",
|
|
213
|
+
stage: "end", // Hook blocking results in end stage with error
|
|
211
214
|
});
|
|
212
215
|
}
|
|
213
216
|
return { shouldBlock: true };
|
|
@@ -248,35 +251,53 @@ export class HookManager {
|
|
|
248
251
|
return eventConfigs.some((config) => this.configApplies(config, event, toolName));
|
|
249
252
|
}
|
|
250
253
|
/**
|
|
251
|
-
* Validate
|
|
254
|
+
* Validate Wave configuration structure and content
|
|
252
255
|
*/
|
|
253
256
|
validateConfiguration(config) {
|
|
254
257
|
const errors = [];
|
|
255
258
|
if (!config || typeof config !== "object") {
|
|
256
259
|
return { valid: false, errors: ["Configuration must be an object"] };
|
|
257
260
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
errors
|
|
262
|
-
}
|
|
261
|
+
// Validate hooks if present
|
|
262
|
+
if (config.hooks) {
|
|
263
|
+
if (typeof config.hooks !== "object") {
|
|
264
|
+
errors.push("hooks property must be an object");
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
// Validate each hook event
|
|
268
|
+
for (const [eventName, eventConfigs] of Object.entries(config.hooks)) {
|
|
269
|
+
// Validate event name
|
|
270
|
+
if (!isValidHookEvent(eventName)) {
|
|
271
|
+
errors.push(`Invalid hook event: ${eventName}`);
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
// Validate event configurations
|
|
275
|
+
if (!Array.isArray(eventConfigs)) {
|
|
276
|
+
errors.push(`Hook event ${eventName} must be an array of configurations`);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
eventConfigs.forEach((eventConfig, index) => {
|
|
280
|
+
const configErrors = this.validateEventConfig(eventName, eventConfig, index);
|
|
281
|
+
errors.push(...configErrors);
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
}
|
|
263
285
|
}
|
|
264
|
-
// Validate
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
errors.push(`Invalid hook event: ${eventName}`);
|
|
269
|
-
continue;
|
|
286
|
+
// Validate environment variables if present
|
|
287
|
+
if (config.env) {
|
|
288
|
+
if (typeof config.env !== "object" || Array.isArray(config.env)) {
|
|
289
|
+
errors.push("env property must be an object");
|
|
270
290
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
291
|
+
else {
|
|
292
|
+
for (const [key, value] of Object.entries(config.env)) {
|
|
293
|
+
if (typeof key !== "string" || key.trim() === "") {
|
|
294
|
+
errors.push(`Invalid environment variable key: ${key}`);
|
|
295
|
+
}
|
|
296
|
+
if (typeof value !== "string") {
|
|
297
|
+
errors.push(`Environment variable ${key} must have a string value`);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
275
300
|
}
|
|
276
|
-
eventConfigs.forEach((eventConfig, index) => {
|
|
277
|
-
const configErrors = this.validateEventConfig(eventName, eventConfig, index);
|
|
278
|
-
errors.push(...configErrors);
|
|
279
|
-
});
|
|
280
301
|
}
|
|
281
302
|
return {
|
|
282
303
|
valid: errors.length === 0,
|
|
@@ -322,6 +343,15 @@ export class HookManager {
|
|
|
322
343
|
// Deep clone to prevent external modification
|
|
323
344
|
return JSON.parse(JSON.stringify(this.configuration));
|
|
324
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Get current environment variables
|
|
348
|
+
*/
|
|
349
|
+
getEnvironmentVars() {
|
|
350
|
+
if (!this.environmentVars)
|
|
351
|
+
return undefined;
|
|
352
|
+
// Deep clone to prevent external modification
|
|
353
|
+
return JSON.parse(JSON.stringify(this.environmentVars));
|
|
354
|
+
}
|
|
325
355
|
/**
|
|
326
356
|
* Clear current configuration
|
|
327
357
|
*/
|
|
@@ -462,6 +492,7 @@ export class HookManager {
|
|
|
462
492
|
PostToolUse: 0,
|
|
463
493
|
UserPromptSubmit: 0,
|
|
464
494
|
Stop: 0,
|
|
495
|
+
SubagentStop: 0,
|
|
465
496
|
},
|
|
466
497
|
};
|
|
467
498
|
}
|
|
@@ -470,6 +501,7 @@ export class HookManager {
|
|
|
470
501
|
PostToolUse: 0,
|
|
471
502
|
UserPromptSubmit: 0,
|
|
472
503
|
Stop: 0,
|
|
504
|
+
SubagentStop: 0,
|
|
473
505
|
};
|
|
474
506
|
let totalConfigs = 0;
|
|
475
507
|
let totalCommands = 0;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live Configuration Manager
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates live configuration reload functionality including:
|
|
5
|
+
* - Hook configuration watching and reloading
|
|
6
|
+
* - Memory store management for AGENTS.md files
|
|
7
|
+
* - Coordination between file watchers and configuration updates
|
|
8
|
+
*/
|
|
9
|
+
import type { Logger } from "../types/index.js";
|
|
10
|
+
export interface LiveConfigManagerOptions {
|
|
11
|
+
workdir: string;
|
|
12
|
+
logger?: Logger;
|
|
13
|
+
onConfigurationChanged?: () => void;
|
|
14
|
+
onMemoryStoreFileChanged?: (filePath: string, changeType: "add" | "change" | "unlink") => Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare class LiveConfigManager {
|
|
17
|
+
private readonly workdir;
|
|
18
|
+
private readonly logger?;
|
|
19
|
+
private readonly onConfigurationChanged?;
|
|
20
|
+
private readonly onMemoryStoreFileChanged?;
|
|
21
|
+
private configurationWatcher?;
|
|
22
|
+
private isInitialized;
|
|
23
|
+
constructor(options: LiveConfigManagerOptions);
|
|
24
|
+
/**
|
|
25
|
+
* Initialize live configuration management
|
|
26
|
+
*/
|
|
27
|
+
initialize(): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Shutdown live configuration management
|
|
30
|
+
*/
|
|
31
|
+
shutdown(): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Initialize configuration watcher for hook settings
|
|
34
|
+
*/
|
|
35
|
+
private initializeConfigurationWatcher;
|
|
36
|
+
/**
|
|
37
|
+
* Initialize memory store watching for AGENTS.md files
|
|
38
|
+
*/
|
|
39
|
+
private initializeMemoryStoreWatching;
|
|
40
|
+
/**
|
|
41
|
+
* Handle configuration change events
|
|
42
|
+
*/
|
|
43
|
+
private handleConfigurationChange;
|
|
44
|
+
/**
|
|
45
|
+
* Handle AGENTS.md file change events
|
|
46
|
+
*/
|
|
47
|
+
private handleMemoryStoreFileChange;
|
|
48
|
+
/**
|
|
49
|
+
* Get initialization status
|
|
50
|
+
*/
|
|
51
|
+
get initialized(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Get configuration file paths for user and project settings
|
|
54
|
+
* Returns paths in priority order (local.json first, then .json)
|
|
55
|
+
*/
|
|
56
|
+
private getConfigurationPaths;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=liveConfigManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveConfigManager.d.ts","sourceRoot":"","sources":["../../src/managers/liveConfigManager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAehD,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,KACpC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAa;IACrD,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAGvB;IACnB,OAAO,CAAC,oBAAoB,CAAC,CAAuB;IACpD,OAAO,CAAC,aAAa,CAAkB;gBAE3B,OAAO,EAAE,wBAAwB;IAO7C;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA2BjC;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB/B;;OAEG;YACW,8BAA8B;IAoB5C;;OAEG;YACW,6BAA6B;IA4B3C;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA8BjC;;OAEG;YACW,2BAA2B;IA8BzC;;OAEG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;OAGG;IACH,OAAO,CAAC,qBAAqB;CAQ9B"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live Configuration Manager
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates live configuration reload functionality including:
|
|
5
|
+
* - Hook configuration watching and reloading
|
|
6
|
+
* - Memory store management for AGENTS.md files
|
|
7
|
+
* - Coordination between file watchers and configuration updates
|
|
8
|
+
*/
|
|
9
|
+
import { ConfigurationWatcher, } from "../services/configurationWatcher.js";
|
|
10
|
+
import { configResolver } from "../utils/configResolver.js";
|
|
11
|
+
import { join } from "path";
|
|
12
|
+
import { getUserConfigPaths, getProjectConfigPaths, } from "../utils/configPaths.js";
|
|
13
|
+
import { CONFIGURATION_EVENTS } from "../constants/events.js";
|
|
14
|
+
export class LiveConfigManager {
|
|
15
|
+
constructor(options) {
|
|
16
|
+
this.isInitialized = false;
|
|
17
|
+
this.workdir = options.workdir;
|
|
18
|
+
this.logger = options.logger;
|
|
19
|
+
this.onConfigurationChanged = options.onConfigurationChanged;
|
|
20
|
+
this.onMemoryStoreFileChanged = options.onMemoryStoreFileChanged;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Initialize live configuration management
|
|
24
|
+
*/
|
|
25
|
+
async initialize() {
|
|
26
|
+
if (this.isInitialized) {
|
|
27
|
+
this.logger?.debug("[LiveConfigManager] Already initialized");
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
// Initialize configuration watcher for hook settings
|
|
32
|
+
await this.initializeConfigurationWatcher();
|
|
33
|
+
// Initialize memory store watching for AGENTS.md if callback is available
|
|
34
|
+
if (this.onMemoryStoreFileChanged) {
|
|
35
|
+
await this.initializeMemoryStoreWatching();
|
|
36
|
+
}
|
|
37
|
+
this.isInitialized = true;
|
|
38
|
+
this.logger?.info("Live Config: Live configuration management initialized successfully");
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
this.logger?.error(`Live Config: Failed to initialize: ${error.message}`);
|
|
42
|
+
throw error;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Shutdown live configuration management
|
|
47
|
+
*/
|
|
48
|
+
async shutdown() {
|
|
49
|
+
if (!this.isInitialized) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
if (this.configurationWatcher) {
|
|
54
|
+
await this.configurationWatcher.shutdown();
|
|
55
|
+
this.configurationWatcher = undefined;
|
|
56
|
+
}
|
|
57
|
+
this.isInitialized = false;
|
|
58
|
+
this.logger?.info("Live Config: Live configuration management shutdown completed");
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
this.logger?.error(`Live Config: Error during shutdown: ${error.message}`);
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Initialize configuration watcher for hook settings
|
|
67
|
+
*/
|
|
68
|
+
async initializeConfigurationWatcher() {
|
|
69
|
+
this.configurationWatcher = new ConfigurationWatcher(this.workdir, this.logger);
|
|
70
|
+
// Set up configuration change handler using EventEmitter pattern
|
|
71
|
+
this.configurationWatcher.on(CONFIGURATION_EVENTS.CONFIGURATION_CHANGE, (event) => {
|
|
72
|
+
this.handleConfigurationChange(event);
|
|
73
|
+
});
|
|
74
|
+
// Initialize watching for user and project settings
|
|
75
|
+
const { userPaths, projectPaths } = this.getConfigurationPaths();
|
|
76
|
+
await this.configurationWatcher.initializeWatching(userPaths, projectPaths);
|
|
77
|
+
this.logger?.info("Live Config: Configuration watching initialized");
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Initialize memory store watching for AGENTS.md files
|
|
81
|
+
*/
|
|
82
|
+
async initializeMemoryStoreWatching() {
|
|
83
|
+
if (!this.onMemoryStoreFileChanged || !this.configurationWatcher) {
|
|
84
|
+
this.logger?.debug("Live Config: Memory store callback or configuration watcher not available, skipping AGENTS.md watching");
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
const agentsFilePath = join(this.workdir, "AGENTS.md");
|
|
89
|
+
// Add AGENTS.md to file watcher
|
|
90
|
+
await this.configurationWatcher.watchAdditionalFile(agentsFilePath, async (event) => {
|
|
91
|
+
await this.handleMemoryStoreFileChange(event);
|
|
92
|
+
});
|
|
93
|
+
this.logger?.info("Live Config: AGENTS.md file watching initialized");
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
this.logger?.warn(`Live Config: Failed to initialize AGENTS.md watching: ${error.message}`);
|
|
97
|
+
// Don't throw - memory optimization is not critical for core functionality
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Handle configuration change events
|
|
102
|
+
*/
|
|
103
|
+
handleConfigurationChange(event) {
|
|
104
|
+
this.logger?.info(`Live Config: Configuration change detected: ${event.type} at ${event.path}`);
|
|
105
|
+
// Invalidate and refresh configuration cache for live environment variable updates
|
|
106
|
+
configResolver.invalidateCache(this.workdir);
|
|
107
|
+
configResolver.refreshCache(this.workdir);
|
|
108
|
+
// Trigger Agent configuration update callback if provided
|
|
109
|
+
if (this.onConfigurationChanged) {
|
|
110
|
+
try {
|
|
111
|
+
this.logger?.info("Live Config: Triggering Agent configuration update");
|
|
112
|
+
this.onConfigurationChanged();
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
this.logger?.error(`Live Config: Error in configuration change callback: ${error.message}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Log cache status after refresh
|
|
119
|
+
const cacheStatus = configResolver.getCacheStatus();
|
|
120
|
+
if (cacheStatus) {
|
|
121
|
+
this.logger?.info(`Live Config: Configuration cache refreshed - ${cacheStatus.envVarCount} environment variables loaded`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Handle AGENTS.md file change events
|
|
126
|
+
*/
|
|
127
|
+
async handleMemoryStoreFileChange(event) {
|
|
128
|
+
if (!this.onMemoryStoreFileChanged) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
try {
|
|
132
|
+
this.logger?.info(`Live Config: AGENTS.md ${event.type} detected: ${event.path}`);
|
|
133
|
+
const changeType = event.type === "delete"
|
|
134
|
+
? "unlink"
|
|
135
|
+
: event.type === "create"
|
|
136
|
+
? "add"
|
|
137
|
+
: "change";
|
|
138
|
+
await this.onMemoryStoreFileChanged(event.path, changeType);
|
|
139
|
+
this.logger?.info(`Live Config: Memory store updated for AGENTS.md ${event.type}`);
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
this.logger?.error(`Live Config: Failed to handle AGENTS.md file change: ${error.message}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Get initialization status
|
|
147
|
+
*/
|
|
148
|
+
get initialized() {
|
|
149
|
+
return this.isInitialized;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get configuration file paths for user and project settings
|
|
153
|
+
* Returns paths in priority order (local.json first, then .json)
|
|
154
|
+
*/
|
|
155
|
+
getConfigurationPaths() {
|
|
156
|
+
const userPaths = getUserConfigPaths();
|
|
157
|
+
const projectPaths = getProjectConfigPaths(this.workdir);
|
|
158
|
+
return { userPaths, projectPaths };
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { UserMessageParams, type AgentToolBlockUpdateParams } from "../utils/messageOperations.js";
|
|
2
|
+
import type { SubagentConfiguration } from "../utils/subagentParser.js";
|
|
2
3
|
import type { Logger, Message, Usage } from "../types/index.js";
|
|
4
|
+
import { SessionData } from "../services/session.js";
|
|
3
5
|
import { ChatCompletionMessageFunctionToolCall } from "openai/resources.js";
|
|
4
6
|
export interface MessageManagerCallbacks {
|
|
5
7
|
onMessagesChange?: (messages: Message[]) => void;
|
|
@@ -8,7 +10,8 @@ export interface MessageManagerCallbacks {
|
|
|
8
10
|
onUserInputHistoryChange?: (history: string[]) => void;
|
|
9
11
|
onUsagesChange?: (usages: Usage[]) => void;
|
|
10
12
|
onUserMessageAdded?: (params: UserMessageParams) => void;
|
|
11
|
-
onAssistantMessageAdded?: (
|
|
13
|
+
onAssistantMessageAdded?: () => void;
|
|
14
|
+
onAssistantContentUpdated?: (chunk: string, accumulated: string) => void;
|
|
12
15
|
onToolBlockUpdated?: (params: AgentToolBlockUpdateParams) => void;
|
|
13
16
|
onDiffBlockAdded?: (filePath: string, diffResult: string) => void;
|
|
14
17
|
onErrorBlockAdded?: (error: string) => void;
|
|
@@ -23,17 +26,15 @@ export interface MessageManagerCallbacks {
|
|
|
23
26
|
prompt: string;
|
|
24
27
|
subagent_type: string;
|
|
25
28
|
}) => void;
|
|
26
|
-
onSubAgentBlockUpdated?: (subagentId: string,
|
|
29
|
+
onSubAgentBlockUpdated?: (subagentId: string, status: "active" | "completed" | "error" | "aborted") => void;
|
|
27
30
|
}
|
|
28
31
|
export interface MessageManagerOptions {
|
|
29
32
|
callbacks: MessageManagerCallbacks;
|
|
30
33
|
workdir: string;
|
|
31
34
|
logger?: Logger;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*/
|
|
36
|
-
sessionDir?: string;
|
|
35
|
+
sessionType?: "main" | "subagent";
|
|
36
|
+
parentSessionId?: string;
|
|
37
|
+
subagentType?: string;
|
|
37
38
|
}
|
|
38
39
|
export declare class MessageManager {
|
|
39
40
|
private sessionId;
|
|
@@ -42,16 +43,33 @@ export declare class MessageManager {
|
|
|
42
43
|
private userInputHistory;
|
|
43
44
|
private sessionStartTime;
|
|
44
45
|
private workdir;
|
|
46
|
+
private encodedWorkdir;
|
|
45
47
|
private logger?;
|
|
46
48
|
private callbacks;
|
|
47
|
-
private
|
|
49
|
+
private transcriptPath;
|
|
50
|
+
private savedMessageCount;
|
|
51
|
+
private sessionType;
|
|
52
|
+
private parentSessionId?;
|
|
53
|
+
private subagentType?;
|
|
48
54
|
constructor(options: MessageManagerOptions);
|
|
49
55
|
getSessionId(): string;
|
|
50
56
|
getMessages(): Message[];
|
|
51
57
|
getlatestTotalTokens(): number;
|
|
52
58
|
getUserInputHistory(): string[];
|
|
59
|
+
getSessionStartTime(): string;
|
|
60
|
+
getWorkdir(): string;
|
|
61
|
+
getSessionDir(): string;
|
|
53
62
|
getTranscriptPath(): string;
|
|
63
|
+
/**
|
|
64
|
+
* Compute the transcript path using cached encoded workdir
|
|
65
|
+
* Called during construction and when sessionId changes
|
|
66
|
+
*/
|
|
67
|
+
private computeTranscriptPath;
|
|
54
68
|
setSessionId(sessionId: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Create session if needed (async helper)
|
|
71
|
+
*/
|
|
72
|
+
private createSessionIfNeeded;
|
|
55
73
|
setMessages(messages: Message[]): void;
|
|
56
74
|
/**
|
|
57
75
|
* Save current session
|
|
@@ -67,11 +85,12 @@ export declare class MessageManager {
|
|
|
67
85
|
* Clear messages and input history
|
|
68
86
|
*/
|
|
69
87
|
clearMessages(): void;
|
|
70
|
-
initializeFromSession(
|
|
88
|
+
initializeFromSession(sessionData: SessionData): void;
|
|
71
89
|
addToInputHistory(input: string): void;
|
|
72
90
|
clearInputHistory(): void;
|
|
73
91
|
addUserMessage(params: UserMessageParams): void;
|
|
74
|
-
addAssistantMessage(content?: string, toolCalls?: ChatCompletionMessageFunctionToolCall[], usage?: Usage): void;
|
|
92
|
+
addAssistantMessage(content?: string, toolCalls?: ChatCompletionMessageFunctionToolCall[], usage?: Usage, metadata?: Record<string, unknown>): void;
|
|
93
|
+
mergeAssistantMetadata(metadata: Record<string, unknown>): void;
|
|
75
94
|
updateToolBlock(params: AgentToolBlockUpdateParams): void;
|
|
76
95
|
addDiffBlock(filePath: string, diffResult: Array<{
|
|
77
96
|
value: string;
|
|
@@ -82,24 +101,30 @@ export declare class MessageManager {
|
|
|
82
101
|
/**
|
|
83
102
|
* Compress messages and update session, delete compressed messages, only keep compressed messages and subsequent messages
|
|
84
103
|
*/
|
|
85
|
-
compressMessagesAndUpdateSession(insertIndex: number, compressedContent: string): void;
|
|
104
|
+
compressMessagesAndUpdateSession(insertIndex: number, compressedContent: string, usage?: Usage): void;
|
|
86
105
|
addMemoryBlock(content: string, success: boolean, type: "project" | "user", storagePath: string): void;
|
|
87
106
|
addCommandOutputMessage(command: string): void;
|
|
88
107
|
updateCommandOutputMessage(command: string, output: string): void;
|
|
89
108
|
completeCommandMessage(command: string, exitCode: number): void;
|
|
90
|
-
addSubagentBlock(subagentId: string, subagentName: string, status: "active" | "completed" | "error" | undefined,
|
|
109
|
+
addSubagentBlock(subagentId: string, subagentName: string, sessionId: string, configuration: SubagentConfiguration, status: "active" | "completed" | "error" | undefined, parameters: {
|
|
91
110
|
description: string;
|
|
92
111
|
prompt: string;
|
|
93
112
|
subagent_type: string;
|
|
94
113
|
}): void;
|
|
95
114
|
updateSubagentBlock(subagentId: string, updates: Partial<{
|
|
96
115
|
status: "active" | "completed" | "error" | "aborted";
|
|
97
|
-
|
|
116
|
+
sessionId: string;
|
|
98
117
|
}>): void;
|
|
99
118
|
/**
|
|
100
119
|
* Trigger usage change callback with all usage data from assistant messages
|
|
101
120
|
*/
|
|
102
121
|
triggerUsageChange(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Update the current assistant message content during streaming
|
|
124
|
+
* This method updates the last assistant message's content without creating a new message
|
|
125
|
+
* FR-001: Tracks and provides both chunk (new content) and accumulated (total content)
|
|
126
|
+
*/
|
|
127
|
+
updateCurrentMessageContent(newAccumulatedContent: string): void;
|
|
103
128
|
/**
|
|
104
129
|
* Remove the last user message from the conversation
|
|
105
130
|
* Used for hook error handling when the user prompt needs to be erased
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageManager.d.ts","sourceRoot":"","sources":["../../src/managers/messageManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messageManager.d.ts","sourceRoot":"","sources":["../../src/managers/messageManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAcL,iBAAiB,EAGjB,KAAK,0BAA0B,EAChC,MAAM,+BAA+B,CAAC;A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