@quantiya/codevibe-core 2.0.0 → 2.0.2
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/dist/__tests__/cp-5-baseline-invariants.test.d.ts +1 -0
- package/dist/__tests__/prompt-parser.test.d.ts +1 -0
- package/dist/adapter/__tests__/capabilities.test.d.ts +1 -0
- package/dist/adapter/__tests__/contract-conformance.test.d.ts +1 -0
- package/dist/adapter/__tests__/packets.test.d.ts +1 -0
- package/dist/adapter/__tests__/progress.test.d.ts +1 -0
- package/dist/adapter/__tests__/registry.test.d.ts +1 -0
- package/dist/adapter/__tests__/smoke/claude.smoke.test.d.ts +1 -0
- package/dist/adapter/__tests__/smoke/codex.smoke.test.d.ts +1 -0
- package/dist/adapter/__tests__/smoke/gemini.smoke.test.d.ts +1 -0
- package/dist/adapter/capabilities.d.ts +68 -0
- package/dist/adapter/index.d.ts +7 -0
- package/dist/adapter/packets.d.ts +129 -0
- package/dist/adapter/progress.d.ts +93 -0
- package/dist/adapter/registry.d.ts +91 -0
- package/dist/adapter/types.d.ts +22 -0
- package/dist/appsync/__tests__/appsync-client-apply-user-decision.test.d.ts +1 -0
- package/dist/appsync/__tests__/appsync-client-classb.test.d.ts +1 -0
- package/dist/appsync/__tests__/appsync-client-event-source-filter.test.d.ts +1 -0
- package/dist/appsync/__tests__/appsync-client-planner.test.d.ts +1 -0
- package/dist/appsync/__tests__/appsync-client-task-group.test.d.ts +1 -0
- package/dist/appsync/__tests__/appsync-client.test.d.ts +1 -0
- package/dist/appsync/__tests__/cleanup-subscription.test.d.ts +1 -0
- package/dist/appsync/__tests__/coerce-awsjson-and-review-summary.test.d.ts +1 -0
- package/dist/appsync/__tests__/cp1f-quorum-sdk.test.d.ts +1 -0
- package/dist/appsync/__tests__/event-throttle.test.d.ts +1 -0
- package/dist/appsync/appsync-client.d.ts +1025 -2
- package/dist/appsync/event-throttle.d.ts +28 -0
- package/dist/appsync/index.d.ts +4 -1
- package/dist/appsync/queries.d.ts +34 -0
- package/dist/audit-keys/index.d.ts +32 -0
- package/dist/auth/__tests__/auth-telemetry.test.d.ts +1 -0
- package/dist/auth/auth-service.d.ts +32 -2
- package/dist/auth/auth-telemetry.d.ts +117 -6
- package/dist/auth/index.d.ts +1 -0
- package/dist/companion-mode/__tests__/persist-preference.test.d.ts +1 -0
- package/dist/companion-mode/__tests__/resolve-agent.test.d.ts +1 -0
- package/dist/companion-mode/agent-picker.d.ts +9 -0
- package/dist/companion-mode/index.d.ts +55 -0
- package/dist/companion-mode/persist-preference.d.ts +24 -0
- package/dist/companion-mode/resolve-agent.d.ts +41 -0
- package/dist/config/config.d.ts +8 -1
- package/dist/continuation/__tests__/dirty-state-collector.test.d.ts +1 -0
- package/dist/continuation/__tests__/integration.test.d.ts +1 -0
- package/dist/continuation/__tests__/packet-reader.test.d.ts +1 -0
- package/dist/continuation/__tests__/packet-writer.test.d.ts +1 -0
- package/dist/continuation/__tests__/parity.test.d.ts +1 -0
- package/dist/continuation/__tests__/status-cli.test.d.ts +1 -0
- package/dist/continuation/dirty-state-collector.d.ts +46 -0
- package/dist/continuation/index.d.ts +8 -0
- package/dist/continuation/packet-reader.d.ts +33 -0
- package/dist/continuation/packet-writer.d.ts +86 -0
- package/dist/continuation/types.d.ts +239 -0
- package/dist/credential-broker/__tests__/broker.test.d.ts +1 -0
- package/dist/credential-broker/__tests__/canonical.test.d.ts +1 -0
- package/dist/credential-broker/__tests__/scrubber.test.d.ts +1 -0
- package/dist/credential-broker/__tests__/upstream-client.test.d.ts +1 -0
- package/dist/credential-broker/__tests__/vendor-key-store.test.d.ts +1 -0
- package/dist/credential-broker/audit-sink.d.ts +69 -0
- package/dist/credential-broker/broker-config.d.ts +39 -0
- package/dist/credential-broker/broker-token.d.ts +123 -0
- package/dist/credential-broker/broker.d.ts +165 -0
- package/dist/credential-broker/canonical.d.ts +119 -0
- package/dist/credential-broker/index.d.ts +15 -0
- package/dist/credential-broker/scrubber.d.ts +45 -0
- package/dist/credential-broker/types.d.ts +141 -0
- package/dist/credential-broker/upstream-client.d.ts +20 -0
- package/dist/credential-broker/vendor-key-store.d.ts +54 -0
- package/dist/index.d.ts +17 -4
- package/dist/index.js +559 -55
- package/dist/keychain/__tests__/keychain-backend.test.d.ts +1 -0
- package/dist/keychain/keychain-backend.d.ts +82 -0
- package/dist/keychain/keychain-manager.d.ts +16 -2
- package/dist/local-executor/__tests__/agentic-disposable-repo.test.d.ts +1 -0
- package/dist/local-executor/__tests__/agentic-resolve.test.d.ts +1 -0
- package/dist/local-executor/__tests__/agentic-resolver-flag.test.d.ts +1 -0
- package/dist/local-executor/__tests__/authority-symlink-fixture.d.ts +15 -0
- package/dist/local-executor/__tests__/authority.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class-a-emit.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class-a-sign.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class-b-consumer.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class-b-consumer.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class1-reconcilers.test.d.ts +1 -0
- package/dist/local-executor/__tests__/class2-resolver.test.d.ts +1 -0
- package/dist/local-executor/__tests__/confined-model-caller.test.d.ts +1 -0
- package/dist/local-executor/__tests__/conflict-classifier.test.d.ts +1 -0
- package/dist/local-executor/__tests__/conflict-resolution-durable-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/conflict-resolution-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/cp1f-quorum-consumer.test.d.ts +1 -0
- package/dist/local-executor/__tests__/cp7-audit-writer.test.d.ts +1 -0
- package/dist/local-executor/__tests__/durable-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/git-lock-retry.test.d.ts +1 -0
- package/dist/local-executor/__tests__/hook-bridge.test.d.ts +1 -0
- package/dist/local-executor/__tests__/implementor-argv.test.d.ts +1 -0
- package/dist/local-executor/__tests__/local-executor-teams.test.d.ts +1 -0
- package/dist/local-executor/__tests__/local-executor.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-conflict-extract.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-conflict-git.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-conflict-resolve-agentic.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-conflict-resolve.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-journal-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-train-agentic-recovery.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-train-w3.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-train-waveb.integration.test.d.ts +1 -0
- package/dist/local-executor/__tests__/merge-train.test.d.ts +1 -0
- package/dist/local-executor/__tests__/promote-wal-store.test.d.ts +1 -0
- package/dist/local-executor/__tests__/revert-reconcile.test.d.ts +1 -0
- package/dist/local-executor/__tests__/revert-runner.test.d.ts +1 -0
- package/dist/local-executor/__tests__/shared-contract-detector.test.d.ts +1 -0
- package/dist/local-executor/__tests__/spawn.test.d.ts +1 -0
- package/dist/local-executor/__tests__/substrate-engage.test.d.ts +1 -0
- package/dist/local-executor/__tests__/team-execution-flag.test.d.ts +1 -0
- package/dist/local-executor/__tests__/track-registry.test.d.ts +1 -0
- package/dist/local-executor/__tests__/verification-runner.test.d.ts +1 -0
- package/dist/local-executor/__tests__/wb2-review-bundle.test.d.ts +1 -0
- package/dist/local-executor/__tests__/wb2-substrate-spawn.live.test.d.ts +1 -0
- package/dist/local-executor/__tests__/workspace-shadow.test.d.ts +1 -0
- package/dist/local-executor/__tests__/worktree-merge.test.d.ts +1 -0
- package/dist/local-executor/agentic-disposable-repo.d.ts +52 -0
- package/dist/local-executor/agentic-resolve.d.ts +54 -0
- package/dist/local-executor/agentic-resolver-flag.d.ts +9 -0
- package/dist/local-executor/authority.d.ts +61 -0
- package/dist/local-executor/class-a-emit.d.ts +140 -0
- package/dist/local-executor/class-a-sign.d.ts +57 -0
- package/dist/local-executor/class-b-consumer.d.ts +276 -0
- package/dist/local-executor/class-b-verify.d.ts +30 -0
- package/dist/local-executor/class1-reconcilers.d.ts +58 -0
- package/dist/local-executor/class2-resolver.d.ts +74 -0
- package/dist/local-executor/confined-model-caller.d.ts +39 -0
- package/dist/local-executor/conflict-classifier.d.ts +21 -0
- package/dist/local-executor/conflict-resolution-durable-store.d.ts +61 -0
- package/dist/local-executor/conflict-resolution-store.d.ts +210 -0
- package/dist/local-executor/conflict-types.d.ts +86 -0
- package/dist/local-executor/cp7-audit-writer.d.ts +152 -0
- package/dist/local-executor/durable-store.d.ts +334 -0
- package/dist/local-executor/git-lock-retry.d.ts +40 -0
- package/dist/local-executor/hook-bridge.d.ts +36 -0
- package/dist/local-executor/implementor-argv.d.ts +183 -0
- package/dist/local-executor/index.d.ts +49 -0
- package/dist/local-executor/local-executor-impl.d.ts +724 -0
- package/dist/local-executor/merge-conflict-extract.d.ts +34 -0
- package/dist/local-executor/merge-conflict-resolve.d.ts +101 -0
- package/dist/local-executor/merge-journal-store.d.ts +311 -0
- package/dist/local-executor/merge-train.d.ts +713 -0
- package/dist/local-executor/promote-wal-store.d.ts +301 -0
- package/dist/local-executor/resolution-set-index.d.ts +51 -0
- package/dist/local-executor/revert-reconcile.d.ts +89 -0
- package/dist/local-executor/revert-runner.d.ts +17 -0
- package/dist/local-executor/shared-contract-detector.d.ts +57 -0
- package/dist/local-executor/spawn.d.ts +34 -0
- package/dist/local-executor/task-group-types.d.ts +346 -0
- package/dist/local-executor/team-execution-flag.d.ts +21 -0
- package/dist/local-executor/track-registry.d.ts +50 -0
- package/dist/local-executor/types.d.ts +417 -0
- package/dist/local-executor/verification-gates/build.d.ts +6 -0
- package/dist/local-executor/verification-gates/deploy-preflight.d.ts +6 -0
- package/dist/local-executor/verification-gates/diff-sanity.d.ts +6 -0
- package/dist/local-executor/verification-gates/hostile-grep.d.ts +6 -0
- package/dist/local-executor/verification-gates/lint.d.ts +6 -0
- package/dist/local-executor/verification-gates/shell-runner.d.ts +40 -0
- package/dist/local-executor/verification-gates/source-traceability.d.ts +6 -0
- package/dist/local-executor/verification-gates/tests.d.ts +6 -0
- package/dist/local-executor/verification-gates/typecheck.d.ts +6 -0
- package/dist/local-executor/verification-runner.d.ts +28 -0
- package/dist/local-executor/wb2-review-bundle.d.ts +59 -0
- package/dist/local-executor/workspace-shadow.d.ts +290 -0
- package/dist/local-executor/worktree-merge.d.ts +601 -0
- package/dist/local-model/__tests__/installer.test.d.ts +1 -0
- package/dist/local-model/__tests__/manager.test.d.ts +1 -0
- package/dist/local-model/__tests__/ollama.test.d.ts +1 -0
- package/dist/local-model/__tests__/runtime.test.d.ts +1 -0
- package/dist/local-model/__tests__/state.test.d.ts +1 -0
- package/dist/local-model/manager.d.ts +119 -0
- package/dist/local-model/ollama.d.ts +27 -0
- package/dist/local-model/runtime.d.ts +27 -0
- package/dist/local-model/state.d.ts +32 -0
- package/dist/orchestration/__tests__/setup-bootstrap.test.d.ts +1 -0
- package/dist/orchestration/__tests__/setup-failure-recourse.test.d.ts +1 -0
- package/dist/orchestration/__tests__/setup-save.test.d.ts +1 -0
- package/dist/orchestration/__tests__/setup-seat-picker.test.d.ts +1 -0
- package/dist/orchestration/__tests__/setup-telemetry.test.d.ts +1 -0
- package/dist/orchestration/__tests__/setup-test-agents.test.d.ts +1 -0
- package/dist/orchestration/__tests__/setup-types.test.d.ts +1 -0
- package/dist/orchestration/__tests__/setup-wizard.test.d.ts +1 -0
- package/dist/orchestration/__tests__/v1-options.test.d.ts +1 -0
- package/dist/orchestration/detect-agents.d.ts +16 -2
- package/dist/orchestration/index.d.ts +1 -0
- package/dist/orchestration/orchestration-cli.d.ts +4 -1
- package/dist/orchestration/setup-bootstrap.d.ts +146 -0
- package/dist/orchestration/setup-failure-recourse.d.ts +23 -0
- package/dist/orchestration/setup-save.d.ts +47 -0
- package/dist/orchestration/setup-seat-picker.d.ts +72 -0
- package/dist/orchestration/setup-telemetry.d.ts +54 -0
- package/dist/orchestration/setup-test-agents.d.ts +108 -0
- package/dist/orchestration/setup-types.d.ts +141 -0
- package/dist/orchestration/setup-wizard.d.ts +57 -0
- package/dist/orchestration/v1-options.d.ts +97 -0
- package/dist/orchestration-shell/__tests__/attachments.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/audit-browser.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/audited-path-fixes.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/bracketed-paste.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-authority-bridge.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-group-halt-wiring.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-orchestration-session-bootstrap.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-planner-stack.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-probe-group-status.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-quorum-loop-tier.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-singleton-enforcement.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-stub-session-adapter.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cli-verdict-classifier-wiring.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/components.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/context-store.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp10-585-accept-echo-target.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp10-585-loop.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp10-585-prompts.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp12-w2b-team-loop.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp12-w4-team-recovery.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp1f-quorum-loop.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp606-team-track-user-resolved.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/cp7-reviewer-substrate.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/declared-test-runner.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/emit-shell-event.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/familiarize-routing.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/gate-decision-submit.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/gate-details-panel.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/gate-prompts.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/gate-verdict-details-dispatch.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/group-decision-submit.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/hostile-grep.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/image-attach-e2e.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/input-bar-autocomplete.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/live-region-cap.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/live-static-order.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/mode-selection.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/model-cli.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/non-gate-prompt-routing.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/orchestration-app-group-decision-transport.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/orchestration-app-layout.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/process-markers.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/reducer.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/reissue-team-retained-spec.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/review-summary-render.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/reviewer-wizard.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/reviewers-format.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/root-discovery.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/runOrchestrationShell-classify-dispatch.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/runOrchestrationShell-planner-wiring.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/runOrchestrationShell-signal.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/runOrchestrationShell.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/serialize-submissions.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/slash-router.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/slash-suggest.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/status-format.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/sticky-preference.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/task-progress.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/team-decompose-routing.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/team-decompose-types.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/team-decompose.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/team-e2e-smoke.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/tier2-reviewer-selection.test.d.ts +1 -0
- package/dist/orchestration-shell/__tests__/web-browsing.test.d.ts +1 -0
- package/dist/orchestration-shell/attachments.d.ts +152 -0
- package/dist/orchestration-shell/audit-browser.d.ts +115 -0
- package/dist/orchestration-shell/audit-runner.d.ts +59 -0
- package/dist/orchestration-shell/bracketed-paste.d.ts +26 -0
- package/dist/orchestration-shell/cli.d.ts +431 -0
- package/dist/orchestration-shell/cli.js +44191 -0
- package/dist/orchestration-shell/cohort-flag.d.ts +16 -0
- package/dist/orchestration-shell/components/AuditLogPanel.d.ts +11 -0
- package/dist/orchestration-shell/components/CodeVibeLogo.d.ts +2 -0
- package/dist/orchestration-shell/components/ConversationPane.d.ts +13 -0
- package/dist/orchestration-shell/components/GateDetailsPanel.d.ts +57 -0
- package/dist/orchestration-shell/components/GatePanelEntry.d.ts +9 -0
- package/dist/orchestration-shell/components/GatePromptEntry.d.ts +16 -0
- package/dist/orchestration-shell/components/InputBar.d.ts +55 -0
- package/dist/orchestration-shell/components/LiveProgressLine.d.ts +8 -0
- package/dist/orchestration-shell/components/MultiTrackStatusNode.d.ts +8 -0
- package/dist/orchestration-shell/components/OrchestrationApp.d.ts +129 -0
- package/dist/orchestration-shell/components/ReviewerSetupWizard.d.ts +24 -0
- package/dist/orchestration-shell/components/StatusBar.d.ts +20 -0
- package/dist/orchestration-shell/components/nodes/AdvisoryEntry.d.ts +8 -0
- package/dist/orchestration-shell/components/nodes/GateStatusNode.d.ts +8 -0
- package/dist/orchestration-shell/components/nodes/PlannerDecisionEntry.d.ts +8 -0
- package/dist/orchestration-shell/components/nodes/ReviewerQuorumStatusNode.d.ts +8 -0
- package/dist/orchestration-shell/components/nodes/SlashOutputEntry.d.ts +8 -0
- package/dist/orchestration-shell/components/nodes/SubagentEventEntry.d.ts +8 -0
- package/dist/orchestration-shell/components/nodes/UserMessageEntry.d.ts +8 -0
- package/dist/orchestration-shell/context-store.d.ts +389 -0
- package/dist/orchestration-shell/declared-test-runner.d.ts +84 -0
- package/dist/orchestration-shell/emit-shell-event.d.ts +64 -0
- package/dist/orchestration-shell/gate-decision-submit.d.ts +245 -0
- package/dist/orchestration-shell/gate-prompts.d.ts +481 -0
- package/dist/orchestration-shell/index.d.ts +712 -0
- package/dist/orchestration-shell/ink-runtime.d.ts +84 -0
- package/dist/orchestration-shell/live-region-cap.d.ts +70 -0
- package/dist/orchestration-shell/live-static-order.d.ts +22 -0
- package/dist/orchestration-shell/mode-selection.d.ts +46 -0
- package/dist/orchestration-shell/non-tty-fallback.d.ts +67 -0
- package/dist/orchestration-shell/process-markers.d.ts +12 -0
- package/dist/orchestration-shell/quorum-loop.d.ts +1900 -0
- package/dist/orchestration-shell/reducer.d.ts +8 -0
- package/dist/orchestration-shell/root-discovery.d.ts +25 -0
- package/dist/orchestration-shell/route-browse.d.ts +20 -0
- package/dist/orchestration-shell/slash-router.d.ts +64 -0
- package/dist/orchestration-shell/slash-routes/continuation.d.ts +71 -0
- package/dist/orchestration-shell/slash-routes/reviewers.d.ts +41 -0
- package/dist/orchestration-shell/slash-suggest.d.ts +29 -0
- package/dist/orchestration-shell/status-format.d.ts +59 -0
- package/dist/orchestration-shell/sticky-preference.d.ts +24 -0
- package/dist/orchestration-shell/store.d.ts +17 -0
- package/dist/orchestration-shell/task-progress.d.ts +122 -0
- package/dist/orchestration-shell/team-decompose.d.ts +196 -0
- package/dist/orchestration-shell/types.d.ts +777 -0
- package/dist/orchestration-shell/vendor/ink-parse-keypress.d.ts +42 -0
- package/dist/orchestration-shell/web/extract.d.ts +11 -0
- package/dist/orchestration-shell/web/fetch.d.ts +15 -0
- package/dist/orchestration-shell/web/ip.d.ts +26 -0
- package/dist/orchestration-shell/web/sanitize.d.ts +14 -0
- package/dist/orchestration-shell/web/search.d.ts +16 -0
- package/dist/planner/__tests__/cache-clarification-bypass.test.d.ts +1 -0
- package/dist/planner/__tests__/cache.test.d.ts +1 -0
- package/dist/planner/__tests__/client.test.d.ts +1 -0
- package/dist/planner/__tests__/health-machine-transitions.test.d.ts +1 -0
- package/dist/planner/__tests__/local-gemma.test.d.ts +1 -0
- package/dist/planner/__tests__/types-zod.test.d.ts +1 -0
- package/dist/planner/adapter.d.ts +16 -0
- package/dist/planner/cache.d.ts +35 -0
- package/dist/planner/client.d.ts +103 -0
- package/dist/planner/health-state.d.ts +24 -0
- package/dist/planner/index.d.ts +7 -0
- package/dist/planner/local-advisory.d.ts +84 -0
- package/dist/planner/local-gemma.d.ts +23 -0
- package/dist/planner/types.d.ts +123 -0
- package/dist/reviewer/__tests__/antigravity-provider.test.d.ts +1 -0
- package/dist/reviewer/__tests__/claude-provider-json.test.d.ts +1 -0
- package/dist/reviewer/__tests__/cp7-reviewer-sandbox.test.d.ts +1 -0
- package/dist/reviewer/__tests__/output-parser-classifier-helpers.test.d.ts +1 -0
- package/dist/reviewer/__tests__/verdict-classifier.test.d.ts +1 -0
- package/dist/reviewer/index.d.ts +2 -0
- package/dist/reviewer/output-parser.d.ts +48 -12
- package/dist/reviewer/provider.d.ts +107 -3
- package/dist/reviewer/providers/__tests__/failure-classifier.test.d.ts +1 -0
- package/dist/reviewer/providers/antigravity.d.ts +49 -0
- package/dist/reviewer/providers/claude.d.ts +19 -4
- package/dist/reviewer/providers/codex.d.ts +47 -5
- package/dist/reviewer/providers/failure-classifier.d.ts +26 -0
- package/dist/reviewer/providers/gemini.d.ts +5 -4
- package/dist/reviewer/registry.d.ts +5 -5
- package/dist/reviewer/subprocess.d.ts +37 -0
- package/dist/reviewer/token-usage.d.ts +32 -0
- package/dist/reviewer/types.d.ts +5 -5
- package/dist/reviewer/verdict-classifier.d.ts +62 -0
- package/dist/session/__tests__/prepare-event-timestamp.test.d.ts +1 -0
- package/dist/session/__tests__/session-resume-service-keys.test.d.ts +1 -0
- package/dist/session/index.d.ts +1 -0
- package/dist/session/prepare-event-timestamp.d.ts +30 -0
- package/dist/session/session-rekey.d.ts +40 -0
- package/dist/session/session-resume.d.ts +25 -0
- package/dist/structural-summary/__tests__/__fixtures__/fixture-helpers.d.ts +11 -0
- package/dist/structural-summary/__tests__/assembler.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/generator.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/language-detect.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/manifest-parsers/cargo.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/manifest-parsers/gomod.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/manifest-parsers/gradle.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/manifest-parsers/index.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/manifest-parsers/npm.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/manifest-parsers/podfile.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/manifest-parsers/pyproject.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/opt-in-store.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/privacy-filter.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/safe-file-read.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/user-ignore-matcher.test.d.ts +1 -0
- package/dist/structural-summary/__tests__/walker.test.d.ts +1 -0
- package/dist/structural-summary/generator.d.ts +8 -0
- package/dist/structural-summary/index.d.ts +7 -0
- package/dist/structural-summary/manifest-parsers/cargo.d.ts +3 -0
- package/dist/structural-summary/manifest-parsers/index.d.ts +7 -0
- package/dist/structural-summary/manifest-parsers/npm.d.ts +3 -0
- package/dist/structural-summary/manifest-parsers/other.d.ts +17 -0
- package/dist/structural-summary/opt-in-store.d.ts +24 -0
- package/dist/structural-summary/privacy-filter.d.ts +110 -0
- package/dist/structural-summary/safe-file-read.d.ts +11 -0
- package/dist/structural-summary/types.d.ts +215 -0
- package/dist/structural-summary/user-ignore-matcher.d.ts +9 -0
- package/dist/structural-summary/walker.d.ts +20 -0
- package/dist/substrate/__tests__/docker.test.d.ts +1 -0
- package/dist/substrate/__tests__/forwarder.test.d.ts +1 -0
- package/dist/substrate/__tests__/git-proxy.test.d.ts +1 -0
- package/dist/substrate/__tests__/sandbox-exec.test.d.ts +1 -0
- package/dist/substrate/__tests__/substrate-e2e.integration.test.d.ts +1 -0
- package/dist/substrate/command-runner.d.ts +19 -0
- package/dist/substrate/docker.d.ts +134 -0
- package/dist/substrate/errors.d.ts +33 -0
- package/dist/substrate/forwarder.d.ts +67 -0
- package/dist/substrate/git-proxy.d.ts +35 -0
- package/dist/substrate/index.d.ts +12 -0
- package/dist/substrate/relay-script.d.ts +27 -0
- package/dist/substrate/sandbox-exec.d.ts +116 -0
- package/dist/substrate/types.d.ts +218 -0
- package/dist/substrate-launch/__tests__/apikey-bootstrap.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/creditless-loop.integration.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/engage-substrate.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/fallback-ladder.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/le-env-scrub.test.d.ts +1 -0
- package/dist/substrate-launch/__tests__/sanitized-env.test.d.ts +1 -0
- package/dist/substrate-launch/apikey-bootstrap.d.ts +84 -0
- package/dist/substrate-launch/engage-substrate.d.ts +102 -0
- package/dist/substrate-launch/fallback-ladder.d.ts +49 -0
- package/dist/substrate-launch/index.d.ts +12 -0
- package/dist/substrate-launch/le-env-scrub.d.ts +77 -0
- package/dist/substrate-launch/sanitized-env.d.ts +73 -0
- package/dist/types/auth.d.ts +6 -1
- package/dist/types/events.d.ts +19 -2
- package/dist/types/reviewer.d.ts +6 -6
- package/package.json +21 -3
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
import { Session } from '../types/session';
|
|
2
|
+
import type { StructuralSummary } from '../structural-summary/types';
|
|
3
|
+
import type { GatePromptEnvelope, ReviewSummaryPanelModel } from './gate-prompts';
|
|
4
|
+
import type { TaskProgressEvent } from './task-progress';
|
|
5
|
+
import type { ReviewerAgentSpec } from '../types/reviewer';
|
|
6
|
+
/**
|
|
7
|
+
* Engine's reply to `applyUserDecision`. Surfaced by the SDK as
|
|
8
|
+
* `Promise<PostDecisionAction>`. Discriminated by `kind`; payload
|
|
9
|
+
* fields are snake_case to match the SDK's wire-form parse.
|
|
10
|
+
*/
|
|
11
|
+
export type PostDecisionAction = {
|
|
12
|
+
kind: 'terminate_gate';
|
|
13
|
+
notes: string | null;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'open_new_round';
|
|
16
|
+
next_round: number;
|
|
17
|
+
user_notes: string;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'restart_proposal';
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'abort_task';
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'final_approval_resolved';
|
|
24
|
+
decision: string;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'continuation_switch_accepted';
|
|
27
|
+
target_agent: string;
|
|
28
|
+
next_gate_id: string;
|
|
29
|
+
next_round: number;
|
|
30
|
+
offer_id: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'continuation_switch_declined';
|
|
33
|
+
offer_id: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* CP-1.f execute-first (D5): does this `applyUserDecision` outcome mean the
|
|
37
|
+
* task's workspace shadow must be DISCARDED?
|
|
38
|
+
*
|
|
39
|
+
* ONLY genuinely non-authorize terminals discard:
|
|
40
|
+
* - `abort_task` — user aborted the task entirely.
|
|
41
|
+
* - `restart_proposal` — user rejected + restarted; a fresh round gets a
|
|
42
|
+
* fresh shadow.
|
|
43
|
+
*
|
|
44
|
+
* Everything else MUST NOT discard:
|
|
45
|
+
* - `terminate_gate` — the engine's reply for Accept/AcceptWithNotes on a
|
|
46
|
+
* halted/escalated gate ("gate terminally closed",
|
|
47
|
+
* codevibe-revision user_decision.rs) — an AUTHORIZE
|
|
48
|
+
* outcome. Discarding here raced the async
|
|
49
|
+
* TaskAuthorized promote and destroyed an approved
|
|
50
|
+
* diff (live dogfood 2026-06-10, task 5e16b2f9
|
|
51
|
+
* "promote no-op — no in-memory shadow"). On accept
|
|
52
|
+
* the shadow's fate belongs to the TaskAuthorized
|
|
53
|
+
* edge alone (#PR-1/#PR-3); promote cleans up, and a
|
|
54
|
+
* lost packet never reaps a pending shadow (#PR-4).
|
|
55
|
+
* - `open_new_round` — revise; the shadow persists across rounds (D6).
|
|
56
|
+
* - `final_approval_resolved` — promote via the TaskAuthorized edge.
|
|
57
|
+
*/
|
|
58
|
+
export declare function postActionDiscardsShadow(kind: PostDecisionAction['kind']): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* #606 (FACE A) — map a per-track `applyUserDecision` `postAction` to the
|
|
61
|
+
* team-track RENDER-terminal state, MIRRORING the engine's authoritative
|
|
62
|
+
* `apply_user_decision::fire_deferred_track_terminal` disposition map so the
|
|
63
|
+
* desktop render flips out of `InFlight` the moment the user resolves the
|
|
64
|
+
* track's own gate (the #469 "stuck InFlight" gap):
|
|
65
|
+
*
|
|
66
|
+
* - `terminate_gate` → Accept/AcceptWithNotes on an escalation gate
|
|
67
|
+
* (→ engine `Passed`) → 'Passed'
|
|
68
|
+
* - `final_approval_resolved` → FinalApproval: Approve (→ `Passed`) vs Cancel
|
|
69
|
+
* (→ `Failed`), distinguished by `decision` →
|
|
70
|
+
* 'Passed' / 'Failed'
|
|
71
|
+
* - `abort_task` → AbortTask on an escalation (→ `Failed`) →
|
|
72
|
+
* 'Failed'
|
|
73
|
+
* - everything else (`open_new_round` / `restart_proposal` /
|
|
74
|
+
* `continuation_switch_*`) → a NEW gate follows; the track keeps working and
|
|
75
|
+
* the engine fires NO terminal mark → null
|
|
76
|
+
*
|
|
77
|
+
* `null` means "do NOT flip" — the render stays `InFlight` (the next gate's user
|
|
78
|
+
* edge resolves it). The `final_approval_resolved` `decision` discriminator
|
|
79
|
+
* matches the engine: `handle_final_approval` synthesizes the SAME
|
|
80
|
+
* `final_approval_resolved` kind for BOTH Approve and Cancel, carrying the
|
|
81
|
+
* submitted decision string; the engine maps Approve→Passed, Cancel→Failed.
|
|
82
|
+
*/
|
|
83
|
+
export declare function postActionTeamTrackState(postAction: PostDecisionAction): 'Passed' | 'Failed' | null;
|
|
84
|
+
/**
|
|
85
|
+
* CP-1.a §2 LOCK. The literal union used for sticky-preference, mode
|
|
86
|
+
* selection, and the `MODE_SELECTED` EventType `metadata.mode` field.
|
|
87
|
+
*/
|
|
88
|
+
export type Mode = 'companion' | 'orchestration';
|
|
89
|
+
/**
|
|
90
|
+
* Structural stub matching the design §6 5-action schema. CP-1.b
|
|
91
|
+
* replaces this with the real `PlannerDecision` from
|
|
92
|
+
* `codevibe-core/src/planner/adapter.ts`. CP-1.a only needs the
|
|
93
|
+
* SHAPE — never inspects field semantics beyond what `OrchestrationAction`
|
|
94
|
+
* consumes.
|
|
95
|
+
*
|
|
96
|
+
* Per §6 line 958-965: discriminated by `action`; `clarifying_question`
|
|
97
|
+
* present only when action === 'ask_user'; `advisory_summary` only
|
|
98
|
+
* when action === 'advisory_response'; `gateRequest` opaque per §6
|
|
99
|
+
* line 967-972 (CP-2 Stage A finalises shape).
|
|
100
|
+
*/
|
|
101
|
+
export interface PlannerDecision {
|
|
102
|
+
action: 'start_task' | 'summarize_current_status' | 'advisory_response' | 'ask_user' | 'refuse' | 'team_decompose' | 'familiarize' | 'brainstorm' | 'browse';
|
|
103
|
+
rationale: string;
|
|
104
|
+
clarifying_question?: string;
|
|
105
|
+
advisory_summary?: string;
|
|
106
|
+
/** WEB-BROWSING — explicit http(s) URLs to read. */
|
|
107
|
+
browseUrls?: string[];
|
|
108
|
+
/** WEB-BROWSING — a web-search query when no explicit URL is given. */
|
|
109
|
+
browseQuery?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Opaque per §6 line 967-972; CP-1 NEVER inspects fields. CP-2 Stage A
|
|
112
|
+
* locks shape.
|
|
113
|
+
*/
|
|
114
|
+
gateRequest?: Record<string, unknown>;
|
|
115
|
+
}
|
|
116
|
+
export interface BrainstormContextMetadata {
|
|
117
|
+
needsRepositoryContext: boolean;
|
|
118
|
+
}
|
|
119
|
+
export type AgentKind = 'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY';
|
|
120
|
+
/**
|
|
121
|
+
* Health-state surface from §8. CP-1.a stores this in
|
|
122
|
+
* `OrchestrationState.plannerHealth`; CP-1.b's state machine drives
|
|
123
|
+
* the transitions.
|
|
124
|
+
*/
|
|
125
|
+
export type PlannerHealthState = 'Available' | 'Degraded' | 'Outage';
|
|
126
|
+
/**
|
|
127
|
+
* §5.1 store-shape LOCK (lines 537-545). Implementor subprocess
|
|
128
|
+
* lifecycle from spawn to clean exit.
|
|
129
|
+
*/
|
|
130
|
+
export interface RunningTaskState {
|
|
131
|
+
taskId: string;
|
|
132
|
+
agentKind: AgentKind;
|
|
133
|
+
pid: number;
|
|
134
|
+
startedAt: string;
|
|
135
|
+
status: 'running' | 'cancelling' | 'completed' | 'cancelled' | 'failed';
|
|
136
|
+
exitCode?: number;
|
|
137
|
+
bypassReason?: 'deterministic_shortcut' | 'planner_outage' | 'planner_degraded_explicit_override';
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* §5.1 LOCK (lines 547-556). Single reviewer subprocess identity +
|
|
141
|
+
* verdict. `reviewerKind` is hand-listed per CP-1 — CP-3 Stage A
|
|
142
|
+
* widens to the full reviewer-registry per `[DEFERRED TECH DEBT — CP-3]`
|
|
143
|
+
* note at design line 774.
|
|
144
|
+
*/
|
|
145
|
+
export interface ReviewerSeatState {
|
|
146
|
+
seatId: string;
|
|
147
|
+
reviewerKind: 'codex' | 'gemini' | 'claude';
|
|
148
|
+
status: 'queued' | 'running' | 'PASS' | 'REVISE' | 'BLOCK';
|
|
149
|
+
startedAt?: string;
|
|
150
|
+
elapsedMs?: number;
|
|
151
|
+
findingCount?: number;
|
|
152
|
+
verdictDigest?: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* §5.1 LOCK (lines 558-569). Per-gate aggregate over reviewer-quorum +
|
|
156
|
+
* auto-revise round count. `autoReviseCap: 2 | 6` literal-union prevents
|
|
157
|
+
* accidental drift in implementor code per CP-0 §6 line 155 (Pro = 2,
|
|
158
|
+
* Max = 6).
|
|
159
|
+
*/
|
|
160
|
+
export interface GateState {
|
|
161
|
+
gateId: string;
|
|
162
|
+
taskId: string;
|
|
163
|
+
gateKind: 'code-review' | 'merge-gate' | 'continuation-handoff';
|
|
164
|
+
quorumRequired: number;
|
|
165
|
+
quorumAchieved: number;
|
|
166
|
+
autoReviseRound: number;
|
|
167
|
+
autoReviseCap: 2 | 6;
|
|
168
|
+
status: 'pending' | 'in_review' | 'PASS' | 'REVISE' | 'BLOCK' | 'merge_gate_pending';
|
|
169
|
+
finalizedAt?: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* §5.1 LOCK lines 576-583. LE-originated Class A `EXECUTION_EVENT`
|
|
173
|
+
* messageType payloads. Five sub-kinds per CP-0 §2.4 verbatim.
|
|
174
|
+
*/
|
|
175
|
+
export interface ExecutionEventEntry {
|
|
176
|
+
eventId: string;
|
|
177
|
+
timestamp: string;
|
|
178
|
+
kind: 'PROCESS_SPAWNED' | 'FILE_CHANGE' | 'TOOL_USE' | 'VERIFICATION_RUN' | 'PROCESS_EXITED';
|
|
179
|
+
parentTaskId: string;
|
|
180
|
+
authorRole: 'implementor' | 'reviewer' | 'shell';
|
|
181
|
+
payload: Record<string, unknown>;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* §5.1 LOCK lines 591-613. Separate Class A `EXECUTOR_REFUSAL`
|
|
185
|
+
* messageType per CP-0 §2.3 + §2.4. NOT an EXECUTION_EVENT sub-kind.
|
|
186
|
+
*/
|
|
187
|
+
export interface RefusalEventEntry {
|
|
188
|
+
eventId: string;
|
|
189
|
+
timestamp: string;
|
|
190
|
+
kind: 'EXECUTOR_REFUSAL';
|
|
191
|
+
parentTaskId: string;
|
|
192
|
+
authorRole: 'shell';
|
|
193
|
+
payload: {
|
|
194
|
+
refusedMessageId: string;
|
|
195
|
+
refusalCategory: 'authority_scope_conflict' | 'local_permission_denied' | 'signature_invalid' | 'ulid_replay' | 'auth_revoked_local' | 'transport_authority_mismatch';
|
|
196
|
+
refusalDetail: string;
|
|
197
|
+
recommendedRecovery: 'reauthorize_locally' | 'abort_task' | 'ask_user' | 'retry_after_resync';
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* §5.1 LOCK lines 621-628. CP-1 placeholder; payload shape is
|
|
202
|
+
* `[DEFERRED TECH DEBT — CP-2]` per design.
|
|
203
|
+
*/
|
|
204
|
+
export interface BypassEventEntry {
|
|
205
|
+
eventId: string;
|
|
206
|
+
timestamp: string;
|
|
207
|
+
kind: 'TASK_BYPASS';
|
|
208
|
+
parentTaskId: string;
|
|
209
|
+
authorRole: 'shell';
|
|
210
|
+
payload: {
|
|
211
|
+
bypassReason: string;
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* §5.1 LOCK lines 635-642. Mobile-replay EventType values that flow
|
|
216
|
+
* into the store without going through the Class A wire. `parentTaskId`
|
|
217
|
+
* is nullable per Stage 2 r3 Gemini M1 — `NOTIFICATION` events may be
|
|
218
|
+
* session-scope.
|
|
219
|
+
*/
|
|
220
|
+
export interface MobileEventEntry {
|
|
221
|
+
eventId: string;
|
|
222
|
+
timestamp: string;
|
|
223
|
+
kind: 'USER_PROMPT' | 'ASSISTANT_RESPONSE' | 'INTERACTIVE_PROMPT' | 'NOTIFICATION';
|
|
224
|
+
parentTaskId: string | null;
|
|
225
|
+
source: 'DESKTOP' | 'MOBILE';
|
|
226
|
+
payload: Record<string, unknown>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* §5.1 LOCK line 646. Discriminated union used inside
|
|
230
|
+
* `ConversationEntry.subagent-event`.
|
|
231
|
+
*/
|
|
232
|
+
export type EventStreamEntry = ExecutionEventEntry | RefusalEventEntry | BypassEventEntry | MobileEventEntry;
|
|
233
|
+
/**
|
|
234
|
+
* §5.1 LOCK lines 527-534. Discriminated union; every entry carries
|
|
235
|
+
* `final: boolean`. Non-final entries re-render in place; final entries
|
|
236
|
+
* freeze in scrollback (migrate from `<ConversationPane>` into `<Static>`
|
|
237
|
+
* per design line 441-447).
|
|
238
|
+
*/
|
|
239
|
+
/**
|
|
240
|
+
* A LOCAL image-file reference attached to a user turn (IMAGE-ATTACHMENT-DESIGN.md
|
|
241
|
+
* §5). Desktop-only — carries a path + validated metadata, NEVER the bytes and
|
|
242
|
+
* NEVER an s3Key (bytes stay on disk; they reach the local model as base64 and the
|
|
243
|
+
* implementor as an in-worktree copy, both on-device). The strict planner
|
|
244
|
+
* text-in/JSON-out contract is unchanged — attachments ride on the runtime turn /
|
|
245
|
+
* task-scoped state, never on `PlannerDecision`/`PlannerInput`.
|
|
246
|
+
*/
|
|
247
|
+
export interface ImageAttachment {
|
|
248
|
+
/** ulid. */
|
|
249
|
+
id: string;
|
|
250
|
+
/**
|
|
251
|
+
* Resolved LEXICAL absolute path on the user's machine (the `O_NOFOLLOW` copy
|
|
252
|
+
* source, §4/§7.3). DISPLAY-only otherwise — never placed in the prompt/brief.
|
|
253
|
+
*/
|
|
254
|
+
sourcePath: string;
|
|
255
|
+
/**
|
|
256
|
+
* EVERY exact matched SPAN that referenced this file — across the original turn
|
|
257
|
+
* AND clarification-answer turns — INCLUDING surrounding quotes/escapes
|
|
258
|
+
* (`~/foo.png`, `'…/a b.png'`, `/a\ b.png`). A LIST: the same file can be typed
|
|
259
|
+
* two ways; the COPY is deduped by `sourcePath` but the canonical-brief
|
|
260
|
+
* replacement (§8) must rewrite EVERY occurrence or an absolute span leaks.
|
|
261
|
+
*/
|
|
262
|
+
rawTokens: string[];
|
|
263
|
+
/**
|
|
264
|
+
* Raw basename — DISPLAY-ONLY (the conversation chip). NEVER used in the
|
|
265
|
+
* in-worktree path or the prompt (a basename can carry control chars/newlines →
|
|
266
|
+
* injection). The in-worktree copy is named `<id>.<ext-from-sniffed-mime>`.
|
|
267
|
+
*/
|
|
268
|
+
filename: string;
|
|
269
|
+
/** From the bounded magic-byte sniff (`image/png`, …), NOT the extension. */
|
|
270
|
+
mime: string;
|
|
271
|
+
sizeBytes: number;
|
|
272
|
+
}
|
|
273
|
+
export type ConversationEntry = {
|
|
274
|
+
kind: 'user-message';
|
|
275
|
+
id: string;
|
|
276
|
+
timestamp: string;
|
|
277
|
+
final: true;
|
|
278
|
+
text: string;
|
|
279
|
+
attachments?: ImageAttachment[];
|
|
280
|
+
/**
|
|
281
|
+
* §13 Option-2 — the ordered-with-DUPLICATES resolved carried-path list for this
|
|
282
|
+
* turn's `[Image #N]` chips (index N-1 ↔ chip #N). Distinct from `attachments`
|
|
283
|
+
* (deduped by `sourcePath`): dedup loses the count/order the number-based chip
|
|
284
|
+
* rewrite needs. Carried into `pending.attachmentPaths` when a clarification mints.
|
|
285
|
+
*/
|
|
286
|
+
imagePaths?: string[];
|
|
287
|
+
} | {
|
|
288
|
+
kind: 'planner-decision';
|
|
289
|
+
id: string;
|
|
290
|
+
timestamp: string;
|
|
291
|
+
final: true;
|
|
292
|
+
action: PlannerDecision['action'];
|
|
293
|
+
rationale: string;
|
|
294
|
+
taskId?: string;
|
|
295
|
+
brainstorm?: BrainstormContextMetadata;
|
|
296
|
+
} | {
|
|
297
|
+
kind: 'subagent-event';
|
|
298
|
+
id: string;
|
|
299
|
+
timestamp: string;
|
|
300
|
+
final: true;
|
|
301
|
+
parentTaskId: string;
|
|
302
|
+
role: 'implementor' | 'reviewer';
|
|
303
|
+
event: EventStreamEntry;
|
|
304
|
+
} | {
|
|
305
|
+
kind: 'reviewer-status-node';
|
|
306
|
+
id: string;
|
|
307
|
+
timestamp: string;
|
|
308
|
+
final: boolean;
|
|
309
|
+
taskId: string;
|
|
310
|
+
seats: ReviewerSeatState[];
|
|
311
|
+
quorumStatus: 'queued' | 'running' | 'PASS' | 'REVISE' | 'BLOCK';
|
|
312
|
+
} | {
|
|
313
|
+
kind: 'gate-status-node';
|
|
314
|
+
id: string;
|
|
315
|
+
timestamp: string;
|
|
316
|
+
final: boolean;
|
|
317
|
+
taskId: string;
|
|
318
|
+
gate: GateState;
|
|
319
|
+
} | {
|
|
320
|
+
kind: 'slash-output';
|
|
321
|
+
id: string;
|
|
322
|
+
timestamp: string;
|
|
323
|
+
final: true;
|
|
324
|
+
command: string;
|
|
325
|
+
output: string;
|
|
326
|
+
} | {
|
|
327
|
+
kind: 'advisory';
|
|
328
|
+
id: string;
|
|
329
|
+
timestamp: string;
|
|
330
|
+
final: true;
|
|
331
|
+
source: 'planner' | 'shell';
|
|
332
|
+
text: string;
|
|
333
|
+
} | {
|
|
334
|
+
kind: 'gate-prompt';
|
|
335
|
+
id: string;
|
|
336
|
+
timestamp: string;
|
|
337
|
+
final: false | true;
|
|
338
|
+
envelope: GatePromptEnvelope;
|
|
339
|
+
queue: ReadonlyArray<GatePromptEnvelope>;
|
|
340
|
+
uiState: {
|
|
341
|
+
phase: 'awaiting-number';
|
|
342
|
+
} | {
|
|
343
|
+
phase: 'awaiting-notes';
|
|
344
|
+
decisionDraft: string;
|
|
345
|
+
} | {
|
|
346
|
+
phase: 'submitting';
|
|
347
|
+
} | {
|
|
348
|
+
phase: 'resolved';
|
|
349
|
+
postAction: PostDecisionAction;
|
|
350
|
+
resolvedBy: 'self';
|
|
351
|
+
} | {
|
|
352
|
+
phase: 'resolved';
|
|
353
|
+
resolvedBy: 'server';
|
|
354
|
+
serverDecision: string | null;
|
|
355
|
+
};
|
|
356
|
+
reviewSummary?: ReviewSummaryPanelModel;
|
|
357
|
+
} | {
|
|
358
|
+
kind: 'gate-panel';
|
|
359
|
+
id: string;
|
|
360
|
+
timestamp: string;
|
|
361
|
+
final: true;
|
|
362
|
+
panel: {
|
|
363
|
+
variant: 'prompt';
|
|
364
|
+
envelope: GatePromptEnvelope;
|
|
365
|
+
} | {
|
|
366
|
+
variant: 'summary';
|
|
367
|
+
reviewSummary: ReviewSummaryPanelModel;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* §5.1 LOCK lines 485-490. Stage 2 r3 Gemini M4. Captures a
|
|
372
|
+
* PlannerDecision the user wants to run but cannot start yet because
|
|
373
|
+
* the prior task is still running.
|
|
374
|
+
*/
|
|
375
|
+
export interface QueuedTask {
|
|
376
|
+
queuedTaskId: string;
|
|
377
|
+
plannerDecision: PlannerDecision;
|
|
378
|
+
queuedAt: string;
|
|
379
|
+
blockedOnTaskId?: string;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* §5.1 LOCK lines 496-500. Codex r2 M1. Captures the original prompt
|
|
383
|
+
* + every clarifying question the planner has asked so far + the user's
|
|
384
|
+
* answers. Next USER_INPUT under `pendingClarification !== null`
|
|
385
|
+
* resolves the most recent question and re-routes through
|
|
386
|
+
* `classifyPlannerPrompt` with the full `clarifications` array.
|
|
387
|
+
*/
|
|
388
|
+
export interface PendingClarification {
|
|
389
|
+
originalPrompt: string;
|
|
390
|
+
rounds: Array<{
|
|
391
|
+
question: string;
|
|
392
|
+
answer?: string;
|
|
393
|
+
}>;
|
|
394
|
+
conversationEntryId: string;
|
|
395
|
+
/**
|
|
396
|
+
* Accumulated image attachments across the ORIGINAL turn + every
|
|
397
|
+
* clarification-answer turn (IMAGE-ATTACHMENT-DESIGN.md §5, rev-4). The final
|
|
398
|
+
* task attachment set = original ∪ answer-turn attachments, deduped by
|
|
399
|
+
* `sourcePath`; `composeImplementationBrief` reads this when the task launches
|
|
400
|
+
* so an image attached before a planner question isn't lost.
|
|
401
|
+
*/
|
|
402
|
+
attachments?: ImageAttachment[];
|
|
403
|
+
/**
|
|
404
|
+
* §13 Option-2 — the ordered-with-DUPLICATES resolved carried-path list ACCUMULATED
|
|
405
|
+
* across the original turn + every clarification-answer turn (index N-1 ↔ the globally
|
|
406
|
+
* cross-turn-renumbered chip #N). The number-based `[Image #N]` rewrite keys on this
|
|
407
|
+
* (path → deduped attachment) so a duplicate same-file drag and a multi-turn image
|
|
408
|
+
* both resolve to the correct ref. Grows by exactly this turn's `imagePaths` each turn.
|
|
409
|
+
*/
|
|
410
|
+
attachmentPaths?: string[];
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* [ADDITIVE WIDENING — CP-12 W3, per PHASE-CP-12-DESIGN.md §3.5 "minimal
|
|
414
|
+
* multi-track status node; rich UX is #469"]. Per-track lifecycle state as the
|
|
415
|
+
* status node renders it. The deep 6-class failure UX + rich per-track timeline
|
|
416
|
+
* are [DEFERRED → CP-8 #469] — this carries ONLY the compact node's inputs.
|
|
417
|
+
*
|
|
418
|
+
* [ADDITIVE WIDENING — PHASE-589/469 W2] `Revising` — a transient NON-terminal
|
|
419
|
+
* state while a team track auto-revises (the engine minted a round-N+1 REVISE
|
|
420
|
+
* round on a revisable verification-failed marker, cap permitting). The track
|
|
421
|
+
* flips back to `InFlight` machinery on the re-spawn and resolves to
|
|
422
|
+
* `Passed`/`Failed` later; on cap-exhaust it terminal-fails to `Failed` (W1's
|
|
423
|
+
* render). NOT a terminal state — the group-terminal check treats only
|
|
424
|
+
* `Passed`/`Failed` as terminal.
|
|
425
|
+
*/
|
|
426
|
+
export type TeamTrackState = 'Pending' | 'InFlight' | 'Passed' | 'Failed' | 'Revising' | 'AwaitingDecision';
|
|
427
|
+
/**
|
|
428
|
+
* [ADDITIVE WIDENING — CP-12 W3] The group MergeGate status as the compact
|
|
429
|
+
* status node renders it. `'none'` until a MergeGateDispatch arrives.
|
|
430
|
+
*/
|
|
431
|
+
export type TeamMergeGateStatus = 'none' | 'pending' | 'pass' | 'fail';
|
|
432
|
+
/**
|
|
433
|
+
* Human label for a `TeamMergeGateStatus` — the SINGLE source of truth shared by
|
|
434
|
+
* the `<MultiTrackStatusNode>` header and the `/status` (`buildStatusSummary`)
|
|
435
|
+
* text, so the two never drift.
|
|
436
|
+
*/
|
|
437
|
+
export declare const MERGE_GATE_STATUS_LABEL: Record<TeamMergeGateStatus, string>;
|
|
438
|
+
/**
|
|
439
|
+
* [ADDITIVE WIDENING — CP-12 W3] Minimal per-track entry for the status node.
|
|
440
|
+
*/
|
|
441
|
+
export interface TeamTrackEntry {
|
|
442
|
+
state: TeamTrackState;
|
|
443
|
+
taskId?: string;
|
|
444
|
+
agent?: string;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* [ADDITIVE WIDENING — CP-12 W3] Minimal team state. `null` for
|
|
448
|
+
* single-track/Companion/stub sessions (no team → no status node). Populated
|
|
449
|
+
* when `/team` accepts a task group + per-track W2.b shell events arrive.
|
|
450
|
+
*/
|
|
451
|
+
export interface TeamState {
|
|
452
|
+
taskGroupId: string;
|
|
453
|
+
/** track_index → minimal track entry. */
|
|
454
|
+
tracks: Map<number, TeamTrackEntry>;
|
|
455
|
+
mergeGate: TeamMergeGateStatus;
|
|
456
|
+
/** Set when a TaskGroupHalted is surfaced (status node shows a halt line). */
|
|
457
|
+
haltReason: string | null;
|
|
458
|
+
/**
|
|
459
|
+
* [ADDITIVE WIDENING — PHASE-589+469 W1] `true` once the group's MergeGate
|
|
460
|
+
* resolves to a terminal outcome (the desktop consumed the AUTHORITATIVE
|
|
461
|
+
* `{ outcome }` returned by `submitMergeGateVerdict`). Drives the
|
|
462
|
+
* `MultiTrackStatusNode` footer (`Team complete` / `Team halted — <class>`).
|
|
463
|
+
* Stays `false` for an in-flight group.
|
|
464
|
+
*/
|
|
465
|
+
groupResolved: boolean;
|
|
466
|
+
/**
|
|
467
|
+
* [ADDITIVE WIDENING — PHASE-589+469 W1] The AUTHORITATIVE engine outcome
|
|
468
|
+
* string (`"complete"` or a `halted_reason` const) once `groupResolved` is
|
|
469
|
+
* set; `undefined` until then. The footer renders `complete` vs the failure
|
|
470
|
+
* class from this value.
|
|
471
|
+
*/
|
|
472
|
+
outcome?: string;
|
|
473
|
+
/**
|
|
474
|
+
* [ADDITIVE WIDENING — TUI-LIVE-TASK-STATUS-PHASE-1B-2 P1b] ISO wall-clock
|
|
475
|
+
* anchor stamped (strictly-monotonic, LE-side) when the merge gate first goes
|
|
476
|
+
* `'pending'`; carried forward and used to tick the merge-gate elapsed timer on
|
|
477
|
+
* `MultiTrackStatusNode`. Re-anchored on a genuine re-drain (strictly-newer
|
|
478
|
+
* `started_at`); undefined until the first `'pending'`.
|
|
479
|
+
*/
|
|
480
|
+
mergeGateStartedAt?: string;
|
|
481
|
+
/**
|
|
482
|
+
* [ADDITIVE WIDENING — TUI-LIVE-TASK-STATUS-PHASE-1B-2 P1b] Frozen final elapsed
|
|
483
|
+
* (ms) of the merge gate. WRITE-ONCE: set by the FIRST terminal (convergence
|
|
484
|
+
* pass/fail, the local attempt-end, or the groupResolved/halted fallback) and
|
|
485
|
+
* never overwritten by a later shared-convergence emit; cleared (→ undefined) on
|
|
486
|
+
* a re-drain so the next generation can write. `null`/undefined ⇔ still ticking.
|
|
487
|
+
*/
|
|
488
|
+
mergeGateElapsedMs?: number;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* [ADDITIVE WIDENING — CP-1.f live progress surfacing] The single EPHEMERAL
|
|
492
|
+
* live status line shown between the StatusBar and the InputBar while a task is
|
|
493
|
+
* busy (implementor running, promote/discard in flight). `null` when idle / when
|
|
494
|
+
* the user is in control (a gate prompt is shown → `waiting_user` clears it).
|
|
495
|
+
* Milestones (diff captured, verdicts received, promoted, …) are NOT stored here
|
|
496
|
+
* — they are appended to `conversation` as persisted scrollback entries. This is
|
|
497
|
+
* desktop-LOCAL only: counts/labels/elapsed, never plaintext (see
|
|
498
|
+
* `task-progress.ts`).
|
|
499
|
+
*/
|
|
500
|
+
export interface LiveProgress {
|
|
501
|
+
/** The phase of the in-flight spinner line. */
|
|
502
|
+
phase: TaskProgressEvent['phase'];
|
|
503
|
+
/** The BOUNDED live label (counts/labels/paths only — no plaintext, no embedded timer). */
|
|
504
|
+
text: string;
|
|
505
|
+
/** When this line was last refreshed. Retained; currently unused (no component reads it). */
|
|
506
|
+
updatedAt: string;
|
|
507
|
+
/** ISO — when THIS busy window opened; the wall-clock timer anchor. */
|
|
508
|
+
startedAt: string;
|
|
509
|
+
/**
|
|
510
|
+
* The per-TASK origin epoch of the event that opened/last-refreshed this window
|
|
511
|
+
* (§2/§3). Undefined ONLY for the direct-dispatched classify/familiarize windows
|
|
512
|
+
* (they carry no epoch). The reducer's straggler guard no-ops any event whose
|
|
513
|
+
* epoch is strictly OLDER than this.
|
|
514
|
+
*/
|
|
515
|
+
epoch?: number;
|
|
516
|
+
/**
|
|
517
|
+
* [ADDITIVE WIDENING — token counter, Phase 2 · P2-4] The per-TASK CUMULATIVE
|
|
518
|
+
* token total carried MONOTONICALLY across same-epoch OPEN/REFRESH builds
|
|
519
|
+
* (`Math.max(cur, event.tokens) || undefined`) so a token-less refresh keeps the
|
|
520
|
+
* prior count and a reopened window preserves it; reset on a new epoch. A bare
|
|
521
|
+
* count (invariant-safe). `undefined` until a source reports (segment omitted).
|
|
522
|
+
*/
|
|
523
|
+
tokens?: number;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* §5.1 LOCK lines 463-480. Owned by the orchestration-shell store.
|
|
527
|
+
* Bounded ring buffer on `conversation` (last 500 entries — design line
|
|
528
|
+
* 469).
|
|
529
|
+
*/
|
|
530
|
+
export interface OrchestrationState {
|
|
531
|
+
session: Session;
|
|
532
|
+
plannerHealth: PlannerHealthState;
|
|
533
|
+
conversation: ConversationEntry[];
|
|
534
|
+
runningTasks: Map<string, RunningTaskState>;
|
|
535
|
+
queuedTasks: QueuedTask[];
|
|
536
|
+
activeReviewerSeats: Map<string, ReviewerSeatState>;
|
|
537
|
+
currentGate: GateState | null;
|
|
538
|
+
pendingClarification: PendingClarification | null;
|
|
539
|
+
inputHistory: string[];
|
|
540
|
+
/**
|
|
541
|
+
* `[ADDITIVE WIDENING — CP-1.d]` per `PHASE-CP-1-D-DESIGN.md` §4.8
|
|
542
|
+
* lines 1011-1019. `null` until session-start generation completes (or
|
|
543
|
+
* the `/structural-summary --regenerate` side effect refreshes it).
|
|
544
|
+
* sha256 is stable per `assembler.ts` canonical-replacer.
|
|
545
|
+
*/
|
|
546
|
+
structuralSummary: StructuralSummary | null;
|
|
547
|
+
/**
|
|
548
|
+
* `[ADDITIVE WIDENING — CP-1.d]` per `PHASE-CP-1-D-DESIGN.md` §4.8
|
|
549
|
+
* lines 1011-1019. Populated when `STRUCTURAL_SUMMARY_FAILED` fires
|
|
550
|
+
* (fail-closed per §4.7); cleared on next successful regeneration.
|
|
551
|
+
*/
|
|
552
|
+
structuralSummaryError: string | null;
|
|
553
|
+
/**
|
|
554
|
+
* `[ADDITIVE WIDENING — CP-12 W3]` per PHASE-CP-12-DESIGN.md §3.5. `null`
|
|
555
|
+
* for single-track/Companion/stub sessions (the status node is hidden).
|
|
556
|
+
* Populated by `/team` (createTaskGroup accepted) + the W2.b per-track shell
|
|
557
|
+
* events. Rich per-track timeline + MergeGate result card are
|
|
558
|
+
* [DEFERRED → CP-8 #469].
|
|
559
|
+
*/
|
|
560
|
+
team: TeamState | null;
|
|
561
|
+
/**
|
|
562
|
+
* `[ADDITIVE WIDENING — CP-1.f live progress surfacing]` The current ephemeral
|
|
563
|
+
* live status line (spinner). `null` when idle / waiting on the user. Updated
|
|
564
|
+
* in place by `TASK_PROGRESS` spinner phases; cleared by `waiting_user` and by
|
|
565
|
+
* the terminal milestone phases (`promoted` / `discarded`). Non-loop /
|
|
566
|
+
* Companion / stub sessions never dispatch `TASK_PROGRESS`, so this stays null.
|
|
567
|
+
*/
|
|
568
|
+
progress: LiveProgress | null;
|
|
569
|
+
/**
|
|
570
|
+
* `[ADDITIVE WIDENING — /reviewer-setup wizard, 2026-06-29]` The active
|
|
571
|
+
* interactive reviewer-panel setup modal, or `null` when no wizard is open
|
|
572
|
+
* (the default — InputBar is shown). Opened by the `/reviewer-setup` slash
|
|
573
|
+
* command (`REVIEWER_WIZARD_OPEN`, after the entrypoint detects installed
|
|
574
|
+
* agents + reads the current policy); cleared on save/cancel
|
|
575
|
+
* (`REVIEWER_WIZARD_CLOSE`). While non-null, `<OrchestrationApp>` renders
|
|
576
|
+
* `<ReviewerSetupWizard>` IN PLACE OF the `<InputBar>` so the wizard owns
|
|
577
|
+
* keyboard focus. Non-team / Companion / CP-1.a sessions never open it.
|
|
578
|
+
*/
|
|
579
|
+
reviewerWizard: ReviewerWizardState | null;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Snapshot threaded into the interactive `/reviewer-setup` wizard when it
|
|
583
|
+
* opens. The entrypoint (`handleShellUserInput`) gathers these BEFORE
|
|
584
|
+
* dispatching `REVIEWER_WIZARD_OPEN` so the wizard renders synchronously from
|
|
585
|
+
* props with no in-component network I/O:
|
|
586
|
+
* - `tier` decides the seat budget (Pro = 2 seats, Max = 3).
|
|
587
|
+
* - `installedAgents` is the host-detected agent set — the wizard offers ONLY
|
|
588
|
+
* these as reviewer choices (mirrors the `codevibe orchestration configure`
|
|
589
|
+
* CLI), so a user can never pick an uninstalled agent.
|
|
590
|
+
* - `currentSeats` is shown as a CONTEXT line at the top of the wizard (the
|
|
591
|
+
* user's existing panel) — display only; the wizard starts fresh at the
|
|
592
|
+
* panel-choice step. Absent → "tier defaults".
|
|
593
|
+
*
|
|
594
|
+
* NB: there is no enable/disable state — the legacy `orchestrationEnabledDefault`
|
|
595
|
+
* opt-in was removed in CP-1 (2.0 orchestration is shell-driven, not a stored
|
|
596
|
+
* flag), so the wizard configures the reviewer PANEL only.
|
|
597
|
+
*/
|
|
598
|
+
export interface ReviewerWizardState {
|
|
599
|
+
tier: Tier;
|
|
600
|
+
installedAgents: Array<'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY'>;
|
|
601
|
+
currentSeats: ReviewerAgentSpec[] | null;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* §5.1 LOCK lines 502-513. Discriminated union over every state
|
|
605
|
+
* transition the reducer covers. `attachedTaskId` / `ATTACH` / `DETACH`
|
|
606
|
+
* variants are NOT present per §5.1.5 — `/attach` is DEFERRED to CP-1.1.
|
|
607
|
+
*
|
|
608
|
+
* [ADDITIVE WIDENING — CP-1.a, per Stage 1 r1 MEDIUM-1] CP-1.a widens the
|
|
609
|
+
* locked §5.1 OrchestrationAction with 5 additive surfaces (all required
|
|
610
|
+
* by the reducer + render pipeline; none change the locked semantics):
|
|
611
|
+
*
|
|
612
|
+
* - `PLANNER_DECISION.taskId?: string` (optional) — populates
|
|
613
|
+
* `state.runningTasks.taskId` when the decision spawns one. CP-1.b
|
|
614
|
+
* will widen further when the planner client wires the real taskId.
|
|
615
|
+
* - `REVIEWER_STATE_CHANGED.nodeId: string` — disambiguates which
|
|
616
|
+
* `kind:'reviewer-status-node'` ConversationEntry to update in place
|
|
617
|
+
* (multiple reviewer-quorum nodes can be live concurrently).
|
|
618
|
+
* - `GATE_STATE_CHANGED.nodeId: string` — same disambiguation for
|
|
619
|
+
* `kind:'gate-status-node'`.
|
|
620
|
+
* - `TASK_LIFECYCLE` (new variant) — populates `state.runningTasks`
|
|
621
|
+
* on spawn / cancel / completion. The design's §5.1 line 470 calls
|
|
622
|
+
* for `runningTasks: Map<string, RunningTaskState>` but did not name
|
|
623
|
+
* the action that writes to it; this is the gap-filling variant.
|
|
624
|
+
* - `CLEAR_PENDING_CLARIFICATION` (new variant) — invoked by `cli.ts`
|
|
625
|
+
* when the planner returns a non-`ask_user` decision and we need to
|
|
626
|
+
* clear stale clarifications. Design §5.1 says the next USER_INPUT
|
|
627
|
+
* resolves the question, but a non-ask_user decision returning
|
|
628
|
+
* out-of-band needs an explicit reset.
|
|
629
|
+
*
|
|
630
|
+
* CP-1.b/c may further widen the union. Stage A LOCK invariant: every
|
|
631
|
+
* NEW variant or required field is tagged here before the reducer
|
|
632
|
+
* consumes it.
|
|
633
|
+
*/
|
|
634
|
+
export type OrchestrationAction = {
|
|
635
|
+
type: 'USER_INPUT';
|
|
636
|
+
text: string;
|
|
637
|
+
attachments?: ImageAttachment[];
|
|
638
|
+
imagePaths?: string[];
|
|
639
|
+
} | {
|
|
640
|
+
type: 'PLANNER_DECISION';
|
|
641
|
+
decision: PlannerDecision;
|
|
642
|
+
taskId?: string;
|
|
643
|
+
brainstorm?: BrainstormContextMetadata;
|
|
644
|
+
} | {
|
|
645
|
+
type: 'EVENT_RECEIVED';
|
|
646
|
+
event: EventStreamEntry;
|
|
647
|
+
role?: 'implementor' | 'reviewer';
|
|
648
|
+
} | {
|
|
649
|
+
type: 'REVIEWER_STATE_CHANGED';
|
|
650
|
+
nodeId: string;
|
|
651
|
+
seatId: string;
|
|
652
|
+
newState: ReviewerSeatState;
|
|
653
|
+
} | {
|
|
654
|
+
type: 'GATE_STATE_CHANGED';
|
|
655
|
+
nodeId: string;
|
|
656
|
+
gate: GateState;
|
|
657
|
+
} | {
|
|
658
|
+
type: 'PLANNER_HEALTH_CHANGED';
|
|
659
|
+
newState: PlannerHealthState;
|
|
660
|
+
} | {
|
|
661
|
+
type: 'SLASH_OUTPUT';
|
|
662
|
+
command: string;
|
|
663
|
+
output: string;
|
|
664
|
+
} | {
|
|
665
|
+
type: 'CLARIFICATION_ANSWERED';
|
|
666
|
+
answer: string;
|
|
667
|
+
} | {
|
|
668
|
+
type: 'TASK_QUEUED';
|
|
669
|
+
queuedTask: QueuedTask;
|
|
670
|
+
} | {
|
|
671
|
+
type: 'TASK_DEQUEUED';
|
|
672
|
+
queuedTaskId: string;
|
|
673
|
+
} | {
|
|
674
|
+
type: 'TASK_LIFECYCLE';
|
|
675
|
+
task: RunningTaskState;
|
|
676
|
+
} | {
|
|
677
|
+
type: 'CLEAR_PENDING_CLARIFICATION';
|
|
678
|
+
} | {
|
|
679
|
+
type: 'STRUCTURAL_SUMMARY_GENERATED';
|
|
680
|
+
summary: StructuralSummary;
|
|
681
|
+
elapsedMs: number;
|
|
682
|
+
} | {
|
|
683
|
+
type: 'STRUCTURAL_SUMMARY_FAILED';
|
|
684
|
+
error: string;
|
|
685
|
+
} | {
|
|
686
|
+
type: 'GATE_PROMPT_RECEIVED';
|
|
687
|
+
envelope: GatePromptEnvelope;
|
|
688
|
+
} | {
|
|
689
|
+
type: 'GATE_PROMPT_NOTES_REQUESTED';
|
|
690
|
+
promptEntryId: string;
|
|
691
|
+
decisionDraft: string;
|
|
692
|
+
} | {
|
|
693
|
+
type: 'GATE_PROMPT_SUBMIT_STARTED';
|
|
694
|
+
promptEntryId: string;
|
|
695
|
+
} | {
|
|
696
|
+
type: 'GATE_PROMPT_RESOLVED';
|
|
697
|
+
promptEntryId: string;
|
|
698
|
+
gateId: string;
|
|
699
|
+
postAction: PostDecisionAction;
|
|
700
|
+
} | {
|
|
701
|
+
type: 'GATE_PROMPT_SUBMIT_FAILED';
|
|
702
|
+
promptEntryId: string;
|
|
703
|
+
gateId: string;
|
|
704
|
+
error: string;
|
|
705
|
+
} | {
|
|
706
|
+
type: 'GATE_PROMPT_RESOLVED_EXTERNALLY';
|
|
707
|
+
promptEntryId: string;
|
|
708
|
+
gateId: string;
|
|
709
|
+
serverDecision: string | null;
|
|
710
|
+
} | {
|
|
711
|
+
type: 'SHELL_ADVISORY';
|
|
712
|
+
text: string;
|
|
713
|
+
source: 'shell';
|
|
714
|
+
} | {
|
|
715
|
+
type: 'GATE_PROMPT_NOTES_CANCELLED';
|
|
716
|
+
promptEntryId: string;
|
|
717
|
+
} | {
|
|
718
|
+
type: 'GATE_SUMMARY_LOADED';
|
|
719
|
+
gateId: string;
|
|
720
|
+
panelModel: ReviewSummaryPanelModel;
|
|
721
|
+
} | {
|
|
722
|
+
type: 'TEAM_STARTED';
|
|
723
|
+
taskGroupId: string;
|
|
724
|
+
} | {
|
|
725
|
+
type: 'TEAM_TRACK_ASSIGNED';
|
|
726
|
+
trackIndex: number;
|
|
727
|
+
state: TeamTrackState;
|
|
728
|
+
taskId?: string;
|
|
729
|
+
agent?: string;
|
|
730
|
+
} | {
|
|
731
|
+
type: 'TEAM_MERGE_GATE';
|
|
732
|
+
status: TeamMergeGateStatus;
|
|
733
|
+
startedAt?: string;
|
|
734
|
+
endedAt?: string;
|
|
735
|
+
} | {
|
|
736
|
+
type: 'TEAM_HALTED';
|
|
737
|
+
haltReason: string;
|
|
738
|
+
} | {
|
|
739
|
+
type: 'TEAM_TRACK_TERMINAL';
|
|
740
|
+
trackIndex: number;
|
|
741
|
+
state: TeamTrackState;
|
|
742
|
+
} | {
|
|
743
|
+
type: 'TEAM_TRACK_REVISING';
|
|
744
|
+
trackIndex: number;
|
|
745
|
+
} | {
|
|
746
|
+
type: 'TEAM_TRACK_AWAITING_DECISION';
|
|
747
|
+
trackIndex: number;
|
|
748
|
+
} | {
|
|
749
|
+
type: 'TEAM_GROUP_RESOLVED';
|
|
750
|
+
outcome: string;
|
|
751
|
+
} | {
|
|
752
|
+
type: 'TASK_PROGRESS';
|
|
753
|
+
event: TaskProgressEvent;
|
|
754
|
+
} | {
|
|
755
|
+
type: 'REVIEWER_WIZARD_OPEN';
|
|
756
|
+
wizard: ReviewerWizardState;
|
|
757
|
+
} | {
|
|
758
|
+
type: 'REVIEWER_WIZARD_CLOSE';
|
|
759
|
+
} | {
|
|
760
|
+
type: 'EXIT';
|
|
761
|
+
};
|
|
762
|
+
/**
|
|
763
|
+
* §2 LOCK lines 108-113. `~/.codevibe/last-mode.json` shape.
|
|
764
|
+
*/
|
|
765
|
+
export interface LastModeFile {
|
|
766
|
+
schemaVersion: 1;
|
|
767
|
+
mode: Mode;
|
|
768
|
+
pickedAt: string;
|
|
769
|
+
pickedByTier: 'PRO' | 'MAX';
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Tier surface used by §2 mode-selection. Matches the runtime tiers
|
|
773
|
+
* carried by `getSubscriptionStatus` (FREE / PRO / MAX). CP-1.a only
|
|
774
|
+
* needs the literal union — the AppSync-side enum lives in
|
|
775
|
+
* `src/types/auth.ts` already.
|
|
776
|
+
*/
|
|
777
|
+
export type Tier = 'FREE' | 'PRO' | 'MAX';
|