wave-code 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.
Files changed (199) hide show
  1. package/dist/cli.d.ts +0 -1
  2. package/dist/cli.js +2 -2
  3. package/dist/commands/plugin/disable.d.ts +0 -1
  4. package/dist/commands/plugin/enable.d.ts +0 -1
  5. package/dist/commands/plugin/install.d.ts +0 -1
  6. package/dist/commands/plugin/list.d.ts +0 -1
  7. package/dist/commands/plugin/marketplace.d.ts +0 -1
  8. package/dist/commands/plugin/uninstall.d.ts +0 -1
  9. package/dist/commands/plugin/update.d.ts +0 -1
  10. package/dist/commands/update.d.ts +0 -1
  11. package/dist/components/App.d.ts +0 -1
  12. package/dist/components/App.js +5 -5
  13. package/dist/components/BackgroundTaskManager.d.ts +0 -1
  14. package/dist/components/BangDisplay.d.ts +0 -1
  15. package/dist/components/BtwDisplay.d.ts +0 -1
  16. package/dist/components/ChatInterface.d.ts +0 -1
  17. package/dist/components/CommandSelector.d.ts +0 -1
  18. package/dist/components/CompactDisplay.d.ts +0 -1
  19. package/dist/components/ConfirmationDetails.d.ts +0 -1
  20. package/dist/components/ConfirmationSelector.d.ts +0 -1
  21. package/dist/components/DiffDisplay.d.ts +0 -1
  22. package/dist/components/DiscoverView.d.ts +0 -1
  23. package/dist/components/FileSelector.d.ts +0 -1
  24. package/dist/components/HelpView.d.ts +0 -1
  25. package/dist/components/HistorySearch.d.ts +0 -1
  26. package/dist/components/InputBox.d.ts +0 -1
  27. package/dist/components/InstalledView.d.ts +0 -1
  28. package/dist/components/LoadingIndicator.d.ts +0 -1
  29. package/dist/components/LoginCommand.d.ts +0 -1
  30. package/dist/components/Markdown.d.ts +0 -1
  31. package/dist/components/MarketplaceAddForm.d.ts +0 -1
  32. package/dist/components/MarketplaceDetail.d.ts +0 -1
  33. package/dist/components/MarketplaceList.d.ts +0 -1
  34. package/dist/components/MarketplaceView.d.ts +0 -1
  35. package/dist/components/McpManager.d.ts +0 -1
  36. package/dist/components/MessageBlockItem.d.ts +0 -1
  37. package/dist/components/MessageList.d.ts +0 -1
  38. package/dist/components/ModelSelector.d.ts +0 -1
  39. package/dist/components/PlanDisplay.d.ts +0 -1
  40. package/dist/components/PluginDetail.d.ts +0 -1
  41. package/dist/components/PluginList.d.ts +0 -1
  42. package/dist/components/PluginManagerShell.d.ts +0 -1
  43. package/dist/components/PluginManagerTypes.d.ts +0 -1
  44. package/dist/components/QueuedMessageList.d.ts +0 -1
  45. package/dist/components/ReasoningDisplay.d.ts +0 -1
  46. package/dist/components/RewindCommand.d.ts +0 -1
  47. package/dist/components/SessionSelector.d.ts +0 -1
  48. package/dist/components/StatusCommand.d.ts +0 -1
  49. package/dist/components/StatusLine.d.ts +0 -1
  50. package/dist/components/TaskList.d.ts +0 -1
  51. package/dist/components/TaskNotificationMessage.d.ts +0 -1
  52. package/dist/components/ToolDisplay.d.ts +0 -1
  53. package/dist/components/WorkflowManager.d.ts +0 -1
  54. package/dist/components/WorktreeExitPrompt.d.ts +0 -1
  55. package/dist/constants/commands.d.ts +0 -1
  56. package/dist/contexts/PluginManagerContext.d.ts +0 -1
  57. package/dist/contexts/useAppConfig.d.ts +0 -1
  58. package/dist/contexts/useChat.d.ts +0 -1
  59. package/dist/contexts/useChat.js +16 -1
  60. package/dist/contracts/status.d.ts +0 -1
  61. package/dist/hooks/useInputManager.d.ts +0 -1
  62. package/dist/hooks/usePluginManager.d.ts +0 -1
  63. package/dist/hooks/useTasks.d.ts +0 -1
  64. package/dist/index.d.ts +0 -1
  65. package/dist/index.js +7 -10
  66. package/dist/managers/inputHandlers.d.ts +0 -1
  67. package/dist/managers/inputReducer.d.ts +0 -1
  68. package/dist/plugin-manager-cli.d.ts +0 -1
  69. package/dist/print-cli.d.ts +0 -1
  70. package/dist/print-cli.js +15 -1
  71. package/dist/reducers/backgroundTaskManagerReducer.d.ts +0 -1
  72. package/dist/reducers/confirmationReducer.d.ts +0 -1
  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 +2 -1
  83. package/dist/stdio/agentBridge.js +25 -27
  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 +2 -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 +0 -1
  99. package/package.json +2 -2
  100. package/src/cli.tsx +2 -0
  101. package/src/components/App.tsx +5 -0
  102. package/src/contexts/useChat.tsx +18 -0
  103. package/src/index.ts +7 -15
  104. package/src/print-cli.ts +17 -0
  105. package/src/stdio/agentBridge.ts +41 -38
  106. package/src/stdio/protocol.ts +5 -1
  107. package/src/types.ts +2 -0
  108. package/dist/cli.d.ts.map +0 -1
  109. package/dist/commands/plugin/disable.d.ts.map +0 -1
  110. package/dist/commands/plugin/enable.d.ts.map +0 -1
  111. package/dist/commands/plugin/install.d.ts.map +0 -1
  112. package/dist/commands/plugin/list.d.ts.map +0 -1
  113. package/dist/commands/plugin/marketplace.d.ts.map +0 -1
  114. package/dist/commands/plugin/uninstall.d.ts.map +0 -1
  115. package/dist/commands/plugin/update.d.ts.map +0 -1
  116. package/dist/commands/update.d.ts.map +0 -1
  117. package/dist/components/App.d.ts.map +0 -1
  118. package/dist/components/BackgroundTaskManager.d.ts.map +0 -1
  119. package/dist/components/BangDisplay.d.ts.map +0 -1
  120. package/dist/components/BtwDisplay.d.ts.map +0 -1
  121. package/dist/components/ChatInterface.d.ts.map +0 -1
  122. package/dist/components/CommandSelector.d.ts.map +0 -1
  123. package/dist/components/CompactDisplay.d.ts.map +0 -1
  124. package/dist/components/ConfirmationDetails.d.ts.map +0 -1
  125. package/dist/components/ConfirmationSelector.d.ts.map +0 -1
  126. package/dist/components/DiffDisplay.d.ts.map +0 -1
  127. package/dist/components/DiscoverView.d.ts.map +0 -1
  128. package/dist/components/FileSelector.d.ts.map +0 -1
  129. package/dist/components/HelpView.d.ts.map +0 -1
  130. package/dist/components/HistorySearch.d.ts.map +0 -1
  131. package/dist/components/InputBox.d.ts.map +0 -1
  132. package/dist/components/InstalledView.d.ts.map +0 -1
  133. package/dist/components/LoadingIndicator.d.ts.map +0 -1
  134. package/dist/components/LoginCommand.d.ts.map +0 -1
  135. package/dist/components/Markdown.d.ts.map +0 -1
  136. package/dist/components/MarketplaceAddForm.d.ts.map +0 -1
  137. package/dist/components/MarketplaceDetail.d.ts.map +0 -1
  138. package/dist/components/MarketplaceList.d.ts.map +0 -1
  139. package/dist/components/MarketplaceView.d.ts.map +0 -1
  140. package/dist/components/McpManager.d.ts.map +0 -1
  141. package/dist/components/MessageBlockItem.d.ts.map +0 -1
  142. package/dist/components/MessageList.d.ts.map +0 -1
  143. package/dist/components/ModelSelector.d.ts.map +0 -1
  144. package/dist/components/PlanDisplay.d.ts.map +0 -1
  145. package/dist/components/PluginDetail.d.ts.map +0 -1
  146. package/dist/components/PluginList.d.ts.map +0 -1
  147. package/dist/components/PluginManagerShell.d.ts.map +0 -1
  148. package/dist/components/PluginManagerTypes.d.ts.map +0 -1
  149. package/dist/components/QueuedMessageList.d.ts.map +0 -1
  150. package/dist/components/ReasoningDisplay.d.ts.map +0 -1
  151. package/dist/components/RewindCommand.d.ts.map +0 -1
  152. package/dist/components/SessionSelector.d.ts.map +0 -1
  153. package/dist/components/StatusCommand.d.ts.map +0 -1
  154. package/dist/components/StatusLine.d.ts.map +0 -1
  155. package/dist/components/TaskList.d.ts.map +0 -1
  156. package/dist/components/TaskNotificationMessage.d.ts.map +0 -1
  157. package/dist/components/ToolDisplay.d.ts.map +0 -1
  158. package/dist/components/WorkflowManager.d.ts.map +0 -1
  159. package/dist/components/WorktreeExitPrompt.d.ts.map +0 -1
  160. package/dist/constants/commands.d.ts.map +0 -1
  161. package/dist/contexts/PluginManagerContext.d.ts.map +0 -1
  162. package/dist/contexts/useAppConfig.d.ts.map +0 -1
  163. package/dist/contexts/useChat.d.ts.map +0 -1
  164. package/dist/contracts/status.d.ts.map +0 -1
  165. package/dist/hooks/useInputManager.d.ts.map +0 -1
  166. package/dist/hooks/usePluginManager.d.ts.map +0 -1
  167. package/dist/hooks/useTasks.d.ts.map +0 -1
  168. package/dist/index.d.ts.map +0 -1
  169. package/dist/managers/inputHandlers.d.ts.map +0 -1
  170. package/dist/managers/inputReducer.d.ts.map +0 -1
  171. package/dist/plugin-manager-cli.d.ts.map +0 -1
  172. package/dist/print-cli.d.ts.map +0 -1
  173. package/dist/reducers/backgroundTaskManagerReducer.d.ts.map +0 -1
  174. package/dist/reducers/confirmationReducer.d.ts.map +0 -1
  175. package/dist/reducers/helpSelectorReducer.d.ts.map +0 -1
  176. package/dist/reducers/marketplaceAddFormReducer.d.ts.map +0 -1
  177. package/dist/reducers/mcpManagerReducer.d.ts.map +0 -1
  178. package/dist/reducers/pluginDetailReducer.d.ts.map +0 -1
  179. package/dist/reducers/questionReducer.d.ts.map +0 -1
  180. package/dist/reducers/rewindSelectorReducer.d.ts.map +0 -1
  181. package/dist/reducers/selectorReducer.d.ts.map +0 -1
  182. package/dist/reducers/workflowManagerReducer.d.ts.map +0 -1
  183. package/dist/session-selector-cli.d.ts.map +0 -1
  184. package/dist/stdio/agentBridge.d.ts.map +0 -1
  185. package/dist/stdio/index.d.ts.map +0 -1
  186. package/dist/stdio/protocol.d.ts.map +0 -1
  187. package/dist/stdio/stdioServer.d.ts.map +0 -1
  188. package/dist/stdio-cli.d.ts.map +0 -1
  189. package/dist/types.d.ts.map +0 -1
  190. package/dist/utils/clipboard.d.ts.map +0 -1
  191. package/dist/utils/constants.d.ts.map +0 -1
  192. package/dist/utils/highlightUtils.d.ts.map +0 -1
  193. package/dist/utils/inputUtils.d.ts.map +0 -1
  194. package/dist/utils/logger.d.ts.map +0 -1
  195. package/dist/utils/throttle.d.ts.map +0 -1
  196. package/dist/utils/toolParameterTransforms.d.ts.map +0 -1
  197. package/dist/utils/usageSummary.d.ts.map +0 -1
  198. package/dist/utils/version.d.ts.map +0 -1
  199. 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
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import { App } from "./components/App.js";
4
4
  import { cleanupLogs } from "./utils/logger.js";
5
5
  import { removeWorktree } from "./utils/worktree.js";
6
6
  export async function startCli(options) {
7
- const { restoreSessionId, continueLastSession, bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, version, model, mcpServers, } = options;
7
+ const { restoreSessionId, continueLastSession, bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, originalCwd, version, model, mcpServers, } = options;
8
8
  // Continue with ink-based UI for normal mode
9
9
  let shouldRemoveWorktree = false;
10
10
  const handleExit = (shouldRemove) => {
@@ -12,7 +12,7 @@ export async function startCli(options) {
12
12
  unmount();
13
13
  };
14
14
  // Render the application
15
- const { unmount, waitUntilExit } = render(_jsx(App, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, worktreeSession: worktreeSession, workdir: workdir, version: version, model: model, mcpServers: mcpServers, onExit: handleExit }), { exitOnCtrlC: false });
15
+ const { unmount, waitUntilExit } = render(_jsx(App, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, worktreeSession: worktreeSession, workdir: workdir, originalCwd: originalCwd, version: version, model: model, mcpServers: mcpServers, onExit: handleExit }), { exitOnCtrlC: false });
16
16
  // Wait for the app to finish unmounting
17
17
  await waitUntilExit();
18
18
  try {
@@ -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
@@ -50,7 +50,7 @@ const ChatWithExitPrompt = ({ worktreeSession, onExit }) => {
50
50
  }
51
51
  return _jsx(ChatInterface, {});
52
52
  };
53
- const AppWithProviders = ({ bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, version, model, mcpServers, onExit, }) => {
53
+ const AppWithProviders = ({ bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, originalCwd, version, model, mcpServers, onExit, }) => {
54
54
  // Handle Ctrl-C for non-worktree sessions (immediate exit)
55
55
  // Ink runs terminal in raw mode, so Ctrl+C arrives as useInput event, not SIGINT
56
56
  useInput((input, key) => {
@@ -60,10 +60,10 @@ const AppWithProviders = ({ bypassPermissions, permissionMode, pluginDirs, tools
60
60
  }
61
61
  });
62
62
  if (worktreeSession) {
63
- return (_jsx(ChatProvider, { bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, workdir: workdir, worktreeSession: worktreeSession, version: version, model: model, mcpServers: mcpServers, children: _jsx(ChatWithExitPrompt, { worktreeSession: worktreeSession, onExit: onExit }) }));
63
+ return (_jsx(ChatProvider, { bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, workdir: workdir, worktreeSession: worktreeSession, originalCwd: originalCwd, version: version, model: model, mcpServers: mcpServers, children: _jsx(ChatWithExitPrompt, { worktreeSession: worktreeSession, onExit: onExit }) }));
64
64
  }
65
- return (_jsx(ChatProvider, { bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, workdir: workdir, worktreeSession: worktreeSession, version: version, model: model, mcpServers: mcpServers, children: _jsx(ChatInterface, {}) }));
65
+ return (_jsx(ChatProvider, { bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, workdir: workdir, worktreeSession: worktreeSession, originalCwd: originalCwd, version: version, model: model, mcpServers: mcpServers, children: _jsx(ChatInterface, {}) }));
66
66
  };
67
- export const App = ({ restoreSessionId, continueLastSession, bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, version, model, mcpServers, onExit, }) => {
68
- return (_jsx(AppProvider, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, children: _jsx(AppWithProviders, { bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, worktreeSession: worktreeSession, workdir: workdir, version: version, model: model, mcpServers: mcpServers, onExit: onExit }) }));
67
+ export const App = ({ restoreSessionId, continueLastSession, bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, originalCwd, version, model, mcpServers, onExit, }) => {
68
+ return (_jsx(AppProvider, { restoreSessionId: restoreSessionId, continueLastSession: continueLastSession, children: _jsx(AppWithProviders, { bypassPermissions: bypassPermissions, permissionMode: permissionMode, pluginDirs: pluginDirs, tools: tools, allowedTools: allowedTools, disallowedTools: disallowedTools, worktreeSession: worktreeSession, workdir: workdir, originalCwd: originalCwd, version: version, model: model, mcpServers: mcpServers, onExit: onExit }) }));
69
69
  };
@@ -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
@@ -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
@@ -15,7 +15,7 @@ export const useChat = () => {
15
15
  }
16
16
  return context;
17
17
  };
18
- export const ChatProvider = ({ children, bypassPermissions, permissionMode: initialPermissionMode, pluginDirs, tools, allowedTools, disallowedTools, workdir, worktreeSession, version, model, mcpServers, }) => {
18
+ export const ChatProvider = ({ children, bypassPermissions, permissionMode: initialPermissionMode, pluginDirs, tools, allowedTools, disallowedTools, workdir, worktreeSession, originalCwd, version, model, mcpServers, }) => {
19
19
  const { restoreSessionId, continueLastSession } = useAppConfig();
20
20
  const { stdout } = useStdout();
21
21
  // Message Display State
@@ -233,6 +233,20 @@ export const ChatProvider = ({ children, bypassPermissions, permissionMode: init
233
233
  mcpServers,
234
234
  });
235
235
  agentRef.current = agent;
236
+ // Inject worktree session into this agent's own DI container so system
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).
239
+ if (worktreeSession) {
240
+ const session = {
241
+ originalCwd: originalCwd ?? worktreeSession.repoRoot,
242
+ worktreePath: worktreeSession.path,
243
+ worktreeBranch: worktreeSession.branch,
244
+ worktreeName: worktreeSession.name,
245
+ isNew: worktreeSession.isNew,
246
+ repoRoot: worktreeSession.repoRoot,
247
+ };
248
+ agent.setWorktreeSession(session);
249
+ }
236
250
  // Get initial state
237
251
  setSessionId(agent.sessionId);
238
252
  setMessages(agent.messages);
@@ -266,6 +280,7 @@ export const ChatProvider = ({ children, bypassPermissions, permissionMode: init
266
280
  disallowedTools,
267
281
  workdir,
268
282
  worktreeSession,
283
+ originalCwd,
269
284
  model,
270
285
  initialPermissionMode,
271
286
  throttledSetMessages,
@@ -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, setCurrentWorktreeSession, } from "wave-agent-sdk";
4
+ import { generateRandomName } from "wave-agent-sdk";
5
5
  import { createWorktree } from "./utils/worktree.js";
6
6
  import path from "path";
7
7
  import { readFileSync } from "fs";
@@ -237,15 +237,9 @@ export async function main() {
237
237
  name = generateRandomName();
238
238
  }
239
239
  worktreeSession = createWorktree(name, originalCwd);
240
- // Register worktree session so system prompt includes worktree warnings
241
- setCurrentWorktreeSession({
242
- originalCwd,
243
- worktreePath: worktreeSession.path,
244
- worktreeBranch: worktreeSession.branch,
245
- worktreeName: worktreeSession.name,
246
- isNew: worktreeSession.isNew,
247
- repoRoot: worktreeSession.repoRoot,
248
- });
240
+ // Note: the full worktree session (originalCwd etc.) is injected into the
241
+ // agent's DI container after the agent is created in useChat.tsx. This keeps
242
+ // worktree state per-session instead of process-global.
249
243
  }
250
244
  const workdir = worktreeSession?.path || originalCwd;
251
245
  if (worktreeSession) {
@@ -272,6 +266,7 @@ export async function main() {
272
266
  disallowedTools,
273
267
  worktreeSession,
274
268
  workdir,
269
+ originalCwd,
275
270
  version,
276
271
  model: argv.model,
277
272
  mcpServers,
@@ -293,6 +288,7 @@ export async function main() {
293
288
  disallowedTools,
294
289
  worktreeSession,
295
290
  workdir,
291
+ originalCwd,
296
292
  version,
297
293
  model: argv.model,
298
294
  mcpServers,
@@ -314,6 +310,7 @@ export async function main() {
314
310
  disallowedTools,
315
311
  worktreeSession,
316
312
  workdir,
313
+ originalCwd,
317
314
  version,
318
315
  model: argv.model,
319
316
  mcpServers,
@@ -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
@@ -14,7 +14,7 @@ function displayTimingInfo(startTime, showStats) {
14
14
  }
15
15
  export async function startPrintCli(options) {
16
16
  const startTime = new Date();
17
- const { restoreSessionId, continueLastSession, message, showStats = false, bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, model, mcpServers, } = options;
17
+ const { restoreSessionId, continueLastSession, message, showStats = false, bypassPermissions, permissionMode, pluginDirs, tools, allowedTools, disallowedTools, worktreeSession, workdir, originalCwd, model, mcpServers, } = options;
18
18
  if ((typeof message !== "string" || message.trim() === "") &&
19
19
  !continueLastSession &&
20
20
  !restoreSessionId) {
@@ -81,10 +81,24 @@ export async function startPrintCli(options) {
81
81
  allowedTools,
82
82
  disallowedTools,
83
83
  workdir,
84
+ worktreeName: worktreeSession?.name,
85
+ isNewWorktree: worktreeSession?.isNew,
84
86
  model,
85
87
  mcpServers,
86
88
  // 保持流式模式以获得更好的命令行用户体验
87
89
  });
90
+ // Inject worktree session into this agent's container (per-session, not global)
91
+ if (worktreeSession) {
92
+ const session = {
93
+ originalCwd: originalCwd ?? worktreeSession.repoRoot,
94
+ worktreePath: worktreeSession.path,
95
+ worktreeBranch: worktreeSession.branch,
96
+ worktreeName: worktreeSession.name,
97
+ isNew: worktreeSession.isNew,
98
+ repoRoot: worktreeSession.repoRoot,
99
+ };
100
+ agent.setWorktreeSession(session);
101
+ }
88
102
  // Send message if provided and not empty
89
103
  if (typeof message === "string" && message.trim() !== "") {
90
104
  await agent.sendMessage(message);
@@ -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
@@ -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
@@ -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