@run402/sdk 4.94.0 → 4.96.0
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/README.md +44 -44
- package/core-dist/keystore.d.ts +1 -1
- package/core-dist/keystore.js +1 -1
- package/dist/actions.d.ts +3 -3
- package/dist/actions.d.ts.map +1 -1
- package/dist/app-up.d.ts +2 -2
- package/dist/app-up.d.ts.map +1 -1
- package/dist/config.d.ts +1 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/credentials.d.ts +1 -1
- package/dist/errors.d.ts +6 -6
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/namespaces/admin.d.ts +1 -1
- package/dist/namespaces/admin.d.ts.map +1 -1
- package/dist/namespaces/ai.d.ts +1 -1
- package/dist/namespaces/ai.js +2 -2
- package/dist/namespaces/ai.js.map +1 -1
- package/dist/namespaces/assets.js +1 -1
- package/dist/namespaces/assets.js.map +1 -1
- package/dist/namespaces/ci.js +3 -3
- package/dist/namespaces/ci.js.map +1 -1
- package/dist/namespaces/deploy.d.ts +5 -5
- package/dist/namespaces/deploy.d.ts.map +1 -1
- package/dist/namespaces/deploy.js +45 -46
- package/dist/namespaces/deploy.js.map +1 -1
- package/dist/namespaces/deploy.types.d.ts +19 -19
- package/dist/namespaces/deploy.types.d.ts.map +1 -1
- package/dist/namespaces/domains.d.ts +10 -2
- package/dist/namespaces/domains.d.ts.map +1 -1
- package/dist/namespaces/domains.js +10 -5
- package/dist/namespaces/domains.js.map +1 -1
- package/dist/namespaces/errors.js +1 -1
- package/dist/namespaces/functions.js +1 -1
- package/dist/namespaces/functions.js.map +1 -1
- package/dist/namespaces/org.d.ts +2 -2
- package/dist/namespaces/org.js +2 -2
- package/dist/namespaces/org.types.d.ts +3 -3
- package/dist/namespaces/pay.js +1 -1
- package/dist/namespaces/{gitvault.d.ts → repos.d.ts} +438 -451
- package/dist/namespaces/repos.d.ts.map +1 -0
- package/dist/namespaces/{gitvault.js → repos.js} +454 -462
- package/dist/namespaces/repos.js.map +1 -0
- package/dist/namespaces/rooms.js +2 -2
- package/dist/namespaces/rooms.js.map +1 -1
- package/dist/namespaces/session.d.ts +2 -2
- package/dist/namespaces/session.d.ts.map +1 -1
- package/dist/namespaces/session.js +2 -2
- package/dist/namespaces/session.js.map +1 -1
- package/dist/namespaces/tier.d.ts +4 -4
- package/dist/namespaces/tier.d.ts.map +1 -1
- package/dist/namespaces/transfers.d.ts +46 -15
- package/dist/namespaces/transfers.d.ts.map +1 -1
- package/dist/namespaces/transfers.js.map +1 -1
- package/dist/namespaces/{gitvault.crypto.d.ts → vault.crypto.d.ts} +141 -141
- package/dist/namespaces/vault.crypto.d.ts.map +1 -0
- package/dist/namespaces/{gitvault.crypto.js → vault.crypto.js} +173 -173
- package/dist/namespaces/vault.crypto.js.map +1 -0
- package/dist/namespaces/{gitvault.types.d.ts → vault.types.d.ts} +136 -136
- package/dist/namespaces/vault.types.d.ts.map +1 -0
- package/dist/namespaces/{gitvault.types.js → vault.types.js} +4 -4
- package/dist/namespaces/vault.types.js.map +1 -0
- package/dist/node/actions-node.js +8 -8
- package/dist/node/actions-node.js.map +1 -1
- package/dist/node/assets-node.js +6 -6
- package/dist/node/assets-node.js.map +1 -1
- package/dist/node/bearer-redeem-key.d.ts +1 -1
- package/dist/node/bearer-redeem-key.js +5 -5
- package/dist/node/bearer-redeem-key.js.map +1 -1
- package/dist/node/ci.js +1 -1
- package/dist/node/ci.js.map +1 -1
- package/dist/node/credentials.d.ts +1 -1
- package/dist/node/credentials.js +1 -1
- package/dist/node/deploy-manifest.d.ts +3 -5
- package/dist/node/deploy-manifest.d.ts.map +1 -1
- package/dist/node/deploy-manifest.js +3 -12
- package/dist/node/deploy-manifest.js.map +1 -1
- package/dist/node/http-dispatcher.js +5 -5
- package/dist/node/http-dispatcher.js.map +1 -1
- package/dist/node/index.d.ts +29 -29
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +39 -39
- package/dist/node/index.js.map +1 -1
- package/dist/node/manifest-export.js +2 -2
- package/dist/node/manifest-export.js.map +1 -1
- package/dist/node/org-adopt.js +1 -1
- package/dist/node/org-adopt.js.map +1 -1
- package/dist/node/sites-node.js +1 -1
- package/dist/node/sites-node.js.map +1 -1
- package/dist/node/{gitvault-address.d.ts → vault-address.d.ts} +42 -42
- package/dist/node/vault-address.d.ts.map +1 -0
- package/dist/node/{gitvault-address.js → vault-address.js} +43 -43
- package/dist/node/vault-address.js.map +1 -0
- package/dist/node/{gitvault-apply.d.ts → vault-apply.d.ts} +27 -27
- package/dist/node/vault-apply.d.ts.map +1 -0
- package/dist/node/{gitvault-apply.js → vault-apply.js} +38 -38
- package/dist/node/vault-apply.js.map +1 -0
- package/dist/node/vault-byo-config.d.ts +29 -0
- package/dist/node/vault-byo-config.d.ts.map +1 -0
- package/dist/node/{gitvault-byo-config.js → vault-byo-config.js} +18 -18
- package/dist/node/vault-byo-config.js.map +1 -0
- package/dist/node/vault-byo-probe.d.ts +20 -0
- package/dist/node/vault-byo-probe.d.ts.map +1 -0
- package/dist/node/vault-byo-probe.js +57 -0
- package/dist/node/vault-byo-probe.js.map +1 -0
- package/dist/node/{gitvault-creation-journal.d.ts → vault-creation-journal.d.ts} +69 -69
- package/dist/node/vault-creation-journal.d.ts.map +1 -0
- package/dist/node/{gitvault-creation-journal.js → vault-creation-journal.js} +54 -54
- package/dist/node/vault-creation-journal.js.map +1 -0
- package/dist/node/{gitvault-degraded-read.d.ts → vault-degraded-read.d.ts} +34 -34
- package/dist/node/vault-degraded-read.d.ts.map +1 -0
- package/dist/node/{gitvault-degraded-read.js → vault-degraded-read.js} +24 -24
- package/dist/node/vault-degraded-read.js.map +1 -0
- package/dist/node/{gitvault-deploy.d.ts → vault-deploy.d.ts} +67 -67
- package/dist/node/vault-deploy.d.ts.map +1 -0
- package/dist/node/{gitvault-deploy.js → vault-deploy.js} +27 -27
- package/dist/node/vault-deploy.js.map +1 -0
- package/dist/node/{gitvault-edge-fetch.d.ts → vault-edge-fetch.d.ts} +9 -9
- package/dist/node/vault-edge-fetch.d.ts.map +1 -0
- package/dist/node/{gitvault-edge-fetch.js → vault-edge-fetch.js} +11 -11
- package/dist/node/vault-edge-fetch.js.map +1 -0
- package/dist/node/{gitvault-handoff.d.ts → vault-handoff.d.ts} +9 -9
- package/dist/node/vault-handoff.d.ts.map +1 -0
- package/dist/node/{gitvault-handoff.js → vault-handoff.js} +24 -24
- package/dist/node/vault-handoff.js.map +1 -0
- package/dist/node/{gitvault-keystore.d.ts → vault-keystore.d.ts} +87 -77
- package/dist/node/vault-keystore.d.ts.map +1 -0
- package/dist/node/{gitvault-keystore.js → vault-keystore.js} +105 -68
- package/dist/node/vault-keystore.js.map +1 -0
- package/dist/node/{gitvault-member-bundle.d.ts → vault-member-bundle.d.ts} +17 -17
- package/dist/node/vault-member-bundle.d.ts.map +1 -0
- package/dist/node/{gitvault-member-bundle.js → vault-member-bundle.js} +11 -11
- package/dist/node/vault-member-bundle.js.map +1 -0
- package/dist/node/{gitvault-mirror-backend.d.ts → vault-mirror-backend.d.ts} +26 -26
- package/dist/node/vault-mirror-backend.d.ts.map +1 -0
- package/dist/node/{gitvault-mirror-backend.js → vault-mirror-backend.js} +25 -25
- package/dist/node/vault-mirror-backend.js.map +1 -0
- package/dist/node/{gitvault-mirror-config.d.ts → vault-mirror-config.d.ts} +23 -23
- package/dist/node/vault-mirror-config.d.ts.map +1 -0
- package/dist/node/{gitvault-mirror-config.js → vault-mirror-config.js} +16 -16
- package/dist/node/vault-mirror-config.js.map +1 -0
- package/dist/node/{gitvault-mirror.d.ts → vault-mirror.d.ts} +36 -36
- package/dist/node/vault-mirror.d.ts.map +1 -0
- package/dist/node/{gitvault-mirror.js → vault-mirror.js} +75 -75
- package/dist/node/vault-mirror.js.map +1 -0
- package/dist/node/{gitvault-native-crypto.d.ts → vault-native-crypto.d.ts} +10 -10
- package/dist/node/vault-native-crypto.d.ts.map +1 -0
- package/dist/node/{gitvault-native-crypto.js → vault-native-crypto.js} +16 -16
- package/dist/node/vault-native-crypto.js.map +1 -0
- package/dist/node/{gitvault-open-or-create.d.ts → vault-open-or-create.d.ts} +16 -16
- package/dist/node/vault-open-or-create.d.ts.map +1 -0
- package/dist/node/{gitvault-open-or-create.js → vault-open-or-create.js} +10 -10
- package/dist/node/vault-open-or-create.js.map +1 -0
- package/dist/node/{gitvault-prewarm.d.ts → vault-prewarm.d.ts} +13 -13
- package/dist/node/vault-prewarm.d.ts.map +1 -0
- package/dist/node/{gitvault-prewarm.js → vault-prewarm.js} +25 -25
- package/dist/node/vault-prewarm.js.map +1 -0
- package/dist/node/{gitvault-profile-scan.d.ts → vault-profile-scan.d.ts} +3 -3
- package/dist/node/vault-profile-scan.d.ts.map +1 -0
- package/dist/node/{gitvault-profile-scan.js → vault-profile-scan.js} +12 -12
- package/dist/node/vault-profile-scan.js.map +1 -0
- package/dist/node/{gitvault-prune.d.ts → vault-prune.d.ts} +61 -61
- package/dist/node/vault-prune.d.ts.map +1 -0
- package/dist/node/{gitvault-prune.js → vault-prune.js} +34 -34
- package/dist/node/vault-prune.js.map +1 -0
- package/dist/node/{gitvault-publication.d.ts → vault-publication.d.ts} +399 -399
- package/dist/node/vault-publication.d.ts.map +1 -0
- package/dist/node/{gitvault-publication.js → vault-publication.js} +584 -584
- package/dist/node/vault-publication.js.map +1 -0
- package/dist/node/{gitvault-push-to-create.d.ts → vault-push-to-create.d.ts} +16 -16
- package/dist/node/vault-push-to-create.d.ts.map +1 -0
- package/dist/node/{gitvault-push-to-create.js → vault-push-to-create.js} +9 -9
- package/dist/node/vault-push-to-create.js.map +1 -0
- package/dist/node/{gitvault-recover.d.ts → vault-recover.d.ts} +50 -50
- package/dist/node/vault-recover.d.ts.map +1 -0
- package/dist/node/{gitvault-recover.js → vault-recover.js} +84 -84
- package/dist/node/vault-recover.js.map +1 -0
- package/dist/node/{gitvault-restore.d.ts → vault-restore.d.ts} +8 -8
- package/dist/node/vault-restore.d.ts.map +1 -0
- package/dist/node/{gitvault-restore.js → vault-restore.js} +11 -11
- package/dist/node/vault-restore.js.map +1 -0
- package/dist/node/{gitvault-snapshot.d.ts → vault-snapshot.d.ts} +48 -48
- package/dist/node/vault-snapshot.d.ts.map +1 -0
- package/dist/node/{gitvault-snapshot.js → vault-snapshot.js} +61 -61
- package/dist/node/vault-snapshot.js.map +1 -0
- package/dist/node/{gitvault-writer-state.d.ts → vault-writer-state.d.ts} +8 -8
- package/dist/node/vault-writer-state.d.ts.map +1 -0
- package/dist/node/{gitvault-writer-state.js → vault-writer-state.js} +15 -15
- package/dist/node/vault-writer-state.js.map +1 -0
- package/dist/node/workflow-output.js +4 -4
- package/dist/node/workflow-output.js.map +1 -1
- package/dist/scoped.d.ts +8 -8
- package/dist/scoped.d.ts.map +1 -1
- package/dist/scoped.js +3 -3
- package/dist/scoped.js.map +1 -1
- package/package.json +1 -1
- package/dist/namespaces/gitvault.crypto.d.ts.map +0 -1
- package/dist/namespaces/gitvault.crypto.js.map +0 -1
- package/dist/namespaces/gitvault.d.ts.map +0 -1
- package/dist/namespaces/gitvault.js.map +0 -1
- package/dist/namespaces/gitvault.types.d.ts.map +0 -1
- package/dist/namespaces/gitvault.types.js.map +0 -1
- package/dist/node/gitvault-address.d.ts.map +0 -1
- package/dist/node/gitvault-address.js.map +0 -1
- package/dist/node/gitvault-apply.d.ts.map +0 -1
- package/dist/node/gitvault-apply.js.map +0 -1
- package/dist/node/gitvault-byo-config.d.ts +0 -29
- package/dist/node/gitvault-byo-config.d.ts.map +0 -1
- package/dist/node/gitvault-byo-config.js.map +0 -1
- package/dist/node/gitvault-byo-probe.d.ts +0 -20
- package/dist/node/gitvault-byo-probe.d.ts.map +0 -1
- package/dist/node/gitvault-byo-probe.js +0 -57
- package/dist/node/gitvault-byo-probe.js.map +0 -1
- package/dist/node/gitvault-creation-journal.d.ts.map +0 -1
- package/dist/node/gitvault-creation-journal.js.map +0 -1
- package/dist/node/gitvault-degraded-read.d.ts.map +0 -1
- package/dist/node/gitvault-degraded-read.js.map +0 -1
- package/dist/node/gitvault-deploy.d.ts.map +0 -1
- package/dist/node/gitvault-deploy.js.map +0 -1
- package/dist/node/gitvault-edge-fetch.d.ts.map +0 -1
- package/dist/node/gitvault-edge-fetch.js.map +0 -1
- package/dist/node/gitvault-handoff.d.ts.map +0 -1
- package/dist/node/gitvault-handoff.js.map +0 -1
- package/dist/node/gitvault-keystore.d.ts.map +0 -1
- package/dist/node/gitvault-keystore.js.map +0 -1
- package/dist/node/gitvault-member-bundle.d.ts.map +0 -1
- package/dist/node/gitvault-member-bundle.js.map +0 -1
- package/dist/node/gitvault-mirror-backend.d.ts.map +0 -1
- package/dist/node/gitvault-mirror-backend.js.map +0 -1
- package/dist/node/gitvault-mirror-config.d.ts.map +0 -1
- package/dist/node/gitvault-mirror-config.js.map +0 -1
- package/dist/node/gitvault-mirror.d.ts.map +0 -1
- package/dist/node/gitvault-mirror.js.map +0 -1
- package/dist/node/gitvault-native-crypto.d.ts.map +0 -1
- package/dist/node/gitvault-native-crypto.js.map +0 -1
- package/dist/node/gitvault-open-or-create.d.ts.map +0 -1
- package/dist/node/gitvault-open-or-create.js.map +0 -1
- package/dist/node/gitvault-prewarm.d.ts.map +0 -1
- package/dist/node/gitvault-prewarm.js.map +0 -1
- package/dist/node/gitvault-profile-scan.d.ts.map +0 -1
- package/dist/node/gitvault-profile-scan.js.map +0 -1
- package/dist/node/gitvault-prune.d.ts.map +0 -1
- package/dist/node/gitvault-prune.js.map +0 -1
- package/dist/node/gitvault-publication.d.ts.map +0 -1
- package/dist/node/gitvault-publication.js.map +0 -1
- package/dist/node/gitvault-push-to-create.d.ts.map +0 -1
- package/dist/node/gitvault-push-to-create.js.map +0 -1
- package/dist/node/gitvault-recover.d.ts.map +0 -1
- package/dist/node/gitvault-recover.js.map +0 -1
- package/dist/node/gitvault-restore.d.ts.map +0 -1
- package/dist/node/gitvault-restore.js.map +0 -1
- package/dist/node/gitvault-snapshot.d.ts.map +0 -1
- package/dist/node/gitvault-snapshot.js.map +0 -1
- package/dist/node/gitvault-writer-state.d.ts.map +0 -1
- package/dist/node/gitvault-writer-state.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `r.
|
|
3
|
-
* API (add-
|
|
2
|
+
* `r.repos` — the host-blind encrypted Git remote, as the SDK's programmatic
|
|
3
|
+
* API (add-vault task 5.10).
|
|
4
4
|
*
|
|
5
5
|
* ARCHITECTURAL LAW (client-surface spec, "All protocol logic lives in the
|
|
6
6
|
* SDK"): every piece of vault protocol behaviour — crypto core, keystore,
|
|
7
7
|
* creation journal, snapshot + capture, publication state machines, ref
|
|
8
8
|
* transactions, verification budget, token exchange, repair — is implemented
|
|
9
|
-
* ONCE here. `run402
|
|
9
|
+
* ONCE here. `run402 repos …`, `git-remote-run402`, and the MCP tools are
|
|
10
10
|
* adapters over this namespace: argument parsing, TTY output, exit codes, and
|
|
11
11
|
* local file I/O only. Anything the CLI can do is reachable programmatically
|
|
12
12
|
* with identical semantics.
|
|
@@ -29,32 +29,32 @@
|
|
|
29
29
|
* never persisted into an agent-surface result store, and never logged.
|
|
30
30
|
*/
|
|
31
31
|
import type { Client } from "../kernel.js";
|
|
32
|
-
import {
|
|
32
|
+
import { VAULT_BYO_UNMIRRORED_REMEDY_STATEMENT, VAULT_DURABILITY_STATEMENT, VAULT_MIRROR_KEYSTORE_STILL_REQUIRED_STATEMENT, VAULT_MIRROR_VALIDITY_NOT_FRESHNESS_STATEMENT, VAULT_TERMINAL_LOSS_DOCTOR_TEXT, VAULT_TERMINAL_LOSS_STATEMENT, VAULT_UNMIRRORED_FINDING_STATEMENT } from "./vault.crypto.js";
|
|
33
33
|
import type { NextAction } from "../errors.js";
|
|
34
34
|
/** The cold open's own verdicts — surfaced from `open()`; anything else leaves the handle lazy (see `open`). */
|
|
35
|
-
import type {
|
|
36
|
-
import type {
|
|
37
|
-
import type {
|
|
38
|
-
import type {
|
|
39
|
-
import type {
|
|
40
|
-
import type {
|
|
41
|
-
import type {
|
|
42
|
-
import type {
|
|
43
|
-
import type {
|
|
44
|
-
import type {
|
|
45
|
-
import type {
|
|
46
|
-
import type {
|
|
35
|
+
import type { VaultCaptureReceipt, VaultHeadsListingPage, VaultHeadsListingRequest, VaultHeadTarget, VaultOpenReceipt, VaultRecipientConfirmationReceipt, VaultRecoveryReceipt, VaultRotationReason } from "./vault.types.js";
|
|
36
|
+
import type { VaultCompactionGrant, VaultMaintenanceLease, VaultMaintenanceLeaseRequest, VaultTransport, VaultRecord } from "../node/vault-publication.js";
|
|
37
|
+
import type { VaultDeployOptions, VaultDeployResult } from "../node/vault-deploy.js";
|
|
38
|
+
import type { VaultPublishResult, VaultRefMap, VaultReconcileEnvelopeRecipientsResult, VaultReconcileWriterAdmissionsResult, VaultVerifiedState } from "../node/vault-publication.js";
|
|
39
|
+
import type { VaultCreationResult } from "../node/vault-creation-journal.js";
|
|
40
|
+
import type { VaultKeystore } from "../node/vault-keystore.js";
|
|
41
|
+
import type { VaultSnapshot } from "../node/vault-snapshot.js";
|
|
42
|
+
import type { VaultMirrorConfig, VaultMirrorCredential } from "../node/vault-mirror-config.js";
|
|
43
|
+
import type { VaultByoPresenceReport, VaultMirrorPushResult, VaultMirrorSyncSummary } from "../node/vault-mirror.js";
|
|
44
|
+
import type { VaultRecoverResult, VaultVerifyReport } from "../node/vault-recover.js";
|
|
45
|
+
import type { VaultMemberRecoveryBundle } from "../node/vault-member-bundle.js";
|
|
46
|
+
import type { VaultDegradedReadLive, VaultDegradedReadOutcome, VaultDegradedReadSource } from "../node/vault-degraded-read.js";
|
|
47
47
|
import type { RoomPresence } from "./rooms.types.js";
|
|
48
|
-
/** What `r.
|
|
49
|
-
export interface
|
|
48
|
+
/** What `r.repos.status()` reports. Never carries key material. */
|
|
49
|
+
export interface VaultStatus {
|
|
50
50
|
repo_id: string | null;
|
|
51
51
|
project_id: string | null;
|
|
52
52
|
/** The control plane's view. `null` when no vault is allocated for the project. */
|
|
53
|
-
vault:
|
|
54
|
-
/**
|
|
55
|
-
reconcile_recipients?:
|
|
56
|
-
/**
|
|
57
|
-
enrollment?:
|
|
53
|
+
vault: VaultRecord | null;
|
|
54
|
+
/** vault-agent-envelopes D5: what this KEY-HOLDER's session-start fulfilment did (`null` on a machine that holds no K_repo, or `reconcile: "forbidden"`). */
|
|
55
|
+
reconcile_recipients?: VaultSessionReconcileResult | null;
|
|
56
|
+
/** vault-agent-envelopes D3: what the enroll-if-absent step did for this keystore's key (`null` when it did not run). */
|
|
57
|
+
enrollment?: VaultEnrollmentOutcome | null;
|
|
58
58
|
keystore: {
|
|
59
59
|
present: boolean;
|
|
60
60
|
/** The principal's Ed25519 signing fingerprint, or `null` when identity is absent. */
|
|
@@ -113,7 +113,7 @@ export interface GitvaultStatus {
|
|
|
113
113
|
* remote pins `repo_id` in local git state the first time it resolves;
|
|
114
114
|
* `resolved_from` names the `org-slug/name` it was resolved from. An
|
|
115
115
|
* id-form remote never pins (it needs no pin — see
|
|
116
|
-
* `
|
|
116
|
+
* `resolveVaultAddress`'s doc comment), so a checkout on one always
|
|
117
117
|
* reports `null` here even once its vault is otherwise fully resolved.
|
|
118
118
|
*/
|
|
119
119
|
pinned: {
|
|
@@ -138,17 +138,17 @@ export interface GitvaultStatus {
|
|
|
138
138
|
* (an observation) leaves both `null`.
|
|
139
139
|
*/
|
|
140
140
|
refs: Record<string, string> | null;
|
|
141
|
-
head_target:
|
|
141
|
+
head_target: VaultHeadTarget | null;
|
|
142
142
|
pins: {
|
|
143
143
|
highest_authenticated: string | null;
|
|
144
144
|
highest_materialized: string | null;
|
|
145
145
|
};
|
|
146
|
-
|
|
146
|
+
vault_policy: "required" | "grandfathered" | null;
|
|
147
147
|
/** Override journals on this machine that have not yet been completed. */
|
|
148
148
|
pending_overrides: number;
|
|
149
149
|
/**
|
|
150
150
|
* Best-effort count of this vault's covering `key_envelope` recipients (the
|
|
151
|
-
* same envelope-recipients read `
|
|
151
|
+
* same envelope-recipients read `Repos.access` uses), taken inside
|
|
152
152
|
* `status()` when a vault is allocated. `null` when unknown — no vault, or
|
|
153
153
|
* the read failed (never a new failure mode for `status`; falls back to the
|
|
154
154
|
* single-principal V0-A statements below). This is what decides between
|
|
@@ -163,9 +163,9 @@ export interface GitvaultStatus {
|
|
|
163
163
|
* `null` exactly when `covering_recipients >= 2` — see `durability_statement`
|
|
164
164
|
* for what is printed in that case instead.
|
|
165
165
|
*/
|
|
166
|
-
terminal_loss_statement: typeof
|
|
166
|
+
terminal_loss_statement: typeof VAULT_TERMINAL_LOSS_STATEMENT | null;
|
|
167
167
|
/** `null` exactly when `terminal_loss_statement` is — same condition, same reasoning. */
|
|
168
|
-
terminal_loss_detail: typeof
|
|
168
|
+
terminal_loss_detail: typeof VAULT_TERMINAL_LOSS_DOCTOR_TEXT | null;
|
|
169
169
|
/**
|
|
170
170
|
* The protocol's durability sentence — printed in place of
|
|
171
171
|
* `terminal_loss_statement` exactly when `covering_recipients >= 2`, since
|
|
@@ -173,7 +173,7 @@ export interface GitvaultStatus {
|
|
|
173
173
|
* proven has a second covering recipient. `null` otherwise (including
|
|
174
174
|
* "unknown" — the single-principal statements are the honest default).
|
|
175
175
|
*/
|
|
176
|
-
durability_statement: typeof
|
|
176
|
+
durability_statement: typeof VAULT_DURABILITY_STATEMENT | null;
|
|
177
177
|
warnings: {
|
|
178
178
|
kind: string;
|
|
179
179
|
message: string;
|
|
@@ -184,13 +184,13 @@ export interface GitvaultStatus {
|
|
|
184
184
|
}[];
|
|
185
185
|
}
|
|
186
186
|
/**
|
|
187
|
-
* What {@link
|
|
187
|
+
* What {@link Repos.scaffoldRemote} did, and why (D1). `name` is `origin`
|
|
188
188
|
* when it was free (or a caller-supplied name), `run402` when `origin` was
|
|
189
189
|
* already taken by something else, or the caller's explicit `remote_name`.
|
|
190
190
|
* `reason` is a human-readable sentence naming exactly what happened —
|
|
191
191
|
* printed to stderr by every CLI caller, never synthesized twice.
|
|
192
192
|
*/
|
|
193
|
-
export interface
|
|
193
|
+
export interface VaultScaffoldRemoteResult {
|
|
194
194
|
/** `scaffolded`: the remote is in place (added now or already present). `skipped`: `repo_dir` lies inside
|
|
195
195
|
* another repository, which is never touched — `toplevel` names it. */
|
|
196
196
|
status: "scaffolded" | "skipped";
|
|
@@ -215,24 +215,24 @@ export interface GitvaultScaffoldRemoteResult {
|
|
|
215
215
|
excluded_in_enclosing?: boolean;
|
|
216
216
|
/**
|
|
217
217
|
* A `skipped` result names the way out: `create_nested_repo`, pointing at
|
|
218
|
-
* `run402 repos create --nested --project <
|
|
218
|
+
* `run402 repos create --nested --project <project_id>` — a nested repository
|
|
219
219
|
* keeps an encrypted remote for the app without touching the enclosing
|
|
220
220
|
* repository. Absent on a `scaffolded` result.
|
|
221
221
|
*/
|
|
222
222
|
next_actions?: NextAction[];
|
|
223
223
|
}
|
|
224
|
-
export interface
|
|
224
|
+
export interface VaultInitResult {
|
|
225
225
|
repo_id: string;
|
|
226
226
|
project_id: string;
|
|
227
227
|
/** Emitted once at creation — integrity data, not a secret. Print it, copy it, keep many copies. */
|
|
228
|
-
recovery_receipt:
|
|
228
|
+
recovery_receipt: VaultCreationResult["recovery_receipt"];
|
|
229
229
|
genesis_sha256: string;
|
|
230
230
|
/** The git remote that was added, when a working tree was scaffolded. */
|
|
231
|
-
remote:
|
|
231
|
+
remote: VaultScaffoldRemoteResult | null;
|
|
232
232
|
deduplicated: boolean;
|
|
233
|
-
terminal_loss_statement: typeof
|
|
233
|
+
terminal_loss_statement: typeof VAULT_TERMINAL_LOSS_STATEMENT;
|
|
234
234
|
/**
|
|
235
|
-
*
|
|
235
|
+
* vault-byo-primary-bucket task 3.1/3.5 — the AUTHORITATIVE profile
|
|
236
236
|
* (read back from the vault record, never assumed from what `init`'s
|
|
237
237
|
* `byo` option requested). `"managed"` when `byo` was omitted, OR when it
|
|
238
238
|
* was requested but this project's vault already existed as a managed
|
|
@@ -241,7 +241,7 @@ export interface GitvaultInitResult {
|
|
|
241
241
|
storage_profile: "managed" | "byo";
|
|
242
242
|
byo_destination: string | null;
|
|
243
243
|
}
|
|
244
|
-
export interface
|
|
244
|
+
export interface VaultCompactResult {
|
|
245
245
|
generation: string;
|
|
246
246
|
head_sha256: string;
|
|
247
247
|
form: "wal" | "checkpoint";
|
|
@@ -253,11 +253,11 @@ export interface GitvaultCompactResult {
|
|
|
253
253
|
covered_roots: number;
|
|
254
254
|
/**
|
|
255
255
|
* What the transient-storage preflight saw
|
|
256
|
-
* (
|
|
257
|
-
* not be answered — see {@link
|
|
256
|
+
* (vault-compaction-headroom-preflight). `null` when the preflight could
|
|
257
|
+
* not be answered — see {@link VaultCompactHeadroom} for why an
|
|
258
258
|
* unanswerable check never blocks maintenance.
|
|
259
259
|
*/
|
|
260
|
-
headroom:
|
|
260
|
+
headroom: VaultCompactHeadroom | null;
|
|
261
261
|
}
|
|
262
262
|
/**
|
|
263
263
|
* Compaction's transient pooled-storage arithmetic.
|
|
@@ -273,7 +273,7 @@ export interface GitvaultCompactResult {
|
|
|
273
273
|
* legibly than the platform's own storage-quota enforcement, never admit
|
|
274
274
|
* something that enforcement would refuse.
|
|
275
275
|
*/
|
|
276
|
-
export interface
|
|
276
|
+
export interface VaultCompactHeadroom {
|
|
277
277
|
/** Pooled storage the org is already using, across every project it owns. */
|
|
278
278
|
pool_used_bytes: number;
|
|
279
279
|
/** The org's plain, unraised pooled tier storage limit — always the tier's own figure, never the grant-raised one, so a disclosed "used of X pooled" never implies the tier itself grew. */
|
|
@@ -287,7 +287,7 @@ export interface GitvaultCompactHeadroom {
|
|
|
287
287
|
/** `true` when the caller passed the override and a `false` `ok` was proceeded past anyway. */
|
|
288
288
|
overridden: boolean;
|
|
289
289
|
/**
|
|
290
|
-
*
|
|
290
|
+
* vault-checkpoint-cadence design D3: `pool_limit_bytes` PLUS an active
|
|
291
291
|
* compaction grant's `granted_bytes`, when one is active for this cycle —
|
|
292
292
|
* the limit `ok`/`projected_transient_bytes` are actually computed
|
|
293
293
|
* against. Equal to `pool_limit_bytes` (and omittable) when no grant is
|
|
@@ -301,13 +301,13 @@ export interface GitvaultCompactHeadroom {
|
|
|
301
301
|
} | null;
|
|
302
302
|
}
|
|
303
303
|
/**
|
|
304
|
-
* `run402
|
|
305
|
-
* — {@link
|
|
304
|
+
* `run402 repos capture --dry-run`'s report shape
|
|
305
|
+
* — {@link Repos.planCapture}'s return type. Every sizing field is `null`,
|
|
306
306
|
* and `refs`/`objects` are empty, exactly when `allocation_needed` is `true`
|
|
307
307
|
* — see that method's doc comment for why sizing is genuinely UNKNOWABLE
|
|
308
308
|
* (not merely unreported) before the vault's encryption key exists.
|
|
309
309
|
*/
|
|
310
|
-
export interface
|
|
310
|
+
export interface VaultSnapshotPushPlan {
|
|
311
311
|
/** `true` when this project has no vault yet — a real push/snapshot would allocate one first (push-to-create). This dry run never does. */
|
|
312
312
|
allocation_needed: boolean;
|
|
313
313
|
base_generation: string | null;
|
|
@@ -315,8 +315,8 @@ export interface GitvaultSnapshotPushPlan {
|
|
|
315
315
|
/** `would_admit_generation` as a plain decimal string. */
|
|
316
316
|
would_admit_generation_decimal: string | null;
|
|
317
317
|
form: "wal" | "checkpoint" | null;
|
|
318
|
-
refs:
|
|
319
|
-
head_target:
|
|
318
|
+
refs: VaultRefMap;
|
|
319
|
+
head_target: VaultHeadTarget | null;
|
|
320
320
|
/** Every object that would be uploaded, with REAL sealed (encrypted) sizes. Empty when `allocation_needed`. */
|
|
321
321
|
objects: Array<{
|
|
322
322
|
object_kind: string;
|
|
@@ -328,12 +328,12 @@ export interface GitvaultSnapshotPushPlan {
|
|
|
328
328
|
/** Sum of the plaintext pack bytes before sealing. */
|
|
329
329
|
raw_bytes: string | null;
|
|
330
330
|
/** The local capture this dry run computed — real, regardless of `allocation_needed`: capturing the work tree touches no network. */
|
|
331
|
-
snapshot:
|
|
332
|
-
|
|
333
|
-
|
|
331
|
+
snapshot: VaultSnapshot;
|
|
332
|
+
vault_commit: string;
|
|
333
|
+
vault_commit_line: string;
|
|
334
334
|
}
|
|
335
335
|
/** One retention ROOT (a dropped ref tip) and whether its 90-day window has closed. */
|
|
336
|
-
export interface
|
|
336
|
+
export interface VaultPruneCandidate {
|
|
337
337
|
ref: string;
|
|
338
338
|
oid: string;
|
|
339
339
|
dropped_at_generation: string;
|
|
@@ -341,14 +341,14 @@ export interface GitvaultPruneCandidate {
|
|
|
341
341
|
reason: string;
|
|
342
342
|
}
|
|
343
343
|
/** One STORED OBJECT the plan proposes deleting — what a `prune_intent`'s `delete_set` actually names. */
|
|
344
|
-
export interface
|
|
344
|
+
export interface VaultPruneObjectCandidate {
|
|
345
345
|
object_id: string;
|
|
346
346
|
object_kind: string;
|
|
347
347
|
size_bytes: string;
|
|
348
348
|
}
|
|
349
|
-
export interface
|
|
349
|
+
export interface VaultPruneResult {
|
|
350
350
|
/** Retention ROOTS and their windows — the retention view, unchanged. */
|
|
351
|
-
candidates:
|
|
351
|
+
candidates: VaultPruneCandidate[];
|
|
352
352
|
eligible_count: number;
|
|
353
353
|
retained_count: number;
|
|
354
354
|
/**
|
|
@@ -357,7 +357,7 @@ export interface GitvaultPruneResult {
|
|
|
357
357
|
* `retention_cutoff` ticket and its own admission times, and refuses any that
|
|
358
358
|
* is not retention-eligible. A client cannot prove either fact.
|
|
359
359
|
*/
|
|
360
|
-
object_candidates:
|
|
360
|
+
object_candidates: VaultPruneObjectCandidate[];
|
|
361
361
|
/** Pruneable objects left out by the 10 000-per-intent cap; chunk into a later intent. */
|
|
362
362
|
deferred_object_count: number;
|
|
363
363
|
/** Why nothing may be pruned yet, or `null` when a submission is structurally possible. */
|
|
@@ -370,31 +370,31 @@ export interface GitvaultPruneResult {
|
|
|
370
370
|
* and object id, so a rebuilt core is a DIFFERENT core and the receipt
|
|
371
371
|
* `r402s-verify` produced would no longer bind to it.
|
|
372
372
|
*/
|
|
373
|
-
intent_core: import("../node/
|
|
373
|
+
intent_core: import("../node/vault-prune.js").VaultPruneIntentCore | null;
|
|
374
374
|
intent_core_sha256: string | null;
|
|
375
375
|
/** What this SDK observed while restoring the latest checkpoint — the receipt's evidence. */
|
|
376
|
-
attestation: import("../node/
|
|
376
|
+
attestation: import("../node/vault-publication.js").VaultStoredCheckpointAttestation | null;
|
|
377
377
|
/** `true` only when an intent was accepted by the gateway. */
|
|
378
378
|
submitted: boolean;
|
|
379
379
|
/** The gateway's view of the submitted intent; `null` when nothing was submitted. */
|
|
380
|
-
intent: import("../node/
|
|
380
|
+
intent: import("../node/vault-prune.js").VaultPruneIntentRecord | null;
|
|
381
381
|
/**
|
|
382
382
|
* What the control-plane-signed completion CONFIRMS. `deleted` is the only
|
|
383
383
|
* result that means the bytes are gone: `present_after_attempt` is a failed
|
|
384
384
|
* deletion, not a successful one.
|
|
385
385
|
*/
|
|
386
|
-
confirmation: import("../node/
|
|
386
|
+
confirmation: import("../node/vault-prune.js").VaultPruneConfirmation | null;
|
|
387
387
|
note: string;
|
|
388
388
|
}
|
|
389
389
|
/** Options shared by every Node-only verb. */
|
|
390
|
-
export interface
|
|
390
|
+
export interface VaultHandleOptions {
|
|
391
391
|
/** The vault to act on. Resolved from `project_id` when omitted. */
|
|
392
392
|
repo_id?: string;
|
|
393
393
|
/** Resolve `repo_id` from the project (the cold-restart entry point). */
|
|
394
394
|
project_id?: string;
|
|
395
395
|
/**
|
|
396
|
-
*
|
|
397
|
-
* KEY-HOLDING client runs on its first ordinary
|
|
396
|
+
* vault-agent-envelopes D5 — the session-start envelope fulfilment a
|
|
397
|
+
* KEY-HOLDING client runs on its first ordinary vault operation in a
|
|
398
398
|
* process (read verbs included), so a pending member is covered the next
|
|
399
399
|
* time ANY key-holder does anything. `"auto"` (default): run once per
|
|
400
400
|
* process per vault, best-effort, reported on the handle. `"deferred"`
|
|
@@ -406,7 +406,7 @@ export interface GitvaultVaultHandleOptions {
|
|
|
406
406
|
reconcile?: "auto" | "deferred" | "forbidden";
|
|
407
407
|
/** The local git working tree. Defaults to `process.cwd()`. */
|
|
408
408
|
repo_dir?: string;
|
|
409
|
-
/** Keystore root override (defaults to `~/.config/run402/
|
|
409
|
+
/** Keystore root override (defaults to `~/.config/run402/vault`; `~/.config/run402/profiles/<wallet>/vault` under a named wallet). */
|
|
410
410
|
keystore_root?: string;
|
|
411
411
|
/** Pinned service public key for control-plane signature checks (cutoff tickets). */
|
|
412
412
|
service_public_key?: Uint8Array | string;
|
|
@@ -414,62 +414,62 @@ export interface GitvaultVaultHandleOptions {
|
|
|
414
414
|
verification_budget?: number;
|
|
415
415
|
}
|
|
416
416
|
/** An opened vault plus the pieces the caller may want to keep using. */
|
|
417
|
-
export interface
|
|
417
|
+
export interface VaultHandle {
|
|
418
418
|
repo_id: string;
|
|
419
|
-
keystore:
|
|
420
|
-
transport:
|
|
419
|
+
keystore: VaultKeystore;
|
|
420
|
+
transport: VaultTransport;
|
|
421
421
|
/** The full protocol object — every verb below is built on it. */
|
|
422
|
-
vault: import("../node/
|
|
422
|
+
vault: import("../node/vault-publication.js").Vault;
|
|
423
423
|
/**
|
|
424
|
-
*
|
|
424
|
+
* vault-agent-envelopes D4: non-null when this open restored the repo
|
|
425
425
|
* file from the keystore's OWN envelope (a cold keystore joining a vault it
|
|
426
426
|
* is a recipient of). Carries the honest trust tier — `platform_attested`
|
|
427
427
|
* is not end-to-end authentication.
|
|
428
428
|
*/
|
|
429
|
-
restored: import("../node/
|
|
429
|
+
restored: import("../node/vault-publication.js").VaultColdOpenResult | null;
|
|
430
430
|
/**
|
|
431
|
-
*
|
|
431
|
+
* vault-agent-envelopes D5: the session-start fulfilment outcome for a
|
|
432
432
|
* key-holding client (`null` when this open did not run one — a restored
|
|
433
433
|
* keystore has nothing to wrap yet, `reconcile: "forbidden"`, or a later
|
|
434
434
|
* open in the same process). Reported beside the verb's own result, never
|
|
435
435
|
* folded into it.
|
|
436
436
|
*/
|
|
437
|
-
reconcile_recipients:
|
|
437
|
+
reconcile_recipients: VaultSessionReconcileResult | null;
|
|
438
438
|
/**
|
|
439
|
-
*
|
|
439
|
+
* vault-multi-writer (task 5.7) — the session-start writer-admission
|
|
440
440
|
* reconcile's outcome. `null` exactly when `reconcile: "forbidden"` — this
|
|
441
441
|
* reconcile carries no disclosure risk (it wraps nothing), so unlike
|
|
442
442
|
* {@link reconcile_recipients} it is otherwise ALWAYS attempted, no
|
|
443
443
|
* custody-verification gate and no once-per-process memoization: {@link
|
|
444
|
-
* import("../node/
|
|
444
|
+
* import("../node/vault-publication.js").Vault.
|
|
445
445
|
* reconcileWriterAdmissions} is already a fast no-op (one local pin check,
|
|
446
446
|
* no network call) whenever this session's own key is not an active
|
|
447
447
|
* writer.
|
|
448
448
|
*/
|
|
449
|
-
writer_reconcile:
|
|
450
|
-
/**
|
|
451
|
-
enrollment:
|
|
449
|
+
writer_reconcile: VaultReconcileWriterAdmissionsPushResult | null;
|
|
450
|
+
/** vault-agent-envelopes D3: what the enroll-if-absent step did for this keystore's key on this open. */
|
|
451
|
+
enrollment: VaultEnrollmentOutcome;
|
|
452
452
|
}
|
|
453
|
-
/** The session-start reconcile's outcome (
|
|
454
|
-
export interface
|
|
453
|
+
/** The session-start reconcile's outcome (vault-agent-envelopes D5). */
|
|
454
|
+
export interface VaultSessionReconcileResult {
|
|
455
455
|
attempted: boolean;
|
|
456
456
|
outcome: "reconciled" | "skipped_error" | "deferred_by_local_policy" | "forbidden" | "custody_unverified";
|
|
457
|
-
result?:
|
|
457
|
+
result?: VaultReconcileEnvelopeRecipientsResult;
|
|
458
458
|
/** `deferred_by_local_policy` only: desired recipients this vault does not yet cover (best-effort; `null` when the read failed). */
|
|
459
459
|
pending_count?: number | null;
|
|
460
460
|
error?: string;
|
|
461
461
|
}
|
|
462
|
-
/** The enroll-if-absent step's outcome (
|
|
463
|
-
export interface
|
|
464
|
-
/** `already_active`: the directory holds this keystore's key (BOTH halves current — encryption active AND signing_fingerprint already matches,
|
|
462
|
+
/** The enroll-if-absent step's outcome (vault-agent-envelopes D3). Never a rotation. */
|
|
463
|
+
export interface VaultEnrollmentOutcome {
|
|
464
|
+
/** `already_active`: the directory holds this keystore's key (BOTH halves current — encryption active AND signing_fingerprint already matches, vault-multi-writer rev 47). `enrolled`: published + possession-proven in this call. `activated_pending`: an earlier unfinished publish was completed. `signing_republished` (rev 47): the encryption half was ALREADY active and needed no work; only the signing half was (re)published this call — never a rotation, the signing half is always freely republishable. `skipped_no_identity`: no local keystore identity (nothing to enroll — vault creation mints one). `skipped_no_principal`: whoami resolved no enrolling principal (e.g. a service key). `skipped_not_enrollable`: the principal's type is not custody-eligible (ci/system) — no identity is minted. `skipped_error`: whoami/publish/activate failed (older gateway, transport) — the verb still ran, but custody continuity is UNVERIFIED, so no automatic reconcile follows; `error` says why. */
|
|
465
465
|
outcome: "already_active" | "enrolled" | "activated_pending" | "signing_republished" | "skipped_no_identity" | "skipped_no_principal" | "skipped_not_enrollable" | "skipped_error";
|
|
466
466
|
ek_fingerprint: string | null;
|
|
467
467
|
/**
|
|
468
|
-
*
|
|
468
|
+
* vault-multi-writer rev 47 (task 5.3) — the keystore's vault-WRITER
|
|
469
469
|
* signing half, published in the SAME call as the encryption half
|
|
470
470
|
* whenever this keystore holds a signing seed. `null` when the identity
|
|
471
471
|
* has no local signing seed (a read-only recovery identity — see
|
|
472
|
-
* `
|
|
472
|
+
* `VaultIdentityFile.signing_seed_hex`'s own doc comment) or when the
|
|
473
473
|
* publish itself was never attempted (`skipped_no_identity`/
|
|
474
474
|
* `skipped_no_principal`/`skipped_not_enrollable`). UNLIKE the encryption
|
|
475
475
|
* half, the signing half is NEVER rotation-gated — a differing published
|
|
@@ -480,34 +480,34 @@ export interface GitvaultEnrollmentOutcome {
|
|
|
480
480
|
signing_fingerprint: string | null;
|
|
481
481
|
error?: string;
|
|
482
482
|
}
|
|
483
|
-
/** {@link
|
|
484
|
-
export interface
|
|
483
|
+
/** {@link Repos.capture}'s best-effort envelope-recipient reconcile outcome, reported beside (never folded into) the vault result — same non-blocking contract as {@link VaultMirrorPushResult}. */
|
|
484
|
+
export interface VaultReconcileEnvelopeRecipientsPushResult {
|
|
485
485
|
attempted: boolean;
|
|
486
486
|
outcome: "reconciled" | "skipped_error";
|
|
487
|
-
result?:
|
|
487
|
+
result?: VaultReconcileEnvelopeRecipientsResult;
|
|
488
488
|
error?: string;
|
|
489
489
|
}
|
|
490
490
|
/**
|
|
491
|
-
*
|
|
492
|
-
*
|
|
491
|
+
* vault-multi-writer (task 5.7) — the writer-admission twin of {@link
|
|
492
|
+
* VaultReconcileEnvelopeRecipientsPushResult}: best-effort, reported
|
|
493
493
|
* beside (never folded into) the vault result. ONE shape used at every
|
|
494
494
|
* wiring site (push/snapshot/deploy/session-start/read) — unlike the
|
|
495
495
|
* envelope reconcile's split between this push-result shape and the
|
|
496
|
-
* richer {@link
|
|
496
|
+
* richer {@link VaultSessionReconcileResult}, `"forbidden"` is included
|
|
497
497
|
* here too since this reconcile's session-start policy (task 5.7's own,
|
|
498
498
|
* deliberately simpler than the envelope reconcile's custody-gated one —
|
|
499
|
-
* see {@link
|
|
499
|
+
* see {@link VaultHandle.writer_reconcile}) honors only that one value;
|
|
500
500
|
* it is simply unreachable at the push/snapshot/deploy sites, which never
|
|
501
501
|
* check `options.reconcile` for this hook.
|
|
502
502
|
*/
|
|
503
|
-
export interface
|
|
503
|
+
export interface VaultReconcileWriterAdmissionsPushResult {
|
|
504
504
|
attempted: boolean;
|
|
505
505
|
outcome: "reconciled" | "skipped_error" | "forbidden";
|
|
506
|
-
result?:
|
|
506
|
+
result?: VaultReconcileWriterAdmissionsResult;
|
|
507
507
|
error?: string;
|
|
508
508
|
}
|
|
509
|
-
/** {@link
|
|
510
|
-
export interface
|
|
509
|
+
/** {@link Repos.handoff}'s result. `handoff_key` (the assembled `kgh1_…`) is returned exactly ONCE. */
|
|
510
|
+
export interface VaultHandoffMintResult {
|
|
511
511
|
handoff_key: string;
|
|
512
512
|
handoff_id: string;
|
|
513
513
|
kind: "handoff";
|
|
@@ -530,14 +530,14 @@ export interface GitvaultHandoffMintResult {
|
|
|
530
530
|
ignored_not_transferred_count: number;
|
|
531
531
|
};
|
|
532
532
|
/** The full local capture result, for a caller that wants more than the summarized `capture` block. */
|
|
533
|
-
snapshot: import("../node/
|
|
533
|
+
snapshot: import("../node/vault-snapshot.js").VaultHandoffSnapshot;
|
|
534
534
|
warnings: {
|
|
535
535
|
code: string;
|
|
536
536
|
message: string;
|
|
537
537
|
}[];
|
|
538
538
|
next_actions: NextAction[];
|
|
539
539
|
}
|
|
540
|
-
export interface
|
|
540
|
+
export interface VaultHandoffListEntry {
|
|
541
541
|
handoff_id: string;
|
|
542
542
|
kind: string;
|
|
543
543
|
state: "issued" | "redeemed" | "expired" | "revoked";
|
|
@@ -546,16 +546,16 @@ export interface GitvaultHandoffListEntry {
|
|
|
546
546
|
expires_at: string;
|
|
547
547
|
redeemed_by?: string | null;
|
|
548
548
|
}
|
|
549
|
-
export interface
|
|
550
|
-
handoffs:
|
|
549
|
+
export interface VaultHandoffListResult {
|
|
550
|
+
handoffs: VaultHandoffListEntry[];
|
|
551
551
|
}
|
|
552
|
-
/** {@link
|
|
553
|
-
export interface
|
|
552
|
+
/** {@link Repos.resume}'s result. */
|
|
553
|
+
export interface VaultHandoffResumeResult {
|
|
554
554
|
handoff_id: string;
|
|
555
555
|
kind: "handoff";
|
|
556
556
|
deduplicated: boolean;
|
|
557
557
|
/** The Handoff Note, parsed — `null` when the commit message could not be read/parsed (still restored either way). */
|
|
558
|
-
note: import("../node/
|
|
558
|
+
note: import("../node/vault-handoff.js").KygitHandoffNote | null;
|
|
559
559
|
/** The note's raw commit-message text, for a caller that wants Markdown rendering over the parsed shape. */
|
|
560
560
|
note_raw: string | null;
|
|
561
561
|
restored: {
|
|
@@ -571,20 +571,20 @@ export interface GitvaultHandoffResumeResult {
|
|
|
571
571
|
};
|
|
572
572
|
members: unknown[];
|
|
573
573
|
expires_at: string;
|
|
574
|
-
/**
|
|
574
|
+
/** vault-multi-writer rev 47 (task 5.6, design D5) — this checkout's own writer activation. `outcome: "active"` covers BOTH a fresh submission this call made and the idempotent-skip case (a prior attempt's activation already landed) — the writer IS active either way. */
|
|
575
575
|
writer_activation: {
|
|
576
576
|
outcome: "active";
|
|
577
577
|
writer_key_id: string;
|
|
578
578
|
generation: string;
|
|
579
579
|
};
|
|
580
|
-
reconcile_recipients:
|
|
580
|
+
reconcile_recipients: VaultReconcileEnvelopeRecipientsPushResult;
|
|
581
581
|
next_actions: NextAction[];
|
|
582
582
|
}
|
|
583
583
|
/**
|
|
584
584
|
* The gateway names the vault by its three ids on the wire — `repo_id`,
|
|
585
585
|
* `org_id`, `project_id` (docs/style.md's API-boundary vocabulary) — on
|
|
586
|
-
* BOTH the handoff mint (`POST /
|
|
587
|
-
* claim (`POST /
|
|
586
|
+
* BOTH the handoff mint (`POST /vaults/v1/:vault_id/handoffs`) and
|
|
587
|
+
* claim (`POST /vaults/v1/handoffs/:handoff_id/redeem`) responses. The SDK
|
|
588
588
|
* groups them under `vault` with the `organization_id` spelling every other
|
|
589
589
|
* SDK result uses. Neither response carries a slug-form address, so
|
|
590
590
|
* `address` is `null` unless the caller already knows one (a slug-form
|
|
@@ -594,13 +594,13 @@ export declare function handoffVaultFromWire(wire: {
|
|
|
594
594
|
repo_id: string;
|
|
595
595
|
org_id: string;
|
|
596
596
|
project_id: string;
|
|
597
|
-
}, address?: string | null):
|
|
597
|
+
}, address?: string | null): VaultHandoffMintResult["vault"];
|
|
598
598
|
/** The redeem response's `membership` block (`org_id` on the wire) in the SDK's `organization_id` spelling. Pure; exported for tests. */
|
|
599
599
|
export declare function handoffMembershipFromWire(wire: {
|
|
600
600
|
org_id: string;
|
|
601
601
|
role: string;
|
|
602
602
|
status: string;
|
|
603
|
-
}):
|
|
603
|
+
}): VaultHandoffResumeResult["membership"];
|
|
604
604
|
/**
|
|
605
605
|
* An invite mints at `developer` unless `--role` narrows it or the minter's
|
|
606
606
|
* own role is narrower — the ONE descriptor difference from a handoff, which
|
|
@@ -612,12 +612,12 @@ export declare function handoffMembershipFromWire(wire: {
|
|
|
612
612
|
*/
|
|
613
613
|
export declare const INVITE_DEFAULT_ROLE = "developer";
|
|
614
614
|
/** A room's `(org_id, room_key)` pair, as it rides the invite mint/redeem responses. */
|
|
615
|
-
export interface
|
|
615
|
+
export interface VaultInviteRoom {
|
|
616
616
|
organization_id: string;
|
|
617
617
|
room_key: string;
|
|
618
618
|
}
|
|
619
|
-
/** Best-effort report of whether {@link
|
|
620
|
-
export interface
|
|
619
|
+
/** Best-effort report of whether {@link Repos.invite}'s room message was posted — a failure here (e.g. the daily quota) never voids the mint (design D4). */
|
|
620
|
+
export interface VaultInviteRoomMessageResult {
|
|
621
621
|
posted: boolean;
|
|
622
622
|
message_id?: string;
|
|
623
623
|
/** The posted message's room cursor — a CLI advances the inviter's stored cursor past it, so the inviter's own `messages wait` is woken by the joiner's arrival, never by its own message. */
|
|
@@ -625,14 +625,14 @@ export interface GitvaultInviteRoomMessageResult {
|
|
|
625
625
|
reason?: string;
|
|
626
626
|
}
|
|
627
627
|
/** Best-effort report of whether the inviter's own presence was registered before minting (design D4) — the mint still proceeds without one. */
|
|
628
|
-
export interface
|
|
628
|
+
export interface VaultInvitePresenceResult {
|
|
629
629
|
registered: boolean;
|
|
630
630
|
presence_id?: string;
|
|
631
631
|
name?: string;
|
|
632
632
|
error?: string;
|
|
633
633
|
}
|
|
634
|
-
/** {@link
|
|
635
|
-
export interface
|
|
634
|
+
/** {@link Repos.invite}'s result. `invite_key` (the assembled `kgi1_…`) is returned exactly ONCE. */
|
|
635
|
+
export interface VaultInviteMintResult {
|
|
636
636
|
invite_key: string;
|
|
637
637
|
invite_id: string;
|
|
638
638
|
kind: "invite";
|
|
@@ -644,7 +644,7 @@ export interface GitvaultInviteMintResult {
|
|
|
644
644
|
organization_id: string;
|
|
645
645
|
project_id: string;
|
|
646
646
|
};
|
|
647
|
-
room:
|
|
647
|
+
room: VaultInviteRoom;
|
|
648
648
|
checkpoint: {
|
|
649
649
|
generation: string;
|
|
650
650
|
snapshot_oid_hmac: string;
|
|
@@ -656,16 +656,16 @@ export interface GitvaultInviteMintResult {
|
|
|
656
656
|
ignored_not_transferred_count: number;
|
|
657
657
|
};
|
|
658
658
|
/** The full local capture result, for a caller that wants more than the summarized `capture` block. */
|
|
659
|
-
snapshot: import("../node/
|
|
660
|
-
inviter_presence:
|
|
661
|
-
room_message:
|
|
659
|
+
snapshot: import("../node/vault-snapshot.js").VaultHandoffSnapshot;
|
|
660
|
+
inviter_presence: VaultInvitePresenceResult;
|
|
661
|
+
room_message: VaultInviteRoomMessageResult;
|
|
662
662
|
warnings: {
|
|
663
663
|
code: string;
|
|
664
664
|
message: string;
|
|
665
665
|
}[];
|
|
666
666
|
next_actions: NextAction[];
|
|
667
667
|
}
|
|
668
|
-
export interface
|
|
668
|
+
export interface VaultInviteListEntry {
|
|
669
669
|
invite_id: string;
|
|
670
670
|
kind: string;
|
|
671
671
|
state: "issued" | "redeemed" | "expired" | "revoked";
|
|
@@ -675,11 +675,11 @@ export interface GitvaultInviteListEntry {
|
|
|
675
675
|
expires_at: string;
|
|
676
676
|
redeemed_by?: string | null;
|
|
677
677
|
}
|
|
678
|
-
export interface
|
|
679
|
-
invites:
|
|
678
|
+
export interface VaultInviteListResult {
|
|
679
|
+
invites: VaultInviteListEntry[];
|
|
680
680
|
}
|
|
681
|
-
/** The inviter's presence, resolved live at redeem time (design
|
|
682
|
-
export interface
|
|
681
|
+
/** The inviter's presence, resolved live at redeem time (design vault-invite's own claim requirement) — `null` when the inviter never registered one. */
|
|
682
|
+
export interface VaultInviteInviter {
|
|
683
683
|
presence_id: string;
|
|
684
684
|
name: string;
|
|
685
685
|
program: string | null;
|
|
@@ -687,13 +687,13 @@ export interface GitvaultInviteInviter {
|
|
|
687
687
|
state: string;
|
|
688
688
|
last_active: string;
|
|
689
689
|
}
|
|
690
|
-
/** {@link
|
|
691
|
-
export interface
|
|
690
|
+
/** {@link Repos.join}'s result. */
|
|
691
|
+
export interface VaultInviteJoinResult {
|
|
692
692
|
invite_id: string;
|
|
693
693
|
kind: "invite";
|
|
694
694
|
deduplicated: boolean;
|
|
695
695
|
/** The Invite Note, parsed — `null` when the commit message could not be read/parsed (still restored either way). */
|
|
696
|
-
note: import("../node/
|
|
696
|
+
note: import("../node/vault-handoff.js").KygitInviteNote | null;
|
|
697
697
|
/** The note's raw commit-message text, for a caller that wants Markdown rendering over the parsed shape. */
|
|
698
698
|
note_raw: string | null;
|
|
699
699
|
restored: {
|
|
@@ -708,8 +708,8 @@ export interface GitvaultInviteJoinResult {
|
|
|
708
708
|
status: string;
|
|
709
709
|
};
|
|
710
710
|
members: unknown[];
|
|
711
|
-
room:
|
|
712
|
-
inviter:
|
|
711
|
+
room: VaultInviteRoom;
|
|
712
|
+
inviter: VaultInviteInviter | null;
|
|
713
713
|
/** This session's OWN presence in the room (what the arrival fact was posted as), or `null` when registration failed. A CLI persists it into the joined checkout so the first `messages wait` there speaks as the same session. */
|
|
714
714
|
presence: {
|
|
715
715
|
presence_id: string;
|
|
@@ -722,9 +722,9 @@ export interface GitvaultInviteJoinResult {
|
|
|
722
722
|
recent_messages: unknown[];
|
|
723
723
|
expires_at: string;
|
|
724
724
|
/**
|
|
725
|
-
*
|
|
725
|
+
* vault-multi-writer rev 47 (kygit-invite design D5/D9) — this
|
|
726
726
|
* checkout's own writer activation, driven through the SAME shared
|
|
727
|
-
* `add_writer_key` door {@link
|
|
727
|
+
* `add_writer_key` door {@link Repos.resume} uses, BEFORE `join()`
|
|
728
728
|
* returns, so the joiner's first `git push` is an ordinary push.
|
|
729
729
|
* `outcome: "active"` covers both a fresh submission and the
|
|
730
730
|
* idempotent-skip case. `outcome: "pending"` is D9's not-stranded path: a
|
|
@@ -741,12 +741,12 @@ export interface GitvaultInviteJoinResult {
|
|
|
741
741
|
writer_key_id: string;
|
|
742
742
|
reason: string;
|
|
743
743
|
};
|
|
744
|
-
reconcile_recipients:
|
|
744
|
+
reconcile_recipients: VaultReconcileEnvelopeRecipientsPushResult;
|
|
745
745
|
next_actions: NextAction[];
|
|
746
746
|
}
|
|
747
|
-
/** What {@link
|
|
747
|
+
/** What {@link Repos.openOrCreate} did. `created` is `null` exactly when `found` is `true`. */
|
|
748
748
|
/** `run402 repos mirror` (no-arg, a READ) and `repos view`'s mirror summary both compose this — what this machine and the mirror each believe (both honesty statements ride every response). */
|
|
749
|
-
export interface
|
|
749
|
+
export interface VaultMirrorStatus {
|
|
750
750
|
repo_id: string;
|
|
751
751
|
configured: boolean;
|
|
752
752
|
/** `s3://bucket/prefix` or a directory path — never a credential. */
|
|
@@ -760,31 +760,31 @@ export interface GitvaultMirrorStatus {
|
|
|
760
760
|
is_current: boolean | null;
|
|
761
761
|
/** Present exactly when `is_current === false`. */
|
|
762
762
|
closing_command: string | null;
|
|
763
|
-
/**
|
|
763
|
+
/** vault-mirror-default: when a mirror write/sync last completed with zero failures (local config fact — never transmitted). `null` when unconfigured or never succeeded. */
|
|
764
764
|
last_success_at: string | null;
|
|
765
|
-
/**
|
|
766
|
-
finding:
|
|
767
|
-
validity_not_freshness: typeof
|
|
768
|
-
keystore_still_required: typeof
|
|
765
|
+
/** vault-mirror-default: the standing `vault_unmirrored` finding — informational, never blocking; `null` once a mirror write or sync has succeeded (see {@link vaultUnmirroredFinding}). */
|
|
766
|
+
finding: VaultUnmirroredFinding | null;
|
|
767
|
+
validity_not_freshness: typeof VAULT_MIRROR_VALIDITY_NOT_FRESHNESS_STATEMENT;
|
|
768
|
+
keystore_still_required: typeof VAULT_MIRROR_KEYSTORE_STILL_REQUIRED_STATEMENT;
|
|
769
769
|
}
|
|
770
770
|
/**
|
|
771
|
-
*
|
|
772
|
-
* customer-held mirror copy yet.
|
|
771
|
+
* vault-mirror-default — the named standing finding for a vault with no
|
|
772
|
+
* customer-held mirror copy yet. vault-byo-primary-bucket task 3.5
|
|
773
773
|
* widens `message` to the BYO remedy wording ({@link
|
|
774
|
-
*
|
|
774
|
+
* VAULT_BYO_UNMIRRORED_REMEDY_STATEMENT}) for a BYO vault — it applies
|
|
775
775
|
* there too (D7): a single-bucket BYO vault has exactly as few copies as an
|
|
776
776
|
* unmirrored managed one, and the remedy names a SECOND customer-held
|
|
777
777
|
* location the same way.
|
|
778
778
|
*/
|
|
779
|
-
export interface
|
|
779
|
+
export interface VaultUnmirroredFinding {
|
|
780
780
|
kind: "vault_unmirrored";
|
|
781
|
-
message: typeof
|
|
781
|
+
message: typeof VAULT_UNMIRRORED_FINDING_STATEMENT | typeof VAULT_BYO_UNMIRRORED_REMEDY_STATEMENT;
|
|
782
782
|
/** The one command that moves toward clearing it: configure when unconfigured, backfill when configured-but-never-succeeded. */
|
|
783
783
|
setup_command: string;
|
|
784
784
|
}
|
|
785
785
|
/**
|
|
786
|
-
*
|
|
787
|
-
* entries `
|
|
786
|
+
* vault-byo-primary-bucket task 3.3 — the number of `{key, object_kind}`
|
|
787
|
+
* entries `VAULT_BYO_OBJECT_MISSING`'s `details.missing` lists before
|
|
788
788
|
* truncating (`details.missing_count` always carries the true total, and
|
|
789
789
|
* `details.missing_truncated` says whether the list above was cut). A
|
|
790
790
|
* chain-referenced object list can be arbitrarily large; an error envelope
|
|
@@ -792,22 +792,22 @@ export interface GitvaultUnmirroredFinding {
|
|
|
792
792
|
* `sample_keys`-class cap (asset-sync's plan response, `PLATFORM_INCIDENT_
|
|
793
793
|
* FANOUT_CAP`) rather than inventing a new number.
|
|
794
794
|
*/
|
|
795
|
-
export declare const
|
|
795
|
+
export declare const VAULT_BYO_OBJECT_MISSING_LIST_CAP = 50;
|
|
796
796
|
/**
|
|
797
|
-
*
|
|
798
|
-
* the shipped {@link import("../node/
|
|
799
|
-
* read-half primitive. Present on {@link
|
|
797
|
+
* vault-byo-primary-bucket task 3.3 (design D6) — `repos fsck`'s wiring of
|
|
798
|
+
* the shipped {@link import("../node/vault-mirror.js").verifyByoObjectsPresent}
|
|
799
|
+
* read-half primitive. Present on {@link VaultFsckResult.byo_presence}
|
|
800
800
|
* ONLY for a `storage_profile: "byo"` vault — `undefined` (the key absent
|
|
801
801
|
* from JSON entirely) for a managed vault, so a managed vault's `fsck`
|
|
802
802
|
* output is byte-identical to before this task.
|
|
803
803
|
*
|
|
804
804
|
* `verified: true` NEVER coexists with a missing object: a nonzero absence
|
|
805
|
-
* throws `
|
|
806
|
-
* {@link
|
|
805
|
+
* throws `VAULT_BYO_OBJECT_MISSING` instead of returning here (see
|
|
806
|
+
* {@link Repos.fsck}'s own doc comment) — this shape only ever reports
|
|
807
807
|
* the two honest non-failure outcomes, "checked, all present" and "could
|
|
808
808
|
* not check".
|
|
809
809
|
*/
|
|
810
|
-
export interface
|
|
810
|
+
export interface VaultFsckByoPresence {
|
|
811
811
|
/**
|
|
812
812
|
* `true` iff this call actually HEAD-checked the destination (local BYO
|
|
813
813
|
* write credentials were configured on this machine). `false` means "not
|
|
@@ -828,7 +828,7 @@ export interface GitvaultFsckByoPresence {
|
|
|
828
828
|
* implicit — the external review's clause-5 requirement for any verb that
|
|
829
829
|
* may advance local trust state.
|
|
830
830
|
*/
|
|
831
|
-
export interface
|
|
831
|
+
export interface VaultFsckResult {
|
|
832
832
|
repo_id: string;
|
|
833
833
|
/** `false` under `--no-write` (`write: false`) — nothing local was persisted, regardless of what was computed. */
|
|
834
834
|
write: boolean;
|
|
@@ -849,12 +849,12 @@ export interface GitvaultFsckResult {
|
|
|
849
849
|
* falls short of it when an admitted `rotate_epoch` transition's own
|
|
850
850
|
* envelope could not be opened by this keystore (`epoch_decrypt_failure`
|
|
851
851
|
* names exactly which epoch/rotation and why — never a bare, undifferentiated
|
|
852
|
-
* `
|
|
852
|
+
* `VAULT_AEAD_AUTH_FAILURE`). `refs`/`head_target`/`pin_after.highest_materialized`
|
|
853
853
|
* below all reflect THIS generation, not the chain-verified one, when they differ.
|
|
854
854
|
*/
|
|
855
855
|
decryptable_to_generation: string;
|
|
856
856
|
/** Non-null iff `decryptable_to_generation` fell short of `chain_verified_to_generation` — the named epoch boundary (Request 1). */
|
|
857
|
-
epoch_decrypt_failure: import("../node/
|
|
857
|
+
epoch_decrypt_failure: import("../node/vault-publication.js").VaultEpochDecryptFailure | null;
|
|
858
858
|
/** `true` only when `write` was true AND a pin actually moved. */
|
|
859
859
|
local_state_changed: boolean;
|
|
860
860
|
pin_before: {
|
|
@@ -866,10 +866,10 @@ export interface GitvaultFsckResult {
|
|
|
866
866
|
highest_materialized: string | null;
|
|
867
867
|
};
|
|
868
868
|
/** The real, computed ref map, AS OF `decryptable_to_generation` — present even under `--no-write` (computing is not the same as persisting). */
|
|
869
|
-
refs:
|
|
870
|
-
head_target:
|
|
869
|
+
refs: VaultRefMap;
|
|
870
|
+
head_target: VaultHeadTarget | null;
|
|
871
871
|
/** Present only when `--mirror` was requested. Proves validity, never freshness — see its own honesty statements. */
|
|
872
|
-
mirror:
|
|
872
|
+
mirror: VaultVerifyReport | null;
|
|
873
873
|
/**
|
|
874
874
|
* clone-installs-retained-refs (D2, task 1.3): the healing path for a
|
|
875
875
|
* pre-change clone (or a checkout whose original write degraded per D3) —
|
|
@@ -878,7 +878,7 @@ export interface GitvaultFsckResult {
|
|
|
878
878
|
* `repo_dir` is not itself a git repository — an ordinary, silent no-op,
|
|
879
879
|
* never a warning).
|
|
880
880
|
*/
|
|
881
|
-
retained_refs: import("../node/
|
|
881
|
+
retained_refs: import("../node/vault-publication.js").VaultRetainedRefsReconcileResult | null;
|
|
882
882
|
/**
|
|
883
883
|
* D210 (rev 44) — best-effort submission of THIS call's OWN
|
|
884
884
|
* `chain_verified_to_generation`/`decryptable_to_generation` as
|
|
@@ -893,20 +893,20 @@ export interface GitvaultFsckResult {
|
|
|
893
893
|
* `OPEN_PROOF_MISMATCH`) is recorded in `error` and nothing else; a
|
|
894
894
|
* `recipient_open_receipt` is EVIDENCE, never authorization (§4.14).
|
|
895
895
|
*/
|
|
896
|
-
open_proof:
|
|
896
|
+
open_proof: VaultOpenProofOutcome;
|
|
897
897
|
/**
|
|
898
|
-
*
|
|
898
|
+
* vault-byo-primary-bucket task 3.3 — see {@link VaultFsckByoPresence}.
|
|
899
899
|
* Absent entirely (not `null`) for a `storage_profile: "managed"` vault, so
|
|
900
900
|
* `JSON.stringify` drops the key and a managed vault's `fsck` output stays
|
|
901
901
|
* byte-identical to before this task existed. A `verified: true` result
|
|
902
902
|
* with objects missing is never returned here — see the interface's own
|
|
903
|
-
* doc comment for why that case throws `
|
|
903
|
+
* doc comment for why that case throws `VAULT_BYO_OBJECT_MISSING`
|
|
904
904
|
* instead.
|
|
905
905
|
*/
|
|
906
|
-
byo_presence?:
|
|
906
|
+
byo_presence?: VaultFsckByoPresence;
|
|
907
907
|
}
|
|
908
|
-
/** {@link
|
|
909
|
-
export interface
|
|
908
|
+
/** {@link VaultFsckResult.open_proof} — the outcome of `fsck`'s best-effort D210 proof-of-open submission. */
|
|
909
|
+
export interface VaultOpenProofOutcome {
|
|
910
910
|
/** `false` iff this call decided LOCALLY there was nothing to submit (write:false, or no local encryption identity) — no network call was made. */
|
|
911
911
|
attempted: boolean;
|
|
912
912
|
/** `true` iff the gateway accepted the submission (200 or 201) — `receipt`/`deduplicated` are populated. */
|
|
@@ -914,7 +914,7 @@ export interface GitvaultOpenProofOutcome {
|
|
|
914
914
|
/** `true` — the gateway returned the tuple's EXISTING receipt (200, an idempotent replay). `false` — a fresh receipt was minted (201). `null` when `submitted` is `false`. */
|
|
915
915
|
deduplicated: boolean | null;
|
|
916
916
|
/** The `recipient_open_receipt` the gateway returned, present iff `submitted`. */
|
|
917
|
-
receipt:
|
|
917
|
+
receipt: VaultOpenReceipt | null;
|
|
918
918
|
/** Present iff `attempted` and NOT `submitted` — why the gateway (or principal resolution before it) refused. */
|
|
919
919
|
error: {
|
|
920
920
|
code: string;
|
|
@@ -923,11 +923,11 @@ export interface GitvaultOpenProofOutcome {
|
|
|
923
923
|
}
|
|
924
924
|
/**
|
|
925
925
|
* D210 (rev 44) — the decision function behind `fsck`'s best-effort
|
|
926
|
-
* proof-of-open submission, factored out of {@link
|
|
926
|
+
* proof-of-open submission, factored out of {@link Repos}'s private
|
|
927
927
|
* `#submitFsckOpenProof` so it is directly unit-testable with injected
|
|
928
928
|
* (fake) `resolvePrincipalId`/`submit` dependencies, independent of a real
|
|
929
929
|
* HTTP-backed vault. `fsck()` itself supplies the REAL dependencies (`GET
|
|
930
|
-
* /agent/v1/whoami`, {@link
|
|
930
|
+
* /agent/v1/whoami`, {@link Repos.submitProofOfOpen}) — this function
|
|
931
931
|
* contains no HTTP/transport code of its own.
|
|
932
932
|
*
|
|
933
933
|
* Gating (all LOCAL, no network call made when either holds):
|
|
@@ -962,13 +962,13 @@ export declare function computeOpenProofOutcome(input: {
|
|
|
962
962
|
decryptable_to_generation: string;
|
|
963
963
|
reader_entrypoint: string;
|
|
964
964
|
}) => Promise<{
|
|
965
|
-
receipt:
|
|
965
|
+
receipt: VaultOpenReceipt;
|
|
966
966
|
deduplicated: boolean;
|
|
967
967
|
}>;
|
|
968
|
-
}): Promise<
|
|
968
|
+
}): Promise<VaultOpenProofOutcome>;
|
|
969
969
|
/**
|
|
970
|
-
*
|
|
971
|
-
* behind `fsck`'s BYO presence check, factored out of {@link
|
|
970
|
+
* vault-byo-primary-bucket task 3.3 (design D6) — the decision function
|
|
971
|
+
* behind `fsck`'s BYO presence check, factored out of {@link Repos}'s
|
|
972
972
|
* private `#checkByoPresence` the same way {@link computeOpenProofOutcome}
|
|
973
973
|
* is factored out of `#submitFsckOpenProof`, so it is directly unit-testable
|
|
974
974
|
* with an injected (fake) `hasLocalConfig`/`verifyPresence`, independent of
|
|
@@ -988,15 +988,15 @@ export declare function computeOpenProofOutcome(input: {
|
|
|
988
988
|
* NO local credentials configured (`hasLocalConfig()` returns `false`) is
|
|
989
989
|
* reported, never thrown — a BYO vault this machine cannot reach is an
|
|
990
990
|
* honest "not checked", not a failure that should break `fsck` for a
|
|
991
|
-
* credential-less returning agent (see {@link
|
|
991
|
+
* credential-less returning agent (see {@link VaultFsckByoPresence}'s
|
|
992
992
|
* own doc comment). A confirmed absence is the opposite: it THROWS
|
|
993
|
-
* `
|
|
994
|
-
*
|
|
993
|
+
* `VAULT_BYO_OBJECT_MISSING` — the same severity class as {@link
|
|
994
|
+
* Repos.mirrorVerify}'s own `VAULT_MIRROR_NOT_CONFIGURED` throw when
|
|
995
995
|
* `--mirror` is requested against an unconfigured vault — this is exactly
|
|
996
996
|
* the honesty D6 names: "we can tell the customer what SHOULD exist and
|
|
997
997
|
* does not", stated as a real refusal rather than a silently-embedded
|
|
998
998
|
* finding. The listed entries are capped at
|
|
999
|
-
* {@link
|
|
999
|
+
* {@link VAULT_BYO_OBJECT_MISSING_LIST_CAP} (a chain-referenced object
|
|
1000
1000
|
* list can be arbitrarily large and this is an error envelope, not a
|
|
1001
1001
|
* report); `missing_count` always carries the true total regardless of how
|
|
1002
1002
|
* many are listed.
|
|
@@ -1013,8 +1013,8 @@ export declare function computeByoPresenceOutcome(input: {
|
|
|
1013
1013
|
byo_destination?: string | null;
|
|
1014
1014
|
} | null;
|
|
1015
1015
|
hasLocalConfig: () => boolean;
|
|
1016
|
-
verifyPresence: () => Promise<
|
|
1017
|
-
}): Promise<
|
|
1016
|
+
verifyPresence: () => Promise<VaultByoPresenceReport>;
|
|
1017
|
+
}): Promise<VaultFsckByoPresence | undefined>;
|
|
1018
1018
|
/**
|
|
1019
1019
|
* `repos access`'s result — a READ over whatever the live gateway surface
|
|
1020
1020
|
* exposes today. The gateway's `envelope-recipients` read reports
|
|
@@ -1029,13 +1029,13 @@ export declare function computeByoPresenceOutcome(input: {
|
|
|
1029
1029
|
*
|
|
1030
1030
|
* ONE gap remains genuine and gateway-independent: `history_scope` (which
|
|
1031
1031
|
* epochs each recipient can read) has no substrate to report, because
|
|
1032
|
-
*
|
|
1032
|
+
* vault protocol v0 pins a single fixed epoch for a vault's entire
|
|
1033
1033
|
* lifetime — there is no per-epoch scope to have. `stale_access` below is
|
|
1034
1034
|
* the closest observable proxy for the same underlying limitation: a
|
|
1035
1035
|
* `pending_removal` recipient whose fingerprint is STILL covered still
|
|
1036
1036
|
* decrypts every commit (past AND future) under that one epoch, because
|
|
1037
1037
|
* epoch rotation — the mechanism that would actually revoke them — is
|
|
1038
|
-
* mid-fold in `
|
|
1038
|
+
* mid-fold in `vault-human-envelopes` under adversarial protocol review.
|
|
1039
1039
|
*
|
|
1040
1040
|
* `access` reports what the read surface HAS: the org's directory of
|
|
1041
1041
|
* encryption-key-holding members, which of the vault's current
|
|
@@ -1044,7 +1044,7 @@ export declare function computeByoPresenceOutcome(input: {
|
|
|
1044
1044
|
* (Node-only, best-effort) this machine's own local TOFU pin for each
|
|
1045
1045
|
* principal, when it has ever wrapped one.
|
|
1046
1046
|
*/
|
|
1047
|
-
export interface
|
|
1047
|
+
export interface VaultAccessRecipient {
|
|
1048
1048
|
principal_id: string;
|
|
1049
1049
|
display_name: string | null;
|
|
1050
1050
|
/** This recipient's fingerprint per the org directory. */
|
|
@@ -1068,20 +1068,20 @@ export interface GitvaultAccessRecipient {
|
|
|
1068
1068
|
matches_directory: boolean;
|
|
1069
1069
|
} | null;
|
|
1070
1070
|
}
|
|
1071
|
-
/** A principal whose membership was removed (desired state `pending_removal`) but who STILL holds a covering `key_envelope` on this vault — real, continuing access that removal did not revoke, because
|
|
1072
|
-
export interface
|
|
1071
|
+
/** A principal whose membership was removed (desired state `pending_removal`) but who STILL holds a covering `key_envelope` on this vault — real, continuing access that removal did not revoke, because vault v0 has no epoch-rotation mechanism yet. See {@link VaultAccessResult}'s doc comment. */
|
|
1072
|
+
export interface VaultStaleAccessEntry {
|
|
1073
1073
|
principal_id: string;
|
|
1074
1074
|
display_name: string | null;
|
|
1075
1075
|
fingerprint: string;
|
|
1076
1076
|
}
|
|
1077
|
-
export interface
|
|
1077
|
+
export interface VaultAccessResult {
|
|
1078
1078
|
repo_id: string;
|
|
1079
1079
|
org_id: string | null;
|
|
1080
|
-
/**
|
|
1081
|
-
reconcile_recipients?:
|
|
1082
|
-
/**
|
|
1083
|
-
enrollment?:
|
|
1084
|
-
recipients:
|
|
1080
|
+
/** vault-agent-envelopes D5: this KEY-HOLDER's session-start fulfilment outcome (`null` when this machine holds no K_repo for the vault, or `reconcile: "forbidden"`). */
|
|
1081
|
+
reconcile_recipients?: VaultSessionReconcileResult | null;
|
|
1082
|
+
/** vault-agent-envelopes D3: the enroll-if-absent step's outcome (`null` when it did not run). */
|
|
1083
|
+
enrollment?: VaultEnrollmentOutcome | null;
|
|
1084
|
+
recipients: VaultAccessRecipient[];
|
|
1085
1085
|
/** Vault-covering fingerprints (from the server) that match neither a directory entry nor a desired-state row — genuinely orphaned, revoked outside this org's membership model, or external. Excludes fingerprints already explained by `stale_access` AND by `this_keystore`. */
|
|
1086
1086
|
unmatched_covered_fingerprints: string[];
|
|
1087
1087
|
/**
|
|
@@ -1095,9 +1095,9 @@ export interface GitvaultAccessResult {
|
|
|
1095
1095
|
*/
|
|
1096
1096
|
this_keystore: {
|
|
1097
1097
|
fingerprint: string;
|
|
1098
|
-
/** `true` iff the directory holds this keystore's key as ACTIVE (
|
|
1098
|
+
/** `true` iff the directory holds this keystore's key as ACTIVE (vault-agent-envelopes: agents enroll too). */
|
|
1099
1099
|
enrolled: boolean;
|
|
1100
|
-
/** `absent` = no published key (the next
|
|
1100
|
+
/** `absent` = no published key (the next vault operation enrolls); `pending` = published, possession unproven; `rotation_required` = the principal's published key is a DIFFERENT key; `unknown` = whoami unavailable. */
|
|
1101
1101
|
publish_state: "active" | "pending" | "absent" | "rotation_required" | "unknown";
|
|
1102
1102
|
covered_on_this_vault: boolean;
|
|
1103
1103
|
/** @deprecated alias of `covered_on_this_vault`. */
|
|
@@ -1107,8 +1107,8 @@ export interface GitvaultAccessResult {
|
|
|
1107
1107
|
why: string;
|
|
1108
1108
|
}>;
|
|
1109
1109
|
} | null;
|
|
1110
|
-
/** Removed members who still decrypt this vault — see {@link
|
|
1111
|
-
stale_access:
|
|
1110
|
+
/** Removed members who still decrypt this vault — see {@link VaultStaleAccessEntry}. Always `[]` when `envelope_state_available` is `false` (no desired-state substrate to compute it from). */
|
|
1111
|
+
stale_access: VaultStaleAccessEntry[];
|
|
1112
1112
|
/** `true` when the gateway reported desired-recipient state (`desired[]`) for this read, making `recipients[].envelope_state` and `stale_access` real rather than absent. `false` only against an older gateway. */
|
|
1113
1113
|
envelope_state_available: boolean;
|
|
1114
1114
|
/** Always `false` — see this type's own doc comment for why this is a protocol-level absence, not a missing gateway feature. */
|
|
@@ -1123,7 +1123,7 @@ export interface GitvaultAccessResult {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
/**
|
|
1125
1125
|
* `repos list`'s bulk read —
|
|
1126
|
-
* `GET /
|
|
1126
|
+
* `GET /vaults/v1?org_id=<uuid>`.
|
|
1127
1127
|
* FROZEN response shape, agreed with the gateway
|
|
1128
1128
|
* team ahead of the route landing; the route may still 404 on a gateway
|
|
1129
1129
|
* that has not shipped it yet, and callers should fall back to the
|
|
@@ -1131,41 +1131,41 @@ export interface GitvaultAccessResult {
|
|
|
1131
1131
|
* `cli/lib/repos.mjs`'s `list()` for that fallback, kept only until every
|
|
1132
1132
|
* deployed gateway answers this route.
|
|
1133
1133
|
*/
|
|
1134
|
-
export interface
|
|
1134
|
+
export interface VaultOrgVaultSummary {
|
|
1135
1135
|
repo_id: string;
|
|
1136
1136
|
project_id: string;
|
|
1137
1137
|
project_name: string | null;
|
|
1138
1138
|
repo_name: string | null;
|
|
1139
1139
|
org_slug: string | null;
|
|
1140
|
-
|
|
1140
|
+
vault_policy: "required" | "grandfathered" | null;
|
|
1141
1141
|
newest_generation: string | null;
|
|
1142
1142
|
source_bytes: string;
|
|
1143
1143
|
genesis_admitted_at: string | null;
|
|
1144
1144
|
created_at: string;
|
|
1145
|
-
/**
|
|
1145
|
+
/** vault-byo-primary-bucket task 3.5 — absent-or-`"managed"` is byte-identical to today. */
|
|
1146
1146
|
storage_profile?: "managed" | "byo";
|
|
1147
1147
|
}
|
|
1148
|
-
export interface
|
|
1149
|
-
vaults:
|
|
1148
|
+
export interface VaultOrgVaultsListing {
|
|
1149
|
+
vaults: VaultOrgVaultSummary[];
|
|
1150
1150
|
/** Keyset pagination (agent-response-design): opaque, store-and-echo. */
|
|
1151
1151
|
has_more?: boolean;
|
|
1152
1152
|
next_cursor?: string | null;
|
|
1153
1153
|
}
|
|
1154
|
-
export interface
|
|
1155
|
-
handle:
|
|
1154
|
+
export interface VaultOpenOrCreateResult {
|
|
1155
|
+
handle: VaultHandle;
|
|
1156
1156
|
/** `true` when the vault already existed — nothing was allocated by this call. */
|
|
1157
1157
|
found: boolean;
|
|
1158
1158
|
created: {
|
|
1159
|
-
/** Mirrors `
|
|
1159
|
+
/** Mirrors `VaultInitResult.deduplicated`: an existing local creation journal was resumed to completion rather than started fresh — nothing was re-minted. */
|
|
1160
1160
|
deduplicated: boolean;
|
|
1161
1161
|
/** Emitted once at creation — integrity data, not a secret. Print it, copy it, keep many copies. Persisted into the keystore regardless. */
|
|
1162
|
-
recovery_receipt:
|
|
1162
|
+
recovery_receipt: VaultCreationResult["recovery_receipt"];
|
|
1163
1163
|
genesis_sha256: string;
|
|
1164
1164
|
} | null;
|
|
1165
|
-
terminal_loss_statement: typeof
|
|
1165
|
+
terminal_loss_statement: typeof VAULT_TERMINAL_LOSS_STATEMENT;
|
|
1166
1166
|
}
|
|
1167
1167
|
/**
|
|
1168
|
-
* {@link
|
|
1168
|
+
* {@link Repos.deploy}'s post-push glue: attach the best-effort
|
|
1169
1169
|
* mirror/reconcile hooks to a deploy result, gated on whether this deploy
|
|
1170
1170
|
* actually landed a new generation in the vault. Extracted as a standalone
|
|
1171
1171
|
* function (rather than inlined in `deploy()`) purely so the gating can be
|
|
@@ -1182,49 +1182,49 @@ export interface GitvaultOpenOrCreateResult {
|
|
|
1182
1182
|
* `reconcile_recipients` are OMITTED rather than a faked `skipped_*` value —
|
|
1183
1183
|
* there is nothing this deploy did that either hook could report on.
|
|
1184
1184
|
*/
|
|
1185
|
-
export declare function
|
|
1186
|
-
mirror_push?:
|
|
1187
|
-
reconcile_recipients?:
|
|
1185
|
+
export declare function attachVaultDeployHooks(result: VaultDeployResult, mirror: () => Promise<VaultMirrorPushResult>, reconcile: () => Promise<VaultReconcileEnvelopeRecipientsPushResult>): Promise<VaultDeployResult & {
|
|
1186
|
+
mirror_push?: VaultMirrorPushResult;
|
|
1187
|
+
reconcile_recipients?: VaultReconcileEnvelopeRecipientsPushResult;
|
|
1188
1188
|
}>;
|
|
1189
|
-
export declare class
|
|
1189
|
+
export declare class Repos {
|
|
1190
1190
|
#private;
|
|
1191
1191
|
constructor(client: Client);
|
|
1192
1192
|
/** The vault record — policy, allocation generation, storage + maintenance state. */
|
|
1193
|
-
get(repoId: string): Promise<
|
|
1193
|
+
get(repoId: string): Promise<VaultRecord>;
|
|
1194
1194
|
/**
|
|
1195
1195
|
* Resolve a project's vault with no local state. This is the cold-restart
|
|
1196
1196
|
* entry point: an agent that lost its machine but still holds authority on
|
|
1197
1197
|
* the project learns its `repo_id` here.
|
|
1198
1198
|
*/
|
|
1199
|
-
forProject(projectId: string): Promise<
|
|
1199
|
+
forProject(projectId: string): Promise<VaultRecord>;
|
|
1200
1200
|
/**
|
|
1201
1201
|
* Every vault the organization owns, one round trip — `repos list`'s bulk
|
|
1202
1202
|
* read. See {@link
|
|
1203
|
-
*
|
|
1203
|
+
* VaultOrgVaultsListing}'s doc comment for the FROZEN response shape and
|
|
1204
1204
|
* the 404-until-shipped fallback contract.
|
|
1205
1205
|
*/
|
|
1206
|
-
listByOrg(orgId: string): Promise<
|
|
1206
|
+
listByOrg(orgId: string): Promise<VaultOrgVaultsListing>;
|
|
1207
1207
|
/**
|
|
1208
1208
|
* Resolve a vault by its address-form `org-slug/name` —
|
|
1209
|
-
* `GET /
|
|
1209
|
+
* `GET /vaults/v1?repo=<org-slug>/<name>`.
|
|
1210
1210
|
* `RESOURCE_NOT_FOUND` for no such org OR no such name (deliberately
|
|
1211
1211
|
* collapsed — see the design's slug-namespace-probing note);
|
|
1212
|
-
* `SLUG_RELEASED` (read it with {@link
|
|
1212
|
+
* `SLUG_RELEASED` (read it with {@link vaultSlugReleasedInfo}) while the
|
|
1213
1213
|
* slug is in its post-rename cooldown — never auto-followed.
|
|
1214
1214
|
*/
|
|
1215
1215
|
forRepo(address: {
|
|
1216
1216
|
org_slug: string;
|
|
1217
1217
|
repo_name: string;
|
|
1218
|
-
}): Promise<
|
|
1218
|
+
}): Promise<VaultRecord>;
|
|
1219
1219
|
/**
|
|
1220
|
-
* Resolve a parsed remote address (`
|
|
1220
|
+
* Resolve a parsed remote address (`parseVaultRemoteUrl`'s output),
|
|
1221
1221
|
* dispatching on its form: id-form resolves exactly like
|
|
1222
1222
|
* {@link forProject}; slug-form resolves via {@link forRepo}. A pure read —
|
|
1223
1223
|
* no pinning, no creation. Node-only callers wanting BOTH should use
|
|
1224
1224
|
* {@link resolveOrCreateAddress} instead, which also drives the local pin
|
|
1225
1225
|
* and (opt-in) push-to-create.
|
|
1226
1226
|
*/
|
|
1227
|
-
resolveAddress(address:
|
|
1227
|
+
resolveAddress(address: VaultRemoteAddress): Promise<VaultRecord>;
|
|
1228
1228
|
/**
|
|
1229
1229
|
* One page of the heads listing (D186).
|
|
1230
1230
|
*
|
|
@@ -1235,7 +1235,7 @@ export declare class Gitvault {
|
|
|
1235
1235
|
* parse. A malformed or stale cursor is `INVALID_CURSOR`; recover by
|
|
1236
1236
|
* restarting from `after_generation` with no cursor.
|
|
1237
1237
|
*/
|
|
1238
|
-
heads(repoId: string, request:
|
|
1238
|
+
heads(repoId: string, request: VaultHeadsListingRequest): Promise<VaultHeadsListingPage>;
|
|
1239
1239
|
/**
|
|
1240
1240
|
* Walk the whole listing above the anchor, verifying page coupling, ordering,
|
|
1241
1241
|
* and gaplessness as it goes (a gap is `CHAIN_BROKEN`, never a silent skip).
|
|
@@ -1244,7 +1244,7 @@ export declare class Gitvault {
|
|
|
1244
1244
|
after_generation: string;
|
|
1245
1245
|
limit?: string;
|
|
1246
1246
|
}): Promise<{
|
|
1247
|
-
heads:
|
|
1247
|
+
heads: VaultHeadsListingPage["heads"];
|
|
1248
1248
|
pages: number;
|
|
1249
1249
|
total: string | null;
|
|
1250
1250
|
}>;
|
|
@@ -1254,11 +1254,11 @@ export declare class Gitvault {
|
|
|
1254
1254
|
* `required`.
|
|
1255
1255
|
*/
|
|
1256
1256
|
setPolicy(repoId: string, input: {
|
|
1257
|
-
|
|
1257
|
+
vault_policy: "required" | "grandfathered";
|
|
1258
1258
|
reason?: string;
|
|
1259
1259
|
}): Promise<{
|
|
1260
|
-
|
|
1261
|
-
|
|
1260
|
+
vault_policy: string;
|
|
1261
|
+
vault_policy_version: string;
|
|
1262
1262
|
changed: boolean;
|
|
1263
1263
|
warnings: {
|
|
1264
1264
|
kind: string;
|
|
@@ -1272,7 +1272,7 @@ export declare class Gitvault {
|
|
|
1272
1272
|
*/
|
|
1273
1273
|
completeOverride(repoId: string, input: {
|
|
1274
1274
|
operation_id: string;
|
|
1275
|
-
capture_receipt:
|
|
1275
|
+
capture_receipt: VaultCaptureReceipt;
|
|
1276
1276
|
}): Promise<{
|
|
1277
1277
|
operation_id: string;
|
|
1278
1278
|
advisory_cleared: boolean;
|
|
@@ -1287,14 +1287,14 @@ export declare class Gitvault {
|
|
|
1287
1287
|
* it in an agent-surface result store.
|
|
1288
1288
|
*/
|
|
1289
1289
|
/** `POST …/recipients/:principal_id/confirm` (D197) — first-seen pin confirmation. */
|
|
1290
|
-
confirmRecipient(repoId: string, principalId: string, newFingerprint: string): Promise<
|
|
1290
|
+
confirmRecipient(repoId: string, principalId: string, newFingerprint: string): Promise<VaultRecipientConfirmationReceipt>;
|
|
1291
1291
|
/** `POST …/recipients/:principal_id/repin` (D197) — re-pin ceremony. */
|
|
1292
1292
|
repinRecipient(repoId: string, principalId: string, input: {
|
|
1293
1293
|
old_ek_fingerprint: string;
|
|
1294
1294
|
new_fingerprint: string;
|
|
1295
|
-
}): Promise<
|
|
1295
|
+
}): Promise<VaultRecipientConfirmationReceipt>;
|
|
1296
1296
|
/**
|
|
1297
|
-
*
|
|
1297
|
+
* vault-agent-envelopes D3 — a KEY-HOLDER explicitly accepts a recipient's
|
|
1298
1298
|
* CHANGED key. The session-start reconcile refuses to wrap under a
|
|
1299
1299
|
* fingerprint that differs from this keystore's TOFU pin
|
|
1300
1300
|
* (`pinned_key_mismatch`) — that refusal is the substitution defence and
|
|
@@ -1308,7 +1308,7 @@ export declare class Gitvault {
|
|
|
1308
1308
|
* `new_fingerprint` is not what the org directory currently serves for the
|
|
1309
1309
|
* principal (a stale or mistyped fingerprint never pins).
|
|
1310
1310
|
*/
|
|
1311
|
-
acceptRecipientKeyChange(options:
|
|
1311
|
+
acceptRecipientKeyChange(options: VaultHandleOptions & {
|
|
1312
1312
|
principal_id: string;
|
|
1313
1313
|
new_fingerprint: string;
|
|
1314
1314
|
}): Promise<{
|
|
@@ -1316,7 +1316,7 @@ export declare class Gitvault {
|
|
|
1316
1316
|
principal_id: string;
|
|
1317
1317
|
old_fingerprint: string | null;
|
|
1318
1318
|
new_fingerprint: string;
|
|
1319
|
-
receipt:
|
|
1319
|
+
receipt: VaultRecipientConfirmationReceipt | null;
|
|
1320
1320
|
}>;
|
|
1321
1321
|
/**
|
|
1322
1322
|
* `POST …/recipients/:principal_id/key-revocation` (D199) — declares
|
|
@@ -1361,7 +1361,7 @@ export declare class Gitvault {
|
|
|
1361
1361
|
*
|
|
1362
1362
|
* Self-match only: the gateway requires `principalId` to equal the
|
|
1363
1363
|
* AUTHENTICATED caller, never overridable by any credential class — a
|
|
1364
|
-
* mismatch is the ordinary 403 `
|
|
1364
|
+
* mismatch is the ordinary 403 `VAULT_ACCESS_DENIED`. Idempotent on
|
|
1365
1365
|
* `(repo_id, principal_id, ek_fingerprint, decryptable_to_generation)` —
|
|
1366
1366
|
* `deduplicated: true` means the gateway returned the tuple's EXISTING
|
|
1367
1367
|
* receipt (HTTP 200) rather than minting a fresh one (HTTP 201).
|
|
@@ -1372,22 +1372,22 @@ export declare class Gitvault {
|
|
|
1372
1372
|
decryptable_to_generation: string;
|
|
1373
1373
|
reader_entrypoint: string;
|
|
1374
1374
|
}): Promise<{
|
|
1375
|
-
receipt:
|
|
1375
|
+
receipt: VaultOpenReceipt;
|
|
1376
1376
|
deduplicated: boolean;
|
|
1377
1377
|
}>;
|
|
1378
|
-
acquireMaintenanceLease(request:
|
|
1378
|
+
acquireMaintenanceLease(request: VaultMaintenanceLeaseRequest): Promise<VaultMaintenanceLease>;
|
|
1379
1379
|
/**
|
|
1380
1380
|
* Open the vault: keystore + HTTP transport + the protocol object. Every verb
|
|
1381
1381
|
* below builds on this; call it directly when you need the raw protocol
|
|
1382
1382
|
* surface (ref transactions, repair, checkpoint building).
|
|
1383
1383
|
*/
|
|
1384
|
-
open(options?:
|
|
1384
|
+
open(options?: VaultHandleOptions): Promise<VaultHandle>;
|
|
1385
1385
|
/**
|
|
1386
1386
|
* Open a vault, allocating it first when it does not exist yet (D2 — lazy
|
|
1387
1387
|
* allocation on first push).
|
|
1388
1388
|
*
|
|
1389
1389
|
* This is the ONE primitive the remote helper and the capture lane
|
|
1390
|
-
* (`run402
|
|
1390
|
+
* (`run402 repos capture`/`snapshot`) drive so that a push against an
|
|
1391
1391
|
* unallocated project runs the six-stage creation journal inline instead of
|
|
1392
1392
|
* refusing: it resolves `repo_id` from `project_id` exactly like
|
|
1393
1393
|
* {@link open}, and when that resolution fails, tries to create the vault —
|
|
@@ -1405,38 +1405,38 @@ export declare class Gitvault {
|
|
|
1405
1405
|
* one vault exists either way. An explicit `client_creation_id` (tests, or
|
|
1406
1406
|
* a caller resuming a specific attempt by hand) always wins over that search.
|
|
1407
1407
|
*/
|
|
1408
|
-
openOrCreate(options:
|
|
1408
|
+
openOrCreate(options: VaultHandleOptions & {
|
|
1409
1409
|
org_id?: string;
|
|
1410
1410
|
client_creation_id?: string;
|
|
1411
|
-
}): Promise<
|
|
1411
|
+
}): Promise<VaultOpenOrCreateResult>;
|
|
1412
1412
|
/**
|
|
1413
1413
|
* Resolve a parsed remote address to an OPEN handle, pinning `repo_id` in
|
|
1414
1414
|
* local git state on the first successful resolution of EITHER form
|
|
1415
|
-
* (
|
|
1415
|
+
* (vault-client-round-trips design D4 widens the original slug-form-only
|
|
1416
1416
|
* pin to id-form too — an id-form address needs no pin to survive a
|
|
1417
1417
|
* rename, but the resolution round trip it skips is the same either way),
|
|
1418
1418
|
* and — when `allow_create` is set and resolution misses — push-to-create
|
|
1419
|
-
* it. This is what the remote helper and `
|
|
1419
|
+
* it. This is what the remote helper and `vault snapshot` drive for a
|
|
1420
1420
|
* `run402::<org>/<name>` remote, whichever form it names, so a caller need
|
|
1421
1421
|
* not branch on the address's form itself. A pinned id/address that no
|
|
1422
1422
|
* longer resolves (404) clears the pin and re-resolves once.
|
|
1423
1423
|
*
|
|
1424
1424
|
* `SLUG_RELEASED` is NEVER auto-followed — it rethrows unchanged; read it
|
|
1425
|
-
* with {@link
|
|
1425
|
+
* with {@link vaultSlugReleasedInfo} for the successor slug and cooldown.
|
|
1426
1426
|
*/
|
|
1427
|
-
resolveOrCreateAddress(options:
|
|
1428
|
-
address:
|
|
1427
|
+
resolveOrCreateAddress(options: VaultHandleOptions & {
|
|
1428
|
+
address: VaultRemoteAddress;
|
|
1429
1429
|
/** Push-to-create on a slug-form miss (D6). `false` (default): a miss is an ordinary not-found refusal — the read path (`list`/`fetch`, `status`). */
|
|
1430
1430
|
allow_create?: boolean;
|
|
1431
1431
|
client_creation_id?: string;
|
|
1432
1432
|
/** Fires once, only when THIS call allocated the vault. Awaited before the handle is returned. */
|
|
1433
|
-
onVaultCreated?: (created: NonNullable<import("../node/
|
|
1434
|
-
}): Promise<
|
|
1435
|
-
resolution: import("../node/
|
|
1433
|
+
onVaultCreated?: (created: NonNullable<import("../node/vault-address.js").VaultAddressResolution["created"]>) => void | Promise<void>;
|
|
1434
|
+
}): Promise<VaultOpenOrCreateResult & {
|
|
1435
|
+
resolution: import("../node/vault-address.js").VaultAddressResolution;
|
|
1436
1436
|
}>;
|
|
1437
1437
|
/**
|
|
1438
1438
|
* Stale-pin recovery for OFFLINE address resolutions
|
|
1439
|
-
* (
|
|
1439
|
+
* (vault-force-spelling-and-pin-fold): an id-carrying pin resolves with
|
|
1440
1440
|
* zero network reads, so a pin gone stale (its vault deleted and the
|
|
1441
1441
|
* project re-allocated a new one) surfaces as the VERB's first repo-scoped
|
|
1442
1442
|
* read failing rather than as a resolution failure. Call this with that
|
|
@@ -1447,13 +1447,13 @@ export declare class Gitvault {
|
|
|
1447
1447
|
* original refusal is real; it is restored, and recovery never widens what
|
|
1448
1448
|
* an unauthorized caller learns).
|
|
1449
1449
|
*/
|
|
1450
|
-
recoverStalePin(options:
|
|
1451
|
-
address:
|
|
1450
|
+
recoverStalePin(options: VaultHandleOptions & {
|
|
1451
|
+
address: VaultRemoteAddress;
|
|
1452
1452
|
repo_dir: string;
|
|
1453
|
-
resolution: import("../node/
|
|
1453
|
+
resolution: import("../node/vault-address.js").VaultAddressResolution;
|
|
1454
1454
|
error: unknown;
|
|
1455
|
-
}): Promise<(
|
|
1456
|
-
resolution: import("../node/
|
|
1455
|
+
}): Promise<(VaultOpenOrCreateResult & {
|
|
1456
|
+
resolution: import("../node/vault-address.js").VaultAddressResolution;
|
|
1457
1457
|
}) | null>;
|
|
1458
1458
|
/**
|
|
1459
1459
|
* Create the vault for a project and scaffold the git remote.
|
|
@@ -1478,7 +1478,7 @@ export declare class Gitvault {
|
|
|
1478
1478
|
scaffold_git?: boolean;
|
|
1479
1479
|
/**
|
|
1480
1480
|
* Scaffold `repo_dir` as its OWN repository even when it lies inside
|
|
1481
|
-
* another one (see {@link
|
|
1481
|
+
* another one (see {@link Repos.scaffoldRemote}'s `nested`). Default
|
|
1482
1482
|
* `false`: an app root inside another repository is reported `skipped`.
|
|
1483
1483
|
*/
|
|
1484
1484
|
nested?: boolean;
|
|
@@ -1486,22 +1486,22 @@ export declare class Gitvault {
|
|
|
1486
1486
|
remote_url?: string;
|
|
1487
1487
|
service_public_key?: Uint8Array | string;
|
|
1488
1488
|
/**
|
|
1489
|
-
*
|
|
1489
|
+
* vault-byo-primary-bucket task 3.1/3.2/3.5 — request a BYO vault.
|
|
1490
1490
|
* Same raw-string shape `mirrorSet` already takes (`destination_url` +
|
|
1491
1491
|
* `credential` + `region`/`endpoint`), so a CLI edge stays a thin
|
|
1492
1492
|
* adapter — no destination parsing lives outside the SDK. Omitted (the
|
|
1493
1493
|
* default) is byte-identical to today. This method RUNS the
|
|
1494
1494
|
* allocation-time bucket probe (D6) itself, BEFORE any allocation
|
|
1495
|
-
* request — a failed probe throws `
|
|
1495
|
+
* request — a failed probe throws `VAULT_BYO_BUCKET_PROBE_FAILED`
|
|
1496
1496
|
* and nothing is created.
|
|
1497
1497
|
*/
|
|
1498
1498
|
byo?: {
|
|
1499
1499
|
destination_url: string;
|
|
1500
|
-
credential?: import("../node/
|
|
1500
|
+
credential?: import("../node/vault-mirror-config.js").VaultMirrorCredential;
|
|
1501
1501
|
region?: string;
|
|
1502
1502
|
endpoint?: string;
|
|
1503
1503
|
};
|
|
1504
|
-
}): Promise<
|
|
1504
|
+
}): Promise<VaultInitResult>;
|
|
1505
1505
|
/**
|
|
1506
1506
|
* Add the run402 git remote, initialising the repository if absent.
|
|
1507
1507
|
*
|
|
@@ -1543,7 +1543,7 @@ export declare class Gitvault {
|
|
|
1543
1543
|
remote_name?: string;
|
|
1544
1544
|
remote_url?: string;
|
|
1545
1545
|
nested?: boolean;
|
|
1546
|
-
}): Promise<
|
|
1546
|
+
}): Promise<VaultScaffoldRemoteResult>;
|
|
1547
1547
|
/**
|
|
1548
1548
|
* What this machine and the control plane each believe about the vault.
|
|
1549
1549
|
*
|
|
@@ -1551,7 +1551,7 @@ export declare class Gitvault {
|
|
|
1551
1551
|
* deployed raises no deploy-related warning, and the terminal-loss statement
|
|
1552
1552
|
* is stated verbatim exactly as for any other vault.
|
|
1553
1553
|
*/
|
|
1554
|
-
status(options?:
|
|
1554
|
+
status(options?: VaultHandleOptions & {
|
|
1555
1555
|
/**
|
|
1556
1556
|
* Also report the vault's ref map and HEAD target.
|
|
1557
1557
|
*
|
|
@@ -1561,7 +1561,7 @@ export declare class Gitvault {
|
|
|
1561
1561
|
* observation, which is what makes it safe to run anywhere.
|
|
1562
1562
|
*/
|
|
1563
1563
|
refs?: boolean;
|
|
1564
|
-
}): Promise<
|
|
1564
|
+
}): Promise<VaultStatus>;
|
|
1565
1565
|
/**
|
|
1566
1566
|
* Capture the working tree and publish it — the push half of a deploy, run on
|
|
1567
1567
|
* its own. Never gated on a deploy: a vault-only project pushes for months
|
|
@@ -1575,7 +1575,7 @@ export declare class Gitvault {
|
|
|
1575
1575
|
* charges with reproducing them ("the helper SHALL reproduce the exact set of
|
|
1576
1576
|
* objects reachable from the declared canonical refs (`refs/heads/*`,
|
|
1577
1577
|
* `refs/tags/*`, protocol-owned `refs/run402/*`), plus the `HEAD` target" —
|
|
1578
|
-
*
|
|
1578
|
+
* vault-client-surface, "Faithful helper"; `run402 repos capture` is
|
|
1579
1579
|
* separately defined as "capture and push outside a deploy" under "Source
|
|
1580
1580
|
* verbs"). The split is forced by §6.6: a dirty tree captures as a SYNTHETIC
|
|
1581
1581
|
* commit that sits on no branch, so moving `refs/heads/main` onto it would
|
|
@@ -1591,27 +1591,27 @@ export declare class Gitvault {
|
|
|
1591
1591
|
* against its expected manifest and reads the admitted head back from
|
|
1592
1592
|
* storage. A 200 alone is never enough (§0 client obligations).
|
|
1593
1593
|
*/
|
|
1594
|
-
|
|
1594
|
+
capture(options: VaultHandleOptions & {
|
|
1595
1595
|
/**
|
|
1596
1596
|
* The owning org. Supply it to run D2's lazy allocation: when this
|
|
1597
|
-
* project's vault does not exist yet,
|
|
1597
|
+
* project's vault does not exist yet, capture() runs the six-stage
|
|
1598
1598
|
* creation journal inline (via {@link openOrCreate}) before capturing
|
|
1599
|
-
* and publishing — one command, no prior `
|
|
1600
|
-
*
|
|
1599
|
+
* and publishing — one command, no prior `vault init`. Without it,
|
|
1600
|
+
* capture() behaves exactly as it always did: a push against an
|
|
1601
1601
|
* unallocated vault throws the resolution failure unchanged.
|
|
1602
1602
|
*/
|
|
1603
1603
|
org_id?: string;
|
|
1604
1604
|
/**
|
|
1605
|
-
* A parsed remote address (`
|
|
1605
|
+
* A parsed remote address (`parseVaultRemoteUrl`'s output).
|
|
1606
1606
|
* When given, this push resolves
|
|
1607
1607
|
* (and, for a slug-form address, pins) through
|
|
1608
1608
|
* {@link resolveOrCreateAddress} INSTEAD of `openOrCreate`'s
|
|
1609
1609
|
* project_id-based path; `org_id`/`project_id`/`repo_id` are ignored.
|
|
1610
1610
|
* Mirrors `git push`'s own push-to-create dispatch in the remote
|
|
1611
|
-
* helper, for callers (`
|
|
1611
|
+
* helper, for callers (`vault snapshot`) that resolve the target
|
|
1612
1612
|
* from the local git remote instead of `--project`.
|
|
1613
1613
|
*/
|
|
1614
|
-
address?:
|
|
1614
|
+
address?: VaultRemoteAddress;
|
|
1615
1615
|
/** Resume a specific creation attempt (or pin it in tests); auto-discovered from the local keystore otherwise. */
|
|
1616
1616
|
client_creation_id?: string;
|
|
1617
1617
|
/**
|
|
@@ -1621,7 +1621,7 @@ export declare class Gitvault {
|
|
|
1621
1621
|
* resolving the keystore path to print) completes and stays ordered
|
|
1622
1622
|
* BEFORE the rest of this push's own output.
|
|
1623
1623
|
*/
|
|
1624
|
-
onVaultCreated?: (created: NonNullable<
|
|
1624
|
+
onVaultCreated?: (created: NonNullable<VaultOpenOrCreateResult["created"]>) => void | Promise<void>;
|
|
1625
1625
|
/**
|
|
1626
1626
|
* Capture options, forwarded verbatim to `captureSnapshot`. The commit
|
|
1627
1627
|
* message for the synthetic commit a dirty tree produces lives HERE
|
|
@@ -1629,22 +1629,22 @@ export declare class Gitvault {
|
|
|
1629
1629
|
* `message` field, because a `snapshot` passthrough plus a sibling
|
|
1630
1630
|
* shortcut is two ways to say one thing with no defined precedence.
|
|
1631
1631
|
*/
|
|
1632
|
-
snapshot?: Omit<import("../node/
|
|
1632
|
+
snapshot?: Omit<import("../node/vault-snapshot.js").VaultSnapshotOptions, "dir">;
|
|
1633
1633
|
onCommitLine?: (line: string) => void;
|
|
1634
1634
|
checkpoint?: boolean;
|
|
1635
|
-
}): Promise<
|
|
1636
|
-
snapshot:
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
mirror_push:
|
|
1640
|
-
byo_chain_copy:
|
|
1641
|
-
reconcile_recipients:
|
|
1642
|
-
writer_reconcile:
|
|
1635
|
+
}): Promise<VaultPublishResult & {
|
|
1636
|
+
snapshot: VaultSnapshot;
|
|
1637
|
+
vault_commit: string;
|
|
1638
|
+
vault_commit_line: string;
|
|
1639
|
+
mirror_push: VaultMirrorPushResult;
|
|
1640
|
+
byo_chain_copy: VaultMirrorPushResult;
|
|
1641
|
+
reconcile_recipients: VaultReconcileEnvelopeRecipientsPushResult;
|
|
1642
|
+
writer_reconcile: VaultReconcileWriterAdmissionsPushResult;
|
|
1643
1643
|
}>;
|
|
1644
1644
|
/**
|
|
1645
1645
|
* Mint a Handoff Key: capture a stash-shaped checkpoint (design D1),
|
|
1646
|
-
* push it (retained, on no branch — {@link
|
|
1647
|
-
* it exactly like an ordinary `
|
|
1646
|
+
* push it (retained, on no branch — {@link VAULT_DEPLOY_REF} carries
|
|
1647
|
+
* it exactly like an ordinary `capture()`, never `refs/heads/*`), seal the
|
|
1648
1648
|
* vault's current epoch key under a fresh `wrap_key`, and mint through
|
|
1649
1649
|
* the gateway. The assembled `kgh1_…` key is returned exactly ONCE —
|
|
1650
1650
|
* nothing here or downstream persists it.
|
|
@@ -1653,24 +1653,24 @@ export declare class Gitvault {
|
|
|
1653
1653
|
* capture figures and runs the client-side secret scan BEFORE the
|
|
1654
1654
|
* handoff commit is written (design D10: no override flag).
|
|
1655
1655
|
*/
|
|
1656
|
-
handoff(options:
|
|
1657
|
-
address?:
|
|
1656
|
+
handoff(options: VaultHandleOptions & {
|
|
1657
|
+
address?: VaultRemoteAddress;
|
|
1658
1658
|
role?: string;
|
|
1659
1659
|
ttlSeconds?: number;
|
|
1660
|
-
note: Omit<import("../node/
|
|
1660
|
+
note: Omit<import("../node/vault-handoff.js").KygitHandoffNote, "capture">;
|
|
1661
1661
|
includeSensitive?: string[];
|
|
1662
1662
|
onCommitLine?: (line: string) => void;
|
|
1663
|
-
}): Promise<
|
|
1663
|
+
}): Promise<VaultHandoffMintResult>;
|
|
1664
1664
|
/** List a vault's handoffs (ids, kind, state, role, expiry, redeemed_by — never the hash or envelope). */
|
|
1665
|
-
listHandoffs(options:
|
|
1665
|
+
listHandoffs(options: VaultHandleOptions): Promise<VaultHandoffListResult>;
|
|
1666
1666
|
/** Revoke a handoff (idempotent — a second revoke of an already-revoked/redeemed/expired row still answers `200`). */
|
|
1667
|
-
revokeHandoff(handoffId: string, options:
|
|
1667
|
+
revokeHandoff(handoffId: string, options: VaultHandleOptions): Promise<{
|
|
1668
1668
|
handoff_id: string;
|
|
1669
1669
|
state: string;
|
|
1670
1670
|
}>;
|
|
1671
1671
|
/**
|
|
1672
1672
|
* Mint an Invite Key: capture a stash-shaped checkpoint exactly as
|
|
1673
|
-
* {@link
|
|
1673
|
+
* {@link Repos.handoff} does (design D1), push it (retained, on no
|
|
1674
1674
|
* branch), register the INVITER's own presence in the invite's room
|
|
1675
1675
|
* (design D4 — before the mint, so the row can carry
|
|
1676
1676
|
* `inviter_presence_id`; a registration failure is reported and the mint
|
|
@@ -1688,13 +1688,13 @@ export declare class Gitvault {
|
|
|
1688
1688
|
* capture figures and runs the client-side secret scan BEFORE the invite
|
|
1689
1689
|
* commit is written (design D10/kygit-invite D3: no override flag).
|
|
1690
1690
|
*/
|
|
1691
|
-
invite(options:
|
|
1692
|
-
address?:
|
|
1691
|
+
invite(options: VaultHandleOptions & {
|
|
1692
|
+
address?: VaultRemoteAddress;
|
|
1693
1693
|
role?: string;
|
|
1694
1694
|
ttlSeconds?: number;
|
|
1695
1695
|
/** Named org room to invite into. Omitted: the project's default room (its own id). */
|
|
1696
1696
|
roomKey?: string;
|
|
1697
|
-
note: Omit<import("../node/
|
|
1697
|
+
note: Omit<import("../node/vault-handoff.js").KygitInviteNote, "capture">;
|
|
1698
1698
|
includeSensitive?: string[];
|
|
1699
1699
|
onCommitLine?: (line: string) => void;
|
|
1700
1700
|
/** Harness-derived presence labels (design D8) — never guessed by the SDK itself. */
|
|
@@ -1704,11 +1704,11 @@ export declare class Gitvault {
|
|
|
1704
1704
|
sessionKey?: string;
|
|
1705
1705
|
/** Display-only "what I'm working on" for the inviter's presence. */
|
|
1706
1706
|
task?: string;
|
|
1707
|
-
}): Promise<
|
|
1707
|
+
}): Promise<VaultInviteMintResult>;
|
|
1708
1708
|
/** List a vault's invites (ids, kind, state, role, room, expiry, redeemed_by — never the hash or envelope). */
|
|
1709
|
-
listInvites(options:
|
|
1709
|
+
listInvites(options: VaultHandleOptions): Promise<VaultInviteListResult>;
|
|
1710
1710
|
/** Revoke an invite (idempotent — a second revoke of an already-revoked/redeemed/expired row still answers `200`). */
|
|
1711
|
-
revokeInvite(inviteId: string, options:
|
|
1711
|
+
revokeInvite(inviteId: string, options: VaultHandleOptions): Promise<{
|
|
1712
1712
|
invite_id: string;
|
|
1713
1713
|
state: string;
|
|
1714
1714
|
}>;
|
|
@@ -1723,7 +1723,7 @@ export declare class Gitvault {
|
|
|
1723
1723
|
* envelope supersedes the bearer one.
|
|
1724
1724
|
*/
|
|
1725
1725
|
/**
|
|
1726
|
-
*
|
|
1726
|
+
* vault-multi-writer rev 47 (task 5.6, design D4/D5) — order: parse →
|
|
1727
1727
|
* ensure wallet → ensure identity → derive auth/wrap/admission → build
|
|
1728
1728
|
* acceptance → redeem → verify grant → open envelope → check the grant
|
|
1729
1729
|
* hash → persist repo file with `pending_writer_admission` → clone →
|
|
@@ -1750,11 +1750,11 @@ export declare class Gitvault {
|
|
|
1750
1750
|
to?: string;
|
|
1751
1751
|
keystore_root?: string;
|
|
1752
1752
|
onLine?: (line: string) => void;
|
|
1753
|
-
}): Promise<
|
|
1753
|
+
}): Promise<VaultHandoffResumeResult>;
|
|
1754
1754
|
/**
|
|
1755
1755
|
* Join an Invite Key: parse (refusing a `kgh1_` handoff key by name,
|
|
1756
1756
|
* pointing at `resume` — design D9) → ensure this machine has a wallet
|
|
1757
|
-
* (design D5, mirroring {@link
|
|
1757
|
+
* (design D5, mirroring {@link Repos.resume}'s own bare-wallet
|
|
1758
1758
|
* backstop; the CALLER folds the fuller cold-start chain — wallet,
|
|
1759
1759
|
* faucet, one x402 prototype payment — before invoking this, never
|
|
1760
1760
|
* blocking the redemption itself) → redeem → open the sealed envelope → write
|
|
@@ -1781,13 +1781,13 @@ export declare class Gitvault {
|
|
|
1781
1781
|
task?: string;
|
|
1782
1782
|
/** How many recent messages to read for the arrival view. Default 10. */
|
|
1783
1783
|
recentMessagesLimit?: number;
|
|
1784
|
-
}): Promise<
|
|
1784
|
+
}): Promise<VaultInviteJoinResult>;
|
|
1785
1785
|
/**
|
|
1786
1786
|
* The capture-time copies a plain `git push` through the remote helper
|
|
1787
|
-
* owes exactly as {@link
|
|
1787
|
+
* owes exactly as {@link capture} and {@link deploy} do: the opt-in mirror
|
|
1788
1788
|
* dual-push and, on a BYO vault, the signed-chain copy into the customer
|
|
1789
|
-
* bucket (
|
|
1790
|
-
* through `
|
|
1789
|
+
* bucket (vault-byo-primary-bucket task 3.3). The helper publishes
|
|
1790
|
+
* through `Vault.push` directly, so it calls this right after a
|
|
1791
1791
|
* generation lands. Same contract as the private hooks it composes:
|
|
1792
1792
|
* best-effort, NEVER throws, never alters the push already committed —
|
|
1793
1793
|
* each outcome is reported on its own field (`skipped_no_mirror` costs no
|
|
@@ -1795,20 +1795,20 @@ export declare class Gitvault {
|
|
|
1795
1795
|
*/
|
|
1796
1796
|
postPublishCopies(input: {
|
|
1797
1797
|
repo_id: string;
|
|
1798
|
-
keystore:
|
|
1798
|
+
keystore: VaultKeystore;
|
|
1799
1799
|
}): Promise<{
|
|
1800
|
-
mirror_push:
|
|
1801
|
-
byo_chain_copy:
|
|
1800
|
+
mirror_push: VaultMirrorPushResult;
|
|
1801
|
+
byo_chain_copy: VaultMirrorPushResult;
|
|
1802
1802
|
}>;
|
|
1803
1803
|
/**
|
|
1804
|
-
* A REAL preview of what {@link
|
|
1805
|
-
* — never publishes anything, and never allocates. `run402
|
|
1806
|
-
*
|
|
1804
|
+
* A REAL preview of what {@link capture} would publish
|
|
1805
|
+
* — never publishes anything, and never allocates. `run402 repos
|
|
1806
|
+
* capture --dry-run` and `git-remote-run402`'s `option dry-run true` are
|
|
1807
1807
|
* both thin adapters over this method.
|
|
1808
1808
|
*
|
|
1809
1809
|
* "Refusing beats fake success" (this file's own architectural law) governs
|
|
1810
1810
|
* the shape of what happens when the vault does not exist yet: unlike
|
|
1811
|
-
* {@link
|
|
1811
|
+
* {@link capture}, this NEVER allocates one (push-to-create must not allocate
|
|
1812
1812
|
* on a dry run) — it resolves READ-ONLY (`open`/`resolveOrCreateAddress`
|
|
1813
1813
|
* with `allow_create: false`), and when that resolution misses, returns
|
|
1814
1814
|
* `allocation_needed: true` with every sizing field `null` rather than a
|
|
@@ -1819,21 +1819,21 @@ export declare class Gitvault {
|
|
|
1819
1819
|
*
|
|
1820
1820
|
* Everything else is the SAME real local pipeline `push` runs — capture,
|
|
1821
1821
|
* pack building, sealing/encryption — computed by
|
|
1822
|
-
* {@link import("../node/
|
|
1822
|
+
* {@link import("../node/vault-publication.js").Vault.planPush},
|
|
1823
1823
|
* which is what actually stops short of the two network mutations
|
|
1824
1824
|
* (`uploadObjects`, `admitHead`). See its doc comment for what
|
|
1825
1825
|
* `would_admit_generation` does and does not promise.
|
|
1826
1826
|
*/
|
|
1827
|
-
|
|
1828
|
-
/** Same as {@link
|
|
1829
|
-
address?:
|
|
1830
|
-
snapshot?: Omit<import("../node/
|
|
1827
|
+
planCapture(options: VaultHandleOptions & {
|
|
1828
|
+
/** Same as {@link capture}'s `address` — a parsed remote address. Resolved READ-ONLY (`allow_create: false`); never push-to-creates. */
|
|
1829
|
+
address?: VaultRemoteAddress;
|
|
1830
|
+
snapshot?: Omit<import("../node/vault-snapshot.js").VaultSnapshotOptions, "dir">;
|
|
1831
1831
|
onCommitLine?: (line: string) => void;
|
|
1832
1832
|
checkpoint?: boolean;
|
|
1833
|
-
}): Promise<
|
|
1833
|
+
}): Promise<VaultSnapshotPushPlan>;
|
|
1834
1834
|
/**
|
|
1835
1835
|
* Compaction's transient-storage preflight
|
|
1836
|
-
* (
|
|
1836
|
+
* (vault-compaction-headroom-preflight, design D1/D2).
|
|
1837
1837
|
*
|
|
1838
1838
|
* Three postures, in order of information quality:
|
|
1839
1839
|
* 1. the check answers "won't fit" → typed refusal, before any upload;
|
|
@@ -1857,19 +1857,19 @@ export declare class Gitvault {
|
|
|
1857
1857
|
* runs but the numbers are just as worth showing. `null` when the pooled
|
|
1858
1858
|
* figures cannot be read.
|
|
1859
1859
|
*/
|
|
1860
|
-
compactHeadroom(options?:
|
|
1860
|
+
compactHeadroom(options?: VaultHandleOptions): Promise<VaultCompactHeadroom | null>;
|
|
1861
1861
|
/**
|
|
1862
|
-
* Open this vault's compaction headroom grant directly (
|
|
1862
|
+
* Open this vault's compaction headroom grant directly (vault-checkpoint-cadence
|
|
1863
1863
|
* design D3) — `compact()` already does this internally; this standalone
|
|
1864
1864
|
* entry point exists for callers that need to inspect or drive the grant
|
|
1865
1865
|
* without also running a full compaction cycle (tests; a future
|
|
1866
|
-
* operator/diagnostic surface). Throws `
|
|
1866
|
+
* operator/diagnostic surface). Throws `VAULT_COMPACTION_GRANT_ACTIVE`
|
|
1867
1867
|
* (409) verbatim when another compaction already holds this project's
|
|
1868
1868
|
* grant.
|
|
1869
1869
|
*/
|
|
1870
|
-
openCompactionGrant(options?:
|
|
1870
|
+
openCompactionGrant(options?: VaultHandleOptions): Promise<VaultCompactionGrant>;
|
|
1871
1871
|
/** Close this vault's compaction headroom grant directly — idempotent; `{closed: false}` when nothing was active. */
|
|
1872
|
-
closeCompactionGrant(options?:
|
|
1872
|
+
closeCompactionGrant(options?: VaultHandleOptions): Promise<{
|
|
1873
1873
|
closed: boolean;
|
|
1874
1874
|
}>;
|
|
1875
1875
|
/**
|
|
@@ -1882,7 +1882,7 @@ export declare class Gitvault {
|
|
|
1882
1882
|
* A repository beyond the V0 checkpoint maximum is refused at preflight with
|
|
1883
1883
|
* `CHECKPOINT_SET_LIMIT_EXCEEDED`.
|
|
1884
1884
|
*/
|
|
1885
|
-
compact(options?:
|
|
1885
|
+
compact(options?: VaultHandleOptions & {
|
|
1886
1886
|
/** Skip the lease entirely (single-writer situations, tests). */
|
|
1887
1887
|
lease?: boolean;
|
|
1888
1888
|
/**
|
|
@@ -1902,7 +1902,7 @@ export declare class Gitvault {
|
|
|
1902
1902
|
* refusal. CLI: `--force-headroom`.
|
|
1903
1903
|
*/
|
|
1904
1904
|
ignoreHeadroom?: boolean;
|
|
1905
|
-
}): Promise<
|
|
1905
|
+
}): Promise<VaultCompactResult>;
|
|
1906
1906
|
/**
|
|
1907
1907
|
* Plan a prune — and, with both verifier receipts in hand, submit it.
|
|
1908
1908
|
*
|
|
@@ -1924,7 +1924,7 @@ export declare class Gitvault {
|
|
|
1924
1924
|
* completion and nothing else. `present_after_attempt` is a FAILED deletion
|
|
1925
1925
|
* and is never counted as one.
|
|
1926
1926
|
*/
|
|
1927
|
-
prune(options?:
|
|
1927
|
+
prune(options?: VaultHandleOptions & {
|
|
1928
1928
|
now?: () => Date;
|
|
1929
1929
|
/**
|
|
1930
1930
|
* `effective_admitted_at` for a root's drop generation, or `null` when
|
|
@@ -1940,15 +1940,15 @@ export declare class Gitvault {
|
|
|
1940
1940
|
* that core's `intent_core_sha256`.
|
|
1941
1941
|
*/
|
|
1942
1942
|
submit?: {
|
|
1943
|
-
core: import("../node/
|
|
1944
|
-
verifier_receipt: import("../node/
|
|
1943
|
+
core: import("../node/vault-prune.js").VaultPruneIntentCore;
|
|
1944
|
+
verifier_receipt: import("../node/vault-prune.js").VaultVerifierReceipt;
|
|
1945
1945
|
/** Poll budget for the signed completion. Absent ⇒ submit and report the intent without waiting. */
|
|
1946
1946
|
wait?: {
|
|
1947
1947
|
attempts?: number;
|
|
1948
1948
|
interval_ms?: number;
|
|
1949
1949
|
};
|
|
1950
1950
|
};
|
|
1951
|
-
}): Promise<
|
|
1951
|
+
}): Promise<VaultPruneResult>;
|
|
1952
1952
|
/**
|
|
1953
1953
|
* Verify the head chain from the authenticated pin up to the newest listed
|
|
1954
1954
|
* generation, then return the verified state.
|
|
@@ -1959,9 +1959,9 @@ export declare class Gitvault {
|
|
|
1959
1959
|
* budget is resumable — a `VERIFICATION_BUDGET_EXCEEDED` client continues
|
|
1960
1960
|
* from its verified prefix rather than restarting.
|
|
1961
1961
|
*/
|
|
1962
|
-
verify(options?:
|
|
1962
|
+
verify(options?: VaultHandleOptions & {
|
|
1963
1963
|
persist?: boolean;
|
|
1964
|
-
}): Promise<
|
|
1964
|
+
}): Promise<VaultVerifiedState>;
|
|
1965
1965
|
/**
|
|
1966
1966
|
* `repos fsck` (repo-surface-consolidation D2/D3): walk the head chain
|
|
1967
1967
|
* AND materialize the ref map, reporting
|
|
@@ -1990,52 +1990,50 @@ export declare class Gitvault {
|
|
|
1990
1990
|
* bare "verified": `chain_verified_to_generation` and
|
|
1991
1991
|
* `decryptable_to_generation` are reported separately and can genuinely
|
|
1992
1992
|
* differ — the incident-shape truth ("chain verified to 10, decryptable
|
|
1993
|
-
* to 7, `
|
|
1993
|
+
* to 7, `VAULT_EPOCH_NOT_OPENABLE` at epoch 2/rotation …") is exactly
|
|
1994
1994
|
* what this split makes representable. `refs`/`head_target`/
|
|
1995
1995
|
* `pin_after.highest_materialized` all reflect `decryptable_to_generation`.
|
|
1996
1996
|
*
|
|
1997
|
-
* **
|
|
1997
|
+
* **vault-byo-primary-bucket task 3.3 (design D6).** For a
|
|
1998
1998
|
* `storage_profile: "byo"` vault, `fsck` ALSO adjudicates the customer's
|
|
1999
1999
|
* own bucket against run402's signed chain — see {@link
|
|
2000
2000
|
* #checkByoPresence} for the full contract (automatic, never a flag;
|
|
2001
2001
|
* fails soft with no local credentials; throws
|
|
2002
|
-
* `
|
|
2002
|
+
* `VAULT_BYO_OBJECT_MISSING` on a confirmed absence). A managed vault
|
|
2003
2003
|
* is byte-identical to before this task.
|
|
2004
2004
|
*/
|
|
2005
|
-
fsck(options?:
|
|
2005
|
+
fsck(options?: VaultHandleOptions & {
|
|
2006
2006
|
write?: boolean;
|
|
2007
2007
|
mirror?: boolean;
|
|
2008
|
-
}): Promise<
|
|
2008
|
+
}): Promise<VaultFsckResult>;
|
|
2009
2009
|
/**
|
|
2010
2010
|
* Wrap this vault's current epoch key to every org member who has
|
|
2011
2011
|
* published an encryption key but has no `key_envelope` on this vault yet
|
|
2012
|
-
* —
|
|
2013
|
-
* import("../node/
|
|
2012
|
+
* — vault-human-envelopes task 4.1's ADD-path workaround. See {@link
|
|
2013
|
+
* import("../node/vault-publication.js").Vault.
|
|
2014
2014
|
* reconcileEnvelopeRecipients} for the full design (TOFU pinning, the
|
|
2015
2015
|
* gateway `public_key` gap, and why this is a workaround rather than the
|
|
2016
2016
|
* eventual epoch-rotation design).
|
|
2017
2017
|
*
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
2020
|
-
* pointing at `repos access` for inspection. This method itself stays:
|
|
2021
|
-
* `deploy()` runs it, best-effort,
|
|
2018
|
+
* No CLI verb runs this directly — `repos access` is the inspection
|
|
2019
|
+
* read. `deploy()` runs it, best-effort,
|
|
2022
2020
|
* whenever a deploy lands a new generation in the vault — design D5's
|
|
2023
2021
|
* "deploy time" hook, "the same 'one command every agent runs' argument
|
|
2024
|
-
* that decided deploy-implies-capture." `
|
|
2022
|
+
* that decided deploy-implies-capture." `capture()` (capture-and-publish
|
|
2025
2023
|
* outside a deploy) runs the identical hook after every successful
|
|
2026
2024
|
* publish, for the vault-only-project cadence. See
|
|
2027
2025
|
* `#tryReconcileEnvelopeRecipients` below for both call sites, and
|
|
2028
|
-
* {@link
|
|
2026
|
+
* {@link Repos.access} for the READ half repo-surface-consolidation
|
|
2029
2027
|
* ships in its place.
|
|
2030
2028
|
*/
|
|
2031
|
-
reconcileEnvelopeRecipients(options?:
|
|
2029
|
+
reconcileEnvelopeRecipients(options?: VaultHandleOptions): Promise<VaultReconcileEnvelopeRecipientsResult>;
|
|
2032
2030
|
/**
|
|
2033
|
-
*
|
|
2031
|
+
* vault-multi-writer (task 5.7) — admit every eligible `pending_writers[]`
|
|
2034
2032
|
* candidate (active org membership at role developer+, a published,
|
|
2035
2033
|
* possession-verified signing key, not yet in the writer set) via a fresh
|
|
2036
2034
|
* `add_writer_key{"writer"}` head per candidate. This session's OWN key
|
|
2037
2035
|
* must already be an active writer — see {@link
|
|
2038
|
-
* import("../node/
|
|
2036
|
+
* import("../node/vault-publication.js").Vault.
|
|
2039
2037
|
* reconcileWriterAdmissions}'s doc comment for why that is checked
|
|
2040
2038
|
* locally, once, rather than surfaced as N identical gateway refusals.
|
|
2041
2039
|
*
|
|
@@ -2046,7 +2044,7 @@ export declare class Gitvault {
|
|
|
2046
2044
|
* `already_covered`, never re-admitted), mirroring {@link
|
|
2047
2045
|
* reconcileEnvelopeRecipients}'s own identical redundancy-tolerant shape.
|
|
2048
2046
|
*/
|
|
2049
|
-
reconcile(options?:
|
|
2047
|
+
reconcile(options?: VaultHandleOptions): Promise<VaultReconcileWriterAdmissionsResult>;
|
|
2050
2048
|
/**
|
|
2051
2049
|
* Drive one epoch rotation (D193-D203, rev 42) — the client half of
|
|
2052
2050
|
* epoch rotation: sample a fresh `K_e`, compute the H-partition from live
|
|
@@ -2055,7 +2053,7 @@ export declare class Gitvault {
|
|
|
2055
2053
|
* `rotation_attempt_descriptor`, submit the `rotate_epoch` head, verify
|
|
2056
2054
|
* this principal's own envelope opens to the committed key (when it is
|
|
2057
2055
|
* itself a recipient), and advance the local keystore's epoch pointer.
|
|
2058
|
-
* See {@link import("../node/
|
|
2056
|
+
* See {@link import("../node/vault-publication.js").Vault.
|
|
2059
2057
|
* rotateEpoch}'s own doc comment for the full obligations and — load-
|
|
2060
2058
|
* bearing — the confirmed gap in what the gateway exposes for
|
|
2061
2059
|
* `recipient_state_version`/`recipient_revocation_version` outside the
|
|
@@ -2064,17 +2062,17 @@ export declare class Gitvault {
|
|
|
2064
2062
|
* result into THIS rotation's head instead of a separately-gated
|
|
2065
2063
|
* `publishPinManifestUpdate` call.
|
|
2066
2064
|
*/
|
|
2067
|
-
rotateEpoch(options:
|
|
2068
|
-
reason:
|
|
2065
|
+
rotateEpoch(options: VaultHandleOptions & {
|
|
2066
|
+
reason: VaultRotationReason;
|
|
2069
2067
|
recipient_state_version: string;
|
|
2070
2068
|
recipient_revocation_version: string;
|
|
2071
2069
|
client_idempotency_key?: string;
|
|
2072
2070
|
pending_confirmations?: {
|
|
2073
2071
|
principal_id: string;
|
|
2074
2072
|
ek_fingerprint: string;
|
|
2075
|
-
receipt:
|
|
2073
|
+
receipt: VaultRecipientConfirmationReceipt;
|
|
2076
2074
|
}[];
|
|
2077
|
-
}): Promise<import("../node/
|
|
2075
|
+
}): Promise<import("../node/vault-publication.js").VaultRotationResult>;
|
|
2078
2076
|
/**
|
|
2079
2077
|
* The ONE fully self-contained rotation entry point: declares
|
|
2080
2078
|
* `reason:"recipient_key_revoked"` for `principalId` (owner + step-up)
|
|
@@ -2085,18 +2083,18 @@ export declare class Gitvault {
|
|
|
2085
2083
|
*/
|
|
2086
2084
|
/**
|
|
2087
2085
|
* The writer-capable rotation that completes an org membership removal
|
|
2088
|
-
* (`reason:"member_removed"`,
|
|
2086
|
+
* (`reason:"member_removed"`, vault-multi-writer D6): counters come off
|
|
2089
2087
|
* the envelope-recipients read, no declaration, no owner step-up — any
|
|
2090
|
-
* surviving writer can run it. `
|
|
2088
|
+
* surviving writer can run it. `capture()` runs it automatically when the
|
|
2091
2089
|
* gate names an outstanding removal; this is the explicit entry point
|
|
2092
|
-
* (`run402
|
|
2090
|
+
* (`run402 orgs members rm` drives it on every vault the caller can).
|
|
2093
2091
|
*/
|
|
2094
|
-
rotateEpochForMemberRemoval(options?:
|
|
2092
|
+
rotateEpochForMemberRemoval(options?: VaultHandleOptions & {
|
|
2095
2093
|
client_idempotency_key?: string;
|
|
2096
|
-
}): Promise<import("../node/
|
|
2097
|
-
rotateEpochForKeyRevocation(principalId: string, options?:
|
|
2094
|
+
}): Promise<import("../node/vault-publication.js").VaultRotationResult>;
|
|
2095
|
+
rotateEpochForKeyRevocation(principalId: string, options?: VaultHandleOptions & {
|
|
2098
2096
|
client_idempotency_key?: string;
|
|
2099
|
-
}): Promise<import("../node/
|
|
2097
|
+
}): Promise<import("../node/vault-publication.js").VaultRotationResult>;
|
|
2100
2098
|
/**
|
|
2101
2099
|
* Publish a receipted `recipient_pin_manifest` update (D197) — the
|
|
2102
2100
|
* publication half of the `/confirm`/`/repin` ceremonies above. Call
|
|
@@ -2116,19 +2114,19 @@ export declare class Gitvault {
|
|
|
2116
2114
|
publishPinManifestUpdate(input: {
|
|
2117
2115
|
principal_id: string;
|
|
2118
2116
|
ek_fingerprint: string;
|
|
2119
|
-
receipt:
|
|
2120
|
-
} &
|
|
2117
|
+
receipt: VaultRecipientConfirmationReceipt;
|
|
2118
|
+
} & VaultHandleOptions): Promise<import("../node/vault-publication.js").VaultPublishResult>;
|
|
2121
2119
|
/**
|
|
2122
2120
|
* `repos access` (repo-surface-consolidation D5/D10) — a READ-ONLY report
|
|
2123
2121
|
* of who can open this vault, composed from whatever the live gateway
|
|
2124
2122
|
* surface exposes today. Never wraps, never mutates a `key_envelope` —
|
|
2125
2123
|
* that mutating half stays {@link reconcileEnvelopeRecipients}, reachable
|
|
2126
2124
|
* only through the deploy/push best-effort hooks until `access repair`
|
|
2127
|
-
* ships (gated on `
|
|
2128
|
-
* {@link
|
|
2125
|
+
* ships (gated on `vault-human-envelopes`' epoch-rotation work). See
|
|
2126
|
+
* {@link VaultAccessResult}'s doc comment for the honest gap this
|
|
2129
2127
|
* reports rather than invents.
|
|
2130
2128
|
*/
|
|
2131
|
-
access(options?:
|
|
2129
|
+
access(options?: VaultHandleOptions): Promise<VaultAccessResult>;
|
|
2132
2130
|
/**
|
|
2133
2131
|
* The push-gated deploy: both lanes under one fresh `capture_id`, resolving
|
|
2134
2132
|
* to exactly one of five outcomes — `DEPLOYED_AND_VAULTED`,
|
|
@@ -2142,42 +2140,42 @@ export declare class Gitvault {
|
|
|
2142
2140
|
* `run402 deploy` is design D5's PRIMARY envelope-recipient reconcile hook
|
|
2143
2141
|
* ("the same 'one command every agent runs' argument that decided
|
|
2144
2142
|
* deploy-implies-capture") and design D6's primary dual-push mirror trigger
|
|
2145
|
-
* — both fire HERE, not inside {@link
|
|
2146
|
-
* {@link
|
|
2143
|
+
* — both fire HERE, not inside {@link runVaultDeploy} itself, mirroring
|
|
2144
|
+
* {@link capture}'s exact non-blocking contract: best-effort, NEVER throw,
|
|
2147
2145
|
* NEVER alter the deploy outcome already resolved above, reported BESIDE it
|
|
2148
2146
|
* on `mirror_push` / `reconcile_recipients`. They fire only when this
|
|
2149
2147
|
* deploy actually landed a new generation in the vault
|
|
2150
2148
|
* (`DEPLOYED_AND_VAULTED` / `DEPLOY_FAILED_VAULTED` — the outcomes carrying
|
|
2151
2149
|
* a `generation`); the other three outcomes published nothing new, so
|
|
2152
2150
|
* there is nothing to mirror or reconcile against ({@link
|
|
2153
|
-
* import("../node/
|
|
2151
|
+
* import("../node/vault-mirror.js").mirrorPushForGeneration}'s own
|
|
2154
2152
|
* contract: "fires after an ordinary vault push/deploy produces a new
|
|
2155
2153
|
* generation"). Both fields are therefore OMITTED — never a faked
|
|
2156
2154
|
* `skipped_*` outcome — when no generation landed.
|
|
2157
2155
|
*/
|
|
2158
|
-
deploy(options: Omit<
|
|
2159
|
-
mirror_push?:
|
|
2160
|
-
byo_chain_copy?:
|
|
2161
|
-
reconcile_recipients?:
|
|
2162
|
-
writer_reconcile?:
|
|
2156
|
+
deploy(options: Omit<VaultDeployOptions, "vault"> & VaultHandleOptions): Promise<VaultDeployResult & {
|
|
2157
|
+
mirror_push?: VaultMirrorPushResult;
|
|
2158
|
+
byo_chain_copy?: VaultMirrorPushResult;
|
|
2159
|
+
reconcile_recipients?: VaultReconcileEnvelopeRecipientsPushResult;
|
|
2160
|
+
writer_reconcile?: VaultReconcileWriterAdmissionsPushResult;
|
|
2163
2161
|
}>;
|
|
2164
2162
|
/**
|
|
2165
2163
|
* Drain every unvaulted-override journal on this machine: push the exact
|
|
2166
2164
|
* journaled snapshot and present the capture receipt for full-field
|
|
2167
2165
|
* comparison. A partial match never clears the advisory.
|
|
2168
2166
|
*/
|
|
2169
|
-
drainOverrides(options?:
|
|
2167
|
+
drainOverrides(options?: VaultHandleOptions): Promise<import("../node/vault-deploy.js").VaultOverrideDrainReport>;
|
|
2170
2168
|
/**
|
|
2171
2169
|
* Reproduce the vault's object database into a git repository — the clone-back
|
|
2172
2170
|
* path. Needs only git and a surviving keystore: no deployment artifact, CAS
|
|
2173
2171
|
* entry, or apply operation is consulted.
|
|
2174
2172
|
*/
|
|
2175
|
-
restore(options:
|
|
2173
|
+
restore(options: VaultHandleOptions & {
|
|
2176
2174
|
target_dir: string;
|
|
2177
2175
|
}): Promise<{
|
|
2178
2176
|
refs: Record<string, string>;
|
|
2179
2177
|
generation: string;
|
|
2180
|
-
retained_refs: import("../node/
|
|
2178
|
+
retained_refs: import("../node/vault-publication.js").VaultRetainedRefsReconcileResult;
|
|
2181
2179
|
}>;
|
|
2182
2180
|
/**
|
|
2183
2181
|
* Wrap an ALREADY-RESOLVED vault read with degraded-read fallback: run
|
|
@@ -2185,7 +2183,7 @@ export declare class Gitvault {
|
|
|
2185
2183
|
* `vault.materialize()` for a `list`-shaped read, or
|
|
2186
2184
|
* `vault.restoreObjectsInto(dir)` for a `fetch`-shaped one), and on a
|
|
2187
2185
|
* network-class failure (never on an authorization refusal or any other
|
|
2188
|
-
* 4xx — see `
|
|
2186
|
+
* 4xx — see `isNetworkClassVaultReadError`), fall back to the vault's
|
|
2189
2187
|
* configured mirror via the SAME `r402s-recover` engine `recover()` uses.
|
|
2190
2188
|
*
|
|
2191
2189
|
* Deliberately takes an already-open `vault`/`keystore`/`repo_id` rather
|
|
@@ -2203,20 +2201,20 @@ export declare class Gitvault {
|
|
|
2203
2201
|
* e.g. a bare `git ls-remote` outside any checkout) disables the fallback
|
|
2204
2202
|
* entirely: the original gateway error surfaces exactly as it always did.
|
|
2205
2203
|
*/
|
|
2206
|
-
withDegradedRead<T extends
|
|
2204
|
+
withDegradedRead<T extends VaultDegradedReadLive>(options: {
|
|
2207
2205
|
attemptLive: () => Promise<T>;
|
|
2208
|
-
keystore:
|
|
2206
|
+
keystore: VaultKeystore;
|
|
2209
2207
|
repo_id: string;
|
|
2210
2208
|
out_dir: string | null;
|
|
2211
|
-
}): Promise<
|
|
2209
|
+
}): Promise<VaultDegradedReadOutcome<T>>;
|
|
2212
2210
|
/**
|
|
2213
|
-
*
|
|
2211
|
+
* vault-byo-primary-bucket (design D4): the degraded read for the OPEN
|
|
2214
2212
|
* itself. {@link withDegradedRead} wraps a handle's live read, but a plain
|
|
2215
2213
|
* `git fetch`/`clone` needs the gateway once BEFORE any read — to open the
|
|
2216
2214
|
* handle (enrollment, the vault record). When that open fails
|
|
2217
2215
|
* network-class and this checkout already knows the vault — a pinned
|
|
2218
2216
|
* `repo_id`, or the keystore's own project→repo file for an id-form
|
|
2219
|
-
* address (
|
|
2217
|
+
* address (vault-offline-clone-resolve) — the whole read is served from
|
|
2220
2218
|
* the vault's BYO destination or configured mirror, exactly as
|
|
2221
2219
|
* `withDegradedRead` would have after a failed live read. `null` when this
|
|
2222
2220
|
* cannot help (a non-network failure, no local identity for the vault, no
|
|
@@ -2226,9 +2224,9 @@ export declare class Gitvault {
|
|
|
2226
2224
|
degradedOpenFallback(input: {
|
|
2227
2225
|
repo_dir: string;
|
|
2228
2226
|
error: unknown;
|
|
2229
|
-
address?: import("../node/
|
|
2227
|
+
address?: import("../node/vault-address.js").ResolveVaultAddressOptions["address"];
|
|
2230
2228
|
repo_id?: string;
|
|
2231
|
-
}): Promise<
|
|
2229
|
+
}): Promise<VaultDegradedReadOutcome<VaultDegradedReadLive> | null>;
|
|
2232
2230
|
/**
|
|
2233
2231
|
* Configure (or replace) the customer-owned mirror destination for one
|
|
2234
2232
|
* vault. Client-side ONLY — the destination + credential NAME are written
|
|
@@ -2236,14 +2234,14 @@ export declare class Gitvault {
|
|
|
2236
2234
|
* secret value. `s3://<bucket>/<prefix>` needs `credential`; a plain
|
|
2237
2235
|
* filesystem path needs none.
|
|
2238
2236
|
*/
|
|
2239
|
-
mirrorSet(options:
|
|
2237
|
+
mirrorSet(options: VaultHandleOptions & {
|
|
2240
2238
|
destination_url: string;
|
|
2241
|
-
credential?:
|
|
2239
|
+
credential?: VaultMirrorCredential;
|
|
2242
2240
|
region?: string;
|
|
2243
2241
|
endpoint?: string;
|
|
2244
|
-
}): Promise<
|
|
2242
|
+
}): Promise<VaultMirrorConfig>;
|
|
2245
2243
|
/** Remove the mirror config for one vault. Never touches the mirror's own bytes (design: config removal ≠ data deletion). */
|
|
2246
|
-
mirrorRemove(options?:
|
|
2244
|
+
mirrorRemove(options?: VaultHandleOptions): Promise<{
|
|
2247
2245
|
repo_id: string;
|
|
2248
2246
|
removed: boolean;
|
|
2249
2247
|
}>;
|
|
@@ -2254,13 +2252,13 @@ export declare class Gitvault {
|
|
|
2254
2252
|
* read of the vault record), and — when they disagree — the closing
|
|
2255
2253
|
* command. Both honesty statements (design D8) ride every response.
|
|
2256
2254
|
*/
|
|
2257
|
-
mirrorStatus(options?:
|
|
2255
|
+
mirrorStatus(options?: VaultHandleOptions & {
|
|
2258
2256
|
is_byo?: boolean;
|
|
2259
|
-
}): Promise<
|
|
2257
|
+
}): Promise<VaultMirrorStatus>;
|
|
2260
2258
|
/** List the vault's stored objects, diff against the mirror, fetch + hash-verify + write what's missing, in admission order. Resumable and idempotent. */
|
|
2261
|
-
mirrorSync(options?:
|
|
2259
|
+
mirrorSync(options?: VaultHandleOptions): Promise<VaultMirrorSyncSummary>;
|
|
2262
2260
|
/** Keyless integrity probe against the CONFIGURED mirror: discovery + chain verification + closure/absence adjudication, never decryption (`run402 repos fsck --mirror`). */
|
|
2263
|
-
mirrorVerify(options?:
|
|
2261
|
+
mirrorVerify(options?: VaultHandleOptions): Promise<VaultVerifyReport>;
|
|
2264
2262
|
/**
|
|
2265
2263
|
* `r402s-recover` (design D4): rebuild a working git repository straight
|
|
2266
2264
|
* from a mirrored `source/<repo_id>/` prefix — NO SERVER INVOLVED. `source`
|
|
@@ -2268,7 +2266,7 @@ export declare class Gitvault {
|
|
|
2268
2266
|
* than one mirrored vault, pass `repo_id` explicitly. Recovery proves
|
|
2269
2267
|
* validity, never freshness (both honesty statements ride every result).
|
|
2270
2268
|
*
|
|
2271
|
-
*
|
|
2269
|
+
* vault-recovery-custody: a human member with no keystore recovers with
|
|
2272
2270
|
* `member_bundle` (the exported `r402s-member-recovery-bundle/v1`, or the
|
|
2273
2271
|
* mirror's own `member-recovery-bundles/` sidecar when omitted) +
|
|
2274
2272
|
* `source_recovery_code`; a raw WebAuthn PRF output is NOT a supported
|
|
@@ -2279,15 +2277,15 @@ export declare class Gitvault {
|
|
|
2279
2277
|
source: string;
|
|
2280
2278
|
out_dir: string;
|
|
2281
2279
|
repo_id?: string;
|
|
2282
|
-
credential?:
|
|
2280
|
+
credential?: VaultMirrorCredential;
|
|
2283
2281
|
region?: string;
|
|
2284
2282
|
endpoint?: string;
|
|
2285
|
-
recovery_receipt?:
|
|
2283
|
+
recovery_receipt?: VaultRecoveryReceipt;
|
|
2286
2284
|
keystore_root?: string;
|
|
2287
|
-
member_bundle?:
|
|
2285
|
+
member_bundle?: VaultMemberRecoveryBundle;
|
|
2288
2286
|
source_recovery_code?: string;
|
|
2289
2287
|
rp_id?: string;
|
|
2290
|
-
}): Promise<
|
|
2288
|
+
}): Promise<VaultRecoverResult>;
|
|
2291
2289
|
/**
|
|
2292
2290
|
* Re-apply the local immutable-object cache's eviction window (design D3,
|
|
2293
2291
|
* task 4.2) for one vault — a periodic backstop wired into `run402 repos
|
|
@@ -2296,7 +2294,7 @@ export declare class Gitvault {
|
|
|
2296
2294
|
* only `project_id` was supplied. Idempotent and safe to call on a repo
|
|
2297
2295
|
* with no cache directory at all (a no-op).
|
|
2298
2296
|
*/
|
|
2299
|
-
sweepObjectCache(options:
|
|
2297
|
+
sweepObjectCache(options: VaultHandleOptions): Promise<void>;
|
|
2300
2298
|
}
|
|
2301
2299
|
/**
|
|
2302
2300
|
* The composite escalation trigger (design D7): ANY of these crossing its
|
|
@@ -2305,19 +2303,19 @@ export declare class Gitvault {
|
|
|
2305
2303
|
* (an agent that pads one dimension to stay under a lone threshold). Shipped
|
|
2306
2304
|
* as defaults; tunable in this ONE place, not a protocol contract.
|
|
2307
2305
|
*/
|
|
2308
|
-
export declare const
|
|
2306
|
+
export declare const VAULT_LOSS_WARNING_THRESHOLDS: {
|
|
2309
2307
|
readonly generations: 10;
|
|
2310
2308
|
readonly source_bytes: number;
|
|
2311
2309
|
readonly days_since_genesis: 14;
|
|
2312
2310
|
};
|
|
2313
2311
|
/**
|
|
2314
|
-
*
|
|
2312
|
+
* vault-clone-scaling (bench P3): generations-since-checkpoint at or
|
|
2315
2313
|
* above this advises `run402 repos gc`. Same one-place-to-tune convention
|
|
2316
|
-
* as {@link
|
|
2314
|
+
* as {@link VAULT_LOSS_WARNING_THRESHOLDS}; an advisory, never a gate.
|
|
2317
2315
|
*/
|
|
2318
|
-
export declare const
|
|
2319
|
-
/** {@link
|
|
2320
|
-
export interface
|
|
2316
|
+
export declare const VAULT_CHECKPOINT_ADVISORY_GENERATIONS = 25;
|
|
2317
|
+
/** {@link vaultCheckpointStaleness}'s result. */
|
|
2318
|
+
export interface VaultCheckpointStaleness {
|
|
2321
2319
|
generations_since_checkpoint: number;
|
|
2322
2320
|
advised: boolean;
|
|
2323
2321
|
}
|
|
@@ -2330,12 +2328,12 @@ export interface GitvaultCheckpointStaleness {
|
|
|
2330
2328
|
* `checkpoint_covers_through` doc), which is deliberately indistinguishable
|
|
2331
2329
|
* from fresh here.
|
|
2332
2330
|
*/
|
|
2333
|
-
export declare function
|
|
2331
|
+
export declare function vaultCheckpointStaleness(input: {
|
|
2334
2332
|
newest_generation: string;
|
|
2335
2333
|
covers_through_generation: string | null;
|
|
2336
|
-
}):
|
|
2334
|
+
}): VaultCheckpointStaleness;
|
|
2337
2335
|
/** Which composite metric(s) crossed their D7 threshold, if any. */
|
|
2338
|
-
export interface
|
|
2336
|
+
export interface VaultLossWarningTrip {
|
|
2339
2337
|
generations: boolean;
|
|
2340
2338
|
source_bytes: boolean;
|
|
2341
2339
|
days_since_genesis: boolean;
|
|
@@ -2354,13 +2352,13 @@ export interface GitvaultLossWarningTrip {
|
|
|
2354
2352
|
* it, ever, in V0. What DOES now exist, one call site up in `status()`, is a
|
|
2355
2353
|
* way to downgrade the COPY once tripped: a locally-provable read of the
|
|
2356
2354
|
* vault's covering-recipient count (the same envelope-recipients read
|
|
2357
|
-
* `
|
|
2355
|
+
* `Repos.access` uses) can show this is no longer the single-principal
|
|
2358
2356
|
* case the message below describes. See
|
|
2359
|
-
* {@link
|
|
2357
|
+
* {@link vaultKeystoreBackupReminderMessage} for that downgraded form.
|
|
2360
2358
|
*/
|
|
2361
|
-
export declare function
|
|
2359
|
+
export declare function vaultLossWarningTrip(record: Pick<VaultRecord, "admitted_generations" | "storage" | "genesis_admitted_at">, now?: Date): VaultLossWarningTrip;
|
|
2362
2360
|
/** Any composite metric tripped — the standing warning threshold itself. */
|
|
2363
|
-
export declare function
|
|
2361
|
+
export declare function vaultLossWarningTripped(trip: VaultLossWarningTrip): boolean;
|
|
2364
2362
|
/**
|
|
2365
2363
|
* The standing warning text (design D7): names what tripped, states the
|
|
2366
2364
|
* resolution honestly (a second principal or human envelope — nothing this
|
|
@@ -2369,24 +2367,24 @@ export declare function gitvaultLossWarningTripped(trip: GitvaultLossWarningTrip
|
|
|
2369
2367
|
* This is the SINGLE-PRINCIPAL form — use it only when the vault's
|
|
2370
2368
|
* covering-recipient count is unknown or <= 1. Once a caller has locally
|
|
2371
2369
|
* proven >= 2 covering recipients, its premise ("only one principal can open
|
|
2372
|
-
* it") is false; use {@link
|
|
2370
|
+
* it") is false; use {@link vaultKeystoreBackupReminderMessage} instead.
|
|
2373
2371
|
*/
|
|
2374
|
-
export declare function
|
|
2372
|
+
export declare function vaultLossWarningMessage(trip: VaultLossWarningTrip): string;
|
|
2375
2373
|
/**
|
|
2376
2374
|
* D7's downgraded form (dogfood item 2): once `status()` has locally proven
|
|
2377
2375
|
* this vault carries >= 2 covering recipients (via the same envelope-recipients
|
|
2378
|
-
* read `
|
|
2379
|
-
* {@link
|
|
2376
|
+
* read `Repos.access` uses), the single-principal premise behind
|
|
2377
|
+
* {@link vaultLossWarningMessage} is false for THIS vault — printing it
|
|
2380
2378
|
* anyway would be a false terminal-loss claim. The composite threshold still
|
|
2381
|
-
* fires the SAME way (this function does not touch `
|
|
2382
|
-
* `
|
|
2379
|
+
* fires the SAME way (this function does not touch `vaultLossWarningTrip`/
|
|
2380
|
+
* `vaultLossWarningTripped` at all — a real value-at-risk signal is still
|
|
2383
2381
|
* worth a reminder), but the copy switches to the protocol's own
|
|
2384
2382
|
* keystore-qualified durability sentence instead of asserting single-principal
|
|
2385
2383
|
* risk, and never claims terminal loss.
|
|
2386
2384
|
*/
|
|
2387
|
-
export declare function
|
|
2385
|
+
export declare function vaultKeystoreBackupReminderMessage(trip: VaultLossWarningTrip, coveringRecipients: number): string;
|
|
2388
2386
|
/**
|
|
2389
|
-
*
|
|
2387
|
+
* vault-mirror-default — the pure `vault_unmirrored` computation, in ONE
|
|
2390
2388
|
* place so doctor and `repos view` echo the same finding instead of each
|
|
2391
2389
|
* deriving their own (the loss-warning pattern above). Present when no mirror
|
|
2392
2390
|
* is configured, OR when one is configured but has no success evidence yet —
|
|
@@ -2396,58 +2394,47 @@ export declare function gitvaultKeystoreBackupReminderMessage(trip: GitvaultLoss
|
|
|
2396
2394
|
* never blocking; every input is client-local or read from the CUSTOMER'S
|
|
2397
2395
|
* mirror — nothing here touches the gateway.
|
|
2398
2396
|
*/
|
|
2399
|
-
export declare function
|
|
2397
|
+
export declare function vaultUnmirroredFinding(state: {
|
|
2400
2398
|
configured: boolean;
|
|
2401
2399
|
last_success_at: string | null;
|
|
2402
2400
|
mirrored_generation: string | null;
|
|
2403
|
-
/**
|
|
2401
|
+
/** vault-byo-primary-bucket task 3.5 — when true, `message` uses the BYO remedy wording (a SECOND customer-held location) instead of the plain unmirrored statement. */
|
|
2404
2402
|
is_byo?: boolean;
|
|
2405
|
-
}):
|
|
2403
|
+
}): VaultUnmirroredFinding | null;
|
|
2406
2404
|
/**
|
|
2407
|
-
*
|
|
2405
|
+
* vault-byo-primary-bucket (design D4) — the ONE stderr line a degraded
|
|
2408
2406
|
* chain/payload read prints: the fallback's own destination (never a
|
|
2409
2407
|
* credential) plus the canonical, mechanism-only statement. `list`/`fetch`
|
|
2410
2408
|
* degrading in the SAME `git-remote-run402` session each print their own
|
|
2411
2409
|
* line (one per degraded READ, not one per session) — see
|
|
2412
|
-
* `
|
|
2410
|
+
* `Repos.withDegradedRead`'s own doc comment.
|
|
2413
2411
|
*/
|
|
2414
|
-
export declare function
|
|
2412
|
+
export declare function vaultDegradedReadNote(source: VaultDegradedReadSource): string;
|
|
2413
|
+
/** `run402::<org_id>/<project_id>` — what `git-remote-run402` resolves. */
|
|
2414
|
+
export declare function vaultRemoteUrl(orgId: string, projectId: string): string;
|
|
2415
2415
|
/**
|
|
2416
|
-
*
|
|
2417
|
-
* plumbing spelling — accepted forever) or `"kygit"` (what the
|
|
2418
|
-
* `@kychee/kygit` shim renders once it sets `RUN402_REMOTE_SCHEME=kygit`
|
|
2419
|
-
* before exec). The gateway never sees this — `address` and every registry
|
|
2420
|
-
* `next_actions` command stay `run402::`; only client-side RENDERING reads
|
|
2421
|
-
* it. Any other value falls back to `"run402"` rather than emitting an
|
|
2422
|
-
* unparseable scheme.
|
|
2423
|
-
*/
|
|
2424
|
-
export declare function gitvaultRemoteScheme(): "run402" | "kygit";
|
|
2425
|
-
/** `<door>::<org_id>/<project_id>` — what `git-remote-run402`/`git-remote-kygit` resolves. */
|
|
2426
|
-
export declare function gitvaultRemoteUrl(orgId: string, projectId: string): string;
|
|
2427
|
-
/**
|
|
2428
|
-
* `<door>::<org-slug>/<repo-name>` — the address-form remote builder
|
|
2416
|
+
* `run402::<org-slug>/<repo-name>` — the address-form remote builder
|
|
2429
2417
|
* (repo-first-onramp task 4, design D6). Same string shape as
|
|
2430
|
-
* {@link
|
|
2431
|
-
* — see {@link
|
|
2418
|
+
* {@link vaultRemoteUrl} (the wire slot admits both forms undiscriminated
|
|
2419
|
+
* — see {@link vaultRemoteAddressForm}); kept as its own named function so
|
|
2432
2420
|
* a call site states which form it means rather than reusing the id-form
|
|
2433
|
-
* builder for a semantically different pair of arguments.
|
|
2434
|
-
* {@link gitvaultRemoteScheme} (kygit-handoff design D8) — `run402 repos
|
|
2435
|
-
* create` renders `run402::`, `kygit create` renders `kygit::`.
|
|
2421
|
+
* builder for a semantically different pair of arguments.
|
|
2436
2422
|
*/
|
|
2437
|
-
export declare function
|
|
2438
|
-
/** What {@link
|
|
2439
|
-
export interface
|
|
2423
|
+
export declare function vaultRemoteUrlForRepo(orgSlug: string, repoName: string): string;
|
|
2424
|
+
/** What {@link parseVaultRemoteUrl} returns — the two undiscriminated address halves. */
|
|
2425
|
+
export interface VaultRemoteAddress {
|
|
2440
2426
|
org_id: string;
|
|
2441
2427
|
project_id: string;
|
|
2442
2428
|
}
|
|
2443
2429
|
/**
|
|
2444
|
-
* Parse a `run402::<org>/<project>`
|
|
2445
|
-
*
|
|
2446
|
-
*
|
|
2430
|
+
* Parse a `run402::<org>/<project>` remote URL into its two address halves.
|
|
2431
|
+
* `run402::` is the one remote scheme: `null` for anything that is not a
|
|
2432
|
+
* `<scheme>::` address at all, and a typed `REMOTE_SCHEME_UNSUPPORTED`
|
|
2433
|
+
* refusal naming the scheme for any other `<scheme>::` spelling.
|
|
2447
2434
|
*/
|
|
2448
|
-
export declare function
|
|
2435
|
+
export declare function parseVaultRemoteUrl(url: string): VaultRemoteAddress | null;
|
|
2449
2436
|
/** Which address form a parsed `run402::` remote is (repo-first-onramp task 4, design D6). */
|
|
2450
|
-
export type
|
|
2437
|
+
export type VaultRemoteAddressForm = "id" | "slug";
|
|
2451
2438
|
/**
|
|
2452
2439
|
* Discriminate a parsed address's form (design D6, "resolved"): "org UUIDs
|
|
2453
2440
|
* and `prj_` prefixes make slug-vs-id in the same slot unambiguous." Both
|
|
@@ -2457,9 +2444,9 @@ export type GitvaultRemoteAddressForm = "id" | "slug";
|
|
|
2457
2444
|
* `prj_`-prefixed; anything else (an org slug half, or a bare repo-name half)
|
|
2458
2445
|
* is slug-form. Resolution accepts either (task 4.3).
|
|
2459
2446
|
*/
|
|
2460
|
-
export declare function
|
|
2447
|
+
export declare function vaultRemoteAddressForm(address: VaultRemoteAddress): VaultRemoteAddressForm;
|
|
2461
2448
|
/** What a `SLUG_RELEASED` refusal names — the successor slug and the cooldown window (design D6). */
|
|
2462
|
-
export interface
|
|
2449
|
+
export interface VaultSlugReleasedInfo {
|
|
2463
2450
|
successor_slug: string | null;
|
|
2464
2451
|
released_at: string | null;
|
|
2465
2452
|
cooldown_until: string | null;
|
|
@@ -2470,5 +2457,5 @@ export interface GitvaultSlugReleasedInfo {
|
|
|
2470
2457
|
* (design D6: "no redirects, deliberately"). `null` when `err` is not a
|
|
2471
2458
|
* `SLUG_RELEASED` refusal.
|
|
2472
2459
|
*/
|
|
2473
|
-
export declare function
|
|
2474
|
-
//# sourceMappingURL=
|
|
2460
|
+
export declare function vaultSlugReleasedInfo(err: unknown): VaultSlugReleasedInfo | null;
|
|
2461
|
+
//# sourceMappingURL=repos.d.ts.map
|