@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,62 @@
|
|
|
1
|
+
import type { LocalGemmaPlannerRunner } from '../planner/local-gemma';
|
|
2
|
+
import type { AgentKind, ReviewerRole, VerdictKind } from './types';
|
|
3
|
+
/** Per-verdict context (seat/role/agent) — carried for observability; the Gemma
|
|
4
|
+
* classification itself is context-free (deterministic on `rawText`). */
|
|
5
|
+
export interface VerdictClassifierContext {
|
|
6
|
+
seatId: number;
|
|
7
|
+
role: ReviewerRole;
|
|
8
|
+
agent: AgentKind;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A classifier's resolved decision. `reason` is set ONLY on a fail-closed ESCALATE
|
|
12
|
+
* (a SAFE closed label — never raw model/reviewer text); a genuine reviewer verdict
|
|
13
|
+
* (incl. a genuine ESCALATE the reviewer actually chose) leaves `reason` undefined
|
|
14
|
+
* so the provider keeps the reviewer's own reasoning (D5/MED-C).
|
|
15
|
+
*/
|
|
16
|
+
export interface VerdictClassification {
|
|
17
|
+
verdict: VerdictKind;
|
|
18
|
+
reason?: string;
|
|
19
|
+
}
|
|
20
|
+
export type VerdictClassifier = (rawText: string, ctx: VerdictClassifierContext) => Promise<VerdictClassification>;
|
|
21
|
+
/** SAFE closed labels for a fail-closed ESCALATE (D3/D5/MED-C). Never raw text. */
|
|
22
|
+
export declare const VERDICT_CLASSIFIER_UNCERTAIN = "verdict_classifier_uncertain";
|
|
23
|
+
export declare const VERDICT_CLASSIFIER_CONFLICT = "verdict_classifier_conflict";
|
|
24
|
+
export declare const VERDICT_CLASSIFIER_UNAVAILABLE = "verdict_classifier_unavailable";
|
|
25
|
+
/**
|
|
26
|
+
* Build a fail-closed Gemma verdict classifier. Order:
|
|
27
|
+
* (1) empty `rawText.trim()===''` → ESCALATE (no `classify` call);
|
|
28
|
+
* (2) [D2a] conflicting standalone verdicts → ESCALATE (before Gemma);
|
|
29
|
+
* (3) classify (8s race) → validate JSON/enum/`confidence:'high'` per D3;
|
|
30
|
+
* (4) REVISE → require `extractSuggestedChanges(postVerdictReasoning(rawText))`
|
|
31
|
+
* yields ≥1 change (D5), else ESCALATE.
|
|
32
|
+
* Whole body try/catch-wrapped; any throw / timeout → ESCALATE (unavailable).
|
|
33
|
+
* A genuine non-ESCALATE verdict (and a genuine reviewer ESCALATE) returns NO
|
|
34
|
+
* `reason` so the provider keeps the reviewer's own reasoning.
|
|
35
|
+
*/
|
|
36
|
+
export declare function makeGemmaVerdictClassifier(runner: LocalGemmaPlannerRunner, opts?: {
|
|
37
|
+
timeoutMs?: number;
|
|
38
|
+
}): VerdictClassifier;
|
|
39
|
+
/**
|
|
40
|
+
* A trivial classifier that returns ESCALATE (with a closed `reason` label) for
|
|
41
|
+
* every input, with no runner. Installed by the wiring when flag=`gemma` but the
|
|
42
|
+
* Gemma runner is null at boot (Ollama unreachable) — so `gemma` mode NEVER
|
|
43
|
+
* silently degrades to the regex parser (agy-MED-1).
|
|
44
|
+
*/
|
|
45
|
+
export declare function alwaysEscalateClassifier(reason: string): VerdictClassifier;
|
|
46
|
+
/**
|
|
47
|
+
* [D5] Resolve the `ReviewerVerdict`'s `reasoning` + `suggested_changes` from a
|
|
48
|
+
* classification, shared by all three providers' `buildVerdict` so the safety-
|
|
49
|
+
* critical mapping lives in ONE audited place:
|
|
50
|
+
* - `reasoning`: a fail-closed ESCALATE (has a closed `reason` label) → that
|
|
51
|
+
* label (never raw text, parity with the old `parse_failure`→template); every
|
|
52
|
+
* other verdict (incl. a genuine reviewer ESCALATE, `reason` undefined) → the
|
|
53
|
+
* reviewer's raw text verbatim.
|
|
54
|
+
* - `suggested_changes`: REVISE → `extractSuggestedChanges(postVerdictReasoning(
|
|
55
|
+
* rawText))` (non-empty by construction — the classifier already gated it);
|
|
56
|
+
* every other verdict → `[]`.
|
|
57
|
+
*/
|
|
58
|
+
export declare function resolveClassifiedVerdictFields(classification: VerdictClassification, rawText: string): {
|
|
59
|
+
verdict: VerdictKind;
|
|
60
|
+
reasoning: string;
|
|
61
|
+
suggested_changes: string[];
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/session/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export type { ResumeOrCreateSessionInput, ResumeOrCreateSessionResult } from './
|
|
|
3
3
|
export { rekeySessionForNewDevices } from './session-rekey';
|
|
4
4
|
export { startDeviceKeyWatcher } from './device-key-watcher';
|
|
5
5
|
export { registerDeviceEncryptionKey } from './register-device-key';
|
|
6
|
+
export { prepareEventTimestamp, _resetPrepareEventTimestampForTesting, } from './prepare-event-timestamp';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns an ISO-8601 timestamp with millisecond precision that is
|
|
3
|
+
* STRICTLY GREATER than any previous timestamp returned for the same
|
|
4
|
+
* `orderingKey` within this process.
|
|
5
|
+
*
|
|
6
|
+
* Formula: `Math.max(baseMs, lastMs + 1, floorMs)` where `floorMs` is
|
|
7
|
+
* `notBeforeMs + 1` when a finite `notBeforeMs` is supplied (else 0), and:
|
|
8
|
+
* - baseMs = parsed agentClock if provided (and valid), else Date.now()
|
|
9
|
+
* - lastMs = previously-emitted ms for this orderingKey (or 0 if first)
|
|
10
|
+
*
|
|
11
|
+
* `agentClock` ANCHORS the timestamp when provided. This is the load-bearing
|
|
12
|
+
* behavior for agy's transcript replay: agy emits events with their original
|
|
13
|
+
* `created_at` even during a backfill (so subscription clients see them in
|
|
14
|
+
* logical order, not in replay-arrival order). For hook-driven plugins
|
|
15
|
+
* (claude/codex/gemini), `agentClock` is left undefined and baseMs = wallMs.
|
|
16
|
+
*
|
|
17
|
+
* Memory: bounded LRU with cap=MAX_LRU_KEYS. Eviction order is least-
|
|
18
|
+
* recently-touched, so active orderingKeys are never evicted. Resets on
|
|
19
|
+
* process restart (correct: restart is a new lifecycle).
|
|
20
|
+
*/
|
|
21
|
+
export declare function prepareEventTimestamp(opts: {
|
|
22
|
+
orderingKey: string;
|
|
23
|
+
agentClock?: string;
|
|
24
|
+
notBeforeMs?: number;
|
|
25
|
+
}): string;
|
|
26
|
+
/**
|
|
27
|
+
* Test-only: clear the per-key map. Used by jest/vitest to reset state
|
|
28
|
+
* between tests. Not exported from the package root.
|
|
29
|
+
*/
|
|
30
|
+
export declare function _resetPrepareEventTimestampForTesting(): void;
|
|
@@ -36,3 +36,43 @@ export interface RekeyOptions {
|
|
|
36
36
|
* @returns The number of new grants that succeeded.
|
|
37
37
|
*/
|
|
38
38
|
export declare function rekeySessionForNewDevices(sessionId: string, sessionKey: string, appSyncClient: AppSyncClient, options?: RekeyOptions): Promise<number>;
|
|
39
|
+
/**
|
|
40
|
+
* Options for {@link awaitOwnSessionKeyGrant}.
|
|
41
|
+
*/
|
|
42
|
+
export interface AwaitOwnGrantOptions {
|
|
43
|
+
/** Poll interval in ms. Default 5000. */
|
|
44
|
+
pollIntervalMs?: number;
|
|
45
|
+
/** Max poll attempts. Default 6 (30s total at 5s intervals). */
|
|
46
|
+
maxAttempts?: number;
|
|
47
|
+
/** Authenticated AppSyncClient. */
|
|
48
|
+
appSyncClient: AppSyncClient;
|
|
49
|
+
/** Fired on successful decrypt. Telemetry-only — never thrown. */
|
|
50
|
+
onSuccess?: (attemptCount: number) => void;
|
|
51
|
+
/** Fired after maxAttempts exhausted. Telemetry-only — never thrown. */
|
|
52
|
+
onTimeout?: (attemptCount: number) => void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Wait for this device's deviceId to appear in `session.encryptedKeys`.
|
|
56
|
+
*
|
|
57
|
+
* Triggered when {@link keychainManager.getSessionKey} returned null on
|
|
58
|
+
* resume AND at least one other device IS in encryptedKeys (so some other
|
|
59
|
+
* device can mint a grant for us via grantSessionKey). Caller must have
|
|
60
|
+
* already invoked {@link registerDeviceEncryptionKey} BEFORE this helper —
|
|
61
|
+
* that's what causes mobile's DeviceKeyWatcher subscription to fire and
|
|
62
|
+
* grant the session key to our (possibly rotated) pubKey.
|
|
63
|
+
*
|
|
64
|
+
* This helper deliberately bypasses {@link keychainManager.getSessionKey}
|
|
65
|
+
* (which has a cache short-circuit) and instead:
|
|
66
|
+
* 1. Calls {@link AppSyncClient.getSession} each poll for fresh
|
|
67
|
+
* `encryptedKeys`.
|
|
68
|
+
* 2. Looks for our `deviceId` in the fresh list.
|
|
69
|
+
* 3. If found, calls {@link cryptoService.decryptSessionKey} directly.
|
|
70
|
+
* 4. On success, populates the keychain cache (so subsequent
|
|
71
|
+
* `getSessionKey` calls hit the cache). The cache is NEVER populated
|
|
72
|
+
* on failure — there's no null sentinel.
|
|
73
|
+
*
|
|
74
|
+
* Returns the decrypted session key on success, or `null` after timeout.
|
|
75
|
+
* Errors are swallowed inside the loop (best-effort polling); telemetry
|
|
76
|
+
* surfaces success vs timeout via the optional callbacks.
|
|
77
|
+
*/
|
|
78
|
+
export declare function awaitOwnSessionKeyGrant(sessionId: string, options: AwaitOwnGrantOptions): Promise<string | null>;
|
|
@@ -24,6 +24,30 @@ export interface ResumeOrCreateSessionResult {
|
|
|
24
24
|
/** The E2E session key (for encrypting/decrypting events), or null if no encryption */
|
|
25
25
|
sessionKey: string | null;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* CP-1.b IMPL r5 H-2 — Typed error thrown by `prepareSessionEncryption()`
|
|
29
|
+
* when `listServiceDeviceKeys()` returns an empty array across all
|
|
30
|
+
* attempts. Contract per r6/r7 fix: 4 fetch attempts, 3 backoff sleeps:
|
|
31
|
+
* 1s/2s/4s (total ~7s wall on full-failure path). Per CP-1.b design
|
|
32
|
+
* §6.1 lifecycle bullet "Fail-safe:
|
|
33
|
+
* shell-side createSession retries with 1s + 2s + 4s backoff" + LOCK
|
|
34
|
+
* #32 (prewarm custom-resource closes the first-cold-start window
|
|
35
|
+
* structurally; this retry is the disaster-recovery fail-safe).
|
|
36
|
+
*
|
|
37
|
+
* Surfacing this as a typed error (rather than the previous
|
|
38
|
+
* best-effort behavior which built sessions WITHOUT the planner-proxy
|
|
39
|
+
* grant — guaranteeing every subsequent Lambda decrypt would fail)
|
|
40
|
+
* lets the plugin / CLI wrappers display an actionable banner to the
|
|
41
|
+
* user instead of producing a half-broken session.
|
|
42
|
+
*
|
|
43
|
+
* The Lambda emits a matching `PlannerProxyServiceKeyMissing`
|
|
44
|
+
* CloudWatch metric in its `handleClassify` decrypt-failure path; the
|
|
45
|
+
* shell-side typed error closes the funnel at session-create time so
|
|
46
|
+
* the user never reaches a session that can't be decrypted.
|
|
47
|
+
*/
|
|
48
|
+
export declare class PlannerProxyServiceKeyMissingError extends Error {
|
|
49
|
+
constructor(msg: string);
|
|
50
|
+
}
|
|
27
51
|
/**
|
|
28
52
|
* Prepare E2E encryption for a new session.
|
|
29
53
|
*
|
|
@@ -36,6 +60,7 @@ export interface ResumeOrCreateSessionResult {
|
|
|
36
60
|
export declare function prepareSessionEncryption(sessionId: string, appSyncClient: AppSyncClient, logger: Logger): Promise<{
|
|
37
61
|
sessionKey: string;
|
|
38
62
|
encryptedKeys: EncryptedSessionKey[];
|
|
63
|
+
skippedDeviceIds: string[];
|
|
39
64
|
} | null>;
|
|
40
65
|
/**
|
|
41
66
|
* Resume an existing session or create a new one.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function makeTmpDir(prefix?: string): Promise<string>;
|
|
2
|
+
export declare function git(cwd: string, ...args: string[]): Promise<string>;
|
|
3
|
+
export declare function writeFile(file: string, content: string): Promise<void>;
|
|
4
|
+
/**
|
|
5
|
+
* Initialises a git repo at `dir`, commits initial empty-tree marker so
|
|
6
|
+
* `git status --porcelain` works.
|
|
7
|
+
*/
|
|
8
|
+
export declare function initGitRepo(dir: string): Promise<void>;
|
|
9
|
+
export declare function gitAdd(cwd: string, file: string): Promise<void>;
|
|
10
|
+
export declare function gitCommit(cwd: string, msg?: string): Promise<void>;
|
|
11
|
+
export declare function cleanup(dir: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ExclusionState, type StructuralSummaryGenerator } from './types';
|
|
2
|
+
export declare function createStructuralSummaryGenerator(): StructuralSummaryGenerator;
|
|
3
|
+
export interface ReadmeCounters {
|
|
4
|
+
excludedAsUntracked: number;
|
|
5
|
+
excludedByGitignore: number;
|
|
6
|
+
excludedByIgnoreFile: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function readReadmePreview(rootPath: string, exclusionState: ExclusionState, countedExactPaths: Set<string>, countedPrunedPrefixes: Set<string>, counters: ReadmeCounters): Promise<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { createStructuralSummaryGenerator, readReadmePreview, } from './generator';
|
|
2
|
+
export { walk as walkRepoTree } from './walker';
|
|
3
|
+
export { isPathAdmissible, isPathInIgnoredPrefixes, isPathAccountedFor, matchesSecretDenyList, SECRET_DENY_LIST, } from './privacy-filter';
|
|
4
|
+
export { readOptIn, addBodyPath, removeBodyPath, optInFilePath, } from './opt-in-store';
|
|
5
|
+
export { compileUserIgnore, emptyUserIgnoreMatcher, } from './user-ignore-matcher';
|
|
6
|
+
export type { DirectoryNode, RepoSummary, StructuralSummary, StructuralSummaryGenerator, GenerateOpts, PrivacyEnvelope, WalkResult, ExclusionState, UserIgnoreMatcher, ParsedManifest, ManifestType, OptInFile, StructuralSummaryErrorKind, } from './types';
|
|
7
|
+
export { StructuralSummaryError } from './types';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExclusionState, ParsedManifest } from '../types';
|
|
2
|
+
export interface ManifestCounters {
|
|
3
|
+
excludedAsUntracked: number;
|
|
4
|
+
excludedByGitignore: number;
|
|
5
|
+
excludedByIgnoreFile: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function parse(rootPath: string, exclusionState: ExclusionState, countedExactPaths: Set<string>, countedPrunedPrefixes: Set<string>, counters: ManifestCounters): Promise<ParsedManifest>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ParsedManifest } from '../types';
|
|
2
|
+
export declare const pyproject: {
|
|
3
|
+
findManifest(rootPath: string): Promise<string | null>;
|
|
4
|
+
parse(file: string): Promise<ParsedManifest>;
|
|
5
|
+
};
|
|
6
|
+
export declare const gomod: {
|
|
7
|
+
findManifest(rootPath: string): Promise<string | null>;
|
|
8
|
+
parse(file: string): Promise<ParsedManifest>;
|
|
9
|
+
};
|
|
10
|
+
export declare const podfile: {
|
|
11
|
+
findManifest(rootPath: string): Promise<string | null>;
|
|
12
|
+
parse(file: string): Promise<ParsedManifest>;
|
|
13
|
+
};
|
|
14
|
+
export declare const gradle: {
|
|
15
|
+
findManifest(rootPath: string): Promise<string | null>;
|
|
16
|
+
parse(file: string): Promise<ParsedManifest>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type OptInFile } from './types';
|
|
2
|
+
import type { Tier } from '../orchestration-shell/types';
|
|
3
|
+
export declare function optInFilePath(): string;
|
|
4
|
+
/**
|
|
5
|
+
* Per Stage 2 r1 Gemini M-1: reader takes `currentTier`. If
|
|
6
|
+
* `parsed.tierAtOptIn !== currentTier`, returns `null` (graceful tier-
|
|
7
|
+
* downgrade invalidation — no error throw).
|
|
8
|
+
*/
|
|
9
|
+
export declare function readOptIn(currentTier: Tier): Promise<OptInFile | null>;
|
|
10
|
+
/**
|
|
11
|
+
* Per Stage 2 r1 Gemini H-3 option (a): widen to `Tier` so callers can
|
|
12
|
+
* pass `args.tier` directly without an unsafe type narrow. Runtime gate
|
|
13
|
+
* inside the function is authoritative; non-MAX throws `tier_gate`.
|
|
14
|
+
*
|
|
15
|
+
* Stage 2 r2 fix (H-1, Codex): validates that `bodyPath` is absolute
|
|
16
|
+
* BEFORE any persistence work. Normalises via `path.resolve()`
|
|
17
|
+
* (defense-in-depth — strips any residual `..` segments) and resolves
|
|
18
|
+
* symlinks via `fs.realpath()`. The realpath result is what gets
|
|
19
|
+
* persisted, so a future `cd` that lands the user in a different repo
|
|
20
|
+
* cannot trip a relative-path match. Throws `StructuralSummaryError(
|
|
21
|
+
* 'invalid_path')` for non-absolute or unresolvable inputs.
|
|
22
|
+
*/
|
|
23
|
+
export declare function addBodyPath(bodyPath: string, currentTier: Tier): Promise<OptInFile>;
|
|
24
|
+
export declare function removeBodyPath(bodyPath: string): Promise<OptInFile>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { ExclusionState } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Stage 2 IMPL r2 fix (H-3, Codex H-2): strict path-containment helper.
|
|
4
|
+
*
|
|
5
|
+
* Returns true iff `rel` (the output of `path.relative(root, target)`)
|
|
6
|
+
* denotes a path OUTSIDE `root` via parent-directory traversal. Required
|
|
7
|
+
* because the naive `rel.startsWith('..')` form falsely classifies valid
|
|
8
|
+
* child names that happen to BEGIN with `..` (e.g., `..scratch/file.ts`,
|
|
9
|
+
* `..hidden`, `..foo/bar`) as outside the root.
|
|
10
|
+
*
|
|
11
|
+
* Correct semantics:
|
|
12
|
+
* rel === '..' → outside (parent of root)
|
|
13
|
+
* rel === '..' + path.sep + 'sib' → outside (sibling of root)
|
|
14
|
+
* rel === '..' + '/' + 'sib' → outside (POSIX form, used by
|
|
15
|
+
* git output / forward-slash
|
|
16
|
+
* callers on Windows)
|
|
17
|
+
* rel === '..foo' → INSIDE (child whose name
|
|
18
|
+
* starts with `..`)
|
|
19
|
+
*
|
|
20
|
+
* Used in: walker.ts `buildExclusionState` (realRootPath outside-repo
|
|
21
|
+
* check + untracked subtree filter) and privacy-filter.ts
|
|
22
|
+
* `isPathAdmissible` (relative-to-realRootPath admission).
|
|
23
|
+
*/
|
|
24
|
+
export declare function isOutsideRoot(rel: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Static secret-file deny-list. Matches `.env`, `.env.*`, `.aws/credentials`,
|
|
27
|
+
* and assorted private-key formats. Matched against absolute-path basename
|
|
28
|
+
* and a few suffix patterns. Per §4.3 step 2 first match.
|
|
29
|
+
*/
|
|
30
|
+
export declare const SECRET_DENY_LIST: readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* Pure path test — returns true if `absolutePath` matches any secret
|
|
33
|
+
* deny-list pattern. The walker uses this to skip secret files silently
|
|
34
|
+
* (no counter increment per §4.3 hard-caps audit-quality note).
|
|
35
|
+
*/
|
|
36
|
+
export declare function matchesSecretDenyList(absolutePath: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Helper exported alongside `isPathAdmissible`: returns true if
|
|
39
|
+
* `absolutePath` is either:
|
|
40
|
+
* (a) an exact entry in `exactPaths` — file-level gitignore match,
|
|
41
|
+
* O(1) `Set.has(p)`; OR
|
|
42
|
+
* (b) equal to OR a descendant of an entry in `dirPrefixes` —
|
|
43
|
+
* directory-level gitignore match, implemented via check-then-step
|
|
44
|
+
* ancestor-walk:
|
|
45
|
+
*
|
|
46
|
+
* let p = absolutePath;
|
|
47
|
+
* while (true) {
|
|
48
|
+
* if (dirPrefixes.has(p)) return true;
|
|
49
|
+
* const parent = path.dirname(p);
|
|
50
|
+
* if (parent === p) return false; // filesystem root reached
|
|
51
|
+
* p = parent;
|
|
52
|
+
* }
|
|
53
|
+
*
|
|
54
|
+
* Key properties (per round-7 revision Codex r6 H-1 + Gemini r6 H-1/M-2):
|
|
55
|
+
*
|
|
56
|
+
* 1. **Signature is 3-arg** `(absolutePath, exactPaths, dirPrefixes)`.
|
|
57
|
+
* The helper does NOT receive `realRootPath`. The walk MUST proceed
|
|
58
|
+
* past `realRootPath` because `git ls-files --directory` may report
|
|
59
|
+
* an ignored ancestor ABOVE the launch root (e.g., parent
|
|
60
|
+
* `.gitignore` ignores `sub/` when launch root is `repo/sub/inner`).
|
|
61
|
+
* 2. **Check-then-step semantics**: check `dirPrefixes.has(p)` BEFORE
|
|
62
|
+
* advancing `p`. This handles the case where `absolutePath` is
|
|
63
|
+
* itself an entry in `dirPrefixes` (e.g., Step 0.5 root admission
|
|
64
|
+
* tests `realRootPath` directly when it is itself ignored).
|
|
65
|
+
* 3. **Loop termination**: when `path.dirname(p) === p` (POSIX `/`,
|
|
66
|
+
* Windows `C:\`). NO early termination at `realRootPath`.
|
|
67
|
+
*
|
|
68
|
+
* Lookup cost is O(absolute filesystem depth) (typically <30 on any sane
|
|
69
|
+
* mount tree), independent of `|dirPrefixes|`.
|
|
70
|
+
*/
|
|
71
|
+
export declare function isPathInIgnoredPrefixes(absolutePath: string, exactPaths: Set<string>, dirPrefixes: Set<string>): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* INTERNAL helper (not exported from the module index, but exported here
|
|
74
|
+
* so the manifest dispatcher + README reader can import it). Returns true
|
|
75
|
+
* iff `realFile` is already accounted for in the walker's two-set ledger
|
|
76
|
+
* (exact match OR equal-to-or-descendant-of an entry in pruned prefixes).
|
|
77
|
+
*
|
|
78
|
+
* Same canonical algorithm as `isPathInIgnoredPrefixes` — 3-arg signature,
|
|
79
|
+
* check-then-step, filesystem-root termination. Per round-7 revision
|
|
80
|
+
* Gemini r6 M-1 + Codex r6 H-1 + Gemini r6 M-2.
|
|
81
|
+
*/
|
|
82
|
+
export declare function isPathAccountedFor(realFile: string, countedExactPaths: Set<string>, countedPrunedPrefixes: Set<string>): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Order of checks (mirrors §4.3 step 2, first match wins):
|
|
85
|
+
* 1. secret (deny-list path-glob match — operates on basename + suffix).
|
|
86
|
+
* 2. untracked (`state.untrackedSet.has(absolutePath)`; SKIPPED if
|
|
87
|
+
* notInGitRepo).
|
|
88
|
+
* 3. gitignore (`isPathInIgnoredPrefixes(...)`; SKIPPED if notInGitRepo).
|
|
89
|
+
* 4. userIgnore (`state.userIgnoreMatcher.ignores(path.relative(
|
|
90
|
+
* realRootPath, absolutePath), isDir)`).
|
|
91
|
+
*
|
|
92
|
+
* Pure in-memory check; consults only the pre-built `state`. No I/O.
|
|
93
|
+
*
|
|
94
|
+
* `isDir` (Stage 2 r2 fix, M-2 Gemini M-1): walker passes
|
|
95
|
+
* `entry.isDirectory()` here. File-only callers (manifest dispatcher,
|
|
96
|
+
* README reader) accept the default `false`. The flag is consumed by
|
|
97
|
+
* `userIgnoreMatcher.ignores()` to honour trailing-slash `dir/` rules.
|
|
98
|
+
*
|
|
99
|
+
* Caller is responsible for incrementing the appropriate counter on
|
|
100
|
+
* `privacyEnvelope` when `admissible === false` (so audit signal is
|
|
101
|
+
* preserved). `reason === 'secret'` is silent (no counter — per §4.3
|
|
102
|
+
* hard-caps audit-quality note).
|
|
103
|
+
*/
|
|
104
|
+
export declare function isPathAdmissible(absolutePath: string, state: ExclusionState, isDir?: boolean): {
|
|
105
|
+
admissible: true;
|
|
106
|
+
} | {
|
|
107
|
+
admissible: false;
|
|
108
|
+
reason: 'secret' | 'untracked' | 'gitignore' | 'userIgnore';
|
|
109
|
+
};
|
|
110
|
+
export type { ExclusionState } from './types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TOCTOU-safe text file read. Returns the file contents as UTF-8 or
|
|
3
|
+
* `null` on any refusal / error. See module JSDoc for the syscall
|
|
4
|
+
* sequence + threat model.
|
|
5
|
+
*
|
|
6
|
+
* @param absPath Absolute filesystem path. Caller is responsible for
|
|
7
|
+
* path absolutism + admission-oracle checks BEFORE
|
|
8
|
+
* invoking this function; this helper only guards the
|
|
9
|
+
* lstat→open transition.
|
|
10
|
+
*/
|
|
11
|
+
export declare function safeReadTextFile(absPath: string): Promise<string | null>;
|