run402 4.41.0 → 4.42.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.
Files changed (41) hide show
  1. package/README.md +2 -2
  2. package/lib/argparse.mjs +1 -1
  3. package/lib/assets.mjs +10 -14
  4. package/lib/command-manifest.mjs +24 -26
  5. package/lib/deploy-v2.mjs +7 -10
  6. package/lib/doctor.mjs +8 -1
  7. package/lib/gitvault-target.mjs +7 -9
  8. package/lib/gitvault.mjs +7 -8
  9. package/lib/notifications.mjs +4 -8
  10. package/lib/operator.mjs +1 -1
  11. package/lib/org.mjs +3 -3
  12. package/lib/repos.mjs +79 -56
  13. package/lib/rooms-context.mjs +2 -3
  14. package/lib/rooms.mjs +11 -14
  15. package/lib/update-check.mjs +6 -8
  16. package/package.json +1 -1
  17. package/sdk/dist/namespaces/admin.d.ts +1 -1
  18. package/sdk/dist/namespaces/admin.js +1 -1
  19. package/sdk/dist/namespaces/deploy.types.d.ts +2 -2
  20. package/sdk/dist/namespaces/gitvault.crypto.d.ts +10 -0
  21. package/sdk/dist/namespaces/gitvault.crypto.d.ts.map +1 -1
  22. package/sdk/dist/namespaces/gitvault.crypto.js +11 -1
  23. package/sdk/dist/namespaces/gitvault.crypto.js.map +1 -1
  24. package/sdk/dist/namespaces/gitvault.d.ts +136 -43
  25. package/sdk/dist/namespaces/gitvault.d.ts.map +1 -1
  26. package/sdk/dist/namespaces/gitvault.js +157 -47
  27. package/sdk/dist/namespaces/gitvault.js.map +1 -1
  28. package/sdk/dist/namespaces/projects.d.ts +1 -1
  29. package/sdk/dist/namespaces/projects.js +1 -1
  30. package/sdk/dist/namespaces/projects.types.d.ts +1 -1
  31. package/sdk/dist/namespaces/projects.types.d.ts.map +1 -1
  32. package/sdk/dist/node/gitvault-publication.d.ts +48 -17
  33. package/sdk/dist/node/gitvault-publication.d.ts.map +1 -1
  34. package/sdk/dist/node/gitvault-publication.js +7 -5
  35. package/sdk/dist/node/gitvault-publication.js.map +1 -1
  36. package/sdk/dist/node/gitvault-recover.d.ts +15 -1
  37. package/sdk/dist/node/gitvault-recover.d.ts.map +1 -1
  38. package/sdk/dist/node/gitvault-recover.js +8 -4
  39. package/sdk/dist/node/gitvault-recover.js.map +1 -1
  40. package/sdk/dist/scoped.d.ts +2 -2
  41. package/sdk/dist/scoped.js +1 -1
package/lib/repos.mjs CHANGED
@@ -1,27 +1,25 @@
1
1
  /**
2
- * `run402 repos` — the consolidated encrypted-repository family
3
- * (repo-surface-consolidation). One noun, twelve verbs, each one either a
4
- * `gh repo` verb, a `git` verb meaning what it means in git, or a plain-
5
- * English verb for an operation with no analog (design D2). `repo` singular
6
- * resolves identically (`cli.mjs` dispatches both spellings here).
2
+ * `run402 repos` — the consolidated encrypted-repository family. One noun,
3
+ * twelve verbs, each one either a `gh repo` verb, a `git` verb meaning what
4
+ * it means in git, or a plain-English verb for an operation with no analog.
5
+ * `repo` singular resolves identically (`cli.mjs` dispatches both spellings
6
+ * here).
7
7
  *
8
- * ARCHITECTURAL LAW (unchanged from `gitvault.mjs`, which this module
9
- * replaces as the family's CLI home): every piece of protocol behavior —
10
- * crypto core, keystore, creation journal, snapshot + capture, publication
11
- * state machines, ref transactions, verification budget, repair lives
12
- * ONCE in `@run402/sdk` under `r.gitvault` (the SDK KEEPS that name; it is
13
- * infrastructure language see design D1). This module is a THIN ADAPTER:
14
- * argument parsing, TTY output, exit codes, local file I/O. It adds zero
15
- * protocol behavior of its own.
8
+ * ARCHITECTURAL LAW: every piece of protocol behavior — crypto core,
9
+ * keystore, creation journal, snapshot + capture, publication state
10
+ * machines, ref transactions, verification budget, repair lives ONCE in
11
+ * `@run402/sdk` under `r.gitvault` (the SDK keeps that name; it is
12
+ * infrastructure language). This module is a THIN ADAPTER: argument
13
+ * parsing, TTY output, exit codes, local file I/O. It adds zero protocol
14
+ * behavior of its own.
16
15
  *
17
16
  * Pipe contract (docs/style.md): the payload is JSON on stdout; every human
18
17
  * line (progress, the terminal-loss statement, advisories) goes to stderr,
19
18
  * so `run402 repos view | jq` stays clean.
20
19
  *
21
- * The nineteen-command `gitvault` family this replaces (D7): its dispatcher
22
- * has RETIRED see `cli/lib/gitvault.mjs`, now a tombstone that answers
23
- * every old spelling with a typed `COMMAND_MOVED` (naming its `repos`
24
- * successor) or `COMMAND_REMOVED` (for `reconcile`, which has none) error.
20
+ * `cli/lib/gitvault.mjs` is a tombstone that answers every `gitvault <verb>`
21
+ * spelling with a typed `COMMAND_MOVED` (naming its `repos` successor) or
22
+ * `COMMAND_REMOVED` (for `reconcile`, which has none) error.
25
23
  */
26
24
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
27
25
  import { basename, join } from "node:path";
@@ -83,8 +81,7 @@ Subcommands:
83
81
  create Provision (or, with --project, ADOPT an existing project), ALLOCATE
84
82
  its vault (mints key material and, on first allocation, a one-shot
85
83
  recovery receipt), and scaffold the git remote — origin when free,
86
- run402 when taken (design D1). Absorbs the old \`gitvault init\`:
87
- \`--project <id>\` allocates for a project that already exists,
84
+ run402 when taken. \`--project <id>\` allocates for a project that already exists,
88
85
  nothing is provisioned. \`[name]\` is inferred from an existing git
89
86
  remote's basename or the directory name when unambiguous — NEVER a
90
87
  prompt; if the directory and an existing remote disagree, or
@@ -96,7 +93,7 @@ Subcommands:
96
93
  believe about the repo — allocation, policy, whether this keystore
97
94
  can sign, the authenticated and materialized pins, the mirror
98
95
  summary (when one is configured), and where the keystore lives.
99
- NEVER materializes refs or advances any local pin (design D3)
96
+ NEVER materializes refs or advances any local pin —
100
97
  that belongs to \`fsck\`, which is why \`refs\` reports
101
98
  {known:false, reason:"not_materialized"} with a next_action
102
99
  pointing there. \`--human\` renders a short summary instead of JSON.
@@ -106,10 +103,10 @@ Subcommands:
106
103
  404s. Not every project in the org — ones with no vault are
107
104
  omitted.
108
105
  rename Claim or rename the repo's per-org-unique, address-form name
109
- (the <name> half of run402::<org-slug>/<name>) absorbs the old
110
- \`repos name\`. Address by --repo or --project (not both).
106
+ (the <name> half of run402::<org-slug>/<name>). Address by
107
+ --repo or --project (not both).
111
108
  delete Deletes a REPO-ONLY project — database, functions, subdomains,
112
- mailbox, and secrets must all be absent (design D9). When any of
109
+ mailbox, and secrets must all be absent. When any of
113
110
  them is materialized, this REFUSES with
114
111
  PROJECT_HAS_NON_REPO_RESOURCES, enumerates refused_resources, and
115
112
  points at \`run402 projects delete\` — the verb whose name says
@@ -123,7 +120,7 @@ Subcommands:
123
120
  publishing. Push-to-creates through a slug-form remote
124
121
  (run402::<org-slug>/<name>) the same way \`git push\` does.
125
122
  \`--dry-run\` previews the real local pipeline without publishing.
126
- mirror ONE flag-driven verb (design D4) for the client-side, customer-
123
+ mirror ONE flag-driven verb for the client-side, customer-
127
124
  owned ciphertext mirror — run402 never holds a credential to it.
128
125
  No argument: READ the configured destination + a keyless
129
126
  freshness check against the live vault. \`<destination>\`:
@@ -140,8 +137,8 @@ Subcommands:
140
137
  no \`repos clone\` verb exists). Proves this mirror's validity,
141
138
  never freshness — read both honesty statements before relying on
142
139
  the result.
143
- fsck Walks the head chain (what \`verify\` used to do) AND materializes
144
- the ref map (what \`status --refs\` used to do), advancing BOTH
140
+ fsck Walks the head chain AND materializes
141
+ the ref map, advancing BOTH
145
142
  local trust pins — reported EXPLICITLY as local_state_changed +
146
143
  pin_before + pin_after, never implied. \`--no-write\` is a genuine
147
144
  audit mode: the same real walk and decrypt, computing the same
@@ -162,15 +159,21 @@ Subcommands:
162
159
  safe_to_auto_execute:false as ADDITIVE fields.
163
160
  access READ-ONLY: the org's directory of encryption-key-holding members,
164
161
  which of the vault's current envelope-recipient fingerprints are
165
- covered, and (best-effort, this machine only) each principal's
166
- local TOFU pin. Reports an HONEST gap rather than inventing:
167
- per-recipient envelope_state (converged/pending) and
168
- history_scope are not yet exposed by the gateway — that lands
169
- with gitvault-human-envelopes' epoch-rotation work.
162
+ covered, per-recipient envelope_state (converged/pending/
163
+ pending_removal, from the gateway's desired-recipient-state
164
+ substrate), and (best-effort, this machine only) each principal's
165
+ local TOFU pin. stale_access names removed members whose access
166
+ was NOT actually revoked — pending_removal is honest bookkeeping,
167
+ not enforcement, until epoch rotation ships. Reports an HONEST
168
+ remaining gap rather than inventing: history_scope (which epochs
169
+ each recipient can read) has no substrate to report — gitvault
170
+ protocol v0 pins a single fixed epoch, so there is no per-epoch
171
+ scope yet; that lands with gitvault-human-envelopes' epoch-
172
+ rotation work, in fold under adversarial review.
170
173
  access repair
171
174
  NOT YET AVAILABLE — gated on the epoch-rotation mechanism above
172
- landing. \`reconcile\`, the workaround it replaces, is REMOVED
173
- (design D5/D7): it never wrapped a key correctly-scoped to "from
175
+ landing. \`reconcile\`, the workaround it replaces, is REMOVED:
176
+ it never wrapped a key correctly-scoped to "from
174
177
  here forward," and a temporary mechanism does not get a
175
178
  permanent verb. This refuses cleanly and points at \`repos
176
179
  access\` for what IS available today.
@@ -256,12 +259,11 @@ Examples:
256
259
  run402 repos delete --project prj_xyz --force
257
260
  `;
258
261
 
259
- // ─── shared targeting + printing (ported from the retired gitvault.mjs) ────
262
+ // ─── shared targeting + printing ────
260
263
 
261
264
  /**
262
- * Resolve which repo to act on, plus the local git tree. Identical
263
- * resolution order the old `gitvault.mjs` used (design change: none
264
- * naming only): explicit `--repo`/`--project` > the repo's own pin/remote
265
+ * Resolve which repo to act on, plus the local git tree. Resolution order:
266
+ * explicit `--repo`/`--project` > the repo's own pin/remote
265
267
  * > RUN402_PROJECT_ID > the active project.
266
268
  */
267
269
  async function vaultTarget(a) {
@@ -282,11 +284,23 @@ async function vaultTarget(a) {
282
284
  return target;
283
285
  }
284
286
 
285
- /** Print the protocol §0 terminal-loss statement, verbatim, from the SDK's own constants — never paraphrased here. */
287
+ /**
288
+ * Print the protocol §0 terminal-loss statement, verbatim, from the SDK's own
289
+ * constants — never paraphrased here. The SDK's `status()` already downgrades
290
+ * this to the durability sentence when it has locally proven the vault has
291
+ * >= 2 covering recipients (dogfood item 2: the single-principal terminal-loss
292
+ * claim is false for that vault) — this function only renders whichever
293
+ * statement the SDK selected, it never chooses between them itself.
294
+ */
286
295
  function printTerminalLoss(status) {
287
296
  console.error("");
288
- console.error(status.terminal_loss_statement);
289
- console.error(status.terminal_loss_detail);
297
+ if (status.terminal_loss_statement) {
298
+ console.error(status.terminal_loss_statement);
299
+ console.error(status.terminal_loss_detail);
300
+ } else if (status.durability_statement) {
301
+ console.error(status.durability_statement);
302
+ if (status.covering_recipients != null) console.error(`covering_recipients: ${status.covering_recipients}`);
303
+ }
290
304
  console.error(`Back up this directory: ${status.keystore.root}`);
291
305
  console.error("");
292
306
  }
@@ -299,8 +313,7 @@ const LARGE_OUTPUT_THRESHOLD_BYTES = 100 * 1024;
299
313
  * to a private 0600 file with a one-line stderr breadcrumb naming the path.
300
314
  * Best-effort. Deliberately NEVER called on `create`'s result — that JSON
301
315
  * carries the one-shot recovery receipt, and a secret-bearing response is
302
- * never spilled into any cache path (agent-response-design's secrets rule,
303
- * design D10).
316
+ * never spilled into any cache path (agent-response-design's secrets rule).
304
317
  */
305
318
  async function spillIfLarge(repoId, verb, payload) {
306
319
  const json = JSON.stringify(payload, null, 2);
@@ -400,7 +413,7 @@ async function formatRepoHuman(s, mirror) {
400
413
  return lines.join("\n");
401
414
  }
402
415
 
403
- // ─── name inference (design D10 — create's delight pass) ──────────────────
416
+ // ─── name inference ──────────────────
404
417
 
405
418
  function validateProjectName(name) {
406
419
  if (name === "") {
@@ -416,8 +429,8 @@ function validateProjectName(name) {
416
429
  }
417
430
 
418
431
  /**
419
- * Best-effort slugify for the address-form repo name (design D6's grammar:
420
- * lowercase [a-z0-9-], no leading/trailing/double hyphen, <=63 chars).
432
+ * Best-effort slugify for the address-form repo name (the address-form
433
+ * grammar: lowercase [a-z0-9-], no leading/trailing/double hyphen, <=63 chars).
421
434
  */
422
435
  function slugifyRepoName(name) {
423
436
  return name
@@ -458,7 +471,7 @@ function dirBasenameCandidate(dir) {
458
471
  }
459
472
 
460
473
  /**
461
- * `repos create [name]`'s inference (design D10): the directory or an
474
+ * `repos create [name]`'s inference: the directory or an
462
475
  * existing git remote's basename, when unambiguous. NEVER a prompt —
463
476
  * ambiguity (the two candidates disagree) or a dead end (neither yields a
464
477
  * usable slug) is a structured error naming exactly one next_action.
@@ -827,7 +840,7 @@ async function rename(args) {
827
840
  }
828
841
  }
829
842
 
830
- // ─── delete (design D9) ─────────────────────────────────────────────────────
843
+ // ─── delete ─────────────────────────────────────────────────────
831
844
 
832
845
  /** One non-repo-resource read, `null` when absent (including a clean 404), an entry when present or genuinely unverifiable. */
833
846
  async function checkResource(read, resourceName, countOf) {
@@ -1082,7 +1095,7 @@ async function policy(args) {
1082
1095
  }
1083
1096
  }
1084
1097
 
1085
- // ─── mirror (design D4 — ONE flag-driven verb) ─────────────────────────────
1098
+ // ─── mirror (ONE flag-driven verb) ─────────────────────────────
1086
1099
 
1087
1100
  const MIRROR_VALUE_FLAGS = [...COMMON_VALUE_FLAGS, "--profile", "--region", "--endpoint"];
1088
1101
 
@@ -1177,7 +1190,7 @@ async function mirror(args) {
1177
1190
  return mirrorRead(target);
1178
1191
  }
1179
1192
 
1180
- // ─── fsck (design D2/D3 absorbs verify + mirror verify) ──────────────────
1193
+ // ─── fsck (verify the head chain + materialize refs) ──────────────────
1181
1194
 
1182
1195
  async function fsck(args) {
1183
1196
  const a = normalizeArgv(args);
@@ -1212,7 +1225,7 @@ async function fsck(args) {
1212
1225
  }
1213
1226
  }
1214
1227
 
1215
- // ─── gc (design D2 — absorbs compact + prune) ──────────────────────────────
1228
+ // ─── gc (checkpoint + prune) ──────────────────────────────
1216
1229
 
1217
1230
  const GC_VALUE_FLAGS = [...COMMON_VALUE_FLAGS, "--intent-core", "--verifier-receipt"];
1218
1231
 
@@ -1260,9 +1273,8 @@ async function gc(args) {
1260
1273
  const nextActions = [];
1261
1274
  if (!prune.blocked_reason && prune.object_candidates.length > 0) {
1262
1275
  // Additive fields beyond the CLI's usual {type, command, why}: the
1263
- // external review's explicit ask (design D2 clause 5) `gc` is never
1264
- // described as "exactly git gc," and its submit next_action must say
1265
- // so structurally, not just in prose.
1276
+ // `gc` is never described as "exactly git gc," and its submit
1277
+ // next_action must say so structurally, not just in prose.
1266
1278
  nextActions.push({
1267
1279
  type: "submit_gc",
1268
1280
  command: "run402 repos gc --submit --intent-core <core.json> --verifier-receipt <receipt.json>",
@@ -1296,7 +1308,7 @@ async function gc(args) {
1296
1308
  }
1297
1309
  }
1298
1310
 
1299
- // ─── access (design D5/D10 — read-only; repair gated) ──────────────────────
1311
+ // ─── access (read-only; repair gated) ──────────────────────
1300
1312
 
1301
1313
  async function accessRead(args) {
1302
1314
  const a = normalizeArgv(args);
@@ -1308,8 +1320,15 @@ async function accessRead(args) {
1308
1320
  console.log(JSON.stringify(result, null, 2));
1309
1321
  await spillIfLarge(result.repo_id, "access", result);
1310
1322
  console.error(`${result.recipients.length} directory recipient(s), ${result.recipients.filter((r) => r.covered).length} covered on this repo.`);
1323
+ if (result.this_keystore) {
1324
+ console.error(`1 covering fingerprint is this machine's own keystore (the vault's writing principal, not in the org directory): ${result.this_keystore.fingerprint}`);
1325
+ }
1311
1326
  if (result.unmatched_covered_fingerprints.length > 0) {
1312
- console.error(`${result.unmatched_covered_fingerprints.length} covering fingerprint(s) match no directory entry (orphaned/external): ${result.unmatched_covered_fingerprints.join(", ")}`);
1327
+ console.error(`${result.unmatched_covered_fingerprints.length} covering fingerprint(s) match no directory entry or desired-state row (orphaned/external): ${result.unmatched_covered_fingerprints.join(", ")}`);
1328
+ }
1329
+ if (Array.isArray(result.stale_access) && result.stale_access.length > 0) {
1330
+ const names = result.stale_access.map((s) => s.display_name ?? s.principal_id).join(", ");
1331
+ console.error(`${result.stale_access.length} removed member(s) STILL decrypt this vault (not yet revocable — no epoch rotation in v0): ${names}`);
1313
1332
  }
1314
1333
  console.error(result.gap);
1315
1334
  } catch (err) {
@@ -1335,7 +1354,7 @@ async function access(args) {
1335
1354
  return accessRead(a);
1336
1355
  }
1337
1356
 
1338
- // ─── recover (design D4 — kept, D10 confirms the name) ─────────────────────
1357
+ // ─── recover ─────────────────────
1339
1358
 
1340
1359
  async function recover(args) {
1341
1360
  const a = normalizeArgv(args);
@@ -1367,6 +1386,10 @@ async function recover(args) {
1367
1386
  if (result.data_loss_detected) {
1368
1387
  console.error(`DATA LOSS DETECTED: ${result.absences.filter((x) => x.adjudication === "unexplained_absence").length} object(s) are unexplained absences — see "absences" in the result above.`);
1369
1388
  }
1389
+ if (result.layout === "bare") {
1390
+ console.error(`layout: bare (no working files in ${outDir} — this is not a failed recovery)`);
1391
+ for (const n of result.next_actions ?? []) console.error(`next: ${n.action} — ${n.command}`);
1392
+ }
1370
1393
  printMirrorHonesty(result);
1371
1394
  } catch (err) {
1372
1395
  reportSdkError(err);
@@ -73,9 +73,8 @@ export async function resolveRoom({ org, room, project } = {}) {
73
73
  }
74
74
 
75
75
  // 3. A room key without an org: the org resolves through the shared chain.
76
- // (`--room` alone used to be a hard error; it now works whenever the org
77
- // resolves, and fails with ORG_REQUIRED — naming every way to supply one —
78
- // when it does not.)
76
+ // (`--room` alone works whenever the org resolves, and fails with
77
+ // ORG_REQUIRED — naming every way to supply one — when it does not.)
79
78
  const bindingRoom = findBindingKey(process.cwd(), "room");
80
79
  const roomKey = room ?? bindingRoom?.value ?? null;
81
80
  if (roomKey) {
package/lib/rooms.mjs CHANGED
@@ -2,12 +2,10 @@
2
2
  * `run402 rooms` — the coordination room itself: arriving, leaving, and who is
3
3
  * in it.
4
4
  *
5
- * The MESSAGES exchanged in a room are `run402 messages` (legible-cli-surface).
6
- * Four of this family's five verbs used to act on a message, which made the
7
- * container the noun and left the thing you handle without one.
5
+ * The MESSAGES exchanged in a room are `run402 messages` — a separate noun
6
+ * from the room itself.
8
7
  *
9
- * `who` is now `join`: it REGISTERS a presence, and an interrogative must not
10
- * name a write.
8
+ * `join` REGISTERS a presence, and an interrogative must not name a write.
11
9
  *
12
10
  * Gateway subsystem: add-agent-messaging (/orgs/v1/:org_id/rooms/:room_key/*).
13
11
  * Session presence cache: ./.run402/messaging.json (gitignore).
@@ -213,15 +211,14 @@ export async function run(sub, args) {
213
211
  }
214
212
  // `list` and `get` are NOT here, and this is deliberate rather than
215
213
  // missing: the ROUTES exist (agent-room-lifecycle) and the SDK exposes
216
- // them as `rooms.list` / `rooms.get`. These two SPELLINGS were freed
217
- // hours ago by the move of the message verbs, and a freed spelling stays
218
- // dead for one major before anything reuses it (design D3b). Reissuing
219
- // them now with room semantics would never fail an agent holding
220
- // `rooms list` would get a successful response containing different data
221
- // and nothing would tell it the world moved.
222
- // Retired here, and NOT aliased (design D3): each answers with its
223
- // successor so one failed call teaches the new model, where an alias
224
- // would teach the old one forever.
214
+ // them as `rooms.list` / `rooms.get`. These two SPELLINGS are reserved —
215
+ // a freed spelling stays dead for one major before anything reuses it.
216
+ // Reissuing them now with room semantics would never fail an agent
217
+ // holding `rooms list` would get a successful response containing
218
+ // different data and nothing would tell it the world moved.
219
+ // Retired here, and NOT aliased: each answers with its successor so one
220
+ // failed call teaches the new model, where an alias would teach the old
221
+ // one forever.
225
222
  case "who":
226
223
  fail({
227
224
  code: "COMMAND_REMOVED",
@@ -124,7 +124,7 @@ export async function refreshUpdateCheck({
124
124
  timeoutMs = UPDATE_CHECK_TIMEOUT_MS,
125
125
  registry = npmRegistryBase(env),
126
126
  } = {}) {
127
- // Faithful (kychee-com/run402#561): a failed live check must never ERASE a
127
+ // Faithful: a failed live check must never ERASE a
128
128
  // previously known-good `latest` — reporting `latest: null` in its place
129
129
  // would be a confident lie ("nothing is known"), not an honest stale
130
130
  // estimate. Read what is already cached BEFORE attempting the network
@@ -276,13 +276,11 @@ export async function doctorUpdateCheck({
276
276
 
277
277
  let record = readUpdateCache({ path: cachePath });
278
278
 
279
- // A real TTL (24h) that actually causes a refresh (kychee-com/run402#561
280
- // grok saw a THREE-minor-version, four-week-old cached "latest" with
281
- // nothing ever having re-checked it). An explicit `--refresh` always
282
- // checks live, same as before; now a MISSING or EXPIRED cache also gets
283
- // exactly ONE bounded live attempt automatically, so a plain
284
- // `run402 doctor` self-heals a stale cache instead of silently reporting
285
- // a weeks-old value as if it were current. `refreshUpdateCheck` itself
279
+ // A real TTL (24h) that actually causes a refresh. An explicit `--refresh`
280
+ // always checks live; a MISSING or EXPIRED cache also gets exactly ONE
281
+ // bounded live attempt automatically, so a plain `run402 doctor` self-heals
282
+ // a stale cache instead of silently reporting a weeks-old value as if it
283
+ // were current. `refreshUpdateCheck` itself
286
284
  // never erases a previously known-good `latest` on failure (see its own
287
285
  // doc comment), so a failed attempt here degrades gracefully to the LAST
288
286
  // GOOD record — never to a bare unknown when something was already known.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "4.41.0",
3
+ "version": "4.42.0",
4
4
  "description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -344,7 +344,7 @@ export declare class Channels {
344
344
  revokeTelegram(bindingId: string): Promise<RevokeTelegramResult>;
345
345
  }
346
346
  /**
347
- * `r.admin.rules` — Telegram routing rules (design D4): one match (ANDed
347
+ * `r.admin.rules` — Telegram routing rules: one match (ANDed
348
348
  * dimensions; an omitted dimension is a wildcard) → one Telegram binding.
349
349
  * Rules govern the Telegram channel ONLY in v1 — email/webhook keep their
350
350
  * existing preference-toggle semantics untouched. Mutations require
@@ -56,7 +56,7 @@ export class Channels {
56
56
  }
57
57
  }
58
58
  /**
59
- * `r.admin.rules` — Telegram routing rules (design D4): one match (ANDed
59
+ * `r.admin.rules` — Telegram routing rules: one match (ANDed
60
60
  * dimensions; an omitted dimension is a wildcard) → one Telegram binding.
61
61
  * Rules govern the Telegram channel ONLY in v1 — email/webhook keep their
62
62
  * existing preference-toggle semantics untouched. Mutations require
@@ -798,7 +798,7 @@ export interface PlanResponse {
798
798
  /** v1.48 unified-apply: one entry per `assets.put` item, with the
799
799
  * AssetRef envelope resolved at plan time (URLs are deterministic
800
800
  * from `(project_public_id, key, content_sha256)` so they're
801
- * computable BEFORE commit per design D8). Agents that need URLs
801
+ * computable BEFORE commit). Agents that need URLs
802
802
  * pre-commit (for HTML injection between plan and commit) read
803
803
  * these directly. */
804
804
  asset_entries?: AssetEntryPlanResult[];
@@ -1727,7 +1727,7 @@ export interface DeployResult {
1727
1727
  * shape without importing the Node entry.
1728
1728
  *
1729
1729
  * `byKey` and `manifest` MUST be constructed with `Object.create(null)`
1730
- * (design D9) so attacker-controlled or filesystem-derived keys like
1730
+ * so attacker-controlled or filesystem-derived keys like
1731
1731
  * `__proto__` / `constructor` / `toString` don't collide with prototype
1732
1732
  * properties.
1733
1733
  */
@@ -50,6 +50,16 @@ export declare const GITVAULT_ENVELOPE_INFO_LABEL: "r402s/v0/envelope";
50
50
  * paraphrase; the wording is a reviewed product commitment.
51
51
  */
52
52
  export declare const GITVAULT_TERMINAL_LOSS_STATEMENT: "whole-machine or whole-keystore loss is terminal for vault history until human envelopes ship";
53
+ /**
54
+ * The protocol's durability sentence — the keystore-qualified half of the
55
+ * terminal-loss statement, reusable on its own. It is TRUE regardless of how
56
+ * many principals cover a vault (unlike {@link GITVAULT_TERMINAL_LOSS_STATEMENT},
57
+ * which is specifically the single-principal V0-A claim), so a caller that has
58
+ * locally proven a vault carries >= 2 covering recipients prints this sentence
59
+ * instead of the terminal-loss one — see `Gitvault.status()`'s `covering_recipients`
60
+ * field. Never paraphrase; the wording is a reviewed product commitment.
61
+ */
62
+ export declare const GITVAULT_DURABILITY_STATEMENT: "The vault protects source history from host-side loss while a principal keystore survives.";
53
63
  /** Protocol §0 sentence in full, as `doctor`/`status` print it. */
54
64
  export declare const GITVAULT_TERMINAL_LOSS_DOCTOR_TEXT: string;
55
65
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"gitvault.crypto.d.ts","sourceRoot":"","sources":["../../src/namespaces/gitvault.crypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;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CAAC,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,oBAAoB,GAAG,8BAA8B,EAAE,CAWtI;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,kBAAkB,EAC9B,QAAQ,EAAE;IAAE,kBAAkB,EAAE,MAAM,CAAC;IAAC,2BAA2B,EAAE,MAAM,CAAC;IAAC,8BAA8B,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3J,gBAAgB,CAAC,EAAE,UAAU,GAAG,MAAM,GACrC,MAAM,EAAE,CAeV;AAED,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC"}
@@ -60,9 +60,19 @@ export const GITVAULT_ENVELOPE_INFO_LABEL = "r402s/v0/envelope";
60
60
  * paraphrase; the wording is a reviewed product commitment.
61
61
  */
62
62
  export const GITVAULT_TERMINAL_LOSS_STATEMENT = "whole-machine or whole-keystore loss is terminal for vault history until human envelopes ship";
63
+ /**
64
+ * The protocol's durability sentence — the keystore-qualified half of the
65
+ * terminal-loss statement, reusable on its own. It is TRUE regardless of how
66
+ * many principals cover a vault (unlike {@link GITVAULT_TERMINAL_LOSS_STATEMENT},
67
+ * which is specifically the single-principal V0-A claim), so a caller that has
68
+ * locally proven a vault carries >= 2 covering recipients prints this sentence
69
+ * instead of the terminal-loss one — see `Gitvault.status()`'s `covering_recipients`
70
+ * field. Never paraphrase; the wording is a reviewed product commitment.
71
+ */
72
+ export const GITVAULT_DURABILITY_STATEMENT = "The vault protects source history from host-side loss while a principal keystore survives.";
63
73
  /** Protocol §0 sentence in full, as `doctor`/`status` print it. */
64
74
  export const GITVAULT_TERMINAL_LOSS_DOCTOR_TEXT = "In V0-A, whole-machine or whole-keystore loss is terminal for vault history (VAULT_UNRECOVERABLE) until human envelopes ship. " +
65
- "The vault protects source history from host-side loss while a principal keystore survives. " +
75
+ `${GITVAULT_DURABILITY_STATEMENT} ` +
66
76
  "The remaining paths are the platform's custodial restore of deployed artifacts (the deploy lane's CAS) and org/infra recovery; " +
67
77
  "a recovery receipt authenticates a genesis — it cannot decrypt anything.";
68
78
  /**