@niscorp/moss 0.9.0 → 0.9.2

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 (70) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/DESIGN.md +1 -1
  3. package/DOCS.md +95 -25
  4. package/dist/{chunk-WTWRLOPK.js → chunk-5ZB7FZ2J.js} +3 -3
  5. package/dist/{chunk-WTWRLOPK.js.map → chunk-5ZB7FZ2J.js.map} +1 -1
  6. package/dist/{chunk-E6YAYR7G.cjs → chunk-6ZWMC2OV.cjs} +6 -6
  7. package/dist/{chunk-E6YAYR7G.cjs.map → chunk-6ZWMC2OV.cjs.map} +1 -1
  8. package/dist/{chunk-UUOATPZ7.js → chunk-FUJRIO4N.js} +20 -4
  9. package/dist/chunk-FUJRIO4N.js.map +1 -0
  10. package/dist/{chunk-TGKDS2T7.cjs → chunk-IY5BOFLK.cjs} +222 -37
  11. package/dist/chunk-IY5BOFLK.cjs.map +1 -0
  12. package/dist/{chunk-LKTS4PCD.cjs → chunk-KMZT6NVL.cjs} +23 -7
  13. package/dist/chunk-KMZT6NVL.cjs.map +1 -0
  14. package/dist/{chunk-L2GHVTJW.cjs → chunk-KVXP6OTW.cjs} +88 -81
  15. package/dist/chunk-KVXP6OTW.cjs.map +1 -0
  16. package/dist/{chunk-3RIWTXGI.cjs → chunk-NCQBGK3E.cjs} +6 -2
  17. package/dist/chunk-NCQBGK3E.cjs.map +1 -0
  18. package/dist/{chunk-4ZGAFZGS.js → chunk-TKXYPO2Y.js} +6 -2
  19. package/dist/chunk-TKXYPO2Y.js.map +1 -0
  20. package/dist/{chunk-TLNRFAQ6.js → chunk-UTFOMFCH.js} +207 -22
  21. package/dist/chunk-UTFOMFCH.js.map +1 -0
  22. package/dist/{chunk-Y7PRASR3.js → chunk-WMIJU6ZZ.js} +12 -5
  23. package/dist/chunk-WMIJU6ZZ.js.map +1 -0
  24. package/dist/client/node.d.cts +2 -2
  25. package/dist/client/node.d.ts +2 -2
  26. package/dist/client.cjs +5 -5
  27. package/dist/client.d.cts +7 -4
  28. package/dist/client.d.ts +7 -4
  29. package/dist/client.js +2 -2
  30. package/dist/{env-CY8EGWnD.d.cts → env-3qvvochI.d.cts} +3 -1
  31. package/dist/{env-DEPqqHEb.d.ts → env-DBPDpfU8.d.ts} +3 -1
  32. package/dist/index.cjs +15 -15
  33. package/dist/index.js +3 -3
  34. package/dist/{messages-CSwCJgH3.d.cts → messages-OSnNJL80.d.cts} +2 -0
  35. package/dist/{messages-CSwCJgH3.d.ts → messages-OSnNJL80.d.ts} +2 -0
  36. package/dist/node.cjs +8 -8
  37. package/dist/node.js +4 -4
  38. package/dist/protocol.cjs +5 -5
  39. package/dist/protocol.d.cts +1 -1
  40. package/dist/protocol.d.ts +1 -1
  41. package/dist/protocol.js +1 -1
  42. package/dist/terminal/dom/index.d.cts +2 -2
  43. package/dist/terminal/dom/index.d.ts +2 -2
  44. package/dist/terminal/index.cjs +3 -3
  45. package/dist/terminal/index.d.cts +2 -2
  46. package/dist/terminal/index.d.ts +2 -2
  47. package/dist/terminal/index.js +2 -2
  48. package/dist/terminal/react/index.d.cts +2 -2
  49. package/dist/terminal/react/index.d.ts +2 -2
  50. package/dist/terminal/react/server.d.cts +2 -2
  51. package/dist/terminal/react/server.d.ts +2 -2
  52. package/dist/terminal/tty/index.d.cts +2 -2
  53. package/dist/terminal/tty/index.d.ts +2 -2
  54. package/dist/terminal/vue/index.d.cts +2 -2
  55. package/dist/terminal/vue/index.d.ts +2 -2
  56. package/dist/terminal/vue/server.d.cts +2 -2
  57. package/dist/terminal/vue/server.d.ts +2 -2
  58. package/dist/unverified.cjs +3 -3
  59. package/dist/unverified.js +2 -2
  60. package/dist/vite.cjs +9 -9
  61. package/dist/vite.js +4 -4
  62. package/package.json +13 -13
  63. package/dist/chunk-3RIWTXGI.cjs.map +0 -1
  64. package/dist/chunk-4ZGAFZGS.js.map +0 -1
  65. package/dist/chunk-L2GHVTJW.cjs.map +0 -1
  66. package/dist/chunk-LKTS4PCD.cjs.map +0 -1
  67. package/dist/chunk-TGKDS2T7.cjs.map +0 -1
  68. package/dist/chunk-TLNRFAQ6.js.map +0 -1
  69. package/dist/chunk-UUOATPZ7.js.map +0 -1
  70. package/dist/chunk-Y7PRASR3.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkE6YAYR7G_cjs = require('./chunk-E6YAYR7G.cjs');
3
+ var chunk6ZWMC2OV_cjs = require('./chunk-6ZWMC2OV.cjs');
4
4
  var chunkPVZMCEBX_cjs = require('./chunk-PVZMCEBX.cjs');
5
- var chunk3RIWTXGI_cjs = require('./chunk-3RIWTXGI.cjs');
5
+ var chunkNCQBGK3E_cjs = require('./chunk-NCQBGK3E.cjs');
6
6
  var zod = require('zod');
7
7
  var crypto$1 = require('crypto');
8
8
  var vex = require('@niscorp/vex');
@@ -21,7 +21,7 @@ var nova = require('@niscorp/nova');
21
21
  var i18n = require('@niscorp/nova/i18n');
22
22
  var reflect = require('@niscorp/nova/reflect');
23
23
 
24
- var tokenFromCookie = (header, name = chunk3RIWTXGI_cjs.DEFAULT_TOKEN_KEY) => {
24
+ var tokenFromCookie = (header, name = chunkNCQBGK3E_cjs.DEFAULT_TOKEN_KEY) => {
25
25
  if (header === void 0 || header === null) return null;
26
26
  const wanted = encodeURIComponent(name);
27
27
  for (const part of header.split(";")) {
@@ -43,7 +43,7 @@ var ownOriginOf = (origin, host, listed2 = []) => {
43
43
  return own ? asked : void 0;
44
44
  };
45
45
  var cookiesAt = (where, key, token, lastsMs) => {
46
- const name = encodeURIComponent(chunk3RIWTXGI_cjs.sessionNameOf(key, where.port));
46
+ const name = encodeURIComponent(chunkNCQBGK3E_cjs.sessionNameOf(key, where.port));
47
47
  const life = token === null ? "; Max-Age=0" : typeof lastsMs === "number" ? `; Max-Age=${Math.max(0, Math.floor(lastsMs / 1e3))}` : "";
48
48
  const kept = `Path=/; SameSite=Lax${where.secure ? "; Secure" : ""}${life}`;
49
49
  return [`${where.secure ? "__Host-" : ""}${name}=${encodeURIComponent(token ?? "")}; HttpOnly; ${kept}`, `${name}.held=${token === null ? "" : "1"}; ${kept}`];
@@ -57,10 +57,10 @@ var originOf = (request) => {
57
57
  };
58
58
  var sessionCookies = (page, token, options = {}) => {
59
59
  const at = new URL(typeof page === "string" ? page : originOf(page));
60
- return cookiesAt({ port: at.port, secure: at.protocol === "https:" }, options.key ?? chunk3RIWTXGI_cjs.DEFAULT_TOKEN_KEY, token, options.lastsMs);
60
+ return cookiesAt({ port: at.port, secure: at.protocol === "https:" }, options.key ?? chunkNCQBGK3E_cjs.DEFAULT_TOKEN_KEY, token, options.lastsMs);
61
61
  };
62
- var sessionTokenOf = (cookies, where, key = chunk3RIWTXGI_cjs.DEFAULT_TOKEN_KEY) => {
63
- const name = chunk3RIWTXGI_cjs.sessionNameOf(key, where.port);
62
+ var sessionTokenOf = (cookies, where, key = chunkNCQBGK3E_cjs.DEFAULT_TOKEN_KEY) => {
63
+ const name = chunkNCQBGK3E_cjs.sessionNameOf(key, where.port);
64
64
  for (const secure of where.secure === void 0 ? [true, false] : [where.secure]) {
65
65
  const token = tokenFromCookie(cookies, `${secure ? "__Host-" : ""}${name}`);
66
66
  if (token !== null) return { token, clear: cookiesAt({ port: where.port, secure }, key, null) };
@@ -625,7 +625,7 @@ var removalsRefused = (found) => [
625
625
  ...found.retyped.map((what) => `this run changes the type of ${what}`)
626
626
  ].map((sentence) => `${sentence} \u2014 nothing removed or retyped is applied unless it is allowed (\`allowRemoval\`; \`nisc migrate --allow-removal\`)`);
627
627
  var migrateTables = async (runtime, app, options = {}) => {
628
- const entries = chunkE6YAYR7G_cjs.entriesOf(app);
628
+ const entries = chunk6ZWMC2OV_cjs.entriesOf(app);
629
629
  const cache = runtime.cache ?? vex.createPostgresCache({ pool: runtime.pool });
630
630
  const before = await vex.createPostgresAdapter({ pool: runtime.pool }).introspect();
631
631
  const misfitsBefore = misfitsOf(entries, before);
@@ -1130,7 +1130,7 @@ var embedSnapshot = (snapshot, principal, path) => {
1130
1130
  const { frame, trees, seed, live } = snapshot;
1131
1131
  const carried = { frame, trees, principal: principal !== null, live, ...seed !== void 0 ? { seed } : {}, ...path !== void 0 ? { path } : {} };
1132
1132
  const text = JSON.stringify(carried).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
1133
- return `<script type="application/json" id="${chunk3RIWTXGI_cjs.SNAPSHOT_ELEMENT_ID}">${text}</script>`;
1133
+ return `<script type="application/json" id="${chunkNCQBGK3E_cjs.SNAPSHOT_ELEMENT_ID}">${text}</script>`;
1134
1134
  };
1135
1135
  var documentHeaders = (principal) => principal === null ? { "cache-control": "no-cache", vary: "Cookie" } : { "cache-control": "private, no-store", vary: "Cookie" };
1136
1136
  var rootHolding = (root) => {
@@ -1141,7 +1141,7 @@ var rootHolding = (root) => {
1141
1141
  var escapeAttribute = (value) => value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;");
1142
1142
  var renderDocument = async (config) => {
1143
1143
  const { server, template, request, draw } = config;
1144
- const tokenKey = config.tokenKey ?? chunk3RIWTXGI_cjs.DEFAULT_TOKEN_KEY;
1144
+ const tokenKey = config.tokenKey ?? chunkNCQBGK3E_cjs.DEFAULT_TOKEN_KEY;
1145
1145
  const root = config.root ?? DEFAULT_ROOT;
1146
1146
  const undrawn = { html: template, headers: documentHeaders(null), drawn: false, principal: null };
1147
1147
  if (!template.includes(root)) return undrawn;
@@ -1272,15 +1272,15 @@ var isKept = (layout) => layout !== void 0 && layout !== null && typeof layout !
1272
1272
  var shellWithStoredLayouts = (shell) => {
1273
1273
  const layouts = {};
1274
1274
  const frame = shell.layout;
1275
- if (isKept(frame)) layouts[chunkE6YAYR7G_cjs.FRAME_LAYOUT_REF] = frame;
1275
+ if (isKept(frame)) layouts[chunk6ZWMC2OV_cjs.FRAME_LAYOUT_REF] = frame;
1276
1276
  const canvases = shell.canvases.map((canvas) => {
1277
1277
  const layout = canvas.actionLayout;
1278
1278
  if (!isKept(layout)) return canvas;
1279
- const ref = chunkE6YAYR7G_cjs.canvasLayoutRef(canvas.id);
1279
+ const ref = chunk6ZWMC2OV_cjs.canvasLayoutRef(canvas.id);
1280
1280
  layouts[ref] = layout;
1281
1281
  return { ...canvas, actionLayout: ref };
1282
1282
  });
1283
- return { canvases, ...isKept(frame) ? { frame: chunkE6YAYR7G_cjs.FRAME_LAYOUT_REF } : typeof frame === "string" ? { frame } : {}, layouts };
1283
+ return { canvases, ...isKept(frame) ? { frame: chunk6ZWMC2OV_cjs.FRAME_LAYOUT_REF } : typeof frame === "string" ? { frame } : {}, layouts };
1284
1284
  };
1285
1285
  var slottedIn = /* @__PURE__ */ new WeakMap();
1286
1286
  var canvasesSlottedIn = (layout) => {
@@ -1331,7 +1331,7 @@ var createComponentNames = (read2) => {
1331
1331
  var SavedLayoutSchema = zod.z.strictObject({ ref: zod.z.string(), layout: nova.LayoutNodeSchema, use: zod.z.boolean().optional() });
1332
1332
  var upgradedLayoutBody = (upgrader, body, stamp) => reflect.isRecord(body) && body["layout"] !== void 0 ? { ...body, layout: upgrader.upgrade(body["layout"], { kind: "nisc.nova/layout", stamp }).document } : body;
1333
1333
  var actionAtRef = (actions, layouts) => (ref) => {
1334
- const id = chunkE6YAYR7G_cjs.actionOfLayoutRef(ref);
1334
+ const id = chunk6ZWMC2OV_cjs.actionOfLayoutRef(ref);
1335
1335
  const action = id !== void 0 && Object.hasOwn(actions, id) ? actions[id] : void 0;
1336
1336
  const layout = Object.hasOwn(layouts, ref) ? layouts[ref] : void 0;
1337
1337
  return action === void 0 || layout === void 0 ? void 0 : { ...action, layout };
@@ -1356,9 +1356,9 @@ var readLayout = (body, heldTo) => {
1356
1356
  const { ref, layout } = parsed.data;
1357
1357
  const target = targetAt(ref, heldTo);
1358
1358
  if (target === void 0) return { refusal: nothingKeptUnder(ref) };
1359
- const misfits = chunkE6YAYR7G_cjs.layoutMisfits(layout, target.kit);
1359
+ const misfits = chunk6ZWMC2OV_cjs.layoutMisfits(layout, target.kit);
1360
1360
  if (misfits.length > 0) return { refusal: misfits.join("; ") };
1361
- const named = chunkE6YAYR7G_cjs.layoutNameRefusal(layout);
1361
+ const named = chunk6ZWMC2OV_cjs.layoutNameRefusal(layout);
1362
1362
  if (named !== void 0) return { refusal: `it ${named}` };
1363
1363
  const { action } = target;
1364
1364
  if (action === void 0) return { layout: parsed.data };
@@ -1392,7 +1392,7 @@ var layoutsInUse = (inForce2, drawnFor) => {
1392
1392
  }
1393
1393
  return layouts;
1394
1394
  };
1395
- var generatedId = () => `${chunkE6YAYR7G_cjs.GENERATED_ID_PREFIX}${crypto$1.randomUUID()}`;
1395
+ var generatedId = () => `${chunk6ZWMC2OV_cjs.GENERATED_ID_PREFIX}${crypto$1.randomUUID()}`;
1396
1396
  var VEX_ROUTE = /^\/api\/(?:[A-Za-z0-9_-]+\/)?vex$/;
1397
1397
  var endpointRefusals = async (endpoints, heldTo) => {
1398
1398
  const refusals = [];
@@ -1429,8 +1429,8 @@ var parsedUnder = (schema, body, id, more = {}) => {
1429
1429
  return { refusal: first === void 0 ? "no reason given" : `${first.path.join(".") || "(the body)"}: ${first.message}` };
1430
1430
  };
1431
1431
  var layoutRefusals = (layout, kit) => {
1432
- const named = chunkE6YAYR7G_cjs.layoutNameRefusal(layout);
1433
- return [...layout === void 0 || typeof layout === "string" ? [] : chunkE6YAYR7G_cjs.layoutMisfits(layout, kit), ...named === void 0 ? [] : [`it ${named}`]];
1432
+ const named = chunk6ZWMC2OV_cjs.layoutNameRefusal(layout);
1433
+ return [...layout === void 0 || typeof layout === "string" ? [] : chunk6ZWMC2OV_cjs.layoutMisfits(layout, kit), ...named === void 0 ? [] : [`it ${named}`]];
1434
1434
  };
1435
1435
  var passedOrRefused = (body, refusals) => refusals.length > 0 ? { refusal: refusals.join("; ") } : { body };
1436
1436
  var readAction = async (body, id, heldTo) => {
@@ -1832,7 +1832,7 @@ var createGeneration = (pointer, ctx) => {
1832
1832
  var NO_DEFAULTS = { actions: {}, fragments: {}, reads: /* @__PURE__ */ new Map() };
1833
1833
  var drawableIn = (fragments, kit, say) => Object.fromEntries(
1834
1834
  Object.entries(fragments).filter(([id, fragment]) => {
1835
- const misfits = chunkE6YAYR7G_cjs.layoutMisfits(fragment.layout, kit);
1835
+ const misfits = chunk6ZWMC2OV_cjs.layoutMisfits(fragment.layout, kit);
1836
1836
  if (misfits.length > 0) say(`[moss] the fragment "${id}" published for everybody is left out of a shell that cannot draw it: ${misfits.join("; ")}`);
1837
1837
  return misfits.length === 0;
1838
1838
  })
@@ -1870,7 +1870,7 @@ var checkedDefaults = async (versions, heldTo, whose) => {
1870
1870
  catalog: () => [...Object.values(heldTo.built).map((action) => ({ id: action.id, input: action.input ?? {} })), ...catalogOfGenerated(versions)]
1871
1871
  };
1872
1872
  const passed = await generatedInForce(versions, checks, whose);
1873
- return { passed, reads, verified: chunkE6YAYR7G_cjs.verifyManifest(heldTo.candidate({ ...heldTo.built, ...passed.actions }, passed.fragments)) };
1873
+ return { passed, reads, verified: chunk6ZWMC2OV_cjs.verifyManifest(heldTo.candidate({ ...heldTo.built, ...passed.actions }, passed.fragments)) };
1874
1874
  };
1875
1875
  var narrowedBy = (filter, ids, installed) => {
1876
1876
  const answered = new Set(filter(ids, installed));
@@ -1883,9 +1883,9 @@ var catalogFor = (app, roles, installed, installedOnly) => {
1883
1883
  };
1884
1884
  var resolveVariantsForRoles = (app, roles) => {
1885
1885
  const variants = app.layouts ?? {};
1886
- return chunkE6YAYR7G_cjs.variantLayouts(variants, charter.resolvePrincipal(app.charter, Object.keys(variants), roles, "layouts"));
1886
+ return chunk6ZWMC2OV_cjs.variantLayouts(variants, charter.resolvePrincipal(app.charter, Object.keys(variants), roles, "layouts"));
1887
1887
  };
1888
- var definitionsFor = (actions, ids, variants) => Object.freeze(Object.fromEntries(chunkE6YAYR7G_cjs.withVariants(actions, ids, variants)));
1888
+ var definitionsFor = (actions, ids, variants) => Object.freeze(Object.fromEntries(chunk6ZWMC2OV_cjs.withVariants(actions, ids, variants)));
1889
1889
  var actionsWithStoredLayouts = (definitions) => {
1890
1890
  const actions = {};
1891
1891
  const layouts = {};
@@ -1895,7 +1895,7 @@ var actionsWithStoredLayouts = (definitions) => {
1895
1895
  actions[id] = definition;
1896
1896
  continue;
1897
1897
  }
1898
- const ref = chunkE6YAYR7G_cjs.actionLayoutRef(id);
1898
+ const ref = chunk6ZWMC2OV_cjs.actionLayoutRef(id);
1899
1899
  layouts[ref] = layout;
1900
1900
  actions[id] = { ...definition, layout: { ref } };
1901
1901
  }
@@ -1991,17 +1991,17 @@ var tell = (listener, ...told) => {
1991
1991
  };
1992
1992
  var createRunningManifest = (config) => {
1993
1993
  const { shipped } = config;
1994
- const entries = createEntriesInForce(chunkE6YAYR7G_cjs.entriesOf(shipped));
1994
+ const entries = createEntriesInForce(chunk6ZWMC2OV_cjs.entriesOf(shipped));
1995
1995
  let defaults = NO_DEFAULTS;
1996
1996
  const usage = createUsage(config.touchEveryMs ?? TOUCH_EVERY_MS);
1997
1997
  let functionIds;
1998
- const candidate = (actions, held = entries.list(), fragments = defaults.fragments) => chunkE6YAYR7G_cjs.withFragments({ ...chunkE6YAYR7G_cjs.candidateOf(shipped, { actions, entries: held }, config.grants), ...functionIds === void 0 ? {} : { functionIds } }, fragments);
1998
+ const candidate = (actions, held = entries.list(), fragments = defaults.fragments) => chunk6ZWMC2OV_cjs.withFragments({ ...chunk6ZWMC2OV_cjs.candidateOf(shipped, { actions, entries: held }, config.grants), ...functionIds === void 0 ? {} : { functionIds } }, fragments);
1999
1999
  const own = shipped.actions;
2000
2000
  const loaders = /* @__PURE__ */ new Map();
2001
2001
  const owners = createSetOwners();
2002
2002
  let sets = /* @__PURE__ */ new Map();
2003
2003
  let inForce2 = mergedActions(own, sets);
2004
- let report = chunkE6YAYR7G_cjs.verifiedAtBoot(candidate(inForce2));
2004
+ let report = chunk6ZWMC2OV_cjs.verifiedAtBoot(candidate(inForce2));
2005
2005
  const components = createComponentNames((shell) => shellComponents({ actions: inForce2, layouts: shipped.layouts }, shell));
2006
2006
  const componentsOf2 = (shells) => {
2007
2007
  const kit = /* @__PURE__ */ new Map();
@@ -2036,14 +2036,14 @@ var createRunningManifest = (config) => {
2036
2036
  const { reads: readSources } = config;
2037
2037
  const functionsWritten = (written) => {
2038
2038
  if (functionIds !== void 0) return;
2039
- const ids = chunkE6YAYR7G_cjs.functionsIn(written).map((definition) => definition.id);
2040
- const charter = chunkE6YAYR7G_cjs.charterOverFunctions(shipped.charter, { actions: Object.keys(inForce2), data: config.grants, layouts: Object.keys(shipped.layouts ?? {}) }, ids);
2039
+ const ids = chunk6ZWMC2OV_cjs.functionsIn(written).map((definition) => definition.id);
2040
+ const charter = chunk6ZWMC2OV_cjs.charterOverFunctions(shipped.charter, { actions: Object.keys(inForce2), data: config.grants, layouts: Object.keys(shipped.layouts ?? {}) }, ids);
2041
2041
  if (charter.errors.length > 0) throw new Error(`Charter is incoherent over the app\u2019s functions \u2014 refusing to serve:
2042
2042
  ${charter.errors.join("\n ")}`);
2043
2043
  functionIds = new Set(ids);
2044
2044
  const built = mergedActions(own, sets);
2045
- const verified = chunkE6YAYR7G_cjs.verifyManifest(candidate(built, entries.list(), {}));
2046
- const refusal = chunkE6YAYR7G_cjs.refusalOf(verified, "boot");
2045
+ const verified = chunk6ZWMC2OV_cjs.verifyManifest(candidate(built, entries.list(), {}));
2046
+ const refusal = chunk6ZWMC2OV_cjs.refusalOf(verified, "boot");
2047
2047
  if (refusal !== void 0) {
2048
2048
  functionIds = void 0;
2049
2049
  throw new Error(refusal);
@@ -2054,7 +2054,7 @@ var createRunningManifest = (config) => {
2054
2054
  dropMemos();
2055
2055
  memo.drop();
2056
2056
  for (const warning2 of charter.warnings) console.warn(`[moss] charter: ${warning2}`);
2057
- const warning = chunkE6YAYR7G_cjs.functionsWarning(written);
2057
+ const warning = chunk6ZWMC2OV_cjs.functionsWarning(written);
2058
2058
  if (warning !== void 0) console.warn(warning);
2059
2059
  };
2060
2060
  const grantedFunctionsOf = (roles) => (names) => charter.resolvePrincipal(shipped.charter, names, roles, "functions");
@@ -2108,7 +2108,7 @@ var createRunningManifest = (config) => {
2108
2108
  const over = sets;
2109
2109
  const { passed, reads, verified } = await checkedDefaults(versions, defaultsHeldTo(), "published for everybody");
2110
2110
  if (sets !== over) return applyPublished(versions);
2111
- const refusal = chunkE6YAYR7G_cjs.refusalOf(verified, "boot");
2111
+ const refusal = chunk6ZWMC2OV_cjs.refusalOf(verified, "boot");
2112
2112
  if (refusal !== void 0) memo.sayOnce(`[moss] what is published for everybody is left out, and the build\u2019s copies stand: ${refusal}`);
2113
2113
  const next = refusal === void 0 ? { actions: passed.actions, fragments: passed.fragments, reads } : { ...NO_DEFAULTS, reads };
2114
2114
  if (!hasDefaults(next) && !hasDefaults(defaults)) return;
@@ -2132,10 +2132,10 @@ var createRunningManifest = (config) => {
2132
2132
  const applySets = (arrived, announce) => {
2133
2133
  const next = new Map([...sets, ...arrived]);
2134
2134
  const actions = mergedActions(own, next, defaults.actions);
2135
- const verified = chunkE6YAYR7G_cjs.verifyManifest(candidate(actions));
2136
- const refusal = chunkE6YAYR7G_cjs.refusalOf(verified, "refresh");
2135
+ const verified = chunk6ZWMC2OV_cjs.verifyManifest(candidate(actions));
2136
+ const refusal = chunk6ZWMC2OV_cjs.refusalOf(verified, "refresh");
2137
2137
  if (refusal !== void 0) throw new Error(refusal);
2138
- for (const set of arrived.values()) chunkE6YAYR7G_cjs.freezeDeep(set);
2138
+ for (const set of arrived.values()) chunk6ZWMC2OV_cjs.freezeDeep(set);
2139
2139
  sets = next;
2140
2140
  inForce2 = actions;
2141
2141
  report = verified;
@@ -2151,13 +2151,13 @@ var createRunningManifest = (config) => {
2151
2151
  };
2152
2152
  const takeEntries = async (source, handed) => {
2153
2153
  owners.assertAppOwned(source);
2154
- const misfits = chunkE6YAYR7G_cjs.entryMisfits(handed);
2154
+ const misfits = chunk6ZWMC2OV_cjs.entryMisfits(handed);
2155
2155
  if (misfits.length > 0) throw new Error(["Refresh refused \u2014 entries that do not parse:", ...misfits.map((misfit) => ` ${misfit}`)].join("\n"));
2156
2156
  const compiled = await compileEntries(handed);
2157
- const verified = chunkE6YAYR7G_cjs.verifyManifest(candidate(inForce2, entries.withSet(source, handed)));
2158
- const refusal = chunkE6YAYR7G_cjs.refusalOf(verified, "refresh");
2157
+ const verified = chunk6ZWMC2OV_cjs.verifyManifest(candidate(inForce2, entries.withSet(source, handed)));
2158
+ const refusal = chunk6ZWMC2OV_cjs.refusalOf(verified, "refresh");
2159
2159
  if (refusal !== void 0) throw new Error(refusal);
2160
- chunkE6YAYR7G_cjs.freezeDeep(handed);
2160
+ chunk6ZWMC2OV_cjs.freezeDeep(handed);
2161
2161
  entries.takeSet(source, handed, compiled);
2162
2162
  report = verified;
2163
2163
  for (const listener of [...listeners]) tell(listener);
@@ -2167,7 +2167,7 @@ var createRunningManifest = (config) => {
2167
2167
  return {
2168
2168
  actions: () => inForce2,
2169
2169
  entries: entries.list,
2170
- verify: (actions) => chunkE6YAYR7G_cjs.verifyManifest(candidate(actions)),
2170
+ verify: (actions) => chunk6ZWMC2OV_cjs.verifyManifest(candidate(actions)),
2171
2171
  report: () => report,
2172
2172
  replace: (source, actions) => applySets(/* @__PURE__ */ new Map([[owners.assertAppOwned(source), actions]]), true),
2173
2173
  // In turn: a set is compiled before it is taken, and of two handed over
@@ -2228,7 +2228,7 @@ var createRunningManifest = (config) => {
2228
2228
  const drawable = theirOwn.heldTo.layouts;
2229
2229
  const theirs2 = layoutsInUse(versions, { whose, heldTo: drawable });
2230
2230
  const variants = roleMemo.variantsFor(roles);
2231
- const underVariants = { ...drawable, actionAt: (ref) => variants.has(chunkE6YAYR7G_cjs.actionOfLayoutRef(ref) ?? "") ? void 0 : drawable.actionAt(ref) };
2231
+ const underVariants = { ...drawable, actionAt: (ref) => variants.has(chunk6ZWMC2OV_cjs.actionOfLayoutRef(ref) ?? "") ? void 0 : drawable.actionAt(ref) };
2232
2232
  const everybodys = layoutsInUse(everybodysVersions, { whose: "published for everybody", heldTo: underVariants, say: memo.sayOnce });
2233
2233
  const laidOverShell = { ...drawableIn(defaults.fragments, kitOf2(shell), memo.sayOnce), ...theirOwn.fragments };
2234
2234
  const fragments = Object.keys(laidOverShell).length === 0 ? shell.fragments : { ...shell.fragments, ...laidOverShell };
@@ -2260,7 +2260,7 @@ var createRunningManifest = (config) => {
2260
2260
  verify: async (versions, inForce3) => {
2261
2261
  const kept = inForce3.filter((held) => !versions.some((version) => version.kind === held.kind && version.id === held.id));
2262
2262
  const asked = versions.map((version) => ({ ...version, save: "", createdAt: "" }));
2263
- const refusal = chunkE6YAYR7G_cjs.refusalOf((await checkedDefaults([...kept, ...asked], defaultsHeldTo(), void 0)).verified, "publish");
2263
+ const refusal = chunk6ZWMC2OV_cjs.refusalOf((await checkedDefaults([...kept, ...asked], defaultsHeldTo(), void 0)).verified, "publish");
2264
2264
  if (refusal !== void 0) throw new Error(refusal);
2265
2265
  }
2266
2266
  },
@@ -2438,7 +2438,7 @@ var createRevalidation = (config) => {
2438
2438
  const expire = (connection) => {
2439
2439
  live.delete(connection);
2440
2440
  const told = () => connection.send(JSON.stringify({ type: "error", code: "invalid_token", message: "The session token no longer resolves to this principal." }));
2441
- const closed = () => connection.close(chunk3RIWTXGI_cjs.CLOSE_INVALID_TOKEN, "session expired");
2441
+ const closed = () => connection.close(chunkNCQBGK3E_cjs.CLOSE_INVALID_TOKEN, "session expired");
2442
2442
  for (const step of [told, closed]) {
2443
2443
  try {
2444
2444
  step();
@@ -2516,17 +2516,17 @@ var parametersOf = (url) => {
2516
2516
  var SpokenProtocolSchema = zod.z.string().regex(/^\d{1,15}$/).transform(Number);
2517
2517
  var protocolRefusal = (parameters) => {
2518
2518
  const spoken = SpokenProtocolSchema.safeParse(parameters.protocol);
2519
- if (spoken.success && spoken.data >= chunk3RIWTXGI_cjs.PROTOCOL_MIN && spoken.data <= chunk3RIWTXGI_cjs.PROTOCOL) return void 0;
2520
- const behind = spoken.success && spoken.data > chunk3RIWTXGI_cjs.PROTOCOL ? "server" : "client";
2519
+ if (spoken.success && spoken.data >= chunkNCQBGK3E_cjs.PROTOCOL_MIN && spoken.data <= chunkNCQBGK3E_cjs.PROTOCOL) return void 0;
2520
+ const behind = spoken.success && spoken.data > chunkNCQBGK3E_cjs.PROTOCOL ? "server" : "client";
2521
2521
  return {
2522
2522
  type: "error",
2523
2523
  code: `${behind}_too_old`,
2524
- message: `This terminal speaks protocol ${parameters.protocol}; this server speaks ${chunk3RIWTXGI_cjs.PROTOCOL_MIN}\u2013${chunk3RIWTXGI_cjs.PROTOCOL}. ` + (behind === "client" ? "Reload the terminal to get the current build." : "The server has not been updated yet.")
2524
+ message: `This terminal speaks protocol ${parameters.protocol}; this server speaks ${chunkNCQBGK3E_cjs.PROTOCOL_MIN}\u2013${chunkNCQBGK3E_cjs.PROTOCOL}. ` + (behind === "client" ? "Reload the terminal to get the current build." : "The server has not been updated yet.")
2525
2525
  };
2526
2526
  };
2527
2527
  var authenticateUpgrade = async (url, upgrade, config, foreignPageWarning) => {
2528
2528
  const parameters = parametersOf(url);
2529
- const key = parameters.key ?? chunk3RIWTXGI_cjs.DEFAULT_TOKEN_KEY;
2529
+ const key = parameters.key ?? chunkNCQBGK3E_cjs.DEFAULT_TOKEN_KEY;
2530
2530
  const page = upgrade === void 0 ? void 0 : ownOriginOf(upgrade.origin, upgrade.host, config.origins);
2531
2531
  const secure = page?.protocol === "https:";
2532
2532
  const held = page === void 0 ? null : sessionTokenOf(upgrade?.cookie, { port: page.port, secure }, key);
@@ -2538,10 +2538,10 @@ var authenticateUpgrade = async (url, upgrade, config, foreignPageWarning) => {
2538
2538
  );
2539
2539
  }
2540
2540
  const hadSeal = sealing ? sealOf(upgrade?.cookie, secure) : null;
2541
- const sealedOffer = chunk3RIWTXGI_cjs.offeredSealed(upgrade?.offered);
2541
+ const sealedOffer = chunkNCQBGK3E_cjs.offeredSealed(upgrade?.offered);
2542
2542
  const sealLost = sealing && sealedOffer !== null && hadSeal === null;
2543
2543
  const seal = !sealing || sealLost ? null : hadSeal ?? (upgrade?.answer === void 0 ? null : newSeal());
2544
- const offered = chunk3RIWTXGI_cjs.offeredToken(upgrade?.offered) ?? (sealedOffer === null || hadSeal === null ? null : await openSealed(hadSeal, sealedOffer));
2544
+ const offered = chunkNCQBGK3E_cjs.offeredToken(upgrade?.offered) ?? (sealedOffer === null || hadSeal === null ? null : await openSealed(hadSeal, sealedOffer));
2545
2545
  const carried = offered ?? (parameters.leave === "1" ? null : held?.token ?? null);
2546
2546
  const principal = carried === null ? null : await config.session(carried);
2547
2547
  if (offered !== null && principal === null) return "invalid_token";
@@ -2556,13 +2556,13 @@ var authenticateUpgrade = async (url, upgrade, config, foreignPageWarning) => {
2556
2556
  // src/socket/routing.ts
2557
2557
  var messageOf2 = (text) => {
2558
2558
  try {
2559
- const parsed = chunk3RIWTXGI_cjs.ClientMessageSchema.safeParse(JSON.parse(text));
2559
+ const parsed = chunkNCQBGK3E_cjs.ClientMessageSchema.safeParse(JSON.parse(text));
2560
2560
  return parsed.success ? parsed.data : void 0;
2561
2561
  } catch {
2562
2562
  return void 0;
2563
2563
  }
2564
2564
  };
2565
- var INVALID_MESSAGE = `Not a message of protocol ${chunk3RIWTXGI_cjs.PROTOCOL}: it must be JSON, name a type a terminal sends, and carry that type's fields and no others.`;
2565
+ var INVALID_MESSAGE = `Not a message of protocol ${chunkNCQBGK3E_cjs.PROTOCOL}: it must be JSON, name a type a terminal sends, and carry that type's fields and no others.`;
2566
2566
  var messageHandler = (session, connection, send) => {
2567
2567
  const act = (text) => {
2568
2568
  const message = messageOf2(text);
@@ -2570,6 +2570,10 @@ var messageHandler = (session, connection, send) => {
2570
2570
  send({ type: "error", code: "invalid_message", message: INVALID_MESSAGE });
2571
2571
  return;
2572
2572
  }
2573
+ if (message.type === "ping") {
2574
+ send({ type: "pong" });
2575
+ return;
2576
+ }
2573
2577
  if (session === void 0) {
2574
2578
  send({ type: "error", code: "no_shell", message: "This app serves no shell.", ...message.type === "event" ? { canvas: message.canvas } : {} });
2575
2579
  return;
@@ -2663,9 +2667,12 @@ var AT_CAPACITY = { type: "error", code: "at_capacity", message: "This server is
2663
2667
  var served = async (config, connection, send, close, opening, who) => {
2664
2668
  const { ids, hash } = await config.catalog(who.principal);
2665
2669
  if (close.ended()) return void 0;
2666
- send({ type: "hello", protocol: chunk3RIWTXGI_cjs.PROTOCOL, principal: who.principal, catalog: { actions: ids, hash } });
2670
+ send({ type: "hello", protocol: chunkNCQBGK3E_cjs.PROTOCOL, principal: who.principal, catalog: { actions: ids, hash } });
2667
2671
  const session = await opening.session?.(who.token, who.principal);
2668
- if (session === void 0) return void 0;
2672
+ if (session === void 0) {
2673
+ if (!close.ended()) send({ type: "frame", tree: [] });
2674
+ return void 0;
2675
+ }
2669
2676
  if (!close.ended()) session.attach(connection, { delta: opening.delta });
2670
2677
  close.whenClosed(() => session.detach(connection));
2671
2678
  return session;
@@ -2676,14 +2683,14 @@ var open = async (held, url, connection, send, span, found) => {
2676
2683
  const mismatch = protocolRefusal(params);
2677
2684
  if (mismatch !== void 0) {
2678
2685
  send(mismatch);
2679
- connection.close(chunk3RIWTXGI_cjs.CLOSE_PROTOCOL_MISMATCH, "protocol mismatch");
2686
+ connection.close(chunkNCQBGK3E_cjs.CLOSE_PROTOCOL_MISMATCH, "protocol mismatch");
2680
2687
  return;
2681
2688
  }
2682
2689
  const asking = await authenticateUpgrade(url, connection.upgrade, config, foreignPageWarning);
2683
2690
  if (asking === "invalid_token") {
2684
2691
  span?.("socket.upgrade", "refused", false);
2685
2692
  send({ type: "error", code: "invalid_token", message: "The session token did not resolve to a principal." });
2686
- connection.close(chunk3RIWTXGI_cjs.CLOSE_INVALID_TOKEN, "invalid token");
2693
+ connection.close(chunkNCQBGK3E_cjs.CLOSE_INVALID_TOKEN, "invalid token");
2687
2694
  return;
2688
2695
  }
2689
2696
  const { token, principal, seal } = asking;
@@ -2697,7 +2704,7 @@ var open = async (held, url, connection, send, span, found) => {
2697
2704
  if (principal === null && session !== void 0 && !anonymousShells.acquire(connection)) {
2698
2705
  span?.("socket.upgrade", "refused", false);
2699
2706
  send(AT_CAPACITY);
2700
- connection.close(chunk3RIWTXGI_cjs.CLOSE_AT_CAPACITY, "at capacity");
2707
+ connection.close(chunkNCQBGK3E_cjs.CLOSE_AT_CAPACITY, "at capacity");
2701
2708
  return;
2702
2709
  }
2703
2710
  revalidation.hold(connection, token !== null && token !== "" && principal !== null ? { token, principal } : null);
@@ -2727,7 +2734,7 @@ var createSocket = (config) => {
2727
2734
  anonymousShells.release(connection);
2728
2735
  try {
2729
2736
  send(refusalOf2(error));
2730
- connection.close(chunk3RIWTXGI_cjs.CLOSE_SHELL_FAILED, "session failed");
2737
+ connection.close(chunkNCQBGK3E_cjs.CLOSE_SHELL_FAILED, "session failed");
2731
2738
  } catch {
2732
2739
  }
2733
2740
  }
@@ -2758,13 +2765,13 @@ var seamsFor = (feature, owned, { app, runtime, server, operator, registered, id
2758
2765
  grantedActionIds: (roles, installed) => running.catalogFor(roles, installed).ids,
2759
2766
  actions: running.actions,
2760
2767
  replaceActions: owned.replace,
2761
- refusalOf: (actions) => chunkE6YAYR7G_cjs.refusalOf(running.verify(actions), "refresh"),
2768
+ refusalOf: (actions) => chunk6ZWMC2OV_cjs.refusalOf(running.verify(actions), "refresh"),
2762
2769
  setActionsLoader: owned.setLoader,
2763
2770
  addCatalogFilter: running.addCatalogFilter,
2764
2771
  charter: app.charter,
2765
2772
  components: app.shell?.components ?? {},
2766
- layoutMisfits: (layout) => chunkE6YAYR7G_cjs.layoutMisfits(layout, kitOf(app)),
2767
- endlessChains: chunkE6YAYR7G_cjs.endlessChains,
2773
+ layoutMisfits: (layout) => chunk6ZWMC2OV_cjs.layoutMisfits(layout, kitOf(app)),
2774
+ endlessChains: chunk6ZWMC2OV_cjs.endlessChains,
2768
2775
  ownEntries: (entries) => data.ownEntries(feature.name, entries),
2769
2776
  grammars: data.grammars,
2770
2777
  upgradeStore: (store) => data.upgradeStore(feature.name, store),
@@ -2831,9 +2838,9 @@ var read = (live) => {
2831
2838
  console.error("[moss/shells] the shell frame failed to render for a snapshot \u2014 serving an empty arrangement:", error);
2832
2839
  }
2833
2840
  const trees = {};
2834
- for (const canvasId of chunkE6YAYR7G_cjs.canvasesOf(live)) {
2841
+ for (const canvasId of chunk6ZWMC2OV_cjs.canvasesOf(live)) {
2835
2842
  try {
2836
- trees[canvasId] = chunkE6YAYR7G_cjs.treeOf(live, canvasId);
2843
+ trees[canvasId] = chunk6ZWMC2OV_cjs.treeOf(live, canvasId);
2837
2844
  } catch (error) {
2838
2845
  console.error(`[moss/shells] canvas "${canvasId}" failed to render for a snapshot \u2014 leaving it out:`, error);
2839
2846
  }
@@ -2850,7 +2857,7 @@ var needOf = (live, principal, kept) => {
2850
2857
  for (const instance of canvas.stack) {
2851
2858
  const definition = live.shell.getRuntime(instance.id)?.definition;
2852
2859
  if (definition === void 0) continue;
2853
- const need = shellNeedOf(chunkE6YAYR7G_cjs.withLayoutInPlace(definition, live.shell.layoutStore), entries);
2860
+ const need = shellNeedOf(chunk6ZWMC2OV_cjs.withLayoutInPlace(definition, live.shell.layoutStore), entries);
2854
2861
  for (const reason of need.why) why.push(`${definition.id}: ${reason}`);
2855
2862
  for (const read2 of need.drawnWith) drawnWith.push(read2);
2856
2863
  }
@@ -2873,7 +2880,7 @@ var sweep = (host, idleMs) => {
2873
2880
  }
2874
2881
  if (live.connections.size > 0 || live.idleSince === null) continue;
2875
2882
  if (now - live.idleSince < idleMs) continue;
2876
- chunkE6YAYR7G_cjs.endShell(host, live);
2883
+ chunk6ZWMC2OV_cjs.endShell(host, live);
2877
2884
  live.shell.dispose();
2878
2885
  durable.delete(principal);
2879
2886
  }
@@ -2895,7 +2902,7 @@ var rosterOf = (durable) => {
2895
2902
  var sameDocument = (one, other) => one === other || JSON.stringify(one) === JSON.stringify(other);
2896
2903
  var takeLayouts = (live, made) => {
2897
2904
  const taken = live.layouts;
2898
- const answered = chunkE6YAYR7G_cjs.layoutsOf(made);
2905
+ const answered = chunk6ZWMC2OV_cjs.layoutsOf(made);
2899
2906
  for (const [ref, layout] of Object.entries(answered.layoutStore)) {
2900
2907
  if (!sameDocument(taken.layoutStore[ref], layout)) live.shell.setLayout(ref, layout);
2901
2908
  }
@@ -2925,15 +2932,15 @@ var takeComposition = (live, made) => {
2925
2932
  live.entries = made.entries;
2926
2933
  takeLayouts(live, made);
2927
2934
  takeCanvases(live, made);
2928
- chunkE6YAYR7G_cjs.holdGranted(live.functions, made.grantedFunctions);
2935
+ chunk6ZWMC2OV_cjs.holdGranted(live.functions, made.grantedFunctions);
2929
2936
  };
2930
2937
  var adoptDraft = async (host, live, next) => {
2931
2938
  for (; ; ) {
2932
2939
  const cell = host.living.get(live);
2933
- if (cell === void 0 || cell.live !== live) throw new Error(chunkE6YAYR7G_cjs.SHELL_GONE);
2940
+ if (cell === void 0 || cell.live !== live) throw new Error(chunk6ZWMC2OV_cjs.SHELL_GONE);
2934
2941
  const changes = host.changes;
2935
- const made = await host.config.composition(cell.principal, chunkE6YAYR7G_cjs.draftedIn(next));
2936
- if (live.ended || cell.live !== live) throw new Error(chunkE6YAYR7G_cjs.SHELL_GONE);
2942
+ const made = await host.config.composition(cell.principal, chunk6ZWMC2OV_cjs.draftedIn(next));
2943
+ if (live.ended || cell.live !== live) throw new Error(chunk6ZWMC2OV_cjs.SHELL_GONE);
2937
2944
  if (changes < cell.changes) continue;
2938
2945
  cell.changes = changes;
2939
2946
  live.draft = next;
@@ -2947,7 +2954,7 @@ var adopt = (host, cell) => {
2947
2954
  if (asked.ended) return;
2948
2955
  const drafted = asked.draft;
2949
2956
  const changes = host.changes;
2950
- const made = await host.config.composition(cell.principal, chunkE6YAYR7G_cjs.draftedIn(drafted));
2957
+ const made = await host.config.composition(cell.principal, chunk6ZWMC2OV_cjs.draftedIn(drafted));
2951
2958
  if (asked.ended || changes <= cell.changes) return;
2952
2959
  if (asked.draft !== drafted) {
2953
2960
  adopt(host, cell);
@@ -2978,7 +2985,7 @@ var build = (host, asked, wanted = () => true) => {
2978
2985
  reject(new Error(`moss: the shell of ${asked.principal ?? "nobody"} was not built within ${limit}ms.`));
2979
2986
  }, limit);
2980
2987
  timer.unref?.();
2981
- chunkE6YAYR7G_cjs.buildShell(host, { ...asked, wanted: () => inTime && wanted() }).then((live) => resolve2(live === void 0 ? void 0 : { live, changes }), reject).finally(() => clearTimeout(timer));
2988
+ chunk6ZWMC2OV_cjs.buildShell(host, { ...asked, wanted: () => inTime && wanted() }).then((live) => resolve2(live === void 0 ? void 0 : { live, changes }), reject).finally(() => clearTimeout(timer));
2982
2989
  });
2983
2990
  };
2984
2991
  var builtOrThrow = (built) => {
@@ -3018,18 +3025,18 @@ var replaceShell = async (host, cell) => {
3018
3025
  if (built === void 0) return;
3019
3026
  const old = cell.live;
3020
3027
  if (!stands()) {
3021
- chunkE6YAYR7G_cjs.endShell(host, built.live);
3028
+ chunk6ZWMC2OV_cjs.endShell(host, built.live);
3022
3029
  built.live.shell.dispose();
3023
3030
  return;
3024
3031
  }
3025
3032
  const carried = [...old.connections].map((connection) => ({ connection, wants: old.deltaReady.has(connection) }));
3026
- chunkE6YAYR7G_cjs.endShell(host, old);
3033
+ chunk6ZWMC2OV_cjs.endShell(host, old);
3027
3034
  old.connections.clear();
3028
3035
  old.shell.dispose();
3029
3036
  cell.live = built.live;
3030
3037
  cell.changes = built.changes;
3031
3038
  registerLiving(host, cell);
3032
- for (const { connection, wants } of carried) chunkE6YAYR7G_cjs.attach(built.live, connection, host.delta && wants);
3039
+ for (const { connection, wants } of carried) chunk6ZWMC2OV_cjs.attach(built.live, connection, host.delta && wants);
3033
3040
  };
3034
3041
  var resetCell = (host, cell) => {
3035
3042
  if (cell.hasWaitingReset === true) return;
@@ -3072,7 +3079,7 @@ var snapshotOf = (host) => async (token, principal, options) => {
3072
3079
  const settled = await settle(live, waitMs);
3073
3080
  return { ...read(live), seed, settled, ...needOf(live, principal, kept) };
3074
3081
  } finally {
3075
- chunkE6YAYR7G_cjs.endShell(host, live);
3082
+ chunk6ZWMC2OV_cjs.endShell(host, live);
3076
3083
  live.shell.dispose();
3077
3084
  }
3078
3085
  };
@@ -3104,9 +3111,9 @@ var createShellHost = (config) => {
3104
3111
  const handedOut = {
3105
3112
  session: async (token, principal, options) => {
3106
3113
  if (principal === null || !host.kept) {
3107
- return chunkE6YAYR7G_cjs.sessionOn(host, await open2(host, { token, principal, ...options !== void 0 ? { opening: options } : {} }, false), true, reset);
3114
+ return chunk6ZWMC2OV_cjs.sessionOn(host, await open2(host, { token, principal, ...options !== void 0 ? { opening: options } : {} }, false), true, reset);
3108
3115
  }
3109
- return chunkE6YAYR7G_cjs.sessionOn(host, await keptCell(host, token, principal), false, reset);
3116
+ return chunk6ZWMC2OV_cjs.sessionOn(host, await keptCell(host, token, principal), false, reset);
3110
3117
  },
3111
3118
  snapshot: snapshotOf(host),
3112
3119
  deliver: deliverTo(host),
@@ -3407,7 +3414,7 @@ var wireFabric = (fabric, origin, apply) => {
3407
3414
 
3408
3415
  // src/server/server.ts
3409
3416
  var createServerWith = async (app, runtime, dataOf) => {
3410
- chunkE6YAYR7G_cjs.receiveManifest(app);
3417
+ chunk6ZWMC2OV_cjs.receiveManifest(app);
3411
3418
  const session = sessionVerifierOf(runtime);
3412
3419
  const revokeSessions = sessionRevokerOf(runtime);
3413
3420
  const data = await dataOf(app, runtime);
@@ -3594,5 +3601,5 @@ exports.renderDocument = renderDocument;
3594
3601
  exports.revokeAllFor = revokeAllFor;
3595
3602
  exports.sessionCookies = sessionCookies;
3596
3603
  exports.tableStatus = tableStatus;
3597
- //# sourceMappingURL=chunk-L2GHVTJW.cjs.map
3598
- //# sourceMappingURL=chunk-L2GHVTJW.cjs.map
3604
+ //# sourceMappingURL=chunk-KVXP6OTW.cjs.map
3605
+ //# sourceMappingURL=chunk-KVXP6OTW.cjs.map