@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,417 @@
|
|
|
1
|
+
import type { ChildProcess } from 'node:child_process';
|
|
2
|
+
import type { SubstrateHandle, SubstrateProc } from '../substrate/types';
|
|
3
|
+
import type { AuthorityRefusal, AuthorityScope } from './authority';
|
|
4
|
+
export type ProcessRole = 'implementor' | 'reviewer' | 'health_probe' | 'auth_probe' | 'model_probe';
|
|
5
|
+
export type AgentKind = 'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY';
|
|
6
|
+
export type FailureClass = null | 'quota_exhausted' | 'auth_failed' | 'timeout' | 'unavailable' | 'user_aborted';
|
|
7
|
+
export interface SpawnArgs {
|
|
8
|
+
argv: string[];
|
|
9
|
+
workingDir: string;
|
|
10
|
+
role: ProcessRole;
|
|
11
|
+
agentKind?: AgentKind;
|
|
12
|
+
timeoutMs: number | null;
|
|
13
|
+
envOverrides?: Record<string, string>;
|
|
14
|
+
stdinTty?: boolean;
|
|
15
|
+
stdinPayload?: string;
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
taskId?: string;
|
|
18
|
+
onProcessSpawned?: ProcessSpawnedHook;
|
|
19
|
+
onProcessExited?: ProcessExitedHook;
|
|
20
|
+
substrate?: SubstrateHandle;
|
|
21
|
+
requireConfined?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface ProcessSpawnedInfo {
|
|
24
|
+
pid: number;
|
|
25
|
+
role: ProcessRole;
|
|
26
|
+
agentKind: AgentKind | undefined;
|
|
27
|
+
spawnedAt: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ProcessExitedInfo {
|
|
30
|
+
pid: number;
|
|
31
|
+
exitCode: number;
|
|
32
|
+
failureClass: FailureClass;
|
|
33
|
+
exitedAt: string;
|
|
34
|
+
runtimeMs: number;
|
|
35
|
+
}
|
|
36
|
+
export type ProcessSpawnedHook = (info: ProcessSpawnedInfo) => void;
|
|
37
|
+
export type ProcessExitedHook = (info: ProcessExitedInfo) => void;
|
|
38
|
+
export interface SpawnHandleBase {
|
|
39
|
+
pid: number;
|
|
40
|
+
role: ProcessRole;
|
|
41
|
+
agentKind: AgentKind | undefined;
|
|
42
|
+
spawnedAt: string;
|
|
43
|
+
/** Resolves when the child exits, regardless of cause. */
|
|
44
|
+
done: Promise<ProcessExitedInfo>;
|
|
45
|
+
/** Forcibly terminate (SIGKILL + cleanup). Idempotent. */
|
|
46
|
+
abort(): Promise<void>;
|
|
47
|
+
/** Captured stdout/stderr — local-only, never crosses the wire. */
|
|
48
|
+
stdout(): string;
|
|
49
|
+
stderr(): string;
|
|
50
|
+
}
|
|
51
|
+
export interface ImplementorHandle extends SpawnHandleBase {
|
|
52
|
+
kind: 'implementor';
|
|
53
|
+
}
|
|
54
|
+
export interface ReviewerHandle extends SpawnHandleBase {
|
|
55
|
+
kind: 'reviewer';
|
|
56
|
+
}
|
|
57
|
+
export interface ProbeHandle extends SpawnHandleBase {
|
|
58
|
+
kind: 'probe';
|
|
59
|
+
}
|
|
60
|
+
export declare class SpawnArgsInvalid extends Error {
|
|
61
|
+
readonly reason: string;
|
|
62
|
+
readonly offendingKey?: string | undefined;
|
|
63
|
+
constructor(reason: string, offendingKey?: string | undefined);
|
|
64
|
+
}
|
|
65
|
+
export declare class SpawnConfinementUnavailable extends Error {
|
|
66
|
+
readonly reason: string;
|
|
67
|
+
constructor(reason: string);
|
|
68
|
+
}
|
|
69
|
+
export declare const MARKER_ENV_KEYS: {
|
|
70
|
+
readonly CHILD: "CODEVIBE_CHILD_PROCESS";
|
|
71
|
+
readonly ROLE: "CODEVIBE_PROCESS_ROLE";
|
|
72
|
+
readonly QUORUM: "QUORUM_REVIEWER_SUBPROCESS";
|
|
73
|
+
};
|
|
74
|
+
export declare const MARKER_KEY_SET: ReadonlySet<string>;
|
|
75
|
+
export type AuthorityAction = {
|
|
76
|
+
kind: 'Write';
|
|
77
|
+
path: string;
|
|
78
|
+
} | {
|
|
79
|
+
kind: 'Read';
|
|
80
|
+
path: string;
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'Network';
|
|
83
|
+
urlOrHost: string;
|
|
84
|
+
} | {
|
|
85
|
+
kind: 'Command';
|
|
86
|
+
command: string;
|
|
87
|
+
argv: string[];
|
|
88
|
+
};
|
|
89
|
+
export interface GateDispatchPayload {
|
|
90
|
+
/** The DETERMINISTIC gate_id of this gate-run (the round-0 proposal gate id at START). */
|
|
91
|
+
gateRunId: string;
|
|
92
|
+
/** `"verification" | "reviewer_quorum" | "final_approval"` (snake_case wire form). */
|
|
93
|
+
gateType: string;
|
|
94
|
+
/** Present ONLY for `verification` gates (CP-3 — out of scope for CP-1.f single-task). */
|
|
95
|
+
verificationChecks?: string[];
|
|
96
|
+
/**
|
|
97
|
+
* Present ONLY once the per-seat reviewer panel is resolved. ABSENT at START
|
|
98
|
+
* (the proposal hasn't arrived) — `start_ports.rs:296` sets `reviewer_seats:
|
|
99
|
+
* None`. Each row is the camelCase `ReviewerSeatRow`
|
|
100
|
+
* (`{seatId, agentKind, role, reviewerPacketRef}`).
|
|
101
|
+
*/
|
|
102
|
+
reviewerSeats?: GateDispatchReviewerSeat[];
|
|
103
|
+
/** Present ONLY for `final_approval` gates. */
|
|
104
|
+
finalApprovalSurface?: string;
|
|
105
|
+
}
|
|
106
|
+
/** One reviewer-seat row inside `GateDispatchPayload.reviewerSeats` (camelCase). */
|
|
107
|
+
export interface GateDispatchReviewerSeat {
|
|
108
|
+
seatId: number;
|
|
109
|
+
/** UPPERCASE agent kind: `"CLAUDE" | "CODEX" | "GEMINI"`. */
|
|
110
|
+
agentKind: string;
|
|
111
|
+
/** UPPERCASE lens: `"ARCHITECTURE" | "CORRECTNESS" | ...`. */
|
|
112
|
+
role: string;
|
|
113
|
+
reviewerPacketRef: string;
|
|
114
|
+
}
|
|
115
|
+
export interface SignedEnvelope {
|
|
116
|
+
algorithm: 'ed25519' | 'p384-ecdsa';
|
|
117
|
+
publicKeyId: string;
|
|
118
|
+
signatureB64: string;
|
|
119
|
+
issuedAt: string;
|
|
120
|
+
nonceUlid: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Cross-track-conflict dispute context (§2.2, #C12-19). Present ONLY on a
|
|
124
|
+
* dispute re-dispatch; ABSENT (undefined) on a fresh `TrackAssigned`. The
|
|
125
|
+
* re-dispatched implementor/reviewers use it to know what to reconcile.
|
|
126
|
+
*/
|
|
127
|
+
export interface TrackConflictContext {
|
|
128
|
+
conflict_id: string;
|
|
129
|
+
shared_contract_ref: string;
|
|
130
|
+
peer_track_findings: unknown;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* §2.2 `TrackAssigned` payload — launch track N. The LE spawns the implementor
|
|
134
|
+
* for this track in `state_dir`, idempotent by
|
|
135
|
+
* `(task_group_id, track_index, dispatch_generation)` (#C12-14/#C12-17).
|
|
136
|
+
*/
|
|
137
|
+
export interface TrackAssignedPayload {
|
|
138
|
+
task_group_id: string;
|
|
139
|
+
track_index: number;
|
|
140
|
+
task_id: string;
|
|
141
|
+
/** UPPERCASE adapter discriminator (CLAUDE | GEMINI | CODEX). */
|
|
142
|
+
implementor_agent: AgentKind;
|
|
143
|
+
/** snake_case OwnershipScope (advanced to the per-track authority scope). */
|
|
144
|
+
ownership_scope: {
|
|
145
|
+
write_paths: string[];
|
|
146
|
+
shared_contracts: {
|
|
147
|
+
path: string;
|
|
148
|
+
access: 'write' | 'read';
|
|
149
|
+
}[];
|
|
150
|
+
test_surfaces: string[];
|
|
151
|
+
auto_modified_files: string[];
|
|
152
|
+
};
|
|
153
|
+
is_shared_test_owner: boolean;
|
|
154
|
+
/** `<repo>/.codevibe/state/<task_group_id>/<track_index>/`. */
|
|
155
|
+
state_dir: string;
|
|
156
|
+
dispatch_id: string;
|
|
157
|
+
dispatch_generation: number;
|
|
158
|
+
/** Option — present on a dispute re-dispatch (#C12-19), absent on fresh. */
|
|
159
|
+
conflict_context?: TrackConflictContext;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* §2.2 `MergeGateDispatch` payload — run the shared integration verification.
|
|
163
|
+
* The `owner_track_index` track runs the integration check named by
|
|
164
|
+
* `integration_check_spec` (§12 Q1 — CP-3 verification-gate kinds, NOT a
|
|
165
|
+
* free-form shell), classifies + signs the result (#C12-8), and reports
|
|
166
|
+
* `submitMergeGateVerdict`.
|
|
167
|
+
*/
|
|
168
|
+
export interface MergeGateDispatchPayload {
|
|
169
|
+
task_group_id: string;
|
|
170
|
+
merge_gate_id: string;
|
|
171
|
+
/**
|
|
172
|
+
* §12 Q1 — names CP-3 verification-runner wrapper(s). On the wire this is the
|
|
173
|
+
* `VerificationGateKind` list the owner track named at `createTaskGroup`. A
|
|
174
|
+
* single string is accepted for forward-compat and coerced to a 1-element
|
|
175
|
+
* list by the runner.
|
|
176
|
+
*/
|
|
177
|
+
integration_check_spec: string | string[];
|
|
178
|
+
owner_track_index: number;
|
|
179
|
+
dispatch_id: string;
|
|
180
|
+
dispatch_generation: number;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* §2.2 `TaskGroupHalted` payload — group halted/escalated (expanded escalation
|
|
184
|
+
* fields per the Stage-2 §11.3 fix). The LE surfaces the choices to the UI
|
|
185
|
+
* (NOTIFICATION) + signals the in-flight track processes to stop. The deep
|
|
186
|
+
* auto-resolution decision tree is server-side (#C12-3) — the LE only consumes,
|
|
187
|
+
* surfaces, and stops. [DEFERRED — GA/CP-12 Wave 3+] for choice-driven
|
|
188
|
+
* auto-actions.
|
|
189
|
+
*/
|
|
190
|
+
export interface TaskGroupHaltedPayload {
|
|
191
|
+
task_group_id: string;
|
|
192
|
+
halt_reason: string;
|
|
193
|
+
per_track_status: {
|
|
194
|
+
track_index: number;
|
|
195
|
+
state: string;
|
|
196
|
+
agent?: string;
|
|
197
|
+
}[];
|
|
198
|
+
gates_passed_failed?: unknown;
|
|
199
|
+
/**
|
|
200
|
+
* #584 r2 — internally-tagged union pinned to core-rs `HaltFixOwner`
|
|
201
|
+
* (`class_b_envelope.rs`, `rename_all = "snake_case"` tags +
|
|
202
|
+
* `rename_all_fields = "camelCase"`): wire `{kind: "track", trackIndex}` |
|
|
203
|
+
* `{kind: "serial_owner"}`. `normalizeTaskGroupHaltedWire` maps the field to
|
|
204
|
+
* the internal snake_case `track_index`.
|
|
205
|
+
*/
|
|
206
|
+
recommended_fix_owner?: {
|
|
207
|
+
kind: string;
|
|
208
|
+
track_index?: number;
|
|
209
|
+
};
|
|
210
|
+
remaining_budget?: {
|
|
211
|
+
auto_revise_used?: number;
|
|
212
|
+
auto_revise_cap?: number;
|
|
213
|
+
wallclock_elapsed_ms?: number;
|
|
214
|
+
wallclock_cap_ms?: number;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* #584 r2 — pinned to core-rs `HaltChoice` (same serde shape as
|
|
218
|
+
* `HaltFixOwner`): wire `{kind: "retry_serial_owner" | "retry_track" |
|
|
219
|
+
* "continue_manually" | "accept_partial" | "abort", trackIndex?}` — NOT a
|
|
220
|
+
* string list (the pre-#584 annotation was a wrong pin). Display-only.
|
|
221
|
+
*/
|
|
222
|
+
choices: {
|
|
223
|
+
kind: string;
|
|
224
|
+
track_index?: number;
|
|
225
|
+
}[];
|
|
226
|
+
}
|
|
227
|
+
import type { AgentKind as ReviewerAgentKind, ReviewerRole } from '../reviewer/types';
|
|
228
|
+
/**
|
|
229
|
+
* CP-1.f §3.C.21 — `REVIEWER_DISPATCH` Class B payload (engine → desktop).
|
|
230
|
+
* Tells the desktop to spawn one reviewer subprocess for the named seat; the
|
|
231
|
+
* rendered prompt is FETCHED out-of-band via `getReviewerPrompt` (the dispatch
|
|
232
|
+
* carries no inline prompt). Pinned to `class_b_envelope.rs::ReviewerDispatchPayload`.
|
|
233
|
+
*/
|
|
234
|
+
export interface ReviewerDispatchPayload {
|
|
235
|
+
/** Gate this dispatch belongs to (UUID string). */
|
|
236
|
+
gateId: string;
|
|
237
|
+
/**
|
|
238
|
+
* RESOLVED seat-id STRING (post-promotion), e.g. `"1::codex"` or bare `"1"`.
|
|
239
|
+
* The numeric seat for `getReviewerPrompt` is the substring before `"::"`.
|
|
240
|
+
*/
|
|
241
|
+
seatId: string;
|
|
242
|
+
/** Lowercase agent kind (`"claude" | "gemini" | "codex"`) — chosen from the resolved plan. */
|
|
243
|
+
agentKind: ReviewerAgentKind;
|
|
244
|
+
/** snake_case reviewer lens for the seat (e.g. `"correctness"`). */
|
|
245
|
+
role: ReviewerRole;
|
|
246
|
+
/** Deterministic dispatch ULID (LOCK #C3F-6). */
|
|
247
|
+
dispatchUlid: string;
|
|
248
|
+
/** Attempt number (0-indexed) used as the ULID seed. */
|
|
249
|
+
attemptNumber: number;
|
|
250
|
+
/** Producer process-id (no-same-process self-review check, LOCK #C3F-7). */
|
|
251
|
+
producerProcessId: string;
|
|
252
|
+
/** Producer session-id (paired with `producerProcessId`). */
|
|
253
|
+
producerSessionId: string;
|
|
254
|
+
}
|
|
255
|
+
/** One reviewer's REVISE finding inside `ReviseFeedbackPayload.seatFindings`. */
|
|
256
|
+
export interface ReviseSeatFinding {
|
|
257
|
+
/** Resolved seat-id string (post-promotion if applicable). */
|
|
258
|
+
seatId: string;
|
|
259
|
+
/** snake_case reviewer lens. */
|
|
260
|
+
role: ReviewerRole;
|
|
261
|
+
/** Free-form findings narrative. */
|
|
262
|
+
findings: string;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* CP-1.f §3.C.23 — `REVISE_FEEDBACK` Class B payload (engine → desktop). The
|
|
266
|
+
* desktop re-runs the implementor for round N+1 with the aggregated findings,
|
|
267
|
+
* then `submitImplementorOutput(nextGateId, nextRound)`. Pinned to
|
|
268
|
+
* `class_b_envelope.rs::ReviseFeedbackPayload`.
|
|
269
|
+
*/
|
|
270
|
+
export interface ReviseFeedbackPayload {
|
|
271
|
+
/** The OLD (parent) gate id that produced the REVISE. */
|
|
272
|
+
gateId: string;
|
|
273
|
+
/** Per-seat REVISE findings (ordered by ascending seat_id). */
|
|
274
|
+
seatFindings: ReviseSeatFinding[];
|
|
275
|
+
/** Round number (0-indexed) the REVISE landed at. */
|
|
276
|
+
roundNumber: number;
|
|
277
|
+
/** The DETERMINISTIC round-N+1 gate id the desktop targets with `submitImplementorOutput`. */
|
|
278
|
+
nextGateId: string;
|
|
279
|
+
/** The round number of the next round (`roundNumber + 1`). */
|
|
280
|
+
nextRound: number;
|
|
281
|
+
/** DETERMINISTIC dedup key keyed `(parentGateId, nextGateId, nextRound)` — the double-spawn guard. */
|
|
282
|
+
reviseFeedbackId: string;
|
|
283
|
+
}
|
|
284
|
+
export type ClassBInbound = {
|
|
285
|
+
kind: 'PlannerDecisionApproved';
|
|
286
|
+
signedEnvelope: SignedEnvelope;
|
|
287
|
+
payload: unknown;
|
|
288
|
+
} | {
|
|
289
|
+
kind: 'GateDispatch';
|
|
290
|
+
signedEnvelope: SignedEnvelope;
|
|
291
|
+
payload: unknown;
|
|
292
|
+
} | {
|
|
293
|
+
kind: 'ContinuationOffer';
|
|
294
|
+
signedEnvelope: SignedEnvelope;
|
|
295
|
+
payload: unknown;
|
|
296
|
+
} | {
|
|
297
|
+
kind: 'TaskAuthorized';
|
|
298
|
+
signedEnvelope: SignedEnvelope;
|
|
299
|
+
payload: unknown;
|
|
300
|
+
} | {
|
|
301
|
+
kind: 'PolicyRejection';
|
|
302
|
+
signedEnvelope: SignedEnvelope;
|
|
303
|
+
payload: unknown;
|
|
304
|
+
} | {
|
|
305
|
+
kind: 'TrackAssigned';
|
|
306
|
+
signedEnvelope: SignedEnvelope;
|
|
307
|
+
payload: unknown;
|
|
308
|
+
} | {
|
|
309
|
+
kind: 'MergeGateDispatch';
|
|
310
|
+
signedEnvelope: SignedEnvelope;
|
|
311
|
+
payload: unknown;
|
|
312
|
+
} | {
|
|
313
|
+
kind: 'TaskGroupHalted';
|
|
314
|
+
signedEnvelope: SignedEnvelope;
|
|
315
|
+
payload: unknown;
|
|
316
|
+
} | {
|
|
317
|
+
kind: 'ReviewerDispatch';
|
|
318
|
+
signedEnvelope: SignedEnvelope;
|
|
319
|
+
payload: unknown;
|
|
320
|
+
} | {
|
|
321
|
+
kind: 'ReviseFeedback';
|
|
322
|
+
signedEnvelope: SignedEnvelope;
|
|
323
|
+
payload: unknown;
|
|
324
|
+
};
|
|
325
|
+
export type ExecutorError = {
|
|
326
|
+
kind: 'AuthorityRefusal';
|
|
327
|
+
refusal: AuthorityRefusal;
|
|
328
|
+
} | {
|
|
329
|
+
kind: 'SpawnFailed';
|
|
330
|
+
detail: string;
|
|
331
|
+
} | {
|
|
332
|
+
kind: 'SubprocessIo';
|
|
333
|
+
detail: string;
|
|
334
|
+
} | {
|
|
335
|
+
kind: 'SignatureVerification';
|
|
336
|
+
detail: string;
|
|
337
|
+
} | {
|
|
338
|
+
kind: 'MalformedClassB';
|
|
339
|
+
detail: string;
|
|
340
|
+
} | {
|
|
341
|
+
kind: 'PolicyMismatch';
|
|
342
|
+
detail: string;
|
|
343
|
+
};
|
|
344
|
+
export type FileChangeKind = 'Created' | 'Modified' | 'Deleted';
|
|
345
|
+
export type HookEvent = {
|
|
346
|
+
kind: 'ToolUse';
|
|
347
|
+
sessionId: string;
|
|
348
|
+
toolName: string;
|
|
349
|
+
toolInput: unknown;
|
|
350
|
+
timestamp: string;
|
|
351
|
+
} | {
|
|
352
|
+
kind: 'FileChange';
|
|
353
|
+
sessionId: string;
|
|
354
|
+
path: string;
|
|
355
|
+
change: FileChangeKind;
|
|
356
|
+
timestamp: string;
|
|
357
|
+
} | {
|
|
358
|
+
kind: 'ProcessExited';
|
|
359
|
+
sessionId: string;
|
|
360
|
+
pid: number;
|
|
361
|
+
exitCode: number;
|
|
362
|
+
timestamp: string;
|
|
363
|
+
failureClass?: FailureClass | undefined;
|
|
364
|
+
failureSignal?: NodeJS.Signals | undefined;
|
|
365
|
+
} | {
|
|
366
|
+
kind: 'UserPrompt';
|
|
367
|
+
sessionId: string;
|
|
368
|
+
contentB64: string;
|
|
369
|
+
timestamp: string;
|
|
370
|
+
} | {
|
|
371
|
+
kind: 'AssistantText';
|
|
372
|
+
sessionId: string;
|
|
373
|
+
contentB64: string;
|
|
374
|
+
timestamp: string;
|
|
375
|
+
};
|
|
376
|
+
export interface LocalExecutor {
|
|
377
|
+
spawnImplementor(args: SpawnArgs): Promise<ImplementorHandle>;
|
|
378
|
+
spawnReviewer(args: SpawnArgs): Promise<ReviewerHandle>;
|
|
379
|
+
spawnHealthProbe(args: SpawnArgs): Promise<ProbeHandle>;
|
|
380
|
+
/**
|
|
381
|
+
* Single-entrypoint authority gate. Dispatches to `enforceWrite` /
|
|
382
|
+
* `enforceRead` / `enforceNetwork` / `enforceCommand` based on `action.kind`.
|
|
383
|
+
* Throws `AuthorityError` on refusal (master §9:1284).
|
|
384
|
+
*/
|
|
385
|
+
enforceAuthority(action: AuthorityAction): Promise<void>;
|
|
386
|
+
ingestHookEvent(event: HookEvent): Promise<void>;
|
|
387
|
+
/** Read-only view of the current TASK_AUTHORIZED.authorityScope. */
|
|
388
|
+
authorityScope(): Readonly<AuthorityScope>;
|
|
389
|
+
/**
|
|
390
|
+
* CP-1.c STUB; CP-1.e wires real AppSync subscription + signature verification.
|
|
391
|
+
* `envelopeTaskId` (Audited-path fix B) — the outer Class B envelope's taskId,
|
|
392
|
+
* forwarded so a PolicyRejection (payload carries no taskId) discards exactly
|
|
393
|
+
* the rejected task's shadow. Optional for non-WS callers / tests.
|
|
394
|
+
*/
|
|
395
|
+
consumeClassB(packet: ClassBInbound, envelopeTaskId?: string): Promise<void>;
|
|
396
|
+
/**
|
|
397
|
+
* CP-12 W4 (#593) — team-dispatch recovery. Re-launch a track whose round-0
|
|
398
|
+
* `TrackAssigned` was dropped by the emit-before-subscribe race (the engine
|
|
399
|
+
* emits the per-track dispatch ~0.5s before the desktop's Class B subscription
|
|
400
|
+
* is established → live AppSync does not replay it). Exposes the private
|
|
401
|
+
* `launchTrack` body (register + brief bridge) and returns the explicit result
|
|
402
|
+
* the QuorumLoop `recoverTeamTracks` discriminates (`duplicate` returned BEFORE
|
|
403
|
+
* the bridge → recovery repairs the brief; `rejected` did not launch → skip).
|
|
404
|
+
* The single-track LE / non-team path never calls this (recovery is gated on a
|
|
405
|
+
* team session). Optional on the interface for non-team `LocalExecutor`
|
|
406
|
+
* implementations / tests.
|
|
407
|
+
*/
|
|
408
|
+
recoverLaunchTrack?(payload: TrackAssignedPayload): Promise<'registered' | 'duplicate' | 'rejected'>;
|
|
409
|
+
}
|
|
410
|
+
export interface SpawnedProcess {
|
|
411
|
+
child: ChildProcess | SubstrateProc;
|
|
412
|
+
pid: number;
|
|
413
|
+
role: ProcessRole;
|
|
414
|
+
agentKind: AgentKind | undefined;
|
|
415
|
+
spawnedAt: string;
|
|
416
|
+
spawnedAtMs: number;
|
|
417
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { spawn as nodeSpawn } from 'node:child_process';
|
|
2
|
+
import type { GateRunResult } from '../verification-runner';
|
|
3
|
+
export declare const VERIFICATION_RUNNER_ROLE = "verification_runner";
|
|
4
|
+
export interface ShellRunArgs {
|
|
5
|
+
/** Command to execute (e.g. "cargo", "npm", "git"). */
|
|
6
|
+
command: string;
|
|
7
|
+
/** Arguments to pass to the command. */
|
|
8
|
+
args: string[];
|
|
9
|
+
/** Working directory — caller (gate wrapper) MUST pass the repo root. */
|
|
10
|
+
cwd: string;
|
|
11
|
+
/** Per-gate timeout budget in milliseconds. Required (LOCK #C3E-4). */
|
|
12
|
+
timeoutMs: number;
|
|
13
|
+
/** Optional extra env overrides on top of the marker injection. */
|
|
14
|
+
extraEnv?: Record<string, string>;
|
|
15
|
+
/** Optional clock seam for tests. Defaults to Date.now. */
|
|
16
|
+
nowMs?: () => number;
|
|
17
|
+
/**
|
|
18
|
+
* Test seam — injects a fake spawner. Production callers leave this
|
|
19
|
+
* undefined and the real `child_process.spawn` is used. The seam returns
|
|
20
|
+
* a minimal interface (write events, exit event) so test fixtures
|
|
21
|
+
* don't have to model the full Node ChildProcess surface.
|
|
22
|
+
*/
|
|
23
|
+
spawnFn?: typeof nodeSpawn;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Run a single command-line under the verification-runner marker. Returns
|
|
27
|
+
* a `GateRunResult` matching what verification-runner.ts consumes.
|
|
28
|
+
*
|
|
29
|
+
* Captures FULL stdout/stderr (the runner truncates per LOCK #C3E-1) and
|
|
30
|
+
* fires the timeout race per LOCK #C3E-4. On timeout, the subprocess is
|
|
31
|
+
* killed (SIGKILL) and `timedOut: true` is set so the runner can apply
|
|
32
|
+
* the wire-form `exit_code = 124` regardless of what the platform
|
|
33
|
+
* returned for the killed process.
|
|
34
|
+
*
|
|
35
|
+
* NOTE: this primitive does NOT participate in authority enforcement.
|
|
36
|
+
* The orchestration shell establishes the authority scope BEFORE the
|
|
37
|
+
* verification runner is invoked, and the gates themselves operate on
|
|
38
|
+
* the user's own working tree which is implicitly readable.
|
|
39
|
+
*/
|
|
40
|
+
export declare function runShellCommand(args: ShellRunArgs): Promise<GateRunResult>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ClassAEmitter, ClassAEmitterContext, VerificationGateKind, VerificationResultPayload } from './class-a-emit';
|
|
2
|
+
export declare const DEFAULT_GATE_TIMEOUT_MS = 300000;
|
|
3
|
+
export declare const TIMEOUT_EXIT_CODE = 124;
|
|
4
|
+
export declare const SUMMARY_CAP_BYTES = 4096;
|
|
5
|
+
export interface VerificationGateRequest {
|
|
6
|
+
gateId: string;
|
|
7
|
+
taskId: string;
|
|
8
|
+
sessionId: string;
|
|
9
|
+
gateKinds: VerificationGateKind[];
|
|
10
|
+
cwd: string;
|
|
11
|
+
timeoutMsOverride?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface GateRunResult {
|
|
14
|
+
exitCode: number;
|
|
15
|
+
stdout: string;
|
|
16
|
+
stderr: string;
|
|
17
|
+
durationMs: number;
|
|
18
|
+
timedOut?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface VerificationRunnerDeps {
|
|
21
|
+
emitter: ClassAEmitter;
|
|
22
|
+
classAContext: ClassAEmitterContext;
|
|
23
|
+
nowMs?: () => number;
|
|
24
|
+
onResultEmitted?: (result: VerificationResultPayload) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function runVerificationGates(req: VerificationGateRequest, deps: VerificationRunnerDeps): Promise<VerificationResultPayload[]>;
|
|
27
|
+
export declare function truncateUtf8Safe(input: string, maxBytes: number): string;
|
|
28
|
+
export declare const NO_OP_PASS: GateRunResult;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* §2.6 — a single conflicted path rendered to concrete 3-way CONTENT for the
|
|
3
|
+
* reviewer prompt. Each side is either decoded text, a per-side snippet (head+tail
|
|
4
|
+
* with a truncation marker), or a placeholder line (`[absent…]`/`[binary…]`/
|
|
5
|
+
* `[non-UTF-8…]`). Additive — absent ⇒ today's bare base→tip diff.
|
|
6
|
+
*/
|
|
7
|
+
export interface RenderedConflict {
|
|
8
|
+
path: string;
|
|
9
|
+
/** Rendered content OR a placeholder. base = the merge-base side. */
|
|
10
|
+
base: string;
|
|
11
|
+
/** integration-tip side (`ours`). */
|
|
12
|
+
ours: string;
|
|
13
|
+
/** incoming-track side (`theirs`). */
|
|
14
|
+
theirs: string;
|
|
15
|
+
}
|
|
16
|
+
/** §2.6 — one track's intent diff (base → trackTip), already byte-bounded. */
|
|
17
|
+
export interface TrackIntentDiff {
|
|
18
|
+
trackIndex: number;
|
|
19
|
+
implementorAgent?: string;
|
|
20
|
+
/** unified base→trackTip diff (byte-bounded by `readDiffHermetic`). */
|
|
21
|
+
diff: string;
|
|
22
|
+
}
|
|
23
|
+
/** §2.6 — the rendered intent bundle handed to the dispatcher (additive callback fields). */
|
|
24
|
+
export interface RenderedTier2Bundle {
|
|
25
|
+
conflictBundle: readonly RenderedConflict[];
|
|
26
|
+
trackIntentDiffs: readonly TrackIntentDiff[];
|
|
27
|
+
}
|
|
28
|
+
/** §2.6 (locked) byte budgets. The aggregate ceiling must clear the 512 KiB diff with headroom. */
|
|
29
|
+
export declare const WAVE_B_TIER2_MAX_BUNDLE_BYTES: number;
|
|
30
|
+
export declare const WB2_BUNDLE_PER_SIDE_MAX_BYTES: number;
|
|
31
|
+
export declare const WB2_INTENT_DIFF_MAX_BYTES: number;
|
|
32
|
+
/**
|
|
33
|
+
* Render ONE side of a conflict (already-fetched bytes) to prompt-safe text under
|
|
34
|
+
* the per-side cap. NEVER emits raw bytes for a binary / non-UTF-8 / absent side —
|
|
35
|
+
* a placeholder line instead (Q-BINARY locked). A side over the per-side cap is
|
|
36
|
+
* snippet-trimmed head+tail with an explicit `[…truncated N bytes…]` marker
|
|
37
|
+
* (Q-OVERFLOW locked — the ONLY truncate-with-marker affordance).
|
|
38
|
+
*
|
|
39
|
+
* @param bytes the side's raw blob bytes, or `null` when the path is absent on this side.
|
|
40
|
+
* @param oid the side's blob OID (for the binary/non-UTF-8 placeholder), if known.
|
|
41
|
+
*/
|
|
42
|
+
export declare function renderConflictSide(bytes: Buffer | null, oid: string | undefined, perSideMaxBytes?: number): string;
|
|
43
|
+
/**
|
|
44
|
+
* Render the §2.6 bundle into prompt sections, appended AFTER the base→tip diff
|
|
45
|
+
* block. Returns `''` when the bundle is empty/absent (graceful degrade → today's
|
|
46
|
+
* behavior). Pure string assembly — no overflow decision here (the dispatcher owns
|
|
47
|
+
* the aggregate-ceiling fail-closed check, see {@link bundleSectionsOverBudget}).
|
|
48
|
+
*/
|
|
49
|
+
export declare function renderTier2BundleSections(bundle: {
|
|
50
|
+
conflictBundle?: readonly RenderedConflict[];
|
|
51
|
+
trackIntentDiffs?: readonly TrackIntentDiff[];
|
|
52
|
+
}): string;
|
|
53
|
+
/**
|
|
54
|
+
* The LOCK fail-closed aggregate check: TRUE iff the rendered diff + bundle sections
|
|
55
|
+
* exceed the aggregate ceiling. The dispatcher fails closed (NO-PROMOTE) when true —
|
|
56
|
+
* the per-side snippet trim keeps individual sides under the per-side cap, but the
|
|
57
|
+
* AGGREGATE never silently drops a whole conflict or intent diff to fit (§2.6 line 108).
|
|
58
|
+
*/
|
|
59
|
+
export declare function bundleSectionsOverBudget(diff: string, bundleSections: string, maxBundleBytes?: number): boolean;
|