@akiojin/gwt 4.10.0 → 4.12.0
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/README.ja.md +4 -4
- package/README.md +4 -4
- package/bin/gwt.js +1 -1
- package/dist/claude.d.ts +2 -0
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +97 -68
- package/dist/claude.js.map +1 -1
- package/dist/cli/ui/App.solid.d.ts +29 -0
- package/dist/cli/ui/App.solid.d.ts.map +1 -0
- package/dist/cli/ui/App.solid.js +1395 -0
- package/dist/cli/ui/App.solid.js.map +1 -0
- package/dist/cli/ui/components/solid/Footer.d.ts +10 -0
- package/dist/cli/ui/components/solid/Footer.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/Footer.js +10 -0
- package/dist/cli/ui/components/solid/Footer.js.map +1 -0
- package/dist/cli/ui/components/{parts → solid}/Header.d.ts +1 -6
- package/dist/cli/ui/components/solid/Header.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/Header.js +13 -0
- package/dist/cli/ui/components/solid/Header.js.map +1 -0
- package/dist/cli/ui/components/solid/HelpOverlay.d.ts +8 -0
- package/dist/cli/ui/components/solid/HelpOverlay.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/HelpOverlay.js +118 -0
- package/dist/cli/ui/components/solid/HelpOverlay.js.map +1 -0
- package/dist/cli/ui/components/solid/QuickStartStep.d.ts +17 -0
- package/dist/cli/ui/components/solid/QuickStartStep.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/QuickStartStep.js +152 -0
- package/dist/cli/ui/components/solid/QuickStartStep.js.map +1 -0
- package/dist/cli/ui/components/solid/SelectInput.d.ts +22 -0
- package/dist/cli/ui/components/solid/SelectInput.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/SelectInput.js +45 -0
- package/dist/cli/ui/components/solid/SelectInput.js.map +1 -0
- package/dist/cli/ui/components/solid/TextInput.d.ts +12 -0
- package/dist/cli/ui/components/solid/TextInput.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/TextInput.js +9 -0
- package/dist/cli/ui/components/solid/TextInput.js.map +1 -0
- package/dist/cli/ui/components/solid/WizardController.d.ts +34 -0
- package/dist/cli/ui/components/solid/WizardController.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/WizardController.js +223 -0
- package/dist/cli/ui/components/solid/WizardController.js.map +1 -0
- package/dist/cli/ui/components/solid/WizardPopup.d.ts +26 -0
- package/dist/cli/ui/components/solid/WizardPopup.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/WizardPopup.js +68 -0
- package/dist/cli/ui/components/solid/WizardPopup.js.map +1 -0
- package/dist/cli/ui/components/solid/WizardSteps.d.ts +52 -0
- package/dist/cli/ui/components/solid/WizardSteps.d.ts.map +1 -0
- package/dist/cli/ui/components/solid/WizardSteps.js +419 -0
- package/dist/cli/ui/components/solid/WizardSteps.js.map +1 -0
- package/dist/cli/ui/core/index.d.ts +12 -0
- package/dist/cli/ui/core/index.d.ts.map +1 -0
- package/dist/cli/ui/core/index.js +15 -0
- package/dist/cli/ui/core/index.js.map +1 -0
- package/dist/cli/ui/core/keybindings.d.ts +106 -0
- package/dist/cli/ui/core/keybindings.d.ts.map +1 -0
- package/dist/cli/ui/core/keybindings.js +270 -0
- package/dist/cli/ui/core/keybindings.js.map +1 -0
- package/dist/cli/ui/core/theme.d.ts +123 -0
- package/dist/cli/ui/core/theme.d.ts.map +1 -0
- package/dist/cli/ui/core/theme.js +191 -0
- package/dist/cli/ui/core/theme.js.map +1 -0
- package/dist/cli/ui/core/types.d.ts +156 -0
- package/dist/cli/ui/core/types.d.ts.map +1 -0
- package/dist/cli/ui/core/types.js +10 -0
- package/dist/cli/ui/core/types.js.map +1 -0
- package/dist/cli/ui/hooks/solid/useScrollableList.d.ts +26 -0
- package/dist/cli/ui/hooks/solid/useScrollableList.d.ts.map +1 -0
- package/dist/cli/ui/hooks/solid/useScrollableList.js +89 -0
- package/dist/cli/ui/hooks/solid/useScrollableList.js.map +1 -0
- package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts +10 -0
- package/dist/cli/ui/hooks/solid/useTerminalSize.d.ts.map +1 -0
- package/dist/cli/ui/hooks/solid/useTerminalSize.js +16 -0
- package/dist/cli/ui/hooks/solid/useTerminalSize.js.map +1 -0
- package/dist/cli/ui/index.solid.d.ts +5 -0
- package/dist/cli/ui/index.solid.d.ts.map +1 -0
- package/dist/cli/ui/index.solid.js +21 -0
- package/dist/cli/ui/index.solid.js.map +1 -0
- package/dist/cli/ui/screens/solid/BranchListScreen.d.ts +53 -0
- package/dist/cli/ui/screens/solid/BranchListScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/BranchListScreen.js +829 -0
- package/dist/cli/ui/screens/solid/BranchListScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts +11 -0
- package/dist/cli/ui/screens/solid/ConfirmScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/ConfirmScreen.js +45 -0
- package/dist/cli/ui/screens/solid/ConfirmScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts +14 -0
- package/dist/cli/ui/screens/solid/EnvironmentScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/EnvironmentScreen.js +90 -0
- package/dist/cli/ui/screens/solid/EnvironmentScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/ErrorScreen.d.ts +8 -0
- package/dist/cli/ui/screens/solid/ErrorScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/ErrorScreen.js +18 -0
- package/dist/cli/ui/screens/solid/ErrorScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/InputScreen.d.ts +13 -0
- package/dist/cli/ui/screens/solid/InputScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/InputScreen.js +17 -0
- package/dist/cli/ui/screens/solid/InputScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts +9 -0
- package/dist/cli/ui/screens/solid/LoadingIndicator.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/LoadingIndicator.js +43 -0
- package/dist/cli/ui/screens/solid/LoadingIndicator.js.map +1 -0
- package/dist/cli/ui/{components/screens → screens/solid}/LogDetailScreen.d.ts +2 -2
- package/dist/cli/ui/screens/solid/LogDetailScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/LogDetailScreen.js +34 -0
- package/dist/cli/ui/screens/solid/LogDetailScreen.js.map +1 -0
- package/dist/cli/ui/{components/screens/LogListScreen.d.ts → screens/solid/LogScreen.d.ts} +10 -4
- package/dist/cli/ui/screens/solid/LogScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/LogScreen.js +333 -0
- package/dist/cli/ui/screens/solid/LogScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts +17 -0
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.js +115 -0
- package/dist/cli/ui/screens/solid/ProfileEnvScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/ProfileScreen.d.ts +17 -0
- package/dist/cli/ui/screens/solid/ProfileScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/ProfileScreen.js +50 -0
- package/dist/cli/ui/screens/solid/ProfileScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/SelectorScreen.d.ts +20 -0
- package/dist/cli/ui/screens/solid/SelectorScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/SelectorScreen.js +98 -0
- package/dist/cli/ui/screens/solid/SelectorScreen.js.map +1 -0
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts +13 -0
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.d.ts.map +1 -0
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js +59 -0
- package/dist/cli/ui/screens/solid/WorktreeCreateScreen.js.map +1 -0
- package/dist/cli/ui/stores/appStore.d.ts +143 -0
- package/dist/cli/ui/stores/appStore.d.ts.map +1 -0
- package/dist/cli/ui/stores/appStore.js +158 -0
- package/dist/cli/ui/stores/appStore.js.map +1 -0
- package/dist/cli/ui/stores/branchStore.d.ts +159 -0
- package/dist/cli/ui/stores/branchStore.d.ts.map +1 -0
- package/dist/cli/ui/stores/branchStore.js +275 -0
- package/dist/cli/ui/stores/branchStore.js.map +1 -0
- package/dist/cli/ui/stores/index.d.ts +11 -0
- package/dist/cli/ui/stores/index.d.ts.map +1 -0
- package/dist/cli/ui/stores/index.js +14 -0
- package/dist/cli/ui/stores/index.js.map +1 -0
- package/dist/cli/ui/stores/uiStore.d.ts +146 -0
- package/dist/cli/ui/stores/uiStore.d.ts.map +1 -0
- package/dist/cli/ui/stores/uiStore.js +166 -0
- package/dist/cli/ui/stores/uiStore.js.map +1 -0
- package/dist/cli/ui/types.d.ts +17 -1
- package/dist/cli/ui/types.d.ts.map +1 -1
- package/dist/cli/ui/utils/branchFormatter.d.ts +1 -0
- package/dist/cli/ui/utils/branchFormatter.d.ts.map +1 -1
- package/dist/cli/ui/utils/branchFormatter.js +36 -217
- package/dist/cli/ui/utils/branchFormatter.js.map +1 -1
- package/dist/cli/ui/utils/continueSession.d.ts +18 -0
- package/dist/cli/ui/utils/continueSession.d.ts.map +1 -1
- package/dist/cli/ui/utils/continueSession.js +90 -2
- package/dist/cli/ui/utils/continueSession.js.map +1 -1
- package/dist/cli/ui/utils/versionCache.d.ts +37 -0
- package/dist/cli/ui/utils/versionCache.d.ts.map +1 -0
- package/dist/cli/ui/utils/versionCache.js +70 -0
- package/dist/cli/ui/utils/versionCache.js.map +1 -0
- package/dist/cli/ui/utils/versionFetcher.d.ts +41 -0
- package/dist/cli/ui/utils/versionFetcher.d.ts.map +1 -0
- package/dist/cli/ui/utils/versionFetcher.js +89 -0
- package/dist/cli/ui/utils/versionFetcher.js.map +1 -0
- package/dist/client/assets/{index-ChHC-Puh.css → index-BbfV7Wuj.css} +1 -1
- package/dist/client/assets/index-CoAyq5x1.js +78 -0
- package/dist/client/index.html +2 -2
- package/dist/codex.d.ts +2 -0
- package/dist/codex.d.ts.map +1 -1
- package/dist/codex.js +109 -39
- package/dist/codex.js.map +1 -1
- package/dist/config/builtin-coding-agents.js +4 -4
- package/dist/config/builtin-coding-agents.js.map +1 -1
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +11 -0
- package/dist/config/index.js.map +1 -1
- package/dist/gemini.d.ts +2 -0
- package/dist/gemini.d.ts.map +1 -1
- package/dist/gemini.js +77 -39
- package/dist/gemini.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +153 -103
- package/dist/index.js.map +1 -1
- package/dist/launcher.d.ts.map +1 -1
- package/dist/launcher.js +56 -6
- package/dist/launcher.js.map +1 -1
- package/dist/logging/agentOutput.d.ts +21 -0
- package/dist/logging/agentOutput.d.ts.map +1 -0
- package/dist/logging/agentOutput.js +164 -0
- package/dist/logging/agentOutput.js.map +1 -0
- package/dist/logging/formatter.d.ts.map +1 -1
- package/dist/logging/formatter.js +18 -4
- package/dist/logging/formatter.js.map +1 -1
- package/dist/logging/logger.d.ts.map +1 -1
- package/dist/logging/logger.js +28 -9
- package/dist/logging/logger.js.map +1 -1
- package/dist/logging/reader.d.ts +21 -0
- package/dist/logging/reader.d.ts.map +1 -1
- package/dist/logging/reader.js +79 -0
- package/dist/logging/reader.js.map +1 -1
- package/dist/opentui/highlights-eq9cgrbb.scm +604 -0
- package/dist/opentui/highlights-ghv9g403.scm +205 -0
- package/dist/opentui/highlights-hk7bwhj4.scm +284 -0
- package/dist/opentui/highlights-r812a2qc.scm +150 -0
- package/dist/opentui/highlights-x6tmsnaa.scm +115 -0
- package/dist/opentui/index.solid.d.ts +2 -0
- package/dist/opentui/index.solid.d.ts.map +1 -0
- package/dist/opentui/index.solid.js +53687 -0
- package/dist/opentui/index.solid.js.map +1 -0
- package/dist/opentui/injections-73j83es3.scm +27 -0
- package/dist/opentui/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/opentui/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/opentui/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/opentui/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/opentui/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/dist/repositories/worktree.repository.d.ts +1 -0
- package/dist/repositories/worktree.repository.d.ts.map +1 -1
- package/dist/repositories/worktree.repository.js +7 -0
- package/dist/repositories/worktree.repository.js.map +1 -1
- package/dist/services/codingAgentResolver.d.ts +2 -0
- package/dist/services/codingAgentResolver.d.ts.map +1 -1
- package/dist/services/codingAgentResolver.js +30 -4
- package/dist/services/codingAgentResolver.js.map +1 -1
- package/dist/services/dependency-installer.d.ts.map +1 -1
- package/dist/services/dependency-installer.js +2 -7
- package/dist/services/dependency-installer.js.map +1 -1
- package/dist/types/api.d.ts +3 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/coding-agent.d.ts +62 -0
- package/dist/types/coding-agent.d.ts.map +1 -0
- package/dist/types/coding-agent.js +29 -0
- package/dist/types/coding-agent.js.map +1 -0
- package/dist/types/tools.d.ts +17 -0
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/coding-agent-colors.d.ts +88 -0
- package/dist/utils/coding-agent-colors.d.ts.map +1 -0
- package/dist/utils/coding-agent-colors.js +137 -0
- package/dist/utils/coding-agent-colors.js.map +1 -0
- package/dist/utils/command.d.ts +1 -1
- package/dist/utils/command.js +1 -1
- package/dist/utils/error-utils.d.ts +27 -0
- package/dist/utils/error-utils.d.ts.map +1 -0
- package/dist/utils/error-utils.js +98 -0
- package/dist/utils/error-utils.js.map +1 -0
- package/dist/utils/npmRegistry.d.ts +61 -0
- package/dist/utils/npmRegistry.d.ts.map +1 -0
- package/dist/utils/npmRegistry.js +180 -0
- package/dist/utils/npmRegistry.js.map +1 -0
- package/dist/utils/prompt.d.ts +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/session/common.d.ts +8 -0
- package/dist/utils/session/common.d.ts.map +1 -1
- package/dist/utils/session/common.js +22 -0
- package/dist/utils/session/common.js.map +1 -1
- package/dist/utils/session/parsers/claude.d.ts +10 -4
- package/dist/utils/session/parsers/claude.d.ts.map +1 -1
- package/dist/utils/session/parsers/claude.js +64 -18
- package/dist/utils/session/parsers/claude.js.map +1 -1
- package/dist/utils/session/parsers/codex.d.ts.map +1 -1
- package/dist/utils/session/parsers/codex.js +47 -20
- package/dist/utils/session/parsers/codex.js.map +1 -1
- package/dist/utils/session/parsers/gemini.d.ts.map +1 -1
- package/dist/utils/session/parsers/gemini.js +43 -6
- package/dist/utils/session/parsers/gemini.js.map +1 -1
- package/dist/utils/session/parsers/opencode.d.ts.map +1 -1
- package/dist/utils/session/parsers/opencode.js +43 -6
- package/dist/utils/session/parsers/opencode.js.map +1 -1
- package/dist/utils/session/types.d.ts +7 -0
- package/dist/utils/session/types.d.ts.map +1 -1
- package/dist/utils/terminal.d.ts +1 -0
- package/dist/utils/terminal.d.ts.map +1 -1
- package/dist/utils/terminal.js +20 -0
- package/dist/utils/terminal.js.map +1 -1
- package/dist/utils.d.ts +9 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +33 -2
- package/dist/utils.js.map +1 -1
- package/dist/web/client/src/components/CodingAgentLaunchModal.d.ts.map +1 -1
- package/dist/web/client/src/components/CodingAgentLaunchModal.js +7 -16
- package/dist/web/client/src/components/CodingAgentLaunchModal.js.map +1 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.d.ts.map +1 -1
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js +7 -2
- package/dist/web/client/src/components/branch-detail/BranchInfoCards.js.map +1 -1
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.d.ts.map +1 -1
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js +2 -1
- package/dist/web/client/src/components/branch-detail/SessionHistoryTable.js.map +1 -1
- package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts +2 -2
- package/dist/web/client/src/components/branch-detail/ToolLauncher.d.ts.map +1 -1
- package/dist/web/client/src/components/branch-detail/ToolLauncher.js +5 -5
- package/dist/web/client/src/components/branch-detail/ToolLauncher.js.map +1 -1
- package/dist/web/client/src/components/ui/alert.d.ts +1 -1
- package/dist/web/client/src/lib/coding-agent-colors.d.ts +86 -0
- package/dist/web/client/src/lib/coding-agent-colors.d.ts.map +1 -0
- package/dist/web/client/src/lib/coding-agent-colors.js +135 -0
- package/dist/web/client/src/lib/coding-agent-colors.js.map +1 -0
- package/dist/web/client/src/pages/BranchDetailPage.js +10 -10
- package/dist/web/client/src/pages/BranchDetailPage.js.map +1 -1
- package/dist/web/server/pty/manager.d.ts +2 -0
- package/dist/web/server/pty/manager.d.ts.map +1 -1
- package/dist/web/server/pty/manager.js +104 -0
- package/dist/web/server/pty/manager.js.map +1 -1
- package/dist/web/server/routes/sessions.d.ts.map +1 -1
- package/dist/web/server/routes/sessions.js +5 -1
- package/dist/web/server/routes/sessions.js.map +1 -1
- package/dist/web/server/services/branches.d.ts.map +1 -1
- package/dist/web/server/services/branches.js +10 -8
- package/dist/web/server/services/branches.js.map +1 -1
- package/dist/web/server/services/worktrees.js +2 -2
- package/dist/web/server/services/worktrees.js.map +1 -1
- package/dist/worktree.d.ts +50 -1
- package/dist/worktree.d.ts.map +1 -1
- package/dist/worktree.js +292 -100
- package/dist/worktree.js.map +1 -1
- package/package.json +13 -14
- package/src/claude.ts +129 -95
- package/src/cli/ui/App.solid.tsx +2096 -0
- package/src/cli/ui/__tests__/solid/AppSolid.cleanup.test.tsx +1084 -0
- package/src/cli/ui/__tests__/solid/BranchListScreen.test.tsx +343 -0
- package/src/cli/ui/__tests__/solid/ConfirmScreen.test.tsx +77 -0
- package/src/cli/ui/__tests__/solid/LogScreen.test.tsx +351 -0
- package/src/cli/ui/__tests__/solid/components/QuickStartStep.test.tsx +308 -0
- package/src/cli/ui/__tests__/solid/components/WizardPopup.test.tsx +231 -0
- package/src/cli/ui/__tests__/solid/components/WizardSteps.test.tsx +241 -0
- package/src/cli/ui/__tests__/utils/branchFormatter.test.ts +79 -334
- package/src/cli/ui/__tests__/utils/clipboard.test.ts +3 -3
- package/src/cli/ui/__tests__/utils/statisticsCalculator.test.ts +1 -1
- package/src/cli/ui/components/solid/Footer.tsx +36 -0
- package/src/cli/ui/components/{parts → solid}/Header.tsx +17 -28
- package/src/cli/ui/components/solid/HelpOverlay.tsx +194 -0
- package/src/cli/ui/components/solid/QuickStartStep.tsx +209 -0
- package/src/cli/ui/components/{parts → solid}/ScrollableList.tsx +7 -8
- package/src/cli/ui/components/solid/SearchInput.tsx +42 -0
- package/src/cli/ui/components/solid/SelectInput.tsx +88 -0
- package/src/cli/ui/components/solid/Stats.tsx +92 -0
- package/src/cli/ui/components/solid/TextInput.tsx +49 -0
- package/src/cli/ui/components/solid/WizardController.tsx +393 -0
- package/src/cli/ui/components/solid/WizardPopup.tsx +135 -0
- package/src/cli/ui/components/solid/WizardSteps.tsx +736 -0
- package/src/cli/ui/core/index.ts +17 -0
- package/src/cli/ui/core/keybindings.ts +367 -0
- package/src/cli/ui/core/theme.ts +266 -0
- package/src/cli/ui/core/types.ts +235 -0
- package/src/cli/ui/hooks/solid/useAsyncOperation.ts +78 -0
- package/src/cli/ui/hooks/solid/useFilter.ts +86 -0
- package/src/cli/ui/hooks/solid/useGitOperations.ts +81 -0
- package/src/cli/ui/hooks/solid/useKeyHandler.ts +103 -0
- package/src/cli/ui/hooks/solid/useScrollableList.ts +149 -0
- package/src/cli/ui/hooks/solid/useSelection.ts +77 -0
- package/src/cli/ui/hooks/solid/useTerminalSize.ts +22 -0
- package/src/cli/ui/index.solid.ts +28 -0
- package/src/cli/ui/screens/solid/BranchListScreen.tsx +1153 -0
- package/src/cli/ui/screens/solid/ConfirmScreen.tsx +86 -0
- package/src/cli/ui/screens/solid/EnvironmentScreen.tsx +161 -0
- package/src/cli/ui/screens/solid/ErrorScreen.tsx +42 -0
- package/src/cli/ui/screens/solid/InputScreen.tsx +55 -0
- package/src/cli/ui/screens/solid/LoadingIndicator.tsx +77 -0
- package/src/cli/ui/screens/solid/LogDetailScreen.tsx +75 -0
- package/src/cli/ui/screens/solid/LogScreen.tsx +504 -0
- package/src/cli/ui/screens/solid/ProfileEnvScreen.tsx +196 -0
- package/src/cli/ui/screens/solid/ProfileScreen.tsx +98 -0
- package/src/cli/ui/screens/solid/SelectorScreen.tsx +181 -0
- package/src/cli/ui/screens/solid/SettingsScreen.tsx +52 -0
- package/src/cli/ui/screens/solid/WorktreeCreateScreen.tsx +136 -0
- package/src/cli/ui/screens/solid/WorktreeDeleteScreen.tsx +40 -0
- package/src/cli/ui/stores/appStore.ts +208 -0
- package/src/cli/ui/stores/branchStore.ts +357 -0
- package/src/cli/ui/stores/index.ts +31 -0
- package/src/cli/ui/stores/uiStore.ts +226 -0
- package/src/cli/ui/types.ts +21 -3
- package/src/cli/ui/utils/__tests__/branchFormatter.test.ts +227 -0
- package/src/cli/ui/utils/branchFormatter.ts +43 -222
- package/src/cli/ui/utils/continueSession.ts +133 -2
- package/src/cli/ui/utils/modelOptions.test.ts +1 -1
- package/src/cli/ui/utils/versionCache.ts +93 -0
- package/src/cli/ui/utils/versionFetcher.ts +120 -0
- package/src/codex.ts +138 -39
- package/src/config/__tests__/saveSession.test.ts +143 -0
- package/src/config/builtin-coding-agents.ts +4 -4
- package/src/config/index.ts +14 -0
- package/src/gemini.ts +107 -46
- package/src/index.test.ts +25 -19
- package/src/index.ts +202 -143
- package/src/launcher.ts +66 -6
- package/src/logging/agentOutput.ts +216 -0
- package/src/logging/formatter.ts +23 -4
- package/src/logging/logger.ts +34 -10
- package/src/logging/reader.ts +117 -0
- package/src/opentui/index.solid.ts +1 -0
- package/src/repositories/worktree.repository.ts +8 -0
- package/src/services/__tests__/BatchMergeService.test.ts +83 -67
- package/src/services/__tests__/WorktreeOrchestrator.test.ts +8 -7
- package/src/services/codingAgentResolver.ts +30 -4
- package/src/services/dependency-installer.ts +2 -9
- package/src/types/api.ts +3 -0
- package/src/types/coding-agent.ts +85 -0
- package/src/types/tools.ts +19 -0
- package/src/utils/__tests__/npmRegistry.test.ts +250 -0
- package/src/utils/__tests__/prompt.test.ts +4 -5
- package/src/utils/coding-agent-colors.ts +165 -0
- package/src/utils/command.ts +1 -1
- package/src/utils/error-utils.ts +133 -0
- package/src/utils/npmRegistry.ts +249 -0
- package/src/utils/prompt.ts +1 -1
- package/src/utils/session/common.ts +28 -0
- package/src/utils/session/parsers/claude.ts +79 -29
- package/src/utils/session/parsers/codex.ts +50 -18
- package/src/utils/session/parsers/gemini.ts +46 -5
- package/src/utils/session/parsers/opencode.ts +46 -5
- package/src/utils/session/types.ts +4 -0
- package/src/utils/terminal.ts +24 -0
- package/src/utils.test.ts +1 -1
- package/src/utils.ts +37 -4
- package/src/web/client/src/components/CodingAgentLaunchModal.tsx +12 -21
- package/src/web/client/src/components/branch-detail/BranchInfoCards.tsx +16 -1
- package/src/web/client/src/components/branch-detail/SessionHistoryTable.tsx +7 -1
- package/src/web/client/src/components/branch-detail/ToolLauncher.tsx +11 -6
- package/src/web/client/src/lib/coding-agent-colors.ts +149 -0
- package/src/web/client/src/pages/BranchDetailPage.tsx +11 -11
- package/src/web/server/pty/manager.ts +139 -0
- package/src/web/server/routes/sessions.ts +6 -0
- package/src/web/server/services/branches.ts +11 -8
- package/src/web/server/services/worktrees.ts +2 -2
- package/src/worktree.ts +386 -114
- package/dist/cli/ui/components/App.d.ts +0 -25
- package/dist/cli/ui/components/App.d.ts.map +0 -1
- package/dist/cli/ui/components/App.js +0 -1006
- package/dist/cli/ui/components/App.js.map +0 -1
- package/dist/cli/ui/components/common/Confirm.d.ts +0 -13
- package/dist/cli/ui/components/common/Confirm.d.ts.map +0 -1
- package/dist/cli/ui/components/common/Confirm.js +0 -20
- package/dist/cli/ui/components/common/Confirm.js.map +0 -1
- package/dist/cli/ui/components/common/ErrorBoundary.d.ts +0 -23
- package/dist/cli/ui/components/common/ErrorBoundary.d.ts.map +0 -1
- package/dist/cli/ui/components/common/ErrorBoundary.js +0 -37
- package/dist/cli/ui/components/common/ErrorBoundary.js.map +0 -1
- package/dist/cli/ui/components/common/Input.d.ts +0 -19
- package/dist/cli/ui/components/common/Input.d.ts.map +0 -1
- package/dist/cli/ui/components/common/Input.js +0 -22
- package/dist/cli/ui/components/common/Input.js.map +0 -1
- package/dist/cli/ui/components/common/LoadingIndicator.d.ts +0 -19
- package/dist/cli/ui/components/common/LoadingIndicator.d.ts.map +0 -1
- package/dist/cli/ui/components/common/LoadingIndicator.js +0 -61
- package/dist/cli/ui/components/common/LoadingIndicator.js.map +0 -1
- package/dist/cli/ui/components/common/Select.d.ts +0 -38
- package/dist/cli/ui/components/common/Select.d.ts.map +0 -1
- package/dist/cli/ui/components/common/Select.js +0 -151
- package/dist/cli/ui/components/common/Select.js.map +0 -1
- package/dist/cli/ui/components/common/SpinnerIcon.d.ts +0 -20
- package/dist/cli/ui/components/common/SpinnerIcon.d.ts.map +0 -1
- package/dist/cli/ui/components/common/SpinnerIcon.js +0 -61
- package/dist/cli/ui/components/common/SpinnerIcon.js.map +0 -1
- package/dist/cli/ui/components/parts/Footer.d.ts +0 -15
- package/dist/cli/ui/components/parts/Footer.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/Footer.js +0 -20
- package/dist/cli/ui/components/parts/Footer.js.map +0 -1
- package/dist/cli/ui/components/parts/Header.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/Header.js +0 -24
- package/dist/cli/ui/components/parts/Header.js.map +0 -1
- package/dist/cli/ui/components/parts/MergeStatusList.d.ts +0 -13
- package/dist/cli/ui/components/parts/MergeStatusList.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/MergeStatusList.js +0 -52
- package/dist/cli/ui/components/parts/MergeStatusList.js.map +0 -1
- package/dist/cli/ui/components/parts/ProgressBar.d.ts +0 -13
- package/dist/cli/ui/components/parts/ProgressBar.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/ProgressBar.js +0 -53
- package/dist/cli/ui/components/parts/ProgressBar.js.map +0 -1
- package/dist/cli/ui/components/parts/ScrollableList.d.ts +0 -12
- package/dist/cli/ui/components/parts/ScrollableList.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/ScrollableList.js +0 -11
- package/dist/cli/ui/components/parts/ScrollableList.js.map +0 -1
- package/dist/cli/ui/components/parts/Stats.d.ts +0 -10
- package/dist/cli/ui/components/parts/Stats.d.ts.map +0 -1
- package/dist/cli/ui/components/parts/Stats.js +0 -55
- package/dist/cli/ui/components/parts/Stats.js.map +0 -1
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts +0 -17
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js +0 -42
- package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts +0 -17
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.js +0 -72
- package/dist/cli/ui/components/screens/BatchMergeResultScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts +0 -18
- package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BranchCreatorScreen.js +0 -151
- package/dist/cli/ui/components/screens/BranchCreatorScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts +0 -60
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BranchListScreen.js +0 -476
- package/dist/cli/ui/components/screens/BranchListScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts +0 -30
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.js +0 -148
- package/dist/cli/ui/components/screens/BranchQuickStartScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts +0 -27
- package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.js +0 -93
- package/dist/cli/ui/components/screens/CodingAgentSelectorScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.d.ts +0 -19
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.js +0 -577
- package/dist/cli/ui/components/screens/EnvironmentProfileScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts +0 -45
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js +0 -95
- package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/LogDatePickerScreen.d.ts +0 -10
- package/dist/cli/ui/components/screens/LogDatePickerScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/LogDatePickerScreen.js +0 -44
- package/dist/cli/ui/components/screens/LogDatePickerScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/LogDetailScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/LogDetailScreen.js +0 -34
- package/dist/cli/ui/components/screens/LogDetailScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/LogListScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/LogListScreen.js +0 -107
- package/dist/cli/ui/components/screens/LogListScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts +0 -24
- package/dist/cli/ui/components/screens/ModelSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/ModelSelectorScreen.js +0 -197
- package/dist/cli/ui/components/screens/ModelSelectorScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts +0 -29
- package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/PRCleanupScreen.js +0 -92
- package/dist/cli/ui/components/screens/PRCleanupScreen.js.map +0 -1
- package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts +0 -31
- package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/components/screens/SessionSelectorScreen.js +0 -67
- package/dist/cli/ui/components/screens/SessionSelectorScreen.js.map +0 -1
- package/dist/cli/ui/hooks/useAppInput.d.ts +0 -21
- package/dist/cli/ui/hooks/useAppInput.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useAppInput.js +0 -138
- package/dist/cli/ui/hooks/useAppInput.js.map +0 -1
- package/dist/cli/ui/hooks/useBatchMerge.d.ts +0 -17
- package/dist/cli/ui/hooks/useBatchMerge.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useBatchMerge.js +0 -77
- package/dist/cli/ui/hooks/useBatchMerge.js.map +0 -1
- package/dist/cli/ui/hooks/useGitData.d.ts +0 -21
- package/dist/cli/ui/hooks/useGitData.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useGitData.js +0 -229
- package/dist/cli/ui/hooks/useGitData.js.map +0 -1
- package/dist/cli/ui/hooks/useProfiles.d.ts +0 -41
- package/dist/cli/ui/hooks/useProfiles.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useProfiles.js +0 -136
- package/dist/cli/ui/hooks/useProfiles.js.map +0 -1
- package/dist/cli/ui/hooks/useScreenState.d.ts +0 -12
- package/dist/cli/ui/hooks/useScreenState.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useScreenState.js +0 -30
- package/dist/cli/ui/hooks/useScreenState.js.map +0 -1
- package/dist/cli/ui/hooks/useTerminalSize.d.ts +0 -9
- package/dist/cli/ui/hooks/useTerminalSize.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useTerminalSize.js +0 -24
- package/dist/cli/ui/hooks/useTerminalSize.js.map +0 -1
- package/dist/cli/ui/hooks/useToolStatus.d.ts +0 -30
- package/dist/cli/ui/hooks/useToolStatus.d.ts.map +0 -1
- package/dist/cli/ui/hooks/useToolStatus.js +0 -49
- package/dist/cli/ui/hooks/useToolStatus.js.map +0 -1
- package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts +0 -24
- package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts.map +0 -1
- package/dist/cli/ui/screens/BranchActionSelectorScreen.js +0 -65
- package/dist/cli/ui/screens/BranchActionSelectorScreen.js.map +0 -1
- package/dist/client/assets/index-LNPtOrn3.js +0 -78
- package/src/cli/ui/__tests__/SKIPPED_TESTS.md +0 -119
- package/src/cli/ui/__tests__/acceptance/branchList.acceptance.test.tsx.skip +0 -239
- package/src/cli/ui/__tests__/acceptance/navigation.acceptance.test.tsx +0 -225
- package/src/cli/ui/__tests__/acceptance/realtimeUpdate.acceptance.test.tsx.skip +0 -219
- package/src/cli/ui/__tests__/components/App.protected-branch.test.tsx +0 -212
- package/src/cli/ui/__tests__/components/App.shortcuts.test.tsx +0 -440
- package/src/cli/ui/__tests__/components/App.test.tsx +0 -365
- package/src/cli/ui/__tests__/components/ModelSelectorScreen.initial.test.tsx +0 -91
- package/src/cli/ui/__tests__/components/common/Confirm.test.tsx +0 -80
- package/src/cli/ui/__tests__/components/common/ErrorBoundary.test.tsx +0 -104
- package/src/cli/ui/__tests__/components/common/Input.test.tsx +0 -100
- package/src/cli/ui/__tests__/components/common/LoadingIndicator.test.tsx +0 -148
- package/src/cli/ui/__tests__/components/common/Select.memo.test.tsx +0 -255
- package/src/cli/ui/__tests__/components/common/Select.test.tsx +0 -335
- package/src/cli/ui/__tests__/components/parts/Footer.test.tsx +0 -65
- package/src/cli/ui/__tests__/components/parts/Header.test.tsx +0 -55
- package/src/cli/ui/__tests__/components/parts/ScrollableList.test.tsx +0 -69
- package/src/cli/ui/__tests__/components/parts/Stats.test.tsx +0 -148
- package/src/cli/ui/__tests__/components/screens/BranchCreatorScreen.test.tsx +0 -253
- package/src/cli/ui/__tests__/components/screens/BranchListScreen.test.tsx +0 -1070
- package/src/cli/ui/__tests__/components/screens/BranchQuickStartScreen.test.tsx +0 -142
- package/src/cli/ui/__tests__/components/screens/CodingAgentSelectorScreen.test.tsx +0 -174
- package/src/cli/ui/__tests__/components/screens/ExecutionModeSelectorScreen.test.tsx +0 -182
- package/src/cli/ui/__tests__/components/screens/LogDetailScreen.test.tsx +0 -57
- package/src/cli/ui/__tests__/components/screens/LogListScreen.test.tsx +0 -102
- package/src/cli/ui/__tests__/components/screens/PRCleanupScreen.test.tsx +0 -216
- package/src/cli/ui/__tests__/components/screens/SessionSelectorScreen.test.tsx +0 -147
- package/src/cli/ui/__tests__/hooks/useGitData.nonblocking.test.tsx +0 -206
- package/src/cli/ui/__tests__/hooks/useGitData.test.ts +0 -197
- package/src/cli/ui/__tests__/hooks/useGitData.test.ts.skip +0 -228
- package/src/cli/ui/__tests__/hooks/useScreenState.test.ts +0 -147
- package/src/cli/ui/__tests__/hooks/useTerminalSize.test.ts +0 -99
- package/src/cli/ui/__tests__/integration/branchList.test.tsx.skip +0 -253
- package/src/cli/ui/__tests__/integration/edgeCases.test.tsx +0 -436
- package/src/cli/ui/__tests__/integration/navigation.test.tsx +0 -514
- package/src/cli/ui/__tests__/integration/realtimeUpdate.test.tsx +0 -509
- package/src/cli/ui/__tests__/integration/realtimeUpdate.test.tsx.skip +0 -216
- package/src/cli/ui/__tests__/performance/branchList.performance.test.tsx +0 -193
- package/src/cli/ui/__tests__/performance/useMemoOptimization.test.tsx +0 -234
- package/src/cli/ui/components/App.tsx +0 -1478
- package/src/cli/ui/components/common/Confirm.tsx +0 -44
- package/src/cli/ui/components/common/ErrorBoundary.tsx +0 -60
- package/src/cli/ui/components/common/Input.tsx +0 -58
- package/src/cli/ui/components/common/LoadingIndicator.tsx +0 -98
- package/src/cli/ui/components/common/Select.tsx +0 -247
- package/src/cli/ui/components/common/SpinnerIcon.tsx +0 -86
- package/src/cli/ui/components/parts/Footer.tsx +0 -41
- package/src/cli/ui/components/parts/Header.test.tsx +0 -75
- package/src/cli/ui/components/parts/MergeStatusList.tsx +0 -75
- package/src/cli/ui/components/parts/ProgressBar.tsx +0 -73
- package/src/cli/ui/components/parts/Stats.tsx +0 -88
- package/src/cli/ui/components/screens/BatchMergeProgressScreen.tsx +0 -74
- package/src/cli/ui/components/screens/BatchMergeResultScreen.tsx +0 -108
- package/src/cli/ui/components/screens/BranchCreatorScreen.tsx +0 -242
- package/src/cli/ui/components/screens/BranchListScreen.tsx +0 -744
- package/src/cli/ui/components/screens/BranchQuickStartScreen.tsx +0 -244
- package/src/cli/ui/components/screens/CodingAgentSelectorScreen.tsx +0 -159
- package/src/cli/ui/components/screens/EnvironmentProfileScreen.tsx +0 -928
- package/src/cli/ui/components/screens/ExecutionModeSelectorScreen.tsx +0 -176
- package/src/cli/ui/components/screens/LogDatePickerScreen.tsx +0 -83
- package/src/cli/ui/components/screens/LogDetailScreen.tsx +0 -67
- package/src/cli/ui/components/screens/LogListScreen.tsx +0 -192
- package/src/cli/ui/components/screens/ModelSelectorScreen.tsx +0 -320
- package/src/cli/ui/components/screens/PRCleanupScreen.tsx +0 -171
- package/src/cli/ui/components/screens/SessionSelectorScreen.tsx +0 -135
- package/src/cli/ui/hooks/useAppInput.ts +0 -172
- package/src/cli/ui/hooks/useBatchMerge.ts +0 -96
- package/src/cli/ui/hooks/useGitData.ts +0 -347
- package/src/cli/ui/hooks/useProfiles.ts +0 -211
- package/src/cli/ui/hooks/useScreenState.ts +0 -44
- package/src/cli/ui/hooks/useTerminalSize.ts +0 -33
- package/src/cli/ui/hooks/useToolStatus.ts +0 -68
- package/src/cli/ui/screens/BranchActionSelectorScreen.tsx +0 -111
- package/src/cli/ui/screens/__tests__/BranchActionSelectorScreen.test.tsx +0 -264
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { describe, it, expect,
|
|
1
|
+
import { describe, it, expect, mock, beforeEach, afterEach } from "bun:test";
|
|
2
2
|
import { BatchMergeService } from "../BatchMergeService";
|
|
3
|
-
import type { BatchMergeConfig } from "../../ui/types";
|
|
3
|
+
import type { BatchMergeConfig, BatchMergeProgress } from "../../cli/ui/types";
|
|
4
4
|
|
|
5
5
|
// Mock git module
|
|
6
|
-
|
|
7
|
-
fetchAllRemotes:
|
|
8
|
-
getLocalBranches:
|
|
9
|
-
mergeFromBranch:
|
|
10
|
-
hasMergeConflict:
|
|
11
|
-
abortMerge:
|
|
12
|
-
getMergeStatus:
|
|
13
|
-
getRepositoryRoot:
|
|
14
|
-
resetToHead:
|
|
15
|
-
getCurrentBranchName:
|
|
16
|
-
pushBranchToRemote:
|
|
6
|
+
mock.module("../../git", () => ({
|
|
7
|
+
fetchAllRemotes: mock(),
|
|
8
|
+
getLocalBranches: mock(),
|
|
9
|
+
mergeFromBranch: mock(),
|
|
10
|
+
hasMergeConflict: mock(),
|
|
11
|
+
abortMerge: mock(),
|
|
12
|
+
getMergeStatus: mock(),
|
|
13
|
+
getRepositoryRoot: mock(),
|
|
14
|
+
resetToHead: mock(),
|
|
15
|
+
getCurrentBranchName: mock(),
|
|
16
|
+
pushBranchToRemote: mock(),
|
|
17
17
|
}));
|
|
18
18
|
|
|
19
19
|
// Mock worktree module
|
|
20
|
-
|
|
21
|
-
listAdditionalWorktrees:
|
|
22
|
-
generateWorktreePath:
|
|
23
|
-
createWorktree:
|
|
20
|
+
mock.module("../../worktree", () => ({
|
|
21
|
+
listAdditionalWorktrees: mock(),
|
|
22
|
+
generateWorktreePath: mock(),
|
|
23
|
+
createWorktree: mock(),
|
|
24
24
|
}));
|
|
25
25
|
|
|
26
26
|
import * as git from "../../git";
|
|
@@ -34,12 +34,12 @@ describe("BatchMergeService", () => {
|
|
|
34
34
|
let service: BatchMergeService;
|
|
35
35
|
|
|
36
36
|
beforeEach(() => {
|
|
37
|
-
|
|
37
|
+
mock.restore();
|
|
38
38
|
service = new BatchMergeService();
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
afterEach(() => {
|
|
42
|
-
|
|
42
|
+
mock.restore();
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
describe("Initialization (T201)", () => {
|
|
@@ -58,7 +58,7 @@ describe("BatchMergeService", () => {
|
|
|
58
58
|
|
|
59
59
|
describe("determineSourceBranch (T203)", () => {
|
|
60
60
|
it("should return 'main' when main branch exists", async () => {
|
|
61
|
-
(git.getLocalBranches as ReturnType<typeof
|
|
61
|
+
(git.getLocalBranches as ReturnType<typeof mock>).mockResolvedValue([
|
|
62
62
|
{
|
|
63
63
|
name: "main",
|
|
64
64
|
type: "local",
|
|
@@ -85,7 +85,7 @@ describe("BatchMergeService", () => {
|
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
it("should return 'develop' when main does not exist but develop exists", async () => {
|
|
88
|
-
(git.getLocalBranches as ReturnType<typeof
|
|
88
|
+
(git.getLocalBranches as ReturnType<typeof mock>).mockResolvedValue([
|
|
89
89
|
{
|
|
90
90
|
name: "develop",
|
|
91
91
|
type: "local",
|
|
@@ -106,7 +106,7 @@ describe("BatchMergeService", () => {
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
it("should return 'master' when main and develop do not exist", async () => {
|
|
109
|
-
(git.getLocalBranches as ReturnType<typeof
|
|
109
|
+
(git.getLocalBranches as ReturnType<typeof mock>).mockResolvedValue([
|
|
110
110
|
{
|
|
111
111
|
name: "master",
|
|
112
112
|
type: "local",
|
|
@@ -127,7 +127,7 @@ describe("BatchMergeService", () => {
|
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
it("should throw error when no source branch found", async () => {
|
|
130
|
-
(git.getLocalBranches as ReturnType<typeof
|
|
130
|
+
(git.getLocalBranches as ReturnType<typeof mock>).mockResolvedValue([
|
|
131
131
|
{
|
|
132
132
|
name: "feature/test",
|
|
133
133
|
type: "local",
|
|
@@ -144,7 +144,7 @@ describe("BatchMergeService", () => {
|
|
|
144
144
|
|
|
145
145
|
describe("getTargetBranches (T205)", () => {
|
|
146
146
|
it("should return all local branches excluding main, develop, master", async () => {
|
|
147
|
-
(git.getLocalBranches as ReturnType<typeof
|
|
147
|
+
(git.getLocalBranches as ReturnType<typeof mock>).mockResolvedValue([
|
|
148
148
|
{
|
|
149
149
|
name: "main",
|
|
150
150
|
type: "local",
|
|
@@ -185,7 +185,7 @@ describe("BatchMergeService", () => {
|
|
|
185
185
|
});
|
|
186
186
|
|
|
187
187
|
it("should return empty array when only main/develop/master exist", async () => {
|
|
188
|
-
(git.getLocalBranches as ReturnType<typeof
|
|
188
|
+
(git.getLocalBranches as ReturnType<typeof mock>).mockResolvedValue([
|
|
189
189
|
{
|
|
190
190
|
name: "main",
|
|
191
191
|
type: "local",
|
|
@@ -209,7 +209,7 @@ describe("BatchMergeService", () => {
|
|
|
209
209
|
describe("ensureWorktree (T207)", () => {
|
|
210
210
|
it("should return existing worktree path if worktree exists", async () => {
|
|
211
211
|
(
|
|
212
|
-
worktree.listAdditionalWorktrees as ReturnType<typeof
|
|
212
|
+
worktree.listAdditionalWorktrees as ReturnType<typeof mock>
|
|
213
213
|
).mockResolvedValue([
|
|
214
214
|
{
|
|
215
215
|
path: "/repo/.worktrees/feature-a",
|
|
@@ -227,15 +227,17 @@ describe("BatchMergeService", () => {
|
|
|
227
227
|
|
|
228
228
|
it("should create worktree if it does not exist", async () => {
|
|
229
229
|
(
|
|
230
|
-
worktree.listAdditionalWorktrees as ReturnType<typeof
|
|
230
|
+
worktree.listAdditionalWorktrees as ReturnType<typeof mock>
|
|
231
231
|
).mockResolvedValue([]);
|
|
232
|
-
(git.getRepositoryRoot as ReturnType<typeof
|
|
232
|
+
(git.getRepositoryRoot as ReturnType<typeof mock>).mockResolvedValue(
|
|
233
233
|
"/repo",
|
|
234
234
|
);
|
|
235
235
|
(
|
|
236
|
-
worktree.generateWorktreePath as ReturnType<typeof
|
|
236
|
+
worktree.generateWorktreePath as ReturnType<typeof mock>
|
|
237
237
|
).mockResolvedValue("/repo/.worktrees/feature-b");
|
|
238
|
-
(worktree.createWorktree as ReturnType<typeof
|
|
238
|
+
(worktree.createWorktree as ReturnType<typeof mock>).mockResolvedValue(
|
|
239
|
+
undefined,
|
|
240
|
+
);
|
|
239
241
|
|
|
240
242
|
const worktreePath = await service.ensureWorktree("feature/b");
|
|
241
243
|
|
|
@@ -260,7 +262,7 @@ describe("BatchMergeService", () => {
|
|
|
260
262
|
|
|
261
263
|
beforeEach(() => {
|
|
262
264
|
(
|
|
263
|
-
worktree.listAdditionalWorktrees as ReturnType<typeof
|
|
265
|
+
worktree.listAdditionalWorktrees as ReturnType<typeof mock>
|
|
264
266
|
).mockResolvedValue([
|
|
265
267
|
{
|
|
266
268
|
path: "/repo/.worktrees/feature-a",
|
|
@@ -271,8 +273,10 @@ describe("BatchMergeService", () => {
|
|
|
271
273
|
});
|
|
272
274
|
|
|
273
275
|
it("should successfully merge without conflicts", async () => {
|
|
274
|
-
(git.mergeFromBranch as ReturnType<typeof
|
|
275
|
-
|
|
276
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockResolvedValue(
|
|
277
|
+
undefined,
|
|
278
|
+
);
|
|
279
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(
|
|
276
280
|
false,
|
|
277
281
|
);
|
|
278
282
|
|
|
@@ -289,13 +293,11 @@ describe("BatchMergeService", () => {
|
|
|
289
293
|
});
|
|
290
294
|
|
|
291
295
|
it("should skip branch on merge conflict", async () => {
|
|
292
|
-
(git.mergeFromBranch as ReturnType<typeof
|
|
296
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockRejectedValue(
|
|
293
297
|
new Error("Merge conflict"),
|
|
294
298
|
);
|
|
295
|
-
(git.hasMergeConflict as ReturnType<typeof
|
|
296
|
-
|
|
297
|
-
);
|
|
298
|
-
(git.abortMerge as ReturnType<typeof vi.fn>).mockResolvedValue();
|
|
299
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(true);
|
|
300
|
+
(git.abortMerge as ReturnType<typeof mock>).mockResolvedValue(undefined);
|
|
299
301
|
|
|
300
302
|
const status = await service.mergeBranch("feature/a", "main", config);
|
|
301
303
|
|
|
@@ -305,10 +307,10 @@ describe("BatchMergeService", () => {
|
|
|
305
307
|
});
|
|
306
308
|
|
|
307
309
|
it("should handle other errors as failed", async () => {
|
|
308
|
-
(git.mergeFromBranch as ReturnType<typeof
|
|
310
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockRejectedValue(
|
|
309
311
|
new Error("Network error"),
|
|
310
312
|
);
|
|
311
|
-
(git.hasMergeConflict as ReturnType<typeof
|
|
313
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(
|
|
312
314
|
false,
|
|
313
315
|
);
|
|
314
316
|
|
|
@@ -330,7 +332,7 @@ describe("BatchMergeService", () => {
|
|
|
330
332
|
|
|
331
333
|
beforeEach(() => {
|
|
332
334
|
(
|
|
333
|
-
worktree.listAdditionalWorktrees as ReturnType<typeof
|
|
335
|
+
worktree.listAdditionalWorktrees as ReturnType<typeof mock>
|
|
334
336
|
).mockResolvedValue([
|
|
335
337
|
{
|
|
336
338
|
path: "/repo/.worktrees/feature-a",
|
|
@@ -341,11 +343,13 @@ describe("BatchMergeService", () => {
|
|
|
341
343
|
});
|
|
342
344
|
|
|
343
345
|
it("should rollback with resetToHead after successful dry-run merge", async () => {
|
|
344
|
-
(git.mergeFromBranch as ReturnType<typeof
|
|
345
|
-
|
|
346
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockResolvedValue(
|
|
347
|
+
undefined,
|
|
348
|
+
);
|
|
349
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(
|
|
346
350
|
false,
|
|
347
351
|
);
|
|
348
|
-
(git.resetToHead as ReturnType<typeof
|
|
352
|
+
(git.resetToHead as ReturnType<typeof mock>).mockResolvedValue(undefined);
|
|
349
353
|
|
|
350
354
|
const status = await service.mergeBranch(
|
|
351
355
|
"feature/a",
|
|
@@ -366,13 +370,11 @@ describe("BatchMergeService", () => {
|
|
|
366
370
|
});
|
|
367
371
|
|
|
368
372
|
it("should rollback with abortMerge after dry-run merge conflict", async () => {
|
|
369
|
-
(git.mergeFromBranch as ReturnType<typeof
|
|
373
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockRejectedValue(
|
|
370
374
|
new Error("CONFLICT (content)"),
|
|
371
375
|
);
|
|
372
|
-
(git.hasMergeConflict as ReturnType<typeof
|
|
373
|
-
|
|
374
|
-
);
|
|
375
|
-
(git.abortMerge as ReturnType<typeof vi.fn>).mockResolvedValue();
|
|
376
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(true);
|
|
377
|
+
(git.abortMerge as ReturnType<typeof mock>).mockResolvedValue(undefined);
|
|
376
378
|
|
|
377
379
|
const status = await service.mergeBranch(
|
|
378
380
|
"feature/a",
|
|
@@ -398,7 +400,7 @@ describe("BatchMergeService", () => {
|
|
|
398
400
|
|
|
399
401
|
beforeEach(() => {
|
|
400
402
|
(
|
|
401
|
-
worktree.listAdditionalWorktrees as ReturnType<typeof
|
|
403
|
+
worktree.listAdditionalWorktrees as ReturnType<typeof mock>
|
|
402
404
|
).mockResolvedValue([
|
|
403
405
|
{
|
|
404
406
|
path: "/repo/.worktrees/feature-a",
|
|
@@ -409,14 +411,18 @@ describe("BatchMergeService", () => {
|
|
|
409
411
|
});
|
|
410
412
|
|
|
411
413
|
it("should push successfully after merge when autoPush is enabled", async () => {
|
|
412
|
-
(git.mergeFromBranch as ReturnType<typeof
|
|
413
|
-
|
|
414
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockResolvedValue(
|
|
415
|
+
undefined,
|
|
416
|
+
);
|
|
417
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(
|
|
414
418
|
false,
|
|
415
419
|
);
|
|
416
|
-
(git.getCurrentBranchName as ReturnType<typeof
|
|
420
|
+
(git.getCurrentBranchName as ReturnType<typeof mock>).mockResolvedValue(
|
|
417
421
|
"feature/a",
|
|
418
422
|
);
|
|
419
|
-
(git.pushBranchToRemote as ReturnType<typeof
|
|
423
|
+
(git.pushBranchToRemote as ReturnType<typeof mock>).mockResolvedValue(
|
|
424
|
+
undefined,
|
|
425
|
+
);
|
|
420
426
|
|
|
421
427
|
const status = await service.mergeBranch(
|
|
422
428
|
"feature/a",
|
|
@@ -435,14 +441,16 @@ describe("BatchMergeService", () => {
|
|
|
435
441
|
});
|
|
436
442
|
|
|
437
443
|
it("should handle push failure without failing merge", async () => {
|
|
438
|
-
(git.mergeFromBranch as ReturnType<typeof
|
|
439
|
-
|
|
444
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockResolvedValue(
|
|
445
|
+
undefined,
|
|
446
|
+
);
|
|
447
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(
|
|
440
448
|
false,
|
|
441
449
|
);
|
|
442
|
-
(git.getCurrentBranchName as ReturnType<typeof
|
|
450
|
+
(git.getCurrentBranchName as ReturnType<typeof mock>).mockResolvedValue(
|
|
443
451
|
"feature/a",
|
|
444
452
|
);
|
|
445
|
-
(git.pushBranchToRemote as ReturnType<typeof
|
|
453
|
+
(git.pushBranchToRemote as ReturnType<typeof mock>).mockRejectedValue(
|
|
446
454
|
new Error("Push failed: permission denied"),
|
|
447
455
|
);
|
|
448
456
|
|
|
@@ -459,8 +467,10 @@ describe("BatchMergeService", () => {
|
|
|
459
467
|
|
|
460
468
|
it("should not push when autoPush is false", async () => {
|
|
461
469
|
const noPushConfig = { ...autoPushConfig, autoPush: false };
|
|
462
|
-
(git.mergeFromBranch as ReturnType<typeof
|
|
463
|
-
|
|
470
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockResolvedValue(
|
|
471
|
+
undefined,
|
|
472
|
+
);
|
|
473
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(
|
|
464
474
|
false,
|
|
465
475
|
);
|
|
466
476
|
|
|
@@ -486,19 +496,25 @@ describe("BatchMergeService", () => {
|
|
|
486
496
|
autoPush: false,
|
|
487
497
|
};
|
|
488
498
|
|
|
489
|
-
(git.fetchAllRemotes as ReturnType<typeof
|
|
490
|
-
|
|
499
|
+
(git.fetchAllRemotes as ReturnType<typeof mock>).mockResolvedValue(
|
|
500
|
+
undefined,
|
|
501
|
+
);
|
|
502
|
+
(git.getRepositoryRoot as ReturnType<typeof mock>).mockResolvedValue(
|
|
491
503
|
"/repo",
|
|
492
504
|
);
|
|
493
505
|
(
|
|
494
|
-
worktree.listAdditionalWorktrees as ReturnType<typeof
|
|
506
|
+
worktree.listAdditionalWorktrees as ReturnType<typeof mock>
|
|
495
507
|
).mockResolvedValue([]);
|
|
496
|
-
(worktree.generateWorktreePath as ReturnType<typeof
|
|
508
|
+
(worktree.generateWorktreePath as ReturnType<typeof mock>)
|
|
497
509
|
.mockResolvedValueOnce("/repo/.worktrees/feature-a")
|
|
498
510
|
.mockResolvedValueOnce("/repo/.worktrees/feature-b");
|
|
499
|
-
(worktree.createWorktree as ReturnType<typeof
|
|
500
|
-
|
|
501
|
-
|
|
511
|
+
(worktree.createWorktree as ReturnType<typeof mock>).mockResolvedValue(
|
|
512
|
+
undefined,
|
|
513
|
+
);
|
|
514
|
+
(git.mergeFromBranch as ReturnType<typeof mock>).mockResolvedValue(
|
|
515
|
+
undefined,
|
|
516
|
+
);
|
|
517
|
+
(git.hasMergeConflict as ReturnType<typeof mock>).mockResolvedValue(
|
|
502
518
|
false,
|
|
503
519
|
);
|
|
504
520
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { describe, it, expect, mock, beforeEach } from "bun:test";
|
|
2
3
|
import {
|
|
3
4
|
WorktreeOrchestrator,
|
|
4
5
|
type WorktreeService,
|
|
@@ -6,8 +7,8 @@ import {
|
|
|
6
7
|
import * as git from "../../git.js";
|
|
7
8
|
|
|
8
9
|
// Mock git.getCurrentBranch
|
|
9
|
-
|
|
10
|
-
getCurrentBranch:
|
|
10
|
+
mock.module("../../git.js", () => ({
|
|
11
|
+
getCurrentBranch: mock(),
|
|
11
12
|
}));
|
|
12
13
|
|
|
13
14
|
describe("WorktreeOrchestrator", () => {
|
|
@@ -18,11 +19,11 @@ describe("WorktreeOrchestrator", () => {
|
|
|
18
19
|
const mockWorktreePath = "/mock/repo/.git/worktree/feature-test";
|
|
19
20
|
|
|
20
21
|
beforeEach(() => {
|
|
21
|
-
// Create mock service without
|
|
22
|
+
// Create mock service without mock.module()
|
|
22
23
|
mockWorktreeService = {
|
|
23
|
-
worktreeExists:
|
|
24
|
-
generateWorktreePath:
|
|
25
|
-
createWorktree:
|
|
24
|
+
worktreeExists: mock(),
|
|
25
|
+
generateWorktreePath: mock(),
|
|
26
|
+
createWorktree: mock(),
|
|
26
27
|
};
|
|
27
28
|
orchestrator = new WorktreeOrchestrator(mockWorktreeService);
|
|
28
29
|
});
|
|
@@ -138,17 +138,30 @@ export interface ClaudeCommandOptions {
|
|
|
138
138
|
mode?: "normal" | "continue" | "resume";
|
|
139
139
|
skipPermissions?: boolean;
|
|
140
140
|
extraArgs?: string[];
|
|
141
|
+
sessionId?: string | null;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
export function buildClaudeArgs(options: ClaudeCommandOptions = {}): string[] {
|
|
144
145
|
const args: string[] = [];
|
|
146
|
+
const sessionId =
|
|
147
|
+
options.sessionId && options.sessionId.trim().length > 0
|
|
148
|
+
? options.sessionId.trim()
|
|
149
|
+
: null;
|
|
145
150
|
|
|
146
151
|
switch (options.mode) {
|
|
147
152
|
case "continue":
|
|
148
|
-
|
|
153
|
+
if (sessionId) {
|
|
154
|
+
args.push("--resume", sessionId);
|
|
155
|
+
} else {
|
|
156
|
+
args.push("-c");
|
|
157
|
+
}
|
|
149
158
|
break;
|
|
150
159
|
case "resume":
|
|
151
|
-
|
|
160
|
+
if (sessionId) {
|
|
161
|
+
args.push("--resume", sessionId);
|
|
162
|
+
} else {
|
|
163
|
+
args.push("-r");
|
|
164
|
+
}
|
|
152
165
|
break;
|
|
153
166
|
default:
|
|
154
167
|
break;
|
|
@@ -210,17 +223,30 @@ export interface CodexCommandOptions {
|
|
|
210
223
|
mode?: "normal" | "continue" | "resume";
|
|
211
224
|
bypassApprovals?: boolean;
|
|
212
225
|
extraArgs?: string[];
|
|
226
|
+
sessionId?: string | null;
|
|
213
227
|
}
|
|
214
228
|
|
|
215
229
|
export function buildCodexArgs(options: CodexCommandOptions = {}): string[] {
|
|
216
230
|
const args: string[] = [];
|
|
231
|
+
const sessionId =
|
|
232
|
+
options.sessionId && options.sessionId.trim().length > 0
|
|
233
|
+
? options.sessionId.trim()
|
|
234
|
+
: null;
|
|
217
235
|
|
|
218
236
|
switch (options.mode) {
|
|
219
237
|
case "continue":
|
|
220
|
-
|
|
238
|
+
if (sessionId) {
|
|
239
|
+
args.push("resume", sessionId);
|
|
240
|
+
} else {
|
|
241
|
+
args.push("resume", "--last");
|
|
242
|
+
}
|
|
221
243
|
break;
|
|
222
244
|
case "resume":
|
|
223
|
-
|
|
245
|
+
if (sessionId) {
|
|
246
|
+
args.push("resume", sessionId);
|
|
247
|
+
} else {
|
|
248
|
+
args.push("resume");
|
|
249
|
+
}
|
|
224
250
|
break;
|
|
225
251
|
default:
|
|
226
252
|
break;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import { access } from "node:fs/promises";
|
|
3
3
|
import { execa } from "execa";
|
|
4
|
-
import { startSpinner } from "../utils/spinner.js";
|
|
5
4
|
|
|
6
5
|
export type PackageManager = "bun" | "pnpm" | "npm";
|
|
7
6
|
|
|
@@ -73,7 +72,7 @@ const INSTALL_CANDIDATES: PackageManagerCandidate[] = [
|
|
|
73
72
|
|
|
74
73
|
async function fileExists(targetPath: string): Promise<boolean> {
|
|
75
74
|
try {
|
|
76
|
-
await
|
|
75
|
+
await access(targetPath);
|
|
77
76
|
return true;
|
|
78
77
|
} catch (error) {
|
|
79
78
|
const code = (error as NodeJS.ErrnoException)?.code;
|
|
@@ -144,10 +143,6 @@ export async function installDependenciesForWorktree(
|
|
|
144
143
|
|
|
145
144
|
const [binary, ...args] = detection.command;
|
|
146
145
|
|
|
147
|
-
const spinner = startSpinner(
|
|
148
|
-
`Installing dependencies via ${detection.manager} (${path.basename(detection.lockfile)})`,
|
|
149
|
-
);
|
|
150
|
-
|
|
151
146
|
try {
|
|
152
147
|
await execa(binary, args, {
|
|
153
148
|
cwd: worktreePath,
|
|
@@ -187,8 +182,6 @@ export async function installDependenciesForWorktree(
|
|
|
187
182
|
reason: "install-failed",
|
|
188
183
|
message: failureMessage,
|
|
189
184
|
};
|
|
190
|
-
} finally {
|
|
191
|
-
spinner();
|
|
192
185
|
}
|
|
193
186
|
|
|
194
187
|
return {
|
package/src/types/api.ts
CHANGED
|
@@ -112,6 +112,8 @@ export interface LastToolUsage {
|
|
|
112
112
|
mode?: "normal" | "continue" | "resume" | null;
|
|
113
113
|
model?: string | null;
|
|
114
114
|
timestamp: number; // epoch millis
|
|
115
|
+
sessionId?: string | null;
|
|
116
|
+
toolVersion?: string | null;
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
/**
|
|
@@ -177,6 +179,7 @@ export interface StartSessionRequest {
|
|
|
177
179
|
bypassApprovals?: boolean;
|
|
178
180
|
extraArgs?: string[];
|
|
179
181
|
customAgentId?: string | null;
|
|
182
|
+
resumeSessionId?: string | null;
|
|
180
183
|
}
|
|
181
184
|
|
|
182
185
|
export type UpdateConfigRequest = ConfigPayload;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coding Agent Types
|
|
3
|
+
*
|
|
4
|
+
* コーディングエージェント(Claude, Codex, Gemini)の共通型定義。
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* コーディングエージェントの基本情報
|
|
9
|
+
*/
|
|
10
|
+
export interface CodingAgentInfo {
|
|
11
|
+
/** ツールID */
|
|
12
|
+
id: string;
|
|
13
|
+
/** 表示名 */
|
|
14
|
+
name: string;
|
|
15
|
+
/** コマンド名 */
|
|
16
|
+
command: string;
|
|
17
|
+
/** npmパッケージ名(グローバルインストール用) */
|
|
18
|
+
packageName?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* コーディングエージェントの起動オプション(共通部分)
|
|
23
|
+
*/
|
|
24
|
+
export interface CodingAgentLaunchOptions {
|
|
25
|
+
/** 作業ディレクトリ */
|
|
26
|
+
cwd: string;
|
|
27
|
+
/** セッションID(継続時) */
|
|
28
|
+
sessionId?: string;
|
|
29
|
+
/** 継続モード */
|
|
30
|
+
continueSession?: boolean;
|
|
31
|
+
/** 再開モード */
|
|
32
|
+
resumeSession?: boolean;
|
|
33
|
+
/** モデルID */
|
|
34
|
+
model?: string;
|
|
35
|
+
/** 環境変数 */
|
|
36
|
+
env?: Record<string, string>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* コーディングエージェントの起動結果
|
|
41
|
+
*/
|
|
42
|
+
export interface CodingAgentLaunchResult {
|
|
43
|
+
/** セッションID */
|
|
44
|
+
sessionId?: string;
|
|
45
|
+
/** 終了コード */
|
|
46
|
+
exitCode: number;
|
|
47
|
+
/** 終了シグナル */
|
|
48
|
+
signal?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* コーディングエージェントのセッション検出結果
|
|
53
|
+
*/
|
|
54
|
+
export interface CodingAgentSessionInfo {
|
|
55
|
+
/** セッションID */
|
|
56
|
+
sessionId: string;
|
|
57
|
+
/** セッションパス */
|
|
58
|
+
path?: string;
|
|
59
|
+
/** 最終更新日時 */
|
|
60
|
+
lastModified?: Date;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* コーディングエージェント登録情報
|
|
65
|
+
*/
|
|
66
|
+
export const CODING_AGENTS: Record<string, CodingAgentInfo> = {
|
|
67
|
+
claude: {
|
|
68
|
+
id: "claude",
|
|
69
|
+
name: "Claude Code",
|
|
70
|
+
command: "claude",
|
|
71
|
+
packageName: "@anthropic-ai/claude-code",
|
|
72
|
+
},
|
|
73
|
+
codex: {
|
|
74
|
+
id: "codex",
|
|
75
|
+
name: "Codex CLI",
|
|
76
|
+
command: "codex",
|
|
77
|
+
packageName: "codex",
|
|
78
|
+
},
|
|
79
|
+
gemini: {
|
|
80
|
+
id: "gemini",
|
|
81
|
+
name: "Gemini CLI",
|
|
82
|
+
command: "gemini",
|
|
83
|
+
packageName: "@anthropic-ai/gemini-cli",
|
|
84
|
+
},
|
|
85
|
+
};
|
package/src/types/tools.ts
CHANGED
|
@@ -216,6 +216,15 @@ export interface CodingAgentConfig {
|
|
|
216
216
|
*
|
|
217
217
|
* launchCodingAgent() 関数の引数として使用。
|
|
218
218
|
*/
|
|
219
|
+
/**
|
|
220
|
+
* バージョン選択
|
|
221
|
+
*
|
|
222
|
+
* - "installed": bunxのデフォルト動作(キャッシュ優先)
|
|
223
|
+
* - "latest": 常に最新版をダウンロード
|
|
224
|
+
* - その他: 具体的なバージョン番号(例: "1.0.3", "2.1.0-beta.1")
|
|
225
|
+
*/
|
|
226
|
+
export type VersionSelection = "installed" | "latest" | string;
|
|
227
|
+
|
|
219
228
|
export interface CodingAgentLaunchOptions {
|
|
220
229
|
/**
|
|
221
230
|
* 実行モード
|
|
@@ -247,4 +256,14 @@ export interface CodingAgentLaunchOptions {
|
|
|
247
256
|
* 共有環境変数(共通env + ローカル取り込み)
|
|
248
257
|
*/
|
|
249
258
|
sharedEnv?: Record<string, string>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* バージョン選択
|
|
262
|
+
*
|
|
263
|
+
* bunxタイプのエージェントでのみ使用。
|
|
264
|
+
* - "installed": bunxのデフォルト動作(キャッシュ優先)
|
|
265
|
+
* - "latest": 常に最新版をダウンロード
|
|
266
|
+
* - その他: 具体的なバージョン番号
|
|
267
|
+
*/
|
|
268
|
+
version?: VersionSelection;
|
|
250
269
|
}
|