run402 4.45.0 → 4.45.1

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.
@@ -445,6 +445,14 @@ async function main(argv) {
445
445
  }
446
446
  const refs = state.refs ?? {};
447
447
  for (const ref of Object.keys(refs).sort()) out(`${refs[ref]} ${ref}`);
448
+ // A snapshot-only vault holds protocol refs but no branch heads, so a
449
+ // plain `git clone` prints "cloned an empty repository" with no hint the
450
+ // history exists (blind-acceptance finding, 2026-08-28). Say where it is.
451
+ const refNames = Object.keys(refs);
452
+ if (refNames.length > 0 && !refNames.some((r) => r.startsWith("refs/heads/"))) {
453
+ note(`this vault has no branch heads yet — its history lives on ${refNames.sort()[0]}`);
454
+ note(`fetch it with: git fetch <remote> '+${refNames.sort()[0]}:${refNames.sort()[0]}' && git checkout -b restored ${refNames.sort()[0]}`);
455
+ }
448
456
  const head = state.head_target;
449
457
  // A symref is only advertised when its target is actually present:
450
458
  // pointing HEAD at a ref that does not exist is what an empty repository
package/lib/repos.mjs CHANGED
@@ -1253,8 +1253,27 @@ async function snapshot(args) {
1253
1253
  }
1254
1254
  const result = await sdk.gitvault.push(opts);
1255
1255
  if (manifestOutPath != null) writeManifestOut(manifestOutPath, result);
1256
- printJson(sdk, summarizeSnapshotPayload(result, { verbose, manifestPath: manifestOutPath }));
1256
+ // Snapshot-only vault (no branch head published): a plain `git clone`
1257
+ // of this vault prints "cloned an empty repository" with no hint the
1258
+ // snapshot exists (blind-acceptance finding, 2026-08-28). Name the
1259
+ // restore path in the result itself.
1260
+ const resultRefNames = Object.keys(result.refs ?? {});
1261
+ const snapshotOnly = resultRefNames.length > 0 && !resultRefNames.some((r) => r.startsWith("refs/heads/"));
1262
+ const payload = summarizeSnapshotPayload(result, { verbose, manifestPath: manifestOutPath });
1263
+ if (snapshotOnly) {
1264
+ const snapRef = resultRefNames.sort()[0];
1265
+ payload.next_actions = [
1266
+ ...(payload.next_actions ?? []),
1267
+ {
1268
+ type: "restore_snapshot_ref",
1269
+ command: `git fetch <remote> '+${snapRef}:${snapRef}' && git checkout -b restored ${snapRef}`,
1270
+ why: `This vault has no branch heads — a plain \`git clone\` will report an empty repository. The snapshot history lives on ${snapRef}; \`git push\` a branch to make plain clones work.`,
1271
+ },
1272
+ ];
1273
+ }
1274
+ printJson(sdk, payload);
1257
1275
  console.error(`published generation ${result.generation} (${result.form})`);
1276
+ if (snapshotOnly) console.error(`note: no branch heads in this vault — a plain clone looks empty; snapshot history is on ${resultRefNames.sort()[0]} (see next_actions)`);
1258
1277
  if (result.mirror_push?.outcome === "pushed") {
1259
1278
  console.error(`mirror: pushed generation ${result.generation} (${result.mirror_push.summary?.objects_copied ?? 0} object(s) copied)`);
1260
1279
  } else if (result.mirror_push?.outcome === "failed") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "4.45.0",
3
+ "version": "4.45.1",
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": {