@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,42 @@
|
|
|
1
|
+
/** Key names that are NOT printable text — `input` is blanked for these. */
|
|
2
|
+
export declare const nonAlphanumericKeys: string[];
|
|
3
|
+
export interface ParsedKeypress {
|
|
4
|
+
name: string;
|
|
5
|
+
ctrl: boolean;
|
|
6
|
+
meta: boolean;
|
|
7
|
+
shift: boolean;
|
|
8
|
+
option: boolean;
|
|
9
|
+
sequence: string;
|
|
10
|
+
raw: string | undefined;
|
|
11
|
+
code?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Verbatim port of Ink 5.2.1 `parseKeypress` (string input — Ink sets utf8). */
|
|
14
|
+
export declare const parseKeypress: (s?: string | undefined) => ParsedKeypress;
|
|
15
|
+
/** The `key` object shape Ink's `useInput` hands to its handler. */
|
|
16
|
+
export interface InkKey {
|
|
17
|
+
upArrow: boolean;
|
|
18
|
+
downArrow: boolean;
|
|
19
|
+
leftArrow: boolean;
|
|
20
|
+
rightArrow: boolean;
|
|
21
|
+
pageDown: boolean;
|
|
22
|
+
pageUp: boolean;
|
|
23
|
+
return: boolean;
|
|
24
|
+
escape: boolean;
|
|
25
|
+
ctrl: boolean;
|
|
26
|
+
shift: boolean;
|
|
27
|
+
tab: boolean;
|
|
28
|
+
backspace: boolean;
|
|
29
|
+
delete: boolean;
|
|
30
|
+
meta: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Mirror of `ink/build/hooks/use-input.js` (5.2.1) lines 46-80: derive the
|
|
34
|
+
* `(input, key)` pair `useInput` would deliver for a raw data chunk. The Ctrl+C
|
|
35
|
+
* gate + `reconciler.batchedUpdates` dispatch from use-input.js are intentionally
|
|
36
|
+
* NOT here — the caller owns dispatch (Ctrl+C is already handled by Ink's
|
|
37
|
+
* `App.handleInput` before the chunk is emitted).
|
|
38
|
+
*/
|
|
39
|
+
export declare function toInkKey(data: string): {
|
|
40
|
+
input: string;
|
|
41
|
+
key: InkKey;
|
|
42
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ExtractResult {
|
|
2
|
+
title: string;
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
/** Test seam: drop the cached parse5 load so a re-stubbed ESM loader takes effect. */
|
|
6
|
+
export declare function __resetExtractCacheForTest(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Extract a page title + visible body text from HTML via parse5. Async (parse5 is ESM-only) and
|
|
9
|
+
* NEVER throws — returns `{ title:'', text:'' }` on the size cap / load / parse failure.
|
|
10
|
+
*/
|
|
11
|
+
export declare function htmlToText(html: string): Promise<ExtractResult>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type FetchFailureKind = 'blocked' | 'too_large' | 'timeout' | 'network' | 'bad_content' | 'too_many_redirects' | 'http_error';
|
|
2
|
+
export declare class FetchError extends Error {
|
|
3
|
+
readonly kind: FetchFailureKind;
|
|
4
|
+
constructor(kind: FetchFailureKind, message: string);
|
|
5
|
+
}
|
|
6
|
+
export interface FetchResult {
|
|
7
|
+
finalUrl: string;
|
|
8
|
+
contentType: string;
|
|
9
|
+
body: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Guarded GET with manual redirect following (full guard re-run per hop). Returns
|
|
13
|
+
* decoded text or throws FetchError. `signal` lets the caller (Esc) abort.
|
|
14
|
+
*/
|
|
15
|
+
export declare function guardedFetch(rawUrl: string, signal?: AbortSignal): Promise<FetchResult>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonicalize + classify an address string. Accepts only a real IPv4/IPv6
|
|
3
|
+
* literal (the fetch guard passes addresses from `dns.lookup`, which are
|
|
4
|
+
* already canonical). Returns false for anything not provably public unicast
|
|
5
|
+
* (fail closed). Decimal/hex/octal "IP" host forms are NOT valid `net.isIP`
|
|
6
|
+
* literals, so they never reach here as a resolved address — and the host-level
|
|
7
|
+
* guard rejects non-IP, non-DNS hosts separately.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isGlobalUnicastIp(addr: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Reject hostnames that are obviously local even before DNS, and normalize a
|
|
12
|
+
* literal-IP host given in a non-canonical encoding (decimal `2130706433`, hex
|
|
13
|
+
* `0x7f000001`, dotted-hex/octal). Returns:
|
|
14
|
+
* - { kind:'ip', addr } when the host is a literal IP (any encoding) → caller
|
|
15
|
+
* validates `isGlobalUnicastIp(addr)` directly (no DNS).
|
|
16
|
+
* - { kind:'name' } when it's a DNS name to resolve.
|
|
17
|
+
* - { kind:'reject' } for `localhost` / `*.local` / unparseable.
|
|
18
|
+
*/
|
|
19
|
+
export declare function classifyHost(rawHost: string): {
|
|
20
|
+
kind: 'ip';
|
|
21
|
+
addr: string;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'name';
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'reject';
|
|
26
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip terminal control / escape sequences from untrusted text, preserving
|
|
3
|
+
* only printable characters + deliberate whitespace (`\n`, `\t`, space, and CR
|
|
4
|
+
* which is normalized to `\n` by callers). Linear-time, single pass.
|
|
5
|
+
*
|
|
6
|
+
* Removed:
|
|
7
|
+
* - CSI `ESC [ … final` (cursor/screen/SGR manipulation)
|
|
8
|
+
* - OSC `ESC ] … (BEL | ESC \)` (e.g. OSC-52 clipboard, window title)
|
|
9
|
+
* - DCS/SOS/PM/APC `ESC (P|X|^|_) … ST`
|
|
10
|
+
* - two-char escapes `ESC <byte>` (incl. a lone trailing ESC)
|
|
11
|
+
* - C0 controls 0x00–0x1f EXCEPT \t (0x09) and \n (0x0a) (CR 0x0d dropped — callers normalize EOL first)
|
|
12
|
+
* - DEL 0x7f and C1 controls 0x80–0x9f (incl. 8-bit CSI 0x9b / OSC 0x9d)
|
|
13
|
+
*/
|
|
14
|
+
export declare function sanitizeForTerminal(input: string): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SearchResult {
|
|
2
|
+
url: string;
|
|
3
|
+
title: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Parse DDG HTML result anchors. DDG wraps targets as
|
|
7
|
+
* `//duckduckgo.com/l/?uddg=<encoded-target>&...`; we decode `uddg` to the real
|
|
8
|
+
* URL. Linear scan over anchor tags; tolerant of markup drift. Returns ≤limit
|
|
9
|
+
* http(s) results. NEVER throws.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseDdgResults(html: string, limit?: number): SearchResult[];
|
|
12
|
+
/**
|
|
13
|
+
* Run a keyless web search. Returns ≤limit results, or [] on any failure
|
|
14
|
+
* (network/parse) — the caller decides the advisory. `signal` lets Esc abort.
|
|
15
|
+
*/
|
|
16
|
+
export declare function webSearch(query: string, signal?: AbortSignal, limit?: number): Promise<SearchResult[]>;
|
|
@@ -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,16 @@
|
|
|
1
|
+
export type { PlannerInput, PlannerDecision, PlannerProbeResult, SessionContext, BudgetHint, Clarification, CachedClassification, ClassificationKind, Tier, PlannerHealthState, PlannerHealthTransition, } from './types';
|
|
2
|
+
import type { PlannerInput, PlannerDecision, PlannerProbeResult } from './types';
|
|
3
|
+
export interface PlannerAdapter {
|
|
4
|
+
classify(input: PlannerInput): Promise<PlannerDecision>;
|
|
5
|
+
probe(): Promise<PlannerProbeResult>;
|
|
6
|
+
/**
|
|
7
|
+
* CP-1.b IMPL r2 H-3 — Bind the active session for subsequent
|
|
8
|
+
* `probe()` calls. Stage 2 r1 added this to `BackendPlannerClient`
|
|
9
|
+
* but missed declaring it on the interface, so callers — notably
|
|
10
|
+
* `runOrchestrationShell` — never invoked it and `probe()` threw
|
|
11
|
+
* "no active session" unconditionally in production.
|
|
12
|
+
*
|
|
13
|
+
* Pass `null` on session teardown to clear the binding.
|
|
14
|
+
*/
|
|
15
|
+
setActiveSession(sessionId: string | null): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CachedClassification } from './types';
|
|
2
|
+
export declare class PlannerCacheLayer {
|
|
3
|
+
private workflowCache;
|
|
4
|
+
private signatureCache;
|
|
5
|
+
private hydrated;
|
|
6
|
+
private mutex;
|
|
7
|
+
private cacheRoot;
|
|
8
|
+
constructor(cacheRoot?: string);
|
|
9
|
+
getWorkflowClassification(userId: string, prompt: string): Promise<CachedClassification | null>;
|
|
10
|
+
setWorkflowClassification(userId: string, prompt: string, c: CachedClassification): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* CP-1.b Stage 2 r2 M-2 — Explicit lazy-persist flush for callers
|
|
13
|
+
* that need to durably commit pending in-memory inserts (e.g.
|
|
14
|
+
* orchestration-shell on session end). LOCK #18 permits this
|
|
15
|
+
* trigger.
|
|
16
|
+
*/
|
|
17
|
+
flush(): Promise<void>;
|
|
18
|
+
getSignatureClassification(userId: string, sigHash: string): CachedClassification | null;
|
|
19
|
+
setSignatureClassification(userId: string, sigHash: string, c: CachedClassification): void;
|
|
20
|
+
flushForTier(userId: string): Promise<void>;
|
|
21
|
+
flushAll(): Promise<void>;
|
|
22
|
+
purgeOnUserSwitch(newUserId: string): Promise<void>;
|
|
23
|
+
private hydrateWorkflowIfNeeded;
|
|
24
|
+
private rotateCorrupt;
|
|
25
|
+
private persistWorkflow;
|
|
26
|
+
private cacheDir;
|
|
27
|
+
private userIdPrefix;
|
|
28
|
+
private workflowFilePath;
|
|
29
|
+
private canonicalize;
|
|
30
|
+
private assertNoActionJson;
|
|
31
|
+
private evictLru;
|
|
32
|
+
private ensureCacheRoot;
|
|
33
|
+
private ensureDir;
|
|
34
|
+
private rmRecursiveSafe;
|
|
35
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { PlannerInput, PlannerDecision, PlannerProbeResult, Tier } from './types';
|
|
2
|
+
import type { PlannerAdapter } from './adapter';
|
|
3
|
+
import type { PlannerCacheLayer } from './cache';
|
|
4
|
+
import type { PlannerHealthMachine } from './health-state';
|
|
5
|
+
/**
|
|
6
|
+
* AppSync transport interface. Minimal shape so unit tests can inject
|
|
7
|
+
* a stub without mounting the full @quantiya/codevibe-core AppSyncClient.
|
|
8
|
+
*/
|
|
9
|
+
export interface PlannerAppSyncTransport {
|
|
10
|
+
classifyPlannerPrompt(input: {
|
|
11
|
+
sessionId: string;
|
|
12
|
+
prompt: string;
|
|
13
|
+
clarifications: string;
|
|
14
|
+
sessionContext: string;
|
|
15
|
+
budgetHint: string;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
decision: string;
|
|
18
|
+
cacheHit: boolean;
|
|
19
|
+
cacheKind: string | null;
|
|
20
|
+
serverLatencyMs: number;
|
|
21
|
+
providerUsed: string;
|
|
22
|
+
}>;
|
|
23
|
+
pingPlanner(input: {
|
|
24
|
+
sessionId: string;
|
|
25
|
+
}): Promise<{
|
|
26
|
+
ok: boolean;
|
|
27
|
+
ms: number;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Crypto bridge — `encryptString` + `encryptJson` + `decryptJson`
|
|
32
|
+
* variants the adapter needs. Mirrors the existing
|
|
33
|
+
* codevibe-core CryptoService surface; injectable for tests.
|
|
34
|
+
*/
|
|
35
|
+
export interface PlannerCryptoBridge {
|
|
36
|
+
/** Encrypt a UTF-8 string to base64 AES-GCM ciphertext. */
|
|
37
|
+
encryptString(plaintext: string, sessionKeyB64: string): string;
|
|
38
|
+
/** Decrypt base64 AES-GCM → UTF-8 string. */
|
|
39
|
+
decryptString(ciphertextB64: string, sessionKeyB64: string): string;
|
|
40
|
+
/** Encrypt JSON-serializable value → base64 ciphertext. */
|
|
41
|
+
encryptJson(obj: unknown, sessionKeyB64: string): string;
|
|
42
|
+
}
|
|
43
|
+
export interface SessionKeyResolver {
|
|
44
|
+
getSessionKey(sessionId: string): Promise<string | null>;
|
|
45
|
+
}
|
|
46
|
+
export interface ShellEventEmit {
|
|
47
|
+
sessionId: string;
|
|
48
|
+
type: 'PLANNER_DECISION' | 'PLANNER_CACHE_HIT' | 'PLANNER_DEGRADED' | 'PLANNER_OUTAGE' | 'PLANNER_RECOVERED';
|
|
49
|
+
metadata?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
export type EmitShellEventFn = (args: ShellEventEmit) => Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* CP-1.b Stage 2 r2 M-3 — Typed errors that must NOT degrade health.
|
|
54
|
+
*
|
|
55
|
+
* The Lambda surfaces tier-gate / budget rejections as named-error
|
|
56
|
+
* GraphQL responses. Stage 2 r1's catch block recorded EVERY failure
|
|
57
|
+
* as a provider-health failure via `health.recordCall(elapsed, false)`,
|
|
58
|
+
* incorrectly driving the health machine toward Degraded/Outage on
|
|
59
|
+
* what are user-tier policy events (not provider outages). The
|
|
60
|
+
* client now classifies errors and ONLY records provider failures
|
|
61
|
+
* against health; tier/budget rejections emit NOTIFICATION events
|
|
62
|
+
* and throw without touching the machine.
|
|
63
|
+
*/
|
|
64
|
+
export declare class PlannerBudgetExceededError extends Error {
|
|
65
|
+
constructor(msg: string);
|
|
66
|
+
}
|
|
67
|
+
export declare class PlannerTierGateRejectedError extends Error {
|
|
68
|
+
constructor(msg: string);
|
|
69
|
+
}
|
|
70
|
+
export declare class BackendPlannerClient implements PlannerAdapter {
|
|
71
|
+
private transport;
|
|
72
|
+
private cache;
|
|
73
|
+
private health;
|
|
74
|
+
private crypto;
|
|
75
|
+
private sessionKeyResolver;
|
|
76
|
+
private emitShellEvent;
|
|
77
|
+
/** Shell-side tier-change detection (LOCK #30). */
|
|
78
|
+
lastClassifyTier: Tier | null;
|
|
79
|
+
/**
|
|
80
|
+
* CP-1.b Stage 2 r2 M-4 — Active session for probe(). The probe
|
|
81
|
+
* mutation requires a sessionId for ownership check; carrying the
|
|
82
|
+
* session in client state lets callers use the canonical
|
|
83
|
+
* `PlannerAdapter.probe()` contract. Set via `setActiveSession()`
|
|
84
|
+
* by orchestration-shell on session start.
|
|
85
|
+
*/
|
|
86
|
+
private activeSessionId;
|
|
87
|
+
constructor(transport: PlannerAppSyncTransport, cache: PlannerCacheLayer, health: PlannerHealthMachine, crypto: PlannerCryptoBridge, sessionKeyResolver: SessionKeyResolver, emitShellEvent: EmitShellEventFn);
|
|
88
|
+
/**
|
|
89
|
+
* CP-1.b Stage 2 r2 M-4 — Set the active session ID used by
|
|
90
|
+
* `probe()`. Called by the orchestration-shell on session start
|
|
91
|
+
* (and cleared to `null` on session end).
|
|
92
|
+
*/
|
|
93
|
+
setActiveSession(sessionId: string | null): void;
|
|
94
|
+
classify(input: PlannerInput): Promise<PlannerDecision>;
|
|
95
|
+
/**
|
|
96
|
+
* CP-1.b Stage 2 r2 M-4 — Honor the `PlannerAdapter.probe()`
|
|
97
|
+
* contract by reading the session from client state (set via
|
|
98
|
+
* `setActiveSession()`). Stage 2 r1 threw unconditionally and
|
|
99
|
+
* required callers to use the now-removed `probeWithSession()`
|
|
100
|
+
* method, which violated the adapter interface.
|
|
101
|
+
*/
|
|
102
|
+
probe(): Promise<PlannerProbeResult>;
|
|
103
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PlannerHealthState, PlannerHealthTransition } from './types';
|
|
2
|
+
export type { PlannerHealthState, PlannerHealthTransition };
|
|
3
|
+
export declare class PlannerHealthMachine {
|
|
4
|
+
private emitFn;
|
|
5
|
+
state: PlannerHealthState;
|
|
6
|
+
consecutiveFailures: number;
|
|
7
|
+
consecutiveSuccesses: number;
|
|
8
|
+
recentLatenciesMs: number[];
|
|
9
|
+
private readonly URGENT_FAILURE_FOR_DEGRADE;
|
|
10
|
+
private readonly P95_DEGRADE_THRESHOLD_MS;
|
|
11
|
+
private readonly P95_RECOVER_THRESHOLD_MS;
|
|
12
|
+
private readonly DEGRADED_TO_OUTAGE_FAILURES;
|
|
13
|
+
private readonly RECOVER_SUCCESSES_NEEDED;
|
|
14
|
+
private readonly RING_BUFFER_SIZE;
|
|
15
|
+
private readonly DEGRADED_PROBE_INTERVAL_MS;
|
|
16
|
+
private readonly OUTAGE_PROBE_INTERVAL_MS;
|
|
17
|
+
private lastProbeAt;
|
|
18
|
+
constructor(emitFn: (transition: PlannerHealthTransition) => void);
|
|
19
|
+
recordCall(latencyMs: number, success: boolean): PlannerHealthState;
|
|
20
|
+
shouldProbe(): boolean;
|
|
21
|
+
markProbeFired(): void;
|
|
22
|
+
private deriveNextState;
|
|
23
|
+
private p95Of;
|
|
24
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './adapter';
|
|
3
|
+
export { PlannerCacheLayer } from './cache';
|
|
4
|
+
export { PlannerHealthMachine } from './health-state';
|
|
5
|
+
export { BackendPlannerClient, PlannerBudgetExceededError, PlannerTierGateRejectedError, type PlannerAppSyncTransport, type PlannerCryptoBridge, type SessionKeyResolver, type ShellEventEmit, type EmitShellEventFn, } from './client';
|
|
6
|
+
export { LocalGemmaPlannerAdapter, parseLocalGemmaPlannerDecision, renderLocalGemmaPlannerPrompt, type LocalGemmaPlannerRunner, } from './local-gemma';
|
|
7
|
+
export { parseLocalGemmaAdvisorySummary, renderLocalGemmaFamiliarizePrompt, type LocalGemmaAdvisoryRunner, } from './local-advisory';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { StructuralSummary } from '../structural-summary/types';
|
|
2
|
+
export interface LocalGemmaAdvisoryRunner {
|
|
3
|
+
generateAdvisory(promptText: string, options?: LocalGemmaAdvisoryOptions): Promise<string>;
|
|
4
|
+
runtimeLabel: string;
|
|
5
|
+
}
|
|
6
|
+
export type LocalGemmaAdvisoryResponseFormat = 'json' | 'text';
|
|
7
|
+
export interface LocalGemmaAdvisoryOptions {
|
|
8
|
+
responseFormat?: LocalGemmaAdvisoryResponseFormat;
|
|
9
|
+
numPredict?: number;
|
|
10
|
+
/**
|
|
11
|
+
* RAW base64 images (NO `data:` prefix) for the MULTIMODAL local answerer
|
|
12
|
+
* (IMAGE-ATTACHMENT-DESIGN.md §6). Set ONLY by the shell's `routeAdvisory` /
|
|
13
|
+
* image-brainstorm with `responseFormat:'text'`. The Ollama runtime forwards
|
|
14
|
+
* these to `/api/generate images[]`; the subprocess `LocalGemmaProcessRunner`
|
|
15
|
+
* has no image channel and IGNORES them (documented no-op, §6 Role B). NEVER set
|
|
16
|
+
* on the classifier (forced-JSON) or on `browse`/`familiarize`.
|
|
17
|
+
*/
|
|
18
|
+
images?: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function redactAbsoluteLocalPaths(text: string): string;
|
|
21
|
+
export declare function renderLocalGemmaFamiliarizePrompt(args: {
|
|
22
|
+
userPrompt: string;
|
|
23
|
+
summary: StructuralSummary;
|
|
24
|
+
}): string;
|
|
25
|
+
/**
|
|
26
|
+
* WEB-BROWSING (docs/WEB-BROWSING-DESIGN.md): build the advisory prompt for a
|
|
27
|
+
* fetched web page. The model ANSWERS THE USER'S QUESTION grounded in the fetched
|
|
28
|
+
* content. `content`/`title`/`url` are ALREADY terminal-sanitized by the caller;
|
|
29
|
+
* here we additionally treat them as untrusted DATA in the prompt.
|
|
30
|
+
*
|
|
31
|
+
* Dogfood-tuned against the real local model (see MAX_BROWSE_CONTENT_CHARS): the prompt
|
|
32
|
+
* is deliberately CONCISE + title-pointing — a long, heavily-instructed prompt makes the
|
|
33
|
+
* small model WORSE (it ignores the answer and over-cautiously refuses or invents). The
|
|
34
|
+
* model answers in PROSE (caller uses responseFormat:'text'); `parseLocalGemmaBrowseSummary`
|
|
35
|
+
* tolerates either prose or JSON. The title/content stay in the JSON DATA payload (escaped
|
|
36
|
+
* — also defeats label-spoofing) and are NEVER interpolated into the instruction prose.
|
|
37
|
+
*
|
|
38
|
+
* Budget: cap title/url/userPrompt + content (lead), then SHRINK on ACTUAL rendered length
|
|
39
|
+
* (JSON.stringify can expand quote/backslash-heavy text) so the emitted JSON stays valid.
|
|
40
|
+
*/
|
|
41
|
+
export declare function renderLocalGemmaBrowsePrompt(args: {
|
|
42
|
+
userPrompt: string;
|
|
43
|
+
source: {
|
|
44
|
+
url: string;
|
|
45
|
+
title: string;
|
|
46
|
+
};
|
|
47
|
+
content: string;
|
|
48
|
+
}): string;
|
|
49
|
+
/**
|
|
50
|
+
* WEB-BROWSING (search-route): turn the user's request + recent conversation into a
|
|
51
|
+
* concise web-search QUERY. The local model resolves acronyms/pronouns from context
|
|
52
|
+
* (e.g. "do a web search on ACP" + a prior turn defining "Agent Client Protocol" →
|
|
53
|
+
* "ACP Agent Client Protocol") — replacing the old brittle regex that searched the raw
|
|
54
|
+
* command sentence. Dogfood-validated against the real local model (gemma4 8B): produces
|
|
55
|
+
* context-aware terms, and clean terms when there's no useful context.
|
|
56
|
+
*
|
|
57
|
+
* The output is a short keyword string used ONLY as a DDG search query — the caller
|
|
58
|
+
* sanitizes + path-redacts + caps it. Prior turns are the user's OWN conversation (already
|
|
59
|
+
* sanitized at ingest); the prompt asks for a query only and is framed as untrusted data.
|
|
60
|
+
*/
|
|
61
|
+
export declare function renderLocalGemmaSearchQueryPrompt(args: {
|
|
62
|
+
userPrompt: string;
|
|
63
|
+
priorTurns?: string[];
|
|
64
|
+
}): string;
|
|
65
|
+
export declare function renderLocalGemmaBrainstormPrompt(args: {
|
|
66
|
+
userPrompt: string;
|
|
67
|
+
summary?: StructuralSummary | null;
|
|
68
|
+
priorTurns?: string[];
|
|
69
|
+
}): string;
|
|
70
|
+
export declare function brainstormPromptRequestsCommandGuidance(text: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* WEB-BROWSING (search-route hardening): a LENIENT summary parse for the browse
|
|
73
|
+
* route. Unlike `parseLocalGemmaAdvisorySummary` (which hard-rejects any key
|
|
74
|
+
* besides `summary`), the model summarizing a content-rich page often adds extra
|
|
75
|
+
* keys (`version`, `key_points`, …) — that should NOT hard-fail the answer. We
|
|
76
|
+
* extract `summary` if present, else the longest string field, else the
|
|
77
|
+
* stringified object as a last resort; then redact + cap. Throws only if there's
|
|
78
|
+
* genuinely no usable text. The browse caller now uses `{responseFormat:'text'}`, so
|
|
79
|
+
* PROSE (the raw-text fallback) is the common path; a JSON object is still tolerated if
|
|
80
|
+
* the model emits one.
|
|
81
|
+
*/
|
|
82
|
+
export declare function parseLocalGemmaBrowseSummary(raw: string): string;
|
|
83
|
+
export declare function parseLocalGemmaAdvisorySummary(raw: string): string;
|
|
84
|
+
export declare function parseLocalGemmaBrainstormSummary(raw: string): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PlannerAdapter } from './adapter';
|
|
2
|
+
import type { LocalGemmaAdvisoryRunner } from './local-advisory';
|
|
3
|
+
import type { PlannerDecision, PlannerInput, PlannerProbeResult } from './types';
|
|
4
|
+
export interface LocalGemmaPlannerRunner {
|
|
5
|
+
classify(promptText: string): Promise<string>;
|
|
6
|
+
generateAdvisory?: LocalGemmaAdvisoryRunner['generateAdvisory'];
|
|
7
|
+
probe?(): Promise<PlannerProbeResult>;
|
|
8
|
+
runtimeLabel: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Text-only route classifier prompt. It intentionally excludes repository
|
|
12
|
+
* paths, summaries, source snippets, file bodies, and the raw structural digest.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderLocalGemmaPlannerPrompt(input: PlannerInput): string;
|
|
15
|
+
export declare function parseLocalGemmaPlannerDecision(raw: string): PlannerDecision;
|
|
16
|
+
export declare class LocalGemmaPlannerAdapter implements PlannerAdapter {
|
|
17
|
+
private readonly runner;
|
|
18
|
+
private activeSessionId;
|
|
19
|
+
constructor(runner: LocalGemmaPlannerRunner);
|
|
20
|
+
classify(input: PlannerInput): Promise<PlannerDecision>;
|
|
21
|
+
probe(): Promise<PlannerProbeResult>;
|
|
22
|
+
setActiveSession(sessionId: string | null): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type Tier = 'FREE' | 'PRO' | 'MAX';
|
|
3
|
+
export interface SessionContext {
|
|
4
|
+
sessionId: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
tier: Tier;
|
|
7
|
+
currentTaskState: 'none' | 'in_progress' | 'awaiting_user' | 'awaiting_review' | 'merge_gate_pending';
|
|
8
|
+
structuralSummaryDigest: string;
|
|
9
|
+
recentEventCount: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const SessionContextSchema: z.ZodObject<{
|
|
12
|
+
sessionId: z.ZodString;
|
|
13
|
+
userId: z.ZodString;
|
|
14
|
+
tier: z.ZodEnum<["FREE", "PRO", "MAX"]>;
|
|
15
|
+
currentTaskState: z.ZodEnum<["none", "in_progress", "awaiting_user", "awaiting_review", "merge_gate_pending"]>;
|
|
16
|
+
structuralSummaryDigest: z.ZodString;
|
|
17
|
+
recentEventCount: z.ZodNumber;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
sessionId: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
tier: "FREE" | "PRO" | "MAX";
|
|
22
|
+
currentTaskState: "none" | "merge_gate_pending" | "in_progress" | "awaiting_user" | "awaiting_review";
|
|
23
|
+
structuralSummaryDigest: string;
|
|
24
|
+
recentEventCount: number;
|
|
25
|
+
}, {
|
|
26
|
+
sessionId: string;
|
|
27
|
+
userId: string;
|
|
28
|
+
tier: "FREE" | "PRO" | "MAX";
|
|
29
|
+
currentTaskState: "none" | "merge_gate_pending" | "in_progress" | "awaiting_user" | "awaiting_review";
|
|
30
|
+
structuralSummaryDigest: string;
|
|
31
|
+
recentEventCount: number;
|
|
32
|
+
}>;
|
|
33
|
+
export interface BudgetHint {
|
|
34
|
+
wallClockMsRemaining: number;
|
|
35
|
+
reviseAttempts: number;
|
|
36
|
+
}
|
|
37
|
+
export declare const BudgetHintSchema: z.ZodObject<{
|
|
38
|
+
wallClockMsRemaining: z.ZodNumber;
|
|
39
|
+
reviseAttempts: z.ZodNumber;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
wallClockMsRemaining: number;
|
|
42
|
+
reviseAttempts: number;
|
|
43
|
+
}, {
|
|
44
|
+
wallClockMsRemaining: number;
|
|
45
|
+
reviseAttempts: number;
|
|
46
|
+
}>;
|
|
47
|
+
export interface Clarification {
|
|
48
|
+
question: string;
|
|
49
|
+
answer: string;
|
|
50
|
+
}
|
|
51
|
+
export declare const ClarificationSchema: z.ZodObject<{
|
|
52
|
+
question: z.ZodString;
|
|
53
|
+
answer: z.ZodString;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
question: string;
|
|
56
|
+
answer: string;
|
|
57
|
+
}, {
|
|
58
|
+
question: string;
|
|
59
|
+
answer: string;
|
|
60
|
+
}>;
|
|
61
|
+
export interface PlannerInput {
|
|
62
|
+
prompt: string;
|
|
63
|
+
clarifications: Clarification[];
|
|
64
|
+
sessionContext: SessionContext;
|
|
65
|
+
budgetHint: BudgetHint;
|
|
66
|
+
}
|
|
67
|
+
export interface PlannerDecision {
|
|
68
|
+
action: 'start_task' | 'summarize_current_status' | 'advisory_response' | 'ask_user' | 'refuse' | 'team_decompose' | 'familiarize' | 'brainstorm' | 'browse';
|
|
69
|
+
rationale: string;
|
|
70
|
+
clarifying_question?: string;
|
|
71
|
+
advisory_summary?: string;
|
|
72
|
+
/** WEB-BROWSING — explicit http(s) URLs to read (validated/guarded downstream). */
|
|
73
|
+
browseUrls?: string[];
|
|
74
|
+
/** WEB-BROWSING — a web-search query when no explicit URL is given. */
|
|
75
|
+
browseQuery?: string;
|
|
76
|
+
/** Opaque per parent §6 lines 967-972; CP-1 NEVER inspects fields. */
|
|
77
|
+
gateRequest?: Record<string, unknown>;
|
|
78
|
+
}
|
|
79
|
+
export declare const PlannerDecisionSchema: z.ZodObject<{
|
|
80
|
+
action: z.ZodEnum<["start_task", "summarize_current_status", "advisory_response", "ask_user", "refuse", "team_decompose", "familiarize", "brainstorm", "browse"]>;
|
|
81
|
+
rationale: z.ZodString;
|
|
82
|
+
clarifying_question: z.ZodOptional<z.ZodString>;
|
|
83
|
+
advisory_summary: z.ZodOptional<z.ZodString>;
|
|
84
|
+
browseUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
85
|
+
browseQuery: z.ZodOptional<z.ZodString>;
|
|
86
|
+
gateRequest: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
action: "start_task" | "summarize_current_status" | "advisory_response" | "ask_user" | "refuse" | "team_decompose" | "familiarize" | "brainstorm" | "browse";
|
|
89
|
+
rationale: string;
|
|
90
|
+
clarifying_question?: string | undefined;
|
|
91
|
+
advisory_summary?: string | undefined;
|
|
92
|
+
browseUrls?: string[] | undefined;
|
|
93
|
+
browseQuery?: string | undefined;
|
|
94
|
+
gateRequest?: Record<string, unknown> | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
action: "start_task" | "summarize_current_status" | "advisory_response" | "ask_user" | "refuse" | "team_decompose" | "familiarize" | "brainstorm" | "browse";
|
|
97
|
+
rationale: string;
|
|
98
|
+
clarifying_question?: string | undefined;
|
|
99
|
+
advisory_summary?: string | undefined;
|
|
100
|
+
browseUrls?: string[] | undefined;
|
|
101
|
+
browseQuery?: string | undefined;
|
|
102
|
+
gateRequest?: Record<string, unknown> | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
export interface PlannerProbeResult {
|
|
105
|
+
ok: boolean;
|
|
106
|
+
latencyMs: number;
|
|
107
|
+
errorClass?: 'timeout' | 'rate_limited' | 'unreachable' | 'malformed_response' | 'auth_failed';
|
|
108
|
+
}
|
|
109
|
+
export type ClassificationKind = 'workflow_status_query' | 'workflow_audit_query' | 'workflow_review_query' | 'workflow_continuation_query' | 'advisory_response_safe' | 'ask_user_clarification';
|
|
110
|
+
export interface CachedClassification {
|
|
111
|
+
kind: ClassificationKind;
|
|
112
|
+
clarifyingQuestion?: string;
|
|
113
|
+
advisorySummary?: string;
|
|
114
|
+
}
|
|
115
|
+
export type PlannerHealthState = 'Available' | 'Degraded' | 'Outage';
|
|
116
|
+
export interface PlannerHealthTransition {
|
|
117
|
+
newState: PlannerHealthState;
|
|
118
|
+
fromState: PlannerHealthState;
|
|
119
|
+
reason: string;
|
|
120
|
+
consecutiveFailures: number;
|
|
121
|
+
consecutiveSuccesses: number;
|
|
122
|
+
p95Ms: number;
|
|
123
|
+
}
|
|
@@ -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 {};
|
package/dist/reviewer/index.d.ts
CHANGED
|
@@ -11,5 +11,7 @@ export type { GeminiEnvelope, GeminiModelStats, GeminiReviewerProviderOptions, G
|
|
|
11
11
|
export { GeminiReviewerProvider } from './providers/gemini.js';
|
|
12
12
|
export type { CodexReviewerProviderOptions } from './providers/codex.js';
|
|
13
13
|
export { CodexReviewerProvider } from './providers/codex.js';
|
|
14
|
+
export type { AntigravityReviewerProviderOptions } from './providers/antigravity.js';
|
|
15
|
+
export { AntigravityReviewerProvider } from './providers/antigravity.js';
|
|
14
16
|
export { ReviewerRegistry, createSubprocessReviewerRegistry, } from './registry.js';
|
|
15
17
|
export { MockReviewerSpawner, StaticReviewerMock } from './mocks.js';
|