@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,431 @@
|
|
|
1
|
+
import { AppSyncClient } from '../appsync';
|
|
2
|
+
import { Session } from '../types';
|
|
3
|
+
import { Mode, Tier } from './types';
|
|
4
|
+
import { type RunOrchestrationShellArgs } from './index';
|
|
5
|
+
import { type ShellEventEmit } from './emit-shell-event';
|
|
6
|
+
import { BackendPlannerClient, PlannerCacheLayer, PlannerHealthMachine, type LocalGemmaAdvisoryRunner, type LocalGemmaPlannerRunner } from '../planner';
|
|
7
|
+
import type { PlannerAdapter, PlannerInput, PlannerDecision, PlannerProbeResult } from '../planner/adapter';
|
|
8
|
+
import { type LocalExecutor, type AuthorityScope, type EmitShellEventFn as LEEmitShellEventFn } from '../local-executor';
|
|
9
|
+
import { type EngineGroupState } from '../local-executor';
|
|
10
|
+
import type { TeamTapEvent } from './index';
|
|
11
|
+
import type { GroupDecisionSubmitDeps } from './gate-decision-submit';
|
|
12
|
+
import { QuorumLoop } from './quorum-loop';
|
|
13
|
+
import type { TaskProgressEvent } from './task-progress';
|
|
14
|
+
import { type VerdictClassifier } from '../reviewer/verdict-classifier';
|
|
15
|
+
import { type LocalModelArtifactConfig, type LocalModelCommand, type LocalModelEntitlement, type LocalModelStore } from '../local-model/manager';
|
|
16
|
+
import { type LocalModelState } from '../local-model/state';
|
|
17
|
+
/**
|
|
18
|
+
* CP-1.b IMPL r5 H-1 — Sentinel error thrown by the stub-session
|
|
19
|
+
* planner adapter. `handleShellUserInput` catches this typed class and
|
|
20
|
+
* routes it through the explicit error renderer (SLASH_OUTPUT) so the
|
|
21
|
+
* user sees an actionable message in the conversation pane instead of
|
|
22
|
+
* a silent log line. Stub sessions (sessionId prefix `cp1a-local-` or
|
|
23
|
+
* empty `encryptedKeys`) cannot reach the Lambda — `encryptedKeys` is
|
|
24
|
+
* missing, the keychain resolver returns null, and the planner client
|
|
25
|
+
* throws "session key unresolved" deep inside classify(). Surfacing
|
|
26
|
+
* that as a typed error at the adapter boundary is cleaner than the
|
|
27
|
+
* generic Error from `BackendPlannerClient.classify()`.
|
|
28
|
+
*/
|
|
29
|
+
export declare class PlannerUnavailableError extends Error {
|
|
30
|
+
constructor(msg: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* CP-1.b IMPL r5 H-1 — Stub-session planner adapter.
|
|
34
|
+
*
|
|
35
|
+
* CP-1.a still ships a fake `cp1a-local-*` session with no
|
|
36
|
+
* `encryptedKeys[]`. The production `BackendPlannerClient` cannot
|
|
37
|
+
* classify against that session — the Lambda requires E2E-encrypted
|
|
38
|
+
* payloads, which requires the session key, which the keychain
|
|
39
|
+
* resolver cannot derive without `encryptedKeys`.
|
|
40
|
+
*
|
|
41
|
+
* Rather than wire up the production stack and let it fail with a
|
|
42
|
+
* generic "session key unresolved" Error deep inside classify(), we
|
|
43
|
+
* detect stub sessions at bootstrap and construct this adapter, which
|
|
44
|
+
* throws a typed `PlannerUnavailableError` on classify(). The shell's
|
|
45
|
+
* `handleShellUserInput` catches this and renders an actionable
|
|
46
|
+
* message to the user (`PLANNER_UNAVAILABLE: <reason>`). CP-1.c lands
|
|
47
|
+
* the real session bootstrap (resumeOrCreateSession + AppSync) and
|
|
48
|
+
* this adapter is no longer wired in.
|
|
49
|
+
*/
|
|
50
|
+
export declare class PlannerUnavailableAdapter implements PlannerAdapter {
|
|
51
|
+
private readonly reason;
|
|
52
|
+
private activeSessionId;
|
|
53
|
+
constructor(reason: string);
|
|
54
|
+
classify(_input: PlannerInput): Promise<PlannerDecision>;
|
|
55
|
+
probe(): Promise<PlannerProbeResult>;
|
|
56
|
+
setActiveSession(sessionId: string | null): void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Local-LLM planner placeholder for the Gemma QAT migration slice. This adapter
|
|
60
|
+
* is intentionally local-only: it never calls AppSync planner mutations or any
|
|
61
|
+
* hosted fallback. Until the verified Gemma runner is wired, natural-language
|
|
62
|
+
* planning requests fail closed with an actionable shell message.
|
|
63
|
+
*/
|
|
64
|
+
export declare class LocalModelPlannerUnavailableAdapter implements PlannerAdapter {
|
|
65
|
+
private readonly reason;
|
|
66
|
+
constructor(reason: string);
|
|
67
|
+
classify(_input: PlannerInput): Promise<PlannerDecision>;
|
|
68
|
+
probe(): Promise<PlannerProbeResult>;
|
|
69
|
+
setActiveSession(_sessionId: string | null): void;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* CP-1.b IMPL r5 H-1 — Detect a CP-1.a stub session. Two signals:
|
|
73
|
+
* (a) `sessionId` starts with `cp1a-local-` (the
|
|
74
|
+
* `buildStubSession()` prefix).
|
|
75
|
+
* (b) `session.encryptedKeys` is empty / missing (any session
|
|
76
|
+
* lacking E2E keys cannot route through the Lambda).
|
|
77
|
+
*
|
|
78
|
+
* Either signal triggers the stub-session adapter. The (b) gate is
|
|
79
|
+
* a defensive fallback for the case where CP-1.c starts a real
|
|
80
|
+
* session bootstrap but `prepareSessionEncryption()` returns null
|
|
81
|
+
* (no device keys registered): the planner is genuinely unavailable
|
|
82
|
+
* until the user registers a device key.
|
|
83
|
+
*/
|
|
84
|
+
export declare function isStubSession(session: Session): boolean;
|
|
85
|
+
export declare function buildStubSessionShellArgs(args: Omit<RunOrchestrationShellArgs, 'disableStructuralContextRefresh'>): RunOrchestrationShellArgs;
|
|
86
|
+
/**
|
|
87
|
+
* CP-1.f §3.C.19 — resolve a REAL backend session for the orchestration loop
|
|
88
|
+
* (closes #513). When authenticated:
|
|
89
|
+
* 1. resume the user's most-recent ACTIVE session via `getSession` (which
|
|
90
|
+
* returns `encryptedKeys`) AND warm the session-key cache from them so the
|
|
91
|
+
* QuorumLoop's `getSessionKey` is non-null, OR
|
|
92
|
+
* 2. create a new orchestration session with the FULL E2E bootstrap
|
|
93
|
+
* (`prepareSessionEncryption` → `createSession` with isEncrypted /
|
|
94
|
+
* encryptedKeys / creatorDeviceId / encryptionVersion → `cacheSessionKey`),
|
|
95
|
+
* so the orchestration/planner-proxy Lambda is a recipient in
|
|
96
|
+
* `Session.encryptedKeys` (can decrypt encProposal/verdict) AND the local
|
|
97
|
+
* key cache is warm. Stage-1 FIX 1 — replaces the prior crypto-dropping
|
|
98
|
+
* `createSession` reimplementation that hung the loop ("no session key").
|
|
99
|
+
* Falls back to `buildStubSession()` when unauthenticated / offline / on any
|
|
100
|
+
* error — the stub-session guards downstream keep that path fully usable.
|
|
101
|
+
*
|
|
102
|
+
* The tier is resolved here too (§3.C.19): a `CODEVIBE_TIER` env override wins
|
|
103
|
+
* (the dev/dogfood lever), else `getSubscriptionStatus`, else FREE (fail-closed
|
|
104
|
+
* — Orchestration Mode is never surfaced to Free).
|
|
105
|
+
*/
|
|
106
|
+
export declare function resumeOrCreateSession(appsyncClient: AppSyncClient, deps?: {
|
|
107
|
+
resolveSessionIdFn?: (client: AppSyncClient) => Promise<string | null>;
|
|
108
|
+
}): Promise<{
|
|
109
|
+
session: Session;
|
|
110
|
+
tier: Tier;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* CP-8 Slice C (#570) — parse a top-level `audit show <task-id> [--json]
|
|
114
|
+
* [--session <id>]` subcommand from the raw argv. Returns null when the argv is
|
|
115
|
+
* NOT an audit subcommand (so `main` falls through to mode selection). Detected
|
|
116
|
+
* BEFORE the mode parse so `audit` isn't swallowed as a passthrough arg.
|
|
117
|
+
*/
|
|
118
|
+
export interface ParsedAuditArgs {
|
|
119
|
+
taskId: string;
|
|
120
|
+
json: boolean;
|
|
121
|
+
/** Explicit session override; when absent the runner resolves the active session. */
|
|
122
|
+
sessionId?: string;
|
|
123
|
+
}
|
|
124
|
+
export declare function parseAuditArgs(argv: string[]): ParsedAuditArgs | null;
|
|
125
|
+
export interface ParsedModelArgs {
|
|
126
|
+
command: LocalModelCommand | 'help';
|
|
127
|
+
viaWithLocalModelFlag: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Parse local-model meta commands before mode selection. These commands must
|
|
131
|
+
* not be swallowed as Companion passthrough args, because the entitlement gate
|
|
132
|
+
* has to run before any model download, warmup, or health check can start.
|
|
133
|
+
*/
|
|
134
|
+
export declare function parseModelArgs(argv: string[]): ParsedModelArgs | null;
|
|
135
|
+
export declare function runModelCli(parsed: ParsedModelArgs, deps?: {
|
|
136
|
+
appsyncClient?: AppSyncClient;
|
|
137
|
+
resolveEntitlement?: () => Promise<LocalModelEntitlement>;
|
|
138
|
+
stdout?: (s: string) => void;
|
|
139
|
+
stderr?: (s: string) => void;
|
|
140
|
+
}): Promise<number>;
|
|
141
|
+
export interface LocalModelBootDecision {
|
|
142
|
+
mode: Mode;
|
|
143
|
+
notice: string | null;
|
|
144
|
+
}
|
|
145
|
+
export declare function resolveLocalModelBoot(args: {
|
|
146
|
+
requestedMode: Mode;
|
|
147
|
+
entitlement: LocalModelEntitlement;
|
|
148
|
+
state: LocalModelState;
|
|
149
|
+
}): LocalModelBootDecision;
|
|
150
|
+
export interface LocalGemmaPlannerBuildResult {
|
|
151
|
+
adapter: PlannerAdapter;
|
|
152
|
+
advisoryRunner: LocalGemmaAdvisoryRunner | null;
|
|
153
|
+
/**
|
|
154
|
+
* REVIEWER-VERDICT-GEMMA-CLASSIFIER-DESIGN.md (§Wiring) — the SAME resolved
|
|
155
|
+
* Gemma runner instance as {@link advisoryRunner} (both `null` on the unavailable
|
|
156
|
+
* path), exposed with the wider `LocalGemmaPlannerRunner` type (it carries
|
|
157
|
+
* `classify`, which the verdict classifier needs; `advisoryRunner` keeps the
|
|
158
|
+
* stricter `LocalGemmaAdvisoryRunner` type its consumer requires). One instance ⇒
|
|
159
|
+
* a SINGLE availability source for both the planner and the verdict classifier —
|
|
160
|
+
* they can never disagree about whether Gemma is up.
|
|
161
|
+
*/
|
|
162
|
+
classifyRunner: LocalGemmaPlannerRunner | null;
|
|
163
|
+
runtimeKind: NonNullable<RunOrchestrationShellArgs['plannerRuntimeKind']>;
|
|
164
|
+
/**
|
|
165
|
+
* TUI redesign (2026-06-29) — display label for the status-bar planner badge
|
|
166
|
+
* (model name, tag-stripped, e.g. `gemma4`). Derived even on the unavailable
|
|
167
|
+
* path so the degraded badge can still name the intended model.
|
|
168
|
+
*/
|
|
169
|
+
runtimeLabel: string;
|
|
170
|
+
reason: string | null;
|
|
171
|
+
}
|
|
172
|
+
export declare function buildLocalGemmaPlannerAdapter(args: {
|
|
173
|
+
state: LocalModelState;
|
|
174
|
+
config?: LocalModelArtifactConfig;
|
|
175
|
+
store?: LocalModelStore;
|
|
176
|
+
env?: NodeJS.ProcessEnv;
|
|
177
|
+
}): Promise<LocalGemmaPlannerBuildResult>;
|
|
178
|
+
/**
|
|
179
|
+
* CP-8 Slice C (#570) — the meta-CLI `codevibe audit show <task-id> [--json]`
|
|
180
|
+
* entrypoint. Authenticates the AppSync client (mirrors the `main()` auth
|
|
181
|
+
* wiring), resolves the task's session id (explicit `--session` OR the most
|
|
182
|
+
* recent ACTIVE session), runs the Max-gated browser, and prints either the
|
|
183
|
+
* JSON model (`--json`) or a readable newest-first timeline (default).
|
|
184
|
+
*
|
|
185
|
+
* Returns a process exit code (0 = printed something the user expects; 2 =
|
|
186
|
+
* usage error). The Max interstitial + error empty-state are NOT failures —
|
|
187
|
+
* they print and return 0.
|
|
188
|
+
*
|
|
189
|
+
* Exported for unit tests; production goes through `main()`.
|
|
190
|
+
*/
|
|
191
|
+
export declare function runAuditCli(parsed: ParsedAuditArgs, deps?: {
|
|
192
|
+
appsyncClient?: AppSyncClient;
|
|
193
|
+
/** Test seam — overrides the active-session resolution. */
|
|
194
|
+
resolveSessionIdFn?: (client: AppSyncClient) => Promise<string | null>;
|
|
195
|
+
stdout?: (s: string) => void;
|
|
196
|
+
stderr?: (s: string) => void;
|
|
197
|
+
}): Promise<number>;
|
|
198
|
+
export declare function main(argv: string[]): Promise<number>;
|
|
199
|
+
/**
|
|
200
|
+
* CP-1.b IMPL r4 H-1 — Production planner stack factory.
|
|
201
|
+
*
|
|
202
|
+
* Builds the full BackendPlannerClient + PlannerCacheLayer +
|
|
203
|
+
* PlannerHealthMachine chain so the orchestration shell can call
|
|
204
|
+
* `plannerAdapter.classify()` on natural-language input.
|
|
205
|
+
*
|
|
206
|
+
* Co-located with the CLI bootstrap (NOT inside `runOrchestrationShell`)
|
|
207
|
+
* because the shell accepts an injected adapter for tests; the
|
|
208
|
+
* production bootstrap site is the single canonical instantiation
|
|
209
|
+
* point.
|
|
210
|
+
*
|
|
211
|
+
* Exported for unit tests; production callers go through `main()`.
|
|
212
|
+
*/
|
|
213
|
+
export declare function buildProductionPlannerStack(appsyncClient: AppSyncClient, emitter: (args: ShellEventEmit) => Promise<void>): {
|
|
214
|
+
adapter: BackendPlannerClient;
|
|
215
|
+
cache: PlannerCacheLayer;
|
|
216
|
+
health: PlannerHealthMachine;
|
|
217
|
+
};
|
|
218
|
+
export interface BuildTeamLocalExecutorResult {
|
|
219
|
+
localExecutor: LocalExecutor;
|
|
220
|
+
teamShellEventTap: {
|
|
221
|
+
fn: (args: TeamTapEvent) => void;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* CP-1.f §3.C — the reviewer-quorum loop driver, constructed alongside the LE
|
|
225
|
+
* and wired into the LE's Class B consumer (real Ed25519 verify +
|
|
226
|
+
* REVIEWER_DISPATCH spawnReviewers + REVISE_FEEDBACK runReviseRound).
|
|
227
|
+
* `runOrchestrationShell` threads it for start_task START + reconnect recovery.
|
|
228
|
+
*/
|
|
229
|
+
quorumLoop: QuorumLoop;
|
|
230
|
+
/**
|
|
231
|
+
* CP-1.f live progress surfacing — the progress tap holder (see
|
|
232
|
+
* `BuildQuorumLoopExecutorResult.progressTap`).
|
|
233
|
+
*/
|
|
234
|
+
progressTap: ProgressTap;
|
|
235
|
+
/**
|
|
236
|
+
* Audited-path fix (Fix 1) — the PolicyRejection tap holder (see
|
|
237
|
+
* `BuildQuorumLoopExecutorResult.policyRejectionTap`).
|
|
238
|
+
*/
|
|
239
|
+
policyRejectionTap: PolicyRejectionTap;
|
|
240
|
+
/**
|
|
241
|
+
* PHASE-589/469 W3.2 — the two-phase group-escalation decision deps (WITHOUT
|
|
242
|
+
* the store; `runOrchestrationShell` completes it). Threaded into
|
|
243
|
+
* `gateDecisionDeps.groupDecision` so a synthesized `task_group_halted`
|
|
244
|
+
* 5-option prompt resolves through `submitGroupDecision`.
|
|
245
|
+
*/
|
|
246
|
+
groupDecisionDeps: Omit<GroupDecisionSubmitDeps, 'store'>;
|
|
247
|
+
/**
|
|
248
|
+
* PHASE-589/469 W3.1 (C4) — the startup reconcile-before-GC over the durable
|
|
249
|
+
* revert manifests. `runOrchestrationShell` awaits it ONCE at team-wiring
|
|
250
|
+
* startup, BEFORE the live Class B loop consumes packets.
|
|
251
|
+
*/
|
|
252
|
+
reconcileRevertManifests: () => Promise<void>;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* CP-1.f live progress surfacing — the desktop-local progress tap holder
|
|
256
|
+
* (mirrors `teamShellEventTap`). `cli.ts` builds it with a no-op `fn`; the
|
|
257
|
+
* QuorumLoop's `onProgress` calls `progressTap.fn(event)`, and
|
|
258
|
+
* `runOrchestrationShell` installs the store-dispatching `fn` at startup. Until
|
|
259
|
+
* then (and for non-loop sessions) the `fn` is inert. The loop also wraps every
|
|
260
|
+
* emit so a throwing `fn` can never break the loop.
|
|
261
|
+
*/
|
|
262
|
+
export interface ProgressTap {
|
|
263
|
+
fn: (event: TaskProgressEvent) => void;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Audited-path fix (Fix 1) — the PolicyRejection tap holder (mirrors
|
|
267
|
+
* `progressTap`). `cli.ts` builds it with a no-op `fn`; the LE's
|
|
268
|
+
* `onPolicyRejection` dep calls `policyRejectionTap.fn(info)`, and
|
|
269
|
+
* `runOrchestrationShell` installs the store-dispatching `fn` (a classified
|
|
270
|
+
* `SHELL_ADVISORY`) at startup. Until then (and for non-loop sessions) the `fn`
|
|
271
|
+
* is inert. The shadow-discard side is handled inside `cli.ts`'s wiring (it has
|
|
272
|
+
* the QuorumLoop reference); this tap carries ONLY the user-visible advisory.
|
|
273
|
+
*/
|
|
274
|
+
export interface PolicyRejectionTap {
|
|
275
|
+
fn: (info: {
|
|
276
|
+
detail: string;
|
|
277
|
+
category: string;
|
|
278
|
+
recommendedRecovery: string;
|
|
279
|
+
}) => void;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* [Gemma classifier · D11 + §Wiring] Resolve the reviewer verdict classifier
|
|
283
|
+
* threaded onto `QuorumLoopDeps.classifyVerdict`.
|
|
284
|
+
*
|
|
285
|
+
* - `classifyRunner === undefined` → the classifier is NOT wired (unit tests /
|
|
286
|
+
* the canned-prompt legacy paths the design leaves on regex) → `undefined`
|
|
287
|
+
* (the provider uses `parseVerdictOutput`). Production ALWAYS wires it (a
|
|
288
|
+
* `LocalGemmaPlannerRunner | null`), so this branch never fires in production.
|
|
289
|
+
* - `CODEVIBE_REVIEWER_VERDICT_CLASSIFIER=regex` → `undefined` (the ONLY operator
|
|
290
|
+
* revert to the regex parser). Any other value (incl. a typo) stays `gemma` so
|
|
291
|
+
* a mistyped flag can NEVER silently disable the fail-closed classifier.
|
|
292
|
+
* - `gemma` (default) → the real fail-closed Gemma classifier when the runner is
|
|
293
|
+
* present; a dummy always-ESCALATE classifier when it is `null` (Ollama
|
|
294
|
+
* unreachable at boot) — NEVER a silent regex fallback (agy-MED-1).
|
|
295
|
+
*/
|
|
296
|
+
export declare function resolveVerdictClassifier(classifyRunner: LocalGemmaPlannerRunner | null | undefined, env?: NodeJS.ProcessEnv): VerdictClassifier | undefined;
|
|
297
|
+
export interface BuildQuorumLoopExecutorResult {
|
|
298
|
+
localExecutor: LocalExecutor;
|
|
299
|
+
quorumLoop: QuorumLoop;
|
|
300
|
+
/**
|
|
301
|
+
* CP-1.f live progress surfacing — the progress tap holder. `cli.ts` threads
|
|
302
|
+
* it into `runOrchestrationShell`, which installs the store-dispatching `fn`.
|
|
303
|
+
*/
|
|
304
|
+
progressTap: ProgressTap;
|
|
305
|
+
/**
|
|
306
|
+
* Audited-path fix (Fix 1) — the PolicyRejection tap holder. `cli.ts` threads
|
|
307
|
+
* it into `runOrchestrationShell`, which installs the store-dispatching `fn`
|
|
308
|
+
* (a classified `SHELL_ADVISORY`).
|
|
309
|
+
*/
|
|
310
|
+
policyRejectionTap: PolicyRejectionTap;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* CP-1.f §3.C — Stage-2 r2 (Codex) FIX B. Construct the SINGLE-TASK QuorumLoop +
|
|
314
|
+
* its driving LE for a non-team orchestration session (Pro OR Max-without-teams).
|
|
315
|
+
*
|
|
316
|
+
* The single-implementor reviewer-quorum loop is a Pro+Max feature (Pro = 2
|
|
317
|
+
* seats, Max = 3 seats per `codevibe-policy`); only Agent Teams / MergeGate
|
|
318
|
+
* (CP-12) is Max-only. Before this fix the QuorumLoop was built ONLY inside
|
|
319
|
+
* `buildTeamLocalExecutor` (gated on `tier === 'MAX'`), so a real Pro
|
|
320
|
+
* orchestration session got NO loop → `start_task` silently no-op'd (the only
|
|
321
|
+
* `start_task` execution branch requires `args.quorumLoop`).
|
|
322
|
+
*
|
|
323
|
+
* The LE here is a MINIMAL single-track LE — it OMITS every team dep
|
|
324
|
+
* (`spawnTrackImplementor` / `buildTrackArgv` / `appsyncClient` / `repoRoot` /
|
|
325
|
+
* `deviceSigningKey` / `teamSessionKeyB64` / …), so `teamModeEnabled` is FALSE
|
|
326
|
+
* (a teams Class B packet is dropped, not acted on). It KEEPS the 4
|
|
327
|
+
* reviewer-quorum consumer deps (so the loop receives GATE_DISPATCH /
|
|
328
|
+
* REVIEWER_DISPATCH / REVISE_FEEDBACK) + the substrate engager (so the
|
|
329
|
+
* implementor still spawns inside the CP-7 moat). The shell wires the returned
|
|
330
|
+
* `localExecutor` for the Class B subscription + `quorumLoop` for start_task +
|
|
331
|
+
* reconnect recovery, EXACTLY as the team path does.
|
|
332
|
+
*
|
|
333
|
+
* Exported for unit tests; production goes through `main()`.
|
|
334
|
+
*/
|
|
335
|
+
export declare function buildQuorumLoopExecutor(args: {
|
|
336
|
+
appsyncClient: AppSyncClient;
|
|
337
|
+
session: Session;
|
|
338
|
+
emitter: (args: ShellEventEmit) => Promise<void>;
|
|
339
|
+
/** CP-1.f LOCK RP-6 — host-detected agents threaded into the loop. */
|
|
340
|
+
detectedAgents?: string[];
|
|
341
|
+
/** #585 auto-continuation (Max) — the resolved tier, threaded to the loop. */
|
|
342
|
+
tier?: Tier;
|
|
343
|
+
/**
|
|
344
|
+
* [Gemma classifier · §Wiring] The resolved Gemma runner (same instance as the
|
|
345
|
+
* planner's), forwarded to `buildAndArmQuorumLoop` where the verdict classifier is
|
|
346
|
+
* built. ABSENT (tests) → the classifier is not wired → regex parser.
|
|
347
|
+
*/
|
|
348
|
+
classifyRunner?: LocalGemmaPlannerRunner | null;
|
|
349
|
+
}): Promise<BuildQuorumLoopExecutorResult>;
|
|
350
|
+
/**
|
|
351
|
+
* PHASE-589+469 W2 (#TC-5) — map an LE hook-bridge event to the chokepoint's
|
|
352
|
+
* `ShellEventEmit`. The team-result summary (`ASSISTANT_RESPONSE`, from
|
|
353
|
+
* `emitGroupConvergence`) KEEPS its type AND forwards `content` (the
|
|
354
|
+
* light-markdown digest the phone renders); `LOCAL_AUTHORITY_REFUSAL` maps 1:1;
|
|
355
|
+
* every other type is coerced to `NOTIFICATION` (audit fallback — those never
|
|
356
|
+
* occur on the team paths). Exported so the #TC-5 test drives the REAL mapping
|
|
357
|
+
* (not a reproduction): a regression that dropped the `ASSISTANT_RESPONSE` type
|
|
358
|
+
* or its `content` — which would silently make the mobile summary dead — is
|
|
359
|
+
* caught here.
|
|
360
|
+
*/
|
|
361
|
+
export declare function mapTeamLeEventToShellEmit(e: Parameters<LEEmitShellEventFn>[0]): ShellEventEmit;
|
|
362
|
+
/**
|
|
363
|
+
* Construct the team-mode LocalExecutorImpl + the store-tap holder. Returns the
|
|
364
|
+
* pair `runOrchestrationShell` consumes (`localExecutor` + `teamShellEventTap`).
|
|
365
|
+
*
|
|
366
|
+
* Exported for the W3 E2E smoke (which injects stub deps) + future callers;
|
|
367
|
+
* production goes through `main()`.
|
|
368
|
+
*/
|
|
369
|
+
export declare function buildTeamLocalExecutor(args: {
|
|
370
|
+
appsyncClient: AppSyncClient;
|
|
371
|
+
session: Session;
|
|
372
|
+
emitter: (args: ShellEventEmit) => Promise<void>;
|
|
373
|
+
initialScope: AuthorityScope;
|
|
374
|
+
/** CP-1.f LOCK RP-6 — host-detected agents threaded into the loop. */
|
|
375
|
+
detectedAgents?: string[];
|
|
376
|
+
/** #585 auto-continuation (Max) — the resolved tier, threaded to the loop. */
|
|
377
|
+
tier?: Tier;
|
|
378
|
+
/**
|
|
379
|
+
* TEST SEAM — override the durable revert-manifest store root. Production omits it
|
|
380
|
+
* (defaults to the shared `~/.codevibe/revert-state/`). Tests pass an ISOLATED temp
|
|
381
|
+
* dir so the CLAIM→revert→COMMIT flow can't be contaminated by another test's
|
|
382
|
+
* leftover manifest/journal in the shared root (which stranded the COMMIT phase →
|
|
383
|
+
* `['claim']` in the full suite while passing in isolation), and so a sandboxed
|
|
384
|
+
* runner that can't write `~/.codevibe` doesn't EPERM.
|
|
385
|
+
*/
|
|
386
|
+
durableRootDir?: string;
|
|
387
|
+
/**
|
|
388
|
+
* [Gemma classifier · §Wiring] The resolved Gemma runner (same instance as the
|
|
389
|
+
* planner's), forwarded to `buildAndArmQuorumLoop` where the verdict classifier is
|
|
390
|
+
* built. ABSENT (tests) → the classifier is not wired → regex parser.
|
|
391
|
+
*/
|
|
392
|
+
classifyRunner?: LocalGemmaPlannerRunner | null;
|
|
393
|
+
}): Promise<BuildTeamLocalExecutorResult>;
|
|
394
|
+
/**
|
|
395
|
+
* PHASE-589/469 W3.1 (C4 / RESIDUAL 2) — probe the engine's TERMINAL view of a
|
|
396
|
+
* team group for the startup reconcile, via the `getTaskGroupStatus` query (the
|
|
397
|
+
* group row's authoritative `status` + `halt_reason`). This is what closes the
|
|
398
|
+
* OFFLINE lease-timeout case: a group the sweeper drove `Halted` while the desktop
|
|
399
|
+
* was down now resolves to `terminal_rejected` here → the reconcile auto-reverts
|
|
400
|
+
* the applied tree before a backend expiry could strand it dirty.
|
|
401
|
+
*
|
|
402
|
+
* - `halted` → `'terminal_rejected'` (revert)
|
|
403
|
+
* - `complete` → `'terminal_kept'` (mark accepted)
|
|
404
|
+
* - any non-terminal status (scheduling / → `'in_flight'` (leave the
|
|
405
|
+
* tracks_in_flight / draining / manifest)
|
|
406
|
+
* merge_gate_pending)
|
|
407
|
+
* - `unknown` (vanished / unowned / TTL'd) → `'unknown'` (orphan-TTL
|
|
408
|
+
* OR a probe error fallback GC)
|
|
409
|
+
*
|
|
410
|
+
* Fail-open on a probe error → `'unknown'` (the manifest is kept for the orphan-TTL
|
|
411
|
+
* fallback rather than blindly reverting a possibly-kept group). A
|
|
412
|
+
* `reject_revert_in_progress` CLAIM-crash manifest is NEVER GC'd regardless (its
|
|
413
|
+
* lifecycle is non-terminal), so it survives every restart and resumes its revert.
|
|
414
|
+
*/
|
|
415
|
+
export declare function probeEngineGroupState(appsyncClient: AppSyncClient, taskGroupId: string): Promise<EngineGroupState>;
|
|
416
|
+
import { HookBridge } from '../local-executor/hook-bridge';
|
|
417
|
+
export interface BridgeRefusalArgs {
|
|
418
|
+
refusedMessageId: string;
|
|
419
|
+
shellContent: string;
|
|
420
|
+
shellMetadata?: Record<string, unknown>;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Wrap any async operation that may throw `AuthorityError`; on refusal, emit
|
|
424
|
+
* the two-channel refusal pair (LOCK #C4-3) via the supplied HookBridge and
|
|
425
|
+
* re-throw. Non-AuthorityError exceptions propagate unchanged.
|
|
426
|
+
*
|
|
427
|
+
* The HookBridge passed in MUST be the same instance the orchestration shell
|
|
428
|
+
* uses for plugin-hook ingestion — both paths share the audit-before-shell
|
|
429
|
+
* ordering invariant via the bridge's `bridgeAuthorityRefusal` method.
|
|
430
|
+
*/
|
|
431
|
+
export declare function bridgeAuthorityErrorToShellRefusal<T>(bridge: HookBridge, refusalArgs: BridgeRefusalArgs, fn: () => Promise<T>): Promise<T>;
|