@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,290 @@
|
|
|
1
|
+
import type { PromoteManifestInput } from './durable-store';
|
|
2
|
+
/** Default TTL after which an orphaned shadow is GC-eligible (#GC-1). */
|
|
3
|
+
export declare const DEFAULT_SHADOW_TTL_MS: number;
|
|
4
|
+
/** `change_kind` values mirroring the pinned engine `ExecuteFirstFile` contract. */
|
|
5
|
+
export type ShadowChangeKind = 'created' | 'modified' | 'deleted';
|
|
6
|
+
/** One captured changed file in the shadow-vs-real diff (§D3). */
|
|
7
|
+
export interface ShadowDiffFile {
|
|
8
|
+
/** Path RELATIVE to the workspace root (matches the engine contract). */
|
|
9
|
+
path: string;
|
|
10
|
+
change_kind: ShadowChangeKind;
|
|
11
|
+
/** The captured content (created/modified) or empty for deleted. */
|
|
12
|
+
content: string;
|
|
13
|
+
}
|
|
14
|
+
/** Persisted promote-state marker (#PR-4). */
|
|
15
|
+
type ShadowPromoteState = 'pending' | 'promoted';
|
|
16
|
+
/** Injected for deterministic tests; production uses the real fs/git. */
|
|
17
|
+
export interface ShadowEnv {
|
|
18
|
+
/** Sleep between git-op retries. */
|
|
19
|
+
sleep?: (ms: number) => Promise<void>;
|
|
20
|
+
/** Override the per-task state dir root (default `~/.codevibe/shadow-state`). */
|
|
21
|
+
stateRootDir?: string;
|
|
22
|
+
/** Override the shadow temp-dir root (default `os.tmpdir()`). */
|
|
23
|
+
shadowRootDir?: string;
|
|
24
|
+
/** TTL for the GC reaper. */
|
|
25
|
+
ttlMs?: number;
|
|
26
|
+
/** Hook to terminate task-spawned children rooted in the shadow before teardown. */
|
|
27
|
+
killChildrenInShadow?: (shadowDir: string) => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* CP-14 Wave A (`team.execution=worktree_merge`) — make the shadow worktree a
|
|
31
|
+
* PERSISTENT track branch instead of a detached HEAD, so the merge-train can
|
|
32
|
+
* merge the track's committed tip. `baseSha` is the ONE group base pinned BEFORE
|
|
33
|
+
* the first track shadow is created (so every track roots at the same base — a
|
|
34
|
+
* deterministic merge-train input). Git-only: a non-git workspace is ineligible.
|
|
35
|
+
*/
|
|
36
|
+
export interface TrackBranchSpec {
|
|
37
|
+
/** The persistent branch name, e.g. `codevibe/track/<groupId>/<trackIndex>`. */
|
|
38
|
+
name: string;
|
|
39
|
+
/** The pinned group base commit the branch is created at. */
|
|
40
|
+
baseSha: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The desktop's per-task shadow workspace. ONE instance per active task; the
|
|
44
|
+
* QuorumLoop creates it before the round-0 spawn, points the implementor cwd at
|
|
45
|
+
* `shadowDir`, captures the diff after the implementor exits, and the class-B
|
|
46
|
+
* consumer promotes (TaskAuthorized) or discards (every other terminal).
|
|
47
|
+
*/
|
|
48
|
+
export declare class WorkspaceShadow {
|
|
49
|
+
readonly taskId: string;
|
|
50
|
+
/** The real workspace root (canonical). */
|
|
51
|
+
readonly workingDir: string;
|
|
52
|
+
/** The shadow dir the implementor spawns in (its cwd). */
|
|
53
|
+
readonly shadowDir: string;
|
|
54
|
+
/** True when the shadow is a `git worktree` (vs a non-git file copy). */
|
|
55
|
+
readonly isGit: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* CP-14 Wave A — the persistent track branch this shadow worktree sits on
|
|
58
|
+
* (`worktree_merge` only); undefined on the legacy detached-HEAD path. When
|
|
59
|
+
* set, the seam commits to this branch (see {@link commitTrack}) instead of
|
|
60
|
+
* the in-place promote.
|
|
61
|
+
*/
|
|
62
|
+
readonly trackBranch?: string;
|
|
63
|
+
/** Paths (RELATIVE to workingDir) materialized into the shadow — the TRACKED SET. */
|
|
64
|
+
private trackedSet;
|
|
65
|
+
/** Pre-task content hash per tracked path (null = absent at create), #PR-2. */
|
|
66
|
+
private preTaskHashes;
|
|
67
|
+
/** The per-task durable state dir (under the app-data dir), survives restarts. */
|
|
68
|
+
private readonly stateDir;
|
|
69
|
+
private readonly env;
|
|
70
|
+
private readonly sleep;
|
|
71
|
+
private constructor();
|
|
72
|
+
/** @internal — test introspection of the tracked set. */
|
|
73
|
+
get trackedSetForTests(): ReadonlySet<string>;
|
|
74
|
+
/**
|
|
75
|
+
* Create the shadow BEFORE the round-0 spawn + record the TRACKED SET.
|
|
76
|
+
*
|
|
77
|
+
* - git repo → `git worktree add` (PRIMARY: cheap, shared object store, real
|
|
78
|
+
* `.git` so the agent's own `npm test`/`git diff` work).
|
|
79
|
+
* - non-git → file-copy of `workingDir` excluding `.git`/secrets/gitignored
|
|
80
|
+
* + symlink the real `node_modules` (read-through, never a promote target).
|
|
81
|
+
*
|
|
82
|
+
* Fail-closed (#SR-2): a create failure throws — the caller surfaces it and
|
|
83
|
+
* does NOT spawn against a half-built shadow.
|
|
84
|
+
*/
|
|
85
|
+
static create(taskId: string, workingDir: string, env?: ShadowEnv, opts?: {
|
|
86
|
+
trackBranch?: TrackBranchSpec;
|
|
87
|
+
}): Promise<WorkspaceShadow>;
|
|
88
|
+
/**
|
|
89
|
+
* Capture the shadow-vs-real diff AFTER `await handle.done`, bounded STRICTLY
|
|
90
|
+
* to the tracked set (#PM-2 / agy H2):
|
|
91
|
+
* - created — in shadow, NOT in the tracked baseline.
|
|
92
|
+
* - modified — tracked path whose shadow content differs from the baseline.
|
|
93
|
+
* - deleted — was in the tracked baseline AND the agent removed it from the
|
|
94
|
+
* shadow (NOT merely "absent from shadow", which would falsely
|
|
95
|
+
* flag every excluded path → catastrophic-delete).
|
|
96
|
+
*
|
|
97
|
+
* git → `git diff` (already tracked-scoped); non-git → tree-compare bounded to
|
|
98
|
+
* the tracked set. Across revise rounds the diff is CUMULATIVE shadow-vs-real.
|
|
99
|
+
*/
|
|
100
|
+
captureDiff(): Promise<ShadowDiffFile[]>;
|
|
101
|
+
private captureGitDiff;
|
|
102
|
+
private captureCopyDiff;
|
|
103
|
+
/**
|
|
104
|
+
* CP-14 Wave A (`worktree_merge`) — commit the shadow worktree's full content
|
|
105
|
+
* (the dirty-replay baseline + the implementor's edits + any new untracked
|
|
106
|
+
* files) onto the persistent track branch, and return the committed tip SHA
|
|
107
|
+
* (the merge-train input). This REPLACES the legacy in-place {@link promote}
|
|
108
|
+
* for track shadows: the user tree is NOT touched here — the change lands only
|
|
109
|
+
* when the merge gate promotes the integration tip.
|
|
110
|
+
*
|
|
111
|
+
* Deterministic for recovery-replay stability: pinned bot identity + a pinned
|
|
112
|
+
* `@0` author/committer date + hooks/gpg disabled, so a re-run over identical
|
|
113
|
+
* content yields an identical SHA. `--allow-empty` so a no-op track still
|
|
114
|
+
* produces a real base-rooted tip (no `#EF-1`-style born-halt; the merge-train
|
|
115
|
+
* fast-forwards it).
|
|
116
|
+
*
|
|
117
|
+
* Requires a git track-branch shadow (created with `opts.trackBranch`); throws
|
|
118
|
+
* otherwise — a missing tip must FAIL CLOSED upstream, never be silently empty.
|
|
119
|
+
*
|
|
120
|
+
* REVIEW-INTEGRITY (#598-11 parity, Stage-1 HIGH): the commit is built from the
|
|
121
|
+
* REVIEWED, drift-checked `diff` content (the in-memory `ShadowDiffFile[]` the
|
|
122
|
+
* caller already validated against the reviewed snapshot) via a THROWAWAY index
|
|
123
|
+
* + `git hash-object`/`commit-tree` — the live worktree is NEVER re-read. This
|
|
124
|
+
* matches the legacy `promote(diff)`, which applies the captured `diff[].content`
|
|
125
|
+
* (not a re-read), so a detached writer that mutates the worktree after the
|
|
126
|
+
* drift-check cannot inject UNREVIEWED bytes into the track tip. The branch sits
|
|
127
|
+
* at the pinned base (its only commit-to-be) and the diff is "everything vs
|
|
128
|
+
* base", so `read-tree base` + apply-diff reconstructs exactly the reviewed tree.
|
|
129
|
+
*/
|
|
130
|
+
commitTrack(diff: readonly ShadowDiffFile[], opts?: {
|
|
131
|
+
message?: string;
|
|
132
|
+
}): Promise<string>;
|
|
133
|
+
/**
|
|
134
|
+
* Materialize the changed-file SET over the TRACKED SET ONLY (#PM-1/#PM-2):
|
|
135
|
+
* copy the shadow's changed files onto the real tree (create/overwrite) +
|
|
136
|
+
* delete the real files that were in the tracked baseline AND the agent
|
|
137
|
+
* removed. NEVER touches a real-tree path outside the tracked set.
|
|
138
|
+
*
|
|
139
|
+
* Idempotent (#PR-4): a `promoted` marker short-circuits — a packet +
|
|
140
|
+
* recovery double-fire is a safe no-op.
|
|
141
|
+
*
|
|
142
|
+
* Per-file TOCTOU guard (#PR-2): before overwrite/delete, the real file's
|
|
143
|
+
* current hash is compared to the pre-task hash (null = absent). A mismatch
|
|
144
|
+
* (concurrent edit/create/delete) is ESCALATED via the returned conflicts —
|
|
145
|
+
* never blind-clobbered.
|
|
146
|
+
*
|
|
147
|
+
* Fail-closed (#SR-2): on any conflict OR fs error the caller surfaces
|
|
148
|
+
* "could not promote — N files at <paths>". Returns the conflicts/errors so
|
|
149
|
+
* the caller renders them; throws only on a marker-write failure.
|
|
150
|
+
*/
|
|
151
|
+
promote(diff: ShadowDiffFile[], opts?: {
|
|
152
|
+
/**
|
|
153
|
+
* PHASE-589/469 W3.1 (C1) — capture a durable revert manifest for a TEAM
|
|
154
|
+
* track. For each in-scope, hash-matched file the promote is about to
|
|
155
|
+
* apply, read its PRE-IMAGE content + hash BEFORE the tree mutates and
|
|
156
|
+
* emit a {@link PromoteManifestInput} entry. `trackIndex` / the starting
|
|
157
|
+
* `promoteOrder` are caller-supplied (the group-wide monotonic order); the
|
|
158
|
+
* captured entries carry `promoteOrder = base + i` in capture order.
|
|
159
|
+
* Single-impl promotes pass no opts → byte-identical to the legacy path.
|
|
160
|
+
*
|
|
161
|
+
* `persist` (REQUIRED when `captureManifest` is set) is awaited with the
|
|
162
|
+
* captured entries BEFORE the FIRST file is mutated (LOCK #589-I: the
|
|
163
|
+
* manifest is durable before the tree changes, so a mid-promote crash
|
|
164
|
+
* still leaves a recoverable undo record). The entries are captured in a
|
|
165
|
+
* read-only PRE-PASS (no mutation), persisted, THEN applied.
|
|
166
|
+
*/
|
|
167
|
+
captureManifest?: {
|
|
168
|
+
trackIndex: number;
|
|
169
|
+
promoteOrderBase: number;
|
|
170
|
+
persist: (entries: PromoteManifestInput[]) => Promise<void>;
|
|
171
|
+
};
|
|
172
|
+
}): Promise<{
|
|
173
|
+
/**
|
|
174
|
+
* Whether this call actually MATERIALIZED files onto the real tree. `false`
|
|
175
|
+
* means it was an idempotent no-op (a prior promote already landed via the
|
|
176
|
+
* durable `promoted` marker — a packet + recovery double-fire). The caller
|
|
177
|
+
* uses this to suppress duplicate `promoting`/`promoted` progress + the
|
|
178
|
+
* "Applied N files" milestone on a re-delivered TaskAuthorized packet.
|
|
179
|
+
*/
|
|
180
|
+
materialized: boolean;
|
|
181
|
+
promoted: string[];
|
|
182
|
+
conflicts: string[];
|
|
183
|
+
errors: Array<{
|
|
184
|
+
path: string;
|
|
185
|
+
error: string;
|
|
186
|
+
}>;
|
|
187
|
+
/**
|
|
188
|
+
* PHASE-589/469 W3.1 (C1) — the captured pre-image manifest entries (only
|
|
189
|
+
* populated when `opts.captureManifest` was passed). The caller persists
|
|
190
|
+
* these via `RevertManifestStore.appendPromote` BEFORE relying on the
|
|
191
|
+
* applied tree (the capture itself already ran before the mutation). One
|
|
192
|
+
* entry per file that the promote actually applied.
|
|
193
|
+
*/
|
|
194
|
+
manifestEntries: PromoteManifestInput[];
|
|
195
|
+
}>;
|
|
196
|
+
/**
|
|
197
|
+
* Tear down the shadow on every non-`TaskAuthorized` terminal (reject/abort,
|
|
198
|
+
* each Halted reason, parser-empty, session-end, crash). Leaves the real tree
|
|
199
|
+
* byte-identical to its pre-task state (a discard never touched it).
|
|
200
|
+
*
|
|
201
|
+
* git-worktree → `git worktree remove --force` (+ `git worktree prune`),
|
|
202
|
+
* NEVER raw `rm -rf` (leaks `.git/worktrees/`, #GC-2). Non-git copy → `rm -rf`
|
|
203
|
+
* (the symlinked `node_modules` is unlinked, never follow-delete).
|
|
204
|
+
*
|
|
205
|
+
* Before teardown, terminate task-spawned children rooted in the shadow; if
|
|
206
|
+
* removal still fails (stray watcher), the durable marker is left in place so
|
|
207
|
+
* the next-startup GC retries (#GC-2 lazy cleanup).
|
|
208
|
+
*
|
|
209
|
+
* `preserveStateDir` (the ORPHAN-teardown mode, restart-race fix 2026-06-11):
|
|
210
|
+
* tear down ONLY this instance's uuid-suffixed `shadowDir` and NEVER the
|
|
211
|
+
* per-task SHARED `stateDir`. A restart reuses the SAME taskId, so a fresh
|
|
212
|
+
* shadow B's durable `pending` marker lives in the same `stateDir`; tearing
|
|
213
|
+
* down the orphaned old instance A with a full `discard()` would `fs.rm` that
|
|
214
|
+
* SHARED dir and delete B's authorized-but-pending #PR-4 marker (B becomes
|
|
215
|
+
* unrecoverable after a crash — a sealed-LOCK violation). The orphan branch in
|
|
216
|
+
* QuorumLoop.discardShadow passes `{ preserveStateDir: true }` because the
|
|
217
|
+
* shared `stateDir` belongs to the LIVE mapped shadow B, not the orphan.
|
|
218
|
+
*/
|
|
219
|
+
discard(opts?: {
|
|
220
|
+
preserveStateDir?: boolean;
|
|
221
|
+
}): Promise<void>;
|
|
222
|
+
/**
|
|
223
|
+
* Orphan-teardown shorthand (restart-race fix 2026-06-11): tear down ONLY this
|
|
224
|
+
* instance's `shadowDir` (worktree-aware per #GC-2) and PRESERVE the SHARED
|
|
225
|
+
* per-task `stateDir` — used by `QuorumLoop.discardShadow`'s instance-mismatch
|
|
226
|
+
* branch when a newer shadow (same taskId) has replaced this one in the map.
|
|
227
|
+
*/
|
|
228
|
+
discardOrphan(): Promise<void>;
|
|
229
|
+
private removeGitWorktree;
|
|
230
|
+
private writeStateMarker;
|
|
231
|
+
private readStateMarker;
|
|
232
|
+
/**
|
|
233
|
+
* Read the durable promote-state marker WITHOUT mutating the tree (#PR-4). The
|
|
234
|
+
* QuorumLoop checks this BEFORE `captureDiff` so a re-delivered TaskAuthorized
|
|
235
|
+
* packet (the promote already landed) short-circuits to a silent no-op without
|
|
236
|
+
* a wasteful diff re-capture + without re-emitting the `promoting`/`promoted`
|
|
237
|
+
* progress + the "Applied N files" milestone. `null` = no marker (a fresh /
|
|
238
|
+
* torn-down shadow) → caller treats it as not-yet-promoted (the promote()
|
|
239
|
+
* idempotency guard is still the authority).
|
|
240
|
+
*/
|
|
241
|
+
readPromoteState(): Promise<ShadowPromoteState | null>;
|
|
242
|
+
/**
|
|
243
|
+
* Reconstruct a `WorkspaceShadow` from a durable marker (a crash lost the
|
|
244
|
+
* in-memory tracked set + pre-task hashes). The tracked set is re-derived
|
|
245
|
+
* from the live shadow + real tree; promote then re-captures the diff. Used
|
|
246
|
+
* ONLY by the recovery/GC paths (`reopenShadow` / `reapOrphanShadows`).
|
|
247
|
+
*/
|
|
248
|
+
static fromRecovered(recovered: RecoveredShadow, env?: ShadowEnv): Promise<WorkspaceShadow>;
|
|
249
|
+
}
|
|
250
|
+
/** A recovered shadow state (read from the durable per-task marker). */
|
|
251
|
+
export interface RecoveredShadow {
|
|
252
|
+
taskId: string;
|
|
253
|
+
shadowDir: string;
|
|
254
|
+
workingDir: string;
|
|
255
|
+
isGit: boolean;
|
|
256
|
+
promoteState: ShadowPromoteState;
|
|
257
|
+
createdAtMs: number;
|
|
258
|
+
/** The durable state dir for this task (for cleanup). */
|
|
259
|
+
stateDir: string;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Read every durable per-task shadow marker under the state root. The reconnect/
|
|
263
|
+
* startup recovery (#PR-4) reads these to find an authorized-but-pending shadow
|
|
264
|
+
* to promote; the GC reaper (#GC-1) reads them to delete orphaned shadows.
|
|
265
|
+
*/
|
|
266
|
+
export declare function listRecoverableShadows(env?: ShadowEnv): Promise<RecoveredShadow[]>;
|
|
267
|
+
/**
|
|
268
|
+
* Reconstruct a `WorkspaceShadow` from a durable marker so the recovery path
|
|
269
|
+
* can re-run promote/discard against an already-created shadow. The tracked set
|
|
270
|
+
* + pre-task hashes are re-derived from the live shadow vs the real tree (a
|
|
271
|
+
* crash lost the in-memory state). For a git worktree this is `git status`; for
|
|
272
|
+
* a copy shadow it is a tree-compare. The promote then re-captures the diff.
|
|
273
|
+
*/
|
|
274
|
+
export declare function reopenShadow(recovered: RecoveredShadow, env?: ShadowEnv): Promise<WorkspaceShadow | null>;
|
|
275
|
+
/**
|
|
276
|
+
* GC orphaned shadows (#GC-1): on session-start/WS-resync, discard any shadow
|
|
277
|
+
* whose task is NOT in `activeTaskIds` AND whose promote-state is NOT `promoted`
|
|
278
|
+
* pending an authorized-but-not-yet-promoted recovery, PLUS a TTL on shadow age.
|
|
279
|
+
* NEVER deletes an authorized-but-pending shadow (that is the recovery path's job).
|
|
280
|
+
*
|
|
281
|
+
* `keepTaskIds` are the tasks the desktop still considers active/recoverable
|
|
282
|
+
* (the caller passes the active task id + any authorized-but-pending tasks it
|
|
283
|
+
* intends to recover). A `promoted` shadow whose code already landed is GC'd
|
|
284
|
+
* (its real tree is done) regardless of TTL.
|
|
285
|
+
*/
|
|
286
|
+
export declare function reapOrphanShadows(keepTaskIds: ReadonlySet<string>, env?: ShadowEnv): Promise<{
|
|
287
|
+
reaped: string[];
|
|
288
|
+
retained: string[];
|
|
289
|
+
}>;
|
|
290
|
+
export {};
|