@volter/world-core 3.0.161 → 3.0.163

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.
@@ -22,6 +22,10 @@ export function keyId(publicPem, prefix = 'ins_') {
22
22
  /** A JWT: `iat` and `nbf` are `now` (seconds, the World's), `exp` `now` plus the lifetime (60 s when none is given),
23
23
  * unless the claims name their own. A token of a key pair carries the key's `kid`. */
24
24
  export function jwtSign(claims, key, opts) {
25
+ return jwtSignClaims({ iat: opts.now, exp: opts.now + (opts.expiresInSeconds ?? 60), nbf: opts.now, ...claims }, key, opts);
26
+ }
27
+ /** A JWT over exactly the supplied claims, without adding temporal claims. The caller owns their policy. */
28
+ export function jwtSignClaims(claims, key, opts = {}) {
25
29
  // a key of another kind than its algorithm's is refused by name (an RSA key under EdDSA would fail inside the signer)
26
30
  if ('privatePem' in key) {
27
31
  const kind = nodeCrypto.createPrivateKey(key.privatePem).asymmetricKeyType;
@@ -32,8 +36,7 @@ export function jwtSign(claims, key, opts) {
32
36
  const header = 'privatePem' in key
33
37
  ? { alg: key.alg, typ: opts.typ ?? 'JWT', kid: keyId(key.publicPem ?? nodeCrypto.createPublicKey(key.privatePem).export({ type: 'spki', format: 'pem' }).toString(), opts.kidPrefix) }
34
38
  : { alg: key.alg, typ: opts.typ ?? 'JWT' };
35
- const payload = { iat: opts.now, exp: opts.now + (opts.expiresInSeconds ?? 60), nbf: opts.now, ...claims };
36
- const input = `${jsonPart(header)}.${jsonPart(payload)}`;
39
+ const input = `${jsonPart(header)}.${jsonPart(claims)}`;
37
40
  if ('secret' in key)
38
41
  return `${input}.${base64url(nodeCrypto.createHmac(digestOf(key.alg), key.secret).update(input).digest())}`;
39
42
  if (key.alg === 'EdDSA')
@@ -43,12 +46,16 @@ export function jwtSign(claims, key, opts) {
43
46
  signer.end();
44
47
  return `${input}.${base64url(signer.sign(key.privatePem))}`;
45
48
  }
46
- /** A JWT's header and payload, unverified. */
47
- export function jwtDecode(token) {
49
+ /** A JWT's header and payload, unverified. Strict compact framing and ordinary JSON numbers are explicit
50
+ * protocol policies; existing kernel callers retain permissive decoding and exact integer values. */
51
+ export function jwtDecode(token, opts = {}) {
52
+ if (opts.strict && typeof token !== 'string')
53
+ throw new Error('malformed jwt');
48
54
  const parts = token.split('.');
49
- if (parts.length !== 3)
55
+ if (parts.length !== 3 || opts.strict && parts.some(part => !/^[A-Za-z0-9_-]+$/.test(part)))
50
56
  throw new Error('malformed jwt');
51
- const part = (s) => parseExactJson(fromBase64url(s).toString('utf8'));
57
+ const parse = opts.integers === 'number' ? JSON.parse : parseExactJson;
58
+ const part = (s) => parse(fromBase64url(s).toString('utf8'));
52
59
  return { header: part(parts[0]), payload: part(parts[1]) };
53
60
  }
54
61
  function timely(payload, now) {
@@ -61,27 +68,36 @@ function timely(payload, now) {
61
68
  /** A token checked: an RS256 or EdDSA one against a JWKS (its `kid`'s key), an HS256 one against its secret (constant time),
62
69
  * then its `exp`/`nbf` at `now` (seconds). */
63
70
  export function jwtVerify(token, key, opts) {
71
+ const verdict = jwtVerifySignature(token, key);
72
+ return verdict.valid ? timely(verdict.payload, opts.now) : verdict;
73
+ }
74
+ /** A token's signature checked without an `exp`/`nbf` policy. An issuer selector sees unverified claims and may
75
+ * enforce its vendor's claim shape and key ownership before returning a key. HMAC signatures use canonical
76
+ * text by default; a protocol that compares decoded bytes selects that existing wire policy explicitly. */
77
+ export function jwtVerifySignature(token, key, opts = {}) {
64
78
  let decoded;
65
79
  try {
66
- decoded = jwtDecode(token);
80
+ decoded = jwtDecode(token, opts);
67
81
  }
68
82
  catch {
69
83
  return { valid: false, reason: 'malformed' };
70
84
  }
85
+ const selected = typeof key === 'function' ? key(decoded) : key;
71
86
  const [h, p, s] = token.split('.');
72
- if ('secret' in key) {
73
- if (decoded.header.alg !== key.alg)
87
+ if ('secret' in selected) {
88
+ if (decoded.header.alg !== selected.alg)
74
89
  return { valid: false, reason: 'unexpected_alg' };
75
- const expected = Buffer.from(base64url(nodeCrypto.createHmac(digestOf(key.alg), key.secret).update(`${h}.${p}`).digest()), 'utf8');
76
- const given = Buffer.from(s, 'utf8');
90
+ const bytes = nodeCrypto.createHmac(digestOf(selected.alg), selected.secret).update(`${h}.${p}`).digest();
91
+ const expected = opts.hmacSignature === 'bytes' ? bytes : Buffer.from(base64url(bytes), 'utf8');
92
+ const given = opts.hmacSignature === 'bytes' ? fromBase64url(s) : Buffer.from(s, 'utf8');
77
93
  if (given.length !== expected.length || !nodeCrypto.timingSafeEqual(given, expected))
78
94
  return { valid: false, reason: 'bad_signature' };
79
- return timely(decoded.payload, opts.now);
95
+ return { valid: true, payload: decoded.payload };
80
96
  }
81
97
  if (!['RS256', 'RS384', 'RS512', 'EdDSA'].includes(String(decoded.header.alg)))
82
98
  return { valid: false, reason: 'unexpected_alg' };
83
99
  // a token naming a key the set does not hold matches none; one naming no key is tried against the set's only key
84
- const jwk = decoded.header.kid !== undefined ? key.keys.find((k) => k.kid === decoded.header.kid) : key.keys.length === 1 ? key.keys[0] : undefined;
100
+ const jwk = decoded.header.kid !== undefined ? selected.keys.find((k) => k.kid === decoded.header.kid) : selected.keys.length === 1 ? selected.keys[0] : undefined;
85
101
  if (!jwk)
86
102
  return { valid: false, reason: 'no_matching_key' };
87
103
  if ((jwk.kty === 'OKP') !== (decoded.header.alg === 'EdDSA'))
@@ -90,7 +106,7 @@ export function jwtVerify(token, key, opts) {
90
106
  const edKey = nodeCrypto.createPublicKey({ key: { kty: 'OKP', crv: 'Ed25519', x: jwk.x }, format: 'jwk' });
91
107
  if (!nodeCrypto.verify(null, Buffer.from(`${h}.${p}`), edKey, fromBase64url(s)))
92
108
  return { valid: false, reason: 'bad_signature' };
93
- return timely(decoded.payload, opts.now);
109
+ return { valid: true, payload: decoded.payload };
94
110
  }
95
111
  const verifier = nodeCrypto.createVerify(`RSA-SHA${String(decoded.header.alg).slice(2)}`);
96
112
  verifier.update(`${h}.${p}`);
@@ -98,7 +114,7 @@ export function jwtVerify(token, key, opts) {
98
114
  const publicKey = nodeCrypto.createPublicKey({ key: { kty: 'RSA', n: jwk.n, e: jwk.e }, format: 'jwk' });
99
115
  if (!verifier.verify(publicKey, fromBase64url(s)))
100
116
  return { valid: false, reason: 'bad_signature' };
101
- return timely(decoded.payload, opts.now);
117
+ return { valid: true, payload: decoded.payload };
102
118
  }
103
119
  /** The JWKS that verifies every token a public key's pair signs. */
104
120
  export function jwks(publicPem, kidPrefix) {
@@ -256,7 +272,7 @@ export function certificateOf(cert) {
256
272
  }
257
273
  }
258
274
  /** What a handler signs and hashes with: `ctx.crypto`. */
259
- export const handlerCrypto = { jwtSign, jwtVerify, jwtDecode, jwks, keyId, hmac, sha256, md5, digest, uuidFrom, lettersFrom, base62From, equalSecrets, sealedBoxKeyPair, sealedBoxOpen, signWith, verifyWith, publicKeyOf, certificateOf };
275
+ export const handlerCrypto = { jwtSign, jwtSignClaims, jwtVerify, jwtVerifySignature, jwtDecode, jwks, keyId, hmac, sha256, md5, digest, uuidFrom, lettersFrom, base62From, equalSecrets, sealedBoxKeyPair, sealedBoxOpen, signWith, verifyWith, publicKeyOf, certificateOf };
260
276
  /** A [KSUID](https://github.com/segmentio/ksuid) as 27 base62 characters (0-9A-Za-z, most significant first): `seconds`
261
277
  * past KSUID's epoch (1400000000) in four bytes, then `n` in four, then twelve bytes derived from `seed`, so KSUIDs
262
278
  * made in one second sort by `n`, at `width` characters (27 unless a vendor's id is longer or shorter). Deterministic:
@@ -51,4 +51,4 @@ export declare function expireSocketWaits(service: string, root: string | undefi
51
51
  * awaited: the write may be one a session's own frame made, which that session finishes before it is told. */
52
52
  export declare function socketWrite(service: string, root: string | undefined, write: EventWrite): void;
53
53
  /** The upgrade the serve seam takes: a request to a declared socket's path (and host) opens a session of its engine. */
54
- export declare function socketUpgrade<C>(service: string, root: string | undefined, decls: ReadonlyArray<SocketDecl>, engines: Record<string, SocketEngine<C>>, context: (request: Request, decl: SocketDecl, params: Record<string, string>) => Promise<C>, hostOf: (request: Request) => string, pathOf?: (request: Request) => string, decide?: (asked: unknown) => Promise<ScenarioServed | undefined>): WebSocketUpgrade;
54
+ export declare function socketUpgrade<C>(service: string, root: string | undefined, decls: ReadonlyArray<SocketDecl>, engines: Record<string, SocketEngine<C>>, context: (request: Request, decl: SocketDecl, params: Record<string, string>) => Promise<C>, hostOf: (request: Request) => string, pathOf: (request: Request) => string, decide: (asked: unknown) => Promise<ScenarioServed | undefined>): WebSocketUpgrade;
@@ -1,3 +1,4 @@
1
+ import { runWithStorageTenant, storageTenant } from "./request-scope.js";
1
2
  // A vendor's persistent wire (architecture, "Other wires: sockets"): a WebSocket its clients hold open, on which the
2
3
  // vendor sends what happens as it happens (Discord's Gateway: a bot identifies, is told the guilds it is in, and is sent
3
4
  // each message, member and interaction as it lands). The manifest declares the socket (`sockets`); the pack's engine
@@ -14,7 +15,7 @@ const nextSession = new Map();
14
15
  const keyOf = (service, root) => `${service}\0${root ?? ''}`;
15
16
  /** The open sessions of one socket of the vendor in a World (a handler reaches them as `ctx.sockets(id)`). */
16
17
  export function openSessions(service, root, socket) {
17
- return [...(sessions.get(keyOf(service, root)) ?? [])].filter((o) => o.session.socket === socket).map((o) => o.session);
18
+ return [...(sessions.get(keyOf(service, root)) ?? [])].filter((o) => o.session.socket === socket && o.tenant === storageTenant(service)).map((o) => o.session);
18
19
  }
19
20
  /** What a session awaits that the World's clock has run out (a life's `wait` past a relay's timeout), rejected as the
20
21
  * machine's clock would reject it; called as the vendor serves a request ("A request answered by a session"). */
@@ -39,9 +40,11 @@ export function socketWrite(service, root, write) {
39
40
  return;
40
41
  for (const o of open) {
41
42
  const { engine } = o;
43
+ if (o.tenant !== storageTenant(service))
44
+ continue;
42
45
  if (!engine.write)
43
46
  continue;
44
- o.queue = o.queue.then(async () => engine.write(o.session, write, await o.context())).catch((error) => o.session.close(1011, String(error.message ?? error).slice(0, 120)));
47
+ o.queue = o.queue.then(() => o.run(async () => engine.write(o.session, write, await o.context()))).catch((error) => o.session.close(1011, String(error.message ?? error).slice(0, 120)));
45
48
  }
46
49
  }
47
50
  /** A declared socket path's parameters for a request's path, or undefined when it does not match: a `{name}` segment
@@ -66,7 +69,7 @@ function socketParams(declared, path) {
66
69
  }
67
70
  }
68
71
  /** The upgrade the serve seam takes: a request to a declared socket's path (and host) opens a session of its engine. */
69
- export function socketUpgrade(service, root, decls, engines, context, hostOf, pathOf = (request) => new URL(request.url).pathname, decide = async () => undefined) {
72
+ export function socketUpgrade(service, root, decls, engines, context, hostOf, pathOf, decide) {
70
73
  const matchFor = (request) => {
71
74
  const path = pathOf(request).replace(/\/+$/, '') || '/';
72
75
  for (const d of decls) {
@@ -113,18 +116,19 @@ export function socketUpgrade(service, root, decls, engines, context, hostOf, pa
113
116
  },
114
117
  decide,
115
118
  };
116
- const o = { session, engine, context: () => context(request.clone(), decl, params), queue: Promise.resolve(), pending };
119
+ const tenant = storageTenant(service), run = (fn) => runWithStorageTenant(service, tenant, fn);
120
+ const o = { tenant, run, session, engine, context: () => context(request.clone(), decl, params), queue: Promise.resolve(), pending };
117
121
  byPeer.set(peer, o);
118
122
  (sessions.get(key) ?? sessions.set(key, new Set()).get(key)).add(o);
119
123
  if (engine.open)
120
- o.queue = o.queue.then(async () => engine.open(session, await o.context())).catch((error) => session.close(1011, String(error.message ?? error).slice(0, 120)));
124
+ o.queue = o.queue.then(() => o.run(async () => engine.open(session, await o.context()))).catch((error) => session.close(1011, String(error.message ?? error).slice(0, 120)));
121
125
  },
122
126
  message: (peer, data) => {
123
127
  const o = byPeer.get(peer);
124
128
  if (!o)
125
129
  return;
126
130
  const text = typeof data === 'string' ? data : new TextDecoder().decode(data);
127
- o.queue = o.queue.then(async () => o.engine.message(o.session, text, await o.context())).catch((error) => o.session.close(1011, String(error.message ?? error).slice(0, 120)));
131
+ o.queue = o.queue.then(() => o.run(async () => o.engine.message(o.session, text, await o.context()))).catch((error) => o.session.close(1011, String(error.message ?? error).slice(0, 120)));
128
132
  },
129
133
  close: (peer) => {
130
134
  const o = byPeer.get(peer);
@@ -140,7 +144,7 @@ export function socketUpgrade(service, root, decls, engines, context, hostOf, pa
140
144
  // the end is written after what the session is still doing, over its own context
141
145
  // the session is gone, so a failure has no frame to go in: it is reported, never swallowed
142
146
  if (o.engine.close)
143
- o.queue = o.queue.then(async () => o.engine.close(o.session, await o.context())).catch((error) => {
147
+ o.queue = o.queue.then(() => o.run(async () => o.engine.close(o.session, await o.context()))).catch((error) => {
144
148
  console.error(`${service}: the ${o.session.socket} socket's end was not written: ${String(error?.message ?? error)}`);
145
149
  });
146
150
  },
@@ -0,0 +1,2 @@
1
+ /** The retained World-account name grammar, shared by registration and read-only authority selection. */
2
+ export declare function isWorldAccountName(value: unknown): value is string;
@@ -0,0 +1,4 @@
1
+ /** The retained World-account name grammar, shared by registration and read-only authority selection. */
2
+ export function isWorldAccountName(value) {
3
+ return typeof value === 'string' && /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(value);
4
+ }
@@ -25,6 +25,9 @@
25
25
  "resources": [],
26
26
  "endpointEnvNone": "@ai-sdk/gateway calls https://ai-gateway.vercel.sh/v4/ai and an OpenAI client is given https://ai-gateway.vercel.sh/v1 in code; the World claims the host",
27
27
  "credentialDoor": {
28
+ "account": {
29
+ "field": "account"
30
+ },
28
31
  "path": "/_twin/app-credentials",
29
32
  "body": {},
30
33
  "fill": {
@@ -110,6 +113,9 @@
110
113
  "note": "the SDKs' base URL (the TypeScript and Python SDKs and Claude Code read ANTHROPIC_BASE_URL)"
111
114
  },
112
115
  "credentialDoor": {
116
+ "account": {
117
+ "field": "account"
118
+ },
113
119
  "path": "/_twin/app-credentials",
114
120
  "body": {},
115
121
  "fill": {
@@ -174,6 +180,9 @@
174
180
  "note": "The AWS SDKs read AWS_ENDPOINT_URL as every service's endpoint (https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html)."
175
181
  },
176
182
  "credentialDoor": {
183
+ "account": {
184
+ "field": "account"
185
+ },
177
186
  "path": "/_twin/app-credentials",
178
187
  "body": {},
179
188
  "fill": {
@@ -360,6 +369,9 @@
360
369
  "credentialDoor": {
361
370
  "path": "/_twin/app-credentials",
362
371
  "body": {},
372
+ "account": {
373
+ "field": "account"
374
+ },
363
375
  "fill": {
364
376
  "CLERK_SECRET_KEY": "secret_key",
365
377
  "CLERK_API_KEY": "secret_key",
@@ -782,6 +794,9 @@
782
794
  "note": "Python e2b 2.45.0 and the JS SDK read E2B_API_URL; the JS SDK reads E2B_SANDBOX_URL and sends sandbox id/port headers; vendor hosts route through the World proxy"
783
795
  },
784
796
  "credentialDoor": {
797
+ "account": {
798
+ "field": "account"
799
+ },
785
800
  "path": "/_twin/teams",
786
801
  "body": {
787
802
  "name": "World team"
@@ -1003,6 +1018,9 @@
1003
1018
  "note": "Google GenAI SDK reads this base URL; other callers retain the routed vendor host."
1004
1019
  },
1005
1020
  "credentialDoor": {
1021
+ "account": {
1022
+ "field": "account"
1023
+ },
1006
1024
  "path": "/_twin/app-credentials",
1007
1025
  "body": {},
1008
1026
  "fill": {
@@ -1079,6 +1097,9 @@
1079
1097
  "app"
1080
1098
  ],
1081
1099
  "credentialDoor": {
1100
+ "account": {
1101
+ "field": "account"
1102
+ },
1082
1103
  "path": "/_twin/app-credentials",
1083
1104
  "body": {},
1084
1105
  "fill": {
@@ -1213,6 +1234,9 @@
1213
1234
  ],
1214
1235
  "endpointEnvNone": "Google's OAuth libraries read no base-URL variable: the endpoints are the discovery document's, claimed by the host rules.",
1215
1236
  "credentialDoor": {
1237
+ "account": {
1238
+ "field": "world_account"
1239
+ },
1216
1240
  "path": "/_twin/credentials",
1217
1241
  "body": {
1218
1242
  "client_email": "world@world-project.iam.gserviceaccount.com",
@@ -1657,11 +1681,20 @@
1657
1681
  "endpointEnv": {
1658
1682
  "name": "LIVEKIT_URL",
1659
1683
  "templates": {
1660
- "LIVEKIT_URL": "ws://${host}:${port}",
1661
- "LIVEKIT_API_KEY": "twin-livekit-key",
1662
- "LIVEKIT_API_SECRET": "twin-livekit-secret-for-the-worlds-own-server"
1684
+ "LIVEKIT_URL": "ws://${host}:${port}"
1663
1685
  },
1664
- "note": "Credentials and URL are the same ones the World starts its LiveKit server with."
1686
+ "note": "The native server uses a private key; its twin front accepts only keys issued for retained World accounts."
1687
+ },
1688
+ "credentialDoor": {
1689
+ "path": "/_twin/app-credentials",
1690
+ "body": {},
1691
+ "account": {
1692
+ "field": "account"
1693
+ },
1694
+ "fill": {
1695
+ "LIVEKIT_API_KEY": "api_key",
1696
+ "LIVEKIT_API_SECRET": "api_secret"
1697
+ }
1665
1698
  },
1666
1699
  "sidePorts": [
1667
1700
  {
@@ -1696,6 +1729,9 @@
1696
1729
  "resources": [],
1697
1730
  "endpointEnvNone": "Open Autonomy reads MODEL_GATEWAY_URL and defaults to api-gateway.merge.dev; the World claims the host",
1698
1731
  "credentialDoor": {
1732
+ "account": {
1733
+ "field": "account"
1734
+ },
1699
1735
  "path": "/_twin/organizations",
1700
1736
  "body": {},
1701
1737
  "fill": {
@@ -1734,6 +1770,9 @@
1734
1770
  "resources": [],
1735
1771
  "endpointEnvNone": "the SDKs call https://api.mistral.ai/v1 unless given a base URL in code or config; the World claims the host",
1736
1772
  "credentialDoor": {
1773
+ "account": {
1774
+ "field": "account"
1775
+ },
1737
1776
  "path": "/_twin/app-credentials",
1738
1777
  "body": {},
1739
1778
  "fill": {
@@ -1808,6 +1847,9 @@
1808
1847
  "note": "npm and bun read the registry from npm_config_registry (and .npmrc's `registry`)."
1809
1848
  },
1810
1849
  "credentialDoor": {
1850
+ "account": {
1851
+ "field": "account"
1852
+ },
1811
1853
  "path": "/_twin/app-credentials",
1812
1854
  "body": {},
1813
1855
  "fill": {
@@ -1871,6 +1913,9 @@
1871
1913
  "api_key"
1872
1914
  ],
1873
1915
  "credentialDoor": {
1916
+ "account": {
1917
+ "field": "account"
1918
+ },
1874
1919
  "path": "/_twin/app-credentials",
1875
1920
  "body": {},
1876
1921
  "fill": {
@@ -1982,6 +2027,9 @@
1982
2027
  "note": "the twin's own URL; applications reach it at <region>.connect.psdb.cloud, which the injector redirects, with the password the credentialDoor issued."
1983
2028
  },
1984
2029
  "credentialDoor": {
2030
+ "account": {
2031
+ "field": "account"
2032
+ },
1985
2033
  "path": "/_twin/app-credentials",
1986
2034
  "body": {
1987
2035
  "organization": "world",
@@ -2306,6 +2354,9 @@
2306
2354
  "received"
2307
2355
  ],
2308
2356
  "credentialDoor": {
2357
+ "account": {
2358
+ "field": "account"
2359
+ },
2309
2360
  "path": "/_twin/app-credentials",
2310
2361
  "body": {},
2311
2362
  "fill": {
@@ -2377,6 +2428,9 @@
2377
2428
  ],
2378
2429
  "endpointEnvNone": "an SDK sends to its DSN's host and sentry-cli to SENTRY_URL (sentry.io by default); the DSN the World issues names the World's ingest host, claimed by the host rules",
2379
2430
  "credentialDoor": {
2431
+ "account": {
2432
+ "field": "account"
2433
+ },
2380
2434
  "path": "/_twin/app-credentials",
2381
2435
  "body": {},
2382
2436
  "fill": {
@@ -2485,6 +2539,9 @@
2485
2539
  "app"
2486
2540
  ],
2487
2541
  "credentialDoor": {
2542
+ "account": {
2543
+ "field": "account"
2544
+ },
2488
2545
  "path": "/_twin/app-credentials",
2489
2546
  "body": {},
2490
2547
  "fill": {
@@ -2602,6 +2659,9 @@
2602
2659
  "credentialDoor": {
2603
2660
  "path": "/_twin/app-credentials",
2604
2661
  "body": {},
2662
+ "account": {
2663
+ "field": "account"
2664
+ },
2605
2665
  "fill": {
2606
2666
  "STRIPE_SECRET_KEY": "secret_key",
2607
2667
  "STRIPE_API_KEY": "secret_key",
@@ -2675,7 +2735,11 @@
2675
2735
  "managedDatabase": {
2676
2736
  "kind": "postgres",
2677
2737
  "arg": "--database",
2678
- "note": "the project's database is the World's managed postgres: the database the application's migrations and queries use, whose URL the credential door answers"
2738
+ "user": "world",
2739
+ "database": "world",
2740
+ "clock": "wall",
2741
+ "credentialField": "database_url",
2742
+ "note": "the selected Supabase twin owns its private PostgreSQL data plane; the credential door answers its URL, application migrations own application tables, and SQL uses wall time"
2679
2743
  },
2680
2744
  "serveExport": "createSupabaseTwinServer"
2681
2745
  },
@@ -2886,6 +2950,9 @@
2886
2950
  ],
2887
2951
  "endpointEnvNone": "Tinybird's clients take the API host as configuration (@chronark/zod-bird's baseUrl, tinybird-cli's --host), defaulting to https://api.tinybird.co, which the World routes by host; no SDK reads a base-URL variable of its own",
2888
2952
  "credentialDoor": {
2953
+ "account": {
2954
+ "field": "account"
2955
+ },
2889
2956
  "path": "/_twin/app-credentials",
2890
2957
  "body": {},
2891
2958
  "fill": {
@@ -3205,6 +3272,9 @@
3205
3272
  "note": "Redis reads its REST URL; QStash and Workflow read QSTASH_URL. Direct SDK transports use the twin endpoint and issued token; other clients also use host routing."
3206
3273
  },
3207
3274
  "credentialDoor": {
3275
+ "account": {
3276
+ "field": "account"
3277
+ },
3208
3278
  "path": "/_twin/app-credentials",
3209
3279
  "body": {
3210
3280
  "owner": "owner@world.test"
@@ -3270,6 +3340,9 @@
3270
3340
  ],
3271
3341
  "endpointEnvNone": "the applications reach api.vercel.com and the Edge Config connection string's host, which the World routes to the twin",
3272
3342
  "credentialDoor": {
3343
+ "account": {
3344
+ "field": "account"
3345
+ },
3273
3346
  "path": "/_twin/app-credentials",
3274
3347
  "body": {
3275
3348
  "team": "world",
@@ -3508,6 +3581,9 @@
3508
3581
  "upload"
3509
3582
  ],
3510
3583
  "credentialDoor": {
3584
+ "account": {
3585
+ "field": "account"
3586
+ },
3511
3587
  "path": "/_twin/app-credentials",
3512
3588
  "body": {},
3513
3589
  "fill": {
@@ -3546,6 +3622,9 @@
3546
3622
  "resources": [],
3547
3623
  "endpointEnvNone": "the SDK calls https://api.x.ai/v1 unless given a base URL in code; the World claims the host",
3548
3624
  "credentialDoor": {
3625
+ "account": {
3626
+ "field": "account"
3627
+ },
3549
3628
  "path": "/_twin/app-credentials",
3550
3629
  "body": {},
3551
3630
  "fill": {
package/inject.cjs CHANGED
@@ -358,8 +358,8 @@ function strictEgressEnabled() {
358
358
  }
359
359
 
360
360
  // THE WORLD'S DECISION (docs/contributing/architecture.md, "Capability decisions"): every seam below asks
361
- // capability-decision.cjs and enforces its answer. This process is a host process, whose declaration is the open one; a
362
- // local light guest, whose HTTP leaves through its guest listener; or a process of an image run, which carries its
361
+ // capability-decision.cjs and enforces its answer. This process is a host process, whose declaration is the open one; or
362
+ // a process of an image run, which carries its
363
363
  // image's declaration (VOLTER_WORLD_DECLARATION) and is confined from the host's network. What the World grants is its
364
364
  // published policy. The seams supply what they observe: the twin route, the vendors sharing a host, the World's doors.
365
365
  function worldGrant() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/world-core",
3
- "version": "3.0.161",
3
+ "version": "3.0.163",
4
4
  "description": "The kernel of Volter World: one log per twin, branches as pointers, checkpoints, the fold that keeps a twin current, the head that performs a write against the vendor, references, and the git plane. A twin package builds on it; the runtime serves it.",
5
5
  "keywords": [
6
6
  "twin",