midsummer-sol 0.3.7 → 0.3.9

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 (3) hide show
  1. package/package.json +1 -1
  2. package/sol-mcp.js +69 -1
  3. package/sol.js +69 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "midsummer-sol",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Sol — agent-native version control (a new git). CLI, MCP server, and no-filesystem SDK.",
5
5
  "bin": { "sol": "./sol.js", "sol-mcp": "./sol-mcp.js", "sol-secret-mcp": "./sol-secret-mcp.js" },
6
6
  "main": "./index.js",
package/sol-mcp.js CHANGED
@@ -4192,6 +4192,7 @@ __export(exports_remote, {
4192
4192
  loadRemote: () => loadRemote,
4193
4193
  forksList: () => forksList,
4194
4194
  forkMeta: () => forkMeta,
4195
+ exportStreaming: () => exportStreaming,
4195
4196
  classifyNodes: () => classifyNodes,
4196
4197
  accessSet: () => accessSet,
4197
4198
  accessGet: () => accessGet
@@ -4258,6 +4259,73 @@ async function exportStreaming(cfg, token) {
4258
4259
  throw new Error("remote /export returned an empty stream");
4259
4260
  return { ...header, nodes };
4260
4261
  }
4262
+ async function exportManifest(cfg, token) {
4263
+ const res = await fetch(endpoint(cfg, "/export/manifest"), {
4264
+ headers: { authorization: `Bearer ${token}`, "content-type": "application/json" }
4265
+ });
4266
+ if (res.status === 404)
4267
+ return exportStreaming(cfg, token);
4268
+ if (!res.ok)
4269
+ throw new Error(`remote /export/manifest -> ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
4270
+ const m = await res.json();
4271
+ if (!Array.isArray(m.packIds))
4272
+ return exportStreaming(cfg, token);
4273
+ const legacyHashes = m.legacyPaged ? await collectLegacyHashes(cfg, token) : m.legacyNodes ?? [];
4274
+ const tasks = [
4275
+ ...(m.packIds ?? []).map((packId) => () => fetchPack(cfg, token, packId, false)),
4276
+ ...chunk(legacyHashes, LEGACY_BATCH_SIZE).map((batch) => () => fetchLegacyBatch(cfg, token, batch))
4277
+ ];
4278
+ const packNodes = await pool(tasks, CLONE_PACK_CONCURRENCY);
4279
+ const nodes = [];
4280
+ for (const ns of packNodes)
4281
+ for (const n of ns)
4282
+ nodes.push(n);
4283
+ return { schema: m.schema, head: m.head, seq: m.seq, tip: m.tip, ops: m.ops, nodes, refs: m.refs, checkout: m.checkout };
4284
+ }
4285
+ async function collectLegacyHashes(cfg, token) {
4286
+ const out = [];
4287
+ let cursor;
4288
+ for (;; ) {
4289
+ const url = `/export/manifest/legacy${cursor ? `?cursor=${encodeURIComponent(cursor)}` : ""}`;
4290
+ const res = await fetch(endpoint(cfg, url), { headers: { authorization: `Bearer ${token}`, "content-type": "application/json" } });
4291
+ if (!res.ok)
4292
+ throw new Error(`remote /export/manifest/legacy -> ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
4293
+ const page = await res.json();
4294
+ for (const h of page.hashes ?? [])
4295
+ out.push(h);
4296
+ if (!page.cursor)
4297
+ break;
4298
+ cursor = page.cursor;
4299
+ }
4300
+ return out;
4301
+ }
4302
+ function chunk(xs, size) {
4303
+ const out = [];
4304
+ for (let i = 0;i < xs.length; i += size)
4305
+ out.push(xs.slice(i, i + size));
4306
+ return out;
4307
+ }
4308
+ async function fetchLegacyBatch(cfg, token, hashes) {
4309
+ return retryTransient(async () => {
4310
+ const res = await fetch(endpoint(cfg, "/pack-batch"), {
4311
+ method: "POST",
4312
+ headers: { authorization: `Bearer ${token}`, "content-type": "application/json" },
4313
+ body: JSON.stringify({ hashes })
4314
+ });
4315
+ if (!res.ok)
4316
+ throw new Error(`remote /pack-batch -> ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
4317
+ return decodePackLine((await res.text()).trim());
4318
+ });
4319
+ }
4320
+ async function fetchPack(cfg, token, id, legacy) {
4321
+ return retryTransient(async () => {
4322
+ const path = `/pack/${encodeURIComponent(id)}${legacy ? "?legacy=1" : ""}`;
4323
+ const res = await fetch(endpoint(cfg, path), { headers: { authorization: `Bearer ${token}` } });
4324
+ if (!res.ok)
4325
+ throw new Error(`remote /pack -> ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
4326
+ return decodePackLine((await res.text()).trim());
4327
+ });
4328
+ }
4261
4329
  function classifyNodes(nodes) {
4262
4330
  const trees = [];
4263
4331
  const leaves = [];
@@ -4369,7 +4437,7 @@ async function writeBundle(solDir2, bundle, from = 0) {
4369
4437
  writeFileSync6(join6(solDir2, "HEAD"), JSON.stringify({ head: bundle.head, seq: bundle.seq, logTip: bundle.tip }));
4370
4438
  return fresh.length;
4371
4439
  }
4372
- var endpoint = (cfg, path) => `${cfg.url.replace(/\/+$/, "")}${path}${path.includes("?") ? "&" : "?"}repo=${encodeURIComponent(cfg.repo)}`, remoteHead = (cfg, token) => call(cfg, token, "/head"), remoteGate = (cfg, token, branch) => call(cfg, token, `/head?gateState=true${branch ? `&branch=${encodeURIComponent(branch)}` : ""}`), remoteExport = (cfg, token) => exportStreaming(cfg, token), remoteRefs = (cfg, token) => call(cfg, token, "/refs"), remotePush = (cfg, token, body) => call(cfg, token, "/push", { method: "POST", body: JSON.stringify(body) }), remotePromote = (cfg, token, branch) => call(cfg, token, "/promote", { method: "POST", body: JSON.stringify({ branch }) }), SMALL_PUSH_BYTES, BLOB_PACK_BYTES, BLOB_PACK_CONCURRENCY = 6, GIANT_LEAF_BYTES, nodeBytes = (n) => JSON.stringify(n).length, remotePushBlobs = (cfg, token, nodes) => retryTransient(() => call(cfg, token, "/push/blobs", { method: "POST", body: gzipSync3(JSON.stringify({ nodes })), headers: { "content-encoding": "gzip" } })), mrOpen = (cfg, token, body) => call(cfg, token, "/mr", { method: "POST", body: JSON.stringify(body) }), mrList = (cfg, token) => call(cfg, token, "/mrs"), mrDiff = (cfg, token, id) => call(cfg, token, `/mr/diff?id=${id}`), mrGet = (cfg, token, id) => call(cfg, token, `/mr?id=${id}`), mrAction = (cfg, token, action, body) => call(cfg, token, `/mr/${action}`, { method: "POST", body: JSON.stringify(body) }), accessGet = (cfg, token) => call(cfg, token, "/access"), ownerSet = (cfg, token, ownerHandle) => call(cfg, token, "/owner", { method: "POST", body: JSON.stringify({ ownerHandle }) }), accessSet = (cfg, token, body) => call(cfg, token, "/access", { method: "POST", body: JSON.stringify(body) }), policyCheck = (cfg, token, paths) => call(cfg, token, "/policy/check", { method: "POST", body: JSON.stringify({ paths }) }), policyGet = (cfg, token) => call(cfg, token, "/policy"), policyUpsert = (cfg, token, rule) => call(cfg, token, "/policy?write=1", { method: "POST", body: JSON.stringify({ op: "upsert", rule }) }), policyRemove = (cfg, token, pattern) => call(cfg, token, "/policy?write=1", { method: "POST", body: JSON.stringify({ op: "remove", pattern }) }), recipientsForPath = (cfg, token, path) => call(cfg, token, `/recipients?path=${encodeURIComponent(path)}`), recipientsForAudience = (cfg, token, audience, recovery) => call(cfg, token, `/recipients?audience=${encodeURIComponent(JSON.stringify(audience))}${recovery?.length ? `&recovery=${encodeURIComponent(recovery.join(","))}` : ""}`), remoteEnvPush = (cfg, token, bundle) => call(cfg, token, "/env/push", { method: "POST", body: JSON.stringify(bundle) }), remoteEnvAnchor = (cfg, token) => call(cfg, token, "/env/anchor"), remoteEnvPull = (cfg, token) => call(cfg, token, "/env/pull"), forkMeta = (cfg, token, parent) => call(cfg, token, "/fork-meta", { method: "POST", body: JSON.stringify({ parent }) }), forksList = (cfg, token) => call(cfg, token, "/forks"), saveRemote = (solDir2, cfg) => writeFileSync6(join6(solDir2, "remote.json"), JSON.stringify(cfg, null, 2));
4440
+ var endpoint = (cfg, path) => `${cfg.url.replace(/\/+$/, "")}${path}${path.includes("?") ? "&" : "?"}repo=${encodeURIComponent(cfg.repo)}`, remoteHead = (cfg, token) => call(cfg, token, "/head"), remoteGate = (cfg, token, branch) => call(cfg, token, `/head?gateState=true${branch ? `&branch=${encodeURIComponent(branch)}` : ""}`), CLONE_PACK_CONCURRENCY = 12, LEGACY_BATCH_SIZE = 500, remoteExport = (cfg, token) => exportManifest(cfg, token), remoteRefs = (cfg, token) => call(cfg, token, "/refs"), remotePush = (cfg, token, body) => call(cfg, token, "/push", { method: "POST", body: JSON.stringify(body) }), remotePromote = (cfg, token, branch) => call(cfg, token, "/promote", { method: "POST", body: JSON.stringify({ branch }) }), SMALL_PUSH_BYTES, BLOB_PACK_BYTES, BLOB_PACK_CONCURRENCY = 6, GIANT_LEAF_BYTES, nodeBytes = (n) => JSON.stringify(n).length, remotePushBlobs = (cfg, token, nodes) => retryTransient(() => call(cfg, token, "/push/blobs", { method: "POST", body: gzipSync3(JSON.stringify({ nodes })), headers: { "content-encoding": "gzip" } })), mrOpen = (cfg, token, body) => call(cfg, token, "/mr", { method: "POST", body: JSON.stringify(body) }), mrList = (cfg, token) => call(cfg, token, "/mrs"), mrDiff = (cfg, token, id) => call(cfg, token, `/mr/diff?id=${id}`), mrGet = (cfg, token, id) => call(cfg, token, `/mr?id=${id}`), mrAction = (cfg, token, action, body) => call(cfg, token, `/mr/${action}`, { method: "POST", body: JSON.stringify(body) }), accessGet = (cfg, token) => call(cfg, token, "/access"), ownerSet = (cfg, token, ownerHandle) => call(cfg, token, "/owner", { method: "POST", body: JSON.stringify({ ownerHandle }) }), accessSet = (cfg, token, body) => call(cfg, token, "/access", { method: "POST", body: JSON.stringify(body) }), policyCheck = (cfg, token, paths) => call(cfg, token, "/policy/check", { method: "POST", body: JSON.stringify({ paths }) }), policyGet = (cfg, token) => call(cfg, token, "/policy"), policyUpsert = (cfg, token, rule) => call(cfg, token, "/policy?write=1", { method: "POST", body: JSON.stringify({ op: "upsert", rule }) }), policyRemove = (cfg, token, pattern) => call(cfg, token, "/policy?write=1", { method: "POST", body: JSON.stringify({ op: "remove", pattern }) }), recipientsForPath = (cfg, token, path) => call(cfg, token, `/recipients?path=${encodeURIComponent(path)}`), recipientsForAudience = (cfg, token, audience, recovery) => call(cfg, token, `/recipients?audience=${encodeURIComponent(JSON.stringify(audience))}${recovery?.length ? `&recovery=${encodeURIComponent(recovery.join(","))}` : ""}`), remoteEnvPush = (cfg, token, bundle) => call(cfg, token, "/env/push", { method: "POST", body: JSON.stringify(bundle) }), remoteEnvAnchor = (cfg, token) => call(cfg, token, "/env/anchor"), remoteEnvPull = (cfg, token) => call(cfg, token, "/env/pull"), forkMeta = (cfg, token, parent) => call(cfg, token, "/fork-meta", { method: "POST", body: JSON.stringify({ parent }) }), forksList = (cfg, token) => call(cfg, token, "/forks"), saveRemote = (solDir2, cfg) => writeFileSync6(join6(solDir2, "remote.json"), JSON.stringify(cfg, null, 2));
4373
4441
  var init_remote = __esm(() => {
4374
4442
  init_file_store2();
4375
4443
  init_store();
package/sol.js CHANGED
@@ -3425,6 +3425,7 @@ __export(exports_remote, {
3425
3425
  loadRemote: () => loadRemote,
3426
3426
  forksList: () => forksList,
3427
3427
  forkMeta: () => forkMeta,
3428
+ exportStreaming: () => exportStreaming,
3428
3429
  classifyNodes: () => classifyNodes,
3429
3430
  accessSet: () => accessSet,
3430
3431
  accessGet: () => accessGet
@@ -3491,6 +3492,73 @@ async function exportStreaming(cfg, token) {
3491
3492
  throw new Error("remote /export returned an empty stream");
3492
3493
  return { ...header, nodes };
3493
3494
  }
3495
+ async function exportManifest(cfg, token) {
3496
+ const res = await fetch(endpoint(cfg, "/export/manifest"), {
3497
+ headers: { authorization: `Bearer ${token}`, "content-type": "application/json" }
3498
+ });
3499
+ if (res.status === 404)
3500
+ return exportStreaming(cfg, token);
3501
+ if (!res.ok)
3502
+ throw new Error(`remote /export/manifest -> ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
3503
+ const m = await res.json();
3504
+ if (!Array.isArray(m.packIds))
3505
+ return exportStreaming(cfg, token);
3506
+ const legacyHashes = m.legacyPaged ? await collectLegacyHashes(cfg, token) : m.legacyNodes ?? [];
3507
+ const tasks = [
3508
+ ...(m.packIds ?? []).map((packId) => () => fetchPack(cfg, token, packId, false)),
3509
+ ...chunk(legacyHashes, LEGACY_BATCH_SIZE).map((batch) => () => fetchLegacyBatch(cfg, token, batch))
3510
+ ];
3511
+ const packNodes = await pool(tasks, CLONE_PACK_CONCURRENCY);
3512
+ const nodes = [];
3513
+ for (const ns of packNodes)
3514
+ for (const n of ns)
3515
+ nodes.push(n);
3516
+ return { schema: m.schema, head: m.head, seq: m.seq, tip: m.tip, ops: m.ops, nodes, refs: m.refs, checkout: m.checkout };
3517
+ }
3518
+ async function collectLegacyHashes(cfg, token) {
3519
+ const out = [];
3520
+ let cursor;
3521
+ for (;; ) {
3522
+ const url = `/export/manifest/legacy${cursor ? `?cursor=${encodeURIComponent(cursor)}` : ""}`;
3523
+ const res = await fetch(endpoint(cfg, url), { headers: { authorization: `Bearer ${token}`, "content-type": "application/json" } });
3524
+ if (!res.ok)
3525
+ throw new Error(`remote /export/manifest/legacy -> ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
3526
+ const page = await res.json();
3527
+ for (const h of page.hashes ?? [])
3528
+ out.push(h);
3529
+ if (!page.cursor)
3530
+ break;
3531
+ cursor = page.cursor;
3532
+ }
3533
+ return out;
3534
+ }
3535
+ function chunk(xs, size) {
3536
+ const out = [];
3537
+ for (let i = 0;i < xs.length; i += size)
3538
+ out.push(xs.slice(i, i + size));
3539
+ return out;
3540
+ }
3541
+ async function fetchLegacyBatch(cfg, token, hashes) {
3542
+ return retryTransient(async () => {
3543
+ const res = await fetch(endpoint(cfg, "/pack-batch"), {
3544
+ method: "POST",
3545
+ headers: { authorization: `Bearer ${token}`, "content-type": "application/json" },
3546
+ body: JSON.stringify({ hashes })
3547
+ });
3548
+ if (!res.ok)
3549
+ throw new Error(`remote /pack-batch -> ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
3550
+ return decodePackLine((await res.text()).trim());
3551
+ });
3552
+ }
3553
+ async function fetchPack(cfg, token, id, legacy) {
3554
+ return retryTransient(async () => {
3555
+ const path = `/pack/${encodeURIComponent(id)}${legacy ? "?legacy=1" : ""}`;
3556
+ const res = await fetch(endpoint(cfg, path), { headers: { authorization: `Bearer ${token}` } });
3557
+ if (!res.ok)
3558
+ throw new Error(`remote /pack -> ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
3559
+ return decodePackLine((await res.text()).trim());
3560
+ });
3561
+ }
3494
3562
  function classifyNodes(nodes) {
3495
3563
  const trees = [];
3496
3564
  const leaves = [];
@@ -3602,7 +3670,7 @@ async function writeBundle(solDir2, bundle, from = 0) {
3602
3670
  writeFileSync5(join5(solDir2, "HEAD"), JSON.stringify({ head: bundle.head, seq: bundle.seq, logTip: bundle.tip }));
3603
3671
  return fresh.length;
3604
3672
  }
3605
- var endpoint = (cfg, path) => `${cfg.url.replace(/\/+$/, "")}${path}${path.includes("?") ? "&" : "?"}repo=${encodeURIComponent(cfg.repo)}`, remoteHead = (cfg, token) => call(cfg, token, "/head"), remoteGate = (cfg, token, branch) => call(cfg, token, `/head?gateState=true${branch ? `&branch=${encodeURIComponent(branch)}` : ""}`), remoteExport = (cfg, token) => exportStreaming(cfg, token), remoteRefs = (cfg, token) => call(cfg, token, "/refs"), remotePush = (cfg, token, body) => call(cfg, token, "/push", { method: "POST", body: JSON.stringify(body) }), remotePromote = (cfg, token, branch) => call(cfg, token, "/promote", { method: "POST", body: JSON.stringify({ branch }) }), SMALL_PUSH_BYTES, BLOB_PACK_BYTES, BLOB_PACK_CONCURRENCY = 6, GIANT_LEAF_BYTES, nodeBytes = (n) => JSON.stringify(n).length, remotePushBlobs = (cfg, token, nodes) => retryTransient(() => call(cfg, token, "/push/blobs", { method: "POST", body: gzipSync2(JSON.stringify({ nodes })), headers: { "content-encoding": "gzip" } })), mrOpen = (cfg, token, body) => call(cfg, token, "/mr", { method: "POST", body: JSON.stringify(body) }), mrList = (cfg, token) => call(cfg, token, "/mrs"), mrDiff = (cfg, token, id) => call(cfg, token, `/mr/diff?id=${id}`), mrGet = (cfg, token, id) => call(cfg, token, `/mr?id=${id}`), mrAction = (cfg, token, action, body) => call(cfg, token, `/mr/${action}`, { method: "POST", body: JSON.stringify(body) }), accessGet = (cfg, token) => call(cfg, token, "/access"), ownerSet = (cfg, token, ownerHandle) => call(cfg, token, "/owner", { method: "POST", body: JSON.stringify({ ownerHandle }) }), accessSet = (cfg, token, body) => call(cfg, token, "/access", { method: "POST", body: JSON.stringify(body) }), policyCheck = (cfg, token, paths) => call(cfg, token, "/policy/check", { method: "POST", body: JSON.stringify({ paths }) }), policyGet = (cfg, token) => call(cfg, token, "/policy"), policyUpsert = (cfg, token, rule) => call(cfg, token, "/policy?write=1", { method: "POST", body: JSON.stringify({ op: "upsert", rule }) }), policyRemove = (cfg, token, pattern) => call(cfg, token, "/policy?write=1", { method: "POST", body: JSON.stringify({ op: "remove", pattern }) }), recipientsForPath = (cfg, token, path) => call(cfg, token, `/recipients?path=${encodeURIComponent(path)}`), recipientsForAudience = (cfg, token, audience, recovery) => call(cfg, token, `/recipients?audience=${encodeURIComponent(JSON.stringify(audience))}${recovery?.length ? `&recovery=${encodeURIComponent(recovery.join(","))}` : ""}`), remoteEnvPush = (cfg, token, bundle) => call(cfg, token, "/env/push", { method: "POST", body: JSON.stringify(bundle) }), remoteEnvAnchor = (cfg, token) => call(cfg, token, "/env/anchor"), remoteEnvPull = (cfg, token) => call(cfg, token, "/env/pull"), forkMeta = (cfg, token, parent) => call(cfg, token, "/fork-meta", { method: "POST", body: JSON.stringify({ parent }) }), forksList = (cfg, token) => call(cfg, token, "/forks"), saveRemote = (solDir2, cfg) => writeFileSync5(join5(solDir2, "remote.json"), JSON.stringify(cfg, null, 2));
3673
+ var endpoint = (cfg, path) => `${cfg.url.replace(/\/+$/, "")}${path}${path.includes("?") ? "&" : "?"}repo=${encodeURIComponent(cfg.repo)}`, remoteHead = (cfg, token) => call(cfg, token, "/head"), remoteGate = (cfg, token, branch) => call(cfg, token, `/head?gateState=true${branch ? `&branch=${encodeURIComponent(branch)}` : ""}`), CLONE_PACK_CONCURRENCY = 12, LEGACY_BATCH_SIZE = 500, remoteExport = (cfg, token) => exportManifest(cfg, token), remoteRefs = (cfg, token) => call(cfg, token, "/refs"), remotePush = (cfg, token, body) => call(cfg, token, "/push", { method: "POST", body: JSON.stringify(body) }), remotePromote = (cfg, token, branch) => call(cfg, token, "/promote", { method: "POST", body: JSON.stringify({ branch }) }), SMALL_PUSH_BYTES, BLOB_PACK_BYTES, BLOB_PACK_CONCURRENCY = 6, GIANT_LEAF_BYTES, nodeBytes = (n) => JSON.stringify(n).length, remotePushBlobs = (cfg, token, nodes) => retryTransient(() => call(cfg, token, "/push/blobs", { method: "POST", body: gzipSync2(JSON.stringify({ nodes })), headers: { "content-encoding": "gzip" } })), mrOpen = (cfg, token, body) => call(cfg, token, "/mr", { method: "POST", body: JSON.stringify(body) }), mrList = (cfg, token) => call(cfg, token, "/mrs"), mrDiff = (cfg, token, id) => call(cfg, token, `/mr/diff?id=${id}`), mrGet = (cfg, token, id) => call(cfg, token, `/mr?id=${id}`), mrAction = (cfg, token, action, body) => call(cfg, token, `/mr/${action}`, { method: "POST", body: JSON.stringify(body) }), accessGet = (cfg, token) => call(cfg, token, "/access"), ownerSet = (cfg, token, ownerHandle) => call(cfg, token, "/owner", { method: "POST", body: JSON.stringify({ ownerHandle }) }), accessSet = (cfg, token, body) => call(cfg, token, "/access", { method: "POST", body: JSON.stringify(body) }), policyCheck = (cfg, token, paths) => call(cfg, token, "/policy/check", { method: "POST", body: JSON.stringify({ paths }) }), policyGet = (cfg, token) => call(cfg, token, "/policy"), policyUpsert = (cfg, token, rule) => call(cfg, token, "/policy?write=1", { method: "POST", body: JSON.stringify({ op: "upsert", rule }) }), policyRemove = (cfg, token, pattern) => call(cfg, token, "/policy?write=1", { method: "POST", body: JSON.stringify({ op: "remove", pattern }) }), recipientsForPath = (cfg, token, path) => call(cfg, token, `/recipients?path=${encodeURIComponent(path)}`), recipientsForAudience = (cfg, token, audience, recovery) => call(cfg, token, `/recipients?audience=${encodeURIComponent(JSON.stringify(audience))}${recovery?.length ? `&recovery=${encodeURIComponent(recovery.join(","))}` : ""}`), remoteEnvPush = (cfg, token, bundle) => call(cfg, token, "/env/push", { method: "POST", body: JSON.stringify(bundle) }), remoteEnvAnchor = (cfg, token) => call(cfg, token, "/env/anchor"), remoteEnvPull = (cfg, token) => call(cfg, token, "/env/pull"), forkMeta = (cfg, token, parent) => call(cfg, token, "/fork-meta", { method: "POST", body: JSON.stringify({ parent }) }), forksList = (cfg, token) => call(cfg, token, "/forks"), saveRemote = (solDir2, cfg) => writeFileSync5(join5(solDir2, "remote.json"), JSON.stringify(cfg, null, 2));
3606
3674
  var init_remote = __esm(() => {
3607
3675
  init_file_store();
3608
3676
  init_store();