@andorra-labs/code 0.0.0-stage → 0.1.4
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.md +38 -0
- package/README.md +231 -3
- package/THIRD_PARTY_NOTICES.md +56 -0
- package/dist/src/account-presentation.d.ts +53 -0
- package/dist/src/account-presentation.js +99 -0
- package/dist/src/activity.d.ts +41 -0
- package/dist/src/activity.js +79 -0
- package/dist/src/agent-definitions.d.ts +61 -0
- package/dist/src/agent-definitions.js +303 -0
- package/dist/src/agent-execution.d.ts +4 -0
- package/dist/src/agent-execution.js +1198 -0
- package/dist/src/agent-mcp.d.ts +105 -0
- package/dist/src/agent-mcp.js +859 -0
- package/dist/src/agent-modifiers.d.ts +8 -0
- package/dist/src/agent-modifiers.js +333 -0
- package/dist/src/analytics.d.ts +81 -0
- package/dist/src/analytics.js +81 -0
- package/dist/src/anthropic-console-auth.d.ts +68 -0
- package/dist/src/anthropic-console-auth.js +318 -0
- package/dist/src/anthropic-credentials.d.ts +41 -0
- package/dist/src/anthropic-credentials.js +107 -0
- package/dist/src/app-server/protocol.d.ts +500 -0
- package/dist/src/app-server/protocol.js +106 -0
- package/dist/src/app-server/reasoning.d.ts +43 -0
- package/dist/src/app-server/reasoning.js +173 -0
- package/dist/src/app-server/terminal.d.ts +77 -0
- package/dist/src/app-server/terminal.js +177 -0
- package/dist/src/app-server/workspace.d.ts +247 -0
- package/dist/src/app-server/workspace.js +1098 -0
- package/dist/src/app-server.d.ts +1039 -0
- package/dist/src/app-server.js +6594 -0
- package/dist/src/artifacts.d.ts +27 -0
- package/dist/src/artifacts.js +103 -0
- package/dist/src/attachments.d.ts +158 -0
- package/dist/src/attachments.js +466 -0
- package/dist/src/auth/AuthManager.d.ts +110 -0
- package/dist/src/auth/AuthManager.js +435 -0
- package/dist/src/auth/callback.d.ts +10 -0
- package/dist/src/auth/callback.js +96 -0
- package/dist/src/auth/deployment.d.ts +18 -0
- package/dist/src/auth/deployment.js +18 -0
- package/dist/src/auth/index.d.ts +31 -0
- package/dist/src/auth/index.js +27 -0
- package/dist/src/auth/lock.d.ts +2 -0
- package/dist/src/auth/lock.js +29 -0
- package/dist/src/auth/store.d.ts +20 -0
- package/dist/src/auth/store.js +93 -0
- package/dist/src/auth/types.d.ts +24 -0
- package/dist/src/auth/types.js +8 -0
- package/dist/src/auth-commands.d.ts +5 -0
- package/dist/src/auth-commands.js +28 -0
- package/dist/src/automation-runner.d.ts +7 -0
- package/dist/src/automation-runner.js +113 -0
- package/dist/src/automation-service.d.ts +28 -0
- package/dist/src/automation-service.js +299 -0
- package/dist/src/automation-tool.d.ts +2 -0
- package/dist/src/automation-tool.js +49 -0
- package/dist/src/automation-worker-shutdown.d.ts +3 -0
- package/dist/src/automation-worker-shutdown.js +13 -0
- package/dist/src/automations.d.ts +63 -0
- package/dist/src/automations.js +265 -0
- package/dist/src/boot-trace.d.ts +15 -0
- package/dist/src/boot-trace.js +25 -0
- package/dist/src/browser-activity.d.ts +4 -0
- package/dist/src/browser-activity.js +18 -0
- package/dist/src/browser-bridge.d.ts +56 -0
- package/dist/src/browser-bridge.js +372 -0
- package/dist/src/browser-observation.d.ts +24 -0
- package/dist/src/browser-observation.js +104 -0
- package/dist/src/browser-panel-tool.d.ts +39 -0
- package/dist/src/browser-panel-tool.js +227 -0
- package/dist/src/browser-runner.d.ts +16 -0
- package/dist/src/browser-runner.js +302 -0
- package/dist/src/browser-server.d.ts +31 -0
- package/dist/src/browser-server.js +1189 -0
- package/dist/src/browser-session.d.ts +19 -0
- package/dist/src/browser-session.js +649 -0
- package/dist/src/browser-ui/andorra-logo.png +0 -0
- package/dist/src/browser-ui/app.js +419 -0
- package/dist/src/browser-ui/index.html +13 -0
- package/dist/src/browser-ui/style.css +243 -0
- package/dist/src/browser-view.d.ts +348 -0
- package/dist/src/browser-view.js +1487 -0
- package/dist/src/capabilities.d.ts +9 -0
- package/dist/src/capabilities.js +135 -0
- package/dist/src/clarification-ui.d.ts +23 -0
- package/dist/src/clarification-ui.js +59 -0
- package/dist/src/claude-executable.d.ts +6 -0
- package/dist/src/claude-executable.js +56 -0
- package/dist/src/claude-provider.d.ts +35 -0
- package/dist/src/claude-provider.js +391 -0
- package/dist/src/cli.d.ts +85 -0
- package/dist/src/cli.js +2564 -0
- package/dist/src/code-intelligence/CodeIntelligenceManager.d.ts +108 -0
- package/dist/src/code-intelligence/CodeIntelligenceManager.js +616 -0
- package/dist/src/code-intelligence/ContextLedger.d.ts +32 -0
- package/dist/src/code-intelligence/ContextLedger.js +77 -0
- package/dist/src/code-intelligence/ContextRouter.d.ts +8 -0
- package/dist/src/code-intelligence/ContextRouter.js +18 -0
- package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.d.ts +82 -0
- package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.js +444 -0
- package/dist/src/code-intelligence/codegraph/CodeGraphProvider.d.ts +40 -0
- package/dist/src/code-intelligence/codegraph/CodeGraphProvider.js +84 -0
- package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.d.ts +22 -0
- package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.js +71 -0
- package/dist/src/code-intelligence/codegraph/repoExploreTool.d.ts +9 -0
- package/dist/src/code-intelligence/codegraph/repoExploreTool.js +26 -0
- package/dist/src/code-intelligence/repository.d.ts +13 -0
- package/dist/src/code-intelligence/repository.js +48 -0
- package/dist/src/code-intelligence/types.d.ts +78 -0
- package/dist/src/code-intelligence/types.js +3 -0
- package/dist/src/codex-auth.d.ts +83 -0
- package/dist/src/codex-auth.js +168 -0
- package/dist/src/codex-browser-auth.d.ts +74 -0
- package/dist/src/codex-browser-auth.js +429 -0
- package/dist/src/codex-errors.d.ts +3 -0
- package/dist/src/codex-errors.js +50 -0
- package/dist/src/codex-executable.d.ts +12 -0
- package/dist/src/codex-executable.js +154 -0
- package/dist/src/codex-provider.d.ts +25 -0
- package/dist/src/codex-provider.js +211 -0
- package/dist/src/codex-rpc.d.ts +43 -0
- package/dist/src/codex-rpc.js +136 -0
- package/dist/src/coding-tools.d.ts +19 -0
- package/dist/src/coding-tools.js +875 -0
- package/dist/src/command-metrics.d.ts +17 -0
- package/dist/src/command-metrics.js +34 -0
- package/dist/src/command-screens.d.ts +44 -0
- package/dist/src/command-screens.js +601 -0
- package/dist/src/commands.d.ts +111 -0
- package/dist/src/commands.js +550 -0
- package/dist/src/completion.d.ts +45 -0
- package/dist/src/completion.js +195 -0
- package/dist/src/config.d.ts +163 -0
- package/dist/src/config.js +663 -0
- package/dist/src/context-budget.d.ts +32 -0
- package/dist/src/context-budget.js +151 -0
- package/dist/src/context-compaction.d.ts +43 -0
- package/dist/src/context-compaction.js +269 -0
- package/dist/src/context-selection.d.ts +65 -0
- package/dist/src/context-selection.js +130 -0
- package/dist/src/dashboard-view.d.ts +37 -0
- package/dist/src/dashboard-view.js +254 -0
- package/dist/src/dashboard.d.ts +41 -0
- package/dist/src/dashboard.js +160 -0
- package/dist/src/deadline.d.ts +55 -0
- package/dist/src/deadline.js +164 -0
- package/dist/src/decision/ContinuationAdapter.d.ts +6 -0
- package/dist/src/decision/ContinuationAdapter.js +11 -0
- package/dist/src/decision/DecisionEngine.d.ts +23 -0
- package/dist/src/decision/DecisionEngine.js +1 -0
- package/dist/src/decision/DecisionManager.d.ts +47 -0
- package/dist/src/decision/DecisionManager.js +280 -0
- package/dist/src/decision/DecisionPolicy.d.ts +8 -0
- package/dist/src/decision/DecisionPolicy.js +54 -0
- package/dist/src/decision/FactContinuations.d.ts +147 -0
- package/dist/src/decision/FactContinuations.js +472 -0
- package/dist/src/decision/FactServiceGate.d.ts +12 -0
- package/dist/src/decision/FactServiceGate.js +37 -0
- package/dist/src/decision/PreparedSteps.d.ts +51 -0
- package/dist/src/decision/PreparedSteps.js +147 -0
- package/dist/src/decision/applyToolMenu.d.ts +3 -0
- package/dist/src/decision/applyToolMenu.js +61 -0
- package/dist/src/decision/checks.d.ts +13 -0
- package/dist/src/decision/checks.js +104 -0
- package/dist/src/decision/facts.d.ts +64 -0
- package/dist/src/decision/facts.js +90 -0
- package/dist/src/decision/guidancePolicy.d.ts +3 -0
- package/dist/src/decision/guidancePolicy.js +10 -0
- package/dist/src/decision/hostedPolicy.d.ts +14 -0
- package/dist/src/decision/hostedPolicy.js +21 -0
- package/dist/src/decision/index.d.ts +6 -0
- package/dist/src/decision/index.js +6 -0
- package/dist/src/decision/optimizationPolicy.d.ts +26 -0
- package/dist/src/decision/optimizationPolicy.js +38 -0
- package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +17 -0
- package/dist/src/decision/providers/AndorraDecisionProvider.js +251 -0
- package/dist/src/decision/providers/HttpDecisionProvider.d.ts +16 -0
- package/dist/src/decision/providers/HttpDecisionProvider.js +105 -0
- package/dist/src/decision/providers/NoOpDecisionProvider.d.ts +4 -0
- package/dist/src/decision/providers/NoOpDecisionProvider.js +3 -0
- package/dist/src/decision/providers/index.d.ts +3 -0
- package/dist/src/decision/providers/index.js +13 -0
- package/dist/src/decision/providers/questions.d.ts +3 -0
- package/dist/src/decision/providers/questions.js +31 -0
- package/dist/src/decision/routeTools.d.ts +59 -0
- package/dist/src/decision/routeTools.js +131 -0
- package/dist/src/decision/toolFamilies.d.ts +7 -0
- package/dist/src/decision/toolFamilies.js +55 -0
- package/dist/src/decision/toolMenu.d.ts +35 -0
- package/dist/src/decision/toolMenu.js +73 -0
- package/dist/src/decision/types.d.ts +99 -0
- package/dist/src/decision/types.js +1 -0
- package/dist/src/diff-preview.d.ts +6 -0
- package/dist/src/diff-preview.js +120 -0
- package/dist/src/duration.d.ts +44 -0
- package/dist/src/duration.js +72 -0
- package/dist/src/efficiency.d.ts +101 -0
- package/dist/src/efficiency.js +104 -0
- package/dist/src/engine/protocol.d.ts +11 -0
- package/dist/src/engine/protocol.js +51 -0
- package/dist/src/extensions.d.ts +46 -0
- package/dist/src/extensions.js +846 -0
- package/dist/src/favicons.d.ts +37 -0
- package/dist/src/favicons.js +216 -0
- package/dist/src/file-read-state.d.ts +8 -0
- package/dist/src/file-read-state.js +31 -0
- package/dist/src/git-summary.d.ts +67 -0
- package/dist/src/git-summary.js +461 -0
- package/dist/src/goal-completion-verification.d.ts +18 -0
- package/dist/src/goal-completion-verification.js +43 -0
- package/dist/src/graph-account.d.ts +31 -0
- package/dist/src/graph-account.js +57 -0
- package/dist/src/graph-editor-session.d.ts +15 -0
- package/dist/src/graph-editor-session.js +70 -0
- package/dist/src/graph-health.d.ts +88 -0
- package/dist/src/graph-health.js +243 -0
- package/dist/src/graph-provider-portability.d.ts +30 -0
- package/dist/src/graph-provider-portability.js +197 -0
- package/dist/src/graph-quota.d.ts +55 -0
- package/dist/src/graph-quota.js +131 -0
- package/dist/src/graph-runner.d.ts +4 -0
- package/dist/src/graph-runner.js +1356 -0
- package/dist/src/graph-selection.d.ts +17 -0
- package/dist/src/graph-selection.js +31 -0
- package/dist/src/graph-server.d.ts +13 -0
- package/dist/src/graph-server.js +483 -0
- package/dist/src/graph-studio-features.d.ts +61 -0
- package/dist/src/graph-studio-features.js +348 -0
- package/dist/src/graph-sync.d.ts +76 -0
- package/dist/src/graph-sync.js +619 -0
- package/dist/src/graph-ui/andorra-logo.png +0 -0
- package/dist/src/graph-ui/app.js +1803 -0
- package/dist/src/graph-ui/compat.js +43 -0
- package/dist/src/graph-ui/controls.css +190 -0
- package/dist/src/graph-ui/controls.js +567 -0
- package/dist/src/graph-ui/edge-router.js +117 -0
- package/dist/src/graph-ui/embed.js +324 -0
- package/dist/src/graph-ui/fonts/geist-mono-latin-400-normal.woff2 +0 -0
- package/dist/src/graph-ui/fonts/geist-sans-latin-400-normal.woff2 +0 -0
- package/dist/src/graph-ui/fonts/geist-sans-latin-500-normal.woff2 +0 -0
- package/dist/src/graph-ui/icons.js +117 -0
- package/dist/src/graph-ui/index.html +7 -0
- package/dist/src/graph-ui/library.css +26 -0
- package/dist/src/graph-ui/sidebar.js +61 -0
- package/dist/src/graph-ui/studio-canvas.js +454 -0
- package/dist/src/graph-ui/studio.css +110 -0
- package/dist/src/graph-ui/studio.js +720 -0
- package/dist/src/graph-ui/style.css +477 -0
- package/dist/src/graph-ui/theme.js +92 -0
- package/dist/src/graph-ui/tokens.css +187 -0
- package/dist/src/graphs.d.ts +270 -0
- package/dist/src/graphs.js +1102 -0
- package/dist/src/grep-regex-worker.d.ts +1 -0
- package/dist/src/grep-regex-worker.js +20 -0
- package/dist/src/grep-regex.d.ts +11 -0
- package/dist/src/grep-regex.js +64 -0
- package/dist/src/handoffs.d.ts +34 -0
- package/dist/src/handoffs.js +229 -0
- package/dist/src/hardened-runtime.d.ts +14 -0
- package/dist/src/hardened-runtime.js +264 -0
- package/dist/src/limits.d.ts +77 -0
- package/dist/src/limits.js +88 -0
- package/dist/src/markdown.d.ts +31 -0
- package/dist/src/markdown.js +553 -0
- package/dist/src/mcp.d.ts +11 -0
- package/dist/src/mcp.js +175 -0
- package/dist/src/membership-errors.d.ts +4 -0
- package/dist/src/membership-errors.js +4 -0
- package/dist/src/membership.d.ts +81 -0
- package/dist/src/membership.js +247 -0
- package/dist/src/memory/LocalToolMemory.d.ts +20 -0
- package/dist/src/memory/LocalToolMemory.js +114 -0
- package/dist/src/memory/MemoryDistiller.d.ts +35 -0
- package/dist/src/memory/MemoryDistiller.js +216 -0
- package/dist/src/memory/MemoryManager.d.ts +76 -0
- package/dist/src/memory/MemoryManager.js +386 -0
- package/dist/src/memory/MemoryPolicy.d.ts +30 -0
- package/dist/src/memory/MemoryPolicy.js +96 -0
- package/dist/src/memory/MemoryProvider.d.ts +18 -0
- package/dist/src/memory/MemoryProvider.js +1 -0
- package/dist/src/memory/MemoryRetriever.d.ts +27 -0
- package/dist/src/memory/MemoryRetriever.js +149 -0
- package/dist/src/memory/PermissionMemoryProvider.d.ts +22 -0
- package/dist/src/memory/PermissionMemoryProvider.js +50 -0
- package/dist/src/memory/ToolFailureLessons.d.ts +39 -0
- package/dist/src/memory/ToolFailureLessons.js +167 -0
- package/dist/src/memory/index.d.ts +12 -0
- package/dist/src/memory/index.js +11 -0
- package/dist/src/memory/providers/NoOpMemoryProvider.d.ts +13 -0
- package/dist/src/memory/providers/NoOpMemoryProvider.js +15 -0
- package/dist/src/memory/providers/graphiti/GraphitiClient.d.ts +27 -0
- package/dist/src/memory/providers/graphiti/GraphitiClient.js +76 -0
- package/dist/src/memory/providers/graphiti/GraphitiMapper.d.ts +6 -0
- package/dist/src/memory/providers/graphiti/GraphitiMapper.js +116 -0
- package/dist/src/memory/providers/graphiti/GraphitiMemoryProvider.d.ts +27 -0
- package/dist/src/memory/providers/graphiti/GraphitiMemoryProvider.js +137 -0
- package/dist/src/memory/providers/graphiti/GraphitiTypes.d.ts +57 -0
- package/dist/src/memory/providers/graphiti/GraphitiTypes.js +2 -0
- package/dist/src/memory/redaction.d.ts +11 -0
- package/dist/src/memory/redaction.js +58 -0
- package/dist/src/memory/repository.d.ts +11 -0
- package/dist/src/memory/repository.js +74 -0
- package/dist/src/memory/tools/memorySearchTool.d.ts +4 -0
- package/dist/src/memory/tools/memorySearchTool.js +77 -0
- package/dist/src/memory/types.d.ts +112 -0
- package/dist/src/memory/types.js +7 -0
- package/dist/src/model-metadata.d.ts +28 -0
- package/dist/src/model-metadata.js +274 -0
- package/dist/src/model-override.d.ts +60 -0
- package/dist/src/model-override.js +146 -0
- package/dist/src/model-tiers.d.ts +61 -0
- package/dist/src/model-tiers.js +109 -0
- package/dist/src/opencode-catalog.d.ts +16 -0
- package/dist/src/opencode-catalog.js +135 -0
- package/dist/src/opencode-provider.d.ts +10 -0
- package/dist/src/opencode-provider.js +525 -0
- package/dist/src/paged-transcript.d.ts +58 -0
- package/dist/src/paged-transcript.js +205 -0
- package/dist/src/palette.d.ts +61 -0
- package/dist/src/palette.js +63 -0
- package/dist/src/permissions.d.ts +36 -0
- package/dist/src/permissions.js +93 -0
- package/dist/src/powershell-pool.d.ts +26 -0
- package/dist/src/powershell-pool.js +235 -0
- package/dist/src/profile.d.ts +80 -0
- package/dist/src/profile.js +200 -0
- package/dist/src/provider-connection.d.ts +36 -0
- package/dist/src/provider-connection.js +222 -0
- package/dist/src/provider-engine.d.ts +37 -0
- package/dist/src/provider-engine.js +401 -0
- package/dist/src/provider-import.d.ts +68 -0
- package/dist/src/provider-import.js +355 -0
- package/dist/src/provider-settings.d.ts +8 -0
- package/dist/src/provider-settings.js +451 -0
- package/dist/src/providers.d.ts +219 -0
- package/dist/src/providers.js +1230 -0
- package/dist/src/pull-requests.d.ts +195 -0
- package/dist/src/pull-requests.js +514 -0
- package/dist/src/qa/api/http-runner.d.ts +3 -0
- package/dist/src/qa/api/http-runner.js +47 -0
- package/dist/src/qa/browser/PlaywrightRunner.d.ts +21 -0
- package/dist/src/qa/browser/PlaywrightRunner.js +190 -0
- package/dist/src/qa/command-policy.d.ts +28 -0
- package/dist/src/qa/command-policy.js +122 -0
- package/dist/src/qa/git/ChangeDetector.d.ts +26 -0
- package/dist/src/qa/git/ChangeDetector.js +177 -0
- package/dist/src/qa/git/DiffReviewer.d.ts +28 -0
- package/dist/src/qa/git/DiffReviewer.js +115 -0
- package/dist/src/qa/index.d.ts +11 -0
- package/dist/src/qa/index.js +19 -0
- package/dist/src/qa/orchestrator/ChangeClassifier.d.ts +14 -0
- package/dist/src/qa/orchestrator/ChangeClassifier.js +28 -0
- package/dist/src/qa/orchestrator/MergeGate.d.ts +14 -0
- package/dist/src/qa/orchestrator/MergeGate.js +40 -0
- package/dist/src/qa/orchestrator/QaOrchestrator.d.ts +79 -0
- package/dist/src/qa/orchestrator/QaOrchestrator.js +373 -0
- package/dist/src/qa/profile/ProjectInspector.d.ts +9 -0
- package/dist/src/qa/profile/ProjectInspector.js +295 -0
- package/dist/src/qa/profile/QaConfigLoader.d.ts +43 -0
- package/dist/src/qa/profile/QaConfigLoader.js +261 -0
- package/dist/src/qa/profile/QaProfile.d.ts +17 -0
- package/dist/src/qa/profile/QaProfile.js +15 -0
- package/dist/src/qa/profile/yaml.d.ts +12 -0
- package/dist/src/qa/profile/yaml.js +203 -0
- package/dist/src/qa/qa-authorize.d.ts +25 -0
- package/dist/src/qa/qa-authorize.js +82 -0
- package/dist/src/qa/runners/CommandRunner.d.ts +22 -0
- package/dist/src/qa/runners/CommandRunner.js +96 -0
- package/dist/src/qa/runners/TestRunner.d.ts +21 -0
- package/dist/src/qa/runners/TestRunner.js +66 -0
- package/dist/src/qa/runtime/ProcessManager.d.ts +53 -0
- package/dist/src/qa/runtime/ProcessManager.js +225 -0
- package/dist/src/qa/runtime/PtyManager.d.ts +57 -0
- package/dist/src/qa/runtime/PtyManager.js +338 -0
- package/dist/src/qa/runtime/RuntimeSmoke.d.ts +11 -0
- package/dist/src/qa/runtime/RuntimeSmoke.js +78 -0
- package/dist/src/qa/runtime-detect.d.ts +10 -0
- package/dist/src/qa/runtime-detect.js +72 -0
- package/dist/src/qa/security/DependencyScanner.d.ts +19 -0
- package/dist/src/qa/security/DependencyScanner.js +167 -0
- package/dist/src/qa/security/SecretScanner.d.ts +3 -0
- package/dist/src/qa/security/SecretScanner.js +55 -0
- package/dist/src/qa/tools.d.ts +3 -0
- package/dist/src/qa/tools.js +301 -0
- package/dist/src/qa/types.d.ts +134 -0
- package/dist/src/qa/types.js +3 -0
- package/dist/src/react-runtime.d.ts +53 -0
- package/dist/src/react-runtime.js +1753 -0
- package/dist/src/remote/cert.d.ts +29 -0
- package/dist/src/remote/cert.js +136 -0
- package/dist/src/remote/client.d.ts +189 -0
- package/dist/src/remote/client.js +659 -0
- package/dist/src/remote/command.d.ts +4 -0
- package/dist/src/remote/command.js +211 -0
- package/dist/src/remote/engine-pool.d.ts +230 -0
- package/dist/src/remote/engine-pool.js +1160 -0
- package/dist/src/remote/errors.d.ts +26 -0
- package/dist/src/remote/errors.js +21 -0
- package/dist/src/remote/network.d.ts +48 -0
- package/dist/src/remote/network.js +135 -0
- package/dist/src/remote/pairing.d.ts +98 -0
- package/dist/src/remote/pairing.js +306 -0
- package/dist/src/remote/roots.d.ts +29 -0
- package/dist/src/remote/roots.js +44 -0
- package/dist/src/remote/serve.d.ts +115 -0
- package/dist/src/remote/serve.js +274 -0
- package/dist/src/remote/server.d.ts +35 -0
- package/dist/src/remote/server.js +484 -0
- package/dist/src/remote/types.d.ts +86 -0
- package/dist/src/remote/types.js +11 -0
- package/dist/src/run-control.d.ts +17 -0
- package/dist/src/run-control.js +52 -0
- package/dist/src/run-progress.d.ts +226 -0
- package/dist/src/run-progress.js +724 -0
- package/dist/src/run-records.d.ts +500 -0
- package/dist/src/run-records.js +1678 -0
- package/dist/src/runtime.d.ts +418 -0
- package/dist/src/runtime.js +247 -0
- package/dist/src/sandbox-child.d.ts +1 -0
- package/dist/src/sandbox-child.js +14 -0
- package/dist/src/save-lock.d.ts +9 -0
- package/dist/src/save-lock.js +186 -0
- package/dist/src/session-monitor.d.ts +98 -0
- package/dist/src/session-monitor.js +323 -0
- package/dist/src/session-reaper.d.ts +23 -0
- package/dist/src/session-reaper.js +33 -0
- package/dist/src/session-summary.d.ts +27 -0
- package/dist/src/session-summary.js +66 -0
- package/dist/src/session-title.d.ts +18 -0
- package/dist/src/session-title.js +54 -0
- package/dist/src/sessions.d.ts +211 -0
- package/dist/src/sessions.js +620 -0
- package/dist/src/shell.d.ts +40 -0
- package/dist/src/shell.js +504 -0
- package/dist/src/side-panel.d.ts +144 -0
- package/dist/src/side-panel.js +366 -0
- package/dist/src/skill-commands.d.ts +1 -0
- package/dist/src/skill-commands.js +11 -0
- package/dist/src/skills/bundled/ai-elements/SKILL.md +155 -0
- package/dist/src/skills/bundled/ai-elements/references/agent.md +138 -0
- package/dist/src/skills/bundled/ai-elements/references/artifact.md +91 -0
- package/dist/src/skills/bundled/ai-elements/references/attachments.md +197 -0
- package/dist/src/skills/bundled/ai-elements/references/audio-player.md +141 -0
- package/dist/src/skills/bundled/ai-elements/references/canvas.md +39 -0
- package/dist/src/skills/bundled/ai-elements/references/chain-of-thought.md +88 -0
- package/dist/src/skills/bundled/ai-elements/references/checkpoint.md +171 -0
- package/dist/src/skills/bundled/ai-elements/references/code-block.md +177 -0
- package/dist/src/skills/bundled/ai-elements/references/commit.md +184 -0
- package/dist/src/skills/bundled/ai-elements/references/confirmation.md +268 -0
- package/dist/src/skills/bundled/ai-elements/references/connection.md +39 -0
- package/dist/src/skills/bundled/ai-elements/references/context.md +133 -0
- package/dist/src/skills/bundled/ai-elements/references/controls.md +37 -0
- package/dist/src/skills/bundled/ai-elements/references/conversation.md +224 -0
- package/dist/src/skills/bundled/ai-elements/references/edge.md +57 -0
- package/dist/src/skills/bundled/ai-elements/references/environment-variables.md +109 -0
- package/dist/src/skills/bundled/ai-elements/references/file-tree.md +79 -0
- package/dist/src/skills/bundled/ai-elements/references/image.md +150 -0
- package/dist/src/skills/bundled/ai-elements/references/inline-citation.md +300 -0
- package/dist/src/skills/bundled/ai-elements/references/jsx-preview.md +108 -0
- package/dist/src/skills/bundled/ai-elements/references/message.md +231 -0
- package/dist/src/skills/bundled/ai-elements/references/mic-selector.md +193 -0
- package/dist/src/skills/bundled/ai-elements/references/model-selector.md +119 -0
- package/dist/src/skills/bundled/ai-elements/references/node.md +78 -0
- package/dist/src/skills/bundled/ai-elements/references/open-in-chat.md +74 -0
- package/dist/src/skills/bundled/ai-elements/references/package-info.md +102 -0
- package/dist/src/skills/bundled/ai-elements/references/panel.md +38 -0
- package/dist/src/skills/bundled/ai-elements/references/persona.md +173 -0
- package/dist/src/skills/bundled/ai-elements/references/plan.md +86 -0
- package/dist/src/skills/bundled/ai-elements/references/prompt-input.md +572 -0
- package/dist/src/skills/bundled/ai-elements/references/queue.md +179 -0
- package/dist/src/skills/bundled/ai-elements/references/reasoning.md +226 -0
- package/dist/src/skills/bundled/ai-elements/references/sandbox.md +133 -0
- package/dist/src/skills/bundled/ai-elements/references/schema-display.md +109 -0
- package/dist/src/skills/bundled/ai-elements/references/shimmer.md +55 -0
- package/dist/src/skills/bundled/ai-elements/references/snippet.md +71 -0
- package/dist/src/skills/bundled/ai-elements/references/sources.md +200 -0
- package/dist/src/skills/bundled/ai-elements/references/speech-input.md +167 -0
- package/dist/src/skills/bundled/ai-elements/references/stack-trace.md +225 -0
- package/dist/src/skills/bundled/ai-elements/references/suggestion.md +128 -0
- package/dist/src/skills/bundled/ai-elements/references/task.md +222 -0
- package/dist/src/skills/bundled/ai-elements/references/terminal.md +110 -0
- package/dist/src/skills/bundled/ai-elements/references/test-results.md +164 -0
- package/dist/src/skills/bundled/ai-elements/references/tool.md +282 -0
- package/dist/src/skills/bundled/ai-elements/references/toolbar.md +37 -0
- package/dist/src/skills/bundled/ai-elements/references/transcription.md +127 -0
- package/dist/src/skills/bundled/ai-elements/references/voice-selector.md +248 -0
- package/dist/src/skills/bundled/ai-elements/references/web-preview.md +204 -0
- package/dist/src/skills/bundled/ai-elements/scripts/agent.tsx +67 -0
- package/dist/src/skills/bundled/ai-elements/scripts/artifact.tsx +117 -0
- package/dist/src/skills/bundled/ai-elements/scripts/attachments-inline.tsx +123 -0
- package/dist/src/skills/bundled/ai-elements/scripts/attachments-list.tsx +94 -0
- package/dist/src/skills/bundled/ai-elements/scripts/attachments.tsx +84 -0
- package/dist/src/skills/bundled/ai-elements/scripts/audio-player-remote.tsx +35 -0
- package/dist/src/skills/bundled/ai-elements/scripts/audio-player.tsx +74 -0
- package/dist/src/skills/bundled/ai-elements/scripts/chain-of-thought.tsx +80 -0
- package/dist/src/skills/bundled/ai-elements/scripts/checkpoint.tsx +96 -0
- package/dist/src/skills/bundled/ai-elements/scripts/code-block-dark.tsx +46 -0
- package/dist/src/skills/bundled/ai-elements/scripts/code-block.tsx +120 -0
- package/dist/src/skills/bundled/ai-elements/scripts/commit.tsx +94 -0
- package/dist/src/skills/bundled/ai-elements/scripts/confirmation-accepted.tsx +41 -0
- package/dist/src/skills/bundled/ai-elements/scripts/confirmation-rejected.tsx +41 -0
- package/dist/src/skills/bundled/ai-elements/scripts/confirmation-request.tsx +54 -0
- package/dist/src/skills/bundled/ai-elements/scripts/confirmation.tsx +59 -0
- package/dist/src/skills/bundled/ai-elements/scripts/context.tsx +45 -0
- package/dist/src/skills/bundled/ai-elements/scripts/conversation.tsx +182 -0
- package/dist/src/skills/bundled/ai-elements/scripts/environment-variables.tsx +61 -0
- package/dist/src/skills/bundled/ai-elements/scripts/file-tree-basic.tsx +20 -0
- package/dist/src/skills/bundled/ai-elements/scripts/file-tree-expanded.tsx +23 -0
- package/dist/src/skills/bundled/ai-elements/scripts/file-tree-selection.tsx +26 -0
- package/dist/src/skills/bundled/ai-elements/scripts/file-tree.tsx +44 -0
- package/dist/src/skills/bundled/ai-elements/scripts/image.tsx +20 -0
- package/dist/src/skills/bundled/ai-elements/scripts/inline-citation.tsx +101 -0
- package/dist/src/skills/bundled/ai-elements/scripts/jsx-preview.tsx +105 -0
- package/dist/src/skills/bundled/ai-elements/scripts/message.tsx +330 -0
- package/dist/src/skills/bundled/ai-elements/scripts/mic-selector.tsx +52 -0
- package/dist/src/skills/bundled/ai-elements/scripts/model-selector.tsx +368 -0
- package/dist/src/skills/bundled/ai-elements/scripts/open-in-chat.tsx +33 -0
- package/dist/src/skills/bundled/ai-elements/scripts/package-info.tsx +52 -0
- package/dist/src/skills/bundled/ai-elements/scripts/persona-command.tsx +101 -0
- package/dist/src/skills/bundled/ai-elements/scripts/persona-glint.tsx +101 -0
- package/dist/src/skills/bundled/ai-elements/scripts/persona-halo.tsx +101 -0
- package/dist/src/skills/bundled/ai-elements/scripts/persona-mana.tsx +101 -0
- package/dist/src/skills/bundled/ai-elements/scripts/persona-obsidian.tsx +101 -0
- package/dist/src/skills/bundled/ai-elements/scripts/persona-opal.tsx +101 -0
- package/dist/src/skills/bundled/ai-elements/scripts/plan.tsx +69 -0
- package/dist/src/skills/bundled/ai-elements/scripts/prompt-input-cursor.tsx +462 -0
- package/dist/src/skills/bundled/ai-elements/scripts/prompt-input-tooltip.tsx +46 -0
- package/dist/src/skills/bundled/ai-elements/scripts/prompt-input.tsx +254 -0
- package/dist/src/skills/bundled/ai-elements/scripts/queue-prompt-input.tsx +372 -0
- package/dist/src/skills/bundled/ai-elements/scripts/queue.tsx +281 -0
- package/dist/src/skills/bundled/ai-elements/scripts/reasoning.tsx +73 -0
- package/dist/src/skills/bundled/ai-elements/scripts/sandbox.tsx +171 -0
- package/dist/src/skills/bundled/ai-elements/scripts/schema-display-basic.tsx +13 -0
- package/dist/src/skills/bundled/ai-elements/scripts/schema-display-body.tsx +20 -0
- package/dist/src/skills/bundled/ai-elements/scripts/schema-display-nested.tsx +23 -0
- package/dist/src/skills/bundled/ai-elements/scripts/schema-display-params.tsx +16 -0
- package/dist/src/skills/bundled/ai-elements/scripts/schema-display.tsx +110 -0
- package/dist/src/skills/bundled/ai-elements/scripts/shimmer-duration.tsx +35 -0
- package/dist/src/skills/bundled/ai-elements/scripts/shimmer-elements.tsx +45 -0
- package/dist/src/skills/bundled/ai-elements/scripts/shimmer.tsx +17 -0
- package/dist/src/skills/bundled/ai-elements/scripts/snippet-plain.tsx +19 -0
- package/dist/src/skills/bundled/ai-elements/scripts/snippet.tsx +25 -0
- package/dist/src/skills/bundled/ai-elements/scripts/sources-custom.tsx +40 -0
- package/dist/src/skills/bundled/ai-elements/scripts/sources.tsx +33 -0
- package/dist/src/skills/bundled/ai-elements/scripts/speech-input.tsx +85 -0
- package/dist/src/skills/bundled/ai-elements/scripts/stack-trace-collapsed.tsx +39 -0
- package/dist/src/skills/bundled/ai-elements/scripts/stack-trace-no-internal.tsx +41 -0
- package/dist/src/skills/bundled/ai-elements/scripts/stack-trace.tsx +60 -0
- package/dist/src/skills/bundled/ai-elements/scripts/suggestion-input.tsx +142 -0
- package/dist/src/skills/bundled/ai-elements/scripts/suggestion.tsx +34 -0
- package/dist/src/skills/bundled/ai-elements/scripts/task.tsx +59 -0
- package/dist/src/skills/bundled/ai-elements/scripts/terminal-basic.tsx +7 -0
- package/dist/src/skills/bundled/ai-elements/scripts/terminal-clear.tsx +19 -0
- package/dist/src/skills/bundled/ai-elements/scripts/terminal-streaming.tsx +38 -0
- package/dist/src/skills/bundled/ai-elements/scripts/terminal.tsx +83 -0
- package/dist/src/skills/bundled/ai-elements/scripts/test-results-basic.tsx +27 -0
- package/dist/src/skills/bundled/ai-elements/scripts/test-results-errors.tsx +51 -0
- package/dist/src/skills/bundled/ai-elements/scripts/test-results-suites.tsx +40 -0
- package/dist/src/skills/bundled/ai-elements/scripts/test-results.tsx +84 -0
- package/dist/src/skills/bundled/ai-elements/scripts/tool-input-available.tsx +31 -0
- package/dist/src/skills/bundled/ai-elements/scripts/tool-input-streaming.tsx +30 -0
- package/dist/src/skills/bundled/ai-elements/scripts/tool-output-available.tsx +81 -0
- package/dist/src/skills/bundled/ai-elements/scripts/tool-output-error.tsx +50 -0
- package/dist/src/skills/bundled/ai-elements/scripts/tool.tsx +210 -0
- package/dist/src/skills/bundled/ai-elements/scripts/transcription.tsx +289 -0
- package/dist/src/skills/bundled/ai-elements/scripts/voice-selector.tsx +233 -0
- package/dist/src/skills/bundled/ai-elements/scripts/web-preview.tsx +105 -0
- package/dist/src/skills/bundled/control-browser/SKILL.md +21 -0
- package/dist/src/skills/bundled/dynamic-workflows/SKILL.md +1520 -0
- package/dist/src/skills/bundled/dynamic-workflows/examples.md +801 -0
- package/dist/src/skills/bundled/dynamic-workflows/patterns.md +460 -0
- package/dist/src/skills/bundled/provenance.json +684 -0
- package/dist/src/skills/bundled/web-gui-tester/SKILL.md +159 -0
- package/dist/src/skills/project-skills.d.ts +11 -0
- package/dist/src/skills/project-skills.js +132 -0
- package/dist/src/skills/runtime-skills.d.ts +10 -0
- package/dist/src/skills/runtime-skills.js +237 -0
- package/dist/src/subagent-run.d.ts +278 -0
- package/dist/src/subagent-run.js +930 -0
- package/dist/src/telemetry/aggregate.d.ts +80 -0
- package/dist/src/telemetry/aggregate.js +217 -0
- package/dist/src/telemetry/capture-core.d.ts +190 -0
- package/dist/src/telemetry/capture-core.js +374 -0
- package/dist/src/telemetry/capture.d.ts +5 -0
- package/dist/src/telemetry/capture.js +16 -0
- package/dist/src/telemetry/classify.d.ts +102 -0
- package/dist/src/telemetry/classify.js +252 -0
- package/dist/src/telemetry/decision-capture.d.ts +13 -0
- package/dist/src/telemetry/decision-capture.js +40 -0
- package/dist/src/telemetry/emitter.d.ts +77 -0
- package/dist/src/telemetry/emitter.js +279 -0
- package/dist/src/telemetry/gate.d.ts +48 -0
- package/dist/src/telemetry/gate.js +55 -0
- package/dist/src/telemetry/identity.d.ts +19 -0
- package/dist/src/telemetry/identity.js +109 -0
- package/dist/src/telemetry/outbox.d.ts +91 -0
- package/dist/src/telemetry/outbox.js +356 -0
- package/dist/src/telemetry/schema.d.ts +184 -0
- package/dist/src/telemetry/schema.js +492 -0
- package/dist/src/telemetry/state.d.ts +90 -0
- package/dist/src/telemetry/state.js +195 -0
- package/dist/src/telemetry/surface.d.ts +76 -0
- package/dist/src/telemetry/surface.js +116 -0
- package/dist/src/telemetry/uploader.d.ts +29 -0
- package/dist/src/telemetry/uploader.js +151 -0
- package/dist/src/telemetry/uploads.d.ts +13 -0
- package/dist/src/telemetry/uploads.js +19 -0
- package/dist/src/telemetry/version.d.ts +5 -0
- package/dist/src/telemetry/version.js +25 -0
- package/dist/src/telemetry/workspace.d.ts +14 -0
- package/dist/src/telemetry/workspace.js +93 -0
- package/dist/src/terminal-ui.d.ts +744 -0
- package/dist/src/terminal-ui.js +3012 -0
- package/dist/src/text.d.ts +2 -0
- package/dist/src/text.js +8 -0
- package/dist/src/timers.d.ts +189 -0
- package/dist/src/timers.js +244 -0
- package/dist/src/todos.d.ts +12 -0
- package/dist/src/todos.js +33 -0
- package/dist/src/token-rate.d.ts +119 -0
- package/dist/src/token-rate.js +287 -0
- package/dist/src/tool-activity.d.ts +20 -0
- package/dist/src/tool-activity.js +76 -0
- package/dist/src/tool-call-clock.d.ts +32 -0
- package/dist/src/tool-call-clock.js +157 -0
- package/dist/src/tool-catalog.d.ts +40 -0
- package/dist/src/tool-catalog.js +100 -0
- package/dist/src/tool-dependencies.d.ts +23 -0
- package/dist/src/tool-dependencies.js +36 -0
- package/dist/src/tool-diff-stats.d.ts +24 -0
- package/dist/src/tool-diff-stats.js +122 -0
- package/dist/src/tool-errors.d.ts +12 -0
- package/dist/src/tool-errors.js +13 -0
- package/dist/src/tool-failure-tracker.d.ts +17 -0
- package/dist/src/tool-failure-tracker.js +71 -0
- package/dist/src/tool-names.d.ts +16 -0
- package/dist/src/tool-names.js +75 -0
- package/dist/src/tool-result-filter.d.ts +65 -0
- package/dist/src/tool-result-filter.js +447 -0
- package/dist/src/tool-schema-compatibility.d.ts +2 -0
- package/dist/src/tool-schema-compatibility.js +42 -0
- package/dist/src/tools.d.ts +3 -0
- package/dist/src/tools.js +663 -0
- package/dist/src/trajectory.d.ts +34 -0
- package/dist/src/trajectory.js +426 -0
- package/dist/src/transcript.d.ts +45 -0
- package/dist/src/transcript.js +228 -0
- package/dist/src/types.d.ts +248 -0
- package/dist/src/types.js +1 -0
- package/dist/src/update.d.ts +48 -0
- package/dist/src/update.js +614 -0
- package/dist/src/usage-analytics.d.ts +48 -0
- package/dist/src/usage-analytics.js +663 -0
- package/dist/src/widgets.d.ts +45 -0
- package/dist/src/widgets.js +71 -0
- package/dist/src/workspace-facts.d.ts +35 -0
- package/dist/src/workspace-facts.js +85 -0
- package/dist/src/workspace-git-metadata.d.ts +6 -0
- package/dist/src/workspace-git-metadata.js +114 -0
- package/dist/src/workspace-instructions.d.ts +7 -0
- package/dist/src/workspace-instructions.js +46 -0
- package/dist/vendor/engine/LICENSE.upstream +21 -0
- package/dist/vendor/engine/provenance.json +17923 -0
- package/dist/vendor/engine/runtime/agent/agent-loop.d.ts +23 -0
- package/dist/vendor/engine/runtime/agent/agent-loop.js +601 -0
- package/dist/vendor/engine/runtime/agent/agent.d.ts +130 -0
- package/dist/vendor/engine/runtime/agent/agent.js +430 -0
- package/dist/vendor/engine/runtime/agent/harness/agent-harness.d.ts +715 -0
- package/dist/vendor/engine/runtime/agent/harness/agent-harness.js +5 -0
- package/dist/vendor/engine/runtime/agent/harness/compaction/branch-summarization.d.ts +67 -0
- package/dist/vendor/engine/runtime/agent/harness/compaction/branch-summarization.js +175 -0
- package/dist/vendor/engine/runtime/agent/harness/compaction/compaction.d.ts +125 -0
- package/dist/vendor/engine/runtime/agent/harness/compaction/compaction.js +559 -0
- package/dist/vendor/engine/runtime/agent/harness/compaction/utils.d.ts +24 -0
- package/dist/vendor/engine/runtime/agent/harness/compaction/utils.js +119 -0
- package/dist/vendor/engine/runtime/agent/harness/config.d.ts +8 -0
- package/dist/vendor/engine/runtime/agent/harness/config.js +34 -0
- package/dist/vendor/engine/runtime/agent/harness/context.d.ts +8 -0
- package/dist/vendor/engine/runtime/agent/harness/context.js +12 -0
- package/dist/vendor/engine/runtime/agent/harness/events.d.ts +24 -0
- package/dist/vendor/engine/runtime/agent/harness/events.js +249 -0
- package/dist/vendor/engine/runtime/agent/harness/execution/assistant.d.ts +41 -0
- package/dist/vendor/engine/runtime/agent/harness/execution/assistant.js +81 -0
- package/dist/vendor/engine/runtime/agent/harness/execution/effect-gate.d.ts +21 -0
- package/dist/vendor/engine/runtime/agent/harness/execution/effect-gate.js +48 -0
- package/dist/vendor/engine/runtime/agent/harness/execution/tools.d.ts +66 -0
- package/dist/vendor/engine/runtime/agent/harness/execution/tools.js +118 -0
- package/dist/vendor/engine/runtime/agent/harness/hooks.d.ts +37 -0
- package/dist/vendor/engine/runtime/agent/harness/hooks.js +405 -0
- package/dist/vendor/engine/runtime/agent/harness/messages.d.ts +50 -0
- package/dist/vendor/engine/runtime/agent/harness/messages.js +102 -0
- package/dist/vendor/engine/runtime/agent/harness/prompt-templates.d.ts +48 -0
- package/dist/vendor/engine/runtime/agent/harness/prompt-templates.js +224 -0
- package/dist/vendor/engine/runtime/agent/harness/result.d.ts +132 -0
- package/dist/vendor/engine/runtime/agent/harness/result.js +80 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/boundary.d.ts +27 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/boundary.js +172 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/checkpoint.d.ts +7 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/checkpoint.js +132 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/deferred.d.ts +14 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/deferred.js +178 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/generation.d.ts +7 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/generation.js +204 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/reconcile.d.ts +4 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/reconcile.js +139 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/recovery.d.ts +7 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/recovery.js +84 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/response.d.ts +22 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/response.js +393 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/retry.d.ts +3 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/retry.js +33 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/structural.d.ts +31 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/structural.js +928 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/terminal.d.ts +6 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/terminal.js +48 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/tool-placement.d.ts +13 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/tool-placement.js +218 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/tools.d.ts +5 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive/tools.js +448 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive.d.ts +5 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/drive.js +92 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/harness.d.ts +58 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/harness.js +310 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/lane.d.ts +117 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/lane.js +1574 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/progress.d.ts +14 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/progress.js +65 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/reducer.d.ts +4 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/reducer.js +239 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/restore.d.ts +23 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/restore.js +116 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/transcript.d.ts +20 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/transcript.js +71 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/types.d.ts +104 -0
- package/dist/vendor/engine/runtime/agent/harness/runtime/types.js +60 -0
- package/dist/vendor/engine/runtime/agent/harness/session/commit.d.ts +52 -0
- package/dist/vendor/engine/runtime/agent/harness/session/commit.js +56 -0
- package/dist/vendor/engine/runtime/agent/harness/session/context.d.ts +9 -0
- package/dist/vendor/engine/runtime/agent/harness/session/context.js +48 -0
- package/dist/vendor/engine/runtime/agent/harness/session/fork-policy.d.ts +20 -0
- package/dist/vendor/engine/runtime/agent/harness/session/fork-policy.js +54 -0
- package/dist/vendor/engine/runtime/agent/harness/session/fork.d.ts +15 -0
- package/dist/vendor/engine/runtime/agent/harness/session/fork.js +78 -0
- package/dist/vendor/engine/runtime/agent/harness/session/in-memory-storage-state.d.ts +38 -0
- package/dist/vendor/engine/runtime/agent/harness/session/in-memory-storage-state.js +275 -0
- package/dist/vendor/engine/runtime/agent/harness/session/index.d.ts +10 -0
- package/dist/vendor/engine/runtime/agent/harness/session/index.js +8 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/codec.d.ts +20 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/codec.js +44 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/fork.d.ts +37 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/fork.js +263 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/index.d.ts +3 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/index.js +3 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/io.d.ts +13 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/io.js +85 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/legacy-v3.d.ts +43 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/legacy-v3.js +461 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/repo.d.ts +34 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/repo.js +300 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/storage.d.ts +40 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/storage.js +199 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/types.d.ts +38 -0
- package/dist/vendor/engine/runtime/agent/harness/session/jsonl/types.js +2 -0
- package/dist/vendor/engine/runtime/agent/harness/session/memory.d.ts +47 -0
- package/dist/vendor/engine/runtime/agent/harness/session/memory.js +368 -0
- package/dist/vendor/engine/runtime/agent/harness/session/mutation-line.d.ts +7 -0
- package/dist/vendor/engine/runtime/agent/harness/session/mutation-line.js +20 -0
- package/dist/vendor/engine/runtime/agent/harness/session/session.d.ts +81 -0
- package/dist/vendor/engine/runtime/agent/harness/session/session.js +360 -0
- package/dist/vendor/engine/runtime/agent/harness/session/types.d.ts +511 -0
- package/dist/vendor/engine/runtime/agent/harness/session/types.js +8 -0
- package/dist/vendor/engine/runtime/agent/harness/session/values.d.ts +94 -0
- package/dist/vendor/engine/runtime/agent/harness/session/values.js +80 -0
- package/dist/vendor/engine/runtime/agent/harness/skills.d.ts +45 -0
- package/dist/vendor/engine/runtime/agent/harness/skills.js +325 -0
- package/dist/vendor/engine/runtime/agent/harness/system-prompt.d.ts +2 -0
- package/dist/vendor/engine/runtime/agent/harness/system-prompt.js +29 -0
- package/dist/vendor/engine/runtime/agent/harness/telemetry.d.ts +1241 -0
- package/dist/vendor/engine/runtime/agent/harness/telemetry.js +526 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/bash.d.ts +26 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/bash.js +104 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/edit-diff.d.ts +88 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/edit-diff.js +385 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/edit.d.ts +18 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/edit.js +107 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/file-mutation-queue.d.ts +4 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/file-mutation-queue.js +45 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/image.d.ts +2 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/image.js +105 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/index.d.ts +5 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/index.js +4 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/path-utils.d.ts +4 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/path-utils.js +25 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/read.d.ts +34 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/read.js +107 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/tool-context.d.ts +5 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/tool-context.js +1 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/write.d.ts +10 -0
- package/dist/vendor/engine/runtime/agent/harness/tools/write.js +30 -0
- package/dist/vendor/engine/runtime/agent/harness/types.d.ts +304 -0
- package/dist/vendor/engine/runtime/agent/harness/types.js +74 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/adaptive-publisher.d.ts +23 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/adaptive-publisher.js +78 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/output-capture.d.ts +30 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/output-capture.js +216 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/shell-output.d.ts +28 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/shell-output.js +70 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/truncate.d.ts +70 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/truncate.js +295 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/usage.d.ts +3 -0
- package/dist/vendor/engine/runtime/agent/harness/utils/usage.js +32 -0
- package/dist/vendor/engine/runtime/agent/index.d.ts +27 -0
- package/dist/vendor/engine/runtime/agent/index.js +25 -0
- package/dist/vendor/engine/runtime/agent/proxy.d.ts +71 -0
- package/dist/vendor/engine/runtime/agent/proxy.js +309 -0
- package/dist/vendor/engine/runtime/agent/search/index.d.ts +28 -0
- package/dist/vendor/engine/runtime/agent/search/index.js +1 -0
- package/dist/vendor/engine/runtime/agent/stream-fn.d.ts +9 -0
- package/dist/vendor/engine/runtime/agent/stream-fn.js +16 -0
- package/dist/vendor/engine/runtime/agent/types.d.ts +431 -0
- package/dist/vendor/engine/runtime/agent/types.js +1 -0
- package/dist/vendor/engine/runtime/ai/api/anthropic-messages.d.ts +70 -0
- package/dist/vendor/engine/runtime/ai/api/anthropic-messages.js +1204 -0
- package/dist/vendor/engine/runtime/ai/api/anthropic-messages.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/anthropic-messages.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/azure-openai-responses.d.ts +16 -0
- package/dist/vendor/engine/runtime/ai/api/azure-openai-responses.js +260 -0
- package/dist/vendor/engine/runtime/ai/api/azure-openai-responses.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/azure-openai-responses.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/bedrock-converse-stream.d.ts +37 -0
- package/dist/vendor/engine/runtime/ai/api/bedrock-converse-stream.js +1091 -0
- package/dist/vendor/engine/runtime/ai/api/bedrock-converse-stream.lazy.d.ts +9 -0
- package/dist/vendor/engine/runtime/ai/api/bedrock-converse-stream.lazy.js +21 -0
- package/dist/vendor/engine/runtime/ai/api/constrained-sampling.d.ts +19 -0
- package/dist/vendor/engine/runtime/ai/api/constrained-sampling.js +221 -0
- package/dist/vendor/engine/runtime/ai/api/github-copilot-headers.d.ts +7 -0
- package/dist/vendor/engine/runtime/ai/api/github-copilot-headers.js +28 -0
- package/dist/vendor/engine/runtime/ai/api/google-generative-ai.d.ts +12 -0
- package/dist/vendor/engine/runtime/ai/api/google-generative-ai.js +368 -0
- package/dist/vendor/engine/runtime/ai/api/google-generative-ai.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/google-generative-ai.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/google-shared.d.ts +92 -0
- package/dist/vendor/engine/runtime/ai/api/google-shared.js +450 -0
- package/dist/vendor/engine/runtime/ai/api/google-vertex.d.ts +14 -0
- package/dist/vendor/engine/runtime/ai/api/google-vertex.js +429 -0
- package/dist/vendor/engine/runtime/ai/api/google-vertex.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/google-vertex.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/lazy.d.ts +24 -0
- package/dist/vendor/engine/runtime/ai/api/lazy.js +69 -0
- package/dist/vendor/engine/runtime/ai/api/mistral-conversations.d.ts +24 -0
- package/dist/vendor/engine/runtime/ai/api/mistral-conversations.js +747 -0
- package/dist/vendor/engine/runtime/ai/api/mistral-conversations.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/mistral-conversations.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/openai-codex-responses.d.ts +30 -0
- package/dist/vendor/engine/runtime/ai/api/openai-codex-responses.js +1302 -0
- package/dist/vendor/engine/runtime/ai/api/openai-codex-responses.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/openai-codex-responses.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/openai-completions.d.ts +25 -0
- package/dist/vendor/engine/runtime/ai/api/openai-completions.js +1339 -0
- package/dist/vendor/engine/runtime/ai/api/openai-completions.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/openai-completions.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/openai-prompt-cache.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/openai-prompt-cache.js +9 -0
- package/dist/vendor/engine/runtime/ai/api/openai-responses-shared.d.ts +27 -0
- package/dist/vendor/engine/runtime/ai/api/openai-responses-shared.js +688 -0
- package/dist/vendor/engine/runtime/ai/api/openai-responses.d.ts +13 -0
- package/dist/vendor/engine/runtime/ai/api/openai-responses.js +292 -0
- package/dist/vendor/engine/runtime/ai/api/openai-responses.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/openai-responses.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/openrouter-images.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/openrouter-images.js +131 -0
- package/dist/vendor/engine/runtime/ai/api/openrouter-images.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/openrouter-images.lazy.js +3 -0
- package/dist/vendor/engine/runtime/ai/api/pi-messages.d.ts +98 -0
- package/dist/vendor/engine/runtime/ai/api/pi-messages.js +312 -0
- package/dist/vendor/engine/runtime/ai/api/pi-messages.lazy.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/api/pi-messages.lazy.js +2 -0
- package/dist/vendor/engine/runtime/ai/api/simple-options.d.ts +14 -0
- package/dist/vendor/engine/runtime/ai/api/simple-options.js +65 -0
- package/dist/vendor/engine/runtime/ai/api/transform-messages.d.ts +7 -0
- package/dist/vendor/engine/runtime/ai/api/transform-messages.js +200 -0
- package/dist/vendor/engine/runtime/ai/auth/context.d.ts +6 -0
- package/dist/vendor/engine/runtime/ai/auth/context.js +33 -0
- package/dist/vendor/engine/runtime/ai/auth/credential-store.d.ts +16 -0
- package/dist/vendor/engine/runtime/ai/auth/credential-store.js +50 -0
- package/dist/vendor/engine/runtime/ai/auth/helpers.d.ts +21 -0
- package/dist/vendor/engine/runtime/ai/auth/helpers.js +52 -0
- package/dist/vendor/engine/runtime/ai/auth/oauth/load.d.ts +28 -0
- package/dist/vendor/engine/runtime/ai/auth/oauth/load.js +55 -0
- package/dist/vendor/engine/runtime/ai/auth/resolve.d.ts +26 -0
- package/dist/vendor/engine/runtime/ai/auth/resolve.js +131 -0
- package/dist/vendor/engine/runtime/ai/auth/types.d.ts +230 -0
- package/dist/vendor/engine/runtime/ai/auth/types.js +1 -0
- package/dist/vendor/engine/runtime/ai/compat/extension-oauth-types.d.ts +38 -0
- package/dist/vendor/engine/runtime/ai/compat/extension-oauth-types.js +1 -0
- package/dist/vendor/engine/runtime/ai/compat.d.ts +66 -0
- package/dist/vendor/engine/runtime/ai/compat.js +201 -0
- package/dist/vendor/engine/runtime/ai/env-api-keys.d.ts +20 -0
- package/dist/vendor/engine/runtime/ai/env-api-keys.js +148 -0
- package/dist/vendor/engine/runtime/ai/image-models.d.ts +9 -0
- package/dist/vendor/engine/runtime/ai/image-models.generated.d.ts +814 -0
- package/dist/vendor/engine/runtime/ai/image-models.generated.js +816 -0
- package/dist/vendor/engine/runtime/ai/image-models.js +22 -0
- package/dist/vendor/engine/runtime/ai/images-api-registry.d.ts +13 -0
- package/dist/vendor/engine/runtime/ai/images-api-registry.js +21 -0
- package/dist/vendor/engine/runtime/ai/images-models.d.ts +94 -0
- package/dist/vendor/engine/runtime/ai/images-models.js +142 -0
- package/dist/vendor/engine/runtime/ai/images.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/images.js +13 -0
- package/dist/vendor/engine/runtime/ai/index.d.ts +36 -0
- package/dist/vendor/engine/runtime/ai/index.js +23 -0
- package/dist/vendor/engine/runtime/ai/legacy-api-aliases.d.ts +41 -0
- package/dist/vendor/engine/runtime/ai/legacy-api-aliases.js +48 -0
- package/dist/vendor/engine/runtime/ai/model-catalog.d.ts +16 -0
- package/dist/vendor/engine/runtime/ai/model-catalog.js +3 -0
- package/dist/vendor/engine/runtime/ai/models-store.d.ts +28 -0
- package/dist/vendor/engine/runtime/ai/models-store.js +16 -0
- package/dist/vendor/engine/runtime/ai/models.d.ts +201 -0
- package/dist/vendor/engine/runtime/ai/models.generated.d.ts +84 -0
- package/dist/vendor/engine/runtime/ai/models.generated.js +86 -0
- package/dist/vendor/engine/runtime/ai/models.js +593 -0
- package/dist/vendor/engine/runtime/ai/oauth.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/oauth.js +1 -0
- package/dist/vendor/engine/runtime/ai/providers/all.d.ts +27 -0
- package/dist/vendor/engine/runtime/ai/providers/all.js +132 -0
- package/dist/vendor/engine/runtime/ai/providers/amazon-bedrock.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/amazon-bedrock.js +92 -0
- package/dist/vendor/engine/runtime/ai/providers/amazon-bedrock.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/amazon-bedrock.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/ant-ling.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/ant-ling.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/ant-ling.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/ant-ling.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/anthropic.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/anthropic.js +55 -0
- package/dist/vendor/engine/runtime/ai/providers/anthropic.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/anthropic.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/azure-openai-responses.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/azure-openai-responses.js +13 -0
- package/dist/vendor/engine/runtime/ai/providers/azure-openai-responses.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/azure-openai-responses.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/baseten.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/baseten.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/baseten.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/baseten.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/cerebras.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/cerebras.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/cerebras.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/cerebras.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-ai-gateway.d.ts +4 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-ai-gateway.js +24 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-ai-gateway.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-ai-gateway.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-auth.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-auth.js +85 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-stream.d.ts +7 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-stream.js +20 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-workers-ai.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-workers-ai.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-workers-ai.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/cloudflare-workers-ai.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/data/.manifest.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/amazon-bedrock.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/ant-ling.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/anthropic.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/azure-openai-responses.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/baseten.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/cerebras.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/cloudflare-ai-gateway.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/cloudflare-workers-ai.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/deepseek.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/fireworks.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/github-copilot.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/google-vertex.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/google.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/groq.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/huggingface.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/kimi-coding.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/meta.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/minimax-cn.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/minimax.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/mistral.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/moonshotai-cn.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/moonshotai.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/nvidia.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/openai-codex.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/openai.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/opencode-go.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/opencode.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/openrouter.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/qwen-token-plan-cn.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/qwen-token-plan-individual.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/qwen-token-plan.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/radius.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/together.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/vercel-ai-gateway.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/xai.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/xiaomi-token-plan-ams.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/xiaomi-token-plan-cn.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/xiaomi-token-plan-sgp.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/xiaomi.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/zai-coding-cn.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/data/zai.json +1 -0
- package/dist/vendor/engine/runtime/ai/providers/deepseek.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/deepseek.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/deepseek.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/deepseek.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/faux.d.ts +102 -0
- package/dist/vendor/engine/runtime/ai/providers/faux.js +488 -0
- package/dist/vendor/engine/runtime/ai/providers/fireworks.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/fireworks.js +18 -0
- package/dist/vendor/engine/runtime/ai/providers/fireworks.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/fireworks.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/github-copilot.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/github-copilot.js +34 -0
- package/dist/vendor/engine/runtime/ai/providers/github-copilot.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/github-copilot.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/google-vertex.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/google-vertex.js +93 -0
- package/dist/vendor/engine/runtime/ai/providers/google-vertex.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/google-vertex.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/google.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/google.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/google.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/google.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/groq.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/groq.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/groq.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/groq.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/huggingface.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/huggingface.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/huggingface.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/huggingface.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/images/register-builtins.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/images/register-builtins.js +33 -0
- package/dist/vendor/engine/runtime/ai/providers/kimi-coding.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/kimi-coding.js +23 -0
- package/dist/vendor/engine/runtime/ai/providers/kimi-coding.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/kimi-coding.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/meta.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/meta.js +23 -0
- package/dist/vendor/engine/runtime/ai/providers/meta.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/meta.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/minimax-cn.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/minimax-cn.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/minimax-cn.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/minimax-cn.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/minimax.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/minimax.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/minimax.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/minimax.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/mistral.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/mistral.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/mistral.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/mistral.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/moonshotai-cn.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/moonshotai-cn.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/moonshotai-cn.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/moonshotai-cn.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/moonshotai.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/moonshotai.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/moonshotai.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/moonshotai.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/nvidia.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/nvidia.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/nvidia.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/nvidia.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/openai-codex.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/openai-codex.js +21 -0
- package/dist/vendor/engine/runtime/ai/providers/openai-codex.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/openai-codex.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/openai.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/openai.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/openai.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/openai.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode-go.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode-go.js +20 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode-go.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode-go.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode-headers.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode-headers.js +21 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode.js +22 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/opencode.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/openrouter-images.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/openrouter-images.js +21 -0
- package/dist/vendor/engine/runtime/ai/providers/openrouter.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/openrouter.js +26 -0
- package/dist/vendor/engine/runtime/ai/providers/openrouter.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/openrouter.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-cn.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-cn.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-cn.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-cn.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-individual.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-individual.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-individual.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan-individual.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/qwen-token-plan.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/radius-config.d.ts +25 -0
- package/dist/vendor/engine/runtime/ai/providers/radius-config.js +62 -0
- package/dist/vendor/engine/runtime/ai/providers/radius.d.ts +8 -0
- package/dist/vendor/engine/runtime/ai/providers/radius.js +77 -0
- package/dist/vendor/engine/runtime/ai/providers/radius.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/radius.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/together.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/together.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/together.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/together.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/vercel-ai-gateway.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/vercel-ai-gateway.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/vercel-ai-gateway.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/vercel-ai-gateway.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/xai.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/xai.js +23 -0
- package/dist/vendor/engine/runtime/ai/providers/xai.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/xai.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-ams.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-ams.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-ams.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-ams.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-cn.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-cn.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-cn.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-cn.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-sgp.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-sgp.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-sgp.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi-token-plan-sgp.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/xiaomi.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/zai-coding-cn.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/zai-coding-cn.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/zai-coding-cn.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/zai-coding-cn.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/providers/zai.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/providers/zai.js +14 -0
- package/dist/vendor/engine/runtime/ai/providers/zai.models.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/providers/zai.models.js +5 -0
- package/dist/vendor/engine/runtime/ai/session-resources.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/session-resources.js +21 -0
- package/dist/vendor/engine/runtime/ai/types.d.ts +835 -0
- package/dist/vendor/engine/runtime/ai/types.js +1 -0
- package/dist/vendor/engine/runtime/ai/utils/abort-signals.d.ts +5 -0
- package/dist/vendor/engine/runtime/ai/utils/abort-signals.js +33 -0
- package/dist/vendor/engine/runtime/ai/utils/abort.d.ts +7 -0
- package/dist/vendor/engine/runtime/ai/utils/abort.js +48 -0
- package/dist/vendor/engine/runtime/ai/utils/assistant-message-frame.d.ts +76 -0
- package/dist/vendor/engine/runtime/ai/utils/assistant-message-frame.js +424 -0
- package/dist/vendor/engine/runtime/ai/utils/diagnostics.d.ts +19 -0
- package/dist/vendor/engine/runtime/ai/utils/diagnostics.js +24 -0
- package/dist/vendor/engine/runtime/ai/utils/error-body.d.ts +24 -0
- package/dist/vendor/engine/runtime/ai/utils/error-body.js +132 -0
- package/dist/vendor/engine/runtime/ai/utils/estimate.d.ts +16 -0
- package/dist/vendor/engine/runtime/ai/utils/estimate.js +94 -0
- package/dist/vendor/engine/runtime/ai/utils/event-stream.d.ts +20 -0
- package/dist/vendor/engine/runtime/ai/utils/event-stream.js +98 -0
- package/dist/vendor/engine/runtime/ai/utils/hash.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/utils/hash.js +13 -0
- package/dist/vendor/engine/runtime/ai/utils/headers.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/utils/headers.js +17 -0
- package/dist/vendor/engine/runtime/ai/utils/json-parse.d.ts +15 -0
- package/dist/vendor/engine/runtime/ai/utils/json-parse.js +112 -0
- package/dist/vendor/engine/runtime/ai/utils/node-http-proxy.d.ts +3 -0
- package/dist/vendor/engine/runtime/ai/utils/node-http-proxy.js +132 -0
- package/dist/vendor/engine/runtime/ai/utils/overflow.d.ts +68 -0
- package/dist/vendor/engine/runtime/ai/utils/overflow.js +177 -0
- package/dist/vendor/engine/runtime/ai/utils/pi-user-agent.d.ts +1 -0
- package/dist/vendor/engine/runtime/ai/utils/pi-user-agent.js +11 -0
- package/dist/vendor/engine/runtime/ai/utils/provider-env.d.ts +6 -0
- package/dist/vendor/engine/runtime/ai/utils/provider-env.js +43 -0
- package/dist/vendor/engine/runtime/ai/utils/provider-retry.d.ts +15 -0
- package/dist/vendor/engine/runtime/ai/utils/provider-retry.js +93 -0
- package/dist/vendor/engine/runtime/ai/utils/retry.d.ts +57 -0
- package/dist/vendor/engine/runtime/ai/utils/retry.js +182 -0
- package/dist/vendor/engine/runtime/ai/utils/sanitize-unicode.d.ts +21 -0
- package/dist/vendor/engine/runtime/ai/utils/sanitize-unicode.js +25 -0
- package/dist/vendor/engine/runtime/ai/utils/text.d.ts +13 -0
- package/dist/vendor/engine/runtime/ai/utils/text.js +35 -0
- package/dist/vendor/engine/runtime/ai/utils/transcript.d.ts +83 -0
- package/dist/vendor/engine/runtime/ai/utils/transcript.js +203 -0
- package/dist/vendor/engine/runtime/ai/utils/typebox-helpers.d.ts +16 -0
- package/dist/vendor/engine/runtime/ai/utils/typebox-helpers.js +20 -0
- package/dist/vendor/engine/runtime/ai/utils/uuid.d.ts +2 -0
- package/dist/vendor/engine/runtime/ai/utils/uuid.js +41 -0
- package/dist/vendor/engine/runtime/ai/utils/validation.d.ts +17 -0
- package/dist/vendor/engine/runtime/ai/utils/validation.js +308 -0
- package/dist/vendor/engine/runtime/chord/api.d.ts +14 -0
- package/dist/vendor/engine/runtime/chord/api.js +71 -0
- package/dist/vendor/engine/runtime/chord/context/index.d.ts +23 -0
- package/dist/vendor/engine/runtime/chord/context/index.js +96 -0
- package/dist/vendor/engine/runtime/chord/delta/index.d.ts +118 -0
- package/dist/vendor/engine/runtime/chord/delta/index.js +1903 -0
- package/dist/vendor/engine/runtime/chord/facets/host.d.ts +11 -0
- package/dist/vendor/engine/runtime/chord/facets/host.js +762 -0
- package/dist/vendor/engine/runtime/chord/facets/loader.d.ts +2 -0
- package/dist/vendor/engine/runtime/chord/facets/loader.js +4 -0
- package/dist/vendor/engine/runtime/chord/index.d.ts +10 -0
- package/dist/vendor/engine/runtime/chord/index.js +9 -0
- package/dist/vendor/engine/runtime/chord/json.d.ts +3 -0
- package/dist/vendor/engine/runtime/chord/json.js +56 -0
- package/dist/vendor/engine/runtime/chord/services/consumer.d.ts +10 -0
- package/dist/vendor/engine/runtime/chord/services/consumer.js +536 -0
- package/dist/vendor/engine/runtime/chord/services/errors.d.ts +7 -0
- package/dist/vendor/engine/runtime/chord/services/errors.js +21 -0
- package/dist/vendor/engine/runtime/chord/services/handle.d.ts +14 -0
- package/dist/vendor/engine/runtime/chord/services/handle.js +100 -0
- package/dist/vendor/engine/runtime/chord/services/instances.d.ts +24 -0
- package/dist/vendor/engine/runtime/chord/services/instances.js +136 -0
- package/dist/vendor/engine/runtime/chord/services/loopback.d.ts +4 -0
- package/dist/vendor/engine/runtime/chord/services/loopback.js +14 -0
- package/dist/vendor/engine/runtime/chord/services/provider.d.ts +36 -0
- package/dist/vendor/engine/runtime/chord/services/provider.js +471 -0
- package/dist/vendor/engine/runtime/chord/services/state-codec.d.ts +14 -0
- package/dist/vendor/engine/runtime/chord/services/state-codec.js +114 -0
- package/dist/vendor/engine/runtime/chord/services/state-internals.d.ts +10 -0
- package/dist/vendor/engine/runtime/chord/services/state-internals.js +9 -0
- package/dist/vendor/engine/runtime/chord/services/state.d.ts +22 -0
- package/dist/vendor/engine/runtime/chord/services/state.js +123 -0
- package/dist/vendor/engine/runtime/chord/services/wire.d.ts +59 -0
- package/dist/vendor/engine/runtime/chord/services/wire.js +172 -0
- package/dist/vendor/engine/runtime/chord/types.d.ts +202 -0
- package/dist/vendor/engine/runtime/chord/types.js +1 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/args.d.ts +60 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/args.js +439 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/auth-check.d.ts +18 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/auth-check.js +49 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/auth-command.d.ts +23 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/auth-command.js +102 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/config-selector.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/config-selector.js +31 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/credential-print.d.ts +12 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/credential-print.js +75 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/file-processor.d.ts +14 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/file-processor.js +70 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/initial-message.d.ts +17 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/initial-message.js +21 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/list-models.d.ts +8 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/list-models.js +97 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/project-trust.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/project-trust.js +47 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/session-picker.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/session-picker.js +35 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/startup-ui.d.ts +19 -0
- package/dist/vendor/engine/runtime/coding-agent/cli/startup-ui.js +184 -0
- package/dist/vendor/engine/runtime/coding-agent/config.d.ts +97 -0
- package/dist/vendor/engine/runtime/coding-agent/config.js +463 -0
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session-runtime.d.ts +118 -0
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session-runtime.js +316 -0
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session-services.d.ts +85 -0
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session-services.js +133 -0
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session.d.ts +771 -0
- package/dist/vendor/engine/runtime/coding-agent/core/agent-session.js +2990 -0
- package/dist/vendor/engine/runtime/coding-agent/core/auth-guidance.d.ts +4 -0
- package/dist/vendor/engine/runtime/coding-agent/core/auth-guidance.js +20 -0
- package/dist/vendor/engine/runtime/coding-agent/core/auth-storage.d.ts +71 -0
- package/dist/vendor/engine/runtime/coding-agent/core/auth-storage.js +425 -0
- package/dist/vendor/engine/runtime/coding-agent/core/bash-executor.d.ts +31 -0
- package/dist/vendor/engine/runtime/coding-agent/core/bash-executor.js +110 -0
- package/dist/vendor/engine/runtime/coding-agent/core/bug-report-upload.d.ts +11 -0
- package/dist/vendor/engine/runtime/coding-agent/core/bug-report-upload.js +21 -0
- package/dist/vendor/engine/runtime/coding-agent/core/bug-report.d.ts +175 -0
- package/dist/vendor/engine/runtime/coding-agent/core/bug-report.js +291 -0
- package/dist/vendor/engine/runtime/coding-agent/core/cache-stats.d.ts +48 -0
- package/dist/vendor/engine/runtime/coding-agent/core/cache-stats.js +111 -0
- package/dist/vendor/engine/runtime/coding-agent/core/cache-warmer.d.ts +102 -0
- package/dist/vendor/engine/runtime/coding-agent/core/cache-warmer.js +355 -0
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/branch-summarization.d.ts +97 -0
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/branch-summarization.js +250 -0
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/compaction.d.ts +142 -0
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/compaction.js +666 -0
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/index.d.ts +6 -0
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/index.js +6 -0
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/utils.d.ts +37 -0
- package/dist/vendor/engine/runtime/coding-agent/core/compaction/utils.js +141 -0
- package/dist/vendor/engine/runtime/coding-agent/core/crash-log.d.ts +26 -0
- package/dist/vendor/engine/runtime/coding-agent/core/crash-log.js +138 -0
- package/dist/vendor/engine/runtime/coding-agent/core/defaults.d.ts +3 -0
- package/dist/vendor/engine/runtime/coding-agent/core/defaults.js +10 -0
- package/dist/vendor/engine/runtime/coding-agent/core/diagnostics.d.ts +14 -0
- package/dist/vendor/engine/runtime/coding-agent/core/diagnostics.js +1 -0
- package/dist/vendor/engine/runtime/coding-agent/core/event-bus.d.ts +8 -0
- package/dist/vendor/engine/runtime/coding-agent/core/event-bus.js +24 -0
- package/dist/vendor/engine/runtime/coding-agent/core/exec.d.ts +28 -0
- package/dist/vendor/engine/runtime/coding-agent/core/exec.js +74 -0
- package/dist/vendor/engine/runtime/coding-agent/core/experimental.d.ts +1 -0
- package/dist/vendor/engine/runtime/coding-agent/core/experimental.js +3 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/ansi-to-html.d.ts +21 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/ansi-to-html.js +248 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/index.d.ts +36 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/index.js +225 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/template.css +1066 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/template.html +55 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/template.js +1864 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/tool-renderer.d.ts +33 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/tool-renderer.js +107 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/vendor/engine/runtime/coding-agent/core/export-html/vendor/marked.min.js +78 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/index.d.ts +11 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/index.js +8 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/jiti-loader.d.ts +1 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/jiti-loader.js +3 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/jiti-static-loader.d.ts +1 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/jiti-static-loader.js +3 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/loader.d.ts +22 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/loader.js +633 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/runner.d.ts +180 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/runner.js +1028 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/types.d.ts +1362 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/types.js +47 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/virtual-modules.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/virtual-modules.js +37 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/wrapper.d.ts +19 -0
- package/dist/vendor/engine/runtime/coding-agent/core/extensions/wrapper.js +21 -0
- package/dist/vendor/engine/runtime/coding-agent/core/footer-data-provider.d.ts +63 -0
- package/dist/vendor/engine/runtime/coding-agent/core/footer-data-provider.js +337 -0
- package/dist/vendor/engine/runtime/coding-agent/core/http-dispatcher.d.ts +21 -0
- package/dist/vendor/engine/runtime/coding-agent/core/http-dispatcher.js +97 -0
- package/dist/vendor/engine/runtime/coding-agent/core/keybindings.d.ts +427 -0
- package/dist/vendor/engine/runtime/coding-agent/core/keybindings.js +320 -0
- package/dist/vendor/engine/runtime/coding-agent/core/messages.d.ts +76 -0
- package/dist/vendor/engine/runtime/coding-agent/core/messages.js +123 -0
- package/dist/vendor/engine/runtime/coding-agent/core/model-config.d.ts +723 -0
- package/dist/vendor/engine/runtime/coding-agent/core/model-config.js +281 -0
- package/dist/vendor/engine/runtime/coding-agent/core/model-registry.d.ts +48 -0
- package/dist/vendor/engine/runtime/coding-agent/core/model-registry.js +114 -0
- package/dist/vendor/engine/runtime/coding-agent/core/model-resolver.d.ts +123 -0
- package/dist/vendor/engine/runtime/coding-agent/core/model-resolver.js +589 -0
- package/dist/vendor/engine/runtime/coding-agent/core/model-runtime.d.ts +100 -0
- package/dist/vendor/engine/runtime/coding-agent/core/model-runtime.js +603 -0
- package/dist/vendor/engine/runtime/coding-agent/core/models-store.d.ts +21 -0
- package/dist/vendor/engine/runtime/coding-agent/core/models-store.js +114 -0
- package/dist/vendor/engine/runtime/coding-agent/core/output-guard.d.ts +6 -0
- package/dist/vendor/engine/runtime/coding-agent/core/output-guard.js +88 -0
- package/dist/vendor/engine/runtime/coding-agent/core/package-manager.d.ts +212 -0
- package/dist/vendor/engine/runtime/coding-agent/core/package-manager.js +2176 -0
- package/dist/vendor/engine/runtime/coding-agent/core/pi-manifest.d.ts +7 -0
- package/dist/vendor/engine/runtime/coding-agent/core/pi-manifest.js +25 -0
- package/dist/vendor/engine/runtime/coding-agent/core/project-trust.d.ts +14 -0
- package/dist/vendor/engine/runtime/coding-agent/core/project-trust.js +58 -0
- package/dist/vendor/engine/runtime/coding-agent/core/prompt-templates.d.ts +53 -0
- package/dist/vendor/engine/runtime/coding-agent/core/prompt-templates.js +235 -0
- package/dist/vendor/engine/runtime/coding-agent/core/provider-attribution.d.ts +3 -0
- package/dist/vendor/engine/runtime/coding-agent/core/provider-attribution.js +71 -0
- package/dist/vendor/engine/runtime/coding-agent/core/provider-composer.d.ts +59 -0
- package/dist/vendor/engine/runtime/coding-agent/core/provider-composer.js +422 -0
- package/dist/vendor/engine/runtime/coding-agent/core/radius.d.ts +4 -0
- package/dist/vendor/engine/runtime/coding-agent/core/radius.js +7 -0
- package/dist/vendor/engine/runtime/coding-agent/core/remote-catalog-provider.d.ts +4 -0
- package/dist/vendor/engine/runtime/coding-agent/core/remote-catalog-provider.js +121 -0
- package/dist/vendor/engine/runtime/coding-agent/core/resolve-config-value.d.ts +29 -0
- package/dist/vendor/engine/runtime/coding-agent/core/resolve-config-value.js +246 -0
- package/dist/vendor/engine/runtime/coding-agent/core/resource-loader.d.ts +220 -0
- package/dist/vendor/engine/runtime/coding-agent/core/resource-loader.js +874 -0
- package/dist/vendor/engine/runtime/coding-agent/core/runtime-credentials.d.ts +14 -0
- package/dist/vendor/engine/runtime/coding-agent/core/runtime-credentials.js +38 -0
- package/dist/vendor/engine/runtime/coding-agent/core/sdk.d.ts +107 -0
- package/dist/vendor/engine/runtime/coding-agent/core/sdk.js +296 -0
- package/dist/vendor/engine/runtime/coding-agent/core/session-cwd.d.ts +18 -0
- package/dist/vendor/engine/runtime/coding-agent/core/session-cwd.js +37 -0
- package/dist/vendor/engine/runtime/coding-agent/core/session-export.d.ts +7 -0
- package/dist/vendor/engine/runtime/coding-agent/core/session-export.js +32 -0
- package/dist/vendor/engine/runtime/coding-agent/core/session-manager.d.ts +379 -0
- package/dist/vendor/engine/runtime/coding-agent/core/session-manager.js +1432 -0
- package/dist/vendor/engine/runtime/coding-agent/core/settings-diagnostics.d.ts +8 -0
- package/dist/vendor/engine/runtime/coding-agent/core/settings-diagnostics.js +20 -0
- package/dist/vendor/engine/runtime/coding-agent/core/settings-manager.d.ts +346 -0
- package/dist/vendor/engine/runtime/coding-agent/core/settings-manager.js +1032 -0
- package/dist/vendor/engine/runtime/coding-agent/core/skills.d.ts +59 -0
- package/dist/vendor/engine/runtime/coding-agent/core/skills.js +406 -0
- package/dist/vendor/engine/runtime/coding-agent/core/slash-commands.d.ts +14 -0
- package/dist/vendor/engine/runtime/coding-agent/core/slash-commands.js +27 -0
- package/dist/vendor/engine/runtime/coding-agent/core/source-info.d.ts +17 -0
- package/dist/vendor/engine/runtime/coding-agent/core/source-info.js +18 -0
- package/dist/vendor/engine/runtime/coding-agent/core/system-prompt.d.ts +70 -0
- package/dist/vendor/engine/runtime/coding-agent/core/system-prompt.js +146 -0
- package/dist/vendor/engine/runtime/coding-agent/core/telemetry.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/core/telemetry.js +8 -0
- package/dist/vendor/engine/runtime/coding-agent/core/timings.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/core/timings.js +40 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/bash.d.ts +89 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/bash.js +303 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/edit-diff.d.ts +100 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/edit-diff.js +420 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/edit.d.ts +43 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/edit.js +146 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/file-mutation-queue.d.ts +5 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/file-mutation-queue.js +51 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/find.d.ts +41 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/find.js +250 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/grep.d.ts +40 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/grep.js +251 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/index.d.ts +42 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/index.js +128 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/ls.d.ts +40 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/ls.js +125 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/output-accumulator.d.ts +54 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/output-accumulator.js +189 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/path-utils.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/path-utils.js +98 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/powershell.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/powershell.js +38 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/read.d.ts +41 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/read.js +168 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/render-utils.d.ts +23 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/render-utils.js +64 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/bash.d.ts +11 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/bash.js +137 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/edit.d.ts +22 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/edit.js +166 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/find.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/find.js +63 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/grep.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/grep.js +68 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/index.d.ts +27 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/index.js +46 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/ls.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/ls.js +57 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/read.d.ts +10 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/read.js +128 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/write.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/renderers/write.js +152 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/tool-definition-wrapper.d.ts +13 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/tool-definition-wrapper.js +35 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/truncate.d.ts +69 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/truncate.js +214 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/write.d.ts +29 -0
- package/dist/vendor/engine/runtime/coding-agent/core/tools/write.js +60 -0
- package/dist/vendor/engine/runtime/coding-agent/core/trust-manager.d.ts +35 -0
- package/dist/vendor/engine/runtime/coding-agent/core/trust-manager.js +202 -0
- package/dist/vendor/engine/runtime/coding-agent/core/usage-totals.d.ts +18 -0
- package/dist/vendor/engine/runtime/coding-agent/core/usage-totals.js +55 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/index.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/index.js +2 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/client.d.ts +68 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/client.js +312 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/huggingface.d.ts +22 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/huggingface.js +140 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/index.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/index.js +218 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/provider.d.ts +11 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/provider.js +160 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/ui.d.ts +41 -0
- package/dist/vendor/engine/runtime/coding-agent/extensions/llama/ui.js +415 -0
- package/dist/vendor/engine/runtime/coding-agent/index.d.ts +36 -0
- package/dist/vendor/engine/runtime/coding-agent/index.js +47 -0
- package/dist/vendor/engine/runtime/coding-agent/main.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/main.js +808 -0
- package/dist/vendor/engine/runtime/coding-agent/migrations.d.ts +32 -0
- package/dist/vendor/engine/runtime/coding-agent/migrations.js +281 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/index.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/index.js +7 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/bug-report.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/bug-report.js +209 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/chat-viewport.d.ts +19 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/chat-viewport.js +27 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/armin.d.ts +33 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/armin.js +332 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/assistant-message.d.ts +25 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/assistant-message.js +157 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/bash-execution.d.ts +33 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/bash-execution.js +174 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/bordered-loader.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/bordered-loader.js +53 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/branch-summary-message.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/branch-summary-message.js +50 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/compaction-summary-message.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/compaction-summary-message.js +51 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/config-selector.d.ts +101 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/config-selector.js +760 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/countdown-timer.d.ts +13 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/countdown-timer.js +32 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-editor.d.ts +29 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-editor.js +114 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-entry.d.ts +18 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-entry.js +51 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-message.d.ts +21 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/custom-message.js +86 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/daxnuts.d.ts +22 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/daxnuts.js +139 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/diff.d.ts +11 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/diff.js +132 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/dynamic-border.d.ts +14 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/dynamic-border.js +20 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/earendil-announcement.d.ts +4 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/earendil-announcement.js +39 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-editor.d.ts +23 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-editor.js +102 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-input.d.ts +24 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-input.js +66 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-selector.d.ts +26 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/extension-selector.js +86 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/first-time-setup.d.ts +24 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/first-time-setup.js +102 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/footer.d.ts +31 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/footer.js +224 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/index.d.ts +33 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/index.js +34 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/keybinding-hints.d.ts +12 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/keybinding-hints.js +35 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/login-dialog.d.ts +51 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/login-dialog.js +187 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/markdown-transform.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/markdown-transform.js +18 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/mermaid.d.ts +10 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/mermaid.js +74 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/model-selector.d.ts +59 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/model-selector.js +360 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/oauth-selector.d.ts +32 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/oauth-selector.js +162 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/scoped-models-selector.d.ts +45 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/scoped-models-selector.js +325 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/session-selector-search.d.ts +22 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/session-selector-search.js +154 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/session-selector.d.ts +94 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/session-selector.js +892 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/settings-selector.d.ts +93 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/settings-selector.js +719 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/settings-submenu.d.ts +71 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/settings-submenu.js +164 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/show-images-selector.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/show-images-selector.js +38 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/skill-invocation-message.d.ts +16 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/skill-invocation-message.js +53 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/status-indicator.d.ts +29 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/status-indicator.js +66 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/theme-selector.d.ts +10 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/theme-selector.js +49 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/thinking-selector.d.ts +22 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/thinking-selector.js +108 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/tool-execution.d.ts +79 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/tool-execution.js +336 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/tree-selector.d.ts +93 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/tree-selector.js +1246 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/trust-selector.d.ts +22 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/trust-selector.js +90 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/user-message-selector.d.ts +29 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/user-message-selector.js +113 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/user-message.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/user-message.js +48 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/visual-truncate.d.ts +23 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/components/visual-truncate.js +32 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/external-editor.d.ts +11 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/external-editor.js +37 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/interactive-mode.d.ts +467 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/interactive-mode.js +5720 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/model-catalog-refresh.d.ts +6 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/model-catalog-refresh.js +33 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/model-search.d.ts +11 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/model-search.js +14 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/session-share.d.ts +17 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/session-share.js +187 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/dark.json +91 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/light.json +90 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-controller.d.ts +40 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-controller.js +129 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-json.d.ts +83 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-json.js +129 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme-schema.json +356 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme.d.ts +130 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/theme/theme.js +990 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/tui-renderer.d.ts +20 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/interactive/tui-renderer.js +65 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/json-event.d.ts +33 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/json-event.js +28 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/print-mode.d.ts +27 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/print-mode.js +141 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/jsonl.d.ts +16 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/jsonl.js +48 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-client.d.ts +253 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-client.js +494 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-mode.d.ts +19 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-mode.js +656 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-types.d.ts +468 -0
- package/dist/vendor/engine/runtime/coding-agent/modes/rpc/rpc-types.js +7 -0
- package/dist/vendor/engine/runtime/coding-agent/package-manager-cli.d.ts +8 -0
- package/dist/vendor/engine/runtime/coding-agent/package-manager-cli.js +960 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/abort.d.ts +4 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/abort.js +47 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/ansi.d.ts +1 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/ansi.js +51 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/changelog.d.ts +21 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/changelog.js +164 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/child-process.d.ts +17 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/child-process.js +105 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard-command.d.ts +6 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard-command.js +44 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard-image.d.ts +10 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard-image.js +216 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard.d.ts +3 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/clipboard.js +150 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/exif-orientation.d.ts +4 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/exif-orientation.js +156 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/frontmatter.d.ts +7 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/frontmatter.js +26 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/fs-watch.d.ts +4 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/fs-watch.js +24 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/git.d.ts +25 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/git.js +194 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/html.d.ts +6 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/html.js +39 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-convert.d.ts +9 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-convert.js +44 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-process.d.ts +17 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-process.js +82 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-resize-core.d.ts +29 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-resize-core.js +123 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-resize-worker.d.ts +1 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-resize-worker.js +30 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-resize.d.ts +15 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/image-resize.js +96 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/json.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/json.js +6 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/management-http.d.ts +24 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/management-http.js +53 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/mime.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/mime.js +109 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/open-browser.d.ts +8 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/open-browser.js +21 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/paths.d.ts +33 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/paths.js +113 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/photon.d.ts +20 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/photon.js +120 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/pi-user-agent.d.ts +1 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/pi-user-agent.js +4 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/shell.d.ts +33 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/shell.js +215 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/sleep.d.ts +4 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/sleep.js +16 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/syntax-highlight.d.ts +12 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/syntax-highlight.js +176 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/text.d.ts +7 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/text.js +8 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/tool-result-images.d.ts +20 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/tool-result-images.js +47 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/tools-manager.d.ts +12 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/tools-manager.js +308 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/version-check.d.ts +18 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/version-check.js +78 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/windows-self-update.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/windows-self-update.js +76 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/wsl.d.ts +2 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/wsl.js +14 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/zip.d.ts +6 -0
- package/dist/vendor/engine/runtime/coding-agent/utils/zip.js +59 -0
- package/dist/vendor/engine/runtime/package.json +9 -0
- package/dist/vendor/engine/runtime/telemetry/index.d.ts +193 -0
- package/dist/vendor/engine/runtime/telemetry/index.js +17 -0
- package/dist/vendor/engine/runtime/telemetry/memory.d.ts +25 -0
- package/dist/vendor/engine/runtime/telemetry/memory.js +153 -0
- package/dist/vendor/engine/runtime/telemetry/noop.d.ts +3 -0
- package/dist/vendor/engine/runtime/telemetry/noop.js +17 -0
- package/dist/vendor/engine/runtime/tui/alt-screen-search.d.ts +45 -0
- package/dist/vendor/engine/runtime/tui/alt-screen-search.js +281 -0
- package/dist/vendor/engine/runtime/tui/autocomplete.d.ts +56 -0
- package/dist/vendor/engine/runtime/tui/autocomplete.js +671 -0
- package/dist/vendor/engine/runtime/tui/components/alt-screen-flash.d.ts +12 -0
- package/dist/vendor/engine/runtime/tui/components/alt-screen-flash.js +36 -0
- package/dist/vendor/engine/runtime/tui/components/box.d.ts +23 -0
- package/dist/vendor/engine/runtime/tui/components/box.js +132 -0
- package/dist/vendor/engine/runtime/tui/components/cancellable-loader.d.ts +21 -0
- package/dist/vendor/engine/runtime/tui/components/cancellable-loader.js +34 -0
- package/dist/vendor/engine/runtime/tui/components/editor.d.ts +259 -0
- package/dist/vendor/engine/runtime/tui/components/editor.js +2041 -0
- package/dist/vendor/engine/runtime/tui/components/h-stack.d.ts +6 -0
- package/dist/vendor/engine/runtime/tui/components/h-stack.js +42 -0
- package/dist/vendor/engine/runtime/tui/components/image.d.ts +27 -0
- package/dist/vendor/engine/runtime/tui/components/image.js +89 -0
- package/dist/vendor/engine/runtime/tui/components/input.d.ts +47 -0
- package/dist/vendor/engine/runtime/tui/components/input.js +416 -0
- package/dist/vendor/engine/runtime/tui/components/loader.d.ts +32 -0
- package/dist/vendor/engine/runtime/tui/components/loader.js +75 -0
- package/dist/vendor/engine/runtime/tui/components/markdown.d.ts +102 -0
- package/dist/vendor/engine/runtime/tui/components/markdown.js +810 -0
- package/dist/vendor/engine/runtime/tui/components/mouse-region.d.ts +11 -0
- package/dist/vendor/engine/runtime/tui/components/mouse-region.js +20 -0
- package/dist/vendor/engine/runtime/tui/components/scroll-view.d.ts +58 -0
- package/dist/vendor/engine/runtime/tui/components/scroll-view.js +194 -0
- package/dist/vendor/engine/runtime/tui/components/select-list.d.ts +52 -0
- package/dist/vendor/engine/runtime/tui/components/select-list.js +205 -0
- package/dist/vendor/engine/runtime/tui/components/settings-list.d.ts +59 -0
- package/dist/vendor/engine/runtime/tui/components/settings-list.js +251 -0
- package/dist/vendor/engine/runtime/tui/components/spacer.d.ts +11 -0
- package/dist/vendor/engine/runtime/tui/components/spacer.js +22 -0
- package/dist/vendor/engine/runtime/tui/components/stack.d.ts +31 -0
- package/dist/vendor/engine/runtime/tui/components/stack.js +110 -0
- package/dist/vendor/engine/runtime/tui/components/text.d.ts +18 -0
- package/dist/vendor/engine/runtime/tui/components/text.js +89 -0
- package/dist/vendor/engine/runtime/tui/components/truncated-text.d.ts +12 -0
- package/dist/vendor/engine/runtime/tui/components/truncated-text.js +50 -0
- package/dist/vendor/engine/runtime/tui/components/v-stack.d.ts +7 -0
- package/dist/vendor/engine/runtime/tui/components/v-stack.js +25 -0
- package/dist/vendor/engine/runtime/tui/editor-component.d.ts +38 -0
- package/dist/vendor/engine/runtime/tui/editor-component.js +1 -0
- package/dist/vendor/engine/runtime/tui/fuzzy.d.ts +15 -0
- package/dist/vendor/engine/runtime/tui/fuzzy.js +110 -0
- package/dist/vendor/engine/runtime/tui/index.d.ts +32 -0
- package/dist/vendor/engine/runtime/tui/index.js +44 -0
- package/dist/vendor/engine/runtime/tui/keybindings.d.ts +272 -0
- package/dist/vendor/engine/runtime/tui/keybindings.js +232 -0
- package/dist/vendor/engine/runtime/tui/keys.d.ts +183 -0
- package/dist/vendor/engine/runtime/tui/keys.js +1173 -0
- package/dist/vendor/engine/runtime/tui/kill-ring.d.ts +27 -0
- package/dist/vendor/engine/runtime/tui/kill-ring.js +43 -0
- package/dist/vendor/engine/runtime/tui/latex.d.ts +9 -0
- package/dist/vendor/engine/runtime/tui/latex.js +1377 -0
- package/dist/vendor/engine/runtime/tui/layout-node.d.ts +39 -0
- package/dist/vendor/engine/runtime/tui/layout-node.js +5 -0
- package/dist/vendor/engine/runtime/tui/layout.d.ts +41 -0
- package/dist/vendor/engine/runtime/tui/layout.js +343 -0
- package/dist/vendor/engine/runtime/tui/native-modifiers.d.ts +3 -0
- package/dist/vendor/engine/runtime/tui/native-modifiers.js +12 -0
- package/dist/vendor/engine/runtime/tui/native-module-path.d.ts +6 -0
- package/dist/vendor/engine/runtime/tui/native-module-path.js +18 -0
- package/dist/vendor/engine/runtime/tui/native-platform.d.ts +17 -0
- package/dist/vendor/engine/runtime/tui/native-platform.js +41 -0
- package/dist/vendor/engine/runtime/tui/stdin-buffer.d.ts +55 -0
- package/dist/vendor/engine/runtime/tui/stdin-buffer.js +365 -0
- package/dist/vendor/engine/runtime/tui/terminal-colors.d.ts +9 -0
- package/dist/vendor/engine/runtime/tui/terminal-colors.js +58 -0
- package/dist/vendor/engine/runtime/tui/terminal-image.d.ts +117 -0
- package/dist/vendor/engine/runtime/tui/terminal-image.js +549 -0
- package/dist/vendor/engine/runtime/tui/terminal.d.ts +122 -0
- package/dist/vendor/engine/runtime/tui/terminal.js +441 -0
- package/dist/vendor/engine/runtime/tui/tui-alt-screen.d.ts +159 -0
- package/dist/vendor/engine/runtime/tui/tui-alt-screen.js +1507 -0
- package/dist/vendor/engine/runtime/tui/tui-main-screen.d.ts +38 -0
- package/dist/vendor/engine/runtime/tui/tui-main-screen.js +593 -0
- package/dist/vendor/engine/runtime/tui/tui.d.ts +385 -0
- package/dist/vendor/engine/runtime/tui/tui.js +1054 -0
- package/dist/vendor/engine/runtime/tui/undo-stack.d.ts +16 -0
- package/dist/vendor/engine/runtime/tui/undo-stack.js +24 -0
- package/dist/vendor/engine/runtime/tui/utils.d.ts +100 -0
- package/dist/vendor/engine/runtime/tui/utils.js +1203 -0
- package/dist/vendor/engine/runtime/tui/word-navigation.d.ts +24 -0
- package/dist/vendor/engine/runtime/tui/word-navigation.js +95 -0
- package/dist/vendor/zcode/LICENSE.upstream +202 -0
- package/dist/vendor/zcode/provenance.json +141 -0
- package/dist/vendor/zcode/source/agent/turn-machine.d.ts +56 -0
- package/dist/vendor/zcode/source/agent/turn-machine.js +214 -0
- package/dist/vendor/zcode/source/agent/turn-state.d.ts +118 -0
- package/dist/vendor/zcode/source/agent/turn-state.js +93 -0
- package/dist/vendor/zcode/source/compact/manual.d.ts +11 -0
- package/dist/vendor/zcode/source/compact/manual.js +38 -0
- package/dist/vendor/zcode/source/compact/microcompact.d.ts +47 -0
- package/dist/vendor/zcode/source/compact/microcompact.js +194 -0
- package/dist/vendor/zcode/source/compact/policy.d.ts +59 -0
- package/dist/vendor/zcode/source/compact/policy.js +89 -0
- package/dist/vendor/zcode/source/compact/selection.d.ts +6 -0
- package/dist/vendor/zcode/source/compact/selection.js +12 -0
- package/dist/vendor/zcode/source/contracts.d.ts +52 -0
- package/dist/vendor/zcode/source/contracts.js +9 -0
- package/dist/vendor/zcode/source/runtime/goal-completion-verification.d.ts +17 -0
- package/dist/vendor/zcode/source/runtime/goal-completion-verification.js +138 -0
- package/dist/vendor/zcode/source/runtime/turn-loop.d.ts +3 -0
- package/dist/vendor/zcode/source/runtime/turn-loop.js +21 -0
- package/dist/vendor/zcode/source/runtime/turn-model-step.d.ts +54 -0
- package/dist/vendor/zcode/source/runtime/turn-model-step.js +97 -0
- package/dist/vendor/zcode/source/runtime/turn-output-token-continuation.d.ts +8 -0
- package/dist/vendor/zcode/source/runtime/turn-output-token-continuation.js +15 -0
- package/dist/vendor/zcode/source/runtime/turn-stop.d.ts +6 -0
- package/dist/vendor/zcode/source/runtime/turn-stop.js +18 -0
- package/dist/vendor/zcode/source/tool/executor/validation.d.ts +6 -0
- package/dist/vendor/zcode/source/tool/executor/validation.js +76 -0
- package/dist/vendor/zcode/source/tool/input-normalization.d.ts +16 -0
- package/dist/vendor/zcode/source/tool/input-normalization.js +62 -0
- package/dist/vendor/zcode/source/tool/input-validation-model-content.d.ts +4 -0
- package/dist/vendor/zcode/source/tool/input-validation-model-content.js +263 -0
- package/dist/vendor/zcode/source/tool/json-schema.d.ts +9 -0
- package/dist/vendor/zcode/source/tool/json-schema.js +230 -0
- package/dist/vendor/zcode/source/tool/scheduler.d.ts +43 -0
- package/dist/vendor/zcode/source/tool/scheduler.js +167 -0
- package/dist/vendor/zcode/source/tool/tool-input-validation-issues.d.ts +76 -0
- package/dist/vendor/zcode/source/tool/tool-input-validation-issues.js +148 -0
- package/dist/vendor/zcode/source/tool/validation-contracts.d.ts +27 -0
- package/dist/vendor/zcode/source/tool/validation-contracts.js +8 -0
- package/docs/README.md +36 -0
- package/docs/agents/README.md +62 -0
- package/docs/agents/install-for-agents.md +64 -0
- package/docs/agents/mcp-server.md +187 -0
- package/docs/agents/subagent-mode.md +146 -0
- package/docs/concepts/README.md +47 -0
- package/docs/concepts/jev-actionable-routing.md +113 -0
- package/docs/concepts/jev-decision-thresholds.md +412 -0
- package/docs/concepts/jev-efficiency.md +216 -0
- package/docs/concepts/jev-eval-2026-11-01.md +78 -0
- package/docs/concepts/limits.md +43 -0
- package/docs/concepts/memory.md +30 -0
- package/docs/concepts/security.md +40 -0
- package/docs/concepts/workspace-instructions.md +28 -0
- package/docs/getting-started/README.md +74 -0
- package/docs/getting-started/accounts.md +67 -0
- package/docs/getting-started/configure-providers.md +103 -0
- package/docs/guides/README.md +12 -0
- package/docs/guides/browser.md +15 -0
- package/docs/guides/desktop-app.md +325 -0
- package/docs/guides/extensions.md +100 -0
- package/docs/guides/graph-builder.md +93 -0
- package/docs/guides/headless.md +45 -0
- package/docs/guides/tui.md +75 -0
- package/docs/guides/update.md +47 -0
- package/docs/guides/windows-code-signing.md +316 -0
- package/docs/llms.txt +45 -0
- package/docs/reference/README.md +7 -0
- package/docs/reference/cli.md +70 -0
- package/docs/reference/config.md +85 -0
- package/docs/reference/slash-commands.md +54 -0
- package/docs/superpowers/plans/2026-11-01-claude-console-sign-in.md +111 -0
- package/docs/superpowers/plans/2026-11-01-jev-node-opt-in.md +910 -0
- package/docs/superpowers/plans/2026-11-02-workflow-pane.md +398 -0
- package/docs/superpowers/specs/2026-10-31-work-line-summary-design.md +50 -0
- package/docs/superpowers/specs/2026-11-01-claude-console-sign-in-design.md +176 -0
- package/docs/superpowers/specs/2026-11-01-jev-node-opt-in-design.md +164 -0
- package/docs/superpowers/specs/2026-11-01-pr-section-design.md +104 -0
- package/docs/superpowers/specs/2026-11-02-workflow-pane-design.md +130 -0
- package/licenses/GEIST-OFL-1.1.txt +92 -0
- package/licenses/ZCODE-APACHE-2.0.txt +202 -0
- package/package.json +118 -6
- package/scripts/jev-efficiency-eval.mjs +187 -0
- package/scripts/jev-efficiency-live.mjs +193 -0
- package/scripts/zcode-engine-replay.mjs +223 -0
- package/tests/agent-centric-mcp-test-plan.md +208 -0
- package/tests/analytics-settings-test-plan.md +165 -0
- package/tests/browser-cli-smoke.mjs +276 -0
- package/tests/browser-test-plan.md +280 -0
- package/tests/chat-side-panel-test-plan.md +309 -0
- package/tests/decision-engine-test-plan.md +163 -0
- package/tests/default-active-jev-test-plan.md +85 -0
- package/tests/graphiti-test-plan.md +359 -0
- package/tests/harness-extensions-test-plan.md +110 -0
- package/tests/jev-all-decisions-test-plan.md +156 -0
- package/tests/jev-efficiency/criteria.json +158 -0
- package/tests/jev-efficiency/workloads.mjs +242 -0
- package/tests/jev-efficiency-test-plan.md +198 -0
- package/tests/mock-graphiti.mjs +106 -0
- package/tests/permissions-sandbox-probe.mjs +74 -0
- package/tests/permissions-test-plan.md +190 -0
- package/tests/product-telemetry-test-plan.md +536 -0
- package/tests/thinking-stream-preview-test-plan.md +136 -0
- package/tests/zcode-react-engine-test-plan.md +396 -0
|
@@ -0,0 +1,1098 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { createReadStream } from 'node:fs';
|
|
3
|
+
import { opendir, open, readFile, readdir, realpath, stat } from 'node:fs/promises';
|
|
4
|
+
import { StringDecoder } from 'node:string_decoder';
|
|
5
|
+
import { isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
6
|
+
import { runRecordPath, runRecordsDirectory, sessionHasOpenRun } from '../run-records.js';
|
|
7
|
+
import { validSavedSession } from '../sessions.js';
|
|
8
|
+
import { listBundles } from '../extensions.js';
|
|
9
|
+
/**
|
|
10
|
+
* Inspection of a workspace and of this installation's run records.
|
|
11
|
+
*
|
|
12
|
+
* Only one function here (`checkoutBranch`) changes anything, and it changes the branch the working
|
|
13
|
+
* tree is on — never its contents. Everything else answers a panel in the desktop client: paths from
|
|
14
|
+
* the client are resolved inside the workspace root and refused when they leave it, so a crafted
|
|
15
|
+
* request cannot read arbitrary files through the engine.
|
|
16
|
+
*/
|
|
17
|
+
/** The same skip list the agent's `list_files` tool uses, so the tree matches what the agent sees. */
|
|
18
|
+
const SKIP_NAMES = new Set(['.git', 'node_modules', '.andorracode']);
|
|
19
|
+
const MAX_TREE_ENTRIES = 5_000;
|
|
20
|
+
const MAX_TREE_DEPTH = 12;
|
|
21
|
+
const MAX_FILE_BYTES = 512 * 1024;
|
|
22
|
+
const MAX_DIFF_BYTES = 2 * 1024 * 1024;
|
|
23
|
+
/** Enough for a working tree of ordinary size; a repository past this is reported as cut. */
|
|
24
|
+
const MAX_STATUS_BYTES = 8 * 1024 * 1024;
|
|
25
|
+
const GIT_TIMEOUT_MS = 15_000;
|
|
26
|
+
const MAX_RUNS = 200;
|
|
27
|
+
const MAX_RUN_EVENTS = 5_000;
|
|
28
|
+
/** How many session snapshots may be opened to title a page of runs; the newest are examined. */
|
|
29
|
+
const MAX_SESSION_SCAN = 500;
|
|
30
|
+
function message(error) { return error instanceof Error ? error.message : String(error); }
|
|
31
|
+
function inside(root, target) {
|
|
32
|
+
const suffix = relative(root, target);
|
|
33
|
+
return suffix === '' || (!isAbsolute(suffix) && suffix !== '..' && !suffix.startsWith(`..${sep}`));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Resolve a client-supplied relative path inside the workspace, without following the final component.
|
|
37
|
+
*
|
|
38
|
+
* The containment check is the same lexical one `resolveInside` starts with; what is left out is the
|
|
39
|
+
* canonicalization, for the callers that need the name the client chose rather than the file it points
|
|
40
|
+
* at (a Git pathspec, for one).
|
|
41
|
+
*/
|
|
42
|
+
export async function resolveLexicalInside(root, name) {
|
|
43
|
+
if (name !== undefined && (typeof name !== 'string' || name.length > 4096 || name.includes('\0')))
|
|
44
|
+
throw new Error('A workspace path must be a string of up to 4096 characters');
|
|
45
|
+
const candidate = resolve(root, name === undefined || name === '' ? '.' : name);
|
|
46
|
+
if (!inside(root, candidate))
|
|
47
|
+
throw new Error('The path is outside the project');
|
|
48
|
+
return candidate;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Resolve a client-supplied relative path inside the workspace.
|
|
52
|
+
*
|
|
53
|
+
* The lexical check runs before `realpath`, so a path that escapes through `..` never reaches the
|
|
54
|
+
* filesystem, and the canonical check runs after, so a symlink or junction that leaves the
|
|
55
|
+
* workspace is refused even when its name looked local.
|
|
56
|
+
*/
|
|
57
|
+
export async function resolveInside(root, name) {
|
|
58
|
+
if (name !== undefined && (typeof name !== 'string' || name.length > 4096 || name.includes('\0')))
|
|
59
|
+
throw new Error('A workspace path must be a string of up to 4096 characters');
|
|
60
|
+
const candidate = resolve(root, name === undefined || name === '' ? '.' : name);
|
|
61
|
+
if (!inside(root, candidate))
|
|
62
|
+
throw new Error('The path is outside the project');
|
|
63
|
+
const canonical = await realpath(candidate).catch((error) => {
|
|
64
|
+
if (error.code === 'ENOENT')
|
|
65
|
+
return candidate;
|
|
66
|
+
throw error;
|
|
67
|
+
});
|
|
68
|
+
if (!inside(root, canonical))
|
|
69
|
+
throw new Error('The path is outside the project');
|
|
70
|
+
return canonical;
|
|
71
|
+
}
|
|
72
|
+
export async function workspaceRoot(value) {
|
|
73
|
+
if (typeof value !== 'string' || !value.trim() || value.length > 4096 || value.includes('\0'))
|
|
74
|
+
throw new Error('A project folder path is required');
|
|
75
|
+
const root = await realpath(resolve(value)).catch(() => { throw new Error('The project folder does not exist'); });
|
|
76
|
+
if (!(await stat(root)).isDirectory())
|
|
77
|
+
throw new Error('The project path is not a folder');
|
|
78
|
+
return root;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* List one directory level or a bounded subtree.
|
|
82
|
+
*
|
|
83
|
+
* A tree panel asks for one level at a time, so the default walk stops at the requested directory
|
|
84
|
+
* and only the opt-in deep form recurses; either way directories come before files and both sort
|
|
85
|
+
* by name, which keeps a level stable between refreshes.
|
|
86
|
+
*/
|
|
87
|
+
export async function readTree(root, options = {}) {
|
|
88
|
+
const start = await resolveInside(root, options.path);
|
|
89
|
+
const deep = options.depth !== undefined;
|
|
90
|
+
const maxDepth = deep ? Math.max(1, Math.min(MAX_TREE_DEPTH, Number.isSafeInteger(options.depth) ? options.depth : MAX_TREE_DEPTH)) : 1;
|
|
91
|
+
const entries = [];
|
|
92
|
+
let truncated = false;
|
|
93
|
+
const walk = async (directory, depth) => {
|
|
94
|
+
const found = [];
|
|
95
|
+
for await (const entry of await opendir(directory)) {
|
|
96
|
+
if (entry.isSymbolicLink() || SKIP_NAMES.has(entry.name))
|
|
97
|
+
continue;
|
|
98
|
+
// The bound is applied while reading the directory, not after: a folder with far more children
|
|
99
|
+
// than this cap would otherwise be accumulated and sorted in full before the cap could apply,
|
|
100
|
+
// and a stat per file would make listing a large generated directory very slow. Sizes are not
|
|
101
|
+
// reported for that reason; nothing in the client renders them.
|
|
102
|
+
if (entries.length + found.length >= MAX_TREE_ENTRIES) {
|
|
103
|
+
truncated = true;
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
const path = join(directory, entry.name);
|
|
107
|
+
const name = relative(root, path).split(sep).join('/');
|
|
108
|
+
if (entry.isDirectory())
|
|
109
|
+
found.push({ name: entry.name, path: name, type: 'directory' });
|
|
110
|
+
else if (entry.isFile())
|
|
111
|
+
found.push({ name: entry.name, path: name, type: 'file' });
|
|
112
|
+
}
|
|
113
|
+
found.sort((left, right) => left.type === right.type ? left.name.localeCompare(right.name) : left.type === 'directory' ? -1 : 1);
|
|
114
|
+
for (const child of found) {
|
|
115
|
+
if (entries.length >= MAX_TREE_ENTRIES) {
|
|
116
|
+
truncated = true;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
entries.push(child);
|
|
120
|
+
if (child.type === 'directory' && depth < maxDepth)
|
|
121
|
+
await walk(join(directory, child.name), depth + 1);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
await walk(start, 1);
|
|
125
|
+
return { path: relative(root, start).split(sep).join('/'), entries, truncated };
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Read one text file with a byte cap.
|
|
129
|
+
*
|
|
130
|
+
* The cap is enforced on the read, not after it: stat gives the size, and a large file is read
|
|
131
|
+
* through a bounded handle so opening a multi-gigabyte artifact cannot allocate it in full just to
|
|
132
|
+
* hand back its first half megabyte. Binary detection keeps a NUL byte from reaching a text view.
|
|
133
|
+
*/
|
|
134
|
+
export async function readWorkspaceFile(root, name) {
|
|
135
|
+
const path = await resolveInside(root, name);
|
|
136
|
+
const info = await stat(path);
|
|
137
|
+
if (!info.isFile())
|
|
138
|
+
throw new Error('Only files can be opened');
|
|
139
|
+
const handle = await open(path, 'r');
|
|
140
|
+
try {
|
|
141
|
+
const buffer = Buffer.alloc(Math.min(info.size, MAX_FILE_BYTES + 1));
|
|
142
|
+
const { bytesRead } = await handle.read(buffer, 0, buffer.length, 0);
|
|
143
|
+
const head = buffer.subarray(0, bytesRead);
|
|
144
|
+
const binary = head.subarray(0, Math.min(head.length, 8000)).includes(0);
|
|
145
|
+
// The cap can fall inside a multi-byte character, which no character encoding can represent
|
|
146
|
+
// faithfully; the decoder keeps the incomplete tail out of the text instead of ending the preview
|
|
147
|
+
// with a replacement character. A file within the cap is unaffected: its bytes are complete.
|
|
148
|
+
const content = new StringDecoder('utf8').write(head.subarray(0, MAX_FILE_BYTES));
|
|
149
|
+
return { content: binary ? '' : content, truncated: info.size > MAX_FILE_BYTES, binary, size: info.size };
|
|
150
|
+
}
|
|
151
|
+
finally {
|
|
152
|
+
await handle.close();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Working-tree status through the `git` executable.
|
|
157
|
+
*
|
|
158
|
+
* Startup metadata deliberately avoids running workspace-controlled helpers; a user-opened Changes
|
|
159
|
+
* panel is the opposite case, where the repository's own Git is the authority and the call is
|
|
160
|
+
* explicit. Arguments are fixed (no shell, no interpolation) and the call is time bounded.
|
|
161
|
+
*
|
|
162
|
+
* Paths come from `-z` output rather than the default: porcelain quotes names containing non-ASCII
|
|
163
|
+
* or control characters in C style, and a client that treated the quoted form as a path could not
|
|
164
|
+
* open the file it names. With `-z` each record is NUL terminated and renames carry the source in a
|
|
165
|
+
* following field, so no path has to be decoded.
|
|
166
|
+
*/
|
|
167
|
+
export async function gitStatus(root, options = {}) {
|
|
168
|
+
let collected;
|
|
169
|
+
try {
|
|
170
|
+
// Streamed and capped, like the diff path: `execFile` fails the whole call once a repository's
|
|
171
|
+
// status passes its buffer, and the catch below would then report a large generated tree as not
|
|
172
|
+
// being a repository at all. A capped read is reported as such instead.
|
|
173
|
+
collected = await collectCapped('git', ['-C', root, 'status', '--porcelain=v1', '-z', '--branch', '--untracked-files=all'], options.maxBytes ?? MAX_STATUS_BYTES, GIT_TIMEOUT_MS);
|
|
174
|
+
}
|
|
175
|
+
catch {
|
|
176
|
+
// Git that cannot be started, a timeout, or an unreadable tree are all "no changes to show"; the
|
|
177
|
+
// panel says so rather than failing the request.
|
|
178
|
+
return { repository: false, files: [] };
|
|
179
|
+
}
|
|
180
|
+
// A capped read was killed rather than exited, so its code says nothing about the repository: the
|
|
181
|
+
// records it did collect are a partial listing, which the flag reports. Only a command that ran to a
|
|
182
|
+
// nonzero exit is a folder with nothing to show.
|
|
183
|
+
if (!collected.truncated && collected.code !== 0)
|
|
184
|
+
return { repository: false, files: [] };
|
|
185
|
+
{
|
|
186
|
+
const records = collected.text.split('\0');
|
|
187
|
+
// A capped read can end in the middle of a record, so the last one is dropped rather than parsed
|
|
188
|
+
// into a path with no file behind it; the flag tells the pane the list is incomplete.
|
|
189
|
+
if (collected.truncated)
|
|
190
|
+
records.pop();
|
|
191
|
+
const files = [];
|
|
192
|
+
let branch;
|
|
193
|
+
for (let index = 0; index < records.length; index++) {
|
|
194
|
+
const record = records[index];
|
|
195
|
+
if (!record)
|
|
196
|
+
continue;
|
|
197
|
+
if (record.startsWith('## ')) {
|
|
198
|
+
const header = record.slice(3).replace(/\s+\[.+\]$/, '');
|
|
199
|
+
branch = header.split('...')[0].trim() || undefined;
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (record.length < 4)
|
|
203
|
+
continue;
|
|
204
|
+
const index_ = record.slice(0, 1).trim(), worktree = record.slice(1, 2).trim();
|
|
205
|
+
// A rename or copy entry names the destination here and the source in the next record.
|
|
206
|
+
const renamed = index_ === 'R' || index_ === 'C';
|
|
207
|
+
files.push({ path: record.slice(3), index: index_, worktree });
|
|
208
|
+
if (renamed)
|
|
209
|
+
index++;
|
|
210
|
+
}
|
|
211
|
+
return { repository: true, branch, files, truncated: collected.truncated };
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/** Which Git failures mean "there is nothing to compare" rather than "this could not be read". */
|
|
215
|
+
const NOTHING_TO_COMPARE = /not a git repository|bad revision 'HEAD'|ambiguous argument 'HEAD'|does not have any commits/i;
|
|
216
|
+
/** Which of those mean the comparison has no first commit to name, which `--cached` can still answer. */
|
|
217
|
+
const NO_FIRST_COMMIT = /bad revision 'HEAD'|ambiguous argument 'HEAD'|does not have any commits/i;
|
|
218
|
+
/** The first line of a Git diagnostic, for an error a person can act on. */
|
|
219
|
+
function firstLine(text) { return text.trim().split('\n')[0]?.slice(0, 200) ?? ''; }
|
|
220
|
+
/** How many branch names one answer carries; a repository past this is listed up to the bound. */
|
|
221
|
+
const MAX_BRANCHES = 1_000;
|
|
222
|
+
const MAX_BRANCH_BYTES = 256 * 1024;
|
|
223
|
+
const MAX_BRANCH_NAME_CHARS = 200;
|
|
224
|
+
/**
|
|
225
|
+
* The local branches of a repository, and the one the working tree is on.
|
|
226
|
+
*
|
|
227
|
+
* `refs/heads` is read directly rather than through `git branch`, whose listing in a detached HEAD
|
|
228
|
+
* also contains a pseudo-entry naming the commit — a name no client could check out. The branch the
|
|
229
|
+
* working tree is on is asked separately because a detached HEAD has none, and "absent from the
|
|
230
|
+
* listing" would otherwise be indistinguishable from a branch that only does not exist yet.
|
|
231
|
+
* Remote-tracking refs are left out: landing on one needs a tracking decision — which local branch
|
|
232
|
+
* follows it — that this request cannot express.
|
|
233
|
+
*/
|
|
234
|
+
export async function listBranches(root) {
|
|
235
|
+
let collected;
|
|
236
|
+
try {
|
|
237
|
+
// `:lstrip=2` removes the fixed `refs/heads/` prefix instead of asking for an abbreviation:
|
|
238
|
+
// `:short` has to stay unambiguous, so a repository with a tag of the same name would list
|
|
239
|
+
// `heads/foo`, and checking that name out later would land on the tag rather than the branch.
|
|
240
|
+
collected = await collectCapped('git', ['-C', root, 'for-each-ref', '--format=%(refname:lstrip=2)', 'refs/heads'], MAX_BRANCH_BYTES, GIT_TIMEOUT_MS);
|
|
241
|
+
}
|
|
242
|
+
catch {
|
|
243
|
+
// Git that cannot be started, a timeout, and an unreadable folder all read as "nothing to offer".
|
|
244
|
+
return { repository: false, branches: [] };
|
|
245
|
+
}
|
|
246
|
+
// A capped read was killed rather than exited, so its code says nothing about the repository: the
|
|
247
|
+
// names it did collect are a prefix of the listing, which the flag reports. Only a command that ran
|
|
248
|
+
// to a nonzero exit is a folder with no branches to show.
|
|
249
|
+
if (!collected.truncated && collected.code !== 0)
|
|
250
|
+
return { repository: false, branches: [] };
|
|
251
|
+
const records = collected.text.split('\n');
|
|
252
|
+
// A capped read can end in the middle of a name, so the last record is dropped rather than offered
|
|
253
|
+
// as a branch that does not exist.
|
|
254
|
+
if (collected.truncated)
|
|
255
|
+
records.pop();
|
|
256
|
+
const branches = [];
|
|
257
|
+
let listed = 0;
|
|
258
|
+
for (const record of records) {
|
|
259
|
+
if (!record)
|
|
260
|
+
continue;
|
|
261
|
+
listed++;
|
|
262
|
+
if (branches.length < MAX_BRANCHES)
|
|
263
|
+
branches.push(record);
|
|
264
|
+
}
|
|
265
|
+
// `-q` makes a detached HEAD an empty answer with a nonzero exit rather than a diagnostic; a Git
|
|
266
|
+
// that cannot be started at all is the same absence, and the listing above already answered.
|
|
267
|
+
// The full ref is read and the prefix stripped by hand: `--short` has to stay unambiguous, so with
|
|
268
|
+
// a tag of the same name it answers `heads/feature/one` — a name that would then neither match the
|
|
269
|
+
// listing below nor be a branch the caller can switch to.
|
|
270
|
+
const head = await collectCapped('git', ['-C', root, 'symbolic-ref', '-q', 'HEAD'], 4 * 1024, GIT_TIMEOUT_MS).catch(() => undefined);
|
|
271
|
+
const current = head && head.code === 0 ? head.text.trim().replace(/^refs\/heads\//, '') || undefined : undefined;
|
|
272
|
+
return {
|
|
273
|
+
repository: true,
|
|
274
|
+
...(current === undefined ? {} : { current }),
|
|
275
|
+
branches,
|
|
276
|
+
...(collected.truncated || listed > branches.length ? { truncated: true } : {}),
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Switch the working tree to a branch, creating it when asked.
|
|
281
|
+
*
|
|
282
|
+
* The name is a Git ref name and Git judges it, after the cases that would make it mean something
|
|
283
|
+
* other than the branch typed are refused here: a leading dash would reach the command as an option,
|
|
284
|
+
* and `@{` is resolved by `check-ref-format --branch` against the reflog — a way to name a different
|
|
285
|
+
* branch than the one in the request. Nothing else about the name is guessed; Git's own refusal is
|
|
286
|
+
* what the caller reports, because it names the reason (no such branch, a working tree that would
|
|
287
|
+
* lose changes) better than a rule kept in sync here could.
|
|
288
|
+
*/
|
|
289
|
+
export async function checkoutBranch(root, options) {
|
|
290
|
+
if (typeof options.branch !== 'string')
|
|
291
|
+
throw new Error('A branch name must be a string');
|
|
292
|
+
const name = options.branch.trim();
|
|
293
|
+
if (!name || name.length > MAX_BRANCH_NAME_CHARS)
|
|
294
|
+
throw new Error(`A branch name must be 1 to ${MAX_BRANCH_NAME_CHARS} characters`);
|
|
295
|
+
if (name.startsWith('-') || name.includes('@{') || /\s/.test(name))
|
|
296
|
+
throw new Error(`Not a valid branch name: ${name}`);
|
|
297
|
+
const checked = await collectCapped('git', ['-C', root, 'check-ref-format', '--branch', name], 4 * 1024, GIT_TIMEOUT_MS);
|
|
298
|
+
if (checked.code !== 0)
|
|
299
|
+
throw new Error(firstLine(checked.failure) || `Not a valid branch name: ${name}`);
|
|
300
|
+
// `switch` cannot restore paths, and `--no-guess` refuses to invent a local branch from a
|
|
301
|
+
// remote-tracking one: plain `checkout <name>` selects its path-restoration mode when no branch
|
|
302
|
+
// matches, which exits successfully after discarding unstaged changes to a path of that name and
|
|
303
|
+
// would leave this function reporting a branch switch that never happened.
|
|
304
|
+
const switched = await collectCapped('git', ['-C', root, 'switch', '--no-guess', ...(options.create === true ? ['-c'] : []), name], 64 * 1024, GIT_TIMEOUT_MS);
|
|
305
|
+
if (switched.code !== 0)
|
|
306
|
+
throw new Error(firstLine(switched.failure) || 'The branch could not be checked out');
|
|
307
|
+
return { branch: name };
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* A diff for one path or the whole tree.
|
|
311
|
+
*
|
|
312
|
+
* `base` names what the diff is taken against: the working tree alone (unstaged changes, Git's
|
|
313
|
+
* default) or `head`, which is what a per-file view wants because it includes staged and unstaged
|
|
314
|
+
* changes together. Untracked files have no diff at all and are read as content by the client.
|
|
315
|
+
*/
|
|
316
|
+
export async function gitDiff(root, options = {}) {
|
|
317
|
+
// The pathspec keeps the name that was asked for. `resolveInside` follows the final component with
|
|
318
|
+
// `realpath`, which is what a *read* needs — a link that leaves the project must be refused — but a
|
|
319
|
+
// diff is addressed by Git: canonicalizing a tracked symlink would ask for its target's diff, which
|
|
320
|
+
// usually reads as "no changes", instead of the change to the link itself.
|
|
321
|
+
const target = options.path !== undefined && options.path !== '' ? relative(root, await resolveLexicalInside(root, options.path)).split(sep).join('/') || '.' : undefined;
|
|
322
|
+
const head = options.base === 'head' && options.staged !== true;
|
|
323
|
+
// `--no-ext-diff` covers an external *diff* driver; a diff driver's `textconv` command is a separate
|
|
324
|
+
// helper that Git runs by default, and it is a configured program run with this process's privileges.
|
|
325
|
+
const args = ['-C', root, 'diff', '--no-color', '--no-ext-diff', '--no-textconv', ...(options.staged === true ? ['--staged'] : head ? ['HEAD'] : []), ...(target === undefined ? [] : ['--', target])];
|
|
326
|
+
// The diff is streamed and the collection stops at the cap: `execFile`'s buffer would reject a
|
|
327
|
+
// large-but-valid diff before this code could truncate it, reporting a readable change as
|
|
328
|
+
// unreadable, and collecting it whole would hold the entire diff in memory.
|
|
329
|
+
let collected = await collectCapped('git', args, MAX_DIFF_BYTES, GIT_TIMEOUT_MS).catch((error) => {
|
|
330
|
+
// A Git that cannot be started reads as nothing to compare, exactly as it did before it was
|
|
331
|
+
// streamed; a timeout is reported, because an empty answer would say a changed file has no changes.
|
|
332
|
+
if (/ENOENT/.test(message(error)))
|
|
333
|
+
return { text: '', truncated: false, code: 0, failure: '' };
|
|
334
|
+
throw error;
|
|
335
|
+
});
|
|
336
|
+
if (head && !collected.truncated && collected.code !== 0 && NO_FIRST_COMMIT.test(collected.failure)) {
|
|
337
|
+
// A repository whose first commit has not happened has no HEAD to compare against, and Git offers
|
|
338
|
+
// `--cached` there: it shows the staged snapshot the Changes list is already displaying. Without
|
|
339
|
+
// this, opening a staged file in a fresh repository read as "no changes".
|
|
340
|
+
const staged = args.filter(argument => argument !== 'HEAD');
|
|
341
|
+
staged.splice(staged.indexOf('--no-ext-diff') + 1, 0, '--cached');
|
|
342
|
+
collected = await collectCapped('git', staged, MAX_DIFF_BYTES, GIT_TIMEOUT_MS);
|
|
343
|
+
}
|
|
344
|
+
if (collected.truncated)
|
|
345
|
+
return { diff: collected.text, truncated: true };
|
|
346
|
+
// "Not a repository" and "no commits yet" are empty comparisons; any other nonzero exit is a real
|
|
347
|
+
// failure, and returning its empty stdout would tell the Code view that a changed file has no changes.
|
|
348
|
+
if (collected.code !== 0 && !NOTHING_TO_COMPARE.test(collected.failure)) {
|
|
349
|
+
throw new Error(`The Git output could not be read${collected.failure ? `: ${firstLine(collected.failure)}` : ''}`);
|
|
350
|
+
}
|
|
351
|
+
return { diff: collected.code === 0 ? collected.text : '', truncated: false };
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* The timestamp of a journal's first event.
|
|
355
|
+
*
|
|
356
|
+
* The first line is `graph.started`, which serializes the whole pinned graph, so it can be far larger
|
|
357
|
+
* than a small fixed prefix: the read continues to the first newline, up to a bound at which a single
|
|
358
|
+
* record stops being credible. A record that still cannot be parsed has its timestamp extracted by
|
|
359
|
+
* pattern, since the rest of that payload is not wanted here.
|
|
360
|
+
*/
|
|
361
|
+
async function firstEventTime(journal) {
|
|
362
|
+
const LIMIT = 256 * 1024;
|
|
363
|
+
const CHUNK = 16 * 1024;
|
|
364
|
+
let handle;
|
|
365
|
+
try {
|
|
366
|
+
handle = await open(journal, 'r');
|
|
367
|
+
}
|
|
368
|
+
catch {
|
|
369
|
+
return undefined;
|
|
370
|
+
}
|
|
371
|
+
try {
|
|
372
|
+
let text = '';
|
|
373
|
+
let position = 0;
|
|
374
|
+
while (position < LIMIT && !text.includes('\n')) {
|
|
375
|
+
const buffer = Buffer.alloc(CHUNK);
|
|
376
|
+
const { bytesRead } = await handle.read(buffer, 0, buffer.length, position);
|
|
377
|
+
if (bytesRead === 0)
|
|
378
|
+
break;
|
|
379
|
+
position += bytesRead;
|
|
380
|
+
text += buffer.subarray(0, bytesRead).toString('utf8');
|
|
381
|
+
}
|
|
382
|
+
const first = text.split('\n')[0].trim();
|
|
383
|
+
if (!first)
|
|
384
|
+
return undefined;
|
|
385
|
+
try {
|
|
386
|
+
const event = JSON.parse(first);
|
|
387
|
+
if (typeof event.time === 'string')
|
|
388
|
+
return event.time;
|
|
389
|
+
}
|
|
390
|
+
catch { /* Fall through to the pattern below. */ }
|
|
391
|
+
return /"time":"([^"]+)"/.exec(first)?.[1];
|
|
392
|
+
}
|
|
393
|
+
catch {
|
|
394
|
+
return undefined;
|
|
395
|
+
}
|
|
396
|
+
finally {
|
|
397
|
+
await handle.close();
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Run a command, keeping at most `cap` bytes of its standard output.
|
|
402
|
+
*
|
|
403
|
+
* Exported for the streaming test: the split it guards against is a property of pipe reads, which a
|
|
404
|
+
* test can only produce by driving this collector directly. Rejection is reserved for a command that
|
|
405
|
+
* never ran or never finished; what it exited with is the caller's business, because the same exit is
|
|
406
|
+
* an empty answer for one command and a real failure for another.
|
|
407
|
+
*/
|
|
408
|
+
export function collectCapped(program, args, cap, timeoutMs) {
|
|
409
|
+
return new Promise((resolve, reject) => {
|
|
410
|
+
const child = spawn(program, args, { windowsHide: true, stdio: ['ignore', 'pipe', 'pipe'] });
|
|
411
|
+
// A pipe delivers bytes, and a multi-byte character can be divided between two reads: decoding
|
|
412
|
+
// each chunk on its own would replace both halves with replacement characters, corrupting the file
|
|
413
|
+
// contents and paths the Code view shows even though Git emitted valid UTF-8. One decoder per
|
|
414
|
+
// stream carries the unfinished character over to the chunk that completes it.
|
|
415
|
+
const stdout = new StringDecoder('utf8');
|
|
416
|
+
const stderr = new StringDecoder('utf8');
|
|
417
|
+
let text = '';
|
|
418
|
+
let bytes = 0;
|
|
419
|
+
let truncated = false;
|
|
420
|
+
let failure = '';
|
|
421
|
+
const timer = setTimeout(() => {
|
|
422
|
+
child.kill();
|
|
423
|
+
reject(new Error(`The Git output could not be read: it did not finish in ${Math.round(timeoutMs / 1000)} seconds`));
|
|
424
|
+
}, timeoutMs);
|
|
425
|
+
timer.unref?.();
|
|
426
|
+
const finish = (code) => {
|
|
427
|
+
clearTimeout(timer);
|
|
428
|
+
// Flush the decoder unless the tail was cut: a stream that ended mid-character has nothing more
|
|
429
|
+
// coming, while a cap that cut one has deliberately dropped those bytes.
|
|
430
|
+
if (!truncated)
|
|
431
|
+
text += stdout.end();
|
|
432
|
+
resolve({ text, truncated, code, failure });
|
|
433
|
+
};
|
|
434
|
+
child.stdout?.on('data', (chunk) => {
|
|
435
|
+
if (truncated)
|
|
436
|
+
return;
|
|
437
|
+
if (bytes + chunk.length > cap) {
|
|
438
|
+
// The cap is a byte count and it is applied before decoding, so the retained text cannot
|
|
439
|
+
// exceed it. A character the boundary cuts in half is left to the decoder rather than shown
|
|
440
|
+
// as a replacement character; the output is marked truncated either way.
|
|
441
|
+
text += stdout.write(chunk.subarray(0, Math.max(0, cap - bytes)));
|
|
442
|
+
truncated = true;
|
|
443
|
+
// Nothing more is wanted: stop the producer instead of reading a large output to the end.
|
|
444
|
+
child.kill();
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
bytes += chunk.length;
|
|
448
|
+
text += stdout.write(chunk);
|
|
449
|
+
});
|
|
450
|
+
child.stderr?.on('data', (chunk) => { failure += stderr.write(chunk); });
|
|
451
|
+
child.once('error', error => {
|
|
452
|
+
clearTimeout(timer);
|
|
453
|
+
reject(new Error(`Could not run ${program}: ${error.message}`));
|
|
454
|
+
});
|
|
455
|
+
child.once('close', code => { finish(code); });
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* The newest `keep` entries of a directory, by modification time.
|
|
460
|
+
*
|
|
461
|
+
* Directory order is arbitrary, so a cap applied before timestamps are read can hide a just-written
|
|
462
|
+
* file behind older ones. The scan runs at bounded concurrency and retains only `keep` entries, so a
|
|
463
|
+
* directory with tens of thousands of files costs a fixed number of in-flight stats and fixed memory.
|
|
464
|
+
*/
|
|
465
|
+
async function newestByMtime(folder, names, keep) {
|
|
466
|
+
const newest = [];
|
|
467
|
+
let next = 0;
|
|
468
|
+
const worker = async () => {
|
|
469
|
+
while (next < names.length) {
|
|
470
|
+
const name = names[next++];
|
|
471
|
+
const info = await stat(join(folder, name)).catch(() => undefined);
|
|
472
|
+
if (!info)
|
|
473
|
+
continue;
|
|
474
|
+
const position = newest.findIndex(entry => entry.info.mtimeMs < info.mtimeMs);
|
|
475
|
+
if (position === -1) {
|
|
476
|
+
if (newest.length < keep)
|
|
477
|
+
newest.push({ name, info });
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
newest.splice(position, 0, { name, info });
|
|
481
|
+
if (newest.length > keep)
|
|
482
|
+
newest.pop();
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
await Promise.all(Array.from({ length: Math.min(8, names.length) }, worker));
|
|
487
|
+
return newest;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Map run identity to the session turn that produced it, so a run list can name its task.
|
|
491
|
+
*
|
|
492
|
+
* Only the runs in `wanted` are looked up, and only the newest session files are opened, stopping as
|
|
493
|
+
* soon as every one of them is titled: a long-lived installation accumulates a snapshot per resumed
|
|
494
|
+
* task, each carrying accumulated history, and parsing the whole archive to title a page of runs
|
|
495
|
+
* would make opening the Runs view grow with everything the installation has ever done.
|
|
496
|
+
*/
|
|
497
|
+
async function runTitles(directory, wanted) {
|
|
498
|
+
const titles = new Map();
|
|
499
|
+
if (!wanted.size)
|
|
500
|
+
return titles;
|
|
501
|
+
const folder = join(directory, 'sessions');
|
|
502
|
+
let names;
|
|
503
|
+
try {
|
|
504
|
+
names = await readdir(folder);
|
|
505
|
+
}
|
|
506
|
+
catch {
|
|
507
|
+
return titles;
|
|
508
|
+
}
|
|
509
|
+
const newest = await newestByMtime(folder, names.filter(name => name.endsWith('.json')), MAX_SESSION_SCAN);
|
|
510
|
+
for (const { name } of newest) {
|
|
511
|
+
if (titles.size >= wanted.size)
|
|
512
|
+
break;
|
|
513
|
+
try {
|
|
514
|
+
const record = JSON.parse(await readFile(join(folder, name), 'utf8'));
|
|
515
|
+
if (!validSavedSession(record))
|
|
516
|
+
continue;
|
|
517
|
+
for (const turn of record.history ?? []) {
|
|
518
|
+
// A continued turn is labelled by the message that continued it: the turn's own task is the
|
|
519
|
+
// stopped attempt's, so the Runs view and the search haystack would otherwise repeat the old
|
|
520
|
+
// prompt instead of the words the user last sent. The transcript's rule, applied to titles.
|
|
521
|
+
if (turn.runId && wanted.has(turn.runId) && !titles.has(turn.runId))
|
|
522
|
+
titles.set(turn.runId, { task: turn.direction ?? turn.task, session: record });
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
catch { /* One damaged session must not hide the other runs. */ }
|
|
526
|
+
}
|
|
527
|
+
return titles;
|
|
528
|
+
}
|
|
529
|
+
/** How deep a session's parent chain is walked to find the record that produced a run. */
|
|
530
|
+
const MAX_LINEAGE_WALK = 64;
|
|
531
|
+
/**
|
|
532
|
+
* The session that first produced a run, starting from a record that merely carries its turn.
|
|
533
|
+
*
|
|
534
|
+
* Continuation forks copy their parent's whole history, so an ancestor's run is commonly found in a
|
|
535
|
+
* newer child first — and a record's timestamp cannot tell the two apart, because a later save of
|
|
536
|
+
* the old session moves it the other way. `parentId` is the link that can: a record's own history
|
|
537
|
+
* is the only one that produced its turns, a fork merely inherits them, so walking up while the
|
|
538
|
+
* parent still carries the turn ends at the session that ran it. Taking the first match instead
|
|
539
|
+
* would attribute the run to a descendant — and `View trajectory` on the original would report that
|
|
540
|
+
* it has no run at all.
|
|
541
|
+
*/
|
|
542
|
+
async function originatingSession(directory, candidate, runId, cache) {
|
|
543
|
+
const carries = (record) => (record.history ?? []).some(turn => turn.runId === runId);
|
|
544
|
+
let origin = candidate;
|
|
545
|
+
const visited = new Set([candidate.id]);
|
|
546
|
+
// A damaged record can name a parent chain that loops back on itself; the set breaks that, and
|
|
547
|
+
// the depth cap keeps one listing from turning a pathological chain into unbounded reads.
|
|
548
|
+
for (let depth = 0; depth < MAX_LINEAGE_WALK && origin.parentId !== undefined; depth += 1) {
|
|
549
|
+
const parentId = origin.parentId;
|
|
550
|
+
if (visited.has(parentId))
|
|
551
|
+
break;
|
|
552
|
+
visited.add(parentId);
|
|
553
|
+
if (!cache.has(parentId)) {
|
|
554
|
+
cache.set(parentId, await readFile(join(directory, 'sessions', `${parentId}.json`), 'utf8')
|
|
555
|
+
.then(text => JSON.parse(text))
|
|
556
|
+
.catch(() => undefined));
|
|
557
|
+
}
|
|
558
|
+
const parent = cache.get(parentId);
|
|
559
|
+
if (parent === undefined || !validSavedSession(parent) || !carries(parent))
|
|
560
|
+
break;
|
|
561
|
+
origin = parent;
|
|
562
|
+
}
|
|
563
|
+
return origin;
|
|
564
|
+
}
|
|
565
|
+
export async function listRuns(directory, limit) {
|
|
566
|
+
const bound = Number.isSafeInteger(limit) && limit > 0 ? Math.min(MAX_RUNS, limit) : 50;
|
|
567
|
+
const runs = runRecordsDirectory(directory);
|
|
568
|
+
let names;
|
|
569
|
+
try {
|
|
570
|
+
names = await readdir(runs);
|
|
571
|
+
}
|
|
572
|
+
catch (error) {
|
|
573
|
+
if (error.code === 'ENOENT')
|
|
574
|
+
return [];
|
|
575
|
+
throw error;
|
|
576
|
+
}
|
|
577
|
+
// Bodies are read only for the newest records, and titles only for those runs. The runs folder
|
|
578
|
+
// also holds resume claims and node checkpoints; only the `.json` result records are runs, and
|
|
579
|
+
// the legacy `.checkpoint.json` spelling is filtered too so an old file never shows as a second
|
|
580
|
+
// run of an id that never ran.
|
|
581
|
+
const stamped = await newestByMtime(runs, names.filter(name => name.endsWith('.json') && !name.endsWith('.checkpoint.json')), bound);
|
|
582
|
+
const records = await Promise.all(stamped.map(async ({ name, info }) => {
|
|
583
|
+
try {
|
|
584
|
+
const value = JSON.parse(await readFile(join(runs, name), 'utf8'));
|
|
585
|
+
const id = typeof value.id === 'string' ? value.id : name.slice(0, -5);
|
|
586
|
+
const usage = (value.usage ?? {});
|
|
587
|
+
// The result file is written when the run finishes, so its timestamp is an end time. The
|
|
588
|
+
// journal's first event is the start, which is what a duration is measured from.
|
|
589
|
+
const startedAt = await firstEventTime(join(runs, `${id}.jsonl`)) ?? info.mtime.toISOString();
|
|
590
|
+
return {
|
|
591
|
+
id, status: String(value.status ?? 'unknown'), graph: String(typeof value.graph === 'object' && value.graph ? value.graph.id ?? 'default' : value.graph ?? 'default'),
|
|
592
|
+
provider: String(value.provider ?? ''), model: String(value.model ?? ''),
|
|
593
|
+
startedAt, updatedAt: info.mtime.toISOString(),
|
|
594
|
+
usage: { inputTokens: usage.inputTokens ?? 0, outputTokens: usage.outputTokens ?? 0, requests: usage.requests ?? 0, ...(usage.cacheRead === undefined ? {} : { cacheRead: usage.cacheRead }), ...(usage.cacheWrite === undefined ? {} : { cacheWrite: usage.cacheWrite }) },
|
|
595
|
+
toolCalls: typeof value.toolCalls === 'number' ? value.toolCalls : 0,
|
|
596
|
+
...(typeof value.sessionId === 'string' ? { sessionId: value.sessionId } : {}),
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
catch {
|
|
600
|
+
return undefined;
|
|
601
|
+
}
|
|
602
|
+
}));
|
|
603
|
+
const selected = records.filter((value) => value !== undefined)
|
|
604
|
+
.sort((left, right) => Date.parse(right.updatedAt) - Date.parse(left.updatedAt));
|
|
605
|
+
const titles = await runTitles(directory, new Set(selected.map(run => run.id)));
|
|
606
|
+
// One walk cache for the whole listing: two legacy runs of one lineage share their ancestor reads.
|
|
607
|
+
const lineage = new Map();
|
|
608
|
+
return await Promise.all(selected.map(async (run) => {
|
|
609
|
+
const title = titles.get(run.id);
|
|
610
|
+
// Older records may not name their session; the session history does, which is also where the
|
|
611
|
+
// task title comes from. A record that names its own session is taken at its word — the fill is
|
|
612
|
+
// for records written before the field existed, and those get their owner from the lineage's
|
|
613
|
+
// originating record rather than from whichever copy of the history the scan reached first.
|
|
614
|
+
if (title === undefined)
|
|
615
|
+
return run;
|
|
616
|
+
if (run.sessionId !== undefined)
|
|
617
|
+
return { ...run, task: title.task };
|
|
618
|
+
const origin = await originatingSession(directory, title.session, run.id, lineage);
|
|
619
|
+
return { ...run, task: title.task, sessionId: origin.id };
|
|
620
|
+
}));
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Bytes read per backward pass while looking for a journal's newest events.
|
|
624
|
+
*
|
|
625
|
+
* The slice a client wants is the end of the file, and a run can write a journal far larger than
|
|
626
|
+
* that slice: reading it forward to keep the last five thousand lines would cost latency, disk, and
|
|
627
|
+
* JSON parsing proportional to the whole file for every open of the run's detail. Blocks are read
|
|
628
|
+
* backwards from the end and concatenated as bytes, so a multi-byte character split across a block
|
|
629
|
+
* boundary is decoded once, after the window is assembled.
|
|
630
|
+
*/
|
|
631
|
+
const JOURNAL_TAIL_BLOCK_BYTES = 256 * 1024;
|
|
632
|
+
/**
|
|
633
|
+
* How many bytes of a journal's tail are assembled at most.
|
|
634
|
+
*
|
|
635
|
+
* The event count alone is not a bound: a tool event may carry up to 24,000 characters, so five
|
|
636
|
+
* thousand of them approach 120 MB of reads, concatenation, and parsing for one open of a run's
|
|
637
|
+
* detail. A byte budget is what keeps the work proportional to what a client can display, and a
|
|
638
|
+
* window that stops here is reported as truncated like any other.
|
|
639
|
+
*/
|
|
640
|
+
const JOURNAL_TAIL_MAX_BYTES = 8 * 1024 * 1024;
|
|
641
|
+
/**
|
|
642
|
+
* The newest `limit` lines of a journal, read from the end of the file.
|
|
643
|
+
*
|
|
644
|
+
* Returns the parsed lines in file order, plus whether older lines exist beyond the window. At most
|
|
645
|
+
* one block is read past what the limit needs, so the work follows the slice, not the file.
|
|
646
|
+
*/
|
|
647
|
+
async function readJournalTail(path, limit) {
|
|
648
|
+
let handle;
|
|
649
|
+
try {
|
|
650
|
+
handle = await open(path, 'r');
|
|
651
|
+
const { size } = await handle.stat();
|
|
652
|
+
const blocks = [];
|
|
653
|
+
let position = size;
|
|
654
|
+
// Newlines seen in what has been read so far, which is what says whether the window already
|
|
655
|
+
// covers more lines than the limit.
|
|
656
|
+
let newlines = 0;
|
|
657
|
+
let bytes = 0;
|
|
658
|
+
while (position > 0 && newlines <= limit && bytes < JOURNAL_TAIL_MAX_BYTES) {
|
|
659
|
+
const length = Math.min(JOURNAL_TAIL_BLOCK_BYTES, position);
|
|
660
|
+
position -= length;
|
|
661
|
+
const block = Buffer.allocUnsafe(length);
|
|
662
|
+
const { bytesRead } = await handle.read(block, 0, length, position);
|
|
663
|
+
blocks.unshift(block.subarray(0, bytesRead));
|
|
664
|
+
bytes += bytesRead;
|
|
665
|
+
for (const byte of block.subarray(0, bytesRead))
|
|
666
|
+
if (byte === 0x0a)
|
|
667
|
+
newlines += 1;
|
|
668
|
+
}
|
|
669
|
+
const text = Buffer.concat(blocks).toString('utf8');
|
|
670
|
+
const lines = text.split('\n');
|
|
671
|
+
// The window starts mid-file unless it reached byte zero, so its first line is a fragment of a
|
|
672
|
+
// line whose beginning was not read; it is not an event.
|
|
673
|
+
if (position > 0)
|
|
674
|
+
lines.shift();
|
|
675
|
+
return { lines, truncated: position > 0 || newlines > limit };
|
|
676
|
+
}
|
|
677
|
+
catch (error) {
|
|
678
|
+
if (error.code !== 'ENOENT')
|
|
679
|
+
throw error;
|
|
680
|
+
return { lines: [], truncated: false };
|
|
681
|
+
}
|
|
682
|
+
finally {
|
|
683
|
+
await handle?.close().catch(() => { });
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Read one run's result and its journal.
|
|
688
|
+
*
|
|
689
|
+
* The slice returned is the *newest* part of the journal, because that is what a detail view is read
|
|
690
|
+
* for — the run's latest activity, with tool calls whose results arrived, rather than the opening
|
|
691
|
+
* events of a run whose outcome the record already reports. Reading starts at the end of the file, so
|
|
692
|
+
* a journal larger than the cap costs what the slice needs and not what the file holds, and
|
|
693
|
+
* `truncated` says older events exist beyond it so a client can label the slice instead of presenting
|
|
694
|
+
* it as the whole journal.
|
|
695
|
+
*/
|
|
696
|
+
export async function readRun(directory, id) {
|
|
697
|
+
const path = runRecordPath(directory, id, 'json');
|
|
698
|
+
const result = JSON.parse(await readFile(path, 'utf8'));
|
|
699
|
+
const journal = runRecordPath(directory, id, 'jsonl');
|
|
700
|
+
const { lines, truncated } = await readJournalTail(journal, MAX_RUN_EVENTS);
|
|
701
|
+
const events = [];
|
|
702
|
+
for (const line of lines) {
|
|
703
|
+
if (!line.trim())
|
|
704
|
+
continue;
|
|
705
|
+
try {
|
|
706
|
+
events.push(JSON.parse(line));
|
|
707
|
+
}
|
|
708
|
+
catch {
|
|
709
|
+
continue;
|
|
710
|
+
} // A torn final line is not a client error.
|
|
711
|
+
}
|
|
712
|
+
// The window may hold one block more than the limit, and a journal whose lines are short can hold
|
|
713
|
+
// many: the newest entries are the ones that stay.
|
|
714
|
+
return { result, events: events.slice(-MAX_RUN_EVENTS), truncated };
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Where one run's stored result record lives, and whether it holds a finished trajectory.
|
|
718
|
+
*
|
|
719
|
+
* Saving a trajectory as JSON and showing it in the file manager both need the file itself rather than its
|
|
720
|
+
* contents, and this home is the only thing that knows where its records go — so the answer is the engine's
|
|
721
|
+
* own path plus whether it is actually there. A run whose record was never written, or has since been
|
|
722
|
+
* deleted, is answered with `exists: false` rather than a throw: "there is nothing to save yet" is a control
|
|
723
|
+
* the client holds back, not a failure it reports. The id is validated by the same rule every other run read
|
|
724
|
+
* uses, so a crafted id cannot name a file outside this home's `runs` directory.
|
|
725
|
+
*
|
|
726
|
+
* A running attempt's open record answers `exists: false` as well. The record is written the moment the run
|
|
727
|
+
* starts and finalization rewrites it in place, so its presence is not a trajectory being finished — a copy
|
|
728
|
+
* taken mid-rewrite can be half of two records. The stat alone used to call that file exportable; reading it
|
|
729
|
+
* is what lets the answer match what the document is.
|
|
730
|
+
*/
|
|
731
|
+
export async function runRecordFile(directory, id) {
|
|
732
|
+
// Resolved before it is answered: a home spelled relative to this process's working directory makes
|
|
733
|
+
// record paths only that process can use, and the shell that copies and reveals them is a different one.
|
|
734
|
+
const path = resolve(runRecordPath(directory, id, 'json'));
|
|
735
|
+
let raw;
|
|
736
|
+
try {
|
|
737
|
+
raw = await readFile(path, 'utf8');
|
|
738
|
+
}
|
|
739
|
+
catch (error) {
|
|
740
|
+
const code = error.code;
|
|
741
|
+
if (code === 'ENOENT' || code === 'ENOTDIR' || code === 'EISDIR')
|
|
742
|
+
return { path, exists: false };
|
|
743
|
+
throw error;
|
|
744
|
+
}
|
|
745
|
+
try {
|
|
746
|
+
if (JSON.parse(raw).status === 'running')
|
|
747
|
+
return { path, exists: false };
|
|
748
|
+
}
|
|
749
|
+
catch {
|
|
750
|
+
// Unparsable bytes are a record caught mid-rewrite: not a document to offer, whichever run owns it.
|
|
751
|
+
return { path, exists: false };
|
|
752
|
+
}
|
|
753
|
+
return { path, exists: true };
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Where a session's trajectory log lives — the per-session mirror of `runs.files`.
|
|
757
|
+
*
|
|
758
|
+
* A session trajectory is append-only, but an independent shell read while the engine is
|
|
759
|
+
* appending a large JSONL line can end mid-record. Withhold the export action while an open-run
|
|
760
|
+
* claim exists for this session, including a live run in another engine. Finalization flushes
|
|
761
|
+
* the trajectory before clearing the claim, so a finished session becomes available only after
|
|
762
|
+
* all its records are written. The shell additionally guards snapshots against an append that
|
|
763
|
+
* begins after this lookup. Missing files return `exists: false`; genuine I/O failures surface
|
|
764
|
+
* to the caller so it can keep the unrelated run-record controls usable.
|
|
765
|
+
*/
|
|
766
|
+
export async function sessionTrajectoryFile(directory, id) {
|
|
767
|
+
if (typeof id !== 'string' || id.trim() !== id || !/^[\w-]{1,64}$/.test(id))
|
|
768
|
+
throw new Error('Invalid session id');
|
|
769
|
+
// Resolved before it is answered, for the same reason the run record path is: the shell that
|
|
770
|
+
// copies and reveals the file is a different process from this one.
|
|
771
|
+
const path = resolve(join(directory, 'trajectories', `${id}.jsonl`));
|
|
772
|
+
try {
|
|
773
|
+
const info = await stat(path);
|
|
774
|
+
if (!info.isFile())
|
|
775
|
+
return { path, exists: false };
|
|
776
|
+
if (await sessionHasOpenRun(directory, id))
|
|
777
|
+
return { path, exists: false };
|
|
778
|
+
return { path, exists: true };
|
|
779
|
+
}
|
|
780
|
+
catch (error) {
|
|
781
|
+
const code = error.code;
|
|
782
|
+
if (code === 'ENOENT' || code === 'ENOTDIR' || code === 'EISDIR')
|
|
783
|
+
return { path, exists: false };
|
|
784
|
+
throw error;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
/** How many records one page of a session's trajectory log carries. */
|
|
788
|
+
const MAX_TRAJECTORY_PAGE_RECORDS = 500;
|
|
789
|
+
/**
|
|
790
|
+
* How much record data one page carries.
|
|
791
|
+
*
|
|
792
|
+
* Every model request repeats the whole conversation history, so a page measured in records alone
|
|
793
|
+
* would carry the same prompt again and again and grow with the square of the session's length.
|
|
794
|
+
* The bound is under what a linked machine's relay carries, so a page always fits the transport.
|
|
795
|
+
*/
|
|
796
|
+
const MAX_TRAJECTORY_PAGE_BYTES = 8 * 1024 * 1024;
|
|
797
|
+
/**
|
|
798
|
+
* How much one record may carry.
|
|
799
|
+
*
|
|
800
|
+
* A record larger than this is carried as a marker instead of its own content: a page has to fit
|
|
801
|
+
* the transport that carries it, and one record must not be able to make a page that no transport
|
|
802
|
+
* will take.
|
|
803
|
+
*/
|
|
804
|
+
const MAX_TRAJECTORY_RECORD_BYTES = 4 * 1024 * 1024;
|
|
805
|
+
/** How much of the log one read may scan. */
|
|
806
|
+
const MAX_TRAJECTORY_SCAN_BYTES = 256 * 1024 * 1024;
|
|
807
|
+
/**
|
|
808
|
+
* A record's own fields, without the three the log writes on every line.
|
|
809
|
+
*
|
|
810
|
+
* The session id is the log's own name and says nothing about the record, and the type and time are
|
|
811
|
+
* lifted out so a reader can address them without digging through the payload.
|
|
812
|
+
*/
|
|
813
|
+
function normalizeTrajectoryRecord(record) {
|
|
814
|
+
const data = {};
|
|
815
|
+
for (const [key, value] of Object.entries(record)) {
|
|
816
|
+
if (key === 'type' || key === 'time' || key === 'sessionId')
|
|
817
|
+
continue;
|
|
818
|
+
data[key] = value;
|
|
819
|
+
}
|
|
820
|
+
return { type: record.type, time: typeof record.time === 'string' ? record.time : '', data };
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* A record, with its content held to what a page may carry.
|
|
824
|
+
*
|
|
825
|
+
* A record larger than the page's own bound is carried as a marker: the reader is told a record of
|
|
826
|
+
* that size was there, and the log stays readable and the cursor still moves.
|
|
827
|
+
*/
|
|
828
|
+
function boundedRecord(record, size) {
|
|
829
|
+
const bounded = normalizeTrajectoryRecord(record);
|
|
830
|
+
if (size <= MAX_TRAJECTORY_RECORD_BYTES)
|
|
831
|
+
return bounded;
|
|
832
|
+
bounded.data = {
|
|
833
|
+
oversized: true,
|
|
834
|
+
bytes: size,
|
|
835
|
+
note: 'The record is larger than a page can carry, so only its size is shown.',
|
|
836
|
+
};
|
|
837
|
+
return bounded;
|
|
838
|
+
}
|
|
839
|
+
/** How much of a line's head is kept, to read the type and the time the line was written with. */
|
|
840
|
+
const MAX_TRAJECTORY_LINE_HEAD_BYTES = 4 * 1024;
|
|
841
|
+
/**
|
|
842
|
+
* A log's lines, read without holding a line that is over the bound.
|
|
843
|
+
*
|
|
844
|
+
* `readline` hands a reader the whole line at once, so a log holding one enormous record would
|
|
845
|
+
* have that record materialised before anything could refuse it. The bytes are counted as they
|
|
846
|
+
* stream by, and a line over the bound is measured and dropped rather than held whole: the reader
|
|
847
|
+
* is told how big the line was, and the log stays readable.
|
|
848
|
+
*/
|
|
849
|
+
async function* readTrajectoryLines(stream) {
|
|
850
|
+
/** The bytes of the line being read, while it is small enough to hold. */
|
|
851
|
+
let held = [];
|
|
852
|
+
let heldBytes = 0;
|
|
853
|
+
/** The head of the line: the type and the time are written first, and they are all that is kept. */
|
|
854
|
+
let head = '';
|
|
855
|
+
/** The size of the line being read. */
|
|
856
|
+
let size = 0;
|
|
857
|
+
let oversized = false;
|
|
858
|
+
/** Take a piece of the line being read. */
|
|
859
|
+
const take = (segment) => {
|
|
860
|
+
size += segment.length;
|
|
861
|
+
if (head.length < MAX_TRAJECTORY_LINE_HEAD_BYTES) {
|
|
862
|
+
head += segment.toString('utf8', 0, Math.min(segment.length, MAX_TRAJECTORY_LINE_HEAD_BYTES - head.length));
|
|
863
|
+
}
|
|
864
|
+
if (oversized)
|
|
865
|
+
return;
|
|
866
|
+
heldBytes += segment.length;
|
|
867
|
+
if (heldBytes > MAX_TRAJECTORY_RECORD_BYTES) {
|
|
868
|
+
oversized = true;
|
|
869
|
+
held = [];
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
held.push(segment);
|
|
873
|
+
};
|
|
874
|
+
/** The line as it stands; the next one starts empty. */
|
|
875
|
+
const takeLine = () => {
|
|
876
|
+
const line = { text: oversized ? '' : Buffer.concat(held).toString('utf8'), head, size, oversized };
|
|
877
|
+
held = [];
|
|
878
|
+
heldBytes = 0;
|
|
879
|
+
head = '';
|
|
880
|
+
size = 0;
|
|
881
|
+
oversized = false;
|
|
882
|
+
return line;
|
|
883
|
+
};
|
|
884
|
+
for await (const chunk of stream) {
|
|
885
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
886
|
+
let start = 0;
|
|
887
|
+
for (let index = 0; index < buffer.length; index += 1) {
|
|
888
|
+
if (buffer[index] !== 0x0a)
|
|
889
|
+
continue;
|
|
890
|
+
take(buffer.subarray(start, index));
|
|
891
|
+
yield takeLine();
|
|
892
|
+
start = index + 1;
|
|
893
|
+
}
|
|
894
|
+
const tail = buffer.subarray(start);
|
|
895
|
+
if (tail.length > 0)
|
|
896
|
+
take(tail);
|
|
897
|
+
}
|
|
898
|
+
// A last line the writer never ended is a torn record: the log is read while it is being
|
|
899
|
+
// appended to, and a record that is not terminated was not finished. It is left out rather than
|
|
900
|
+
// read as a record that may be removed a moment later.
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* A record too large to carry, told from the head of its line.
|
|
904
|
+
*
|
|
905
|
+
* The log writes the type and the time first, so the head of an enormous line still says what it
|
|
906
|
+
* was. A line that does not say is reported as an oversized record of its own.
|
|
907
|
+
*/
|
|
908
|
+
function oversizedRecord(head, size) {
|
|
909
|
+
const type = /^\s*\{\s*"type"\s*:\s*"([^"]*)"/.exec(head)?.[1] ?? 'oversized';
|
|
910
|
+
const time = /^\s*\{\s*"type"\s*:\s*"[^"]*"\s*,\s*"time"\s*:\s*"([^"]*)"/.exec(head)?.[1] ?? '';
|
|
911
|
+
return { type, time, data: { oversized: true, bytes: size, note: 'The record is larger than a page can carry, so only its size is shown.' } };
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Read one page of a session's trajectory log.
|
|
915
|
+
*
|
|
916
|
+
* The log is the session's own debug file: every run and every resume appends to it, so it holds the
|
|
917
|
+
* whole conversation — each prompt, each model call, each runtime event, in the order they happened.
|
|
918
|
+
* A client reads it the way it reads a long document, one page at a time, and the page says how much
|
|
919
|
+
* of the log it did not carry so the reader can say so rather than present a slice as the whole.
|
|
920
|
+
*
|
|
921
|
+
* The records are read in the order the log wrote them, from the beginning: a debugging reader wants
|
|
922
|
+
* the first prompt as much as the last one. The scan continues past the page to count what the log
|
|
923
|
+
* holds, so the reader can say "record 200 of 3,412" instead of guessing.
|
|
924
|
+
*
|
|
925
|
+
* The page's position in the log is a **line**, and the page answers with the line the next one
|
|
926
|
+
* starts at. A reader that asked for a page past the end of what one read can cover is answered
|
|
927
|
+
* from where the last page stopped rather than from the beginning, so the rest of a long log stays
|
|
928
|
+
* reachable page by page.
|
|
929
|
+
*
|
|
930
|
+
* A log that is still being appended to is read as it stands. The engine never rewrites one, so a
|
|
931
|
+
* record that is half-written is a torn line and is skipped rather than guessed at.
|
|
932
|
+
*
|
|
933
|
+
* `folder` names which of the home's logs to read: the engine's `trajectories`, or the
|
|
934
|
+
* `browser-trajectories` the CLI's browser workspace records its own runs to.
|
|
935
|
+
*/
|
|
936
|
+
export async function readSessionTrajectory(directory, id, offset, limit, folder = 'trajectories') {
|
|
937
|
+
const path = resolve(join(directory, folder, `${id}.jsonl`));
|
|
938
|
+
const start = typeof offset === 'number' && Number.isInteger(offset) && offset > 0 ? offset : 0;
|
|
939
|
+
const wanted = typeof limit === 'number' && Number.isInteger(limit) && limit > 0
|
|
940
|
+
? Math.min(limit, MAX_TRAJECTORY_PAGE_RECORDS) : MAX_TRAJECTORY_PAGE_RECORDS;
|
|
941
|
+
const records = [];
|
|
942
|
+
let total = 0;
|
|
943
|
+
let carried = 0;
|
|
944
|
+
let scanned = 0;
|
|
945
|
+
let line = 0;
|
|
946
|
+
/** The line the next page starts at: the line after the last record this page carries. */
|
|
947
|
+
let next = start;
|
|
948
|
+
/** The records the log holds past the page. */
|
|
949
|
+
let after = 0;
|
|
950
|
+
let full = false;
|
|
951
|
+
let truncated = false;
|
|
952
|
+
let exists = true;
|
|
953
|
+
try {
|
|
954
|
+
const stream = createReadStream(path);
|
|
955
|
+
try {
|
|
956
|
+
for await (const entry of readTrajectoryLines(stream)) {
|
|
957
|
+
line += 1;
|
|
958
|
+
const size = entry.size;
|
|
959
|
+
// The budget covers the tail the reader asked for, not the way to it: a page past the
|
|
960
|
+
// budget is still served, because the way to it has to be read either way. A budget that
|
|
961
|
+
// stopped the scan before the cursor would leave the rest of the log unreachable.
|
|
962
|
+
/**
|
|
963
|
+
* Carry a record too large to hold as its size.
|
|
964
|
+
*
|
|
965
|
+
* The log stays readable and the cursor still moves, and the line was never held whole.
|
|
966
|
+
*/
|
|
967
|
+
const carryOversized = () => {
|
|
968
|
+
total += 1;
|
|
969
|
+
if (line <= start)
|
|
970
|
+
return;
|
|
971
|
+
if (full) {
|
|
972
|
+
after += 1;
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
975
|
+
if (records.length > 0 && carried + size > MAX_TRAJECTORY_PAGE_BYTES) {
|
|
976
|
+
full = true;
|
|
977
|
+
after += 1;
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
carried += size;
|
|
981
|
+
records.push(oversizedRecord(entry.head, size));
|
|
982
|
+
next = line;
|
|
983
|
+
if (records.length >= wanted)
|
|
984
|
+
full = true;
|
|
985
|
+
};
|
|
986
|
+
if (line > start) {
|
|
987
|
+
scanned += size;
|
|
988
|
+
if (scanned > MAX_TRAJECTORY_SCAN_BYTES) {
|
|
989
|
+
// The scan stopped here. The cursor moves past the line it stopped at, so the next
|
|
990
|
+
// read starts after it instead of asking for the same place for ever. A record too
|
|
991
|
+
// large to hold is still told about, so a large model request does not disappear.
|
|
992
|
+
if (entry.oversized)
|
|
993
|
+
carryOversized();
|
|
994
|
+
truncated = true;
|
|
995
|
+
if (records.length === 0)
|
|
996
|
+
next = line;
|
|
997
|
+
break;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
if (entry.oversized) {
|
|
1001
|
+
carryOversized();
|
|
1002
|
+
continue;
|
|
1003
|
+
}
|
|
1004
|
+
const raw = entry.text;
|
|
1005
|
+
if (!raw.trim())
|
|
1006
|
+
continue;
|
|
1007
|
+
let parsed;
|
|
1008
|
+
try {
|
|
1009
|
+
parsed = JSON.parse(raw);
|
|
1010
|
+
}
|
|
1011
|
+
catch {
|
|
1012
|
+
continue;
|
|
1013
|
+
} // A torn line is not a record.
|
|
1014
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed))
|
|
1015
|
+
continue;
|
|
1016
|
+
const record = parsed;
|
|
1017
|
+
if (typeof record.type !== 'string')
|
|
1018
|
+
continue;
|
|
1019
|
+
total += 1;
|
|
1020
|
+
// Before the cursor the log is only counted, and past the page it is only counted: the
|
|
1021
|
+
// reader asked for a window, and the count is what tells it how much it left out.
|
|
1022
|
+
if (line <= start)
|
|
1023
|
+
continue;
|
|
1024
|
+
if (full) {
|
|
1025
|
+
after += 1;
|
|
1026
|
+
continue;
|
|
1027
|
+
}
|
|
1028
|
+
// A record larger than the page budget still goes on the page: a page that carried
|
|
1029
|
+
// nothing would leave the reader asking for the same offset for ever.
|
|
1030
|
+
if (records.length > 0 && carried + size > MAX_TRAJECTORY_PAGE_BYTES) {
|
|
1031
|
+
full = true;
|
|
1032
|
+
after += 1;
|
|
1033
|
+
continue;
|
|
1034
|
+
}
|
|
1035
|
+
carried += size;
|
|
1036
|
+
records.push(boundedRecord(record, size));
|
|
1037
|
+
next = line;
|
|
1038
|
+
if (records.length >= wanted)
|
|
1039
|
+
full = true;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
finally {
|
|
1043
|
+
stream.destroy();
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
catch (error) {
|
|
1047
|
+
const code = error.code;
|
|
1048
|
+
if (code === 'ENOENT' || code === 'ENOTDIR' || code === 'EISDIR')
|
|
1049
|
+
exists = false;
|
|
1050
|
+
else
|
|
1051
|
+
throw error;
|
|
1052
|
+
}
|
|
1053
|
+
return {
|
|
1054
|
+
path, exists, offset: start, nextOffset: next, count: records.length, total, records,
|
|
1055
|
+
// The log holds more past this page when the scan found records there, or when the scan
|
|
1056
|
+
// stopped before it could say.
|
|
1057
|
+
hasMore: after > 0 || truncated,
|
|
1058
|
+
truncated,
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
/**
|
|
1062
|
+
* One line describing a configured MCP server, without anything that authenticates it.
|
|
1063
|
+
*
|
|
1064
|
+
* A stdio command line can carry `--token <value>` and an HTTP URL can carry a query string; both are
|
|
1065
|
+
* permitted by the configuration schema, and both reach this renderer's Settings view. Only the
|
|
1066
|
+
* command itself and the URL's scheme, host, and path are reported, matching the deliberate omission
|
|
1067
|
+
* of MCP environment and header values.
|
|
1068
|
+
*/
|
|
1069
|
+
export function summarizeMcpServer(server) {
|
|
1070
|
+
if (server.transport === 'stdio')
|
|
1071
|
+
return server.command;
|
|
1072
|
+
try {
|
|
1073
|
+
const url = new URL(server.url);
|
|
1074
|
+
return `${url.protocol}//${url.host}${url.pathname}`;
|
|
1075
|
+
}
|
|
1076
|
+
catch {
|
|
1077
|
+
return '';
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
/** Installed skills, plugins, and configured MCP servers. Secrets in env/headers are never included. */
|
|
1081
|
+
export async function listExtensions(config, signal, directory) {
|
|
1082
|
+
const map = (entry) => ({ id: entry.id, name: entry.name, description: entry.description, enabled: entry.enabled, ...(entry.unavailable ? { unavailable: true } : {}), ...(entry.repository ? { repository: entry.repository } : {}), ...(entry.relativePath === undefined ? {} : { relativePath: entry.relativePath }), ...(entry.command ? { command: entry.command } : {}) });
|
|
1083
|
+
// Discovery stops at its own bound, and the notice it produces is the only thing that says so: a
|
|
1084
|
+
// client that showed the list without it would present a capped catalogue as the whole installation.
|
|
1085
|
+
const notices = [];
|
|
1086
|
+
const [skills, plugins] = await Promise.all([
|
|
1087
|
+
listBundles('skills', config, { signal, notices, directory }),
|
|
1088
|
+
listBundles('plugins', config, { signal, notices, directory }),
|
|
1089
|
+
]);
|
|
1090
|
+
return {
|
|
1091
|
+
skills: skills.map(map), plugins: plugins.map(map),
|
|
1092
|
+
mcpServers: Object.entries(config.mcpServers ?? {}).map(([id, server]) => ({
|
|
1093
|
+
id, transport: server.transport, enabled: server.enabled !== false,
|
|
1094
|
+
summary: summarizeMcpServer(server),
|
|
1095
|
+
})),
|
|
1096
|
+
notices,
|
|
1097
|
+
};
|
|
1098
|
+
}
|