@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,28 @@
|
|
|
1
|
+
/** Exposed for the single log line in createEvent. */
|
|
2
|
+
export declare const CLIENT_THROTTLE_EVENTS_PER_WINDOW: number;
|
|
3
|
+
interface RateWindow {
|
|
4
|
+
windowStartMs: number;
|
|
5
|
+
count: number;
|
|
6
|
+
toolUseAboveThreshold: number;
|
|
7
|
+
suppressed: number;
|
|
8
|
+
logged: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Decide whether this outbound event should be suppressed (not sent).
|
|
12
|
+
* Deterministic given (sessionId, type, now) and prior counter state.
|
|
13
|
+
* Exported for unit tests; resetThrottleState() clears the module map.
|
|
14
|
+
*/
|
|
15
|
+
export declare function shouldSuppressEvent(sessionId: string, type: string, now: number): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the session's rate window exactly once per window — the first time the
|
|
18
|
+
* throttle engages — for a single log line; later calls in the same window
|
|
19
|
+
* return undefined. Keeps logging out of the hot path.
|
|
20
|
+
*/
|
|
21
|
+
export declare function consumeThrottleLogOnce(sessionId: string): RateWindow | undefined;
|
|
22
|
+
/** Test-only: clears the per-process rate map. */
|
|
23
|
+
export declare function resetThrottleState(): void;
|
|
24
|
+
/** Test-only: current size of the per-process rate map (eviction-bound check). */
|
|
25
|
+
export declare function throttleMapSize(): number;
|
|
26
|
+
/** Test-only: whether a session is currently tracked (eviction assertions). */
|
|
27
|
+
export declare function throttleMapHas(sessionId: string): boolean;
|
|
28
|
+
export {};
|
package/dist/appsync/index.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export { AppSyncClient, DownloadUrlResponse } from './appsync-client';
|
|
1
|
+
export { AppSyncClient, AppSyncGraphQLError, DownloadUrlResponse } from './appsync-client';
|
|
2
|
+
export { coerceAwsJsonObject } from './appsync-client';
|
|
3
|
+
export type { ClassBPacketEnvelopeMeta } from './appsync-client';
|
|
4
|
+
export type { TaskReviewSummary, TaskReviewSummaryRound, TaskReviewSummaryReviewer, TaskGroupStatusResult, } from './appsync-client';
|
|
2
5
|
export { queries, mutations, subscriptions } from './queries';
|
|
@@ -2,6 +2,25 @@ export declare const queries: {
|
|
|
2
2
|
getSession: string;
|
|
3
3
|
listEvents: string;
|
|
4
4
|
listUserDeviceKeys: string;
|
|
5
|
+
listServiceDeviceKeys: string;
|
|
6
|
+
/**
|
|
7
|
+
* Minimal session listing used by the orphan-sweep path. Only the
|
|
8
|
+
* fields needed to decide whether a session row is stale — sessionId
|
|
9
|
+
* for the INACTIVE mutation, agentType for the per-plugin filter,
|
|
10
|
+
* status to skip non-ACTIVE rows, and lastHeartbeatAt for the age
|
|
11
|
+
* check.
|
|
12
|
+
*/
|
|
13
|
+
listSessions: string;
|
|
14
|
+
getSubscriptionStatus: string;
|
|
15
|
+
queryAudit: string;
|
|
16
|
+
verifyContinuationPacketWritten: string;
|
|
17
|
+
getReviewerPrompt: string;
|
|
18
|
+
getClassBSigningPublicKey: string;
|
|
19
|
+
getInReviewAssignments: string;
|
|
20
|
+
getTaskGroupTracks: string;
|
|
21
|
+
getInFlightTeamTracks: string;
|
|
22
|
+
getTaskGroupStatus: string;
|
|
23
|
+
getTaskReviewSummary: string;
|
|
5
24
|
};
|
|
6
25
|
export declare const mutations: {
|
|
7
26
|
createSession: string;
|
|
@@ -12,9 +31,24 @@ export declare const mutations: {
|
|
|
12
31
|
grantSessionKey: string;
|
|
13
32
|
getAttachmentDownloadUrl: string;
|
|
14
33
|
updateAvailableAgents: string;
|
|
34
|
+
updateAdapterCapabilities: string;
|
|
15
35
|
updateReviewerPolicy: string;
|
|
36
|
+
classifyPlannerPrompt: string;
|
|
37
|
+
pingPlanner: string;
|
|
38
|
+
applyUserDecision: string;
|
|
39
|
+
recordContinuationPacketWritten: string;
|
|
40
|
+
createTaskGroup: string;
|
|
41
|
+
submitMergeGateVerdict: string;
|
|
42
|
+
submitTrackVerificationOutcome: string;
|
|
43
|
+
claimGroupDecision: string;
|
|
44
|
+
startTask: string;
|
|
45
|
+
submitImplementorOutput: string;
|
|
46
|
+
submitReviewerVerdict: string;
|
|
16
47
|
};
|
|
17
48
|
export declare const subscriptions: {
|
|
18
49
|
onEventCreated: string;
|
|
19
50
|
onDeviceKeyRegistered: string;
|
|
51
|
+
onSessionUpdated: string;
|
|
52
|
+
onClassBPacket: string;
|
|
53
|
+
onApplyUserDecision: string;
|
|
20
54
|
};
|
|
@@ -39,3 +39,35 @@ export declare function dedupKeyForDestructiveActionEscalated(gateId: Uuid, acti
|
|
|
39
39
|
* passed alongside).
|
|
40
40
|
*/
|
|
41
41
|
export declare function dedupKeyForFlagBadApproval(flaggedEntryId: Uuid): string;
|
|
42
|
+
/**
|
|
43
|
+
* `ModelCall` (CP-7 §3.5) — pre-forward strict audit row.
|
|
44
|
+
* Identity: `(task_id, "model_call", model_call_id)`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function dedupKeyForModelCall(taskId: Uuid, modelCallId: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* `ModelCallResult` (CP-7 §3.5) — post-response enrichment row.
|
|
49
|
+
* Identity: `(task_id, "model_call_result", model_call_id)`. Shares the
|
|
50
|
+
* `model_call_id` FK with its pre-forward {@link dedupKeyForModelCall}
|
|
51
|
+
* row; framing keeps the two rows on DISTINCT keys despite the prefix
|
|
52
|
+
* overlap.
|
|
53
|
+
*/
|
|
54
|
+
export declare function dedupKeyForModelCallResult(taskId: Uuid, modelCallId: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* `EgressDenied` (CP-7 §3.5) — egress-proxy deny row.
|
|
57
|
+
* Identity: `(task_id, "egress_denied", caller_event_id)`.
|
|
58
|
+
*/
|
|
59
|
+
export declare function dedupKeyForEgressDenied(taskId: Uuid, callerEventId: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* `ModelContextScrubbed` (CP-7 §3.5) — I2 scrub row.
|
|
62
|
+
* Identity: `(task_id, "model_context_scrubbed", model_call_id, field,
|
|
63
|
+
* pattern_class)`. `field` is a canonical JSONPath; `patternClass` lets
|
|
64
|
+
* one field tripping two heuristics record both. This multi-string
|
|
65
|
+
* identity is exactly what the legacy unframed concatenation could not
|
|
66
|
+
* encode injectively.
|
|
67
|
+
*/
|
|
68
|
+
export declare function dedupKeyForModelContextScrubbed(taskId: Uuid, modelCallId: string, field: string, patternClass: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* `BrokerCredentialLoaded` (CP-7 §3.5) — keychain vendor-key load row.
|
|
71
|
+
* Identity: `(task_id, "broker_credential_loaded", credential_issuance_id)`.
|
|
72
|
+
*/
|
|
73
|
+
export declare function dedupKeyForBrokerCredentialLoaded(taskId: Uuid, credentialIssuanceId: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,28 @@
|
|
|
1
|
+
import * as http from 'http';
|
|
1
2
|
import { TokenData } from '../types';
|
|
3
|
+
export declare const PRIMARY_PORT = 8080;
|
|
4
|
+
export declare const PORT_RANGE_SIZE = 20;
|
|
5
|
+
/**
|
|
6
|
+
* Bind an HTTP server to the first available port in
|
|
7
|
+
* PRIMARY_PORT..PRIMARY_PORT+PORT_RANGE_SIZE-1.
|
|
8
|
+
*
|
|
9
|
+
* Retries at the `.listen()` level (no separate probe) to avoid TOCTOU races.
|
|
10
|
+
* Installs a persistent post-bind error listener to prevent process crash on
|
|
11
|
+
* later server errors (e.g., EMFILE during connection accept).
|
|
12
|
+
*
|
|
13
|
+
* @param handler - the request handler
|
|
14
|
+
* @returns { server, port } once the server is successfully listening
|
|
15
|
+
* @throws Error with code='EADDRINUSE_ALL' if ALL ports in range are in use
|
|
16
|
+
* @throws Original error if a non-EADDRINUSE error fires (EACCES, etc.)
|
|
17
|
+
*
|
|
18
|
+
* Callers MUST wrap this in try/catch to fire the appropriate auth-failure
|
|
19
|
+
* beacon BEFORE rejecting — otherwise the outer auth-cli fallback downgrades
|
|
20
|
+
* the failure to `unknown` and we lose port_range_exhausted telemetry.
|
|
21
|
+
*/
|
|
22
|
+
export declare function bindOAuthServer(handler: http.RequestListener): Promise<{
|
|
23
|
+
server: http.Server;
|
|
24
|
+
port: number;
|
|
25
|
+
}>;
|
|
2
26
|
/**
|
|
3
27
|
* Authentication service for OAuth flows
|
|
4
28
|
*/
|
|
@@ -51,11 +75,17 @@ export declare class AuthService {
|
|
|
51
75
|
*/
|
|
52
76
|
private generateState;
|
|
53
77
|
/**
|
|
54
|
-
* Build authorization URL
|
|
78
|
+
* Build authorization URL with dynamic redirect_uri (port-range fix).
|
|
55
79
|
*/
|
|
56
80
|
private buildAuthUrl;
|
|
57
81
|
/**
|
|
58
|
-
* Exchange authorization code for tokens
|
|
82
|
+
* Exchange authorization code for tokens.
|
|
83
|
+
*
|
|
84
|
+
* `redirectUri` MUST match the one passed to buildAuthUrl earlier — Cognito
|
|
85
|
+
* compares them at the token endpoint and rejects mismatches. This is the
|
|
86
|
+
* load-bearing change for the port-range fix to work end-to-end: if the
|
|
87
|
+
* authorize URL used port 8081 and the token POST uses 8080, Cognito
|
|
88
|
+
* returns redirect_uri_mismatch.
|
|
59
89
|
*/
|
|
60
90
|
private exchangeCodeForTokens;
|
|
61
91
|
/**
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Typed taxonomy of auth-flow failure reasons.
|
|
3
3
|
*
|
|
4
|
-
* Every value is a sanitized enum literal — never a raw
|
|
5
|
-
* never a truncated user input, never any byte from
|
|
6
|
-
* Adding a new failure mode means extending this
|
|
7
|
-
* then forces every emit site to either use a known
|
|
8
|
-
* a type error.
|
|
4
|
+
* Every value in THIS union is a sanitized enum literal — never a raw
|
|
5
|
+
* error message, never a truncated user input, never any byte from
|
|
6
|
+
* Cognito's response. Adding a new failure mode means extending this
|
|
7
|
+
* union; the compiler then forces every emit site to either use a known
|
|
8
|
+
* value or produce a type error.
|
|
9
|
+
*
|
|
10
|
+
* (Note: the `error_fragment` parameter on the auth_failed beacon DOES
|
|
11
|
+
* carry redacted error material — see `sanitizeAuthErrorFragment`. The
|
|
12
|
+
* `reason` taxonomy below remains the analytics-safe primary key.)
|
|
9
13
|
*
|
|
10
14
|
* Keep values snake_case to match GA4 custom-dimension conventions
|
|
11
15
|
* used elsewhere in the codebase (`step`, `source`, `reason`).
|
|
12
16
|
*/
|
|
13
|
-
export type AuthFailureReason = 'port_in_use' | 'server_listen_failed' | 'browser_open_failed' | 'login_timeout' | 'cognito_rejected' | 'state_mismatch' | 'no_authorization_code' | 'token_exchange_failed' | 'token_exchange_network_error' | 'keychain_write_failed' | 'user_aborted' | 'unknown';
|
|
17
|
+
export type AuthFailureReason = 'port_in_use' | 'port_range_exhausted' | 'server_listen_failed' | 'browser_open_failed' | 'login_timeout' | 'cognito_rejected' | 'state_mismatch' | 'no_authorization_code' | 'token_exchange_failed' | 'token_exchange_network_error' | 'keychain_write_failed' | 'user_aborted' | 'unknown';
|
|
14
18
|
/**
|
|
15
19
|
* Auth flow stage the failure occurred in. Useful for GA4 faceting;
|
|
16
20
|
* each reason has an implicit stage but keeping it as a distinct
|
|
@@ -29,6 +33,20 @@ export type AuthStage = 'server_start' | 'browser_open' | 'awaiting_callback' |
|
|
|
29
33
|
* address.
|
|
30
34
|
*/
|
|
31
35
|
export declare function fireAuthCompletedBeacon(userId: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Bytes 0-99 of the sanitized fragment (GA4 dim: error_fragment).
|
|
38
|
+
* See `sanitizeAuthErrorFragmentFull` for the redaction contract.
|
|
39
|
+
*/
|
|
40
|
+
export declare function sanitizeAuthErrorFragment(msg: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Bytes 100-199 of the sanitized fragment (GA4 dim: error_fragment_2).
|
|
43
|
+
* Returns empty string when the redacted message is ≤100 chars (the
|
|
44
|
+
* typical short-error case), which is what we want — no
|
|
45
|
+
* `error_fragment_2` param fires unless there's something past byte
|
|
46
|
+
* 100 worth carrying. Works around GA4 Measurement Protocol's 100-char
|
|
47
|
+
* per-param limit.
|
|
48
|
+
*/
|
|
49
|
+
export declare function sanitizeAuthErrorFragmentTail(msg: string): string;
|
|
32
50
|
/**
|
|
33
51
|
* Fire the `auth_failed` failure beacon with a sanitized `reason`
|
|
34
52
|
* literal. Optional `httpStatus` captures the numeric HTTP status
|
|
@@ -40,11 +58,48 @@ export declare function fireAuthCompletedBeacon(userId: string): Promise<void>;
|
|
|
40
58
|
* `reason` is constrained to the `AuthFailureReason` union — this
|
|
41
59
|
* is the ONLY input path; passing a raw error message is a compile
|
|
42
60
|
* error.
|
|
61
|
+
*
|
|
62
|
+
* Optional `errorFragment` is a diagnostic dimension reserved for
|
|
63
|
+
* `reason: 'unknown'`. The outer `auth-cli` catch passes the first
|
|
64
|
+
* portion of `error.message` here so the next analytics pass can
|
|
65
|
+
* see what's hiding in `unknown` and we can ship a typed reason in
|
|
66
|
+
* a follow-up. Sanitized inside via `sanitizeAuthErrorFragment` (head)
|
|
67
|
+
* + `sanitizeAuthErrorFragmentTail` (tail) — ANSI stripped, $HOME /
|
|
68
|
+
* USERPROFILE / `/Users/<name>/` / `/home/<name>/` / email substrings
|
|
69
|
+
* redacted (Windows backslashes normalized first so `C:\Users\Alice\…`
|
|
70
|
+
* matches the same path regex as POSIX form), control + non-ASCII
|
|
71
|
+
* bytes dropped, then split into two GA4 dimensions to work around the
|
|
72
|
+
* Measurement Protocol 100-char per-param limit:
|
|
73
|
+
* - `error_fragment` = bytes 0-99
|
|
74
|
+
* - `error_fragment_2` = bytes 100-199 (only set when input >100 chars)
|
|
75
|
+
* Reports concatenate both dims for display. Mirrors the install.sh
|
|
76
|
+
* `sanitize_fragment` / `sanitize_fragment_tail` shell helpers so
|
|
77
|
+
* fragments fired from either path follow the same redaction +
|
|
78
|
+
* slicing contract.
|
|
43
79
|
*/
|
|
44
80
|
export declare function fireAuthFailedBeacon(reason: AuthFailureReason, extra?: {
|
|
45
81
|
httpStatus?: number;
|
|
46
82
|
stage?: AuthStage;
|
|
83
|
+
errorFragment?: string;
|
|
47
84
|
}): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Coarse reason a machine fell back to file-based credential storage.
|
|
87
|
+
* - `no_keyring_service`: keytar's native addon LOADED but there's no OS
|
|
88
|
+
* keyring service to talk to (structurally-headless Linux — no D-Bus session).
|
|
89
|
+
* - `keytar_load_failed`: keytar's native addon failed to load AND the machine
|
|
90
|
+
* is structurally headless (libsecret absent on a no-keyring box).
|
|
91
|
+
*/
|
|
92
|
+
export type KeychainFallbackReason = 'no_keyring_service' | 'keytar_load_failed';
|
|
93
|
+
/**
|
|
94
|
+
* Fire the `keychain_file_fallback` beacon when keychain-backend auto-selects
|
|
95
|
+
* the file backend on a structurally-headless machine. Deliberately a DISTINCT
|
|
96
|
+
* event from `auth_failed` — this is a successful, working fallback, not a
|
|
97
|
+
* failure. Lets analytics see the headless cohort and confirm the headless fix
|
|
98
|
+
* is reaching the field (the old `keychain_write_failed` signal goes quiet for
|
|
99
|
+
* these users, so we need a positive beacon, not just an absence). No PII: only
|
|
100
|
+
* platform / source / the coarse reason literal.
|
|
101
|
+
*/
|
|
102
|
+
export declare function fireKeychainFileFallbackBeacon(reason: KeychainFallbackReason): Promise<void>;
|
|
48
103
|
/**
|
|
49
104
|
* Attach the reason + beaconed marker to an Error. Non-enumerable so
|
|
50
105
|
* the symbols don't serialize if the error object is ever JSON'd.
|
|
@@ -54,3 +109,59 @@ export declare function markErrorBeaconed(err: Error, reason: AuthFailureReason)
|
|
|
54
109
|
export declare function errorWasBeaconed(err: unknown): boolean;
|
|
55
110
|
/** Retrieve the tagged reason from a previously-marked error, if any. */
|
|
56
111
|
export declare function getErrorReason(err: unknown): AuthFailureReason | undefined;
|
|
112
|
+
export type DeviceCountBucket = '0' | '1' | '2-5' | '6+';
|
|
113
|
+
/**
|
|
114
|
+
* Bucket a raw device count into a coarse range to prevent device-count
|
|
115
|
+
* fingerprinting via GA4 client_id stickiness. The `'0'` bucket exists as
|
|
116
|
+
* a safe default for callers that may pass 0; no current emitter actually
|
|
117
|
+
* fires with count 0 in production paths.
|
|
118
|
+
*/
|
|
119
|
+
export declare function bucketDeviceCount(count: number): DeviceCountBucket;
|
|
120
|
+
/**
|
|
121
|
+
* SHA-256-truncate a sessionId for cross-beacon correlation without leaking
|
|
122
|
+
* the raw UUID. 8 hex chars = 32 bits ⇒ no practical reverse lookup absent
|
|
123
|
+
* a GA4 + DDB join.
|
|
124
|
+
*/
|
|
125
|
+
export declare function hashSessionId(sessionId: string): string;
|
|
126
|
+
/**
|
|
127
|
+
* Bug B per-device: fired inside `createSessionKey`'s per-device catch.
|
|
128
|
+
* `session_hash` is optional because keychain-manager intentionally does
|
|
129
|
+
* not know which session is being keyed — the per-session aggregate in
|
|
130
|
+
* `fireSessionEncryptionPartialSuccessBeacon` provides the correlation.
|
|
131
|
+
*/
|
|
132
|
+
export declare function fireSessionEncryptionDeviceSkippedBeacon(params: {
|
|
133
|
+
skipped_count_bucket: DeviceCountBucket;
|
|
134
|
+
session_hash?: string;
|
|
135
|
+
}): Promise<void>;
|
|
136
|
+
/**
|
|
137
|
+
* Bug B per-session: fired once per session creation when at least one
|
|
138
|
+
* device was skipped. Caller MUST gate on `skippedDeviceIds.length > 0`.
|
|
139
|
+
*/
|
|
140
|
+
export declare function fireSessionEncryptionPartialSuccessBeacon(params: {
|
|
141
|
+
session_hash: string;
|
|
142
|
+
encrypted_count_bucket: DeviceCountBucket;
|
|
143
|
+
skipped_count_bucket: DeviceCountBucket;
|
|
144
|
+
}): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Bug A2: fired when `rekeySessionForNewDevices` grants ≥1 device on resume.
|
|
147
|
+
* Caller MUST gate on `grantedCount > 0`.
|
|
148
|
+
*/
|
|
149
|
+
export declare function fireSessionEncryptionCatchUpGrantBeacon(params: {
|
|
150
|
+
session_hash: string;
|
|
151
|
+
granted_count_bucket: DeviceCountBucket;
|
|
152
|
+
}): Promise<void>;
|
|
153
|
+
/** Bug A1: fired when we enter the self-rekey path (our deviceId missing). */
|
|
154
|
+
export declare function fireSessionEncryptionSelfRekeyRequestBeacon(params: {
|
|
155
|
+
session_hash: string;
|
|
156
|
+
other_device_count_bucket: DeviceCountBucket;
|
|
157
|
+
}): Promise<void>;
|
|
158
|
+
/** Bug A1: fired when polling resolves with our entry + decrypt succeeds. */
|
|
159
|
+
export declare function fireSessionEncryptionSelfRekeySuccessBeacon(params: {
|
|
160
|
+
session_hash: string;
|
|
161
|
+
attempt_count: number;
|
|
162
|
+
}): Promise<void>;
|
|
163
|
+
/** Bug A1: fired when polling exhausts maxAttempts without our entry. */
|
|
164
|
+
export declare function fireSessionEncryptionSelfRekeyTimeoutBeacon(params: {
|
|
165
|
+
session_hash: string;
|
|
166
|
+
attempt_count: number;
|
|
167
|
+
}): Promise<void>;
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { AuthService, authService } from './auth-service';
|
|
2
|
+
export { bindOAuthServer, PRIMARY_PORT, PORT_RANGE_SIZE } from './auth-service';
|
|
2
3
|
export { runAuthCli } from './auth-cli';
|
|
3
4
|
export { fireAuthCompletedBeacon, fireAuthFailedBeacon, markErrorBeaconed, errorWasBeaconed, getErrorReason, type AuthFailureReason, type AuthStage, } from './auth-telemetry';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DetectedAgent } from './resolve-agent';
|
|
2
|
+
export interface PickAgentArgs {
|
|
3
|
+
healthy: DetectedAgent[];
|
|
4
|
+
defaultIndex: number;
|
|
5
|
+
/** Test seam — override stdin/stdout. */
|
|
6
|
+
input?: NodeJS.ReadableStream;
|
|
7
|
+
output?: NodeJS.WritableStream;
|
|
8
|
+
}
|
|
9
|
+
export declare function pickAgent(args: PickAgentArgs): Promise<DetectedAgent>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { DetectableAgent } from '../orchestration/detect-agents';
|
|
2
|
+
import type { ShellEventEmit } from '../orchestration-shell/emit-shell-event';
|
|
3
|
+
import type { Session } from '../types';
|
|
4
|
+
export declare class NoAgentInstalledError extends Error {
|
|
5
|
+
constructor(message: string);
|
|
6
|
+
}
|
|
7
|
+
export interface CompanionArgs {
|
|
8
|
+
/** Optional `--agent <kind>` CLI override. */
|
|
9
|
+
agent?: DetectableAgent;
|
|
10
|
+
/** Args to pass through to the agent wrapper. */
|
|
11
|
+
passthrough: string[];
|
|
12
|
+
/** When set, clears the persisted preference before resolving. */
|
|
13
|
+
forgetAgent?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Session context for §3 emitShellEvent fan-out. When provided
|
|
16
|
+
* together with `emitter`, MODE_SELECTED is emitted before the exec
|
|
17
|
+
* handoff. When either is omitted, the emit is skipped — Companion
|
|
18
|
+
* Mode is functional without it because the cohort flag gates every
|
|
19
|
+
* emit anyway (CP-1.a default OFF). Per Stage 1 r1 HIGH-3.
|
|
20
|
+
*/
|
|
21
|
+
session?: Session;
|
|
22
|
+
/**
|
|
23
|
+
* Bound emitter (typically `createShellEventEmitter(appsyncClient)`).
|
|
24
|
+
* Required for the MODE_SELECTED emit when `session` is also set.
|
|
25
|
+
*/
|
|
26
|
+
emitter?: (args: ShellEventEmit) => Promise<void>;
|
|
27
|
+
/** Test seam — override the `execFileSync` handoff. */
|
|
28
|
+
execFile?: (binPath: string, args: string[], options: {
|
|
29
|
+
stdio: 'inherit';
|
|
30
|
+
}) => void;
|
|
31
|
+
/** Test seam — override `detectInstalledAgents`. */
|
|
32
|
+
detect?: () => DetectableAgent[];
|
|
33
|
+
/** Test seam — override bin-path resolver (real impl uses `command -v`). */
|
|
34
|
+
resolveBinPath?: (kind: DetectableAgent) => string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Test seam — override the `<wrapper> --version` 2s health-probe
|
|
37
|
+
* (§4 line 280). Real impl spawns the wrapper with a SIGKILL on
|
|
38
|
+
* timeout. Per Stage 2 r1 Codex MEDIUM-2.
|
|
39
|
+
*/
|
|
40
|
+
versionProbe?: (binPath: string) => Promise<boolean>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* §4 LOCK lines 232-273. Detect → resolve → persist → exec.
|
|
44
|
+
*
|
|
45
|
+
* On a TTY with multiple agents, this calls `pickAgent` for the
|
|
46
|
+
* interactive readline picker. The function does NOT mount the Ink
|
|
47
|
+
* TUI — Companion Mode does not need it (the picker hands terminal
|
|
48
|
+
* control directly to the wrapper).
|
|
49
|
+
*
|
|
50
|
+
* NOTE: the function returns when the test seam `execFile` is
|
|
51
|
+
* provided; in production the `execFileSync` call replaces the process
|
|
52
|
+
* (`stdio: 'inherit'`) so `process.exit(0)` is unreachable but kept
|
|
53
|
+
* as a defensive fallback (§4 line 273).
|
|
54
|
+
*/
|
|
55
|
+
export declare function runCompanionMode(args: CompanionArgs): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare function companionPreferenceFilePath(): string;
|
|
2
|
+
export interface CompanionPreference {
|
|
3
|
+
lastAgent: 'CLAUDE' | 'GEMINI' | 'CODEX' | 'ANTIGRAVITY';
|
|
4
|
+
lastUsedAt: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* §4 lines 304-316 LOCK. Reads + validates the preference file.
|
|
8
|
+
* Returns `null` on every failure mode named in the design:
|
|
9
|
+
* - file missing
|
|
10
|
+
* - loose permissions (any group/world bits set)
|
|
11
|
+
* - malformed JSON
|
|
12
|
+
* - schema mismatch
|
|
13
|
+
*/
|
|
14
|
+
export declare function readCompanionPreference(): Promise<CompanionPreference | null>;
|
|
15
|
+
/**
|
|
16
|
+
* Writes the preference file with mode 0600. Creates parent dir if
|
|
17
|
+
* missing. Self-heals loose perms (writes 0o600 explicitly on every
|
|
18
|
+
* write).
|
|
19
|
+
*/
|
|
20
|
+
export declare function persistCompanionPreference(pref: CompanionPreference): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Clears the preference file (used by `--forget-agent` flag per §4).
|
|
23
|
+
*/
|
|
24
|
+
export declare function clearCompanionPreference(): Promise<void>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DetectableAgent } from '../orchestration/detect-agents';
|
|
2
|
+
export interface DetectedAgent {
|
|
3
|
+
kind: DetectableAgent;
|
|
4
|
+
binPath: string;
|
|
5
|
+
healthy: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ResolveAgentArgs {
|
|
8
|
+
/** Healthy agents detected on PATH. */
|
|
9
|
+
healthy: DetectedAgent[];
|
|
10
|
+
/** `--agent` CLI flag override (if any). */
|
|
11
|
+
flag?: DetectableAgent;
|
|
12
|
+
/** Persisted preference from `readCompanionPreference()` (if any). */
|
|
13
|
+
preferred?: DetectableAgent;
|
|
14
|
+
}
|
|
15
|
+
export interface ResolveAgentResult {
|
|
16
|
+
/** When a single resolved agent exists. */
|
|
17
|
+
agent?: DetectedAgent;
|
|
18
|
+
/** When multiple healthy agents exist and the picker should run. */
|
|
19
|
+
needsPicker?: {
|
|
20
|
+
healthy: DetectedAgent[];
|
|
21
|
+
defaultIndex: number;
|
|
22
|
+
};
|
|
23
|
+
/** When the flag asked for an agent that's not healthy. */
|
|
24
|
+
flagMissing?: {
|
|
25
|
+
requested: DetectableAgent;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* §4 resolution order LOCK:
|
|
30
|
+
* 1. flag > preference > picker > single-agent fast-path
|
|
31
|
+
*
|
|
32
|
+
* - If `flag` is set and a matching healthy agent exists → return it.
|
|
33
|
+
* - If `flag` is set and no matching healthy agent → `flagMissing`.
|
|
34
|
+
* - Single-agent fast-path: exactly 1 healthy agent → return it
|
|
35
|
+
* (regardless of preference).
|
|
36
|
+
* - Multiple healthy + `preferred` set + matches → picker with that
|
|
37
|
+
* row pre-selected (caller may decide to auto-accept).
|
|
38
|
+
* - Multiple healthy + no preference → picker with first row
|
|
39
|
+
* pre-selected.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveAgent(args: ResolveAgentArgs): ResolveAgentResult;
|
package/dist/config/config.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Environment type
|
|
3
|
+
*
|
|
4
|
+
* 'experiment' is a separate AWS environment for CodeVibe 2.0 testing —
|
|
5
|
+
* isolated DDB/Cognito/AppSync/Lambda stacks in us-east-1, manual-deploy
|
|
6
|
+
* only (NOT in the codevibe-backend pipeline). Plugins/mobile clients
|
|
7
|
+
* opt in by setting `ENVIRONMENT=experiment`. See
|
|
8
|
+
* `codevibe-backend/docs/2.0/PHASE-INFRA-EXPERIMENT-ENV-DESIGN.md`
|
|
9
|
+
* LOCK #IE-5.
|
|
3
10
|
*/
|
|
4
|
-
export type Environment = 'development' | 'production';
|
|
11
|
+
export type Environment = 'development' | 'production' | 'experiment';
|
|
5
12
|
/**
|
|
6
13
|
* Configuration interface
|
|
7
14
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AuthorityScope } from '../local-executor/authority';
|
|
2
|
+
import type { RepoState } from './types';
|
|
3
|
+
export interface KnownRepo {
|
|
4
|
+
/** repo basename (e.g., `codevibe-backend`). */
|
|
5
|
+
repo: string;
|
|
6
|
+
/** absolute filesystem path of repo root. */
|
|
7
|
+
path: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GitExecOptions {
|
|
10
|
+
/** `cwd` for the git invocation. */
|
|
11
|
+
cwd: string;
|
|
12
|
+
/** Wall-clock timeout in milliseconds. */
|
|
13
|
+
timeoutMs?: number;
|
|
14
|
+
}
|
|
15
|
+
export type GitExecFn = (args: string[], options: GitExecOptions) => Promise<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Default `git` executor. Honors `cwd` + timeout, scrubs the env.
|
|
18
|
+
* Returns stdout as utf8. Throws on non-zero exit / timeout / spawn
|
|
19
|
+
* failure — caller catches and emits the `"unknown"` sentinel row.
|
|
20
|
+
*/
|
|
21
|
+
export declare const defaultGitExec: GitExecFn;
|
|
22
|
+
export interface DirtyStateCollector {
|
|
23
|
+
collect(): Promise<RepoState[]>;
|
|
24
|
+
}
|
|
25
|
+
export interface DirtyStateCollectorOptions {
|
|
26
|
+
gitExec?: GitExecFn;
|
|
27
|
+
timeoutMs?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* §4.7 LOCK #C6-A-7 — enumerate `knownRepos`, clamp to authority,
|
|
31
|
+
* collect git metadata for each in-scope repo. Sentinel-friendly:
|
|
32
|
+
* missing git, non-git dirs, and timeouts each produce a row with
|
|
33
|
+
* `"unknown"` strings instead of throwing.
|
|
34
|
+
*/
|
|
35
|
+
export declare function collectRepoStates(authority: AuthorityScope, knownRepos: KnownRepo[], options?: DirtyStateCollectorOptions): Promise<RepoState[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Factory that produces a `DirtyStateCollector` bound to a known-repo
|
|
38
|
+
* snapshot + authority scope. Used by `createContinuationPacketWriter`
|
|
39
|
+
* to inject the collector as a dependency (test seam).
|
|
40
|
+
*/
|
|
41
|
+
export declare function createDirtyStateCollector(deps: {
|
|
42
|
+
authority: AuthorityScope;
|
|
43
|
+
knownRepos: KnownRepo[];
|
|
44
|
+
gitExec?: GitExecFn;
|
|
45
|
+
timeoutMs?: number;
|
|
46
|
+
}): DirtyStateCollector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { AgentKind, HandoffReason, GateState, RepoState, ContinuationPacket, PacketWriteInput, PacketWriteResult, PacketListEntry, ContinuationPacketReadResult, } from './types';
|
|
2
|
+
export { PacketFidelityError, PacketIoError, PacketHashMismatch, PacketAuditEmitError, PacketNotFound, PacketUnverified, FrontmatterMalformed, SchemaInvalid, PacketPermissionsLoose, } from './types';
|
|
3
|
+
export { createContinuationPacketWriter, buildContinuationPacket, computePacketHash, renderPacketMarkdown, getPacketFilePath, getTaskDirectoryPath, } from './packet-writer';
|
|
4
|
+
export type { ContinuationPacketWriter, ContinuationPacketWriterDeps, } from './packet-writer';
|
|
5
|
+
export { createContinuationPacketReader, splitFrontmatter, validatePacketSchema, } from './packet-reader';
|
|
6
|
+
export type { ContinuationPacketReader, ContinuationPacketReaderDeps, } from './packet-reader';
|
|
7
|
+
export { collectRepoStates, createDirtyStateCollector, defaultGitExec, } from './dirty-state-collector';
|
|
8
|
+
export type { DirtyStateCollector, DirtyStateCollectorOptions, GitExecFn, GitExecOptions, KnownRepo, } from './dirty-state-collector';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AppSyncClient } from '../appsync/appsync-client';
|
|
2
|
+
import type { ContinuationPacket, PacketListEntry, RepoState } from './types';
|
|
3
|
+
export interface ContinuationPacketReaderDeps {
|
|
4
|
+
appsync: AppSyncClient;
|
|
5
|
+
/** Test seam — override the home directory. Defaults to `os.homedir()`. */
|
|
6
|
+
homeDir?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ContinuationPacketReader {
|
|
9
|
+
read(taskId: string, expectedHash?: string): Promise<ContinuationPacket>;
|
|
10
|
+
list(): Promise<PacketListEntry[]>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Split a markdown body into YAML frontmatter + prose body. Returns
|
|
14
|
+
* `null` for the frontmatter when the body is missing the leading
|
|
15
|
+
* `---` fence.
|
|
16
|
+
*/
|
|
17
|
+
export declare function splitFrontmatter(body: string): {
|
|
18
|
+
yaml: string | null;
|
|
19
|
+
prose: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Validate that a parsed YAML object matches the 17-field
|
|
23
|
+
* `ContinuationPacket` schema per LOCK #C6-A-1. Returns the typed
|
|
24
|
+
* packet on success; throws `SchemaInvalid` with a list of issues
|
|
25
|
+
* otherwise.
|
|
26
|
+
*/
|
|
27
|
+
export declare function validatePacketSchema(parsed: unknown): ContinuationPacket;
|
|
28
|
+
/**
|
|
29
|
+
* Factory for the CP-6 packet reader.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createContinuationPacketReader(deps: ContinuationPacketReaderDeps): ContinuationPacketReader;
|
|
32
|
+
export { getPacketFilePath, getTaskDirectoryPath } from './packet-writer';
|
|
33
|
+
export type { RepoState };
|