wave-code 0.19.6 → 0.19.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.
Files changed (200) hide show
  1. package/dist/cli.d.ts +0 -1
  2. package/dist/commands/plugin/disable.d.ts +0 -1
  3. package/dist/commands/plugin/enable.d.ts +0 -1
  4. package/dist/commands/plugin/install.d.ts +0 -1
  5. package/dist/commands/plugin/list.d.ts +0 -1
  6. package/dist/commands/plugin/marketplace.d.ts +0 -1
  7. package/dist/commands/plugin/uninstall.d.ts +0 -1
  8. package/dist/commands/plugin/update.d.ts +0 -1
  9. package/dist/commands/update.d.ts +0 -1
  10. package/dist/components/App.d.ts +0 -1
  11. package/dist/components/BackgroundTaskManager.d.ts +0 -1
  12. package/dist/components/BangDisplay.d.ts +0 -1
  13. package/dist/components/BtwDisplay.d.ts +0 -1
  14. package/dist/components/ChatInterface.d.ts +0 -1
  15. package/dist/components/CommandSelector.d.ts +0 -1
  16. package/dist/components/CompactDisplay.d.ts +0 -1
  17. package/dist/components/ConfirmationDetails.d.ts +0 -1
  18. package/dist/components/ConfirmationSelector.d.ts +0 -1
  19. package/dist/components/ConfirmationSelector.js +4 -3
  20. package/dist/components/DiffDisplay.d.ts +0 -1
  21. package/dist/components/DiscoverView.d.ts +0 -1
  22. package/dist/components/FileSelector.d.ts +0 -1
  23. package/dist/components/HelpView.d.ts +0 -1
  24. package/dist/components/HistorySearch.d.ts +0 -1
  25. package/dist/components/InputBox.d.ts +0 -1
  26. package/dist/components/InstalledView.d.ts +0 -1
  27. package/dist/components/LoadingIndicator.d.ts +0 -1
  28. package/dist/components/LoginCommand.d.ts +0 -1
  29. package/dist/components/Markdown.d.ts +0 -1
  30. package/dist/components/MarketplaceAddForm.d.ts +0 -1
  31. package/dist/components/MarketplaceDetail.d.ts +0 -1
  32. package/dist/components/MarketplaceList.d.ts +0 -1
  33. package/dist/components/MarketplaceView.d.ts +0 -1
  34. package/dist/components/McpManager.d.ts +0 -1
  35. package/dist/components/MessageBlockItem.d.ts +0 -1
  36. package/dist/components/MessageList.d.ts +0 -1
  37. package/dist/components/ModelSelector.d.ts +0 -1
  38. package/dist/components/PlanDisplay.d.ts +0 -1
  39. package/dist/components/PluginDetail.d.ts +0 -1
  40. package/dist/components/PluginList.d.ts +0 -1
  41. package/dist/components/PluginManagerShell.d.ts +0 -1
  42. package/dist/components/PluginManagerTypes.d.ts +0 -1
  43. package/dist/components/QueuedMessageList.d.ts +0 -1
  44. package/dist/components/ReasoningDisplay.d.ts +0 -1
  45. package/dist/components/RewindCommand.d.ts +0 -1
  46. package/dist/components/SessionSelector.d.ts +0 -1
  47. package/dist/components/StatusCommand.d.ts +0 -1
  48. package/dist/components/StatusLine.d.ts +0 -1
  49. package/dist/components/TaskList.d.ts +0 -1
  50. package/dist/components/TaskNotificationMessage.d.ts +0 -1
  51. package/dist/components/ToolDisplay.d.ts +0 -1
  52. package/dist/components/WorkflowManager.d.ts +0 -1
  53. package/dist/components/WorktreeExitPrompt.d.ts +0 -1
  54. package/dist/constants/commands.d.ts +0 -1
  55. package/dist/contexts/PluginManagerContext.d.ts +0 -1
  56. package/dist/contexts/useAppConfig.d.ts +0 -1
  57. package/dist/contexts/useChat.d.ts +0 -1
  58. package/dist/contexts/useChat.js +1 -1
  59. package/dist/contracts/status.d.ts +0 -1
  60. package/dist/hooks/useInputManager.d.ts +0 -1
  61. package/dist/hooks/usePluginManager.d.ts +0 -1
  62. package/dist/hooks/useTasks.d.ts +0 -1
  63. package/dist/index.d.ts +0 -1
  64. package/dist/index.js +3 -2
  65. package/dist/managers/inputHandlers.d.ts +0 -1
  66. package/dist/managers/inputReducer.d.ts +0 -1
  67. package/dist/plugin-manager-cli.d.ts +0 -1
  68. package/dist/print-cli.d.ts +0 -1
  69. package/dist/print-cli.js +10 -2
  70. package/dist/reducers/backgroundTaskManagerReducer.d.ts +0 -1
  71. package/dist/reducers/confirmationReducer.d.ts +1 -2
  72. package/dist/reducers/confirmationReducer.js +9 -10
  73. package/dist/reducers/helpSelectorReducer.d.ts +0 -1
  74. package/dist/reducers/marketplaceAddFormReducer.d.ts +0 -1
  75. package/dist/reducers/mcpManagerReducer.d.ts +0 -1
  76. package/dist/reducers/pluginDetailReducer.d.ts +0 -1
  77. package/dist/reducers/questionReducer.d.ts +0 -1
  78. package/dist/reducers/rewindSelectorReducer.d.ts +0 -1
  79. package/dist/reducers/selectorReducer.d.ts +0 -1
  80. package/dist/reducers/workflowManagerReducer.d.ts +0 -1
  81. package/dist/session-selector-cli.d.ts +0 -1
  82. package/dist/stdio/agentBridge.d.ts +5 -1
  83. package/dist/stdio/agentBridge.js +60 -28
  84. package/dist/stdio/index.d.ts +0 -1
  85. package/dist/stdio/protocol.d.ts +2 -3
  86. package/dist/stdio/stdioServer.d.ts +0 -1
  87. package/dist/stdio-cli.d.ts +0 -1
  88. package/dist/types.d.ts +0 -1
  89. package/dist/utils/clipboard.d.ts +0 -1
  90. package/dist/utils/constants.d.ts +0 -1
  91. package/dist/utils/highlightUtils.d.ts +0 -1
  92. package/dist/utils/inputUtils.d.ts +0 -1
  93. package/dist/utils/logger.d.ts +0 -1
  94. package/dist/utils/throttle.d.ts +0 -1
  95. package/dist/utils/toolParameterTransforms.d.ts +0 -1
  96. package/dist/utils/usageSummary.d.ts +0 -1
  97. package/dist/utils/version.d.ts +0 -1
  98. package/dist/utils/worktree.d.ts +5 -2
  99. package/dist/utils/worktree.js +8 -4
  100. package/package.json +2 -2
  101. package/src/components/ConfirmationSelector.tsx +16 -15
  102. package/src/contexts/useChat.tsx +1 -1
  103. package/src/index.ts +8 -2
  104. package/src/print-cli.ts +12 -2
  105. package/src/reducers/confirmationReducer.ts +9 -9
  106. package/src/stdio/agentBridge.ts +96 -39
  107. package/src/stdio/protocol.ts +9 -2
  108. package/src/utils/worktree.ts +12 -4
  109. package/dist/cli.d.ts.map +0 -1
  110. package/dist/commands/plugin/disable.d.ts.map +0 -1
  111. package/dist/commands/plugin/enable.d.ts.map +0 -1
  112. package/dist/commands/plugin/install.d.ts.map +0 -1
  113. package/dist/commands/plugin/list.d.ts.map +0 -1
  114. package/dist/commands/plugin/marketplace.d.ts.map +0 -1
  115. package/dist/commands/plugin/uninstall.d.ts.map +0 -1
  116. package/dist/commands/plugin/update.d.ts.map +0 -1
  117. package/dist/commands/update.d.ts.map +0 -1
  118. package/dist/components/App.d.ts.map +0 -1
  119. package/dist/components/BackgroundTaskManager.d.ts.map +0 -1
  120. package/dist/components/BangDisplay.d.ts.map +0 -1
  121. package/dist/components/BtwDisplay.d.ts.map +0 -1
  122. package/dist/components/ChatInterface.d.ts.map +0 -1
  123. package/dist/components/CommandSelector.d.ts.map +0 -1
  124. package/dist/components/CompactDisplay.d.ts.map +0 -1
  125. package/dist/components/ConfirmationDetails.d.ts.map +0 -1
  126. package/dist/components/ConfirmationSelector.d.ts.map +0 -1
  127. package/dist/components/DiffDisplay.d.ts.map +0 -1
  128. package/dist/components/DiscoverView.d.ts.map +0 -1
  129. package/dist/components/FileSelector.d.ts.map +0 -1
  130. package/dist/components/HelpView.d.ts.map +0 -1
  131. package/dist/components/HistorySearch.d.ts.map +0 -1
  132. package/dist/components/InputBox.d.ts.map +0 -1
  133. package/dist/components/InstalledView.d.ts.map +0 -1
  134. package/dist/components/LoadingIndicator.d.ts.map +0 -1
  135. package/dist/components/LoginCommand.d.ts.map +0 -1
  136. package/dist/components/Markdown.d.ts.map +0 -1
  137. package/dist/components/MarketplaceAddForm.d.ts.map +0 -1
  138. package/dist/components/MarketplaceDetail.d.ts.map +0 -1
  139. package/dist/components/MarketplaceList.d.ts.map +0 -1
  140. package/dist/components/MarketplaceView.d.ts.map +0 -1
  141. package/dist/components/McpManager.d.ts.map +0 -1
  142. package/dist/components/MessageBlockItem.d.ts.map +0 -1
  143. package/dist/components/MessageList.d.ts.map +0 -1
  144. package/dist/components/ModelSelector.d.ts.map +0 -1
  145. package/dist/components/PlanDisplay.d.ts.map +0 -1
  146. package/dist/components/PluginDetail.d.ts.map +0 -1
  147. package/dist/components/PluginList.d.ts.map +0 -1
  148. package/dist/components/PluginManagerShell.d.ts.map +0 -1
  149. package/dist/components/PluginManagerTypes.d.ts.map +0 -1
  150. package/dist/components/QueuedMessageList.d.ts.map +0 -1
  151. package/dist/components/ReasoningDisplay.d.ts.map +0 -1
  152. package/dist/components/RewindCommand.d.ts.map +0 -1
  153. package/dist/components/SessionSelector.d.ts.map +0 -1
  154. package/dist/components/StatusCommand.d.ts.map +0 -1
  155. package/dist/components/StatusLine.d.ts.map +0 -1
  156. package/dist/components/TaskList.d.ts.map +0 -1
  157. package/dist/components/TaskNotificationMessage.d.ts.map +0 -1
  158. package/dist/components/ToolDisplay.d.ts.map +0 -1
  159. package/dist/components/WorkflowManager.d.ts.map +0 -1
  160. package/dist/components/WorktreeExitPrompt.d.ts.map +0 -1
  161. package/dist/constants/commands.d.ts.map +0 -1
  162. package/dist/contexts/PluginManagerContext.d.ts.map +0 -1
  163. package/dist/contexts/useAppConfig.d.ts.map +0 -1
  164. package/dist/contexts/useChat.d.ts.map +0 -1
  165. package/dist/contracts/status.d.ts.map +0 -1
  166. package/dist/hooks/useInputManager.d.ts.map +0 -1
  167. package/dist/hooks/usePluginManager.d.ts.map +0 -1
  168. package/dist/hooks/useTasks.d.ts.map +0 -1
  169. package/dist/index.d.ts.map +0 -1
  170. package/dist/managers/inputHandlers.d.ts.map +0 -1
  171. package/dist/managers/inputReducer.d.ts.map +0 -1
  172. package/dist/plugin-manager-cli.d.ts.map +0 -1
  173. package/dist/print-cli.d.ts.map +0 -1
  174. package/dist/reducers/backgroundTaskManagerReducer.d.ts.map +0 -1
  175. package/dist/reducers/confirmationReducer.d.ts.map +0 -1
  176. package/dist/reducers/helpSelectorReducer.d.ts.map +0 -1
  177. package/dist/reducers/marketplaceAddFormReducer.d.ts.map +0 -1
  178. package/dist/reducers/mcpManagerReducer.d.ts.map +0 -1
  179. package/dist/reducers/pluginDetailReducer.d.ts.map +0 -1
  180. package/dist/reducers/questionReducer.d.ts.map +0 -1
  181. package/dist/reducers/rewindSelectorReducer.d.ts.map +0 -1
  182. package/dist/reducers/selectorReducer.d.ts.map +0 -1
  183. package/dist/reducers/workflowManagerReducer.d.ts.map +0 -1
  184. package/dist/session-selector-cli.d.ts.map +0 -1
  185. package/dist/stdio/agentBridge.d.ts.map +0 -1
  186. package/dist/stdio/index.d.ts.map +0 -1
  187. package/dist/stdio/protocol.d.ts.map +0 -1
  188. package/dist/stdio/stdioServer.d.ts.map +0 -1
  189. package/dist/stdio-cli.d.ts.map +0 -1
  190. package/dist/types.d.ts.map +0 -1
  191. package/dist/utils/clipboard.d.ts.map +0 -1
  192. package/dist/utils/constants.d.ts.map +0 -1
  193. package/dist/utils/highlightUtils.d.ts.map +0 -1
  194. package/dist/utils/inputUtils.d.ts.map +0 -1
  195. package/dist/utils/logger.d.ts.map +0 -1
  196. package/dist/utils/throttle.d.ts.map +0 -1
  197. package/dist/utils/toolParameterTransforms.d.ts.map +0 -1
  198. package/dist/utils/usageSummary.d.ts.map +0 -1
  199. package/dist/utils/version.d.ts.map +0 -1
  200. package/dist/utils/worktree.d.ts.map +0 -1
package/dist/cli.d.ts CHANGED
@@ -4,4 +4,3 @@ export interface CliOptions extends BaseAppProps {
4
4
  continueLastSession?: boolean;
5
5
  }
6
6
  export declare function startCli(options: CliOptions): Promise<void>;
7
- //# sourceMappingURL=cli.d.ts.map
@@ -3,4 +3,3 @@ export declare function disablePluginCommand(argv: {
3
3
  plugin: string;
4
4
  scope?: Scope;
5
5
  }): Promise<void>;
6
- //# sourceMappingURL=disable.d.ts.map
@@ -3,4 +3,3 @@ export declare function enablePluginCommand(argv: {
3
3
  plugin: string;
4
4
  scope?: Scope;
5
5
  }): Promise<void>;
6
- //# sourceMappingURL=enable.d.ts.map
@@ -3,4 +3,3 @@ export declare function installPluginCommand(argv: {
3
3
  plugin: string;
4
4
  scope?: Scope;
5
5
  }): Promise<void>;
6
- //# sourceMappingURL=install.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function listPluginsCommand(): Promise<void>;
2
- //# sourceMappingURL=list.d.ts.map
@@ -8,4 +8,3 @@ export declare function removeMarketplaceCommand(argv: {
8
8
  export declare function updateMarketplaceCommand(argv: {
9
9
  name?: string;
10
10
  }): Promise<void>;
11
- //# sourceMappingURL=marketplace.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export declare function uninstallPluginCommand(argv: {
2
2
  plugin: string;
3
3
  }): Promise<void>;
4
- //# sourceMappingURL=uninstall.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export declare function updatePluginCommand(argv: {
2
2
  plugin: string;
3
3
  }): Promise<void>;
4
- //# sourceMappingURL=update.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function updateCommand(): Promise<void>;
2
- //# sourceMappingURL=update.d.ts.map
@@ -7,4 +7,3 @@ interface AppProps extends BaseAppProps {
7
7
  }
8
8
  export declare const App: React.FC<AppProps>;
9
9
  export {};
10
- //# sourceMappingURL=App.d.ts.map
@@ -3,4 +3,3 @@ export interface BackgroundTaskManagerProps {
3
3
  onCancel: () => void;
4
4
  }
5
5
  export declare const BackgroundTaskManager: React.FC<BackgroundTaskManagerProps>;
6
- //# sourceMappingURL=BackgroundTaskManager.d.ts.map
@@ -6,4 +6,3 @@ interface BangDisplayProps {
6
6
  }
7
7
  export declare const BangDisplay: React.FC<BangDisplayProps>;
8
8
  export {};
9
- //# sourceMappingURL=BangDisplay.d.ts.map
@@ -5,4 +5,3 @@ interface BtwDisplayProps {
5
5
  }
6
6
  export declare const BtwDisplay: React.FC<BtwDisplayProps>;
7
7
  export {};
8
- //# sourceMappingURL=BtwDisplay.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import React from "react";
2
2
  export declare const ChatInterface: React.FC;
3
- //# sourceMappingURL=ChatInterface.d.ts.map
@@ -8,4 +8,3 @@ export interface CommandSelectorProps {
8
8
  commands?: SlashCommand[];
9
9
  }
10
10
  export declare const CommandSelector: React.FC<CommandSelectorProps>;
11
- //# sourceMappingURL=CommandSelector.d.ts.map
@@ -6,4 +6,3 @@ interface CompactDisplayProps {
6
6
  }
7
7
  export declare const CompactDisplay: React.FC<CompactDisplayProps>;
8
8
  export {};
9
- //# sourceMappingURL=CompactDisplay.d.ts.map
@@ -6,4 +6,3 @@ export interface ConfirmationDetailsProps {
6
6
  isExpanded?: boolean;
7
7
  }
8
8
  export declare const ConfirmationDetails: React.FC<ConfirmationDetailsProps>;
9
- //# sourceMappingURL=ConfirmationDetails.d.ts.map
@@ -10,4 +10,3 @@ export interface ConfirmationSelectorProps {
10
10
  onCancel: () => void;
11
11
  }
12
12
  export declare const ConfirmationSelector: React.FC<ConfirmationSelectorProps>;
13
- //# sourceMappingURL=ConfirmationSelector.d.ts.map
@@ -14,7 +14,7 @@ const getHeaderColor = (header) => {
14
14
  };
15
15
  export const ConfirmationSelector = ({ toolName, toolInput, suggestedPrefix, hidePersistentOption, isExpanded = false, onDecision, onCancel, }) => {
16
16
  const [state, dispatch] = useReducer(confirmationReducer, {
17
- selectedOption: toolName === EXIT_PLAN_MODE_TOOL_NAME ? "clear" : "allow",
17
+ selectedOption: "allow",
18
18
  alternativeText: "",
19
19
  alternativeCursorPosition: 0,
20
20
  hasUserInput: false,
@@ -104,8 +104,9 @@ export const ConfirmationSelector = ({ toolName, toolInput, suggestedPrefix, hid
104
104
  ? "[x] "
105
105
  : "[ ] "
106
106
  : "", option.label, option.description ? ` - ${option.description}` : "", isOther && isSelected && (_jsxs(Text, { children: [":", " ", questionState.otherText ? (_jsxs(_Fragment, { children: [questionState.otherText.slice(0, questionState.otherCursorPosition), _jsx(Text, { backgroundColor: "white", color: "black", children: questionState.otherText[questionState.otherCursorPosition] || " " }), questionState.otherText.slice(questionState.otherCursorPosition + 1)] })) : (_jsx(Text, { color: "gray", dimColor: true, children: "[Type your answer...]" }))] }))] }) }, index));
107
- }) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { dimColor: true, children: ["Question ", questionState.currentQuestionIndex + 1, " of", " ", questions.length, " \u2022", currentQuestion.multiSelect ? " Space to toggle •" : "", " Use \u2191\u2193 or Tab to navigate \u2022 Enter to confirm"] }) })] })), toolName !== ASK_USER_QUESTION_TOOL_NAME && !isExpanded && (_jsxs(_Fragment, { children: [_jsx(Box, { marginTop: 1, children: _jsx(Text, { children: "Do you want to proceed?" }) }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [toolName === EXIT_PLAN_MODE_TOOL_NAME && (_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "clear" ? "black" : "white", backgroundColor: state.selectedOption === "clear" ? "yellow" : undefined, bold: state.selectedOption === "clear", children: [state.selectedOption === "clear" ? "> " : " ", "Yes, clear context and auto-accept edits"] }) }, "clear-option")), _jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "allow" ? "black" : "white", backgroundColor: state.selectedOption === "allow" ? "yellow" : undefined, bold: state.selectedOption === "allow", children: [state.selectedOption === "allow" ? "> " : " ", toolName === EXIT_PLAN_MODE_TOOL_NAME
107
+ }) }), _jsx(Box, { marginTop: 1, children: _jsxs(Text, { dimColor: true, children: ["Question ", questionState.currentQuestionIndex + 1, " of", " ", questions.length, " \u2022", currentQuestion.multiSelect ? " Space to toggle •" : "", " Use \u2191\u2193 or Tab to navigate \u2022 Enter to confirm"] }) })] })), toolName !== ASK_USER_QUESTION_TOOL_NAME && !isExpanded && (_jsxs(_Fragment, { children: [_jsx(Box, { marginTop: 1, children: _jsx(Text, { children: "Do you want to proceed?" }) }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "allow" ? "black" : "white", backgroundColor: state.selectedOption === "allow" ? "yellow" : undefined, bold: state.selectedOption === "allow", children: [state.selectedOption === "allow" ? "> " : " ", toolName === EXIT_PLAN_MODE_TOOL_NAME
108
108
  ? "Yes, manually approve edits"
109
- : "Yes, proceed"] }) }, "allow-option"), !hidePersistentOption && (_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "auto" ? "black" : "white", backgroundColor: state.selectedOption === "auto" ? "yellow" : undefined, bold: state.selectedOption === "auto", children: [state.selectedOption === "auto" ? "> " : " ", getAutoOptionText()] }) }, "auto-option")), _jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "alternative" ? "black" : "white", backgroundColor: state.selectedOption === "alternative" ? "yellow" : undefined, bold: state.selectedOption === "alternative", children: [state.selectedOption === "alternative" ? "> " : " ", toolName === ENTER_PLAN_MODE_TOOL_NAME && showPlaceholder ? (_jsx(Text, { color: "gray", dimColor: true, children: "No, start implementing now" })) : showPlaceholder ? (_jsx(Text, { color: "gray", dimColor: true, children: placeholderText })) : (_jsx(Text, { children: state.alternativeText ? (_jsxs(_Fragment, { children: [state.alternativeText.slice(0, state.alternativeCursorPosition), _jsx(Text, { backgroundColor: "white", color: "black", children: state.alternativeText[state.alternativeCursorPosition] || " " }), state.alternativeText.slice(state.alternativeCursorPosition + 1)] })) : ("Type here to tell Wave what to change") }))] }) }, "alternative-option")] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Use \u2191\u2193 or Tab to navigate \u2022 ESC to cancel" }) })] }))] }));
109
+ : "Yes, proceed"] }) }, "allow-option"), !hidePersistentOption && (_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "auto" ? "black" : "white", backgroundColor: state.selectedOption === "auto" ? "yellow" : undefined, bold: state.selectedOption === "auto", children: [state.selectedOption === "auto" ? "> " : " ", getAutoOptionText()] }) }, "auto-option")), (toolName === BASH_TOOL_NAME ||
110
+ toolName === EXIT_PLAN_MODE_TOOL_NAME) && (_jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "bypass" ? "black" : "white", backgroundColor: state.selectedOption === "bypass" ? "yellow" : undefined, bold: state.selectedOption === "bypass", children: [state.selectedOption === "bypass" ? "> " : " ", "Yes, and bypass permissions"] }) }, "bypass-option")), _jsx(Box, { children: _jsxs(Text, { color: state.selectedOption === "alternative" ? "black" : "white", backgroundColor: state.selectedOption === "alternative" ? "yellow" : undefined, bold: state.selectedOption === "alternative", children: [state.selectedOption === "alternative" ? "> " : " ", toolName === ENTER_PLAN_MODE_TOOL_NAME && showPlaceholder ? (_jsx(Text, { color: "gray", dimColor: true, children: "No, start implementing now" })) : showPlaceholder ? (_jsx(Text, { color: "gray", dimColor: true, children: placeholderText })) : (_jsx(Text, { children: state.alternativeText ? (_jsxs(_Fragment, { children: [state.alternativeText.slice(0, state.alternativeCursorPosition), _jsx(Text, { backgroundColor: "white", color: "black", children: state.alternativeText[state.alternativeCursorPosition] || " " }), state.alternativeText.slice(state.alternativeCursorPosition + 1)] })) : ("Type here to tell Wave what to change") }))] }) }, "alternative-option")] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Use \u2191\u2193 or Tab to navigate \u2022 ESC to cancel" }) })] }))] }));
110
111
  };
111
112
  ConfirmationSelector.displayName = "ConfirmationSelector";
@@ -6,4 +6,3 @@ interface DiffDisplayProps {
6
6
  }
7
7
  export declare const DiffDisplay: React.FC<DiffDisplayProps>;
8
8
  export {};
9
- //# sourceMappingURL=DiffDisplay.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import React from "react";
2
2
  export declare const DiscoverView: React.FC;
3
- //# sourceMappingURL=DiscoverView.d.ts.map
@@ -9,4 +9,3 @@ export interface FileSelectorProps {
9
9
  onCancel: () => void;
10
10
  }
11
11
  export declare const FileSelector: React.FC<FileSelectorProps>;
12
- //# sourceMappingURL=FileSelector.d.ts.map
@@ -5,4 +5,3 @@ export interface HelpViewProps {
5
5
  commands?: SlashCommand[];
6
6
  }
7
7
  export declare const HelpView: React.FC<HelpViewProps>;
8
- //# sourceMappingURL=HelpView.d.ts.map
@@ -6,4 +6,3 @@ export interface HistorySearchProps {
6
6
  onCancel: () => void;
7
7
  }
8
8
  export declare const HistorySearch: React.FC<HistorySearchProps>;
9
- //# sourceMappingURL=HistorySearch.d.ts.map
@@ -22,4 +22,3 @@ export interface InputBoxProps {
22
22
  goalElapsed?: string;
23
23
  }
24
24
  export declare const InputBox: React.FC<InputBoxProps>;
25
- //# sourceMappingURL=InputBox.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import React from "react";
2
2
  export declare const InstalledView: React.FC;
3
- //# sourceMappingURL=InstalledView.d.ts.map
@@ -9,4 +9,3 @@ export declare const LoadingIndicator: {
9
9
  ({ isLoading, isCommandRunning, isCompacting, isGoalEvaluating, latestTotalTokens, }: LoadingIndicatorProps): import("react/jsx-runtime").JSX.Element;
10
10
  displayName: string;
11
11
  };
12
- //# sourceMappingURL=LoadingIndicator.d.ts.map
@@ -3,4 +3,3 @@ export interface LoginCommandProps {
3
3
  onCancel: () => void;
4
4
  }
5
5
  export declare const LoginCommand: React.FC<LoginCommandProps>;
6
- //# sourceMappingURL=LoginCommand.d.ts.map
@@ -3,4 +3,3 @@ export interface MarkdownProps {
3
3
  children: string;
4
4
  }
5
5
  export declare const Markdown: React.MemoExoticComponent<({ children }: MarkdownProps) => import("react/jsx-runtime").JSX.Element>;
6
- //# sourceMappingURL=Markdown.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import React from "react";
2
2
  export declare const MarketplaceAddForm: React.FC;
3
- //# sourceMappingURL=MarketplaceAddForm.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import React from "react";
2
2
  export declare const MarketplaceDetail: React.FC;
3
- //# sourceMappingURL=MarketplaceDetail.d.ts.map
@@ -6,4 +6,3 @@ interface MarketplaceListProps {
6
6
  }
7
7
  export declare const MarketplaceList: React.FC<MarketplaceListProps>;
8
8
  export {};
9
- //# sourceMappingURL=MarketplaceList.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import React from "react";
2
2
  export declare const MarketplaceView: React.FC;
3
- //# sourceMappingURL=MarketplaceView.d.ts.map
@@ -7,4 +7,3 @@ export interface McpManagerProps {
7
7
  onDisconnectServer: (serverName: string) => Promise<boolean>;
8
8
  }
9
9
  export declare const McpManager: React.FC<McpManagerProps>;
10
- //# sourceMappingURL=McpManager.d.ts.map
@@ -6,4 +6,3 @@ export interface MessageBlockItemProps {
6
6
  paddingTop?: number;
7
7
  }
8
8
  export declare const MessageBlockItem: ({ block, message, isExpanded, paddingTop, }: MessageBlockItemProps) => import("react/jsx-runtime").JSX.Element;
9
- //# sourceMappingURL=MessageBlockItem.d.ts.map
@@ -8,4 +8,3 @@ export interface MessageListProps {
8
8
  workdir?: string;
9
9
  }
10
10
  export declare const MessageList: React.MemoExoticComponent<({ messages, isExpanded, forceStatic, version, workdir, }: MessageListProps) => import("react/jsx-runtime").JSX.Element>;
11
- //# sourceMappingURL=MessageList.d.ts.map
@@ -6,4 +6,3 @@ export interface ModelSelectorProps {
6
6
  onSelectModel: (model: string) => void;
7
7
  }
8
8
  export declare const ModelSelector: React.FC<ModelSelectorProps>;
9
- //# sourceMappingURL=ModelSelector.d.ts.map
@@ -5,4 +5,3 @@ interface PlanDisplayProps {
5
5
  }
6
6
  export declare const PlanDisplay: React.FC<PlanDisplayProps>;
7
7
  export {};
8
- //# sourceMappingURL=PlanDisplay.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import React from "react";
2
2
  export declare const PluginDetail: React.FC;
3
- //# sourceMappingURL=PluginDetail.d.ts.map
@@ -11,4 +11,3 @@ interface PluginListProps {
11
11
  }
12
12
  export declare const PluginList: React.FC<PluginListProps>;
13
13
  export {};
14
- //# sourceMappingURL=PluginList.d.ts.map
@@ -4,4 +4,3 @@ export declare const PluginManagerShell: React.FC<{
4
4
  onCancel?: () => void;
5
5
  onPluginInstalled?: () => void;
6
6
  }>;
7
- //# sourceMappingURL=PluginManagerShell.d.ts.map
@@ -33,4 +33,3 @@ export interface PluginManagerContextType {
33
33
  clearPluginFeedback: () => void;
34
34
  };
35
35
  }
36
- //# sourceMappingURL=PluginManagerTypes.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import React from "react";
2
2
  export declare const QueuedMessageList: React.FC;
3
- //# sourceMappingURL=QueuedMessageList.d.ts.map
@@ -6,4 +6,3 @@ interface ReasoningDisplayProps {
6
6
  }
7
7
  export declare const ReasoningDisplay: React.FC<ReasoningDisplayProps>;
8
8
  export {};
9
- //# sourceMappingURL=ReasoningDisplay.d.ts.map
@@ -10,4 +10,3 @@ export interface RewindCommandProps {
10
10
  }>;
11
11
  }
12
12
  export declare const RewindCommand: React.FC<RewindCommandProps>;
13
- //# sourceMappingURL=RewindCommand.d.ts.map
@@ -10,4 +10,3 @@ export interface SessionSelectorProps {
10
10
  }
11
11
  export declare const SessionSelector: React.FC<SessionSelectorProps>;
12
12
  export {};
13
- //# sourceMappingURL=SessionSelector.d.ts.map
@@ -3,4 +3,3 @@ export interface StatusCommandProps {
3
3
  onCancel: () => void;
4
4
  }
5
5
  export declare const StatusCommand: React.FC<StatusCommandProps>;
6
- //# sourceMappingURL=StatusCommand.d.ts.map
@@ -8,4 +8,3 @@ export interface StatusLineProps {
8
8
  maxInputTokens?: number;
9
9
  }
10
10
  export declare const StatusLine: React.FC<StatusLineProps>;
11
- //# sourceMappingURL=StatusLine.d.ts.map
@@ -3,4 +3,3 @@ import type { Task, TaskStatus } from "wave-agent-sdk";
3
3
  export declare const getStatusIcon: (status: TaskStatus) => React.ReactNode;
4
4
  export declare function sortTasksByPriority(tasks: Task[], completionTimestamps: Map<string, number>, now: number, needsTruncation: boolean): Task[];
5
5
  export declare const TaskList: React.FC;
6
- //# sourceMappingURL=TaskList.d.ts.map
@@ -3,4 +3,3 @@ export interface TaskNotificationMessageProps {
3
3
  block: TaskNotificationBlock;
4
4
  }
5
5
  export declare const TaskNotificationMessage: ({ block, }: TaskNotificationMessageProps) => import("react/jsx-runtime").JSX.Element;
6
- //# sourceMappingURL=TaskNotificationMessage.d.ts.map
@@ -6,4 +6,3 @@ interface ToolDisplayProps {
6
6
  }
7
7
  export declare const ToolDisplay: React.FC<ToolDisplayProps>;
8
8
  export {};
9
- //# sourceMappingURL=ToolDisplay.d.ts.map
@@ -3,4 +3,3 @@ export interface WorkflowManagerProps {
3
3
  onCancel: () => void;
4
4
  }
5
5
  export declare const WorkflowManager: React.FC<WorkflowManagerProps>;
6
- //# sourceMappingURL=WorkflowManager.d.ts.map
@@ -10,4 +10,3 @@ interface WorktreeExitPromptProps {
10
10
  }
11
11
  export declare const WorktreeExitPrompt: React.FC<WorktreeExitPromptProps>;
12
12
  export {};
13
- //# sourceMappingURL=WorktreeExitPrompt.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { SlashCommand } from "wave-agent-sdk";
2
2
  export declare const AVAILABLE_COMMANDS: SlashCommand[];
3
- //# sourceMappingURL=commands.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import { PluginManagerContextType } from "../components/PluginManagerTypes.js";
2
2
  export declare const PluginManagerContext: import("react").Context<PluginManagerContextType | null>;
3
3
  export declare const usePluginManagerContext: () => PluginManagerContextType;
4
- //# sourceMappingURL=PluginManagerContext.d.ts.map
@@ -8,4 +8,3 @@ export interface AppProviderProps extends AppConfig {
8
8
  children: React.ReactNode;
9
9
  }
10
10
  export declare const AppProvider: React.FC<AppProviderProps>;
11
- //# sourceMappingURL=useAppConfig.d.ts.map
@@ -83,4 +83,3 @@ export interface ChatProviderProps extends BaseAppProps {
83
83
  children: React.ReactNode;
84
84
  }
85
85
  export declare const ChatProvider: React.FC<ChatProviderProps>;
86
- //# sourceMappingURL=useChat.d.ts.map
@@ -235,7 +235,7 @@ export const ChatProvider = ({ children, bypassPermissions, permissionMode: init
235
235
  agentRef.current = agent;
236
236
  // Inject worktree session into this agent's own DI container so system
237
237
  // prompts and permission checks reflect the CLI -w worktree. This state is
238
- // per-session, not process-global (see specs/047-worktree.md FR-042).
238
+ // per-session, not process-global (see docs/specs/multi-agent/worktree.md FR-042).
239
239
  if (worktreeSession) {
240
240
  const session = {
241
241
  originalCwd: originalCwd ?? worktreeSession.repoRoot,
@@ -5,4 +5,3 @@ export interface AgentStatus {
5
5
  baseURL: string;
6
6
  model: string;
7
7
  }
8
- //# sourceMappingURL=status.d.ts.map
@@ -70,4 +70,3 @@ export declare const useInputManager: (callbacks?: Partial<InputManagerCallbacks
70
70
  setCursorPosition: (position: number) => void;
71
71
  manager: null;
72
72
  };
73
- //# sourceMappingURL=useInputManager.d.ts.map
@@ -2,4 +2,3 @@ import { PluginManagerContextType } from "../components/PluginManagerTypes.js";
2
2
  export declare function usePluginManager(options?: {
3
3
  onPluginInstalled?: () => void;
4
4
  }): PluginManagerContextType;
5
- //# sourceMappingURL=usePluginManager.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const useTasks: () => import("wave-agent-sdk").Task[];
2
- //# sourceMappingURL=useTasks.d.ts.map
package/dist/index.d.ts CHANGED
@@ -2,4 +2,3 @@ export declare function main(): Promise<void>;
2
2
  export { startCli } from "./cli.js";
3
3
  export { logger } from "./utils/logger.js";
4
4
  export { readClipboardImage, cleanupTempImage, hasClipboardImage, type ClipboardImageResult, } from "./utils/clipboard.js";
5
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import yargs from "yargs";
2
2
  import { hideBin } from "yargs/helpers";
3
3
  import { startCli } from "./cli.js";
4
- import { generateRandomName } from "wave-agent-sdk";
4
+ import { generateRandomName, loadMergedWaveConfig, } from "wave-agent-sdk";
5
5
  import { createWorktree } from "./utils/worktree.js";
6
6
  import path from "path";
7
7
  import { readFileSync } from "fs";
@@ -236,7 +236,8 @@ export async function main() {
236
236
  if (!name || name === "") {
237
237
  name = generateRandomName();
238
238
  }
239
- worktreeSession = createWorktree(name, originalCwd);
239
+ const baseRef = loadMergedWaveConfig(originalCwd)?.worktree?.baseRef;
240
+ worktreeSession = createWorktree(name, originalCwd, { baseRef });
240
241
  // Note: the full worktree session (originalCwd etc.) is injected into the
241
242
  // agent's DI container after the agent is created in useChat.tsx. This keeps
242
243
  // worktree state per-session instead of process-global.
@@ -28,4 +28,3 @@ export declare const checkForSlashDeletion: (state: InputState, dispatch: React.
28
28
  export declare const handleSelectorInput: (state: InputState, dispatch: React.Dispatch<InputAction>, callbacks: Partial<InputManagerCallbacks>, input: string, key: Key) => boolean;
29
29
  export declare const handleNormalInput: (state: InputState, dispatch: React.Dispatch<InputAction>, callbacks: Partial<InputManagerCallbacks>, input: string, key: Key, clearImages?: () => void) => Promise<boolean>;
30
30
  export declare const handleInput: (state: InputState, dispatch: React.Dispatch<InputAction>, callbacks: Partial<InputManagerCallbacks>, input: string, key: Key, clearImages?: () => void) => Promise<boolean>;
31
- //# sourceMappingURL=inputHandlers.d.ts.map
@@ -264,4 +264,3 @@ export type InputAction = {
264
264
  };
265
265
  };
266
266
  export declare function inputReducer(state: InputState, action: InputAction): InputState;
267
- //# sourceMappingURL=inputReducer.d.ts.map
@@ -3,4 +3,3 @@
3
3
  * Renders the Ink component and handles the lifecycle.
4
4
  */
5
5
  export declare function startPluginManagerCli(): Promise<boolean>;
6
- //# sourceMappingURL=plugin-manager-cli.d.ts.map
@@ -8,4 +8,3 @@ export interface PrintCliOptions extends BaseAppProps {
8
8
  mcpServers?: Record<string, import("wave-agent-sdk").McpServerConfig>;
9
9
  }
10
10
  export declare function startPrintCli(options: PrintCliOptions): Promise<void>;
11
- //# sourceMappingURL=print-cli.d.ts.map
package/dist/print-cli.js CHANGED
@@ -104,8 +104,16 @@ export async function startPrintCli(options) {
104
104
  await agent.sendMessage(message);
105
105
  process.stdout.write("\n");
106
106
  }
107
- // Wait for running background tasks and subagents to complete
108
- while (agent.hasRunningBackgroundWork) {
107
+ // Wait for running background tasks/subagents to complete AND for the main
108
+ // agent to finish processing their completion notifications. The last
109
+ // background task flips status to "completed" before its notification is
110
+ // enqueued and before the main agent's follow-up turn runs, so
111
+ // hasRunningBackgroundWork alone becomes false while the main agent is
112
+ // still mid-turn — causing a TOCTOU race that aborts the final response.
113
+ // Including isLoading and queued notifications closes that gap.
114
+ while (agent.hasRunningBackgroundWork ||
115
+ agent.isLoading ||
116
+ agent.hasPendingMessages) {
109
117
  await new Promise((resolve) => setTimeout(resolve, 500));
110
118
  }
111
119
  // Display usage summary before exit
@@ -60,4 +60,3 @@ export type BackgroundTaskManagerAction = {
60
60
  type: "CLEAR_PENDING_EFFECT";
61
61
  };
62
62
  export declare function backgroundTaskManagerReducer(state: BackgroundTaskManagerState, action: BackgroundTaskManagerAction): BackgroundTaskManagerState;
63
- //# sourceMappingURL=backgroundTaskManagerReducer.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { Key } from "ink";
2
2
  import type { PermissionDecision } from "wave-agent-sdk";
3
3
  export interface ConfirmationState {
4
- selectedOption: "clear" | "auto" | "allow" | "alternative";
4
+ selectedOption: "auto" | "bypass" | "allow" | "alternative";
5
5
  alternativeText: string;
6
6
  alternativeCursorPosition: number;
7
7
  hasUserInput: boolean;
@@ -34,4 +34,3 @@ export type ConfirmationAction = {
34
34
  hidePersistentOption?: boolean;
35
35
  };
36
36
  export declare function confirmationReducer(state: ConfirmationState, action: ConfirmationAction): ConfirmationState;
37
- //# sourceMappingURL=confirmationReducer.d.ts.map
@@ -47,14 +47,7 @@ export function confirmationReducer(state, action) {
47
47
  const { input, key, toolName, toolInput, suggestedPrefix, hidePersistentOption, } = action;
48
48
  if (key.return) {
49
49
  let decision = null;
50
- if (state.selectedOption === "clear") {
51
- decision = {
52
- behavior: "allow",
53
- newPermissionMode: "acceptEdits",
54
- clearContext: true,
55
- };
56
- }
57
- else if (state.selectedOption === "allow") {
50
+ if (state.selectedOption === "allow") {
58
51
  if (toolName === EXIT_PLAN_MODE_TOOL_NAME) {
59
52
  decision = { behavior: "allow", newPermissionMode: "default" };
60
53
  }
@@ -91,6 +84,12 @@ export function confirmationReducer(state, action) {
91
84
  decision = { behavior: "allow", newPermissionMode: "acceptEdits" };
92
85
  }
93
86
  }
87
+ else if (state.selectedOption === "bypass") {
88
+ decision = {
89
+ behavior: "allow",
90
+ newPermissionMode: "bypassPermissions",
91
+ };
92
+ }
94
93
  else if (state.alternativeText.trim()) {
95
94
  decision = {
96
95
  behavior: "deny",
@@ -123,11 +122,11 @@ export function confirmationReducer(state, action) {
123
122
  }
124
123
  }
125
124
  const availableOptions = [];
126
- if (toolName === EXIT_PLAN_MODE_TOOL_NAME)
127
- availableOptions.push("clear");
128
125
  availableOptions.push("allow");
129
126
  if (!hidePersistentOption)
130
127
  availableOptions.push("auto");
128
+ if (toolName === BASH_TOOL_NAME || toolName === EXIT_PLAN_MODE_TOOL_NAME)
129
+ availableOptions.push("bypass");
131
130
  availableOptions.push("alternative");
132
131
  if (key.upArrow) {
133
132
  const currentIndex = availableOptions.indexOf(state.selectedOption);
@@ -23,4 +23,3 @@ export type SelectorAction = {
23
23
  type: "CLEAR_DECISION";
24
24
  };
25
25
  export declare function helpSelectorReducer(state: SelectorState, action: SelectorAction): SelectorState;
26
- //# sourceMappingURL=helpSelectorReducer.d.ts.map
@@ -22,4 +22,3 @@ export type MarketplaceAddFormAction = {
22
22
  type: "CLEAR_PENDING_ACTION";
23
23
  };
24
24
  export declare function marketplaceAddFormReducer(state: MarketplaceAddFormState, action: MarketplaceAddFormAction): MarketplaceAddFormState;
25
- //# sourceMappingURL=marketplaceAddFormReducer.d.ts.map
@@ -35,4 +35,3 @@ export type McpManagerAction = {
35
35
  type: "CLEAR_PENDING_EFFECT";
36
36
  };
37
37
  export declare function mcpManagerReducer(state: McpManagerState, action: McpManagerAction): McpManagerState;
38
- //# sourceMappingURL=mcpManagerReducer.d.ts.map
@@ -30,4 +30,3 @@ export type PluginDetailAction = {
30
30
  type: "CLEAR_DECISION";
31
31
  };
32
32
  export declare function pluginDetailReducer(state: PluginDetailState, action: PluginDetailAction): PluginDetailState;
33
- //# sourceMappingURL=pluginDetailReducer.d.ts.map
@@ -80,4 +80,3 @@ export type QuestionAction = {
80
80
  }>;
81
81
  };
82
82
  export declare function questionReducer(state: QuestionState, action: QuestionAction): QuestionState;
83
- //# sourceMappingURL=questionReducer.d.ts.map
@@ -19,4 +19,3 @@ export type SelectorAction = {
19
19
  type: "CLEAR_DECISION";
20
20
  };
21
21
  export declare function rewindSelectorReducer(state: SelectorState, action: SelectorAction): SelectorState;
22
- //# sourceMappingURL=rewindSelectorReducer.d.ts.map
@@ -21,4 +21,3 @@ export type SelectorAction<T = unknown> = {
21
21
  type: "CLEAR_DECISION";
22
22
  };
23
23
  export declare function selectorReducer<T = unknown>(state: SelectorState<T>, action: SelectorAction<T>): SelectorState<T>;
24
- //# sourceMappingURL=selectorReducer.d.ts.map
@@ -38,4 +38,3 @@ export type WorkflowManagerAction = {
38
38
  type: "CLEAR_PENDING_EFFECT";
39
39
  };
40
40
  export declare function workflowManagerReducer(state: WorkflowManagerState, action: WorkflowManagerAction): WorkflowManagerState;
41
- //# sourceMappingURL=workflowManagerReducer.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export declare function startSessionSelectorCli({ workdir, }?: {
2
2
  workdir?: string;
3
3
  }): Promise<string | null>;
4
- //# sourceMappingURL=session-selector-cli.d.ts.map