@andorra-labs/code 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/dist/src/account-presentation.d.ts +1 -37
- package/dist/src/account-presentation.js +2 -42
- package/dist/src/activity.d.ts +0 -25
- package/dist/src/activity.js +1 -23
- package/dist/src/agent-definitions.d.ts +0 -26
- package/dist/src/agent-definitions.js +0 -43
- package/dist/src/agent-execution.d.ts +0 -2
- package/dist/src/agent-execution.js +59 -414
- package/dist/src/agent-mcp-catalog.d.ts +0 -8
- package/dist/src/agent-mcp-catalog.js +0 -2
- package/dist/src/agent-mcp.d.ts +0 -56
- package/dist/src/agent-mcp.js +14 -153
- package/dist/src/agent-modifiers.d.ts +0 -1
- package/dist/src/agent-modifiers.js +25 -68
- package/dist/src/analytics.d.ts +0 -66
- package/dist/src/analytics.js +0 -45
- package/dist/src/anthropic-console-auth.d.ts +0 -24
- package/dist/src/anthropic-console-auth.js +0 -37
- package/dist/src/anthropic-credentials.d.ts +0 -25
- package/dist/src/anthropic-credentials.js +0 -28
- package/dist/src/app-server/protocol.d.ts +19 -244
- package/dist/src/app-server/protocol.js +1 -132
- package/dist/src/app-server/reasoning.d.ts +0 -31
- package/dist/src/app-server/reasoning.js +0 -54
- package/dist/src/app-server/terminal.d.ts +0 -36
- package/dist/src/app-server/terminal.js +3 -39
- package/dist/src/app-server/workspace.d.ts +0 -167
- package/dist/src/app-server/workspace.js +4 -406
- package/dist/src/app-server.d.ts +33 -918
- package/dist/src/app-server.js +608 -2984
- package/dist/src/artifacts.d.ts +0 -10
- package/dist/src/artifacts.js +1 -11
- package/dist/src/attachments.d.ts +4 -98
- package/dist/src/attachments.js +10 -130
- package/dist/src/auth/AuthManager.d.ts +0 -93
- package/dist/src/auth/AuthManager.js +3 -165
- package/dist/src/auth/callback-page.d.ts +0 -1
- package/dist/src/auth/callback-page.js +0 -4
- package/dist/src/auth/callback.d.ts +0 -25
- package/dist/src/auth/callback.js +1 -29
- package/dist/src/auth/deployment.d.ts +0 -16
- package/dist/src/auth/deployment.js +0 -16
- package/dist/src/auth/index.d.ts +0 -11
- package/dist/src/auth/index.js +0 -11
- package/dist/src/auth/lock.d.ts +0 -1
- package/dist/src/auth/lock.js +0 -1
- package/dist/src/auth/store.d.ts +7 -108
- package/dist/src/auth/store.js +21 -129
- package/dist/src/auth/types.d.ts +0 -8
- package/dist/src/auth-commands.d.ts +0 -5
- package/dist/src/auth-commands.js +0 -1
- package/dist/src/automation-runner.d.ts +0 -9
- package/dist/src/automation-runner.js +0 -11
- package/dist/src/automation-service.d.ts +0 -10
- package/dist/src/automation-service.js +3 -17
- package/dist/src/automation-tool.js +0 -5
- package/dist/src/automation-worker-shutdown.d.ts +0 -1
- package/dist/src/automation-worker-shutdown.js +0 -3
- package/dist/src/automations.d.ts +23 -2
- package/dist/src/automations.js +91 -12
- package/dist/src/background-tasks.d.ts +0 -23
- package/dist/src/background-tasks.js +0 -11
- package/dist/src/boot-trace.d.ts +0 -13
- package/dist/src/boot-trace.js +1 -14
- package/dist/src/browser-activity.js +0 -2
- package/dist/src/browser-bridge.d.ts +0 -2
- package/dist/src/browser-bridge.js +0 -27
- package/dist/src/browser-captcha-tool.d.ts +0 -13
- package/dist/src/browser-captcha-tool.js +3 -35
- package/dist/src/browser-extensions-tool.d.ts +24 -0
- package/dist/src/browser-extensions-tool.js +137 -0
- package/dist/src/browser-extensions.d.ts +127 -0
- package/dist/src/browser-extensions.js +729 -0
- package/dist/src/browser-observation.d.ts +0 -15
- package/dist/src/browser-observation.js +1 -22
- package/dist/src/browser-panel-tool.d.ts +10 -25
- package/dist/src/browser-panel-tool.js +64 -60
- package/dist/src/browser-runner.d.ts +0 -1
- package/dist/src/browser-runner.js +7 -46
- package/dist/src/browser-server.d.ts +0 -6
- package/dist/src/browser-server.js +6 -229
- package/dist/src/browser-session.d.ts +0 -25
- package/dist/src/browser-session.js +1 -71
- package/dist/src/browser-stealth.d.ts +0 -12
- package/dist/src/browser-stealth.js +0 -36
- package/dist/src/browser-ui/app.js +7 -174
- package/dist/src/browser-ui/style.css +0 -68
- package/dist/src/browser-ui/tokens.css +11 -93
- package/dist/src/browser-view.d.ts +52 -290
- package/dist/src/browser-view.js +354 -567
- package/dist/src/capabilities.d.ts +0 -8
- package/dist/src/capabilities.js +0 -29
- package/dist/src/capsolver.d.ts +0 -13
- package/dist/src/capsolver.js +0 -15
- package/dist/src/clarification-ui.d.ts +0 -7
- package/dist/src/clarification-ui.js +0 -8
- package/dist/src/claude-executable.d.ts +0 -1
- package/dist/src/claude-executable.js +1 -2
- package/dist/src/claude-provider.d.ts +6 -19
- package/dist/src/claude-provider.js +166 -61
- package/dist/src/cli-executable.d.ts +0 -16
- package/dist/src/cli-executable.js +0 -7
- package/dist/src/cli-process.d.ts +0 -26
- package/dist/src/cli-process.js +0 -18
- package/dist/src/cli-sign-in.d.ts +0 -20
- package/dist/src/cli-sign-in.js +1 -17
- package/dist/src/cli.d.ts +3 -56
- package/dist/src/cli.js +193 -702
- package/dist/src/code-intelligence/CodeIntelligenceManager.d.ts +4 -59
- package/dist/src/code-intelligence/CodeIntelligenceManager.js +27 -100
- package/dist/src/code-intelligence/ContextLedger.d.ts +0 -4
- package/dist/src/code-intelligence/ContextLedger.js +0 -10
- package/dist/src/code-intelligence/ContextRouter.d.ts +0 -6
- package/dist/src/code-intelligence/ContextRouter.js +0 -8
- package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.d.ts +0 -2
- package/dist/src/code-intelligence/codegraph/CodeGraphProjectSession.js +5 -12
- package/dist/src/code-intelligence/codegraph/CodeGraphProvider.d.ts +0 -6
- package/dist/src/code-intelligence/codegraph/CodeGraphProvider.js +0 -6
- package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.d.ts +0 -5
- package/dist/src/code-intelligence/codegraph/CodeGraphSyncBarrier.js +1 -17
- package/dist/src/code-intelligence/codegraph/repoExploreTool.d.ts +0 -5
- package/dist/src/code-intelligence/codegraph/repoExploreTool.js +0 -5
- package/dist/src/code-intelligence/repository.d.ts +0 -9
- package/dist/src/code-intelligence/repository.js +1 -11
- package/dist/src/code-intelligence/types.d.ts +0 -8
- package/dist/src/codex-auth.d.ts +0 -44
- package/dist/src/codex-auth.js +0 -45
- package/dist/src/codex-browser-auth.d.ts +0 -13
- package/dist/src/codex-browser-auth.js +3 -20
- package/dist/src/codex-errors.js +0 -2
- package/dist/src/codex-executable.d.ts +0 -2
- package/dist/src/codex-executable.js +1 -7
- package/dist/src/codex-provider.d.ts +0 -13
- package/dist/src/codex-provider.js +1 -26
- package/dist/src/codex-rpc.d.ts +0 -10
- package/dist/src/codex-rpc.js +0 -12
- package/dist/src/coding-tools.d.ts +6 -27
- package/dist/src/coding-tools.js +193 -205
- package/dist/src/command-metrics.d.ts +0 -4
- package/dist/src/command-output-tap.d.ts +0 -11
- package/dist/src/command-output-tap.js +0 -3
- package/dist/src/command-screens.d.ts +24 -0
- package/dist/src/command-screens.js +132 -100
- package/dist/src/commands.d.ts +6 -63
- package/dist/src/commands.js +20 -100
- package/dist/src/completion-gates.d.ts +0 -47
- package/dist/src/completion-gates.js +0 -14
- package/dist/src/completion.d.ts +2 -58
- package/dist/src/completion.js +90 -186
- package/dist/src/config.d.ts +12 -116
- package/dist/src/config.js +41 -171
- package/dist/src/context-budget.d.ts +0 -22
- package/dist/src/context-budget.js +0 -44
- package/dist/src/context-compaction.d.ts +29 -6
- package/dist/src/context-compaction.js +94 -25
- package/dist/src/context-selection.d.ts +0 -24
- package/dist/src/context-selection.js +0 -34
- package/dist/src/dashboard-view.d.ts +0 -2
- package/dist/src/dashboard-view.js +0 -35
- package/dist/src/dashboard.d.ts +0 -2
- package/dist/src/dashboard.js +0 -9
- package/dist/src/deadline.d.ts +0 -45
- package/dist/src/deadline.js +0 -54
- package/dist/src/decision/ContinuationAdapter.d.ts +0 -5
- package/dist/src/decision/ContinuationAdapter.js +0 -5
- package/dist/src/decision/DecisionEngine.d.ts +0 -4
- package/dist/src/decision/DecisionManager.d.ts +0 -1
- package/dist/src/decision/DecisionManager.js +2 -7
- package/dist/src/decision/DecisionPolicy.d.ts +0 -1
- package/dist/src/decision/DecisionPolicy.js +0 -1
- package/dist/src/decision/FactContinuations.d.ts +11 -43
- package/dist/src/decision/FactContinuations.js +126 -95
- package/dist/src/decision/FactServiceGate.d.ts +0 -1
- package/dist/src/decision/FactServiceGate.js +0 -4
- package/dist/src/decision/PreparedSteps.d.ts +0 -15
- package/dist/src/decision/PreparedSteps.js +1 -11
- package/dist/src/decision/applyToolMenu.d.ts +0 -1
- package/dist/src/decision/applyToolMenu.js +1 -5
- package/dist/src/decision/checks.d.ts +15 -28
- package/dist/src/decision/checks.js +118 -49
- package/dist/src/decision/facts.d.ts +0 -16
- package/dist/src/decision/facts.js +0 -30
- package/dist/src/decision/guidancePolicy.js +0 -1
- package/dist/src/decision/hostedPolicy.d.ts +0 -6
- package/dist/src/decision/hostedPolicy.js +0 -7
- package/dist/src/decision/hostedSkills.d.ts +0 -19
- package/dist/src/decision/hostedSkills.js +0 -19
- package/dist/src/decision/optimizationPolicy.d.ts +0 -3
- package/dist/src/decision/optimizationPolicy.js +1 -4
- package/dist/src/decision/providers/AndorraDecisionProvider.d.ts +0 -7
- package/dist/src/decision/providers/AndorraDecisionProvider.js +4 -27
- package/dist/src/decision/providers/HttpDecisionProvider.d.ts +0 -2
- package/dist/src/decision/providers/HttpDecisionProvider.js +0 -6
- package/dist/src/decision/routeTools.d.ts +0 -8
- package/dist/src/decision/routeTools.js +1 -8
- package/dist/src/decision/toolFamilies.d.ts +0 -1
- package/dist/src/decision/toolFamilies.js +0 -1
- package/dist/src/decision/toolMenu.d.ts +0 -3
- package/dist/src/decision/toolMenu.js +0 -4
- package/dist/src/decision/types.d.ts +0 -6
- package/dist/src/default-graph.d.ts +0 -9
- package/dist/src/default-graph.js +0 -9
- package/dist/src/delegation-changes.d.ts +0 -56
- package/dist/src/delegation-changes.js +15 -124
- package/dist/src/diff-preview.d.ts +1 -1
- package/dist/src/diff-preview.js +4 -12
- package/dist/src/duration.d.ts +0 -50
- package/dist/src/duration.js +0 -50
- package/dist/src/efficiency.d.ts +0 -39
- package/dist/src/efficiency.js +0 -16
- package/dist/src/engine/protocol.d.ts +0 -2
- package/dist/src/engine/protocol.js +0 -2
- package/dist/src/engine-streams.d.ts +13 -0
- package/dist/src/engine-streams.js +16 -0
- package/dist/src/extensions.d.ts +3 -2
- package/dist/src/extensions.js +76 -37
- package/dist/src/favicons.d.ts +0 -26
- package/dist/src/favicons.js +0 -34
- package/dist/src/file-diff.d.ts +2 -58
- package/dist/src/file-diff.js +0 -32
- package/dist/src/file-read-key.d.ts +1 -0
- package/dist/src/file-read-key.js +5 -0
- package/dist/src/file-read-state.d.ts +0 -1
- package/dist/src/file-read-state.js +0 -4
- package/dist/src/firefox-cookies.d.ts +0 -34
- package/dist/src/firefox-cookies.js +1 -55
- package/dist/src/git-identity-audit.d.ts +27 -0
- package/dist/src/git-identity-audit.js +286 -0
- package/dist/src/git-identity-guard.d.ts +4 -0
- package/dist/src/git-identity-guard.js +998 -0
- package/dist/src/git-identity-hold.d.ts +12 -0
- package/dist/src/git-identity-hold.js +81 -0
- package/dist/src/git-summary.d.ts +0 -58
- package/dist/src/git-summary.js +2 -212
- package/dist/src/goal-completion-verification.d.ts +2 -2
- package/dist/src/goal-completion-verification.js +3 -6
- package/dist/src/graph-account.d.ts +0 -21
- package/dist/src/graph-account.js +0 -17
- package/dist/src/graph-editor-session.d.ts +0 -1
- package/dist/src/graph-editor-session.js +1 -3
- package/dist/src/graph-health.d.ts +7 -49
- package/dist/src/graph-health.js +35 -46
- package/dist/src/graph-manager-chat.d.ts +27 -128
- package/dist/src/graph-manager-chat.js +36 -166
- package/dist/src/graph-provider-portability.d.ts +1 -21
- package/dist/src/graph-provider-portability.js +6 -45
- package/dist/src/graph-quota.d.ts +0 -33
- package/dist/src/graph-quota.js +1 -44
- package/dist/src/graph-runner.d.ts +0 -1
- package/dist/src/graph-runner.js +47 -387
- package/dist/src/graph-selection.d.ts +0 -14
- package/dist/src/graph-selection.js +0 -14
- package/dist/src/graph-server.d.ts +3 -11
- package/dist/src/graph-server.js +70 -111
- package/dist/src/graph-studio-features.d.ts +0 -5
- package/dist/src/graph-studio-features.js +2 -42
- package/dist/src/graph-sync.d.ts +0 -78
- package/dist/src/graph-sync.js +5 -201
- package/dist/src/graph-tool.d.ts +0 -18
- package/dist/src/graph-tool.js +0 -27
- package/dist/src/graph-ui/app.js +229 -498
- package/dist/src/graph-ui/compat.js +0 -7
- package/dist/src/graph-ui/controls.css +47 -43
- package/dist/src/graph-ui/controls.js +0 -88
- package/dist/src/graph-ui/drafts.js +0 -12
- package/dist/src/graph-ui/edge-router.js +0 -62
- package/dist/src/graph-ui/embed.js +0 -59
- package/dist/src/graph-ui/icons.js +2 -7
- package/dist/src/graph-ui/index.html +2 -2
- package/dist/src/graph-ui/library.css +0 -5
- package/dist/src/graph-ui/manager-markdown.js +0 -11
- package/dist/src/graph-ui/manager-state.js +110 -49
- package/dist/src/graph-ui/manager.css +2 -20
- package/dist/src/graph-ui/manager.js +251 -166
- package/dist/src/graph-ui/model-picker.js +250 -0
- package/dist/src/graph-ui/provider-glyphs/alibaba-cloud.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/anthropic.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/aws-bedrock.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/claude.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/deepseek.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/fireworks.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/kimi.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/minimax.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/openai.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/opencode.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/openrouter.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/xai.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/xiaomi-mimo.png +0 -0
- package/dist/src/graph-ui/provider-glyphs/zai.png +0 -0
- package/dist/src/graph-ui/sidebar.js +2 -3
- package/dist/src/graph-ui/skill-picker.js +373 -39
- package/dist/src/graph-ui/studio-canvas.js +3 -38
- package/dist/src/graph-ui/studio.css +0 -18
- package/dist/src/graph-ui/studio.js +3 -71
- package/dist/src/graph-ui/style.css +11 -134
- package/dist/src/graph-ui/theme.js +1 -26
- package/dist/src/graph-ui/tokens.css +15 -114
- package/dist/src/graphs.d.ts +7 -156
- package/dist/src/graphs.js +72 -273
- package/dist/src/grep-regex-worker.js +0 -2
- package/dist/src/grep-regex.d.ts +1 -5
- package/dist/src/grep-regex.js +6 -8
- package/dist/src/grok-provider.d.ts +0 -17
- package/dist/src/grok-provider.js +1 -26
- package/dist/src/handoffs.d.ts +0 -11
- package/dist/src/handoffs.js +0 -13
- package/dist/src/hardened-runtime.d.ts +0 -10
- package/dist/src/hardened-runtime.js +8 -46
- package/dist/src/harness-home.d.ts +21 -0
- package/dist/src/harness-home.js +87 -0
- package/dist/src/host-process-guard.d.ts +0 -50
- package/dist/src/host-process-guard.js +0 -641
- package/dist/src/limits.d.ts +0 -64
- package/dist/src/limits.js +0 -62
- package/dist/src/managed-sign-in.d.ts +0 -12
- package/dist/src/managed-sign-in.js +0 -16
- package/dist/src/markdown.d.ts +0 -28
- package/dist/src/markdown.js +1 -175
- package/dist/src/mcp.d.ts +21 -82
- package/dist/src/mcp.js +228 -237
- package/dist/src/membership-errors.d.ts +0 -14
- package/dist/src/membership-errors.js +0 -13
- package/dist/src/membership.d.ts +2 -60
- package/dist/src/membership.js +0 -85
- package/dist/src/memory/LocalToolMemory.d.ts +0 -1
- package/dist/src/memory/LocalToolMemory.js +2 -7
- package/dist/src/memory/MemoryDistiller.js +0 -15
- package/dist/src/memory/MemoryManager.d.ts +0 -3
- package/dist/src/memory/MemoryManager.js +6 -18
- package/dist/src/memory/MemoryPolicy.d.ts +0 -2
- package/dist/src/memory/MemoryPolicy.js +0 -2
- package/dist/src/memory/MemoryProvider.d.ts +0 -6
- package/dist/src/memory/MemoryRetriever.js +0 -7
- package/dist/src/memory/PermissionMemoryProvider.d.ts +0 -1
- package/dist/src/memory/PermissionMemoryProvider.js +0 -1
- package/dist/src/memory/ProjectMemory.d.ts +42 -0
- package/dist/src/memory/ProjectMemory.js +285 -0
- package/dist/src/memory/ToolFailureLessons.d.ts +0 -3
- package/dist/src/memory/ToolFailureLessons.js +0 -6
- package/dist/src/memory/index.d.ts +1 -0
- package/dist/src/memory/index.js +1 -0
- package/dist/src/memory/providers/NoOpMemoryProvider.d.ts +0 -1
- package/dist/src/memory/providers/NoOpMemoryProvider.js +0 -1
- package/dist/src/memory/redaction.d.ts +0 -5
- package/dist/src/memory/redaction.js +0 -11
- package/dist/src/memory/repository.d.ts +0 -6
- package/dist/src/memory/repository.js +2 -12
- package/dist/src/memory/types.d.ts +0 -1
- package/dist/src/model-health-cache.d.ts +0 -38
- package/dist/src/model-health-cache.js +1 -49
- package/dist/src/model-metadata.d.ts +0 -18
- package/dist/src/model-metadata.js +2 -42
- package/dist/src/model-override.d.ts +0 -36
- package/dist/src/model-override.js +0 -43
- package/dist/src/model-tiers.d.ts +0 -13
- package/dist/src/model-tiers.js +0 -23
- package/dist/src/opencode-catalog.d.ts +0 -2
- package/dist/src/opencode-catalog.js +0 -11
- package/dist/src/opencode-cli-provider.d.ts +0 -35
- package/dist/src/opencode-cli-provider.js +1 -44
- package/dist/src/opencode-provider.d.ts +0 -2
- package/dist/src/opencode-provider.js +6 -22
- package/dist/src/package-name.d.ts +1 -0
- package/dist/src/package-name.js +1 -0
- package/dist/src/paged-transcript.d.ts +0 -11
- package/dist/src/paged-transcript.js +2 -20
- package/dist/src/palette.d.ts +0 -63
- package/dist/src/palette.js +0 -63
- package/dist/src/permissions.d.ts +0 -15
- package/dist/src/permissions.js +0 -17
- package/dist/src/powershell-pool.d.ts +0 -9
- package/dist/src/powershell-pool.js +3 -26
- package/dist/src/process-warnings.d.ts +4 -0
- package/dist/src/process-warnings.js +103 -0
- package/dist/src/profile.d.ts +0 -43
- package/dist/src/profile.js +0 -43
- package/dist/src/project-reservation.d.ts +11 -0
- package/dist/src/project-reservation.js +143 -0
- package/dist/src/provider-connection.d.ts +0 -18
- package/dist/src/provider-connection.js +0 -39
- package/dist/src/provider-engine.d.ts +0 -21
- package/dist/src/provider-engine.js +3 -98
- package/dist/src/provider-import.d.ts +0 -49
- package/dist/src/provider-import.js +0 -60
- package/dist/src/provider-keys.d.ts +1 -36
- package/dist/src/provider-keys.js +5 -48
- package/dist/src/provider-settings.d.ts +0 -2
- package/dist/src/provider-settings.js +0 -32
- package/dist/src/providers.d.ts +0 -217
- package/dist/src/providers.js +0 -315
- package/dist/src/pull-requests.d.ts +0 -173
- package/dist/src/pull-requests.js +5 -195
- package/dist/src/qa/browser/PlaywrightRunner.d.ts +0 -7
- package/dist/src/qa/browser/PlaywrightRunner.js +2 -16
- package/dist/src/qa/command-policy.d.ts +0 -23
- package/dist/src/qa/command-policy.js +0 -30
- package/dist/src/qa/guidance.d.ts +0 -21
- package/dist/src/qa/guidance.js +0 -20
- package/dist/src/qa/profile/ProjectInspector.d.ts +0 -4
- package/dist/src/qa/profile/ProjectInspector.js +0 -6
- package/dist/src/qa/profile/QaConfigLoader.d.ts +0 -7
- package/dist/src/qa/profile/QaConfigLoader.js +0 -6
- package/dist/src/qa/profile/QaProfile.d.ts +0 -7
- package/dist/src/qa/profile/QaProfile.js +0 -7
- package/dist/src/qa/profile/yaml.d.ts +0 -9
- package/dist/src/qa/profile/yaml.js +0 -13
- package/dist/src/qa/qa-authorize.d.ts +0 -19
- package/dist/src/qa/qa-authorize.js +4 -11
- package/dist/src/qa/runtime/ProcessManager.d.ts +0 -31
- package/dist/src/qa/runtime/ProcessManager.js +4 -41
- package/dist/src/qa/runtime/PtyManager.d.ts +0 -4
- package/dist/src/qa/runtime/PtyManager.js +2 -7
- package/dist/src/qa/runtime/changes.d.ts +0 -11
- package/dist/src/qa/runtime/changes.js +1 -3
- package/dist/src/qa/tools.d.ts +0 -10
- package/dist/src/qa/tools.js +0 -12
- package/dist/src/qa/types.d.ts +0 -13
- package/dist/src/react-runtime.d.ts +2 -21
- package/dist/src/react-runtime.js +106 -418
- package/dist/src/read-document-doc.d.ts +0 -6
- package/dist/src/read-document-doc.js +0 -55
- package/dist/src/read-document-docx.d.ts +0 -16
- package/dist/src/read-document-docx.js +2 -69
- package/dist/src/read-document-text.d.ts +0 -17
- package/dist/src/read-document-text.js +0 -22
- package/dist/src/read-document-tool.d.ts +0 -31
- package/dist/src/read-document-tool.js +0 -30
- package/dist/src/read-document.d.ts +0 -49
- package/dist/src/read-document.js +1 -67
- package/dist/src/read-image.d.ts +0 -32
- package/dist/src/read-image.js +0 -33
- package/dist/src/remote/cert.d.ts +1 -19
- package/dist/src/remote/cert.js +2 -51
- package/dist/src/remote/client.d.ts +0 -70
- package/dist/src/remote/client.js +2 -117
- package/dist/src/remote/command.js +0 -17
- package/dist/src/remote/engine-pool.d.ts +0 -152
- package/dist/src/remote/engine-pool.js +17 -335
- package/dist/src/remote/errors.d.ts +0 -15
- package/dist/src/remote/errors.js +0 -7
- package/dist/src/remote/network.d.ts +0 -26
- package/dist/src/remote/network.js +1 -34
- package/dist/src/remote/pairing.d.ts +16 -51
- package/dist/src/remote/pairing.js +50 -57
- package/dist/src/remote/pem.d.ts +2 -0
- package/dist/src/remote/pem.js +7 -0
- package/dist/src/remote/roots.d.ts +0 -20
- package/dist/src/remote/roots.js +0 -8
- package/dist/src/remote/serve.d.ts +0 -47
- package/dist/src/remote/serve.js +0 -30
- package/dist/src/remote/server.d.ts +0 -14
- package/dist/src/remote/server.js +1 -79
- package/dist/src/remote/types.d.ts +1 -32
- package/dist/src/remote/types.js +0 -10
- package/dist/src/run-control.d.ts +0 -7
- package/dist/src/run-control.js +0 -7
- package/dist/src/run-progress.d.ts +0 -170
- package/dist/src/run-progress.js +0 -285
- package/dist/src/run-records.d.ts +0 -443
- package/dist/src/run-records.js +44 -678
- package/dist/src/run-temp.d.ts +12 -0
- package/dist/src/run-temp.js +50 -0
- package/dist/src/runtime.d.ts +11 -227
- package/dist/src/runtime.js +0 -127
- package/dist/src/sandbox-child.js +0 -1
- package/dist/src/save-lock.d.ts +0 -12
- package/dist/src/save-lock.js +0 -28
- package/dist/src/screen-selection.d.ts +0 -23
- package/dist/src/screen-selection.js +0 -22
- package/dist/src/secret-redaction.d.ts +0 -12
- package/dist/src/secret-redaction.js +0 -45
- package/dist/src/session-changes.d.ts +4 -80
- package/dist/src/session-changes.js +25 -130
- package/dist/src/session-goal.d.ts +129 -0
- package/dist/src/session-goal.js +230 -0
- package/dist/src/session-monitor.d.ts +1 -10
- package/dist/src/session-monitor.js +2 -39
- package/dist/src/session-reaper.d.ts +0 -15
- package/dist/src/session-reaper.js +0 -14
- package/dist/src/session-skills.d.ts +15 -44
- package/dist/src/session-skills.js +75 -60
- package/dist/src/session-summary.d.ts +0 -26
- package/dist/src/session-summary.js +0 -32
- package/dist/src/session-title.d.ts +0 -1
- package/dist/src/session-title.js +0 -2
- package/dist/src/sessions.d.ts +2 -120
- package/dist/src/sessions.js +9 -178
- package/dist/src/shell.d.ts +3 -20
- package/dist/src/shell.js +8 -72
- package/dist/src/side-panel.d.ts +5 -99
- package/dist/src/side-panel.js +76 -133
- package/dist/src/sign-in-detection.d.ts +43 -0
- package/dist/src/sign-in-detection.js +154 -0
- package/dist/src/sign-in-offer.d.ts +17 -0
- package/dist/src/sign-in-offer.js +103 -0
- package/dist/src/skill-commands.d.ts +0 -1
- package/dist/src/skill-commands.js +1 -4
- package/dist/src/skills/bundled/control-browser/SKILL.md +1 -1
- package/dist/src/skills/bundled/graph-manager/SKILL.md +22 -4
- package/dist/src/skills/bundled/provenance.json +2 -2
- package/dist/src/skills/invocable-skills.d.ts +0 -18
- package/dist/src/skills/invocable-skills.js +0 -17
- package/dist/src/skills/project-skills.d.ts +0 -1
- package/dist/src/skills/project-skills.js +0 -3
- package/dist/src/skills/prompt-skills.js +0 -14
- package/dist/src/skills/runtime-skills.d.ts +1 -8
- package/dist/src/skills/runtime-skills.js +8 -32
- package/dist/src/stall-recovery.d.ts +0 -25
- package/dist/src/stall-recovery.js +0 -38
- package/dist/src/stray-files.d.ts +5 -0
- package/dist/src/stray-files.js +65 -0
- package/dist/src/structured-step.d.ts +0 -22
- package/dist/src/structured-step.js +0 -22
- package/dist/src/subagent-run.d.ts +0 -163
- package/dist/src/subagent-run.js +10 -374
- package/dist/src/subagent-tree.d.ts +32 -0
- package/dist/src/subagent-tree.js +128 -0
- package/dist/src/telemetry/aggregate.d.ts +0 -37
- package/dist/src/telemetry/aggregate.js +0 -40
- package/dist/src/telemetry/capture-core.d.ts +0 -87
- package/dist/src/telemetry/capture-core.js +0 -67
- package/dist/src/telemetry/capture.d.ts +0 -1
- package/dist/src/telemetry/capture.js +0 -3
- package/dist/src/telemetry/classify.d.ts +0 -58
- package/dist/src/telemetry/classify.js +0 -60
- package/dist/src/telemetry/decision-capture.d.ts +0 -1
- package/dist/src/telemetry/emitter.d.ts +0 -30
- package/dist/src/telemetry/emitter.js +1 -62
- package/dist/src/telemetry/gate.d.ts +0 -29
- package/dist/src/telemetry/gate.js +0 -22
- package/dist/src/telemetry/identity.d.ts +0 -13
- package/dist/src/telemetry/identity.js +0 -29
- package/dist/src/telemetry/outbox.d.ts +0 -64
- package/dist/src/telemetry/outbox.js +1 -108
- package/dist/src/telemetry/schema.d.ts +1 -49
- package/dist/src/telemetry/schema.js +1 -82
- package/dist/src/telemetry/state.d.ts +0 -53
- package/dist/src/telemetry/state.js +0 -64
- package/dist/src/telemetry/surface.d.ts +0 -31
- package/dist/src/telemetry/surface.js +1 -39
- package/dist/src/telemetry/uploader.d.ts +0 -11
- package/dist/src/telemetry/uploader.js +0 -46
- package/dist/src/telemetry/uploads.d.ts +0 -11
- package/dist/src/telemetry/uploads.js +0 -11
- package/dist/src/telemetry/version.d.ts +0 -4
- package/dist/src/telemetry/version.js +0 -14
- package/dist/src/telemetry/workspace.d.ts +0 -7
- package/dist/src/telemetry/workspace.js +1 -22
- package/dist/src/terminal-ui.d.ts +15 -524
- package/dist/src/terminal-ui.js +80 -876
- package/dist/src/test-edit-guard.d.ts +74 -0
- package/dist/src/test-edit-guard.js +269 -0
- package/dist/src/text.d.ts +0 -1
- package/dist/src/text.js +0 -1
- package/dist/src/time-limit.d.ts +0 -36
- package/dist/src/time-limit.js +0 -37
- package/dist/src/timers.d.ts +0 -161
- package/dist/src/timers.js +0 -126
- package/dist/src/todos.d.ts +0 -1
- package/dist/src/todos.js +0 -3
- package/dist/src/token-rate.d.ts +0 -94
- package/dist/src/token-rate.js +0 -154
- package/dist/src/tool-activity.d.ts +0 -6
- package/dist/src/tool-activity.js +1 -8
- package/dist/src/tool-availability.d.ts +0 -13
- package/dist/src/tool-availability.js +1 -14
- package/dist/src/tool-call-clock.d.ts +1 -4
- package/dist/src/tool-call-clock.js +0 -13
- package/dist/src/tool-catalog.d.ts +0 -11
- package/dist/src/tool-catalog.js +0 -23
- package/dist/src/tool-dependencies.d.ts +0 -5
- package/dist/src/tool-dependencies.js +0 -4
- package/dist/src/tool-diff-stats.d.ts +0 -23
- package/dist/src/tool-diff-stats.js +0 -49
- package/dist/src/tool-errors.d.ts +9 -7
- package/dist/src/tool-errors.js +13 -6
- package/dist/src/tool-failure-tracker.d.ts +3 -11
- package/dist/src/tool-failure-tracker.js +19 -27
- package/dist/src/tool-names.d.ts +0 -16
- package/dist/src/tool-names.js +0 -12
- package/dist/src/tool-profile.d.ts +6 -0
- package/dist/src/tool-profile.js +23 -0
- package/dist/src/tool-result-filter.d.ts +0 -19
- package/dist/src/tool-result-filter.js +1 -66
- package/dist/src/tool-schema-compatibility.d.ts +1 -2
- package/dist/src/tool-schema-compatibility.js +2 -7
- package/dist/src/tools.d.ts +0 -4
- package/dist/src/tools.js +11 -114
- package/dist/src/trajectory.d.ts +0 -13
- package/dist/src/trajectory.js +23 -79
- package/dist/src/transcript.d.ts +1 -37
- package/dist/src/transcript.js +11 -61
- package/dist/src/types.d.ts +2 -167
- package/dist/src/untracked-file-removal.d.ts +3 -0
- package/dist/src/untracked-file-removal.js +105 -0
- package/dist/src/update-check.d.ts +0 -14
- package/dist/src/update-check.js +2 -16
- package/dist/src/update.d.ts +4 -29
- package/dist/src/update.js +20 -98
- package/dist/src/usage-analytics.d.ts +17 -17
- package/dist/src/usage-analytics.js +168 -209
- package/dist/src/web-search.d.ts +0 -23
- package/dist/src/web-search.js +1 -27
- package/dist/src/widgets.d.ts +0 -25
- package/dist/src/widgets.js +0 -24
- package/dist/src/workspace-facts.d.ts +0 -12
- package/dist/src/workspace-facts.js +1 -18
- package/dist/src/workspace-git-metadata.d.ts +4 -5
- package/dist/src/workspace-git-metadata.js +37 -9
- package/dist/src/workspace-instructions.d.ts +3 -15
- package/dist/src/workspace-instructions.js +7 -20
- package/package.json +2 -2
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { readdir } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
const SCAN_LIMIT = 5_000;
|
|
4
|
+
const NAME_LIMIT = 150;
|
|
5
|
+
const WINDOWS_PATH_LIMIT = 260;
|
|
6
|
+
const SHOWN_NAME_CHARS = 80;
|
|
7
|
+
const SHOWN_FILES = 3;
|
|
8
|
+
export function isWindowsDeviceName(name) {
|
|
9
|
+
return /^(con|prn|aux|nul|com[1-9]|lpt[1-9])\s*(\..*)?$/i.test(name);
|
|
10
|
+
}
|
|
11
|
+
export function strayNameReason(name, directory, platform = process.platform) {
|
|
12
|
+
if (platform === 'win32' && isWindowsDeviceName(name))
|
|
13
|
+
return 'a reserved Windows device name';
|
|
14
|
+
if (name.length >= NAME_LIMIT)
|
|
15
|
+
return `a ${name.length}-character name`;
|
|
16
|
+
if (platform === 'win32' && join(directory, name).length >= WINDOWS_PATH_LIMIT)
|
|
17
|
+
return 'a path over the Windows 260-character limit';
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
export async function directoryNames(directory) {
|
|
21
|
+
try {
|
|
22
|
+
const names = await readdir(directory);
|
|
23
|
+
return names.length > SCAN_LIMIT ? undefined : new Set(names);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export async function strayFileNotice(directory, before, platform = process.platform) {
|
|
30
|
+
if (!before)
|
|
31
|
+
return '';
|
|
32
|
+
const after = await directoryNames(directory);
|
|
33
|
+
if (!after)
|
|
34
|
+
return '';
|
|
35
|
+
const found = [];
|
|
36
|
+
for (const name of after) {
|
|
37
|
+
if (before.has(name))
|
|
38
|
+
continue;
|
|
39
|
+
const reason = strayNameReason(name, directory, platform);
|
|
40
|
+
if (!reason)
|
|
41
|
+
continue;
|
|
42
|
+
const shown = name.length > SHOWN_NAME_CHARS ? `${name.slice(0, SHOWN_NAME_CHARS)}…` : name;
|
|
43
|
+
found.push(`${JSON.stringify(shown)} (${reason})`);
|
|
44
|
+
}
|
|
45
|
+
if (!found.length)
|
|
46
|
+
return '';
|
|
47
|
+
const listed = found.slice(0, SHOWN_FILES).join(', ') + (found.length > SHOWN_FILES ? ` and ${found.length - SHOWN_FILES} more` : '');
|
|
48
|
+
return `\n[Warning: this command created ${found.length === 1 ? 'a file' : 'files'} in ${directory} whose name is almost certainly a mistake: ${listed}. `
|
|
49
|
+
+ 'Delete it now unless it was intended; such a file breaks Git and other tools on Windows. '
|
|
50
|
+
+ 'The usual causes are a path and its content passed in the wrong order (Windows PowerShell binds the content of Set-Content or Add-Content as the path when a switch such as -NoNewline comes before a positional path: name -Path and -Value, or use Write) '
|
|
51
|
+
+ 'and output redirected to nul outside cmd.exe (use $null in PowerShell, /dev/null in Bash).]';
|
|
52
|
+
}
|
|
53
|
+
export async function withStrayFileNotice(directory, run) {
|
|
54
|
+
const before = await directoryNames(directory);
|
|
55
|
+
try {
|
|
56
|
+
const output = await run();
|
|
57
|
+
return output + await strayFileNotice(directory, before);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
const notice = await strayFileNotice(directory, before);
|
|
61
|
+
if (notice && error instanceof Error)
|
|
62
|
+
error.message += notice;
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import type { GenerateRequest, ModelResponse, ToolSchema } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* The structured step a vendor CLI returns in place of native tool calls.
|
|
4
|
-
*
|
|
5
|
-
* The CLI providers ask their model for exactly this object, so Andorra keeps tool execution,
|
|
6
|
-
* permissions and graph state: the vendor only ever sees tool names and JSON arguments as data.
|
|
7
|
-
*/
|
|
8
2
|
export declare const STRUCTURED_STEP_SCHEMA: {
|
|
9
3
|
type: string;
|
|
10
4
|
additionalProperties: boolean;
|
|
@@ -33,23 +27,7 @@ export declare const STRUCTURED_STEP_SCHEMA: {
|
|
|
33
27
|
};
|
|
34
28
|
export declare const STRUCTURED_STEP_PROMPT = "You are the model component of Andorra Code. The supplied conversation is the complete context. Return one structured response with text and toolCalls. To request an Andorra tool, return its name and JSON-encoded arguments in toolCalls. Andorra authorizes and executes tools and supplies observations in the next conversation. Do not use built-in tools. Otherwise return text and an empty toolCalls array.";
|
|
35
29
|
export declare const TEXT_STEP_PROMPT = "You are the text-only model component of Andorra Code. The supplied conversation is the complete context. Follow its instructions and return only the requested text. Do not call tools.";
|
|
36
|
-
/** The instruction that states a bounded text step's output allowance to the model. */
|
|
37
30
|
export declare function allowanceInstruction(maxTokens: number): string;
|
|
38
|
-
/**
|
|
39
|
-
* Hold a text step to its output allowance.
|
|
40
|
-
*
|
|
41
|
-
* The vendor CLIs have no output cap a caller can set, so the allowance is stated to the model and
|
|
42
|
-
* then enforced on what comes back: an answer whose measured visible output — or, unmeasured, its
|
|
43
|
-
* length at about four characters a token — exceeds the allowance is cut to fit and reported as
|
|
44
|
-
* `length`, which is how callers such as context compaction learn to shrink their request.
|
|
45
|
-
*/
|
|
46
31
|
export declare function boundTextStep(response: ModelResponse, maxTokens: number, visibleOutputTokens?: number): ModelResponse;
|
|
47
|
-
/** The conversation as one JSON document; images travel separately where the vendor accepts them. */
|
|
48
32
|
export declare function structuredStepPrompt(request: Pick<GenerateRequest, 'messages' | 'tools'>): string;
|
|
49
|
-
/**
|
|
50
|
-
* Validate one structured step against the tool manifest the request offered.
|
|
51
|
-
*
|
|
52
|
-
* A call outside the manifest, malformed arguments, or a repeated call is refused rather than
|
|
53
|
-
* repaired: Andorra would otherwise run something the model did not cleanly ask for.
|
|
54
|
-
*/
|
|
55
33
|
export declare function parseStructuredStep(value: unknown, tools: readonly Pick<ToolSchema, 'name'>[], vendor: string): ModelResponse;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
-
/**
|
|
4
|
-
* The structured step a vendor CLI returns in place of native tool calls.
|
|
5
|
-
*
|
|
6
|
-
* The CLI providers ask their model for exactly this object, so Andorra keeps tool execution,
|
|
7
|
-
* permissions and graph state: the vendor only ever sees tool names and JSON arguments as data.
|
|
8
|
-
*/
|
|
9
3
|
export const STRUCTURED_STEP_SCHEMA = {
|
|
10
4
|
type: 'object', additionalProperties: false, required: ['text', 'toolCalls'],
|
|
11
5
|
properties: {
|
|
@@ -18,18 +12,9 @@ export const STRUCTURED_STEP_SCHEMA = {
|
|
|
18
12
|
};
|
|
19
13
|
export const STRUCTURED_STEP_PROMPT = 'You are the model component of Andorra Code. The supplied conversation is the complete context. Return one structured response with text and toolCalls. To request an Andorra tool, return its name and JSON-encoded arguments in toolCalls. Andorra authorizes and executes tools and supplies observations in the next conversation. Do not use built-in tools. Otherwise return text and an empty toolCalls array.';
|
|
20
14
|
export const TEXT_STEP_PROMPT = 'You are the text-only model component of Andorra Code. The supplied conversation is the complete context. Follow its instructions and return only the requested text. Do not call tools.';
|
|
21
|
-
/** The instruction that states a bounded text step's output allowance to the model. */
|
|
22
15
|
export function allowanceInstruction(maxTokens) {
|
|
23
16
|
return `Keep the answer within ${maxTokens} tokens.`;
|
|
24
17
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Hold a text step to its output allowance.
|
|
27
|
-
*
|
|
28
|
-
* The vendor CLIs have no output cap a caller can set, so the allowance is stated to the model and
|
|
29
|
-
* then enforced on what comes back: an answer whose measured visible output — or, unmeasured, its
|
|
30
|
-
* length at about four characters a token — exceeds the allowance is cut to fit and reported as
|
|
31
|
-
* `length`, which is how callers such as context compaction learn to shrink their request.
|
|
32
|
-
*/
|
|
33
18
|
export function boundTextStep(response, maxTokens, visibleOutputTokens) {
|
|
34
19
|
const measured = visibleOutputTokens !== undefined && visibleOutputTokens > 0 ? visibleOutputTokens : undefined;
|
|
35
20
|
const over = measured !== undefined ? measured > maxTokens : response.text.length > maxTokens * 4;
|
|
@@ -38,7 +23,6 @@ export function boundTextStep(response, maxTokens, visibleOutputTokens) {
|
|
|
38
23
|
const keep = measured !== undefined ? Math.floor(response.text.length * maxTokens / measured) : maxTokens * 4;
|
|
39
24
|
return { ...response, text: response.text.slice(0, keep), stopReason: 'length' };
|
|
40
25
|
}
|
|
41
|
-
/** The conversation as one JSON document; images travel separately where the vendor accepts them. */
|
|
42
26
|
export function structuredStepPrompt(request) {
|
|
43
27
|
return JSON.stringify({
|
|
44
28
|
conversation: request.messages.map(({ images, providerContinuation, reasoningContent, ...message }) => ({ ...message, ...(images?.length ? { imageCount: images.length } : {}) })),
|
|
@@ -53,12 +37,6 @@ function argumentObject(value, vendor) {
|
|
|
53
37
|
function sameCalls(first, second) {
|
|
54
38
|
return isDeepStrictEqual(first.map(call => ({ name: call.name, arguments: JSON.parse(call.arguments) })), second.map(call => ({ name: call.name, arguments: JSON.parse(call.arguments) })));
|
|
55
39
|
}
|
|
56
|
-
/**
|
|
57
|
-
* Validate one structured step against the tool manifest the request offered.
|
|
58
|
-
*
|
|
59
|
-
* A call outside the manifest, malformed arguments, or a repeated call is refused rather than
|
|
60
|
-
* repaired: Andorra would otherwise run something the model did not cleanly ask for.
|
|
61
|
-
*/
|
|
62
40
|
export function parseStructuredStep(value, tools, vendor) {
|
|
63
41
|
const step = value;
|
|
64
42
|
if (!step || typeof step !== 'object' || Array.isArray(step) || typeof step.text !== 'string' || !Array.isArray(step.toolCalls) || step.toolCalls.length > 100
|
|
@@ -5,67 +5,15 @@ import type { DecisionConfig } from './decision/types.js';
|
|
|
5
5
|
import { type GraphModelHealthDependencies } from './graph-health.js';
|
|
6
6
|
import { type RunResult } from './runtime.js';
|
|
7
7
|
import type { ModelAdapter } from './types.js';
|
|
8
|
-
/**
|
|
9
|
-
* External subagent mode: the only graph an external host (Claude CLI, Codex CLI) may run.
|
|
10
|
-
*
|
|
11
|
-
* The restriction is structural — the id is a constant here, never a parameter on any surface —
|
|
12
|
-
* and the id is `default`, which `loadAccessibleGraph` resolves to the bundled single-agent
|
|
13
|
-
* Andorra Agent harness: no Orchestrator intake, no per-node provider pins, no account
|
|
14
|
-
* membership. That is what makes a one-shot external run headless-safe and lets the caller's
|
|
15
|
-
* provider/model choice reach every request the run makes.
|
|
16
|
-
*/
|
|
17
8
|
export declare const SUBAGENT_GRAPH_ID = "default";
|
|
18
9
|
export type SubagentPermissions = 'full-access' | 'read-only';
|
|
19
|
-
/**
|
|
20
|
-
* The longest task a subagent run accepts.
|
|
21
|
-
*
|
|
22
|
-
* The bound is the engine's own, and it is enforced here rather than in each entry point: a task
|
|
23
|
-
* this long is not a task a host meant to ask for, and it is persisted and turned into model
|
|
24
|
-
* context before anything else looks at it. Every surface that starts a run goes through this
|
|
25
|
-
* check, so the CLI and the MCP tools refuse the same task the same way.
|
|
26
|
-
*/
|
|
27
10
|
export declare const MAX_SUBAGENT_TASK_CHARS = 100000;
|
|
28
|
-
/**
|
|
29
|
-
* The longest model identifier a subagent run accepts.
|
|
30
|
-
*
|
|
31
|
-
* It is the bound the configuration holds a saved model id to, and a per-call model is held to
|
|
32
|
-
* the same one: the value is written into the open run record and carried through the preflight
|
|
33
|
-
* and the model resolution, so an unbounded one would fill the installation's storage and the
|
|
34
|
-
* provider's request with what is only ever a caller's typo.
|
|
35
|
-
*/
|
|
36
11
|
export declare const MAX_SUBAGENT_MODEL_CHARS = 500;
|
|
37
|
-
/** A task the caller may not ask for: too long for the run to carry. */
|
|
38
12
|
export declare class SubagentInvalidArgumentError extends Error {
|
|
39
13
|
constructor(message: string);
|
|
40
14
|
}
|
|
41
|
-
/**
|
|
42
|
-
* The permission a caller asked for.
|
|
43
|
-
*
|
|
44
|
-
* The two supported modes are the whole vocabulary. A value outside them is the caller's
|
|
45
|
-
* mistake, and answering it with `full-access` would grant the filesystem and shell mutations the
|
|
46
|
-
* caller was trying to withhold — so it is refused instead of rounded up. An absent permission
|
|
47
|
-
* keeps the default, which is what the CLI and the MCP wrappers mean by not naming one.
|
|
48
|
-
*/
|
|
49
15
|
export declare function resolveSubagentPermissions(requested: unknown): SubagentPermissions;
|
|
50
|
-
/**
|
|
51
|
-
* The workspaces this process is running a subagent in.
|
|
52
|
-
*
|
|
53
|
-
* The reservation is process-wide rather than a runner's own: an embedded host can build several
|
|
54
|
-
* backends — or a runner of its own — in one process, and each of them held a slot of its own,
|
|
55
|
-
* so two full-access runs could work the same workspace at once. The unit the slot reserves is
|
|
56
|
-
* the workspace, because that is what two overlapping runs would both write to.
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* The workspace a run works in, resolved to a real directory.
|
|
60
|
-
*
|
|
61
|
-
* Both public wrappers canonicalize the path before they call the runner, and the runner is
|
|
62
|
-
* exported for embedded use: a relative, empty or file-valued path would create the open record
|
|
63
|
-
* and the session — and spend the health probe — before the tools failed. A relative alias would
|
|
64
|
-
* also give one workspace two project identities, and a later resume would resolve the stored
|
|
65
|
-
* path against whatever working directory it happened to run in.
|
|
66
|
-
*/
|
|
67
16
|
export declare function canonicalWorkspace(requested: string): Promise<string>;
|
|
68
|
-
/** What a host needs to offer its user when no provider/model is set: every configured pair. */
|
|
69
17
|
export interface SubagentProviderListing {
|
|
70
18
|
id: string;
|
|
71
19
|
type: string;
|
|
@@ -79,21 +27,6 @@ export declare class SubagentRunInProgressError extends Error {
|
|
|
79
27
|
constructor();
|
|
80
28
|
}
|
|
81
29
|
export declare function listSubagentProviders(config: Pick<Config, 'providers'>): SubagentProviderListing[];
|
|
82
|
-
/**
|
|
83
|
-
* Resolve the provider/model a subagent run uses: the caller's explicit pick wins, the saved
|
|
84
|
-
* `externalSubagent` setting is next, and anything else is the self-describing PROVIDER_NOT_SET
|
|
85
|
-
* error the calling agent is expected to take back to its user.
|
|
86
|
-
*
|
|
87
|
-
* A per-call model is accepted on the same terms as the CLI's `--model` (any nonempty id), while
|
|
88
|
-
* the saved setting is held to the stricter config validation: a persisted pair names a provider
|
|
89
|
-
* that must still exist and, when the provider carries an explicit model list, a model on it.
|
|
90
|
-
*/
|
|
91
|
-
/**
|
|
92
|
-
* The caller named a provider or a model the installation does not have.
|
|
93
|
-
*
|
|
94
|
-
* It is a selection failure rather than a backend failure, so a host can tell that its own
|
|
95
|
-
* choice was wrong and correct the identifier without a second diagnostic path.
|
|
96
|
-
*/
|
|
97
30
|
export declare class SubagentSelectionError extends Error {
|
|
98
31
|
}
|
|
99
32
|
export declare function resolveSubagentProvider(config: Pick<Config, 'providers' | 'externalSubagent'>, call?: {
|
|
@@ -119,13 +52,6 @@ export interface SubagentRunStatus {
|
|
|
119
52
|
currentNode?: string;
|
|
120
53
|
reason?: string;
|
|
121
54
|
events: SubagentRunEvent[];
|
|
122
|
-
/**
|
|
123
|
-
* What the run could not set up, in the words the source used.
|
|
124
|
-
*
|
|
125
|
-
* A capability the installation configures but the run cannot reach — an MCP server that did
|
|
126
|
-
* not connect, a catalog that was refused — is a fact the caller needs: the run continues
|
|
127
|
-
* without those tools, and a task that relies on them would otherwise fail quietly.
|
|
128
|
-
*/
|
|
129
55
|
notices?: string[];
|
|
130
56
|
}
|
|
131
57
|
export interface SubagentStartOptions {
|
|
@@ -135,7 +61,6 @@ export interface SubagentStartOptions {
|
|
|
135
61
|
model?: string;
|
|
136
62
|
permissions?: SubagentPermissions;
|
|
137
63
|
directory?: string;
|
|
138
|
-
/** Embedded host or test adapter; when supplied, model metadata stays offline. */
|
|
139
64
|
adapterFactory?: (provider: ProviderConfig) => ModelAdapter;
|
|
140
65
|
loadGraph?: typeof loadAccessibleGraph;
|
|
141
66
|
membership?: typeof getMembership;
|
|
@@ -157,122 +82,34 @@ export type SubagentResult = {
|
|
|
157
82
|
reason?: string;
|
|
158
83
|
result?: RunResult;
|
|
159
84
|
};
|
|
160
|
-
/**
|
|
161
|
-
* One subagent run at a time per process, mirroring the engine's own one-run rule: the MCP server
|
|
162
|
-
* is a single process, so a second start while one run is live is refused rather than queued.
|
|
163
|
-
*
|
|
164
|
-
* The reservation is the process's rather than this runner's, because an embedded host can build
|
|
165
|
-
* several backends in one process: two of them would otherwise each hold a slot of their own and
|
|
166
|
-
* work the same workspace at once. What the slot reserves is the workspace, because that is what
|
|
167
|
-
* two overlapping runs would both write to.
|
|
168
|
-
*
|
|
169
|
-
* Records follow the installation's own lifecycle — an open run record before any preflight, run
|
|
170
|
-
* events appended to `runs/<id>.jsonl`, a session record and a terminal run record on finalize —
|
|
171
|
-
* so a crashed subagent run is classified by the same startup recovery as any other attempt and
|
|
172
|
-
* stays visible in the Runs view instead of vanishing with its host.
|
|
173
|
-
*/
|
|
174
|
-
/**
|
|
175
|
-
* The decision service an external subagent run uses: the one this installation configured, never a
|
|
176
|
-
* hosted default, and only for a signed-in account. The account is asked only when the answer could
|
|
177
|
-
* matter, so a run with decisions off stays free of an account request.
|
|
178
|
-
*/
|
|
179
85
|
export declare function subagentDecisionConfig(config: Pick<Config, 'jevEnabled' | 'decisions'>, membership: () => Promise<Membership>): Promise<DecisionConfig>;
|
|
180
86
|
export declare class SubagentRunner {
|
|
181
87
|
private readonly defaults;
|
|
182
88
|
private active?;
|
|
183
|
-
/** Set when the runner was shut down: a start that begins after it must not launch a run. */
|
|
184
89
|
private closed;
|
|
185
|
-
/** A start that is preparing its run holds the slot before it is assigned. */
|
|
186
90
|
private starting;
|
|
187
|
-
/** The workspace this runner holds the process-wide reservation for, when it holds one. */
|
|
188
91
|
private reservedWorkspace?;
|
|
189
|
-
/** A cancellation that arrived while the run was still starting. */
|
|
190
92
|
private pendingCancel;
|
|
191
|
-
/** The start that is preparing a run, so a shutdown can wait for it instead of racing it. */
|
|
192
93
|
private startPromise?;
|
|
193
|
-
/**
|
|
194
|
-
* This runner's identity in the process-wide workspace reservation.
|
|
195
|
-
*
|
|
196
|
-
* The reservation is the process's, so two runners over one workspace cannot both hold it, and
|
|
197
|
-
* only the holder gives it back.
|
|
198
|
-
*/
|
|
199
94
|
private readonly reservationId;
|
|
200
95
|
constructor(defaults?: {
|
|
201
96
|
directory?: string;
|
|
202
97
|
loadConfig?: (directory: string) => Promise<Config>;
|
|
203
98
|
});
|
|
204
99
|
start(options: SubagentStartOptions): Promise<SubagentStartReply>;
|
|
205
|
-
/** The run itself, once the slot is held. */
|
|
206
100
|
private begin;
|
|
207
101
|
status(): SubagentRunStatus;
|
|
208
|
-
/** Wait up to `waitMs` for the run; a finished run stays answerable until the next start. */
|
|
209
102
|
result(waitMs?: number): Promise<SubagentResult>;
|
|
210
103
|
cancel(): boolean;
|
|
211
|
-
/**
|
|
212
|
-
* End the run this process owns and wait for it to finish.
|
|
213
|
-
*
|
|
214
|
-
* The run finalizes itself: it writes the session and the terminal record, and clears the
|
|
215
|
-
* open-run claim. A caller that closes while the run works waits for that, so the records it
|
|
216
|
-
* leaves behind are the ones of a finished attempt rather than of a half-written one.
|
|
217
|
-
*/
|
|
218
104
|
shutdown(): Promise<void>;
|
|
219
|
-
/**
|
|
220
|
-
* Wait for the run, up to `waitMs`.
|
|
221
|
-
*
|
|
222
|
-
* The timer is cleared when the run wins, so a run that finished early does not keep the
|
|
223
|
-
* process alive for the rest of the wait, and repeated waits do not pile timers up.
|
|
224
|
-
*/
|
|
225
105
|
private awaitOutcome;
|
|
226
|
-
/**
|
|
227
|
-
* Record one runtime event, and hand back the journal write that carries it.
|
|
228
|
-
*
|
|
229
|
-
* The returned promise is what makes the event durable before the run moves on: the runtime
|
|
230
|
-
* awaits the callback it was given, so a caller that awaits this waits for the append — and for
|
|
231
|
-
* every append queued before it — to land. Without that the runtime would advance past a
|
|
232
|
-
* mutating tool call whose event was still queued, and a kill in that window would leave a
|
|
233
|
-
* journal that omits the completed call: a resume of that attempt would replay to a position
|
|
234
|
-
* before the call and repeat its effects.
|
|
235
|
-
*/
|
|
236
106
|
private observe;
|
|
237
|
-
/**
|
|
238
|
-
* Record what the run could not set up, and publish it.
|
|
239
|
-
*
|
|
240
|
-
* The notice is a fact about the attempt, not a log line: the run continues without the
|
|
241
|
-
* capability, and the caller can only see that from the run's own observable path.
|
|
242
|
-
*/
|
|
243
107
|
private notice;
|
|
244
108
|
private execute;
|
|
245
|
-
/** The session record for a run: the turn it is running, or the one it finished. */
|
|
246
109
|
private saveSession;
|
|
247
110
|
private finalize;
|
|
248
|
-
/**
|
|
249
|
-
* The signal the run's own resources are tied to.
|
|
250
|
-
*
|
|
251
|
-
* A run releases it when it ends: a QA terminal it spawned and did not kill stays open behind
|
|
252
|
-
* its child, and the process would not exit. The signal is what closes it, so this is how a
|
|
253
|
-
* caller sees that the run has let go of what it owned.
|
|
254
|
-
*/
|
|
255
111
|
runSignal(): AbortSignal | undefined;
|
|
256
|
-
/**
|
|
257
|
-
* Release what the run owns.
|
|
258
|
-
*
|
|
259
|
-
* The run's signal is what its QA terminals and other run-scoped resources are tied to, and a
|
|
260
|
-
* finished run never releases it on its own: only a cancellation aborts it. A run that succeeded
|
|
261
|
-
* with a terminal still open would keep the process alive behind that child.
|
|
262
|
-
*/
|
|
263
|
-
/**
|
|
264
|
-
* The code intelligence the run works with.
|
|
265
|
-
*
|
|
266
|
-
* The manager takes its own read-only branch and its own disabled branch, so it is always
|
|
267
|
-
* created; what matters is that both guards reach it rather than indexing by default.
|
|
268
|
-
*/
|
|
269
112
|
private codeIntelligence;
|
|
270
113
|
private release;
|
|
271
|
-
/**
|
|
272
|
-
* Give the process-wide reservation back.
|
|
273
|
-
*
|
|
274
|
-
* Only the holder gives it back: a runner whose start failed releases nothing that another
|
|
275
|
-
* runner has taken since.
|
|
276
|
-
*/
|
|
277
114
|
private releaseWorkspace;
|
|
278
115
|
}
|