@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,8 @@
|
|
|
1
|
+
import { OrchestrationAction, OrchestrationState } from './types';
|
|
2
|
+
/** Max conversation-buffer size per §5.1 line 469 ("bounded ring buffer (last 500 entries)"). */
|
|
3
|
+
export declare const CONVERSATION_BUFFER_MAX = 500;
|
|
4
|
+
/**
|
|
5
|
+
* Pure reducer. Returns a NEW state object on every dispatch — never
|
|
6
|
+
* mutates `state` in place. Map fields are cloned via `new Map(state.x)`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function reducer(state: OrchestrationState, action: OrchestrationAction): OrchestrationState;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const DEFAULT_DISCOVERY_MAX_DEPTH = 2;
|
|
2
|
+
export declare const DEFAULT_DISCOVERY_MAX_ROOTS = 25;
|
|
3
|
+
type DiscoveryReason = 'git' | 'manifest' | 'fallback';
|
|
4
|
+
export interface DiscoveredRepositoryRoot {
|
|
5
|
+
rootPath: string;
|
|
6
|
+
reason: DiscoveryReason;
|
|
7
|
+
manifestFile?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface RepositoryRootDiscoveryResult {
|
|
10
|
+
launchDir: string;
|
|
11
|
+
rootPaths: string[];
|
|
12
|
+
roots: DiscoveredRepositoryRoot[];
|
|
13
|
+
maxDepth: number;
|
|
14
|
+
maxRoots: number;
|
|
15
|
+
omittedRootCount: number;
|
|
16
|
+
omittedAncestorRoots: string[];
|
|
17
|
+
prunedDirectoryCount: number;
|
|
18
|
+
capped: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function discoverRepositoryRoots(deps?: {
|
|
21
|
+
launchDir?: string;
|
|
22
|
+
maxDepth?: number;
|
|
23
|
+
maxRoots?: number;
|
|
24
|
+
}): Promise<RepositoryRootDiscoveryResult>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { OrchestrationStore } from './store';
|
|
2
|
+
import type { LocalGemmaAdvisoryRunner } from '../planner/local-advisory';
|
|
3
|
+
export interface RouteBrowseDeps {
|
|
4
|
+
store: OrchestrationStore;
|
|
5
|
+
/** Undefined when the local model isn't installed/enabled → no-model advisory. */
|
|
6
|
+
localAdvisoryRunner?: LocalGemmaAdvisoryRunner;
|
|
7
|
+
userPrompt: string;
|
|
8
|
+
browseUrls?: string[];
|
|
9
|
+
browseQuery?: string;
|
|
10
|
+
/** Recent conversation turns (for context-aware search-query formulation). */
|
|
11
|
+
priorTurns?: string[];
|
|
12
|
+
/** Esc-abort signal (shell-owned AbortController). */
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Orchestrate a `browse` route. Fetch an explicit URL, or run a keyless web
|
|
17
|
+
* search and read the top result, then answer via local Gemma. Mirrors
|
|
18
|
+
* routeBrainstorm/routeFamiliarize (no-model advisory, clean failures, no crash).
|
|
19
|
+
*/
|
|
20
|
+
export declare function routeBrowse(deps: RouteBrowseDeps): Promise<void>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { OrchestrationAction, Tier } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Side effects a handler can request the entrypoint to dispatch.
|
|
4
|
+
* The router itself never touches the store — keeps slash handling
|
|
5
|
+
* pure for unit testing.
|
|
6
|
+
*
|
|
7
|
+
* Widened to a 3-arm union by CP-1.d per `PHASE-CP-1-D-DESIGN.md` §4.8
|
|
8
|
+
* (lines 1060-1066). `[ADDITIVE WIDENING — CP-1.d]` — the §16 LOCK #10
|
|
9
|
+
* slash-command CATALOG (names + ownership patterns) is unchanged; the
|
|
10
|
+
* internal side-effect kind is implementation detail of the orchestration
|
|
11
|
+
* shell and never crosses the AppSync boundary.
|
|
12
|
+
*/
|
|
13
|
+
export type ShellAction = {
|
|
14
|
+
kind: 'EXIT';
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'REGENERATE_STRUCTURAL_SUMMARY';
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'OPT_IN_BODY_PATH';
|
|
19
|
+
path: string;
|
|
20
|
+
};
|
|
21
|
+
export interface SlashOutput {
|
|
22
|
+
/** Verbatim user input (including leading `/`). Echoed in the conversation entry. */
|
|
23
|
+
command: string;
|
|
24
|
+
/** Rendered text shown inline in `<ConversationPane>` (per §11). */
|
|
25
|
+
output: string;
|
|
26
|
+
/** Optional side effect; only `/quit` populates it in CP-1.a. */
|
|
27
|
+
sideEffect?: ShellAction;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Public, render-safe view of a catalog row for the autocomplete dropdown
|
|
31
|
+
* (`<InputBar>`). Carries no handler — keeps the UI decoupled from dispatch.
|
|
32
|
+
*/
|
|
33
|
+
export interface SlashCommandInfo {
|
|
34
|
+
name: string;
|
|
35
|
+
blurb: string;
|
|
36
|
+
}
|
|
37
|
+
/** True if `command` is a shell-exit command (`/quit` / `/exit`). */
|
|
38
|
+
export declare function isExitCommand(command: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* §16 LOCK #10 + §5.1.5 + §11 row. Routes user input that starts with
|
|
41
|
+
* `/`. Per §17 Q3 RESOLVED disposition: EXACT-MATCH only. Unknown
|
|
42
|
+
* commands return a help hint.
|
|
43
|
+
*/
|
|
44
|
+
export declare function routeSlashCommand(input: string): SlashOutput;
|
|
45
|
+
/**
|
|
46
|
+
* Render-safe catalog view for the autocomplete dropdown (TUI redesign
|
|
47
|
+
* 2026-06-29). Returns `{ name, blurb }` in `/help` order, filtered to the
|
|
48
|
+
* commands the given `tier` can RUN (so a Pro user isn't suggested Max-only
|
|
49
|
+
* `/audit` or `/team`). `tier` omitted → the full catalog. The deferred
|
|
50
|
+
* `/attach` is excluded (it is not a runnable command). The orchestration TUI
|
|
51
|
+
* only renders for Pro/Max, so FREE is effectively unreachable here.
|
|
52
|
+
*/
|
|
53
|
+
export declare function listSlashCommands(tier?: Tier): SlashCommandInfo[];
|
|
54
|
+
/**
|
|
55
|
+
* Convenience helper for callers that wire the side effect directly
|
|
56
|
+
* into the store. CP-1.a's `cli.ts` uses this; CP-1.b/c may dispatch
|
|
57
|
+
* the resulting `slash-output` action plus the side effect.
|
|
58
|
+
*/
|
|
59
|
+
export declare function applySlashOutput(output: SlashOutput): {
|
|
60
|
+
storeAction: Extract<OrchestrationAction, {
|
|
61
|
+
type: 'SLASH_OUTPUT';
|
|
62
|
+
}>;
|
|
63
|
+
exit: boolean;
|
|
64
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ContinuationPacketReader } from '../../continuation/packet-reader';
|
|
2
|
+
import type { AgentKind } from '../../continuation/types';
|
|
3
|
+
export interface ContinuationCliResult {
|
|
4
|
+
exitCode: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
stdout: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Valid `CONTINUE_WITH` target agents (#585 #C10M-1) — the closed enum the CLI
|
|
9
|
+
* validates user input against. Exported so the local `/continue accept` path in
|
|
10
|
+
* `index.ts` can validate the SERVER echo's `target_agent` through the SAME
|
|
11
|
+
* gate (first-wins: the echo's agent is authoritative, fail closed on anything
|
|
12
|
+
* outside this set).
|
|
13
|
+
*/
|
|
14
|
+
export declare const VALID_TARGET_AGENTS: ReadonlyArray<AgentKind>;
|
|
15
|
+
/**
|
|
16
|
+
* PHASE-CP-10-MIN (#585) — the active-task context the `/continue request`
|
|
17
|
+
* subcommand needs to build the `PacketWriteInput`. Resolved by the entrypoint
|
|
18
|
+
* from the QuorumLoop's active loop state. `null` when no task is active.
|
|
19
|
+
*/
|
|
20
|
+
export interface ActiveContinuationRequestContext {
|
|
21
|
+
taskId: string;
|
|
22
|
+
gateId: string;
|
|
23
|
+
roundNumber: number;
|
|
24
|
+
brief: string;
|
|
25
|
+
sourceAgent: AgentKind;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* PHASE-CP-10-MIN (#585) — the active continuation-handoff PROMPT context the
|
|
29
|
+
* `/continue accept` subcommand needs. Resolved by the entrypoint via Option A
|
|
30
|
+
* (the most-recent unresolved `continuation_offer_handoff` gate-prompt — from
|
|
31
|
+
* the store, or a `listEvents` piggyback). `null` when no offer is active.
|
|
32
|
+
*/
|
|
33
|
+
export interface ActiveContinuationOfferContext {
|
|
34
|
+
taskId: string;
|
|
35
|
+
gateId: string;
|
|
36
|
+
sessionId: string;
|
|
37
|
+
currentRound: number;
|
|
38
|
+
offerId: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ContinuationCliDeps {
|
|
41
|
+
reader: ContinuationPacketReader;
|
|
42
|
+
/**
|
|
43
|
+
* PHASE-CP-10-MIN (#585) #C10M-9/16 — `/continue request <target?>`: fire the
|
|
44
|
+
* `user_requested` continuation trigger for the active task. The entrypoint
|
|
45
|
+
* wires this to abort the running implementor (Codex-H1) THEN call
|
|
46
|
+
* `QuorumLoop.requestContinuation()` (the §3.5 H1 path — `writer.write()` →
|
|
47
|
+
* server stamps + emits the prompt). Resolves the minted `offerId` (or null
|
|
48
|
+
* on failure). ABSENT → `request` reports "unavailable".
|
|
49
|
+
*/
|
|
50
|
+
request?: (ctx: ActiveContinuationRequestContext, targetAgent: AgentKind | undefined) => Promise<{
|
|
51
|
+
offerId: string;
|
|
52
|
+
} | null>;
|
|
53
|
+
/** Resolve the active-task request context (loop state). `null` if no active task. */
|
|
54
|
+
getActiveRequestContext?: () => ActiveContinuationRequestContext | null;
|
|
55
|
+
/**
|
|
56
|
+
* PHASE-CP-10-MIN (#585) #C10M-9/11 — `/continue accept <target>`: the
|
|
57
|
+
* rescue/headless path. The entrypoint wires this to call
|
|
58
|
+
* `applyUserDecision({decision:'continue_with', notes: encrypt(target)})` AND
|
|
59
|
+
* drive the local `resumeFromContinuation` (with the `resumedOffers` dedupe).
|
|
60
|
+
* Resolves true on success. ABSENT → `accept` reports "unavailable".
|
|
61
|
+
*/
|
|
62
|
+
accept?: (ctx: ActiveContinuationOfferContext, targetAgent: AgentKind) => Promise<boolean>;
|
|
63
|
+
/** Resolve the active continuation-handoff offer context. `null` if none. */
|
|
64
|
+
getActiveOfferContext?: () => ActiveContinuationOfferContext | null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Dispatch a single `/continuation` invocation. Returns the exit code
|
|
68
|
+
* + stdout the shell should render. Caller wires `exitCode` into the
|
|
69
|
+
* `codevibe status` top-level binary's `process.exit(...)`.
|
|
70
|
+
*/
|
|
71
|
+
export declare function runContinuationCli(deps: ContinuationCliDeps, args: string[]): Promise<ContinuationCliResult>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AppSyncClient } from '../../appsync';
|
|
2
|
+
import type { ReviewerAgentSpec, UserReviewerPolicySnapshot } from '../../types/reviewer';
|
|
3
|
+
import { detectInstalledAgents } from '../../orchestration';
|
|
4
|
+
/**
|
|
5
|
+
* Human-readable, ANSI-free rendering of a reviewer-policy snapshot. Renders ONLY
|
|
6
|
+
* the readable+writable policy surface (detected agents + the reviewer panel). The
|
|
7
|
+
* legacy `orchestrationEnabledDefault` opt-in was removed in CP-1 (2.0
|
|
8
|
+
* orchestration is shell-driven, not a stored flag — `queries.ts` does not select
|
|
9
|
+
* it: selecting it 401s on a post-CP-1 schema), so it is intentionally NOT shown
|
|
10
|
+
* (it would always render a misleading default).
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatReviewerPolicy(snapshot: UserReviewerPolicySnapshot): string;
|
|
13
|
+
/**
|
|
14
|
+
* Fetches + formats the user's reviewer panel. Re-pushes the locally detected
|
|
15
|
+
* agents (idempotent) and renders the returned snapshot. Never throws — returns
|
|
16
|
+
* a friendly error line so `/reviewers` can't crash the shell turn.
|
|
17
|
+
*/
|
|
18
|
+
export declare function runReviewersCli(client: AppSyncClient): Promise<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Tier-agnostic payload for opening the `/reviewer-setup` wizard: the host's
|
|
21
|
+
* detected agents + the user's current policy. The caller folds in the session
|
|
22
|
+
* `tier` to build the full `ReviewerWizardState`.
|
|
23
|
+
*/
|
|
24
|
+
export interface ReviewerWizardData {
|
|
25
|
+
installedAgents: ReturnType<typeof detectInstalledAgents>;
|
|
26
|
+
currentSeats: ReviewerAgentSpec[] | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Gathers everything the interactive wizard needs to render synchronously:
|
|
30
|
+
* detects installed agents (the only valid reviewer choices) and reads back the
|
|
31
|
+
* current policy via the idempotent `updateAvailableAgents` round-trip. Never
|
|
32
|
+
* throws — returns a `{ ok:false, message }` the caller surfaces as an advisory
|
|
33
|
+
* (no agents installed, or a transport error) instead of opening an empty modal.
|
|
34
|
+
*/
|
|
35
|
+
export declare function loadReviewerWizardData(client: AppSyncClient, detectFn?: typeof detectInstalledAgents): Promise<{
|
|
36
|
+
ok: true;
|
|
37
|
+
data: ReviewerWizardData;
|
|
38
|
+
} | {
|
|
39
|
+
ok: false;
|
|
40
|
+
message: string;
|
|
41
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SlashCommandInfo } from './slash-router';
|
|
2
|
+
/**
|
|
3
|
+
* True when the current input is a slash COMMAND still being typed — a `/`
|
|
4
|
+
* followed by zero or more NON-space chars (no space yet). Once a space is
|
|
5
|
+
* typed the command is complete and the user is entering args, so the
|
|
6
|
+
* dropdown hides. A bare `/` qualifies (shows the full list).
|
|
7
|
+
*/
|
|
8
|
+
export declare function isSlashCommandInProgress(value: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Prefix-filters the (already tier-filtered) catalog by the in-progress
|
|
11
|
+
* command token, case-insensitively, preserving catalog order. Returns `[]`
|
|
12
|
+
* when the value is not a command-in-progress (so the caller hides the
|
|
13
|
+
* dropdown). A bare `/` returns the whole list.
|
|
14
|
+
*/
|
|
15
|
+
export declare function filterSlashSuggestions(value: string, commands: SlashCommandInfo[]): SlashCommandInfo[];
|
|
16
|
+
/**
|
|
17
|
+
* Builds a single dropdown row as ONE physical line (≤ `maxCols`) so it can
|
|
18
|
+
* never wrap and inflate the dropdown's row count on a narrow terminal
|
|
19
|
+
* (Stage-2 r4). The marker (`❯ `/` `) + padded name come first; the blurb is
|
|
20
|
+
* appended ONLY if there's room (no dangling trailing space when it doesn't
|
|
21
|
+
* fit), and the whole row is truncated to `maxCols`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatSuggestionRow(opts: {
|
|
24
|
+
name: string;
|
|
25
|
+
blurb: string;
|
|
26
|
+
highlighted: boolean;
|
|
27
|
+
maxCols: number;
|
|
28
|
+
namePad: number;
|
|
29
|
+
}): string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** The planner runtime kind resolved once at boot (NOT a live probe). */
|
|
2
|
+
export type PlannerRuntimeKind = 'hosted' | 'local_gemma_qat' | 'local_unavailable';
|
|
3
|
+
/**
|
|
4
|
+
* Truncate `s` to at most `max` columns with a trailing ellipsis. (Uses JS
|
|
5
|
+
* string length as a column proxy — adequate for the width-1 glyphs we render.)
|
|
6
|
+
*/
|
|
7
|
+
export declare function truncate(s: string, max: number): string;
|
|
8
|
+
export interface PlannerBadge {
|
|
9
|
+
/** User-facing badge text. */
|
|
10
|
+
text: string;
|
|
11
|
+
/** Ink color when the badge is a warning; omitted → render dim. */
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Abbreviates an absolute project path for the status bar:
|
|
16
|
+
* - `$HOME` prefix → `~`
|
|
17
|
+
* - if still wider than `maxCols`, left-truncate with a leading `…` so the
|
|
18
|
+
* most-specific (rightmost) directories stay visible.
|
|
19
|
+
*
|
|
20
|
+
* Pure: `homedir` is injected (no `os` dependency here) so tests can pin it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatProjectPath(projectPath: string, homedir: string, maxCols: number): string;
|
|
23
|
+
/**
|
|
24
|
+
* Strips a model tag for display: `gemma4:latest` → `gemma4`. Falls back to a
|
|
25
|
+
* neutral label when nothing usable is provided.
|
|
26
|
+
*/
|
|
27
|
+
export declare function prettyModelLabel(model: string | null | undefined): string;
|
|
28
|
+
/**
|
|
29
|
+
* Maps the boot-time planner runtime kind → the right-hand status badge.
|
|
30
|
+
* - `local_gemma_qat` → dim `<label> · local` (no color → caller renders dim)
|
|
31
|
+
* - `local_unavailable`→ yellow degraded warning (the ONE state worth surfacing —
|
|
32
|
+
* NL routing is off; only deterministic slash commands work)
|
|
33
|
+
* - `hosted` → null (hosted planner retired → no badge)
|
|
34
|
+
*
|
|
35
|
+
* The badge is a boot-time FACT, not a live health light — copy avoids implying
|
|
36
|
+
* liveness (see design doc "Architecture grounding").
|
|
37
|
+
*/
|
|
38
|
+
export declare function plannerBadge(kind: PlannerRuntimeKind, label: string): PlannerBadge | null;
|
|
39
|
+
export interface StatusLayout {
|
|
40
|
+
/** Combined `<cwd> · <tier>` for the left, truncated to fit. */
|
|
41
|
+
leftText: string;
|
|
42
|
+
/** Badge text for the right (possibly truncated; '' when no badge). */
|
|
43
|
+
badgeText: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Computes the one-line status-bar layout so `leftText` + the badge ALWAYS fit
|
|
47
|
+
* within `columns` at ANY width (Stage-2). The badge is truncated so the
|
|
48
|
+
* ` · <tier>` always has room; the left (`<cwd> · <tier>`) is then truncated to
|
|
49
|
+
* the remaining width — on a sub-tier-width terminal the cwd vanishes and even
|
|
50
|
+
* the tier shrinks rather than wrapping. `.length` is the column proxy (the
|
|
51
|
+
* glyphs we render are width-1). Pure → unit-tested directly.
|
|
52
|
+
*/
|
|
53
|
+
export declare function computeStatusLayout(args: {
|
|
54
|
+
cwd: string;
|
|
55
|
+
tier: string;
|
|
56
|
+
homedir: string;
|
|
57
|
+
columns: number;
|
|
58
|
+
badge: PlannerBadge | null;
|
|
59
|
+
}): StatusLayout;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Mode, Tier } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Filesystem location of the sticky preference file.
|
|
4
|
+
*/
|
|
5
|
+
export declare function stickyPreferenceFilePath(): string;
|
|
6
|
+
/**
|
|
7
|
+
* §2 LOCK lines 103-116. Reads the sticky preference. Returns `null`
|
|
8
|
+
* on every failure mode the design names:
|
|
9
|
+
* - file missing
|
|
10
|
+
* - malformed JSON
|
|
11
|
+
* - schema-version mismatch
|
|
12
|
+
* - `pickedByTier === 'PRO'` but current tier is now `FREE`
|
|
13
|
+
* (tier downgrade INVALIDATES the sticky)
|
|
14
|
+
*/
|
|
15
|
+
export declare function readStickyPreference(currentTier?: Tier): Promise<Mode | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Writes the sticky preference. Creates the parent directory if
|
|
18
|
+
* missing. Used by the orchestration-mode entrypoint after a user
|
|
19
|
+
* picks a mode via the interactive prompt.
|
|
20
|
+
*/
|
|
21
|
+
export declare function writeStickyPreference(args: {
|
|
22
|
+
mode: Mode;
|
|
23
|
+
pickedByTier: 'PRO' | 'MAX';
|
|
24
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Session } from '../types';
|
|
2
|
+
import { OrchestrationAction, OrchestrationState } from './types';
|
|
3
|
+
export interface OrchestrationStore {
|
|
4
|
+
getState(): OrchestrationState;
|
|
5
|
+
dispatch(action: OrchestrationAction): void;
|
|
6
|
+
/**
|
|
7
|
+
* Subscribe to state changes. Returns an unsubscribe fn. The
|
|
8
|
+
* listener fires AFTER each dispatch with the new state.
|
|
9
|
+
*/
|
|
10
|
+
subscribe(listener: (state: OrchestrationState) => void): () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateOrchestrationStoreArgs {
|
|
13
|
+
session: Session;
|
|
14
|
+
/** Optional initial state override for tests. */
|
|
15
|
+
initial?: Partial<OrchestrationState>;
|
|
16
|
+
}
|
|
17
|
+
export declare function createOrchestrationStore(args: CreateOrchestrationStoreArgs): OrchestrationStore;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One desktop-local progress phase. Discriminated by `phase`. Every variant is
|
|
3
|
+
* counts + labels + paths only — NEVER plaintext (see the module invariant).
|
|
4
|
+
*/
|
|
5
|
+
export type TaskProgressEvent = ({
|
|
6
|
+
phase: 'shadow_created';
|
|
7
|
+
round: number;
|
|
8
|
+
} | {
|
|
9
|
+
phase: 'implementor_running';
|
|
10
|
+
round: number;
|
|
11
|
+
elapsedMs: number;
|
|
12
|
+
filesChanged?: number;
|
|
13
|
+
} | {
|
|
14
|
+
phase: 'diff_captured';
|
|
15
|
+
round: number;
|
|
16
|
+
files: number;
|
|
17
|
+
created: number;
|
|
18
|
+
modified: number;
|
|
19
|
+
deleted: number;
|
|
20
|
+
} | {
|
|
21
|
+
phase: 'submitting_diff';
|
|
22
|
+
round: number;
|
|
23
|
+
} | {
|
|
24
|
+
phase: 'reviewers_dispatched';
|
|
25
|
+
gateId: string;
|
|
26
|
+
seats: number;
|
|
27
|
+
} | {
|
|
28
|
+
phase: 'seat_update';
|
|
29
|
+
gateId: string;
|
|
30
|
+
seatId: number;
|
|
31
|
+
seatLabel: string;
|
|
32
|
+
state: 'running' | 'verdict_submitted';
|
|
33
|
+
} | {
|
|
34
|
+
phase: 'verdicts_progress';
|
|
35
|
+
gateId: string;
|
|
36
|
+
received: number;
|
|
37
|
+
expected: number;
|
|
38
|
+
} | {
|
|
39
|
+
phase: 'revise_round';
|
|
40
|
+
round: number;
|
|
41
|
+
feedbackSummary?: string;
|
|
42
|
+
} | {
|
|
43
|
+
phase: 'round_failed';
|
|
44
|
+
round: number;
|
|
45
|
+
reason: string;
|
|
46
|
+
} | {
|
|
47
|
+
phase: 'continuation_offered';
|
|
48
|
+
round: number;
|
|
49
|
+
reason: string;
|
|
50
|
+
} | {
|
|
51
|
+
phase: 'declared_tests_skipped';
|
|
52
|
+
round: number;
|
|
53
|
+
paths: string[];
|
|
54
|
+
} | {
|
|
55
|
+
phase: 'promoting';
|
|
56
|
+
files: number;
|
|
57
|
+
} | {
|
|
58
|
+
phase: 'promoted';
|
|
59
|
+
files: number;
|
|
60
|
+
} | {
|
|
61
|
+
phase: 'discarding';
|
|
62
|
+
} | {
|
|
63
|
+
phase: 'discarded';
|
|
64
|
+
} | {
|
|
65
|
+
phase: 'waiting_user';
|
|
66
|
+
} | {
|
|
67
|
+
phase: 'planner_classifying';
|
|
68
|
+
} | {
|
|
69
|
+
phase: 'familiarizing';
|
|
70
|
+
} | {
|
|
71
|
+
phase: 'progress_cleared';
|
|
72
|
+
}) & {
|
|
73
|
+
epoch?: number;
|
|
74
|
+
tokens?: number;
|
|
75
|
+
};
|
|
76
|
+
/** The callback the QuorumLoop invokes on each progress phase. */
|
|
77
|
+
export type OnProgress = (event: TaskProgressEvent) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Format an elapsed-ms duration for the live timer: `M:SS` under an hour,
|
|
80
|
+
* `H:MM:SS` at/over an hour (design §6; matches Codex/Claude). Floored at 0 so an
|
|
81
|
+
* NTP backward step shows `0:00`, never a negative/huge value.
|
|
82
|
+
*/
|
|
83
|
+
export declare function formatElapsed(elapsedMs: number): string;
|
|
84
|
+
export { finiteToken, unwrapClaudeJson } from '../reviewer/token-usage';
|
|
85
|
+
/**
|
|
86
|
+
* [Phase 2 · P2-5] Humanize a token COUNT for the ` · ↓ <tokens>` segment. Pure;
|
|
87
|
+
* the input is an already-finite-non-negative integer (from `finiteToken`/
|
|
88
|
+
* `tokensFor`), defensively re-clamped so a stray caller can never render `NaN`.
|
|
89
|
+
* • `n >= 999500` → `(n/1e6).toFixed(1)+'M'` (the 999500 boundary avoids
|
|
90
|
+
* `999999 → "1000k"`).
|
|
91
|
+
* • `n >= 1000` → `v=n/1000`; `(v>=10 ? v.toFixed(0) : v.toFixed(1))+'k'`
|
|
92
|
+
* (so `1.0k`/`9.9k` carry one decimal but `10k`/`57k`/`999k` carry none).
|
|
93
|
+
* • else → `String(n)`.
|
|
94
|
+
* The caller renders ONLY when `tokens && tokens > 0` (a `0`/absent count omits
|
|
95
|
+
* the whole segment), so `formatTokens(0)` is never surfaced.
|
|
96
|
+
*/
|
|
97
|
+
export declare function formatTokens(n: number): string;
|
|
98
|
+
/**
|
|
99
|
+
* Whether a phase is a transient/spinner phase (an ephemeral live status line)
|
|
100
|
+
* vs a milestone that persists in scrollback. `implementor_running` (a ticking
|
|
101
|
+
* line) is the canonical spinner phase; `promoting`/`discarding` show a spinner
|
|
102
|
+
* while in flight. Everything else is a one-shot milestone.
|
|
103
|
+
*
|
|
104
|
+
* TODO(cleanup): production-UNUSED after the live-task-timer reducer rewrite (the
|
|
105
|
+
* reducer now classifies via the OPENER/REFRESH-ONLY/CLOSER trichotomy, not this
|
|
106
|
+
* helper). Kept + unit-tested for now; remove once single-track progress is stable.
|
|
107
|
+
*/
|
|
108
|
+
export declare function isSpinnerPhase(phase: TaskProgressEvent['phase']): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Render the user-facing ONE-LINE text for a progress event. Pure (no plaintext
|
|
111
|
+
* — only counts/labels/paths/elapsed). The TUI shows spinner phases as an
|
|
112
|
+
* ephemeral live line and milestone phases as persisted scrollback entries.
|
|
113
|
+
*/
|
|
114
|
+
export declare function renderProgressLine(event: TaskProgressEvent): string;
|
|
115
|
+
/**
|
|
116
|
+
* The BOUNDED label for the ephemeral LIVE line (design §5). Identical to
|
|
117
|
+
* `renderProgressLine` for the short phases, but path-bearing phases collapse to a
|
|
118
|
+
* count so the live line stays short (the FULL path list still persists in
|
|
119
|
+
* scrollback via `renderProgressLine`). The component additionally truncates this
|
|
120
|
+
* to the terminal width, timer-last, so the clock is never clipped.
|
|
121
|
+
*/
|
|
122
|
+
export declare function liveLabel(event: TaskProgressEvent): string;
|