@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,481 @@
|
|
|
1
|
+
import { Event } from '../types/events';
|
|
2
|
+
/**
|
|
3
|
+
* `metadata.prompt_kind` value for the 5-option Path B (Halted-resolution)
|
|
4
|
+
* gate prompt. Mirrors `METADATA_PROMPT_KIND` at `appsync_emit.rs:68`.
|
|
5
|
+
*
|
|
6
|
+
* Cross-impl literal parity is a load-bearing invariant — see Test 23
|
|
7
|
+
* (`hostile-grep.test.ts`).
|
|
8
|
+
*/
|
|
9
|
+
export declare const ORCHESTRATION_ESCALATED_GATE_PROMPT_KIND: "orchestration_escalated_gate";
|
|
10
|
+
/**
|
|
11
|
+
* `metadata.prompt_kind` value for the 2-option Path A (FinalApproval)
|
|
12
|
+
* gate prompt. Mirrors `METADATA_PROMPT_KIND_FINAL_APPROVAL` at
|
|
13
|
+
* `appsync_emit.rs:297`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ORCHESTRATION_FINAL_APPROVAL_PROMPT_KIND: "orchestration_final_approval";
|
|
16
|
+
/**
|
|
17
|
+
* `metadata.prompt_kind` value for the 4-option continuation-handoff gate
|
|
18
|
+
* prompt (3 target agents + CANCEL). Mirrors the Rust emitter const
|
|
19
|
+
* `METADATA_PROMPT_KIND_CONTINUATION_HANDOFF = "continuation_offer_handoff"`
|
|
20
|
+
* (`appsync_emit.rs`, P1). PHASE-CP-10-MIN (#585) LOCK #C10M-1/2.
|
|
21
|
+
*
|
|
22
|
+
* Cross-impl literal parity is a load-bearing invariant — see Test 23
|
|
23
|
+
* (`hostile-grep.test.ts`).
|
|
24
|
+
*/
|
|
25
|
+
export declare const CONTINUATION_OFFER_HANDOFF_PROMPT_KIND: "continuation_offer_handoff";
|
|
26
|
+
/**
|
|
27
|
+
* Source-of-truth string literals for the hostile-grep cross-impl parity
|
|
28
|
+
* test (`__tests__/hostile-grep.test.ts`, Test 23). Mirrors the Rust
|
|
29
|
+
* emitter at
|
|
30
|
+
* `codevibe-core-rs/crates/codevibe-orchestration-lambda/src/appsync_emit.rs`
|
|
31
|
+
* lines 63 / 68 / 297 / 312-340 / 351-364.
|
|
32
|
+
*
|
|
33
|
+
* Do NOT remove or reorder — Test 23 greps this module for each literal
|
|
34
|
+
* verbatim. Drift here = silent cross-platform breakage:
|
|
35
|
+
* - tool_name discriminator → `metadata.tool_name`
|
|
36
|
+
* - prompt_kind discriminators → `metadata.prompt_kind`
|
|
37
|
+
* - 5-tuple escalation option ids → `metadata.payload.options[*].id`
|
|
38
|
+
* (position-ordered: ACCEPT, ACCEPT_WITH_NOTES, REJECT_WITH_NOTES,
|
|
39
|
+
* REJECT_RESTART, ABORT_TASK)
|
|
40
|
+
* - 2-tuple final-approval ids → `metadata.payload.options[*].id`
|
|
41
|
+
* (position-ordered: APPROVE, CANCEL)
|
|
42
|
+
*
|
|
43
|
+
* NB: the option ids themselves are NEVER referenced as TS string
|
|
44
|
+
* constants at runtime — the renderer + mapper read them from the wire
|
|
45
|
+
* per #C8M-1. This block exists purely as a hostile-grep anchor so any
|
|
46
|
+
* Rust-side reordering or rename trips the parity test on the TS side
|
|
47
|
+
* as well.
|
|
48
|
+
*/
|
|
49
|
+
export declare const SOURCE_OF_TRUTH_LITERALS: {
|
|
50
|
+
readonly toolName: "OrchestrationGate";
|
|
51
|
+
readonly escalatedPromptKind: "orchestration_escalated_gate";
|
|
52
|
+
readonly finalApprovalPromptKind: "orchestration_final_approval";
|
|
53
|
+
readonly escalationOptionIds: readonly ["ACCEPT", "ACCEPT_WITH_NOTES", "REJECT_WITH_NOTES", "REJECT_RESTART", "ABORT_TASK"];
|
|
54
|
+
readonly finalApprovalOptionIds: readonly ["APPROVE", "CANCEL"];
|
|
55
|
+
readonly continuationHandoffPromptKind: "continuation_offer_handoff";
|
|
56
|
+
readonly continuationHandoffOptionIds: readonly ["CONTINUE_WITH", "CANCEL"];
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Discriminated union over the two prompt kinds CP-8 min routes through
|
|
60
|
+
* the gate-prompt path. Anything outside this union flows to the
|
|
61
|
+
* existing `subagent-event` / `mobile-event-replay` path per #C8M-3.
|
|
62
|
+
*/
|
|
63
|
+
export type GatePromptKind = typeof ORCHESTRATION_ESCALATED_GATE_PROMPT_KIND | typeof ORCHESTRATION_FINAL_APPROVAL_PROMPT_KIND | typeof CONTINUATION_OFFER_HANDOFF_PROMPT_KIND;
|
|
64
|
+
/**
|
|
65
|
+
* One option entry on the wire — matches the Rust struct projected by
|
|
66
|
+
* `build_escalation_options()` / `build_final_approval_options()`.
|
|
67
|
+
*/
|
|
68
|
+
export interface GatePromptOption {
|
|
69
|
+
readonly id: string;
|
|
70
|
+
readonly label: string;
|
|
71
|
+
readonly description: string;
|
|
72
|
+
/**
|
|
73
|
+
* PHASE-CP-10-MIN (#585) — the per-option target agent for the
|
|
74
|
+
* `continuation_offer_handoff` prompt (CLAUDE/CODEX/GEMINI/ANTIGRAVITY).
|
|
75
|
+
* On the wire the 3-4 agent options all carry `id: "CONTINUE_WITH"` (a valid
|
|
76
|
+
* `UserDecisionKind`); the agent rides this NEW per-option `targetAgent`
|
|
77
|
+
* field (Rust `OptionPayload.target_agent` with
|
|
78
|
+
* `#[serde(rename="targetAgent", skip_serializing_if="Option::is_none")]`,
|
|
79
|
+
* P2/M-A/M3). Absent on every pre-CP-10 array (escalation / final-approval)
|
|
80
|
+
* because the Rust field is skipped when `None`. LOCK #C10M-1.
|
|
81
|
+
*/
|
|
82
|
+
readonly targetAgent?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Locked design §4 #C8M-9. The plaintext-parsed envelope the
|
|
86
|
+
* dispatcher hands to the reducer via `GATE_PROMPT_RECEIVED`. Captures
|
|
87
|
+
* everything the renderer + submit path need; no other field is read
|
|
88
|
+
* from `event.metadata` after extraction.
|
|
89
|
+
*
|
|
90
|
+
* Field provenance (Rust `appsync_emit.rs::build_metadata_json` lines
|
|
91
|
+
* 1459-1493):
|
|
92
|
+
* - `promptKind` from `metadata.prompt_kind`
|
|
93
|
+
* - `taskId` / `gateId` from `metadata.payload.{taskId,gateId}` (ROOT, #572)
|
|
94
|
+
* - `currentRound` from `metadata.payload.outcome.round`
|
|
95
|
+
* - `options` from `metadata.payload.options` (5 or 2 entries)
|
|
96
|
+
* - `reason` from `metadata.payload.outcome.reason` (Path B only)
|
|
97
|
+
* - `summary` from `metadata.summary`
|
|
98
|
+
* - `receivedAt` from `event.timestamp` (server-set; ISO 8601)
|
|
99
|
+
*/
|
|
100
|
+
export interface GatePromptEnvelope {
|
|
101
|
+
readonly promptKind: GatePromptKind;
|
|
102
|
+
readonly taskId: string;
|
|
103
|
+
readonly gateId: string;
|
|
104
|
+
readonly currentRound: number;
|
|
105
|
+
readonly options: ReadonlyArray<GatePromptOption>;
|
|
106
|
+
readonly reason?: string;
|
|
107
|
+
readonly summary?: string;
|
|
108
|
+
readonly receivedAt: string;
|
|
109
|
+
/** Plaintext 3-entry timeline strip (gate_opened → verdicts_collected → gate_resolved). */
|
|
110
|
+
readonly timeline?: ReadonlyArray<GateTimelineEntry>;
|
|
111
|
+
/** Plaintext per-round cascade rows; #574 emits a single entry today (renders no cascade). */
|
|
112
|
+
readonly roundHistory?: ReadonlyArray<GateRoundHistoryEntry>;
|
|
113
|
+
/** Decrypted reviewer-disagreement panel (or an unavailable marker); set by the dispatcher. */
|
|
114
|
+
readonly verdictDetails?: GateVerdictDetails;
|
|
115
|
+
/** The continuation offer's desktop-minted ULID (`metadata.offerId`). */
|
|
116
|
+
readonly offerId?: string;
|
|
117
|
+
/** The agent that halted (closed enum CLAUDE/CODEX/GEMINI/ANTIGRAVITY; `metadata.sourceAgent`). */
|
|
118
|
+
readonly sourceAgent?: string;
|
|
119
|
+
/** The authoritative 64-hex SHA-256 packet hash (`metadata.packetHash`). */
|
|
120
|
+
readonly packetHash?: string;
|
|
121
|
+
readonly groupEscalation?: {
|
|
122
|
+
readonly taskGroupId: string;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* One `metadata.timeline` entry [SRC `appsync_emit.rs:1623-1625`]:
|
|
127
|
+
* `{ at: <rfc3339>, kind: "gate_opened"|"verdicts_collected"|"gate_resolved" }`.
|
|
128
|
+
* `kind` is kept as the raw string (forward-compatible; unknown kinds
|
|
129
|
+
* still render their timestamp).
|
|
130
|
+
*/
|
|
131
|
+
export interface GateTimelineEntry {
|
|
132
|
+
readonly at: string;
|
|
133
|
+
readonly kind: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* One `metadata.roundHistory` entry [SRC `appsync_emit.rs` ENG.5 emit]:
|
|
137
|
+
* `{ round: <int>, kind: <str>, reason: <str> }`. Plaintext closed-enum
|
|
138
|
+
* strings. The cascade renders ONLY when `roundHistory.length > 1`.
|
|
139
|
+
*/
|
|
140
|
+
export interface GateRoundHistoryEntry {
|
|
141
|
+
readonly round: number;
|
|
142
|
+
readonly kind: string;
|
|
143
|
+
readonly reason: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* One decrypted reviewer seat (per shared-contract §2 / `verdict_details.rs`
|
|
147
|
+
* `build_panel`): `{ seatId, role, reviewerAgent, decision, findings,
|
|
148
|
+
* findingsTruncated, truncatedFindingCount }`. `decision` is the 4-value
|
|
149
|
+
* UPPERCASE `VerdictKind`; map via `decisionCopy` (unknown → raw string).
|
|
150
|
+
*/
|
|
151
|
+
export interface GateReviewerSeat {
|
|
152
|
+
readonly seatId: number;
|
|
153
|
+
readonly role: string;
|
|
154
|
+
readonly reviewerAgent: string;
|
|
155
|
+
readonly decision: string;
|
|
156
|
+
readonly findings: ReadonlyArray<string>;
|
|
157
|
+
readonly findingsTruncated: boolean;
|
|
158
|
+
readonly truncatedFindingCount: number;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* The decrypted reviewer-disagreement panel attached to the envelope by the
|
|
162
|
+
* dispatcher. Either `available` (the decrypted `{ reviewers, ... }` object)
|
|
163
|
+
* OR `unavailable` (fail-closed: decrypt error, size cap, or encryption
|
|
164
|
+
* error). NEVER carries ciphertext.
|
|
165
|
+
*/
|
|
166
|
+
export type GateVerdictDetails = {
|
|
167
|
+
readonly status: 'available';
|
|
168
|
+
readonly reviewers: ReadonlyArray<GateReviewerSeat>;
|
|
169
|
+
/** Root marker (#574 size-degrade): findings dropped → "audit browser" hint. */
|
|
170
|
+
readonly findingsOmittedForSize: boolean;
|
|
171
|
+
} | {
|
|
172
|
+
readonly status: 'unavailable';
|
|
173
|
+
/**
|
|
174
|
+
* Why the panel can't be shown:
|
|
175
|
+
* - 'size' → `verdictDetailsUnavailable: "size"` (adds the audit-browser hint)
|
|
176
|
+
* - 'encryption_error' → `verdictDetailsUnavailable: "encryption_error"`
|
|
177
|
+
* - 'unavailable_other' → ANY other present non-empty `verdictDetailsUnavailable`
|
|
178
|
+
* marker (unknown / future; neutral line only, no hint)
|
|
179
|
+
* - 'decrypt_failed' → client-side decrypt/parse failure (fail-closed)
|
|
180
|
+
*/
|
|
181
|
+
readonly reason: 'size' | 'encryption_error' | 'unavailable_other' | 'decrypt_failed';
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Defensive validator (per #C8M-1 + #C8M-2). Returns `null` on ANY of:
|
|
185
|
+
* - event is not an INTERACTIVE_PROMPT
|
|
186
|
+
* - metadata absent / un-parseable
|
|
187
|
+
* - `prompt_kind` not one of the two orchestration discriminators
|
|
188
|
+
* - `payload.options` not an array, OR wrong length
|
|
189
|
+
* (5 for escalation, 2 for final-approval)
|
|
190
|
+
* - any entry missing `id` / `label` / `description` or with non-string
|
|
191
|
+
* `id`
|
|
192
|
+
* - `payload.{taskId,gateId}` (ROOT) or `payload.outcome.round` missing
|
|
193
|
+
* or wrong type
|
|
194
|
+
*
|
|
195
|
+
* Wire-shape note (#572): `taskId`/`gateId`/`sessionId` live at the
|
|
196
|
+
* `payload` ROOT; `outcome` carries only `{kind, reason, round}` — per the
|
|
197
|
+
* authoritative engine emit (`codevibe-orchestration-lambda/src/appsync_emit.rs:1514-1523`).
|
|
198
|
+
* The mobile V1 bridge already reads them at root; this extractor matches.
|
|
199
|
+
*
|
|
200
|
+
* The caller (dispatcher in `index.ts`) is responsible for emitting the
|
|
201
|
+
* `kind: 'advisory'` ConversationEntry on null-return per #C8M-1.
|
|
202
|
+
*/
|
|
203
|
+
export declare function extractGatePromptEnvelope(event: Event): GatePromptEnvelope | null;
|
|
204
|
+
/**
|
|
205
|
+
* The canonical 5-option group-decision escalation set, position-bound to the
|
|
206
|
+
* `submitGroupDecision` / `claimGroupDecision` `GroupDecisionLabel` union AND
|
|
207
|
+
* verbatim with the engine's `escalationOptionIds` (so the rendered numbered
|
|
208
|
+
* list, the `_with_notes` notes-phase trigger, and the `mapTypedNumberToDecisionKind`
|
|
209
|
+
* uppercasing all behave EXACTLY like a per-track engine escalation). The labels
|
|
210
|
+
* + descriptions are desktop-authored (the group halt rides Class B, not the
|
|
211
|
+
* engine INTERACTIVE_PROMPT path, so there is no server-supplied copy) but the
|
|
212
|
+
* IDS are the load-bearing contract — they map 1:1 onto the two-phase submit.
|
|
213
|
+
*/
|
|
214
|
+
export declare const GROUP_ESCALATION_OPTIONS: ReadonlyArray<GatePromptOption>;
|
|
215
|
+
/**
|
|
216
|
+
* PHASE-589/469 W3.2 — synthesize the desktop-side 5-option group escalation
|
|
217
|
+
* `GatePromptEnvelope` from a team `task_group_halted` payload. This is the
|
|
218
|
+
* ONLY envelope NOT extracted from an engine INTERACTIVE_PROMPT: it carries the
|
|
219
|
+
* `groupEscalation` marker so `routeGatePromptInput` routes resolution through
|
|
220
|
+
* the two-phase `submitGroupDecision` instead of the per-track `applyUserDecision`.
|
|
221
|
+
*
|
|
222
|
+
* `taskId`/`gateId` are synthetic sentinels derived from the group id (the group
|
|
223
|
+
* has no per-track gate). `gateId` MUST be STABLE per group so the reducer's
|
|
224
|
+
* gateId-keyed dedup collapses a duplicate halt packet onto the same prompt
|
|
225
|
+
* entry (a re-emitted halt must not stack two prompts). `currentRound` is 0
|
|
226
|
+
* (the group decision is round-agnostic).
|
|
227
|
+
*
|
|
228
|
+
* `haltReason` (a content-free engine reason label) becomes the `reason` the
|
|
229
|
+
* renderer surfaces via `formatHaltReason`; never any file content (#589-G).
|
|
230
|
+
*/
|
|
231
|
+
export declare function buildGroupEscalationEnvelope(input: {
|
|
232
|
+
taskGroupId: string;
|
|
233
|
+
haltReason?: string;
|
|
234
|
+
receivedAt?: string;
|
|
235
|
+
}): GatePromptEnvelope;
|
|
236
|
+
/**
|
|
237
|
+
* Per #C8M-1: typed_number N (1-based) → `lowercase(envelope.options[N-1].id)`.
|
|
238
|
+
* Result is the `decision` value the caller passes to
|
|
239
|
+
* `sdk.applyUserDecision({ decision, ... })`. The SDK uppercases via
|
|
240
|
+
* `toWireEnum` before AppSync wire-send (see `client.ts:244-246`).
|
|
241
|
+
*
|
|
242
|
+
* Returns `null` for ANY of:
|
|
243
|
+
* - `n` is not an integer (NaN, fractional, non-number)
|
|
244
|
+
* - `n < 1` or `n > envelope.options.length`
|
|
245
|
+
*
|
|
246
|
+
* `needsNotes` is `true` iff the resolved kind ends with `_with_notes`,
|
|
247
|
+
* driving the InputBar transition to the notes-entry sub-prompt per
|
|
248
|
+
* #C8M-5. For Path A's APPROVE / CANCEL, `needsNotes` is always false.
|
|
249
|
+
*
|
|
250
|
+
* The caller MUST treat `null` as a typo / out-of-range and reject the
|
|
251
|
+
* submit — silent fallback to a default kind would destroy or accept
|
|
252
|
+
* the user's work without consent (matches the v1-options rule).
|
|
253
|
+
*
|
|
254
|
+
* PHASE-CP-10-MIN (#585) — for a `CONTINUE_WITH` option the resolved `kind`
|
|
255
|
+
* is `"continue_with"` and the result ALSO carries `targetAgent` (the
|
|
256
|
+
* per-option agent), so the submit handler can encrypt it as `notes`. The
|
|
257
|
+
* continuation accept is typed-digit-only — NO `_with_notes` editor phase
|
|
258
|
+
* (the agent name IS the payload), so `needsNotes` stays false (#C10M-5).
|
|
259
|
+
*/
|
|
260
|
+
export declare function mapTypedNumberToDecisionKind(envelope: GatePromptEnvelope, n: number): {
|
|
261
|
+
kind: string;
|
|
262
|
+
needsNotes: boolean;
|
|
263
|
+
targetAgent?: string;
|
|
264
|
+
} | null;
|
|
265
|
+
/**
|
|
266
|
+
* `haltReasonCopy` — `payload.outcome.reason` → `{ label, explanation }`.
|
|
267
|
+
* Shared-contract §3. Unknown reason → render the RAW snake_case string as
|
|
268
|
+
* the label with NO explanation (see `formatHaltReason` below).
|
|
269
|
+
*/
|
|
270
|
+
export declare const haltReasonCopy: Readonly<Record<string, {
|
|
271
|
+
readonly label: string;
|
|
272
|
+
readonly explanation: string;
|
|
273
|
+
}>>;
|
|
274
|
+
/**
|
|
275
|
+
* `decisionCopy` — `VerdictKind` (UPPERCASE) → display label.
|
|
276
|
+
* Shared-contract §4. Unknown → raw string (see `formatDecision`).
|
|
277
|
+
*/
|
|
278
|
+
export declare const decisionCopy: Readonly<Record<string, string>>;
|
|
279
|
+
/**
|
|
280
|
+
* Halt-reason → `{ label, explanation }` via `haltReasonCopy`. Unknown
|
|
281
|
+
* reason → `{ label: <raw>, explanation: null }` (never blank). Absent
|
|
282
|
+
* reason → `null`.
|
|
283
|
+
*/
|
|
284
|
+
export declare function formatHaltReason(reason: string | undefined): {
|
|
285
|
+
label: string;
|
|
286
|
+
explanation: string | null;
|
|
287
|
+
} | null;
|
|
288
|
+
/** Decision → display label via `decisionCopy`. Unknown → raw string. */
|
|
289
|
+
export declare function formatDecision(decision: string): string;
|
|
290
|
+
/**
|
|
291
|
+
* The minimal decrypt primitive `decryptVerdictDetails` needs. Structurally
|
|
292
|
+
* compatible with `cryptoService.decryptMetadata(encryptedB64, sessionKeyB64)`
|
|
293
|
+
* — injected so the orchestration is unit-testable with a mock (NO live
|
|
294
|
+
* crypto in tests).
|
|
295
|
+
*/
|
|
296
|
+
export type DecryptMetadataFn = (encryptedB64: string, sessionKeyBase64: string) => Record<string, unknown>;
|
|
297
|
+
/**
|
|
298
|
+
* Parse an ALREADY-DECRYPTED verdictDetails OBJECT (shared-contract §2 shape)
|
|
299
|
+
* into the structured `GateVerdictDetails`. PURE — no crypto, no I/O — so the
|
|
300
|
+
* parity test exercises it directly with the fixture's decrypted plaintext.
|
|
301
|
+
*
|
|
302
|
+
* Contract (shared-contract §2):
|
|
303
|
+
* - The decrypted payload MUST be a JSON OBJECT `{ reviewers: [...] }`
|
|
304
|
+
* (NOT a top-level array — iOS throws on an array; we treat a non-object
|
|
305
|
+
* or a missing/invalid `reviewers` as a decrypt failure → fail-closed).
|
|
306
|
+
* - Each reviewer: `{ seatId, role, reviewerAgent, decision, findings,
|
|
307
|
+
* findingsTruncated, truncatedFindingCount }`. A seat MISSING any required
|
|
308
|
+
* typed field (finite-integer `seatId`, non-empty string `role`, string
|
|
309
|
+
* `reviewerAgent`, string `decision`) is DROPPED — fail closed, never a
|
|
310
|
+
* synthesized `-1`/`''` junk row (parity with iOS/Android). `decision`
|
|
311
|
+
* keeps its raw string (mapped at render time via `decisionCopy`).
|
|
312
|
+
* - Root `findingsOmittedForSize: true` → panel rows present, findings
|
|
313
|
+
* dropped → audit-browser hint at panel level.
|
|
314
|
+
*
|
|
315
|
+
* Returns the `available` panel on success, or `{ status:'unavailable',
|
|
316
|
+
* reason:'decrypt_failed' }` when the object is structurally unusable OR when
|
|
317
|
+
* no usable reviewer rows remain (empty array OR all seats malformed) — the
|
|
318
|
+
* renderer shows the neutral unavailable line, never an empty "available" panel.
|
|
319
|
+
*/
|
|
320
|
+
export declare function parseDecryptedVerdictDetails(decrypted: unknown): GateVerdictDetails;
|
|
321
|
+
/**
|
|
322
|
+
* FIELD-LEVEL decrypt orchestration (shared-contract §2 / B.4) for the
|
|
323
|
+
* nested `metadata.verdictDetails = { encrypted: <b64> }` blob. The
|
|
324
|
+
* `{encrypted:…}` wrapper is NOT auto-unwrapped (that only happens for
|
|
325
|
+
* TOP-LEVEL event metadata), so this explicitly:
|
|
326
|
+
* (1) reads `.encrypted` off `metadata.verdictDetails`;
|
|
327
|
+
* (2) decrypts it with the session key via the injected
|
|
328
|
+
* `decryptMetadata` primitive (the SAME AES-256-GCM inline-nonce
|
|
329
|
+
* envelope image/metadata decryption uses — `cryptoService.decryptMetadata`);
|
|
330
|
+
* (3) parses the result as an OBJECT and reads `reviewers`
|
|
331
|
+
* (via `parseDecryptedVerdictDetails`).
|
|
332
|
+
*
|
|
333
|
+
* Returns:
|
|
334
|
+
* - `undefined` when there is NO encrypted blob to decrypt (absent
|
|
335
|
+
* `verdictDetails`, or it isn't an `{encrypted:string}` wrapper) AND no
|
|
336
|
+
* plaintext `verdictDetailsUnavailable` marker is in play — the caller
|
|
337
|
+
* leaves the envelope's `verdictDetails` as whatever the extractor set
|
|
338
|
+
* (which may itself be an `unavailable` marker from the plaintext sibling).
|
|
339
|
+
* - `{ status:'available', ... }` on a successful decrypt+parse.
|
|
340
|
+
* - `{ status:'unavailable', reason:'decrypt_failed' }` when the decrypt
|
|
341
|
+
* throws OR the decrypted payload is structurally unusable. NEVER
|
|
342
|
+
* ciphertext, NEVER throws.
|
|
343
|
+
*/
|
|
344
|
+
export declare function decryptVerdictDetails(metadata: Record<string, unknown>, sessionKeyBase64: string, decryptMetadata: DecryptMetadataFn): GateVerdictDetails | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* `true` iff `metadata.verdictDetails` carries an `{ encrypted: <string> }`
|
|
347
|
+
* blob the dispatcher should attempt to decrypt. Lets the dispatcher skip
|
|
348
|
+
* the session-key resolve entirely for gate events with no encrypted panel.
|
|
349
|
+
*/
|
|
350
|
+
export declare function hasEncryptedVerdictDetails(metadata: Record<string, unknown>): boolean;
|
|
351
|
+
/** A timeline row the panel renders: kind label + the raw `at` timestamp. */
|
|
352
|
+
export interface GatePanelTimelineRow {
|
|
353
|
+
readonly kind: string;
|
|
354
|
+
readonly at: string;
|
|
355
|
+
}
|
|
356
|
+
/** A reviewer row the panel renders: pre-formatted header + findings. */
|
|
357
|
+
export interface GatePanelReviewerRow {
|
|
358
|
+
readonly seatId: number;
|
|
359
|
+
readonly role: string;
|
|
360
|
+
readonly reviewerAgent: string;
|
|
361
|
+
/** "Reviewer {seatId} ({role}, {reviewerAgent}): {decisionCopy}". */
|
|
362
|
+
readonly header: string;
|
|
363
|
+
readonly findings: ReadonlyArray<string>;
|
|
364
|
+
/** Per-seat "(N more — full review in the audit browser)" hint, or null. */
|
|
365
|
+
readonly truncationHint: string | null;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* The fully-extracted, render-ready GateDetailsPanel model. PURE function of
|
|
369
|
+
* the envelope — the `GateDetailsPanel` component computes this and renders
|
|
370
|
+
* it; the parity test asserts these exact extracted values (shared-contract
|
|
371
|
+
* §5). `null` panel pieces render nothing (graceful empty).
|
|
372
|
+
*/
|
|
373
|
+
export interface GateDetailsPanelModel {
|
|
374
|
+
/** `summary` verbatim (headline), or null. */
|
|
375
|
+
readonly headline: string | null;
|
|
376
|
+
/** Halt-reason label + explanation (unknown → raw label, null explanation), or null. */
|
|
377
|
+
readonly reasonLabel: string | null;
|
|
378
|
+
readonly reasonExplanation: string | null;
|
|
379
|
+
/** "Round N". */
|
|
380
|
+
readonly roundLabel: string;
|
|
381
|
+
/** Timeline rows (empty → no strip). */
|
|
382
|
+
readonly timeline: ReadonlyArray<GatePanelTimelineRow>;
|
|
383
|
+
/** Elapsed seconds (gate_resolved − gate_opened), or null if not derivable. */
|
|
384
|
+
readonly elapsedSeconds: number | null;
|
|
385
|
+
/** Cascade rows — ONLY when roundHistory.length > 1; else empty (no cascade). */
|
|
386
|
+
readonly cascade: ReadonlyArray<{
|
|
387
|
+
readonly round: number;
|
|
388
|
+
readonly reasonLabel: string;
|
|
389
|
+
}>;
|
|
390
|
+
/** True when the prior-rounds cascade omitted earlier entries (`omittedEarlier`). */
|
|
391
|
+
readonly cascadeOmittedEarlier: boolean;
|
|
392
|
+
/** Reviewer rows (empty → no disagreement panel). */
|
|
393
|
+
readonly reviewers: ReadonlyArray<GatePanelReviewerRow>;
|
|
394
|
+
/** Panel-level "Full review in the audit browser" hint (size-degrade), or null. */
|
|
395
|
+
readonly panelTruncationHint: string | null;
|
|
396
|
+
/** Neutral "Reviewer details unavailable" line text when the panel can't render, or null. */
|
|
397
|
+
readonly reviewerUnavailableLine: string | null;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Build the render-ready `GateDetailsPanelModel` from an envelope. PURE — no
|
|
401
|
+
* crypto, no I/O (the `verdictDetails` decrypt already happened in the
|
|
402
|
+
* dispatcher and is attached to the envelope). The test exercises this with
|
|
403
|
+
* the shared parity fixture's envelope directly (shared-contract §5).
|
|
404
|
+
*
|
|
405
|
+
* Never throws; every absent/malformed field degrades to a safe empty value.
|
|
406
|
+
*/
|
|
407
|
+
export declare function buildGateDetailsPanelModel(envelope: GatePromptEnvelope): GateDetailsPanelModel;
|
|
408
|
+
/** One reviewer seat row the panel renders (a round's verdict). */
|
|
409
|
+
export interface ReviewSummaryReviewerRow {
|
|
410
|
+
readonly seatId: number;
|
|
411
|
+
readonly role: string;
|
|
412
|
+
readonly agent: string;
|
|
413
|
+
/** "Reviewer {seatId} ({role}, {agent}): {decisionCopy}". */
|
|
414
|
+
readonly header: string;
|
|
415
|
+
/** Decision display label via `decisionCopy` (unknown → raw). */
|
|
416
|
+
readonly decisionLabel: string;
|
|
417
|
+
readonly reasoning: string;
|
|
418
|
+
readonly suggestedChanges: ReadonlyArray<string>;
|
|
419
|
+
}
|
|
420
|
+
/** One round the panel renders (proposal + per-seat verdicts + revise notes). */
|
|
421
|
+
export interface ReviewSummaryRoundModel {
|
|
422
|
+
readonly round: number;
|
|
423
|
+
/** "Round N". */
|
|
424
|
+
readonly roundLabel: string;
|
|
425
|
+
readonly proposal: string;
|
|
426
|
+
readonly reviewers: ReadonlyArray<ReviewSummaryReviewerRow>;
|
|
427
|
+
/** GateDecision serde value (proceed | auto_revise | escalate). */
|
|
428
|
+
readonly outcome: string;
|
|
429
|
+
/** Aggregated REVISE seat findings (the auto-revision driver), or null. */
|
|
430
|
+
readonly reviseNotes: string | null;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* The fully-extracted, render-ready per-round review summary model. PURE
|
|
434
|
+
* function of the decrypted summary. `null`-attached (entry has no
|
|
435
|
+
* `reviewSummary`) → the panel renders nothing extra (fail-open base prompt).
|
|
436
|
+
*/
|
|
437
|
+
export interface ReviewSummaryPanelModel {
|
|
438
|
+
readonly rounds: ReadonlyArray<ReviewSummaryRoundModel>;
|
|
439
|
+
/** finalOutcome display value (proceed | auto_revise | escalate). */
|
|
440
|
+
readonly finalOutcome: string;
|
|
441
|
+
/** Banner text when the size cap dropped/truncated content, or null. */
|
|
442
|
+
readonly truncationNotice: string | null;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* The decrypted summary input shape `buildReviewSummaryPanelModel` accepts.
|
|
446
|
+
* Structurally identical to the SDK's `TaskReviewSummary` (kept local to avoid
|
|
447
|
+
* an import cycle). Every field is defensively read — a malformed/partial
|
|
448
|
+
* object degrades to an empty/safe model, never throws.
|
|
449
|
+
*/
|
|
450
|
+
export interface DecryptedReviewSummaryInput {
|
|
451
|
+
readonly rounds?: ReadonlyArray<{
|
|
452
|
+
readonly round?: number;
|
|
453
|
+
readonly proposal?: string;
|
|
454
|
+
readonly reviewers?: ReadonlyArray<{
|
|
455
|
+
readonly seatId?: number;
|
|
456
|
+
readonly role?: string;
|
|
457
|
+
readonly agent?: string;
|
|
458
|
+
readonly decision?: string;
|
|
459
|
+
readonly reasoning?: string;
|
|
460
|
+
readonly suggestedChanges?: ReadonlyArray<string>;
|
|
461
|
+
}>;
|
|
462
|
+
readonly outcome?: string;
|
|
463
|
+
readonly reviseNotes?: string;
|
|
464
|
+
}>;
|
|
465
|
+
readonly finalOutcome?: string;
|
|
466
|
+
readonly truncatedForSize?: boolean;
|
|
467
|
+
readonly omittedRounds?: number;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Build the render-ready `ReviewSummaryPanelModel` from a decrypted summary.
|
|
471
|
+
* PURE — no crypto, no I/O. Defensive: every absent/malformed field degrades
|
|
472
|
+
* to a safe empty value (the panel renders what it can; the decision never
|
|
473
|
+
* blocks on this — §2.5 fail-open). Returns `null` when there are no usable
|
|
474
|
+
* rounds (the renderer then shows no per-round panel).
|
|
475
|
+
*
|
|
476
|
+
* Truncation markers (the `"…[truncated]"` suffixes + `truncatedForSize` /
|
|
477
|
+
* `omittedRounds`) ride verbatim from the engine — the engine already
|
|
478
|
+
* truncated the strings; the builder only surfaces a panel-level NOTICE so the
|
|
479
|
+
* user knows content was dropped.
|
|
480
|
+
*/
|
|
481
|
+
export declare function buildReviewSummaryPanelModel(summary: DecryptedReviewSummaryInput | null | undefined): ReviewSummaryPanelModel | null;
|