@quantiya/codevibe-core 2.0.1 → 2.0.3
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__/prompt-parser.test.d.ts +1 -0
- package/dist/adapter/registry.d.ts +69 -2
- package/dist/appsync/__tests__/appsync-client-event-source-filter.test.d.ts +1 -0
- package/dist/appsync/__tests__/appsync-client-task-group.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 +621 -10
- package/dist/appsync/event-throttle.d.ts +28 -0
- package/dist/appsync/index.d.ts +3 -0
- package/dist/appsync/queries.d.ts +19 -0
- package/dist/audit-keys/index.d.ts +32 -0
- package/dist/auth/auth-service.d.ts +32 -2
- package/dist/auth/auth-telemetry.d.ts +19 -1
- package/dist/auth/index.d.ts +1 -0
- package/dist/companion-mode/__tests__/detect-parallel.test.d.ts +1 -0
- package/dist/companion-mode/index.d.ts +4 -3
- package/dist/companion-mode/persist-preference.d.ts +1 -1
- 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 +6 -1
- package/dist/index.js +427 -124
- package/dist/keychain/__tests__/keychain-backend.test.d.ts +1 -0
- package/dist/keychain/keychain-backend.d.ts +82 -0
- 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__/class-a-sign.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__/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__/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__/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__/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 +33 -1
- package/dist/local-executor/class-a-emit.d.ts +3 -1
- package/dist/local-executor/class-a-sign.d.ts +57 -0
- package/dist/local-executor/class-b-consumer.d.ts +159 -4
- 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 +1 -1
- package/dist/local-executor/implementor-argv.d.ts +183 -0
- package/dist/local-executor/index.d.ts +44 -3
- package/dist/local-executor/local-executor-impl.d.ts +645 -4
- 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 +29 -1
- 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 +238 -4
- 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/detect-agents.d.ts +15 -2
- package/dist/orchestration/setup-types.d.ts +2 -1
- 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-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-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-verdict-classifier-wiring.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__/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-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__/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__/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__/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__/serialize-submissions.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__/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 +336 -1
- package/dist/orchestration-shell/cli.js +40580 -4692
- package/dist/orchestration-shell/components/AuditLogPanel.d.ts +11 -0
- package/dist/orchestration-shell/components/ConversationPane.d.ts +7 -1
- 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 +7 -0
- package/dist/orchestration-shell/components/InputBar.d.ts +17 -3
- 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 +81 -15
- package/dist/orchestration-shell/components/ReviewerSetupWizard.d.ts +24 -0
- package/dist/orchestration-shell/components/StatusBar.d.ts +15 -2
- 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 +1 -1
- package/dist/orchestration-shell/gate-decision-submit.d.ts +245 -0
- package/dist/orchestration-shell/gate-prompts.d.ts +361 -3
- package/dist/orchestration-shell/index.d.ts +613 -1
- package/dist/orchestration-shell/ink-runtime.d.ts +21 -1
- 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/non-tty-fallback.d.ts +21 -0
- package/dist/orchestration-shell/quorum-loop.d.ts +1900 -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 +20 -1
- 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/task-progress.d.ts +122 -0
- package/dist/orchestration-shell/team-decompose.d.ts +196 -0
- package/dist/orchestration-shell/types.d.ts +363 -3
- 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__/local-gemma.test.d.ts +1 -0
- package/dist/planner/index.d.ts +2 -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 +16 -6
- 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/index.d.ts +1 -0
- package/dist/session/prepare-event-timestamp.d.ts +30 -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 +3 -1
- package/dist/types/reviewer.d.ts +6 -6
- package/package.json +7 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,85 @@
|
|
|
1
|
+
type BackendKind = 'keytar' | 'file';
|
|
2
|
+
/**
|
|
3
|
+
* Is the OS-native keyring service STRUCTURALLY UNREACHABLE in THIS process?
|
|
4
|
+
*
|
|
5
|
+
* - macOS / Windows: the OS keychain (Keychain / Credential Manager) is always
|
|
6
|
+
* present, so this is always false.
|
|
7
|
+
* - Linux: keytar/libsecret reaches the Secret Service over the D-Bus *session*
|
|
8
|
+
* bus, which it discovers via several mechanisms. On a truly headless box
|
|
9
|
+
* (Docker, CI, `ssh` without a GUI/forwarded bus) NONE of them resolve, so
|
|
10
|
+
* keytar's native addon LOADS but every operation throws ("Cannot autolaunch
|
|
11
|
+
* D-Bus without X11 $DISPLAY" / "no Secret Service"). We return true only when
|
|
12
|
+
* EVERY discovery signal is absent — being conservative so we never downgrade
|
|
13
|
+
* a machine where the keyring could actually work:
|
|
14
|
+
* 1. a GUI display (`DISPLAY` / `WAYLAND_DISPLAY`) — D-Bus can X11/Wayland-
|
|
15
|
+
* autolaunch a session bus + keyring from these even with no bus env set;
|
|
16
|
+
* 2. an explicit `DBUS_SESSION_BUS_ADDRESS`;
|
|
17
|
+
* 3. the per-user bus socket — canonically `$XDG_RUNTIME_DIR/bus`, usually
|
|
18
|
+
* `/run/user/<uid>/bus` under systemd; we check both.
|
|
19
|
+
*
|
|
20
|
+
* IMPORTANT: this returning true means "no OS keyring is REACHABLE in this
|
|
21
|
+
* process", NOT "no keytar identity has ever existed on this machine". The same
|
|
22
|
+
* machine could have a keytar identity from a prior desktop session (e.g. GUI
|
|
23
|
+
* login, then SSH in with no forwarded bus). Auto-selecting the file backend in
|
|
24
|
+
* that case would fork the device identity — so the caller gates the auto-fallback
|
|
25
|
+
* on a "keytar was used here" marker (see `autoFileOrRefuse`), refusing to
|
|
26
|
+
* silently downgrade a machine that has a real keyring identity. A transiently-
|
|
27
|
+
* locked desktop keyring still has a bus/display, so it never reaches the
|
|
28
|
+
* fallback at all.
|
|
29
|
+
*/
|
|
30
|
+
export declare function osKeyringStructurallyAbsent(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Do durable file-backend credentials already exist on this machine? True when
|
|
33
|
+
* ~/.codevibe holds any `<service>.json` credential file (written by a prior
|
|
34
|
+
* file-backend session — a headless auto-fallback OR an explicit opt-in run).
|
|
35
|
+
* The marker dotfiles (`.keyring-used`) are excluded by the `.json` test, and
|
|
36
|
+
* `<service>.json` is the ONLY `.json` we ever write into ~/.codevibe
|
|
37
|
+
* (writeFileStore → fileStorePath).
|
|
38
|
+
*
|
|
39
|
+
* This is the signal that closes the REVERSE fork: a machine that fell back to
|
|
40
|
+
* file storage and wrote its device identity there, now running in a session
|
|
41
|
+
* where the OS keyring is available again. Selecting keytar at that point would
|
|
42
|
+
* read an EMPTY keyring and mint a brand-new device identity — orphaning the
|
|
43
|
+
* existing file identity and breaking the user's E2E sessions. So when durable
|
|
44
|
+
* file creds exist we keep using the file backend instead of switching to keytar.
|
|
45
|
+
* Checked on every platform (the opt-in path can create file creds anywhere) and
|
|
46
|
+
* checked in initBackends right AFTER the explicit `CODEVIBE_ALLOW_FILE_KEYCHAIN=1`
|
|
47
|
+
* opt-in (which always routes to file) but BEFORE the keytar probe, so the no-fork
|
|
48
|
+
* guarantee holds whether or not keytar loads in this session.
|
|
49
|
+
*
|
|
50
|
+
* Exported for direct unit testing — the keytar load itself goes through an
|
|
51
|
+
* `eval('require')` that escapes the test mock registry, so the predicate is
|
|
52
|
+
* pinned down here rather than only through a (non-deterministic) init path.
|
|
53
|
+
*/
|
|
54
|
+
export declare function fileStoreHasCredentials(): boolean;
|
|
55
|
+
/** True if the file backend was auto-selected (no OS keyring service present). */
|
|
56
|
+
export declare function wasAutoFileFallback(): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* The active backend kind, or `null` if not yet initialized / init failed.
|
|
59
|
+
*
|
|
60
|
+
* NON-THROWING diagnostic accessor — distinct from the public
|
|
61
|
+
* `getActiveBackendKind()` (which calls `ensureReady()` and THROWS when no
|
|
62
|
+
* backend could be initialized; the CP-7 vendor-key store depends on that
|
|
63
|
+
* throwing contract). This variant NEVER initializes and NEVER throws, so it can
|
|
64
|
+
* observe the post-init backend state (including the `null` refuse-to-fork
|
|
65
|
+
* outcome) for tests and diagnostics without triggering initialization.
|
|
66
|
+
*/
|
|
67
|
+
export declare function peekActiveBackendKind(): BackendKind | null;
|
|
68
|
+
/**
|
|
69
|
+
* The active backend kind (`'keytar'` = OS-native keyring, `'file'` = the
|
|
70
|
+
* plaintext `~/.codevibe/<service>.json` fallback). Initializes the backend if
|
|
71
|
+
* it has not been chosen yet, then returns the kind.
|
|
72
|
+
*
|
|
73
|
+
* CP-7 r5 HIGH-1: the CP-7 VENDOR-KEY store calls this to FAIL CLOSED rather
|
|
74
|
+
* than silently persist a plaintext vendor key under the file backend. This is a
|
|
75
|
+
* READ-ONLY accessor — it does NOT change `get/set/deletePassword` behavior, so
|
|
76
|
+
* the legitimate OAuth-token file fallback (#29, headless Linux) is untouched.
|
|
77
|
+
*
|
|
78
|
+
* Throws the same `KeychainBackendUnavailableError` as the password ops when no
|
|
79
|
+
* backend could be initialized (keytar failed to load AND no file opt-in).
|
|
80
|
+
*/
|
|
81
|
+
export declare function getActiveBackendKind(): BackendKind;
|
|
1
82
|
export declare function getPassword(service: string, account: string): Promise<string | null>;
|
|
2
83
|
export declare function setPassword(service: string, account: string, password: string): Promise<void>;
|
|
3
84
|
export declare function deletePassword(service: string, account: string): Promise<boolean>;
|
|
85
|
+
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 @@
|
|
|
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 @@
|
|
|
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,52 @@
|
|
|
1
|
+
/** A structured failure in disposable-repo materialization or fd-safe import. */
|
|
2
|
+
export declare class DisposableRepoError extends Error {
|
|
3
|
+
readonly reason: 'init' | 'ls-tree' | 'pack-objects' | 'dangerous-attributes' | 'read-tree' | 'checkout';
|
|
4
|
+
constructor(reason: 'init' | 'ls-tree' | 'pack-objects' | 'dangerous-attributes' | 'read-tree' | 'checkout', message: string);
|
|
5
|
+
}
|
|
6
|
+
/** A structured rejection from {@link fdSafeReadFile} (fail-closed → human-gate). */
|
|
7
|
+
export declare class FdSafeImportError extends Error {
|
|
8
|
+
readonly reason: 'empty' | 'nul' | 'absolute' | 'traversal' | 'missing' | 'symlink-component' | 'not-regular' | 'hardlink';
|
|
9
|
+
constructor(reason: 'empty' | 'nul' | 'absolute' | 'traversal' | 'missing' | 'symlink-component' | 'not-regular' | 'hardlink', message: string);
|
|
10
|
+
}
|
|
11
|
+
/** A materialized disposable repo + its cleanup. */
|
|
12
|
+
export interface DisposableRepo {
|
|
13
|
+
/** The working-tree root the agent resolves in (its own `.git` lives under it). */
|
|
14
|
+
repoDir: string;
|
|
15
|
+
/** Remove the disposable repo (try/finally — even on timeout/crash). */
|
|
16
|
+
cleanup(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export interface MaterializeOpts {
|
|
19
|
+
/** The REAL repo whose `conflictedTree` object closure is imported. */
|
|
20
|
+
realRepoDir: string;
|
|
21
|
+
/** The off-branch merge-result tree (`mergeTreeOffBranch`) — full both-sides clean changes + markers. */
|
|
22
|
+
conflictedTree: string;
|
|
23
|
+
/** Parent dir for the disposable repo — MUST be under the task's writable workspace area. */
|
|
24
|
+
parentDir: string;
|
|
25
|
+
/**
|
|
26
|
+
* Scan-before-checkout (injected to keep this module decoupled from merge-train;
|
|
27
|
+
* the live caller passes `scanIntegrationTreeAttributes`). Returns the flagged
|
|
28
|
+
* dangerous paths for a tree (empty = safe).
|
|
29
|
+
*/
|
|
30
|
+
scanTree: (repoDir: string, tree: string) => Promise<string[]>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Materialize a disposable repo checked out at `conflictedTree`, via direct pinned
|
|
34
|
+
* plumbing (NO `git clone`/upload-pack). Cleans up + rethrows on any failure.
|
|
35
|
+
*/
|
|
36
|
+
export declare function materializeDisposableRepo(opts: MaterializeOpts): Promise<DisposableRepo>;
|
|
37
|
+
/**
|
|
38
|
+
* Atomically rename `dir` to a fresh RANDOM sibling path before reading it back —
|
|
39
|
+
* the exited agent / any disowned background process does NOT know the new path,
|
|
40
|
+
* so it cannot pre-place symlinks to win a TOCTOU race. The caller reads from the
|
|
41
|
+
* returned staged path (and is responsible for removing it). Same-filesystem
|
|
42
|
+
* rename → atomic.
|
|
43
|
+
*/
|
|
44
|
+
export declare function stageDirForRead(dir: string): Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* fd-safe read of ONE conflicted file at `relPath` under `rootDir` (CP-14 WB2 §2.1).
|
|
47
|
+
* `rootDir` SHOULD be a {@link stageDirForRead} staging path. Closes leaf+parent
|
|
48
|
+
* symlink (realpath-strict + `O_NOFOLLOW`), hardlink (`nlink===1`),
|
|
49
|
+
* dir/FIFO/device (`isFile`), and the read race (read-from-the-verified-fd). Any
|
|
50
|
+
* violation throws {@link FdSafeImportError} → the caller fails closed (human-gate).
|
|
51
|
+
*/
|
|
52
|
+
export declare function fdSafeReadFile(rootDir: string, relPath: string): Promise<Buffer>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CP-14 WB2 §2.1 path C (dispatch-time fail-closed, D3-A) — the live
|
|
3
|
+
* {@link DispatchImplementor} closure THROWS this when the per-resolve confinement
|
|
4
|
+
* re-engage returns `mode: 'none'` (NEVER spawn the resolver agent unconfined).
|
|
5
|
+
* {@link resolveAgenticSlot} catches it LOCALLY and returns a clean
|
|
6
|
+
* `human_gate` (trigger `dispatch_unconfined`) — symmetric with the `materialize`
|
|
7
|
+
* trigger; the `finally` still cleans up the disposable repo. Any OTHER throw from
|
|
8
|
+
* `dispatchImplementor` (timeout, agent failure) propagates unchanged.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AgenticDispatchUnconfinedError extends Error {
|
|
11
|
+
constructor(message: string);
|
|
12
|
+
}
|
|
13
|
+
/** Dispatch the incoming track's implementor into the disposable repo (read+write). */
|
|
14
|
+
export type DispatchImplementor = (args: {
|
|
15
|
+
/** The disposable repo working-tree root (its own `.git`). */
|
|
16
|
+
repoDir: string;
|
|
17
|
+
/** The class-2 conflicted files the agent must resolve (markers removed). */
|
|
18
|
+
conflictedPaths: readonly string[];
|
|
19
|
+
/** The implementor agent kind + its per-spawn task identity. */
|
|
20
|
+
implementorAgent: string;
|
|
21
|
+
implementorTaskId: string;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
export interface AgenticResolveArgs {
|
|
24
|
+
realRepoDir: string;
|
|
25
|
+
conflictedTree: string;
|
|
26
|
+
/** The slot's class-2 conflicted paths — the ONLY paths whose resolved content imports. */
|
|
27
|
+
class2Paths: readonly string[];
|
|
28
|
+
/** The incoming track's implementor identity (re-dispatched as the resolver). */
|
|
29
|
+
implementorAgent: string;
|
|
30
|
+
implementorTaskId: string;
|
|
31
|
+
/** Under the task's writable workspace area. */
|
|
32
|
+
parentDir: string;
|
|
33
|
+
/** scan-before-checkout (the live caller passes `scanIntegrationTreeAttributes`). */
|
|
34
|
+
scanTree: (repoDir: string, tree: string) => Promise<string[]>;
|
|
35
|
+
/** Real implementor spawn (LE seam); tests stub it. */
|
|
36
|
+
dispatchImplementor: DispatchImplementor;
|
|
37
|
+
}
|
|
38
|
+
export interface AgenticResolveResolved {
|
|
39
|
+
status: 'resolved';
|
|
40
|
+
/** Resolved bytes per class-2 path (selective import — only these). */
|
|
41
|
+
resolvedBlobs: Map<string, Buffer>;
|
|
42
|
+
}
|
|
43
|
+
export interface AgenticResolveHumanGate {
|
|
44
|
+
status: 'human_gate';
|
|
45
|
+
trigger: 'materialize' | 'dispatch_unconfined' | 'marker_residue' | 'ref_drift' | 'fd_safe_reject' | 'missing_resolution';
|
|
46
|
+
reason: string;
|
|
47
|
+
}
|
|
48
|
+
export type AgenticResolveOutcome = AgenticResolveResolved | AgenticResolveHumanGate;
|
|
49
|
+
/**
|
|
50
|
+
* Run the agentic class-2 resolve for ONE slot. Returns the resolved bytes for the
|
|
51
|
+
* class-2 paths (selective import), or a fail-closed human-gate. The merge-train
|
|
52
|
+
* builds the agentic record + commit from the resolved bytes (Phase 5).
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveAgenticSlot(args: AgenticResolveArgs): Promise<AgenticResolveOutcome>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The env var that disables the agentic class-2 resolver (opt-OUT). */
|
|
2
|
+
export declare const AGENTIC_RESOLVER_ENV_VAR = "CODEVIBE_AGENTIC_RESOLVER";
|
|
3
|
+
/**
|
|
4
|
+
* Is the agentic class-2 resolver enabled? DEFAULT-ON. The canonical falsy
|
|
5
|
+
* tokens (`0`/`false`/`off`/`no`, case-insensitive) disable it; anything else
|
|
6
|
+
* — including unset — is ON. `env` is injected for deterministic tests;
|
|
7
|
+
* production passes `process.env`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isAgenticResolverEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
@@ -5,8 +5,9 @@ export interface AuthorityScope {
|
|
|
5
5
|
networkAllowed: boolean;
|
|
6
6
|
commandAllowlist: string[];
|
|
7
7
|
expiresAt: string;
|
|
8
|
+
egressAllowlist?: string[];
|
|
8
9
|
}
|
|
9
|
-
export type AuthorityRefusalCategory = 'authority_scope_conflict' | 'signature_invalid' | 'ulid_replay' | 'policy_rejection';
|
|
10
|
+
export type AuthorityRefusalCategory = 'authority_scope_conflict' | 'signature_invalid' | 'ulid_replay' | 'policy_rejection' | 'egress_denied';
|
|
10
11
|
export interface AuthorityRefusal {
|
|
11
12
|
category: AuthorityRefusalCategory;
|
|
12
13
|
detail: string;
|
|
@@ -25,5 +26,36 @@ export declare function enforceRead(scope: AuthorityScope, p: string): Promise<s
|
|
|
25
26
|
export declare function safeReadFile(scope: AuthorityScope, p: string, options?: {
|
|
26
27
|
encoding?: BufferEncoding;
|
|
27
28
|
}): Promise<string | Buffer>;
|
|
29
|
+
/**
|
|
30
|
+
* CP-1.f Hybrid authority split (dogfood fix 2026-06-10) — merge an engine-issued
|
|
31
|
+
* per-task path scope (`incoming`, from a `TaskAuthorized` Class-B packet) OVER
|
|
32
|
+
* the desktop-seeded `base` scope (the static implementor command authority from
|
|
33
|
+
* `makeImplementorCommandScope`).
|
|
34
|
+
*
|
|
35
|
+
* The engine is the authority on per-task PATH scopes (write/read/network/expiry);
|
|
36
|
+
* the DESKTOP is the authority on WHICH agent binaries may run (the
|
|
37
|
+
* `commandAllowlist`). The engine therefore sends `command_allowlist: []` VERBATIM
|
|
38
|
+
* on every `TaskAuthorized` (task_authorizer.rs:334 — pinned by its
|
|
39
|
+
* `command_allowlist.is_empty()` assertion). A wholesale `this.scope = incoming`
|
|
40
|
+
* (the pre-fix `advanceAuthorityScope`) wiped the desktop's seeded implementor
|
|
41
|
+
* allowlist, so the SECOND task of a session spawned its implementor against an
|
|
42
|
+
* EMPTY allowlist → `authority_scope_conflict: command "claude …" not in
|
|
43
|
+
* allowlist []` (the live dogfood blocker — task 1 ran on the seeded initial
|
|
44
|
+
* scope, then its `TaskAuthorized`-on-approve replaced the scope with the engine's
|
|
45
|
+
* empty-command scope, and task 2's round-0 spawn was refused).
|
|
46
|
+
*
|
|
47
|
+
* The merge takes the engine's path/network/expiry fields and UNIONs the command
|
|
48
|
+
* allowlists, preserving the base (desktop) command authority. Today the engine's
|
|
49
|
+
* `incoming.commandAllowlist` is always `[]` so the result is exactly the base
|
|
50
|
+
* allowlist; the union is defense-in-depth (an engine that ever sends additional
|
|
51
|
+
* command entries adds them rather than replaces). This is the behavior the
|
|
52
|
+
* implementor-argv.ts doc already promised: "`advanceAuthorityScope` will MERGE
|
|
53
|
+
* the engine's expiring path scope over this static command authority."
|
|
54
|
+
*
|
|
55
|
+
* Mirrors the team-track `scopeFromOwnership` idiom (local-executor-impl.ts),
|
|
56
|
+
* which already preserves `commandAllowlist: [...this.scope.commandAllowlist]`
|
|
57
|
+
* when deriving a per-track scope.
|
|
58
|
+
*/
|
|
59
|
+
export declare function mergeAuthorityScope(base: AuthorityScope, incoming: AuthorityScope): AuthorityScope;
|
|
28
60
|
export declare function enforceNetwork(scope: AuthorityScope): void;
|
|
29
61
|
export declare function enforceCommand(scope: AuthorityScope, argv: string[]): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AdapterProgressEnvelope } from '../adapter/progress';
|
|
2
2
|
import { AuthorityRefusal, AuthorityRefusalCategory } from './authority';
|
|
3
|
+
import { type DeviceSigningKey } from './class-a-sign';
|
|
3
4
|
import { AgentKind, FailureClass, ProcessRole } from './types';
|
|
4
5
|
export type ExecutionEventKind = 'PROCESS_SPAWNED' | 'TOOL_USE' | 'FILE_CHANGE' | 'VERIFICATION_RUN' | 'PROCESS_EXITED';
|
|
5
6
|
export type ClassAMessageType = 'EXECUTION_EVENT' | 'EXECUTOR_REFUSAL' | 'VERIFICATION_RESULT' | 'ADAPTER_PROGRESS';
|
|
@@ -89,9 +90,10 @@ export declare class ClassAEmitter {
|
|
|
89
90
|
private readonly sink;
|
|
90
91
|
private readonly cap;
|
|
91
92
|
private readonly logger?;
|
|
93
|
+
private readonly signingKey?;
|
|
92
94
|
private readonly seenUlids;
|
|
93
95
|
private readonly messageIdFactory;
|
|
94
|
-
constructor(sink: ClassASink, seenUlids?: Set<string>, cap?: number, logger?: EmitterLogger | undefined, messageIdFactory?: () => string);
|
|
96
|
+
constructor(sink: ClassASink, seenUlids?: Set<string>, cap?: number, logger?: EmitterLogger | undefined, messageIdFactory?: () => string, signingKey?: DeviceSigningKey | undefined);
|
|
95
97
|
emitProcessSpawned(ctx: ClassAEmitterContext, args: {
|
|
96
98
|
pid: number;
|
|
97
99
|
processRole: ProcessRole;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The device's raw P-256 key material, as stored on the device identity
|
|
3
|
+
* (`KeychainManager`). Both halves are STANDARD base64 of the raw bytes:
|
|
4
|
+
* - `privateKeyB64`: 32-byte P-256 scalar (`getPrivateKey()` raw form).
|
|
5
|
+
* - `publicKeyB64`: 64-byte uncompressed point x‖y, NO 0x04 prefix
|
|
6
|
+
* (`getPublicKey().subarray(1)` raw form).
|
|
7
|
+
* This matches `crypto-service.ts:52-68` + the 2f.3.a wire-format lock.
|
|
8
|
+
*/
|
|
9
|
+
export interface DeviceSigningKey {
|
|
10
|
+
privateKeyB64: string;
|
|
11
|
+
publicKeyB64: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Produce the RFC 8785 JCS canonical-JSON STRING of `obj` with its
|
|
15
|
+
* `signatureFieldName` key REMOVED (the signature cannot be part of its own
|
|
16
|
+
* signing input). Mirrors the Rust `canonical_json_for_signing` /
|
|
17
|
+
* `canonical_json_for_merge_classification` discipline: materialize the
|
|
18
|
+
* object, drop the signature key, then canonicalize. The object's keys are
|
|
19
|
+
* already camelCase on the wire; JCS sorts them lexicographically so the
|
|
20
|
+
* camelCase wire names are what get hashed.
|
|
21
|
+
*
|
|
22
|
+
* Exported so tests (and the golden-vector fixture generator) can assert the
|
|
23
|
+
* exact canonical string and catch future json-freeze JCS drift.
|
|
24
|
+
*/
|
|
25
|
+
export declare function canonicalJsonForSigning(obj: Record<string, unknown>, signatureFieldName: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Sign a Class A envelope object. The canonical bytes are the JCS of the
|
|
28
|
+
* envelope with `signature` removed (matching Rust
|
|
29
|
+
* `canonical_json_for_signing`, signing.rs:126-141). Returns the
|
|
30
|
+
* STANDARD-base64 raw-64-byte signature to assign to `envelope.signature`.
|
|
31
|
+
*
|
|
32
|
+
* `unsignedEnvelope` is the envelope object WITHOUT (or before) the
|
|
33
|
+
* `signature` field is set; any existing `signature` key is stripped before
|
|
34
|
+
* canonicalizing, so passing a partially-populated object is safe.
|
|
35
|
+
*/
|
|
36
|
+
export declare function signClassAEnvelope(unsignedEnvelope: Record<string, unknown>, keys: DeviceSigningKey): string;
|
|
37
|
+
/**
|
|
38
|
+
* Sign a MergeGate classification (#C12-8). The signing domain is the JCS of
|
|
39
|
+
* the classification with `signatureB64` removed AND `leDeviceId` INSIDE the
|
|
40
|
+
* domain (only `signatureB64` is stripped) — the device binds itself into
|
|
41
|
+
* its own signature. Matches the Rust
|
|
42
|
+
* `canonical_json_for_merge_classification`, which removes only the
|
|
43
|
+
* camelCase `signatureB64` key.
|
|
44
|
+
*
|
|
45
|
+
* Callers (W2.b) build the classification object, set `leDeviceId`, leave
|
|
46
|
+
* `signatureB64` empty/unset, call this helper, then assign the returned
|
|
47
|
+
* base64 to `signatureB64`. The crypto lives here so W2.b only orchestrates.
|
|
48
|
+
*
|
|
49
|
+
* @param classificationWithoutSig the camelCase classification object with
|
|
50
|
+
* `leDeviceId` populated and `signatureB64` empty/absent.
|
|
51
|
+
* @param keys the LE's device P-256 key material.
|
|
52
|
+
* @param leDeviceId the signing device id; written into the classification's
|
|
53
|
+
* `leDeviceId` field (inside the signing domain) before canonicalizing
|
|
54
|
+
* — so the caller cannot accidentally sign over a stale/blank value.
|
|
55
|
+
* @returns the STANDARD-base64 raw-64-byte signature for `signatureB64`.
|
|
56
|
+
*/
|
|
57
|
+
export declare function signMergeClassification(classificationWithoutSig: Record<string, unknown>, keys: DeviceSigningKey, leDeviceId: string): string;
|