wave-agent-sdk 0.19.5 → 0.19.7
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 +30 -14
- package/dist/agent.js +70 -56
- package/dist/constants/goalPrompts.d.ts +0 -1
- package/dist/constants/subagents.d.ts +0 -1
- package/dist/constants/toolLimits.d.ts +0 -1
- package/dist/constants/tools.d.ts +0 -1
- package/dist/core/plugin.d.ts +0 -1
- package/dist/core/session.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/managers/MemoryRuleManager.d.ts +0 -1
- package/dist/managers/aiManager.d.ts +15 -2
- package/dist/managers/aiManager.js +65 -11
- package/dist/managers/backgroundTaskManager.d.ts +1 -3
- package/dist/managers/backgroundTaskManager.js +20 -22
- package/dist/managers/bangManager.d.ts +0 -1
- package/dist/managers/bangManager.js +2 -1
- package/dist/managers/cronManager.d.ts +0 -1
- package/dist/managers/foregroundTaskManager.d.ts +0 -1
- package/dist/managers/forkedAgentManager.d.ts +0 -1
- package/dist/managers/goalManager.d.ts +0 -1
- package/dist/managers/hookManager.d.ts +0 -1
- package/dist/managers/liveConfigManager.d.ts +0 -1
- package/dist/managers/lspManager.d.ts +0 -1
- package/dist/managers/mcpManager.d.ts +0 -1
- package/dist/managers/messageManager.d.ts +7 -1
- package/dist/managers/messageManager.js +64 -5
- package/dist/managers/messageQueue.d.ts +25 -2
- package/dist/managers/messageQueue.js +53 -1
- package/dist/managers/permissionManager.d.ts +0 -1
- package/dist/managers/permissionManager.js +3 -3
- package/dist/managers/planManager.d.ts +0 -1
- package/dist/managers/pluginManager.d.ts +0 -1
- package/dist/managers/pluginScopeManager.d.ts +0 -1
- package/dist/managers/reversionManager.d.ts +0 -1
- package/dist/managers/skillManager.d.ts +0 -1
- package/dist/managers/slashCommandManager.d.ts +0 -1
- package/dist/managers/subagentManager.d.ts +0 -3
- package/dist/managers/subagentManager.js +15 -14
- package/dist/managers/toolManager.d.ts +0 -1
- package/dist/managers/workflowManager.d.ts +1 -2
- package/dist/managers/workflowManager.js +4 -4
- package/dist/prompts/autoMemory.d.ts +0 -1
- package/dist/prompts/autoMemoryExtraction.d.ts +0 -1
- package/dist/prompts/index.d.ts +3 -2
- package/dist/prompts/index.js +2 -4
- package/dist/prompts/planModeReminders.d.ts +0 -1
- package/dist/services/GitService.d.ts +0 -1
- package/dist/services/MarketplaceService.d.ts +0 -1
- package/dist/services/MemoryRuleService.d.ts +0 -1
- package/dist/services/aiService.d.ts +0 -1
- package/dist/services/authService.d.ts +0 -1
- package/dist/services/autoMemoryService.d.ts +0 -1
- package/dist/services/configurationService.d.ts +0 -1
- package/dist/services/fileWatcher.d.ts +0 -1
- package/dist/services/hook.d.ts +0 -1
- package/dist/services/hook.js +6 -0
- package/dist/services/initializationService.d.ts +0 -1
- package/dist/services/interactionService.d.ts +0 -1
- package/dist/services/interactionService.js +10 -0
- package/dist/services/jsonlHandler.d.ts +0 -1
- package/dist/services/memory.d.ts +0 -1
- package/dist/services/pluginLoader.d.ts +0 -1
- package/dist/services/remoteSettingsService.d.ts +0 -1
- package/dist/services/reversionService.d.ts +0 -1
- package/dist/services/session.d.ts +0 -1
- package/dist/services/taskManager.d.ts +0 -1
- package/dist/services/taskManager.js +8 -1
- package/dist/telemetry/events.d.ts +0 -1
- package/dist/telemetry/instrumentation.d.ts +0 -1
- package/dist/telemetry/sessionTracing.d.ts +0 -1
- package/dist/tools/agentTool.d.ts +0 -1
- package/dist/tools/askUserQuestion.d.ts +0 -1
- package/dist/tools/bashTool.d.ts +0 -1
- package/dist/tools/bashTool.js +7 -5
- package/dist/tools/buildTool.d.ts +0 -1
- package/dist/tools/cronCreateTool.d.ts +0 -1
- package/dist/tools/cronDeleteTool.d.ts +0 -1
- package/dist/tools/cronListTool.d.ts +0 -1
- package/dist/tools/editTool.d.ts +0 -1
- package/dist/tools/enterPlanMode.d.ts +0 -1
- package/dist/tools/enterWorktreeTool.d.ts +0 -1
- package/dist/tools/enterWorktreeTool.js +3 -8
- package/dist/tools/exitPlanMode.d.ts +0 -1
- package/dist/tools/exitWorktreeTool.d.ts +0 -1
- package/dist/tools/exitWorktreeTool.js +5 -8
- package/dist/tools/globTool.d.ts +0 -1
- package/dist/tools/grepTool.d.ts +0 -1
- package/dist/tools/lspTool.d.ts +0 -1
- package/dist/tools/readTool.d.ts +0 -1
- package/dist/tools/skillTool.d.ts +0 -1
- package/dist/tools/taskManagementTools.d.ts +0 -1
- package/dist/tools/taskStopTool.d.ts +0 -1
- package/dist/tools/types.d.ts +0 -1
- package/dist/tools/webFetchTool.d.ts +0 -1
- package/dist/tools/workflowTool.d.ts +0 -1
- package/dist/tools/writeTool.d.ts +0 -1
- package/dist/types/agent.d.ts +0 -1
- package/dist/types/auth.d.ts +0 -1
- package/dist/types/commands.d.ts +0 -1
- package/dist/types/config.d.ts +0 -1
- package/dist/types/configuration.d.ts +0 -1
- package/dist/types/core.d.ts +0 -1
- package/dist/types/cron.d.ts +0 -1
- package/dist/types/environment.d.ts +0 -1
- package/dist/types/fileSearch.d.ts +0 -1
- package/dist/types/history.d.ts +0 -1
- package/dist/types/hooks.d.ts +2 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/lsp.d.ts +0 -1
- package/dist/types/marketplace.d.ts +0 -1
- package/dist/types/mcp.d.ts +0 -1
- package/dist/types/memoryRule.d.ts +0 -1
- package/dist/types/messaging.d.ts +2 -1
- package/dist/types/permissions.d.ts +0 -1
- package/dist/types/plugins.d.ts +0 -1
- package/dist/types/processes.d.ts +0 -1
- package/dist/types/reversion.d.ts +0 -1
- package/dist/types/session.d.ts +0 -1
- package/dist/types/skills.d.ts +0 -1
- package/dist/types/tasks.d.ts +0 -1
- package/dist/types/telemetry.d.ts +0 -1
- package/dist/types/tools.d.ts +0 -1
- package/dist/types/workflow.d.ts +0 -1
- package/dist/utils/abortUtils.d.ts +0 -1
- package/dist/utils/atomicWrite.d.ts +0 -1
- package/dist/utils/bashParser.d.ts +0 -1
- package/dist/utils/cacheControlUtils.d.ts +0 -1
- package/dist/utils/commandArgumentParser.d.ts +0 -1
- package/dist/utils/commandPathResolver.d.ts +0 -1
- package/dist/utils/configPaths.d.ts +0 -1
- package/dist/utils/configValidator.d.ts +0 -1
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/container.d.ts +0 -1
- package/dist/utils/containerSetup.d.ts +0 -1
- package/dist/utils/containerSetup.js +3 -3
- package/dist/utils/convertMessagesForAPI.d.ts +0 -1
- package/dist/utils/cronTasks.d.ts +0 -1
- package/dist/utils/cronTasksLock.d.ts +0 -1
- package/dist/utils/cronToHuman.d.ts +0 -1
- package/dist/utils/customCommands.d.ts +0 -1
- package/dist/utils/editUtils.d.ts +0 -1
- package/dist/utils/fileFormat.d.ts +0 -1
- package/dist/utils/fileSearch.d.ts +0 -1
- package/dist/utils/fileUtils.d.ts +0 -1
- package/dist/utils/gitUtils.d.ts +0 -1
- package/dist/utils/globalLogger.d.ts +0 -1
- package/dist/utils/groupMessagesByApiRound.d.ts +0 -1
- package/dist/utils/hookMatcher.d.ts +0 -1
- package/dist/utils/markdownParser.d.ts +0 -1
- package/dist/utils/mcpUtils.d.ts +0 -1
- package/dist/utils/messageOperations.d.ts +0 -1
- package/dist/utils/modelCapabilities.d.ts +0 -1
- package/dist/utils/nameGenerator.d.ts +0 -1
- package/dist/utils/notificationXml.d.ts +0 -1
- package/dist/utils/openaiClient.d.ts +0 -1
- package/dist/utils/parseCronExpression.d.ts +0 -1
- package/dist/utils/path.d.ts +0 -1
- package/dist/utils/pathEncoder.d.ts +0 -1
- package/dist/utils/pathSafety.d.ts +0 -1
- package/dist/utils/promptHistory.d.ts +0 -1
- package/dist/utils/ripgrep.d.ts +0 -1
- package/dist/utils/shellResolver.d.ts +0 -1
- package/dist/utils/shellResolver.js +156 -7
- package/dist/utils/skillParser.d.ts +0 -1
- package/dist/utils/stringUtils.d.ts +0 -1
- package/dist/utils/subagentParser.d.ts +0 -1
- package/dist/utils/taskReminder.d.ts +0 -1
- package/dist/utils/tokenCalculation.d.ts +0 -1
- package/dist/utils/tokenEstimate.d.ts +0 -1
- package/dist/utils/toolResultStorage.d.ts +0 -1
- package/dist/utils/worktreeSession.d.ts +6 -7
- package/dist/utils/worktreeSession.js +7 -11
- package/dist/utils/worktreeUtils.d.ts +0 -1
- package/dist/workflow/budgetTracker.d.ts +0 -1
- package/dist/workflow/concurrencyLimiter.d.ts +0 -1
- package/dist/workflow/journal.d.ts +0 -1
- package/dist/workflow/progressReporter.d.ts +0 -1
- package/dist/workflow/runState.d.ts +0 -1
- package/dist/workflow/scriptRuntime.d.ts +0 -1
- package/dist/workflow/structuredOutput.d.ts +0 -1
- package/dist/workflow/types.d.ts +0 -1
- package/dist/workflow/workflowApis.d.ts +0 -1
- package/package.json +1 -1
- package/src/agent.ts +80 -67
- package/src/managers/aiManager.ts +79 -12
- package/src/managers/backgroundTaskManager.ts +21 -23
- package/src/managers/bangManager.ts +2 -1
- package/src/managers/messageManager.ts +72 -6
- package/src/managers/messageQueue.ts +60 -2
- package/src/managers/permissionManager.ts +6 -3
- package/src/managers/subagentManager.ts +22 -16
- package/src/managers/workflowManager.ts +5 -5
- package/src/prompts/index.ts +4 -4
- package/src/services/hook.ts +9 -0
- package/src/services/interactionService.ts +11 -0
- package/src/services/taskManager.ts +8 -1
- 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 +3 -3
- package/src/utils/shellResolver.ts +167 -8
- package/src/utils/worktreeSession.ts +6 -16
- package/dist/agent.d.ts.map +0 -1
- package/dist/constants/goalPrompts.d.ts.map +0 -1
- package/dist/constants/subagents.d.ts.map +0 -1
- package/dist/constants/toolLimits.d.ts.map +0 -1
- package/dist/constants/tools.d.ts.map +0 -1
- package/dist/core/plugin.d.ts.map +0 -1
- package/dist/core/session.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/managers/MemoryRuleManager.d.ts.map +0 -1
- package/dist/managers/aiManager.d.ts.map +0 -1
- package/dist/managers/backgroundTaskManager.d.ts.map +0 -1
- package/dist/managers/bangManager.d.ts.map +0 -1
- package/dist/managers/cronManager.d.ts.map +0 -1
- package/dist/managers/foregroundTaskManager.d.ts.map +0 -1
- package/dist/managers/forkedAgentManager.d.ts.map +0 -1
- package/dist/managers/goalManager.d.ts.map +0 -1
- package/dist/managers/hookManager.d.ts.map +0 -1
- package/dist/managers/liveConfigManager.d.ts.map +0 -1
- package/dist/managers/lspManager.d.ts.map +0 -1
- package/dist/managers/mcpManager.d.ts.map +0 -1
- package/dist/managers/messageManager.d.ts.map +0 -1
- package/dist/managers/messageQueue.d.ts.map +0 -1
- package/dist/managers/notificationQueue.d.ts +0 -8
- package/dist/managers/notificationQueue.d.ts.map +0 -1
- package/dist/managers/notificationQueue.js +0 -17
- package/dist/managers/permissionManager.d.ts.map +0 -1
- package/dist/managers/planManager.d.ts.map +0 -1
- package/dist/managers/pluginManager.d.ts.map +0 -1
- package/dist/managers/pluginScopeManager.d.ts.map +0 -1
- package/dist/managers/reversionManager.d.ts.map +0 -1
- package/dist/managers/skillManager.d.ts.map +0 -1
- package/dist/managers/slashCommandManager.d.ts.map +0 -1
- package/dist/managers/subagentManager.d.ts.map +0 -1
- package/dist/managers/toolManager.d.ts.map +0 -1
- package/dist/managers/workflowManager.d.ts.map +0 -1
- package/dist/prompts/autoMemory.d.ts.map +0 -1
- package/dist/prompts/autoMemoryExtraction.d.ts.map +0 -1
- package/dist/prompts/index.d.ts.map +0 -1
- package/dist/prompts/planModeReminders.d.ts.map +0 -1
- package/dist/services/GitService.d.ts.map +0 -1
- package/dist/services/MarketplaceService.d.ts.map +0 -1
- package/dist/services/MemoryRuleService.d.ts.map +0 -1
- package/dist/services/aiService.d.ts.map +0 -1
- package/dist/services/authService.d.ts.map +0 -1
- package/dist/services/autoMemoryService.d.ts.map +0 -1
- package/dist/services/configurationService.d.ts.map +0 -1
- package/dist/services/fileWatcher.d.ts.map +0 -1
- package/dist/services/hook.d.ts.map +0 -1
- package/dist/services/initializationService.d.ts.map +0 -1
- package/dist/services/interactionService.d.ts.map +0 -1
- package/dist/services/jsonlHandler.d.ts.map +0 -1
- package/dist/services/memory.d.ts.map +0 -1
- package/dist/services/pluginLoader.d.ts.map +0 -1
- package/dist/services/remoteSettingsService.d.ts.map +0 -1
- package/dist/services/reversionService.d.ts.map +0 -1
- package/dist/services/session.d.ts.map +0 -1
- package/dist/services/taskManager.d.ts.map +0 -1
- package/dist/telemetry/events.d.ts.map +0 -1
- package/dist/telemetry/instrumentation.d.ts.map +0 -1
- package/dist/telemetry/sessionTracing.d.ts.map +0 -1
- package/dist/tools/agentTool.d.ts.map +0 -1
- package/dist/tools/askUserQuestion.d.ts.map +0 -1
- package/dist/tools/bashTool.d.ts.map +0 -1
- package/dist/tools/buildTool.d.ts.map +0 -1
- package/dist/tools/cronCreateTool.d.ts.map +0 -1
- package/dist/tools/cronDeleteTool.d.ts.map +0 -1
- package/dist/tools/cronListTool.d.ts.map +0 -1
- package/dist/tools/editTool.d.ts.map +0 -1
- package/dist/tools/enterPlanMode.d.ts.map +0 -1
- package/dist/tools/enterWorktreeTool.d.ts.map +0 -1
- package/dist/tools/exitPlanMode.d.ts.map +0 -1
- package/dist/tools/exitWorktreeTool.d.ts.map +0 -1
- package/dist/tools/globTool.d.ts.map +0 -1
- package/dist/tools/grepTool.d.ts.map +0 -1
- package/dist/tools/lspTool.d.ts.map +0 -1
- package/dist/tools/readTool.d.ts.map +0 -1
- package/dist/tools/skillTool.d.ts.map +0 -1
- package/dist/tools/taskManagementTools.d.ts.map +0 -1
- package/dist/tools/taskStopTool.d.ts.map +0 -1
- package/dist/tools/types.d.ts.map +0 -1
- package/dist/tools/webFetchTool.d.ts.map +0 -1
- package/dist/tools/workflowTool.d.ts.map +0 -1
- package/dist/tools/writeTool.d.ts.map +0 -1
- package/dist/types/agent.d.ts.map +0 -1
- package/dist/types/auth.d.ts.map +0 -1
- package/dist/types/commands.d.ts.map +0 -1
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/configuration.d.ts.map +0 -1
- package/dist/types/core.d.ts.map +0 -1
- package/dist/types/cron.d.ts.map +0 -1
- package/dist/types/environment.d.ts.map +0 -1
- package/dist/types/fileSearch.d.ts.map +0 -1
- package/dist/types/history.d.ts.map +0 -1
- package/dist/types/hooks.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lsp.d.ts.map +0 -1
- package/dist/types/marketplace.d.ts.map +0 -1
- package/dist/types/mcp.d.ts.map +0 -1
- package/dist/types/memoryRule.d.ts.map +0 -1
- package/dist/types/messaging.d.ts.map +0 -1
- package/dist/types/permissions.d.ts.map +0 -1
- package/dist/types/plugins.d.ts.map +0 -1
- package/dist/types/processes.d.ts.map +0 -1
- package/dist/types/reversion.d.ts.map +0 -1
- package/dist/types/session.d.ts.map +0 -1
- package/dist/types/skills.d.ts.map +0 -1
- package/dist/types/tasks.d.ts.map +0 -1
- package/dist/types/telemetry.d.ts.map +0 -1
- package/dist/types/tools.d.ts.map +0 -1
- package/dist/types/workflow.d.ts.map +0 -1
- package/dist/utils/abortUtils.d.ts.map +0 -1
- package/dist/utils/atomicWrite.d.ts.map +0 -1
- package/dist/utils/bashParser.d.ts.map +0 -1
- package/dist/utils/cacheControlUtils.d.ts.map +0 -1
- package/dist/utils/commandArgumentParser.d.ts.map +0 -1
- package/dist/utils/commandPathResolver.d.ts.map +0 -1
- package/dist/utils/configPaths.d.ts.map +0 -1
- package/dist/utils/configValidator.d.ts.map +0 -1
- package/dist/utils/constants.d.ts.map +0 -1
- package/dist/utils/container.d.ts.map +0 -1
- package/dist/utils/containerSetup.d.ts.map +0 -1
- package/dist/utils/convertMessagesForAPI.d.ts.map +0 -1
- package/dist/utils/cronTasks.d.ts.map +0 -1
- package/dist/utils/cronTasksLock.d.ts.map +0 -1
- package/dist/utils/cronToHuman.d.ts.map +0 -1
- package/dist/utils/customCommands.d.ts.map +0 -1
- package/dist/utils/editUtils.d.ts.map +0 -1
- package/dist/utils/fileFormat.d.ts.map +0 -1
- package/dist/utils/fileSearch.d.ts.map +0 -1
- package/dist/utils/fileUtils.d.ts.map +0 -1
- package/dist/utils/gitUtils.d.ts.map +0 -1
- package/dist/utils/globalLogger.d.ts.map +0 -1
- package/dist/utils/groupMessagesByApiRound.d.ts.map +0 -1
- package/dist/utils/hookMatcher.d.ts.map +0 -1
- package/dist/utils/markdownParser.d.ts.map +0 -1
- package/dist/utils/mcpUtils.d.ts.map +0 -1
- package/dist/utils/messageOperations.d.ts.map +0 -1
- package/dist/utils/modelCapabilities.d.ts.map +0 -1
- package/dist/utils/nameGenerator.d.ts.map +0 -1
- package/dist/utils/notificationXml.d.ts.map +0 -1
- package/dist/utils/openaiClient.d.ts.map +0 -1
- package/dist/utils/parseCronExpression.d.ts.map +0 -1
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/pathEncoder.d.ts.map +0 -1
- package/dist/utils/pathSafety.d.ts.map +0 -1
- package/dist/utils/promptHistory.d.ts.map +0 -1
- package/dist/utils/ripgrep.d.ts.map +0 -1
- package/dist/utils/shellResolver.d.ts.map +0 -1
- package/dist/utils/skillParser.d.ts.map +0 -1
- package/dist/utils/stringUtils.d.ts.map +0 -1
- package/dist/utils/subagentParser.d.ts.map +0 -1
- package/dist/utils/taskReminder.d.ts.map +0 -1
- package/dist/utils/tokenCalculation.d.ts.map +0 -1
- package/dist/utils/tokenEstimate.d.ts.map +0 -1
- package/dist/utils/toolResultStorage.d.ts.map +0 -1
- package/dist/utils/worktreeSession.d.ts.map +0 -1
- package/dist/utils/worktreeUtils.d.ts.map +0 -1
- package/dist/workflow/budgetTracker.d.ts.map +0 -1
- package/dist/workflow/concurrencyLimiter.d.ts.map +0 -1
- package/dist/workflow/journal.d.ts.map +0 -1
- package/dist/workflow/progressReporter.d.ts.map +0 -1
- package/dist/workflow/runState.d.ts.map +0 -1
- package/dist/workflow/scriptRuntime.d.ts.map +0 -1
- package/dist/workflow/structuredOutput.d.ts.map +0 -1
- package/dist/workflow/types.d.ts.map +0 -1
- package/dist/workflow/workflowApis.d.ts.map +0 -1
- package/src/managers/notificationQueue.ts +0 -19
package/dist/types/lsp.d.ts
CHANGED
package/dist/types/mcp.d.ts
CHANGED
|
@@ -74,6 +74,8 @@ export interface ReasoningBlock {
|
|
|
74
74
|
type: "reasoning";
|
|
75
75
|
content: string;
|
|
76
76
|
stage?: "streaming" | "end";
|
|
77
|
+
startTime?: number;
|
|
78
|
+
endTime?: number;
|
|
77
79
|
}
|
|
78
80
|
export interface FileHistoryBlock {
|
|
79
81
|
type: "file_history";
|
|
@@ -87,4 +89,3 @@ export interface TaskNotificationBlock {
|
|
|
87
89
|
summary: string;
|
|
88
90
|
outputFile?: string;
|
|
89
91
|
}
|
|
90
|
-
//# sourceMappingURL=messaging.d.ts.map
|
|
@@ -45,4 +45,3 @@ export declare const RESTRICTED_TOOLS: readonly ["Edit", "Bash", "Write", "Enter
|
|
|
45
45
|
export type RestrictedTool = (typeof RESTRICTED_TOOLS)[number];
|
|
46
46
|
export declare const OPERATION_CANCELLED_BY_USER = "Operation cancelled by user";
|
|
47
47
|
export type { AskUserQuestion, AskUserQuestionInput, AskUserQuestionOption };
|
|
48
|
-
//# sourceMappingURL=permissions.d.ts.map
|
package/dist/types/plugins.d.ts
CHANGED
package/dist/types/session.d.ts
CHANGED
package/dist/types/skills.d.ts
CHANGED
package/dist/types/tasks.d.ts
CHANGED
|
@@ -81,4 +81,3 @@ export interface ToolMetadata {
|
|
|
81
81
|
}
|
|
82
82
|
/** Event names for OTel structured logging */
|
|
83
83
|
export type OTelEventName = "session_start" | "session_end" | "user_prompt" | "tool_decision" | "compaction" | "error" | "system_prompt" | "tool_schema";
|
|
84
|
-
//# sourceMappingURL=telemetry.d.ts.map
|
package/dist/types/tools.d.ts
CHANGED
package/dist/types/workflow.d.ts
CHANGED
|
@@ -31,4 +31,3 @@ export declare function withAbortCleanup<T>(signal: AbortSignal, operation: (sig
|
|
|
31
31
|
* @returns Cleanup function to remove the consolidated listener
|
|
32
32
|
*/
|
|
33
33
|
export declare function addConsolidatedAbortListener(signal: AbortSignal, callbacks: (() => void)[]): () => void;
|
|
34
|
-
//# sourceMappingURL=abortUtils.d.ts.map
|
|
@@ -51,4 +51,3 @@ export declare function isDangerousFind(command: string): boolean;
|
|
|
51
51
|
* Returns null if the command is blacklisted or cannot be safely prefix-matched.
|
|
52
52
|
*/
|
|
53
53
|
export declare function getSmartPrefix(command: string): string | null;
|
|
54
|
-
//# sourceMappingURL=bashParser.d.ts.map
|
|
@@ -98,4 +98,3 @@ export declare function extendUsageWithCacheMetrics(standardUsage: CompletionUsa
|
|
|
98
98
|
* @returns True if usage structure is valid
|
|
99
99
|
*/
|
|
100
100
|
export declare function isValidClaudeUsage(usage: unknown): usage is ClaudeUsage;
|
|
101
|
-
//# sourceMappingURL=cacheControlUtils.d.ts.map
|
|
@@ -31,4 +31,3 @@ export declare function hasParameterPlaceholders(content: string): boolean;
|
|
|
31
31
|
* Get all parameter placeholders used in content
|
|
32
32
|
*/
|
|
33
33
|
export declare function getUsedParameterPlaceholders(content: string): string[];
|
|
34
|
-
//# sourceMappingURL=commandArgumentParser.d.ts.map
|
|
@@ -28,4 +28,3 @@ export declare const DEFAULT_WAVE_MAX_OUTPUT_TOKENS = 32000;
|
|
|
28
28
|
* Overridden by WAVE_SERVER_URL env var or programmatic AgentOptions.serverUrl.
|
|
29
29
|
*/
|
|
30
30
|
export declare const DEFAULT_SERVER_URL = "https://codechat.codewave.163.com";
|
|
31
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Container } from "./container.js";
|
|
2
2
|
import { ForegroundTaskManager } from "../managers/foregroundTaskManager.js";
|
|
3
3
|
import { BackgroundTaskManager } from "../managers/backgroundTaskManager.js";
|
|
4
|
-
import { NotificationQueue } from "../managers/notificationQueue.js";
|
|
5
4
|
import { MessageQueue } from "../managers/messageQueue.js";
|
|
6
5
|
import { TaskManager } from "../services/taskManager.js";
|
|
7
6
|
import { MessageManager } from "../managers/messageManager.js";
|
|
@@ -42,8 +41,9 @@ export function setupAgentContainer(setupOptions) {
|
|
|
42
41
|
container.register("WorktreeName", options.worktreeName);
|
|
43
42
|
container.register("MainRepoRoot", getGitMainRepoRoot(workdir));
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
container
|
|
44
|
+
// Per-agent worktree session state (EnterWorktree/ExitWorktree). Stored in the
|
|
45
|
+
// container so it is isolated per session, not shared process-wide.
|
|
46
|
+
container.register("WorktreeSession", null);
|
|
47
47
|
const messageQueue = new MessageQueue();
|
|
48
48
|
container.register("MessageQueue", messageQueue);
|
|
49
49
|
const foregroundTaskManager = new ForegroundTaskManager(container);
|
|
@@ -15,4 +15,3 @@ export interface ConvertMessagesOptions {
|
|
|
15
15
|
* @returns Converted API message format list
|
|
16
16
|
*/
|
|
17
17
|
export declare function convertMessagesForAPI(messages: Message[], options?: ConvertMessagesOptions): ChatCompletionMessageParam[];
|
|
18
|
-
//# sourceMappingURL=convertMessagesForAPI.d.ts.map
|
|
@@ -5,4 +5,3 @@ export declare function writeCronTasks(tasks: CronJob[], dir?: string): void;
|
|
|
5
5
|
export declare function addCronTask(job: CronJob, dir?: string): void;
|
|
6
6
|
export declare function removeCronTasks(ids: string[], dir?: string): void;
|
|
7
7
|
export declare function markCronTasksFired(ids: string[], firedAt: number, dir?: string): void;
|
|
8
|
-
//# sourceMappingURL=cronTasks.d.ts.map
|
|
@@ -21,4 +21,3 @@ export declare function releaseSchedulerLockSync(opts?: SchedulerLockOptions): v
|
|
|
21
21
|
* Returns a dispose function to remove the listeners (call in test teardown).
|
|
22
22
|
*/
|
|
23
23
|
export declare function registerSchedulerLockCleanup(opts?: SchedulerLockOptions): () => void;
|
|
24
|
-
//# sourceMappingURL=cronTasksLock.d.ts.map
|
|
@@ -16,4 +16,3 @@ export declare function scanCommandsDirectory(dirPath: string): CustomSlashComma
|
|
|
16
16
|
* Load all custom slash commands from both project and user directories
|
|
17
17
|
*/
|
|
18
18
|
export declare function loadCustomSlashCommands(workdir: string): CustomSlashCommand[];
|
|
19
|
-
//# sourceMappingURL=customCommands.d.ts.map
|
|
@@ -34,4 +34,3 @@ export declare function suggestPathUnderCwd(targetPath: string, workdir: string)
|
|
|
34
34
|
* Uses fuzzy matching to find the intended file.
|
|
35
35
|
*/
|
|
36
36
|
export declare function findSimilarFile(targetPath: string, workdir: string): Promise<string | null>;
|
|
37
|
-
//# sourceMappingURL=fileUtils.d.ts.map
|
package/dist/utils/gitUtils.d.ts
CHANGED
|
@@ -21,4 +21,3 @@ export declare function groupMessagesByApiRound(messages: Message[]): ApiRound[]
|
|
|
21
21
|
* Never splits a tool_use/tool_result pair. If fewer rounds exist, returns all.
|
|
22
22
|
*/
|
|
23
23
|
export declare function getLastApiRounds(messages: Message[], roundCount: number): Message[];
|
|
24
|
-
//# sourceMappingURL=groupMessagesByApiRound.d.ts.map
|
|
@@ -42,4 +42,3 @@ export declare function replaceBashCommandsWithOutput(content: string, results:
|
|
|
42
42
|
*/
|
|
43
43
|
export declare function executeBashCommands(commands: string[], workdir: string, timeout?: number): Promise<BashCommandResult[]>;
|
|
44
44
|
export {};
|
|
45
|
-
//# sourceMappingURL=markdownParser.d.ts.map
|
package/dist/utils/mcpUtils.d.ts
CHANGED
|
@@ -21,4 +21,3 @@ export declare function createMcpToolPlugin(mcpTool: McpTool, serverName: string
|
|
|
21
21
|
* Find which server a tool belongs to
|
|
22
22
|
*/
|
|
23
23
|
export declare function findToolServer(toolName: string, servers: McpServerStatus[]): McpServerStatus | undefined;
|
|
24
|
-
//# sourceMappingURL=mcpUtils.d.ts.map
|
|
@@ -126,4 +126,3 @@ export interface AddNotificationMessageParams {
|
|
|
126
126
|
outputFile?: string;
|
|
127
127
|
}
|
|
128
128
|
export declare const addNotificationMessageToMessages: ({ messages, taskId, taskType, status, summary, outputFile, }: AddNotificationMessageParams) => Message[];
|
|
129
|
-
//# sourceMappingURL=messageOperations.d.ts.map
|
|
@@ -19,4 +19,3 @@ export declare function supportsPromptCaching(capabilities?: ModelCapabilities):
|
|
|
19
19
|
* @returns True unless vision is explicitly disabled (default: true)
|
|
20
20
|
*/
|
|
21
21
|
export declare function supportsVision(capabilities?: ModelCapabilities): boolean;
|
|
22
|
-
//# sourceMappingURL=modelCapabilities.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { TaskNotificationBlock } from "../types/messaging.js";
|
|
2
2
|
export declare function taskNotificationToXml(block: TaskNotificationBlock): string;
|
|
3
3
|
export declare function parseTaskNotificationXml(xml: string): TaskNotificationBlock | null;
|
|
4
|
-
//# sourceMappingURL=notificationXml.d.ts.map
|
package/dist/utils/path.d.ts
CHANGED
package/dist/utils/ripgrep.d.ts
CHANGED
|
@@ -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
|
+
}
|
|
@@ -35,4 +35,3 @@ export declare function recoverTruncatedJson(jsonStr: string): string;
|
|
|
35
35
|
* Efficiently get the last N lines of a string without splitting the whole string.
|
|
36
36
|
*/
|
|
37
37
|
export declare function getLastLines(text: string, count: number): string;
|
|
38
|
-
//# sourceMappingURL=stringUtils.d.ts.map
|
|
@@ -23,4 +23,3 @@ export declare function loadSubagentConfigurations(workdir: string): Promise<Sub
|
|
|
23
23
|
* Find subagent by exact name match
|
|
24
24
|
*/
|
|
25
25
|
export declare function findSubagentByName(name: string, workdir: string): Promise<SubagentConfiguration | null>;
|
|
26
|
-
//# sourceMappingURL=subagentParser.d.ts.map
|
|
@@ -43,4 +43,3 @@ export declare function buildPersistedOutputMessage(totalChars: number, filePath
|
|
|
43
43
|
* @returns The content to send to the model (either original or persisted-output wrapper)
|
|
44
44
|
*/
|
|
45
45
|
export declare function processToolResult(content: string, maxChars?: number, prefix?: string): string;
|
|
46
|
-
//# sourceMappingURL=toolResultStorage.d.ts.map
|
|
@@ -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,3 @@ 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
|
-
//# sourceMappingURL=worktreeSession.d.ts.map
|
|
@@ -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 {};
|