turboflux 1.0.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/LICENSE +21 -0
- package/README.md +177 -0
- package/bin/turboflux.mjs +28 -0
- package/dist/cli/brand.d.ts +7 -0
- package/dist/cli/brand.js +33 -0
- package/dist/cli/brand.js.map +1 -0
- package/dist/cli/commands/index.d.ts +4 -0
- package/dist/cli/commands/index.js +671 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/registry.d.ts +24 -0
- package/dist/cli/commands/registry.js +124 -0
- package/dist/cli/commands/registry.js.map +1 -0
- package/dist/cli/commands/types.d.ts +69 -0
- package/dist/cli/commands/types.js +2 -0
- package/dist/cli/commands/types.js.map +1 -0
- package/dist/cli/components/App.d.ts +15 -0
- package/dist/cli/components/App.js +1738 -0
- package/dist/cli/components/App.js.map +1 -0
- package/dist/cli/components/ConversationHistory.d.ts +15 -0
- package/dist/cli/components/ConversationHistory.js +92 -0
- package/dist/cli/components/ConversationHistory.js.map +1 -0
- package/dist/cli/components/TranscriptViewport.d.ts +25 -0
- package/dist/cli/components/TranscriptViewport.js +77 -0
- package/dist/cli/components/TranscriptViewport.js.map +1 -0
- package/dist/cli/components/agentActivityModel.d.ts +24 -0
- package/dist/cli/components/agentActivityModel.js +45 -0
- package/dist/cli/components/agentActivityModel.js.map +1 -0
- package/dist/cli/components/appHelpers.d.ts +34 -0
- package/dist/cli/components/appHelpers.js +209 -0
- package/dist/cli/components/appHelpers.js.map +1 -0
- package/dist/cli/components/design-system/StatusIcon.d.ts +5 -0
- package/dist/cli/components/design-system/StatusIcon.js +25 -0
- package/dist/cli/components/design-system/StatusIcon.js.map +1 -0
- package/dist/cli/components/developerFlowModel.d.ts +36 -0
- package/dist/cli/components/developerFlowModel.js +88 -0
- package/dist/cli/components/developerFlowModel.js.map +1 -0
- package/dist/cli/components/diff/DiffCard.d.ts +16 -0
- package/dist/cli/components/diff/DiffCard.js +30 -0
- package/dist/cli/components/diff/DiffCard.js.map +1 -0
- package/dist/cli/components/diff/DiffHunks.d.ts +11 -0
- package/dist/cli/components/diff/DiffHunks.js +58 -0
- package/dist/cli/components/diff/DiffHunks.js.map +1 -0
- package/dist/cli/components/header/Header.d.ts +13 -0
- package/dist/cli/components/header/Header.js +25 -0
- package/dist/cli/components/header/Header.js.map +1 -0
- package/dist/cli/components/header/Mascot.d.ts +4 -0
- package/dist/cli/components/header/Mascot.js +53 -0
- package/dist/cli/components/header/Mascot.js.map +1 -0
- package/dist/cli/components/header/StatusLine.d.ts +21 -0
- package/dist/cli/components/header/StatusLine.js +110 -0
- package/dist/cli/components/header/StatusLine.js.map +1 -0
- package/dist/cli/components/input/EffortPicker.d.ts +30 -0
- package/dist/cli/components/input/EffortPicker.js +126 -0
- package/dist/cli/components/input/EffortPicker.js.map +1 -0
- package/dist/cli/components/input/ModelPicker.d.ts +15 -0
- package/dist/cli/components/input/ModelPicker.js +95 -0
- package/dist/cli/components/input/ModelPicker.js.map +1 -0
- package/dist/cli/components/input/PromptInput.d.ts +79 -0
- package/dist/cli/components/input/PromptInput.js +496 -0
- package/dist/cli/components/input/PromptInput.js.map +1 -0
- package/dist/cli/components/input/RewindSelector.d.ts +8 -0
- package/dist/cli/components/input/RewindSelector.js +45 -0
- package/dist/cli/components/input/RewindSelector.js.map +1 -0
- package/dist/cli/components/input/pasteState.d.ts +6 -0
- package/dist/cli/components/input/pasteState.js +42 -0
- package/dist/cli/components/input/pasteState.js.map +1 -0
- package/dist/cli/components/input/terminalInputStateMachine.d.ts +29 -0
- package/dist/cli/components/input/terminalInputStateMachine.js +67 -0
- package/dist/cli/components/input/terminalInputStateMachine.js.map +1 -0
- package/dist/cli/components/layout/CockpitRails.d.ts +6 -0
- package/dist/cli/components/layout/CockpitRails.js +13 -0
- package/dist/cli/components/layout/CockpitRails.js.map +1 -0
- package/dist/cli/components/layout/LandingView.d.ts +15 -0
- package/dist/cli/components/layout/LandingView.js +12 -0
- package/dist/cli/components/layout/LandingView.js.map +1 -0
- package/dist/cli/components/layout/SessionSidebar.d.ts +18 -0
- package/dist/cli/components/layout/SessionSidebar.js +70 -0
- package/dist/cli/components/layout/SessionSidebar.js.map +1 -0
- package/dist/cli/components/layout/StartupAnimation.d.ts +14 -0
- package/dist/cli/components/layout/StartupAnimation.js +30 -0
- package/dist/cli/components/layout/StartupAnimation.js.map +1 -0
- package/dist/cli/components/markdown/highlighter.d.ts +1 -0
- package/dist/cli/components/markdown/highlighter.js +110 -0
- package/dist/cli/components/markdown/highlighter.js.map +1 -0
- package/dist/cli/components/markdown/index.d.ts +11 -0
- package/dist/cli/components/markdown/index.js +86 -0
- package/dist/cli/components/markdown/index.js.map +1 -0
- package/dist/cli/components/messages/MessageList.d.ts +16 -0
- package/dist/cli/components/messages/MessageList.js +56 -0
- package/dist/cli/components/messages/MessageList.js.map +1 -0
- package/dist/cli/components/messages/Messages.d.ts +26 -0
- package/dist/cli/components/messages/Messages.js +32 -0
- package/dist/cli/components/messages/Messages.js.map +1 -0
- package/dist/cli/components/messages/ThinkingBlock.d.ts +9 -0
- package/dist/cli/components/messages/ThinkingBlock.js +51 -0
- package/dist/cli/components/messages/ThinkingBlock.js.map +1 -0
- package/dist/cli/components/messages/WindowedMessageList.d.ts +21 -0
- package/dist/cli/components/messages/WindowedMessageList.js +44 -0
- package/dist/cli/components/messages/WindowedMessageList.js.map +1 -0
- package/dist/cli/components/permissions/PermissionDialog.d.ts +23 -0
- package/dist/cli/components/permissions/PermissionDialog.js +83 -0
- package/dist/cli/components/permissions/PermissionDialog.js.map +1 -0
- package/dist/cli/components/spinner/SpinnerGlyph.d.ts +6 -0
- package/dist/cli/components/spinner/SpinnerGlyph.js +55 -0
- package/dist/cli/components/spinner/SpinnerGlyph.js.map +1 -0
- package/dist/cli/components/spinner/constants.d.ts +4 -0
- package/dist/cli/components/spinner/constants.js +5 -0
- package/dist/cli/components/spinner/constants.js.map +1 -0
- package/dist/cli/components/tools/ActiveWorkPanel.d.ts +22 -0
- package/dist/cli/components/tools/ActiveWorkPanel.js +70 -0
- package/dist/cli/components/tools/ActiveWorkPanel.js.map +1 -0
- package/dist/cli/components/tools/AgentActivityLine.d.ts +13 -0
- package/dist/cli/components/tools/AgentActivityLine.js +88 -0
- package/dist/cli/components/tools/AgentActivityLine.js.map +1 -0
- package/dist/cli/components/tools/QueuedPromptList.d.ts +10 -0
- package/dist/cli/components/tools/QueuedPromptList.js +26 -0
- package/dist/cli/components/tools/QueuedPromptList.js.map +1 -0
- package/dist/cli/components/tools/TaskFlowHud.d.ts +15 -0
- package/dist/cli/components/tools/TaskFlowHud.js +55 -0
- package/dist/cli/components/tools/TaskFlowHud.js.map +1 -0
- package/dist/cli/components/tools/TerminalSessionsFooter.d.ts +6 -0
- package/dist/cli/components/tools/TerminalSessionsFooter.js +36 -0
- package/dist/cli/components/tools/TerminalSessionsFooter.js.map +1 -0
- package/dist/cli/components/tools/ToolActivityList.d.ts +11 -0
- package/dist/cli/components/tools/ToolActivityList.js +73 -0
- package/dist/cli/components/tools/ToolActivityList.js.map +1 -0
- package/dist/cli/components/tools/ToolCallTree.d.ts +11 -0
- package/dist/cli/components/tools/ToolCallTree.js +14 -0
- package/dist/cli/components/tools/ToolCallTree.js.map +1 -0
- package/dist/cli/components/tools/toolLifecycleModel.d.ts +16 -0
- package/dist/cli/components/tools/toolLifecycleModel.js +30 -0
- package/dist/cli/components/tools/toolLifecycleModel.js.map +1 -0
- package/dist/cli/components/tools/toolPresentation.d.ts +9 -0
- package/dist/cli/components/tools/toolPresentation.js +171 -0
- package/dist/cli/components/tools/toolPresentation.js.map +1 -0
- package/dist/cli/components/tools/toolTypes.d.ts +16 -0
- package/dist/cli/components/tools/toolTypes.js +2 -0
- package/dist/cli/components/tools/toolTypes.js.map +1 -0
- package/dist/cli/components/transcriptWindowing.d.ts +19 -0
- package/dist/cli/components/transcriptWindowing.js +81 -0
- package/dist/cli/components/transcriptWindowing.js.map +1 -0
- package/dist/cli/config.d.ts +1 -0
- package/dist/cli/config.js +2 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/conversations/journalWriter.d.ts +50 -0
- package/dist/cli/conversations/journalWriter.js +191 -0
- package/dist/cli/conversations/journalWriter.js.map +1 -0
- package/dist/cli/conversations/manager.d.ts +65 -0
- package/dist/cli/conversations/manager.js +435 -0
- package/dist/cli/conversations/manager.js.map +1 -0
- package/dist/cli/conversations/recoveryExport.d.ts +18 -0
- package/dist/cli/conversations/recoveryExport.js +39 -0
- package/dist/cli/conversations/recoveryExport.js.map +1 -0
- package/dist/cli/conversations/recoveryMessages.d.ts +2 -0
- package/dist/cli/conversations/recoveryMessages.js +3 -0
- package/dist/cli/conversations/recoveryMessages.js.map +1 -0
- package/dist/cli/conversations/store.d.ts +14 -0
- package/dist/cli/conversations/store.js +603 -0
- package/dist/cli/conversations/store.js.map +1 -0
- package/dist/cli/conversations/types.d.ts +142 -0
- package/dist/cli/conversations/types.js +2 -0
- package/dist/cli/conversations/types.js.map +1 -0
- package/dist/cli/globalConfiguration.d.ts +13 -0
- package/dist/cli/globalConfiguration.js +61 -0
- package/dist/cli/globalConfiguration.js.map +1 -0
- package/dist/cli/hooks/useMessageCursor.d.ts +16 -0
- package/dist/cli/hooks/useMessageCursor.js +75 -0
- package/dist/cli/hooks/useMessageCursor.js.map +1 -0
- package/dist/cli/hooks/useOverlayStack.d.ts +9 -0
- package/dist/cli/hooks/useOverlayStack.js +26 -0
- package/dist/cli/hooks/useOverlayStack.js.map +1 -0
- package/dist/cli/hooks/useTerminalSize.d.ts +16 -0
- package/dist/cli/hooks/useTerminalSize.js +37 -0
- package/dist/cli/hooks/useTerminalSize.js.map +1 -0
- package/dist/cli/i18n/index.d.ts +15 -0
- package/dist/cli/i18n/index.js +32 -0
- package/dist/cli/i18n/index.js.map +1 -0
- package/dist/cli/i18n/messages.d.ts +1305 -0
- package/dist/cli/i18n/messages.js +1305 -0
- package/dist/cli/i18n/messages.js.map +1 -0
- package/dist/cli/imageAttachments.d.ts +22 -0
- package/dist/cli/imageAttachments.js +329 -0
- package/dist/cli/imageAttachments.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +146 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/platform/terminalAttention.d.ts +46 -0
- package/dist/cli/platform/terminalAttention.js +152 -0
- package/dist/cli/platform/terminalAttention.js.map +1 -0
- package/dist/cli/platform/terminalTransparency.d.ts +11 -0
- package/dist/cli/platform/terminalTransparency.js +193 -0
- package/dist/cli/platform/terminalTransparency.js.map +1 -0
- package/dist/cli/repl.d.ts +15 -0
- package/dist/cli/repl.js +38 -0
- package/dist/cli/repl.js.map +1 -0
- package/dist/cli/setup.d.ts +17 -0
- package/dist/cli/setup.js +991 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/singleShot.d.ts +30 -0
- package/dist/cli/singleShot.js +167 -0
- package/dist/cli/singleShot.js.map +1 -0
- package/dist/cli/state/adaptiveStreamScheduler.d.ts +53 -0
- package/dist/cli/state/adaptiveStreamScheduler.js +136 -0
- package/dist/cli/state/adaptiveStreamScheduler.js.map +1 -0
- package/dist/cli/state/agentFlowController.d.ts +37 -0
- package/dist/cli/state/agentFlowController.js +402 -0
- package/dist/cli/state/agentFlowController.js.map +1 -0
- package/dist/cli/state/approvalPresentationScheduler.d.ts +28 -0
- package/dist/cli/state/approvalPresentationScheduler.js +72 -0
- package/dist/cli/state/approvalPresentationScheduler.js.map +1 -0
- package/dist/cli/state/flowFeatureFlags.d.ts +18 -0
- package/dist/cli/state/flowFeatureFlags.js +45 -0
- package/dist/cli/state/flowFeatureFlags.js.map +1 -0
- package/dist/cli/state/flowReducer.d.ts +120 -0
- package/dist/cli/state/flowReducer.js +535 -0
- package/dist/cli/state/flowReducer.js.map +1 -0
- package/dist/cli/state/flowSelectors.d.ts +45 -0
- package/dist/cli/state/flowSelectors.js +144 -0
- package/dist/cli/state/flowSelectors.js.map +1 -0
- package/dist/cli/state/flowStore.d.ts +19 -0
- package/dist/cli/state/flowStore.js +51 -0
- package/dist/cli/state/flowStore.js.map +1 -0
- package/dist/cli/state/globalCommandActivity.d.ts +25 -0
- package/dist/cli/state/globalCommandActivity.js +57 -0
- package/dist/cli/state/globalCommandActivity.js.map +1 -0
- package/dist/cli/state/goldenTraces.d.ts +2 -0
- package/dist/cli/state/goldenTraces.js +15 -0
- package/dist/cli/state/goldenTraces.js.map +1 -0
- package/dist/cli/state/notificationCoordinator.d.ts +38 -0
- package/dist/cli/state/notificationCoordinator.js +101 -0
- package/dist/cli/state/notificationCoordinator.js.map +1 -0
- package/dist/cli/stateProvider.d.ts +5 -0
- package/dist/cli/stateProvider.js +7 -0
- package/dist/cli/stateProvider.js.map +1 -0
- package/dist/cli/telemetry/localFlowTelemetry.d.ts +42 -0
- package/dist/cli/telemetry/localFlowTelemetry.js +131 -0
- package/dist/cli/telemetry/localFlowTelemetry.js.map +1 -0
- package/dist/cli/telemetry/terminalBaseline.d.ts +93 -0
- package/dist/cli/telemetry/terminalBaseline.js +199 -0
- package/dist/cli/telemetry/terminalBaseline.js.map +1 -0
- package/dist/cli/telemetry/terminalLatencyTracker.d.ts +24 -0
- package/dist/cli/telemetry/terminalLatencyTracker.js +59 -0
- package/dist/cli/telemetry/terminalLatencyTracker.js.map +1 -0
- package/dist/cli/terminalLayout.d.ts +2 -0
- package/dist/cli/terminalLayout.js +16 -0
- package/dist/cli/terminalLayout.js.map +1 -0
- package/dist/cli/terminalMouse.d.ts +10 -0
- package/dist/cli/terminalMouse.js +29 -0
- package/dist/cli/terminalMouse.js.map +1 -0
- package/dist/cli/theme/ThemeProvider.d.ts +9 -0
- package/dist/cli/theme/ThemeProvider.js +26 -0
- package/dist/cli/theme/ThemeProvider.js.map +1 -0
- package/dist/cli/theme/dark.d.ts +2 -0
- package/dist/cli/theme/dark.js +27 -0
- package/dist/cli/theme/dark.js.map +1 -0
- package/dist/cli/theme/index.d.ts +5 -0
- package/dist/cli/theme/index.js +5 -0
- package/dist/cli/theme/index.js.map +1 -0
- package/dist/cli/theme/light.d.ts +2 -0
- package/dist/cli/theme/light.js +26 -0
- package/dist/cli/theme/light.js.map +1 -0
- package/dist/cli/theme/palette.d.ts +7 -0
- package/dist/cli/theme/palette.js +8 -0
- package/dist/cli/theme/palette.js.map +1 -0
- package/dist/cli/theme/resolveColor.d.ts +4 -0
- package/dist/cli/theme/resolveColor.js +43 -0
- package/dist/cli/theme/resolveColor.js.map +1 -0
- package/dist/cli/theme/types.d.ts +27 -0
- package/dist/cli/theme/types.js +2 -0
- package/dist/cli/theme/types.js.map +1 -0
- package/dist/cli/toolExecutor.d.ts +1 -0
- package/dist/cli/toolExecutor.js +2 -0
- package/dist/cli/toolExecutor.js.map +1 -0
- package/dist/core/agentEngine.d.ts +425 -0
- package/dist/core/agentEngine.js +5170 -0
- package/dist/core/agentEngine.js.map +1 -0
- package/dist/core/agents/loader.d.ts +9 -0
- package/dist/core/agents/loader.js +144 -0
- package/dist/core/agents/loader.js.map +1 -0
- package/dist/core/applyPatch.d.ts +24 -0
- package/dist/core/applyPatch.js +158 -0
- package/dist/core/applyPatch.js.map +1 -0
- package/dist/core/cacheMonitor.d.ts +24 -0
- package/dist/core/cacheMonitor.js +211 -0
- package/dist/core/cacheMonitor.js.map +1 -0
- package/dist/core/clientIdentity.d.ts +6 -0
- package/dist/core/clientIdentity.js +44 -0
- package/dist/core/clientIdentity.js.map +1 -0
- package/dist/core/config.d.ts +99 -0
- package/dist/core/config.js +715 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/contextCompaction.d.ts +20 -0
- package/dist/core/contextCompaction.js +158 -0
- package/dist/core/contextCompaction.js.map +1 -0
- package/dist/core/contextManager.d.ts +44 -0
- package/dist/core/contextManager.js +590 -0
- package/dist/core/contextManager.js.map +1 -0
- package/dist/core/contextPolicy.d.ts +18 -0
- package/dist/core/contextPolicy.js +39 -0
- package/dist/core/contextPolicy.js.map +1 -0
- package/dist/core/credentialStore.d.ts +8 -0
- package/dist/core/credentialStore.js +37 -0
- package/dist/core/credentialStore.js.map +1 -0
- package/dist/core/diffCompute.d.ts +31 -0
- package/dist/core/diffCompute.js +116 -0
- package/dist/core/diffCompute.js.map +1 -0
- package/dist/core/editHelpers.d.ts +8 -0
- package/dist/core/editHelpers.js +35 -0
- package/dist/core/editHelpers.js.map +1 -0
- package/dist/core/fileIO.d.ts +12 -0
- package/dist/core/fileIO.js +199 -0
- package/dist/core/fileIO.js.map +1 -0
- package/dist/core/gitService.d.ts +83 -0
- package/dist/core/gitService.js +522 -0
- package/dist/core/gitService.js.map +1 -0
- package/dist/core/index.d.ts +30 -0
- package/dist/core/index.js +19 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/mcp/client.d.ts +32 -0
- package/dist/core/mcp/client.js +186 -0
- package/dist/core/mcp/client.js.map +1 -0
- package/dist/core/mcp/settings.d.ts +2 -0
- package/dist/core/mcp/settings.js +26 -0
- package/dist/core/mcp/settings.js.map +1 -0
- package/dist/core/mcp/toolBridge.d.ts +20 -0
- package/dist/core/mcp/toolBridge.js +74 -0
- package/dist/core/mcp/toolBridge.js.map +1 -0
- package/dist/core/mcp/types.d.ts +29 -0
- package/dist/core/mcp/types.js +2 -0
- package/dist/core/mcp/types.js.map +1 -0
- package/dist/core/modelDiscovery.d.ts +14 -0
- package/dist/core/modelDiscovery.js +566 -0
- package/dist/core/modelDiscovery.js.map +1 -0
- package/dist/core/modelProtocol.d.ts +43 -0
- package/dist/core/modelProtocol.js +238 -0
- package/dist/core/modelProtocol.js.map +1 -0
- package/dist/core/modelRegistry.d.ts +56 -0
- package/dist/core/modelRegistry.js +308 -0
- package/dist/core/modelRegistry.js.map +1 -0
- package/dist/core/networkProxy.d.ts +20 -0
- package/dist/core/networkProxy.js +145 -0
- package/dist/core/networkProxy.js.map +1 -0
- package/dist/core/normalizeBaseUrl.d.ts +1 -0
- package/dist/core/normalizeBaseUrl.js +9 -0
- package/dist/core/normalizeBaseUrl.js.map +1 -0
- package/dist/core/pathUtils.d.ts +3 -0
- package/dist/core/pathUtils.js +46 -0
- package/dist/core/pathUtils.js.map +1 -0
- package/dist/core/permissions.d.ts +29 -0
- package/dist/core/permissions.js +245 -0
- package/dist/core/permissions.js.map +1 -0
- package/dist/core/persona/voiceProfile.d.ts +7 -0
- package/dist/core/persona/voiceProfile.js +14 -0
- package/dist/core/persona/voiceProfile.js.map +1 -0
- package/dist/core/profile.d.ts +35 -0
- package/dist/core/profile.js +373 -0
- package/dist/core/profile.js.map +1 -0
- package/dist/core/requestCompatibility.d.ts +13 -0
- package/dist/core/requestCompatibility.js +181 -0
- package/dist/core/requestCompatibility.js.map +1 -0
- package/dist/core/runtime/agentRuntime.d.ts +43 -0
- package/dist/core/runtime/agentRuntime.js +137 -0
- package/dist/core/runtime/agentRuntime.js.map +1 -0
- package/dist/core/runtime/approvalCoordinator.d.ts +36 -0
- package/dist/core/runtime/approvalCoordinator.js +113 -0
- package/dist/core/runtime/approvalCoordinator.js.map +1 -0
- package/dist/core/runtime/capabilityBoundary.d.ts +18 -0
- package/dist/core/runtime/capabilityBoundary.js +89 -0
- package/dist/core/runtime/capabilityBoundary.js.map +1 -0
- package/dist/core/runtime/nodeToolExecutor.d.ts +200 -0
- package/dist/core/runtime/nodeToolExecutor.js +2446 -0
- package/dist/core/runtime/nodeToolExecutor.js.map +1 -0
- package/dist/core/runtime/runtimeLogWriter.d.ts +32 -0
- package/dist/core/runtime/runtimeLogWriter.js +129 -0
- package/dist/core/runtime/runtimeLogWriter.js.map +1 -0
- package/dist/core/runtime/runtimeTaskManager.d.ts +78 -0
- package/dist/core/runtime/runtimeTaskManager.js +374 -0
- package/dist/core/runtime/runtimeTaskManager.js.map +1 -0
- package/dist/core/runtime/sessionRegistry.d.ts +19 -0
- package/dist/core/runtime/sessionRegistry.js +41 -0
- package/dist/core/runtime/sessionRegistry.js.map +1 -0
- package/dist/core/runtime/stateProvider.d.ts +69 -0
- package/dist/core/runtime/stateProvider.js +131 -0
- package/dist/core/runtime/stateProvider.js.map +1 -0
- package/dist/core/runtime/subAgentTaskManager.d.ts +111 -0
- package/dist/core/runtime/subAgentTaskManager.js +386 -0
- package/dist/core/runtime/subAgentTaskManager.js.map +1 -0
- package/dist/core/schemaValidation.d.ts +5 -0
- package/dist/core/schemaValidation.js +153 -0
- package/dist/core/schemaValidation.js.map +1 -0
- package/dist/core/skills/loader.d.ts +7 -0
- package/dist/core/skills/loader.js +91 -0
- package/dist/core/skills/loader.js.map +1 -0
- package/dist/core/skills/runtime.d.ts +19 -0
- package/dist/core/skills/runtime.js +61 -0
- package/dist/core/skills/runtime.js.map +1 -0
- package/dist/core/subAgent.d.ts +50 -0
- package/dist/core/subAgent.js +1258 -0
- package/dist/core/subAgent.js.map +1 -0
- package/dist/core/systemPrompt.d.ts +27 -0
- package/dist/core/systemPrompt.js +219 -0
- package/dist/core/systemPrompt.js.map +1 -0
- package/dist/core/taskManager.d.ts +105 -0
- package/dist/core/taskManager.js +617 -0
- package/dist/core/taskManager.js.map +1 -0
- package/dist/core/tokenCompressor.d.ts +14 -0
- package/dist/core/tokenCompressor.js +161 -0
- package/dist/core/tokenCompressor.js.map +1 -0
- package/dist/core/tokenCounter.d.ts +28 -0
- package/dist/core/tokenCounter.js +101 -0
- package/dist/core/tokenCounter.js.map +1 -0
- package/dist/core/toolDispatcher.d.ts +11 -0
- package/dist/core/toolDispatcher.js +38 -0
- package/dist/core/toolDispatcher.js.map +1 -0
- package/dist/core/toolExecutionLedger.d.ts +9 -0
- package/dist/core/toolExecutionLedger.js +84 -0
- package/dist/core/toolExecutionLedger.js.map +1 -0
- package/dist/core/toolRegistry.d.ts +19 -0
- package/dist/core/toolRegistry.js +820 -0
- package/dist/core/toolRegistry.js.map +1 -0
- package/dist/core/turnStrategy.d.ts +20 -0
- package/dist/core/turnStrategy.js +103 -0
- package/dist/core/turnStrategy.js.map +1 -0
- package/dist/platform/process.d.ts +14 -0
- package/dist/platform/process.js +28 -0
- package/dist/platform/process.js.map +1 -0
- package/dist/platform/runtime.d.ts +8 -0
- package/dist/platform/runtime.js +21 -0
- package/dist/platform/runtime.js.map +1 -0
- package/dist/server/adminPage.d.ts +1 -0
- package/dist/server/adminPage.js +755 -0
- package/dist/server/adminPage.js.map +1 -0
- package/dist/server/index.d.ts +22 -0
- package/dist/server/index.js +566 -0
- package/dist/server/index.js.map +1 -0
- package/dist/shared/agentTypes.d.ts +227 -0
- package/dist/shared/agentTypes.js +79 -0
- package/dist/shared/agentTypes.js.map +1 -0
- package/dist/shared/codeIndexTypes.d.ts +32 -0
- package/dist/shared/codeIndexTypes.js +2 -0
- package/dist/shared/codeIndexTypes.js.map +1 -0
- package/dist/shared/flowEvents.d.ts +192 -0
- package/dist/shared/flowEvents.js +37 -0
- package/dist/shared/flowEvents.js.map +1 -0
- package/dist/shared/memoryTypes.d.ts +100 -0
- package/dist/shared/memoryTypes.js +2 -0
- package/dist/shared/memoryTypes.js.map +1 -0
- package/dist/shared/pluginTypes.d.ts +345 -0
- package/dist/shared/pluginTypes.js +2 -0
- package/dist/shared/pluginTypes.js.map +1 -0
- package/dist/shared/runtimeTaskTypes.d.ts +43 -0
- package/dist/shared/runtimeTaskTypes.js +2 -0
- package/dist/shared/runtimeTaskTypes.js.map +1 -0
- package/dist/shared/skillTypes.d.ts +1 -0
- package/dist/shared/skillTypes.js +2 -0
- package/dist/shared/skillTypes.js.map +1 -0
- package/dist/shared/subAgentTypes.d.ts +99 -0
- package/dist/shared/subAgentTypes.js +2 -0
- package/dist/shared/subAgentTypes.js.map +1 -0
- package/dist/shared/terminalTypes.d.ts +102 -0
- package/dist/shared/terminalTypes.js +2 -0
- package/dist/shared/terminalTypes.js.map +1 -0
- package/dist/shared/toolCallMarkup.d.ts +10 -0
- package/dist/shared/toolCallMarkup.js +107 -0
- package/dist/shared/toolCallMarkup.js.map +1 -0
- package/dist/shared/toolTypes.d.ts +24 -0
- package/dist/shared/toolTypes.js +2 -0
- package/dist/shared/toolTypes.js.map +1 -0
- package/dist/shared/types.d.ts +81 -0
- package/dist/shared/types.js +2 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/state/types.d.ts +69 -0
- package/dist/state/types.js +2 -0
- package/dist/state/types.js.map +1 -0
- package/dist/tools/executor.d.ts +133 -0
- package/dist/tools/executor.js +2 -0
- package/dist/tools/executor.js.map +1 -0
- package/dist/tools/memory/loaders.d.ts +6 -0
- package/dist/tools/memory/loaders.js +292 -0
- package/dist/tools/memory/loaders.js.map +1 -0
- package/dist/tools/memory/sanitizer.d.ts +6 -0
- package/dist/tools/memory/sanitizer.js +48 -0
- package/dist/tools/memory/sanitizer.js.map +1 -0
- package/dist/tools/memory/service.d.ts +24 -0
- package/dist/tools/memory/service.js +273 -0
- package/dist/tools/memory/service.js.map +1 -0
- package/dist/tools/memory/writer.d.ts +17 -0
- package/dist/tools/memory/writer.js +192 -0
- package/dist/tools/memory/writer.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
export type AgentMode = 'vibe' | 'plan';
|
|
2
|
+
export type ApprovalPolicy = 'ask' | 'agent' | 'full';
|
|
3
|
+
export type CapabilityProfile = 'read-only' | 'workspace-write' | 'danger-full-access';
|
|
4
|
+
export type LegacyApprovalPolicy = 'request' | 'auto';
|
|
5
|
+
export declare const REASONING_EFFORTS: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
6
|
+
export type ReasoningEffort = typeof REASONING_EFFORTS[number];
|
|
7
|
+
export interface NativeReasoningConfig {
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
effort?: ReasoningEffort;
|
|
10
|
+
budgetTokens?: number;
|
|
11
|
+
}
|
|
12
|
+
export type ContextPolicyMode = 'normal' | 'qualityFirst';
|
|
13
|
+
export type TaskPriority = 'major' | 'medium' | 'minor';
|
|
14
|
+
export type TaskStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
|
|
15
|
+
export type AgentRunPhase = 'idle' | 'thinking' | 'tool_running' | 'awaiting_approval' | 'awaiting_input' | 'paused' | 'aborting' | 'recoverable_error' | 'completed';
|
|
16
|
+
export interface AgentRunState {
|
|
17
|
+
phase: AgentRunPhase;
|
|
18
|
+
startedAt?: number;
|
|
19
|
+
updatedAt: number;
|
|
20
|
+
detail?: string;
|
|
21
|
+
activeTool?: string;
|
|
22
|
+
recoverable?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type ToolCategory = 'read' | 'write' | 'execute' | 'communicate' | 'manage';
|
|
25
|
+
export interface AgentTool {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
category: ToolCategory;
|
|
29
|
+
parameters: ToolParameter[];
|
|
30
|
+
isReadOnly: boolean;
|
|
31
|
+
isDestructive: boolean;
|
|
32
|
+
isConcurrencySafe: boolean;
|
|
33
|
+
requiredMode?: AgentMode[];
|
|
34
|
+
inputSchema?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
export interface ToolParameter {
|
|
37
|
+
name: string;
|
|
38
|
+
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
39
|
+
description: string;
|
|
40
|
+
required: boolean;
|
|
41
|
+
enum?: string[];
|
|
42
|
+
default?: unknown;
|
|
43
|
+
schema?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
export interface TaskNode {
|
|
46
|
+
id: string;
|
|
47
|
+
title: string;
|
|
48
|
+
description: string;
|
|
49
|
+
priority: TaskPriority;
|
|
50
|
+
status: TaskStatus;
|
|
51
|
+
parentId: string | null;
|
|
52
|
+
children: string[];
|
|
53
|
+
dependencies: string[];
|
|
54
|
+
order: number;
|
|
55
|
+
toolUseId?: string;
|
|
56
|
+
progress: number;
|
|
57
|
+
createdAt: number;
|
|
58
|
+
updatedAt: number;
|
|
59
|
+
startedAt?: number;
|
|
60
|
+
completedAt?: number;
|
|
61
|
+
error?: string;
|
|
62
|
+
metadata?: {
|
|
63
|
+
estimatedDuration?: string;
|
|
64
|
+
relatedFiles?: string[];
|
|
65
|
+
testResults?: string;
|
|
66
|
+
errorLog?: string;
|
|
67
|
+
relatedIssue?: string;
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface AgentTurn {
|
|
72
|
+
id: string;
|
|
73
|
+
role: 'user' | 'assistant' | 'system' | 'tool_result';
|
|
74
|
+
content: string;
|
|
75
|
+
timestamp: number;
|
|
76
|
+
toolCalls?: ToolCall[];
|
|
77
|
+
toolResults?: ToolResult[];
|
|
78
|
+
metadata?: {
|
|
79
|
+
model?: string;
|
|
80
|
+
tokens?: TokenUsage;
|
|
81
|
+
duration?: number;
|
|
82
|
+
mode?: AgentMode;
|
|
83
|
+
reasoningEnabled?: boolean;
|
|
84
|
+
reasoningEffort?: ReasoningEffort;
|
|
85
|
+
thinking?: ThinkingTrace;
|
|
86
|
+
rawReasoningPayload?: RawReasoningPayload;
|
|
87
|
+
interrupted?: boolean;
|
|
88
|
+
internal?: boolean;
|
|
89
|
+
internalKind?: string;
|
|
90
|
+
attachments?: AgentAttachment[];
|
|
91
|
+
runtimeContext?: string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export interface AgentAttachment {
|
|
95
|
+
id: string;
|
|
96
|
+
type: 'image';
|
|
97
|
+
path: string;
|
|
98
|
+
mime: string;
|
|
99
|
+
filename: string;
|
|
100
|
+
size: number;
|
|
101
|
+
}
|
|
102
|
+
export interface TokenUsage {
|
|
103
|
+
input?: number;
|
|
104
|
+
output?: number;
|
|
105
|
+
cached?: number;
|
|
106
|
+
total?: number;
|
|
107
|
+
source?: 'provider' | 'unknown';
|
|
108
|
+
}
|
|
109
|
+
export interface OpenAIReasoningBlock {
|
|
110
|
+
type: 'reasoning';
|
|
111
|
+
reasoning: string;
|
|
112
|
+
}
|
|
113
|
+
export interface RawReasoningPayload {
|
|
114
|
+
provider: 'anthropic' | 'openai-compatible';
|
|
115
|
+
blocks: AnthropicThinkingBlock[];
|
|
116
|
+
reasoningContent?: string;
|
|
117
|
+
}
|
|
118
|
+
export interface AnthropicThinkingBlock {
|
|
119
|
+
type: 'thinking' | 'redacted_thinking';
|
|
120
|
+
thinking?: string;
|
|
121
|
+
signature?: string;
|
|
122
|
+
data?: string;
|
|
123
|
+
}
|
|
124
|
+
export type ThinkingStage = 'problem_framing' | 'evidence_gathering' | 'hypothesis_testing' | 'verification' | 'conclusion';
|
|
125
|
+
export type ThinkingEvidenceLevel = 'none' | 'broad' | 'strong' | 'multi_source';
|
|
126
|
+
export type ThinkingVerificationStatus = 'unverified' | 'partial' | 'verified' | 'contested';
|
|
127
|
+
export interface ThinkingTrace {
|
|
128
|
+
content: string;
|
|
129
|
+
isStreaming?: boolean;
|
|
130
|
+
status?: 'streaming' | 'complete' | 'interrupted' | 'redacted';
|
|
131
|
+
source?: 'provider' | 'fallback';
|
|
132
|
+
tokenCount?: number;
|
|
133
|
+
startedAt?: number;
|
|
134
|
+
effort?: ReasoningEffort;
|
|
135
|
+
stage?: ThinkingStage;
|
|
136
|
+
evidenceLevel?: ThinkingEvidenceLevel;
|
|
137
|
+
verificationStatus?: ThinkingVerificationStatus;
|
|
138
|
+
hadAlternatives?: boolean;
|
|
139
|
+
hasToolBackedVerification?: boolean;
|
|
140
|
+
durationMs?: number;
|
|
141
|
+
}
|
|
142
|
+
export interface ToolCall {
|
|
143
|
+
id: string;
|
|
144
|
+
name: string;
|
|
145
|
+
arguments: Record<string, unknown>;
|
|
146
|
+
}
|
|
147
|
+
export interface ChangeSummary {
|
|
148
|
+
path: string;
|
|
149
|
+
operation: 'write' | 'edit' | 'delete';
|
|
150
|
+
addedLines?: number;
|
|
151
|
+
removedLines?: number;
|
|
152
|
+
totalLines?: number;
|
|
153
|
+
preview?: string;
|
|
154
|
+
oldPreview?: string;
|
|
155
|
+
before?: string;
|
|
156
|
+
after?: string;
|
|
157
|
+
diffStatus?: 'complete' | 'snapshot-too-large' | 'postimage-unavailable';
|
|
158
|
+
beforeBytes?: number;
|
|
159
|
+
afterBytes?: number;
|
|
160
|
+
}
|
|
161
|
+
export interface ToolResult {
|
|
162
|
+
toolCallId: string;
|
|
163
|
+
name: string;
|
|
164
|
+
output: string;
|
|
165
|
+
isError: boolean;
|
|
166
|
+
errorKind?: 'validation' | 'permission' | 'environment' | 'execution' | 'timeout' | 'abort';
|
|
167
|
+
changeSummary?: ChangeSummary;
|
|
168
|
+
}
|
|
169
|
+
export interface AgentSession {
|
|
170
|
+
id: string;
|
|
171
|
+
mode: AgentMode;
|
|
172
|
+
turns: AgentTurn[];
|
|
173
|
+
currentTaskId: string | null;
|
|
174
|
+
createdAt: number;
|
|
175
|
+
updatedAt: number;
|
|
176
|
+
workspacePath?: string;
|
|
177
|
+
workspaceName?: string;
|
|
178
|
+
totalTokens: {
|
|
179
|
+
input: number;
|
|
180
|
+
output: number;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
export interface AgentConfig {
|
|
184
|
+
mode: AgentMode;
|
|
185
|
+
approvalPolicy?: ApprovalPolicy;
|
|
186
|
+
capabilityProfile?: CapabilityProfile;
|
|
187
|
+
temperature: number;
|
|
188
|
+
maxTokens: number;
|
|
189
|
+
maxTurns?: number;
|
|
190
|
+
contextWindow?: number;
|
|
191
|
+
contextPolicy?: ContextPolicyMode;
|
|
192
|
+
conversationId?: string;
|
|
193
|
+
workspacePath?: string;
|
|
194
|
+
workspaceName?: string;
|
|
195
|
+
systemPromptOverride?: string;
|
|
196
|
+
appendSystemPrompt?: string;
|
|
197
|
+
profileSystemPrompt?: string;
|
|
198
|
+
disabledTools?: string[];
|
|
199
|
+
enabledSkills?: Array<{
|
|
200
|
+
id: string;
|
|
201
|
+
name: string;
|
|
202
|
+
command: string;
|
|
203
|
+
description: string;
|
|
204
|
+
capabilities?: {
|
|
205
|
+
can?: string[];
|
|
206
|
+
cannot?: string[];
|
|
207
|
+
};
|
|
208
|
+
principles?: string[];
|
|
209
|
+
systemPrompt?: string;
|
|
210
|
+
}>;
|
|
211
|
+
shell?: string;
|
|
212
|
+
gitEnabled?: boolean;
|
|
213
|
+
}
|
|
214
|
+
export declare const TASK_ID_PREFIXES: Record<TaskPriority, string>;
|
|
215
|
+
export declare const MODE_LABELS: Record<AgentMode, string>;
|
|
216
|
+
export declare const MODE_DESCRIPTIONS: Record<AgentMode, string>;
|
|
217
|
+
export declare const APPROVAL_POLICY_LABELS: Record<ApprovalPolicy, string>;
|
|
218
|
+
export declare const APPROVAL_POLICY_DESCRIPTIONS: Record<ApprovalPolicy, string>;
|
|
219
|
+
export declare const CAPABILITY_PROFILE_LABELS: Record<CapabilityProfile, string>;
|
|
220
|
+
export declare const CAPABILITY_PROFILE_DESCRIPTIONS: Record<CapabilityProfile, string>;
|
|
221
|
+
export declare function normalizeApprovalPolicy(value: unknown, fallback?: ApprovalPolicy): ApprovalPolicy;
|
|
222
|
+
export declare function normalizeCapabilityProfile(value: unknown, fallback?: CapabilityProfile): CapabilityProfile;
|
|
223
|
+
export declare function resolveCapabilityProfileForApproval(approvalPolicy: ApprovalPolicy, capabilityProfile: unknown, fallback?: CapabilityProfile): CapabilityProfile;
|
|
224
|
+
export declare function isTerminalStatus(status: TaskStatus): boolean;
|
|
225
|
+
export declare function generateTaskId(priority: TaskPriority): string;
|
|
226
|
+
export declare function generateTurnId(): string;
|
|
227
|
+
export declare function generateSessionId(): string;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const REASONING_EFFORTS = ['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'];
|
|
2
|
+
export const TASK_ID_PREFIXES = {
|
|
3
|
+
major: 'M',
|
|
4
|
+
medium: 'D',
|
|
5
|
+
minor: 'T',
|
|
6
|
+
};
|
|
7
|
+
export const MODE_LABELS = {
|
|
8
|
+
vibe: 'Vibe',
|
|
9
|
+
plan: 'Plan',
|
|
10
|
+
};
|
|
11
|
+
export const MODE_DESCRIPTIONS = {
|
|
12
|
+
vibe: '快速执行模式 - AI 自主完成从规划到实现的全过程',
|
|
13
|
+
plan: '规划模式 - 先制定详细计划,用户审批后执行',
|
|
14
|
+
};
|
|
15
|
+
export const APPROVAL_POLICY_LABELS = {
|
|
16
|
+
ask: 'Request approval',
|
|
17
|
+
agent: 'Approve low risk',
|
|
18
|
+
full: 'Full access',
|
|
19
|
+
};
|
|
20
|
+
export const APPROVAL_POLICY_DESCRIPTIONS = {
|
|
21
|
+
ask: 'Ask before file changes, commands, MCP tools, and external actions.',
|
|
22
|
+
agent: 'Continue with low-risk workspace actions and ask only when risk is detected.',
|
|
23
|
+
full: 'Run without approval prompts or workspace restrictions; explicit deny rules remain active.',
|
|
24
|
+
};
|
|
25
|
+
export const CAPABILITY_PROFILE_LABELS = {
|
|
26
|
+
'read-only': 'Read only',
|
|
27
|
+
'workspace-write': 'Workspace write',
|
|
28
|
+
'danger-full-access': 'Danger: full access',
|
|
29
|
+
};
|
|
30
|
+
export const CAPABILITY_PROFILE_DESCRIPTIONS = {
|
|
31
|
+
'read-only': 'Read files inside the workspace; block writes and commands.',
|
|
32
|
+
'workspace-write': 'Read and write inside the workspace; block host commands and external paths.',
|
|
33
|
+
'danger-full-access': 'Allow host commands and paths outside the workspace within the approval policy.',
|
|
34
|
+
};
|
|
35
|
+
export function normalizeApprovalPolicy(value, fallback = 'ask') {
|
|
36
|
+
if (value === 'ask' || value === 'agent' || value === 'full')
|
|
37
|
+
return value;
|
|
38
|
+
if (value === 'request')
|
|
39
|
+
return 'ask';
|
|
40
|
+
if (value === 'auto')
|
|
41
|
+
return 'agent';
|
|
42
|
+
return fallback;
|
|
43
|
+
}
|
|
44
|
+
export function normalizeCapabilityProfile(value, fallback = 'workspace-write') {
|
|
45
|
+
if (value === 'read-only' || value === 'workspace-write' || value === 'danger-full-access')
|
|
46
|
+
return value;
|
|
47
|
+
return fallback;
|
|
48
|
+
}
|
|
49
|
+
export function resolveCapabilityProfileForApproval(approvalPolicy, capabilityProfile, fallback = 'workspace-write') {
|
|
50
|
+
if (approvalPolicy === 'full')
|
|
51
|
+
return 'danger-full-access';
|
|
52
|
+
return normalizeCapabilityProfile(capabilityProfile, fallback);
|
|
53
|
+
}
|
|
54
|
+
export function isTerminalStatus(status) {
|
|
55
|
+
return status === 'completed' || status === 'failed';
|
|
56
|
+
}
|
|
57
|
+
export function generateTaskId(priority) {
|
|
58
|
+
const prefix = TASK_ID_PREFIXES[priority];
|
|
59
|
+
let suffix;
|
|
60
|
+
try {
|
|
61
|
+
if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
|
|
62
|
+
suffix = crypto.randomUUID().replace(/-/g, '').slice(0, 12);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
suffix = `${Date.now().toString(36)}-${Math.random().toString(36).substring(2, 10)}`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
suffix = `${Date.now().toString(36)}-${Math.random().toString(36).substring(2, 10)}`;
|
|
70
|
+
}
|
|
71
|
+
return `${prefix}-${suffix}`;
|
|
72
|
+
}
|
|
73
|
+
export function generateTurnId() {
|
|
74
|
+
return `turn-${Date.now()}-${Math.random().toString(36).substring(2, 8)}`;
|
|
75
|
+
}
|
|
76
|
+
export function generateSessionId() {
|
|
77
|
+
return `session-${Date.now()}-${Math.random().toString(36).substring(2, 8)}`;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=agentTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentTypes.js","sourceRoot":"","sources":["../../src/shared/agentTypes.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type CodeSymbolKind = 'class' | 'function' | 'interface' | 'type' | 'enum' | 'constant';
|
|
2
|
+
export type CodeMapNodeKind = 'module' | 'symbol';
|
|
3
|
+
export interface CodeAnchor {
|
|
4
|
+
path: string;
|
|
5
|
+
line: number;
|
|
6
|
+
startLine: number;
|
|
7
|
+
endLine: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CodeSearchHit extends CodeAnchor {
|
|
10
|
+
id: string;
|
|
11
|
+
source: 'symbol' | 'chunk';
|
|
12
|
+
title: string;
|
|
13
|
+
subtitle: string;
|
|
14
|
+
preview: string;
|
|
15
|
+
score: number;
|
|
16
|
+
chunkId?: string;
|
|
17
|
+
symbolId?: string;
|
|
18
|
+
symbolName?: string;
|
|
19
|
+
symbolKind?: CodeSymbolKind;
|
|
20
|
+
}
|
|
21
|
+
export interface CodeMapNode {
|
|
22
|
+
id: string;
|
|
23
|
+
kind: CodeMapNodeKind;
|
|
24
|
+
title: string;
|
|
25
|
+
summary: string;
|
|
26
|
+
path?: string;
|
|
27
|
+
line?: number;
|
|
28
|
+
startLine?: number;
|
|
29
|
+
endLine?: number;
|
|
30
|
+
score?: number;
|
|
31
|
+
children: CodeMapNode[];
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeIndexTypes.js","sourceRoot":"","sources":["../../src/shared/codeIndexTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import type { AgentAttachment, AgentMode, AgentRunState, TaskPriority, TokenUsage } from './agentTypes';
|
|
2
|
+
export declare const FLOW_EVENT_SCHEMA_VERSION: 2;
|
|
3
|
+
export type FlowInputIntent = 'turn' | 'steer' | 'queued-turn';
|
|
4
|
+
export type FlowRunOutcome = 'succeeded' | 'failed' | 'interrupted' | 'cancelled';
|
|
5
|
+
export type FlowToolOutcome = 'completed' | 'failed' | 'cancelled';
|
|
6
|
+
export type FlowApprovalKind = 'permission' | 'input';
|
|
7
|
+
export type FlowApprovalDecision = 'allow-once' | 'allow-run' | 'allow-session' | 'deny' | 'answered';
|
|
8
|
+
export interface FlowTaskToolCall {
|
|
9
|
+
toolCallId: string;
|
|
10
|
+
toolName: string;
|
|
11
|
+
status: 'running' | 'completed' | 'error' | 'cancelled';
|
|
12
|
+
path?: string;
|
|
13
|
+
result?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface FlowActiveTask {
|
|
16
|
+
taskId: string;
|
|
17
|
+
title: string;
|
|
18
|
+
priority: TaskPriority;
|
|
19
|
+
progress: number;
|
|
20
|
+
toolCalls: FlowTaskToolCall[];
|
|
21
|
+
startedAt: number;
|
|
22
|
+
}
|
|
23
|
+
export type FlowEventPayload = {
|
|
24
|
+
type: 'thread.activated';
|
|
25
|
+
previousThreadId?: string;
|
|
26
|
+
} | {
|
|
27
|
+
type: 'run.started';
|
|
28
|
+
objective?: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'run.state_changed';
|
|
31
|
+
state: AgentRunState;
|
|
32
|
+
} | {
|
|
33
|
+
type: 'run.stopping';
|
|
34
|
+
reason?: string;
|
|
35
|
+
} | {
|
|
36
|
+
type: 'run.completed';
|
|
37
|
+
outcome: FlowRunOutcome;
|
|
38
|
+
error?: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: 'session.mode_changed';
|
|
41
|
+
mode: AgentMode;
|
|
42
|
+
} | {
|
|
43
|
+
type: 'usage.updated';
|
|
44
|
+
usage: TokenUsage;
|
|
45
|
+
} | {
|
|
46
|
+
type: 'task.active_changed';
|
|
47
|
+
task: FlowActiveTask | null;
|
|
48
|
+
} | {
|
|
49
|
+
type: 'tool.draft_changed';
|
|
50
|
+
name: string;
|
|
51
|
+
partialJson: string;
|
|
52
|
+
} | {
|
|
53
|
+
type: 'tool.draft_cleared';
|
|
54
|
+
} | {
|
|
55
|
+
type: 'input.draft_changed';
|
|
56
|
+
text: string;
|
|
57
|
+
attachmentIds: string[];
|
|
58
|
+
} | {
|
|
59
|
+
type: 'input.submitted';
|
|
60
|
+
intent: FlowInputIntent;
|
|
61
|
+
text: string;
|
|
62
|
+
attachmentIds: string[];
|
|
63
|
+
attachments?: AgentAttachment[];
|
|
64
|
+
} | {
|
|
65
|
+
type: 'input.durable';
|
|
66
|
+
} | {
|
|
67
|
+
type: 'input.accepted';
|
|
68
|
+
} | {
|
|
69
|
+
type: 'input.rejected';
|
|
70
|
+
reason: string;
|
|
71
|
+
} | {
|
|
72
|
+
type: 'input.committed';
|
|
73
|
+
} | {
|
|
74
|
+
type: 'input.restored';
|
|
75
|
+
reason: string;
|
|
76
|
+
} | {
|
|
77
|
+
type: 'input.queued';
|
|
78
|
+
position: number;
|
|
79
|
+
} | {
|
|
80
|
+
type: 'input.removed';
|
|
81
|
+
reason: string;
|
|
82
|
+
} | {
|
|
83
|
+
type: 'approval.requested';
|
|
84
|
+
kind: FlowApprovalKind;
|
|
85
|
+
toolName?: string;
|
|
86
|
+
reason?: string;
|
|
87
|
+
} | {
|
|
88
|
+
type: 'approval.presented';
|
|
89
|
+
} | {
|
|
90
|
+
type: 'approval.resolved';
|
|
91
|
+
decision: FlowApprovalDecision;
|
|
92
|
+
} | {
|
|
93
|
+
type: 'approval.cancelled';
|
|
94
|
+
reason: string;
|
|
95
|
+
} | {
|
|
96
|
+
type: 'tool.proposed';
|
|
97
|
+
name: string;
|
|
98
|
+
} | {
|
|
99
|
+
type: 'tool.awaiting_approval';
|
|
100
|
+
name: string;
|
|
101
|
+
} | {
|
|
102
|
+
type: 'tool.running';
|
|
103
|
+
name: string;
|
|
104
|
+
} | {
|
|
105
|
+
type: 'tool.completed';
|
|
106
|
+
name: string;
|
|
107
|
+
outcome: FlowToolOutcome;
|
|
108
|
+
error?: string;
|
|
109
|
+
} | {
|
|
110
|
+
type: 'stream.started';
|
|
111
|
+
channel: 'answer' | 'thinking';
|
|
112
|
+
} | {
|
|
113
|
+
type: 'stream.delta';
|
|
114
|
+
channel: 'answer' | 'thinking';
|
|
115
|
+
text: string;
|
|
116
|
+
} | {
|
|
117
|
+
type: 'stream.committed';
|
|
118
|
+
channel: 'answer' | 'thinking';
|
|
119
|
+
text: string;
|
|
120
|
+
} | {
|
|
121
|
+
type: 'stream.ended';
|
|
122
|
+
channel: 'answer' | 'thinking';
|
|
123
|
+
interrupted: boolean;
|
|
124
|
+
} | {
|
|
125
|
+
type: 'runtime.started';
|
|
126
|
+
kind: string;
|
|
127
|
+
label?: string;
|
|
128
|
+
} | {
|
|
129
|
+
type: 'runtime.completed';
|
|
130
|
+
kind: string;
|
|
131
|
+
outcome: FlowToolOutcome;
|
|
132
|
+
error?: string;
|
|
133
|
+
} | {
|
|
134
|
+
type: 'notification.raised';
|
|
135
|
+
priority: number;
|
|
136
|
+
category: string;
|
|
137
|
+
message?: string;
|
|
138
|
+
} | {
|
|
139
|
+
type: 'notification.acknowledged';
|
|
140
|
+
} | {
|
|
141
|
+
type: 'journal.flush_started';
|
|
142
|
+
queued: number;
|
|
143
|
+
} | {
|
|
144
|
+
type: 'journal.flushed';
|
|
145
|
+
queued: number;
|
|
146
|
+
durationMs: number;
|
|
147
|
+
} | {
|
|
148
|
+
type: 'journal.degraded';
|
|
149
|
+
error: string;
|
|
150
|
+
};
|
|
151
|
+
export type FlowEventType = FlowEventPayload['type'];
|
|
152
|
+
export type FlowPayloadFor<T extends FlowEventType> = Extract<FlowEventPayload, {
|
|
153
|
+
type: T;
|
|
154
|
+
}> extends infer Payload ? Payload extends {
|
|
155
|
+
type: T;
|
|
156
|
+
} ? Omit<Payload, 'type'> : never : never;
|
|
157
|
+
export interface FlowEventEnvelope<T extends FlowEventType = FlowEventType> {
|
|
158
|
+
schemaVersion: typeof FLOW_EVENT_SCHEMA_VERSION;
|
|
159
|
+
eventId: string;
|
|
160
|
+
sessionId: string;
|
|
161
|
+
threadId: string;
|
|
162
|
+
runId?: string;
|
|
163
|
+
turnId?: string;
|
|
164
|
+
itemId?: string;
|
|
165
|
+
seq: number;
|
|
166
|
+
at: number;
|
|
167
|
+
type: T;
|
|
168
|
+
payload: FlowPayloadFor<T>;
|
|
169
|
+
}
|
|
170
|
+
export type AnyFlowEvent = {
|
|
171
|
+
[Type in FlowEventType]: FlowEventEnvelope<Type>;
|
|
172
|
+
}[FlowEventType];
|
|
173
|
+
export interface CreateFlowEventInput<T extends FlowEventType> {
|
|
174
|
+
sessionId: string;
|
|
175
|
+
threadId: string;
|
|
176
|
+
runId?: string;
|
|
177
|
+
turnId?: string;
|
|
178
|
+
itemId?: string;
|
|
179
|
+
type: T;
|
|
180
|
+
payload: FlowPayloadFor<T>;
|
|
181
|
+
at?: number;
|
|
182
|
+
eventId?: string;
|
|
183
|
+
}
|
|
184
|
+
export declare class FlowEventFactory {
|
|
185
|
+
private readonly now;
|
|
186
|
+
private readonly createId;
|
|
187
|
+
private readonly nextSeqByThread;
|
|
188
|
+
constructor(now?: () => number, createId?: () => string);
|
|
189
|
+
create<T extends FlowEventType>(input: CreateFlowEventInput<T>): FlowEventEnvelope<T>;
|
|
190
|
+
observe(event: Pick<AnyFlowEvent, 'threadId' | 'seq'>): void;
|
|
191
|
+
getLastSequence(threadId: string): number;
|
|
192
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
export const FLOW_EVENT_SCHEMA_VERSION = 2;
|
|
3
|
+
export class FlowEventFactory {
|
|
4
|
+
now;
|
|
5
|
+
createId;
|
|
6
|
+
nextSeqByThread = new Map();
|
|
7
|
+
constructor(now = Date.now, createId = randomUUID) {
|
|
8
|
+
this.now = now;
|
|
9
|
+
this.createId = createId;
|
|
10
|
+
}
|
|
11
|
+
create(input) {
|
|
12
|
+
const seq = (this.nextSeqByThread.get(input.threadId) ?? 0) + 1;
|
|
13
|
+
this.nextSeqByThread.set(input.threadId, seq);
|
|
14
|
+
return {
|
|
15
|
+
schemaVersion: FLOW_EVENT_SCHEMA_VERSION,
|
|
16
|
+
eventId: input.eventId ?? this.createId(),
|
|
17
|
+
sessionId: input.sessionId,
|
|
18
|
+
threadId: input.threadId,
|
|
19
|
+
runId: input.runId,
|
|
20
|
+
turnId: input.turnId,
|
|
21
|
+
itemId: input.itemId,
|
|
22
|
+
seq,
|
|
23
|
+
at: input.at ?? this.now(),
|
|
24
|
+
type: input.type,
|
|
25
|
+
payload: input.payload,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
observe(event) {
|
|
29
|
+
const current = this.nextSeqByThread.get(event.threadId) ?? 0;
|
|
30
|
+
if (event.seq > current)
|
|
31
|
+
this.nextSeqByThread.set(event.threadId, event.seq);
|
|
32
|
+
}
|
|
33
|
+
getLastSequence(threadId) {
|
|
34
|
+
return this.nextSeqByThread.get(threadId) ?? 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=flowEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowEvents.js","sourceRoot":"","sources":["../../src/shared/flowEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAU,CAAA;AAwGnD,MAAM,OAAO,gBAAgB;IAIR;IACA;IAJF,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAA;IAE5D,YACmB,MAAoB,IAAI,CAAC,GAAG,EAC5B,WAAyB,UAAU;QADnC,QAAG,GAAH,GAAG,CAAyB;QAC5B,aAAQ,GAAR,QAAQ,CAA2B;IACnD,CAAC;IAEJ,MAAM,CAA0B,KAA8B;QAC5D,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QAC/D,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;QAC7C,OAAO;YACL,aAAa,EAAE,yBAAyB;YACxC,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACzC,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,GAAG;YACH,EAAE,EAAE,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE;YAC1B,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAA;IACH,CAAC;IAED,OAAO,CAAC,KAA6C;QACnD,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;QAC7D,IAAI,KAAK,CAAC,GAAG,GAAG,OAAO;YAAE,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IAC9E,CAAC;IAED,eAAe,CAAC,QAAgB;QAC9B,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IAChD,CAAC;CACF"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export type MemoryScope = 'global' | 'workspace_shared' | 'workspace_private' | 'conversation';
|
|
2
|
+
export type MemoryKind = 'rule' | 'fact' | 'preference' | 'episode' | 'todo' | 'verdict' | 'strategy' | 'pitfall' | 'workflow';
|
|
3
|
+
export type MemoryConfidence = 'asserted' | 'observed' | 'inferred';
|
|
4
|
+
export interface MemoryEvidence {
|
|
5
|
+
kind: 'file' | 'tool_result' | 'user_quote' | 'web' | 'conversation';
|
|
6
|
+
path?: string;
|
|
7
|
+
lines?: [number, number];
|
|
8
|
+
quote?: string;
|
|
9
|
+
conversationId?: string;
|
|
10
|
+
messageId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface Memory {
|
|
13
|
+
id: string;
|
|
14
|
+
scope: MemoryScope;
|
|
15
|
+
kind: MemoryKind;
|
|
16
|
+
text: string;
|
|
17
|
+
source: string;
|
|
18
|
+
evidence: MemoryEvidence[];
|
|
19
|
+
confidence: MemoryConfidence;
|
|
20
|
+
createdAt: number;
|
|
21
|
+
updatedAt: number;
|
|
22
|
+
pinned: boolean;
|
|
23
|
+
tags: string[];
|
|
24
|
+
reviewState: 'auto' | 'user_approved' | 'user_edited';
|
|
25
|
+
status: 'active' | 'superseded' | 'rejected' | 'stale';
|
|
26
|
+
supersededBy?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface MemoryGroup {
|
|
29
|
+
id: string;
|
|
30
|
+
label: string;
|
|
31
|
+
source: string;
|
|
32
|
+
loader: string;
|
|
33
|
+
items: Memory[];
|
|
34
|
+
}
|
|
35
|
+
export interface MemorySnapshot {
|
|
36
|
+
workspacePath: string;
|
|
37
|
+
injectionText: string;
|
|
38
|
+
injectionTokens: number;
|
|
39
|
+
groups: MemoryGroup[];
|
|
40
|
+
totalCount: number;
|
|
41
|
+
warnings: string[];
|
|
42
|
+
loadersAttempted: string[];
|
|
43
|
+
builtAt: number;
|
|
44
|
+
}
|
|
45
|
+
export interface MemoryListRequest {
|
|
46
|
+
workspacePath: string;
|
|
47
|
+
forceReload?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface MemoryListResponse {
|
|
50
|
+
success: boolean;
|
|
51
|
+
snapshot?: MemorySnapshot;
|
|
52
|
+
error?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface MemoryQueryParams {
|
|
55
|
+
workspacePath: string;
|
|
56
|
+
scope?: MemoryScope;
|
|
57
|
+
kind?: MemoryKind;
|
|
58
|
+
query?: string;
|
|
59
|
+
limit?: number;
|
|
60
|
+
includeStale?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface MemoryWriteRequest {
|
|
63
|
+
workspacePath: string;
|
|
64
|
+
text: string;
|
|
65
|
+
kind?: MemoryKind;
|
|
66
|
+
scope?: MemoryScope;
|
|
67
|
+
tags?: string[];
|
|
68
|
+
evidence?: MemoryEvidence[];
|
|
69
|
+
confidence?: MemoryConfidence;
|
|
70
|
+
conversationId?: string;
|
|
71
|
+
messageId?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface MemoryWriteResponse {
|
|
74
|
+
success: boolean;
|
|
75
|
+
id?: string;
|
|
76
|
+
error?: string;
|
|
77
|
+
deduplicated?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface MemoryForgetRequest {
|
|
80
|
+
workspacePath: string;
|
|
81
|
+
id: string;
|
|
82
|
+
reason?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface MemoryForgetResponse {
|
|
85
|
+
success: boolean;
|
|
86
|
+
error?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface MemoryUpdateRequest {
|
|
89
|
+
workspacePath: string;
|
|
90
|
+
id: string;
|
|
91
|
+
text?: string;
|
|
92
|
+
kind?: MemoryKind;
|
|
93
|
+
tags?: string[];
|
|
94
|
+
pinned?: boolean;
|
|
95
|
+
status?: Memory['status'];
|
|
96
|
+
}
|
|
97
|
+
export interface MemoryUpdateResponse {
|
|
98
|
+
success: boolean;
|
|
99
|
+
error?: string;
|
|
100
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memoryTypes.js","sourceRoot":"","sources":["../../src/shared/memoryTypes.ts"],"names":[],"mappings":""}
|