@somewhere-cloud/cli 0.38.133 → 0.38.135

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # Changelog
2
+
3
+ ## 0.38.135
4
+
5
+ - somewhere typecheck knows sw.mail and sw.mail.project in functions: list, get, attachment, search, send and addresses, with their result types.
6
+
7
+ ## 0.38.134
8
+
9
+ - somewhere typecheck checks db/schema.ts with the platform's current rules.
10
+ - The agent skills somewhere init writes match the platform's current pack.
11
+
1
12
  ## 0.38.133
2
13
 
3
14
  - `somewhere deploy` no longer checks types again when no file changed since the folder's last deploy; it says so and the platform reports that nothing changed. A no-change deploy no longer waits on a TypeScript download.
@@ -126,28 +137,26 @@
126
137
  - Emit a project_created JSON receipt before init installs dependencies.
127
138
  - Document the existing one-step email-code sign-in policy.
128
139
 
129
- # 0.38.107
140
+ ## 0.38.107
130
141
 
131
142
  - Bundle the TypeScript runtime dependency so a fresh production-only CLI install starts correctly, including deploy -m for version notes.
132
143
 
133
- # 0.38.106
144
+ ## 0.38.106
134
145
 
135
146
  - Add deploy -m for user-supplied version notes; promotion quotes its submitted note as data. History shows notes stored on each release.
136
147
 
137
- # 0.38.105
148
+ ## 0.38.105
138
149
 
139
150
  - Deploy and promote print the previous activation hint, naming somewhere rollback; JSON preserves its version and build availability.
140
151
 
141
- # 0.38.104
152
+ ## 0.38.104
142
153
 
143
154
  - Remove the app login, tools, call and logout commands. Existing app tokens are left untouched at <SOMEWHERE_CONFIG_DIR or ~/.somewhere>/app-mcp/tokens.json; use the app MCP server as a custom connector in your AI client.
144
155
 
145
- # 0.38.103
156
+ ## 0.38.103
146
157
 
147
158
  - Describe app MCP terminal commands as developer testing tools; register a neutral Terminal client name.
148
159
 
149
- # Changelog
150
-
151
160
  ## 0.38.102
152
161
 
153
162
  - `somewhere privacy` reads the active release privacy facts; deploy prints the same stored source facts when the platform supplies them.
@@ -38781,8 +38781,8 @@ var init_skills_pack_generated = __esm({
38781
38781
  BUNDLED_SKILLS_PACK = {
38782
38782
  "schema": 1,
38783
38783
  "name": "somewhere-skills",
38784
- "version": "1+8aec0eae1728",
38785
- "sha256": "8aec0eae1728bbe4d51fb8de104d1547e79c45a47800de7f4d9750d81f9e72c6",
38784
+ "version": "1+1f34c974ae28",
38785
+ "sha256": "1f34c974ae2841bffb28d8eccb98fcee84bf5f98e15de6aaf453a9a050c95e4b",
38786
38786
  "files": [
38787
38787
  {
38788
38788
  "path": "adopt/SKILL.md",
@@ -38816,8 +38816,8 @@ var init_skills_pack_generated = __esm({
38816
38816
  },
38817
38817
  {
38818
38818
  "path": "email-and-test-inbox/SKILL.md",
38819
- "sha256": "9406a949a35f929f6b90616d757670f81eb85333f13c7d5b83cf44aed2b8174a",
38820
- "content": "---\nname: email-and-test-inbox\ndescription: When the app sends email, or you need to test sign-up, magic-link, or reset mail without a real mailbox.\n---\n\n# Send email and read the test inbox\n\n## Notification after a save\n\nSave first, await durable job admission, then respond. Queued is not sent; the signed handler records the email outcome.\n\n## Send\n\n```ts\n// api/_lib/order-email.ts \u2014 call it from a handler that already checked who\n// receives this; the address comes from your saved order, never the request.\nexport function sendOrderShipped(\n sw: SomewhereRuntimeContext,\n order: { id: string; email: string; trackingNumber: string },\n): Promise<SomewhereEmailSendResult> {\n return sw.email.send({\n to: order.email,\n subject: 'Your order shipped',\n text: `Tracking: ${order.trackingNumber}`, // or html, or both\n idempotency_key: `order-shipped:${order.id}`,\n });\n}\n```\n\nIt can only email the project's owner and app users who have verified their email address with this project and signed in at least once; a pending sign-in or an unverified sign-up does not count. The platform adds a one-line unsubscribe footer and one-click unsubscribe headers; after a user unsubscribes, sends to them return `RECIPIENT_UNSUBSCRIBED`. Replies to the app's address are recorded in your project mailbox; read them with `sw.mail.project.list()`.\n\n## Test inbox\n\nAddresses `<anything>@<project-subdomain>.test.somewhere.site` never reach a real mailbox. Read it with `somewhere email test-inbox <address>` (or `sw.email.inbox(address)`) \u2192 `{ address, messages: [{ id, to, subject, text, html, magic_link, verification_code, created_at }] }`. `verification_code` is the code an auth message carries (the 6-digit email verification or sign-in code), or `null`.\n\n## Failure 1: MANAGED_SENDER_RECIPIENT_NOT_A_USER\n\nOther recipients return `MANAGED_SENDER_RECIPIENT_NOT_A_USER`; verify your own sender domain for outreach.\n\n## Failure 2: gating on status 'sent'\n\nDo not gate follow-up work on `status === 'sent'` alone: a captured test send and a replay of a delivered message are both successful sends.\n\nSources (`somewhere docs <topic>`): sw.email.\n"
38819
+ "sha256": "4d4b119c597c53b1492a30d6558713de4a91feea28aa576f30c5f090e9164816",
38820
+ "content": "---\nname: email-and-test-inbox\ndescription: When the app sends email, or you need to test sign-up, magic-link, or reset mail without a real mailbox.\n---\n\n# Send email and read the test inbox\n\n## Notification after a save\n\nSave first, await durable job admission, then respond. Queued is not sent; the signed handler records the email outcome.\n\n## Send\n\n```ts\n// api/_lib/order-email.ts \u2014 call it from a handler that already checked who\n// receives this; the address comes from your saved order, never the request.\nexport function sendOrderShipped(\n sw: SomewhereRuntimeContext,\n order: { id: string; email: string; trackingNumber: string },\n): Promise<SomewhereEmailSendResult> {\n return sw.email.send({\n to: order.email,\n subject: 'Your order shipped',\n text: `Tracking: ${order.trackingNumber}`, // or html, or both\n idempotency_key: `order-shipped:${order.id}`,\n });\n}\n```\n\nIt can only email the project's owner and app users who have verified their email address with this project and signed in at least once; a pending sign-in or an unverified sign-up does not count. The platform adds a one-line unsubscribe footer and one-click unsubscribe headers; after a user unsubscribes, sends to them return `RECIPIENT_UNSUBSCRIBED`. Replies to the app's address are recorded in your project mailbox; read them with `sw.mail.project.list()`.\n\n## Test inbox\n\nAddresses `<anything>@<project-subdomain>.test.somewhere.site` never reach a real mailbox. Read it with `somewhere email test-inbox <address>` (or `sw.email.inbox(address)`) \u2192 `{ address, messages: [{ id, to, subject, text, html, magic_link, verification_code, attachments, created_at }] }`, `verification_code` is the code an auth message carries (the 6-digit email verification or sign-in code), or `null`.\n\n## Failure 1: MANAGED_SENDER_RECIPIENT_NOT_A_USER\n\nOther recipients return `MANAGED_SENDER_RECIPIENT_NOT_A_USER`; verify your own sender domain for outreach.\n\n## Failure 2: gating on status 'sent'\n\nDo not gate follow-up work on `status === 'sent'` alone: a captured test send and a replay of a delivered message are both successful sends.\n\nSources (`somewhere docs <topic>`): sw.email.\n"
38821
38821
  },
38822
38822
  {
38823
38823
  "path": "design/SKILL.md",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@somewhere-cloud/cli",
3
- "version": "0.38.133",
3
+ "version": "0.38.135",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@somewhere-cloud/cli",
9
- "version": "0.38.133",
9
+ "version": "0.38.135",
10
10
  "license": "MIT",
11
11
  "bin": {
12
12
  "cli": "bin/somewhere.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@somewhere-cloud/cli",
3
- "version": "0.38.133",
3
+ "version": "0.38.135",
4
4
  "description": "CLI for somewhere.cloud — auth, projects, deploy, pull, promote, db, logs, env, MCP bridge.",
5
5
  "keywords": [
6
6
  "somewhere",
@@ -67,5 +67,5 @@
67
67
  },
68
68
  "bundleDependencies": [],
69
69
  "bundledDependencies": [],
70
- "gitHead": "277efbbeb3035fa6ea87f4ae9604dc17f58abc07"
70
+ "gitHead": "d0aa1c3a046f16d56fa1acb0d63af3fff7cf705f"
71
71
  }
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "esbuild": "0.24.0",
3
3
  "source_files": {
4
- "shared/app-model-catalog.ts": "9d1b9014772d570760a7b71222b7b5108ab054e9194aacf51eab6fcfb209fa79",
4
+ "shared/app-model-catalog.ts": "6c3bdb81fd45c298cc4404e4891c2b465895bbb18ccabdc149c9eb39d79b1101",
5
5
  "shared/cloud-dev-entitlement.ts": "1993a9e1c781d9daed29b3cfef0e8a370e150ce06d2acc7c408c2a24c50b4960",
6
6
  "shared/d1-region.ts": "71cda96cfead241b4f4e35b8cd6b1d8e577f072257e91a8dbe0deaa1b142b378",
7
7
  "shared/d1-session.ts": "2ae29b74bba68016c86d25fa2a58f8c2fce4aca8fe57fafc253d380c47a3c0ab",
8
8
  "shared/transient-read.ts": "2f22daebdc74fed6255a29df7deda0db307f9165c1d9988dba3ee872b2584ffd",
9
9
  "shared/types/placeholder-identity.ts": "089a46e2474a21193d3611eddd9c94b6bbe62441b3039ed80fc8499bada447ca",
10
10
  "worker/containers/compile/checker-contract.cjs": "c6d4ebc9ec058b3562655cc4f18dc1cea7e4492eb35b7f0fd0d87e974c26b492",
11
- "worker/containers/compile/consumer-contract.cjs": "5fc79cc69fba2669939f45eeda274f072bac69898890e7907c6e8fd5e172666c",
11
+ "worker/containers/compile/consumer-contract.cjs": "5cbf5ee0c4a936b9bce6b62d0f27bf7729126d47d02a3cd3a0ff28db86dfd987",
12
12
  "worker/containers/compile/declared-data-contract.cjs": "1261275ab4ff75b3001456a30b041a7c639578ffff0b67b42706d7b0ff11d744",
13
13
  "worker/containers/compile/generated-declarations-render.cjs": "7ffdb34645cc9eccac6eba39dc86b646a41c4de8a1a038d2b5b46f42df9f1157",
14
14
  "worker/containers/compile/generated-declarations.cjs": "6e9902e054c5c784fd9b3c3fafc1869e79954100a45014e1132247cd82833ec4",
15
15
  "worker/containers/compile/groups-types.cjs": "7c22b4bb96c9391005d434852600dc02bc8a6bbb99d78d2b8e3eb152f7b72c58",
16
- "worker/containers/compile/runtime-types.cjs": "a91c245c82b5b8f18fb3d33359f1bc2adaeb639c15cfa88010aded4207a54e1a",
16
+ "worker/containers/compile/runtime-types.cjs": "9f2633dcca852c35bc20147bbb260d2c79969da33668f2bd9b1f5bbfcf21bc7f",
17
17
  "worker/containers/compile/schema-types.cjs": "4cd8d79a9401271bcb948865069b90d3d5f13a10c96c51cb084e22e63cbb57d8",
18
18
  "worker/containers/compile/typed-data.cjs": "1c8bec853fbee4ffd34c651076a4e1f4d8b18c0c2be5e99e31df7c9283207627",
19
19
  "worker/containers/compile/typed-files.cjs": "f2568567a53994575ede91f9a0839965e64f94eb92ae11315650189b6de0f79c",
@@ -37,7 +37,7 @@
37
37
  "worker/src/utils/authority/intake-bake.ts": "7216e288e40673819295d999b3bdbf5e4319e1e21608e3b81eda9d102ff8d636",
38
38
  "worker/src/utils/authority/role-domain-map.ts": "dc1b6abba79278a970cc5a07c4eb7ea73acac262425b489670e90508b95a5ff1",
39
39
  "worker/src/utils/authority/scope-enforcement.ts": "ab035b28380cacc160e032b9dc47485ce3f56a51b184c653ff6ee33dd8d02a1d",
40
- "worker/src/utils/console-privacy.ts": "749789561a9865b59ce4ce7dc275aa7dc1e96c397b533d74a2388b88251073d7",
40
+ "worker/src/utils/console-privacy.ts": "fa486acf3f5701f095bf3e80786ee2e9e3ea46728c2037548b4789d798e1b9f3",
41
41
  "worker/src/utils/db-schema-deploy/bigint-text.ts": "ef3f581daeecb234d2c1e288bc09495a6facd7b0354b300134918f6c0cf10cc2",
42
42
  "worker/src/utils/db-schema-deploy/client-contract-source.ts": "b0a3b5e6e32a3269e6911c4f5c90d93457d8d93d5486678a9be082049f937be8",
43
43
  "worker/src/utils/db-schema-deploy/client-permissions.ts": "3db42f781ca6bb4f763a33be9470d43d74c58c7d3339a46d1271689d5100b64e",
@@ -58,11 +58,11 @@
58
58
  "worker/src/utils/db-schema-deploy/schema-ownership.ts": "e6c811a87bc657707be3518dfe547c6d97718ac073108b126eb7f791c9c08202",
59
59
  "worker/src/utils/dev-health-class.ts": "fd430f31b9c8469f3d90e118fd8c75d1836ebcf705c1f9e93915ffa53a4cb066",
60
60
  "worker/src/utils/errors.ts": "f9d22810c285d2a512d258853bdd17cf9c1445c3983d51f3adbbcede273ac07d",
61
- "worker/src/utils/event-log.ts": "70e6d8611cd303eadf42edff01461f48a66dee76be3dd9f7d5f69f02cc918c4f",
62
- "worker/src/utils/feed-kinds.ts": "e13d89c70e2e1a3600e09d1c125eee4b5faae93a682abf8cf5183eed6ebcf891",
63
- "worker/src/utils/journey-segment.ts": "61f63ca2fc2da0c514df48a7c8dc424797d21d4dac6edc072366f00fab4b6498",
61
+ "worker/src/utils/event-log.ts": "1f878064deef5ca490b7b84bed9c1fc50a8b7fc84b3d55a9eeada86f570e37b0",
62
+ "worker/src/utils/feed-kinds.ts": "b7315ca703ce08b8c796033d2e91039580fcc4cf3d43be06599f2baaa86334f0",
63
+ "worker/src/utils/journey-segment.ts": "7b73ff51d30d904d4588aede4fe6cb83e0bf4adc6bab47bc644b979e6a933e95",
64
64
  "worker/src/utils/json-exact-integers.ts": "e2eb8d3b2e17da363eb14fb46d876208579e2e92bfac173fb27527e6c4fb575e",
65
- "worker/src/utils/log-sanitize.ts": "e5a6172f5298bd053ea80f7334fdd53fb5fc718ea8fd2d23508ed045b0cb1688",
65
+ "worker/src/utils/log-sanitize.ts": "f4591089c16a34e4cbc271ec22b48566b970a62e30d3e9856b7dcd9c479fb0e8",
66
66
  "worker/src/utils/managed-groups/errors.ts": "18d952edd7f46bb7e459d4e6678226f4bd6e040ab40073ee5a8d0802be2f3721",
67
67
  "worker/src/utils/managed-groups/policy.ts": "2c5b48479a2925bea9a820022c63ca5fa827e2ff5531fe1ab6c0b058b7212b39",
68
68
  "worker/src/utils/platform-compile-failure.ts": "eb4cea8a54599e2ca852b67f576a4402fb0281da4c7f45a7ed735bc36a684883",
@@ -73,5 +73,5 @@
73
73
  "worker/src/utils/telegram.ts": "dfbc9e756b44b445b3c3504c90a1094a94e6f9853ff9c0e0a84fba0e8c4518da",
74
74
  "worker/src/utils/workers-ai-comparison.ts": "18b5d5ea96f817387a5ef49733ba611c99cbb14987143c28118b1c90f3b637d4"
75
75
  },
76
- "sha256": "8cf4ed28070c29560ff72aa1a267dd4da34a6e7e5aec51fb07783c0ff85523e2"
76
+ "sha256": "5752380cef1c84e07eda378872a79119e01f051c8a331ce1d384d3e1818c18c7"
77
77
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "sha256": "480d78c44a868510b82c6b9f24fc7dae89fdcfadc24f943fc35702b3d22603cf"
2
+ "sha256": "bc86fb6c013c3f890053c6f9a1eb9bac31fac41e5381a43422d7e85127b8436c"
3
3
  }
@@ -35,29 +35,37 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
35
35
 
36
36
 
37
37
  function createConsoleDiagnostics() {
38
+ const nativeStackGetter = Object.getOwnPropertyDescriptor(new Error(), "stack")?.get;
38
39
  function sanitizeMessage(input) {
39
40
  return input.slice(0, 8192).replace(/https?:\/\/[^\s<>"')]+/gi, (url) => url.replace(/(https?:\/\/)[^/@\s]+@/gi, "$1<redacted>@").split(/[?#]/, 1)[0]).replace(/(["']?(?:password|code|token|key|secret|signature|access_token|refresh_token|authorization|cookie)["']?\s*:\s*)(?:"[^"]*"|'[^']*'|[^\s,}]+)/gi, "$1<redacted>").replace(/\b(?:Cookie|Set-Cookie)\s*[:=]\s*[^\r\n]+/gi, "Cookie: <redacted>").replace(/\bBearer\s+[^\s,;'"<>]+/gi, "Bearer <redacted>").replace(/\b(?:token|code|key|secret|password|signature|access_token|refresh_token|session|sid|sessionid)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s&;,]+)/gi, (match) => match.slice(0, match.indexOf("=") + 1) + "<redacted>").replace(/[A-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, "<email>").replace(/\b[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g, "<redacted>").replace(/\b(?:smt_|(?:sk|pk)[_-])[A-Za-z0-9_-]+/g, "<redacted>").replace(/[A-Za-z0-9+/_-]{32,}={0,2}/g, "<redacted>").slice(0, 300);
40
41
  }
41
42
  function safeError(value) {
42
43
  try {
43
44
  const record2 = Object.create(null);
45
+ let stackGetter;
46
+ let unsafeFormatting = false;
44
47
  if (value && typeof value === "object") {
45
48
  let current = value;
46
49
  for (let depth = 0; current && depth < 6; depth++, current = Object.getPrototypeOf(current)) {
47
50
  for (const key of ["name", "message", "status", "code", "stack"]) {
48
51
  if (Object.hasOwn(record2, key)) continue;
49
52
  const descriptor = Object.getOwnPropertyDescriptor(current, key);
50
- if (descriptor) record2[key] = "value" in descriptor ? descriptor.value : "[Getter]";
53
+ if (descriptor) {
54
+ record2[key] = "value" in descriptor ? descriptor.value : "[Getter]";
55
+ if (key === "stack" && descriptor.get && descriptor.get === nativeStackGetter) stackGetter = descriptor.get;
56
+ if ((key === "name" || key === "message") && (!("value" in descriptor) || typeof descriptor.value !== "string")) unsafeFormatting = true;
57
+ }
51
58
  }
52
59
  }
53
60
  }
61
+ if (stackGetter && !unsafeFormatting && typeof record2.name === "string" && typeof record2.message === "string") record2.stack = stackGetter.call(value);
54
62
  const name = typeof record2.name === "string" ? sanitizeMessage(record2.name).slice(0, 80) : "Error";
55
63
  const message = typeof record2.message === "string" ? record2.message : typeof value === "string" ? value : "Unknown error";
56
64
  const status = typeof record2.status === "number" && Number.isInteger(record2.status) && record2.status >= 100 && record2.status <= 599 ? record2.status : 0;
57
65
  const failure = /Network connection lost/i.test(message) ? "connection_lost" : /DEADLINE|timed? ?out/i.test(message) ? "deadline_exceeded" : /object.*reset|reset.*object/i.test(message) ? "object_reset" : /no such column/i.test(message) ? "missing_column" : /no such table/i.test(message) ? "missing_table" : /SQLITE_CONSTRAINT|constraint failed/i.test(message) ? "constraint" : /overload|too many requests|too many resources consumed/i.test(message) ? "overloaded" : "unclassified";
58
66
  const code = typeof record2.code === "string" && /^[A-Z][A-Z0-9_]{0,63}$/.test(record2.code) ? sanitizeMessage(record2.code) : void 0;
59
67
  const frames = typeof record2.stack === "string" ? record2.stack.split("\n").slice(1).flatMap((line) => {
60
- const match = line.match(/([^\s()]+?):(\d+)(?::\d+)?\)?$/);
68
+ const match = (line.length > 512 ? line.slice(-512) : line).match(/([^\s()]+?):(\d+)(?::\d+)?\)?$/);
61
69
  if (!match) return [];
62
70
  const file = match[1].split(/[\\/]/).pop() ?? "";
63
71
  return [sanitizeMessage(file) + ":" + match[2]];
@@ -80,6 +88,21 @@ var init_console_privacy = __esm({
80
88
  });
81
89
 
82
90
 
91
+ var init_d1_region = __esm({
92
+ "shared/d1-region.ts"() {
93
+ "use strict";
94
+ }
95
+ });
96
+
97
+
98
+ var init_d1_session = __esm({
99
+ "shared/d1-session.ts"() {
100
+ "use strict";
101
+ init_d1_region();
102
+ }
103
+ });
104
+
105
+
83
106
  var require_declared_data_contract = __commonJS({
84
107
  "worker/containers/compile/declared-data-contract.cjs"(exports2, module2) {
85
108
  "use strict";
@@ -1540,6 +1563,17 @@ interface SomewhereAuthUserDeletion {
1540
1563
  removed: readonly string[];
1541
1564
  kept: readonly { readonly category: string; readonly reason: string }[];
1542
1565
  not_covered: readonly string[];
1566
+ /** Present with { erase: 'owned' }: the erase of the person's own rows and files, which finishes in the background. */
1567
+ erasure?: { id: string; state: 'requested' | 'closed' | 'complete' | 'incomplete' | 'failed' | 'cancelled'; counts: Record<string, number>; skipped: readonly string[]; reason?: string };
1568
+ }
1569
+ interface SomewhereAuthUserCopy {
1570
+ exported_at: string;
1571
+ profile: Record<string, unknown>;
1572
+ rows: Record<string, Record<string, unknown>[]>;
1573
+ files: { path: string; size_bytes: number; content_type: string | null; created_at: number; updated_at: number; visibility: string }[];
1574
+ passkeys: { name: string | null; created_at: number }[];
1575
+ not_in_copy: { tables: readonly string[]; reason: string };
1576
+ not_covered: readonly string[];
1543
1577
  }
1544
1578
  interface SomewhereRuntimeAuthModeration {
1545
1579
  ban(req: Request, userId: string, options?: { reason?: string | null } | null): Promise<SomewhereAuthModerationRevoked & {
@@ -1608,10 +1642,12 @@ interface SomewhereRuntimeAuth {
1608
1642
  // Email verification for the request's own session (cookie or Bearer); no token in app code.
1609
1643
  requestEmailVerificationWithCookie(req: Request): Promise<SomewhereAuthVerificationSent>;
1610
1644
  verifyEmailWithCookie(req: Request, options: { code: string }): Promise<{ verified: true }>;
1611
- deleteUser(token: string): Promise<SomewhereAuthUserDeletion>;
1645
+ deleteUser(token: string, options?: { erase?: 'owned' }): Promise<SomewhereAuthUserDeletion>;
1646
+ /** The signed-in person's own copy of their data. */
1647
+ exportUser(token: string): Promise<SomewhereAuthUserCopy>;
1612
1648
  // Password change and account deletion end every session of the account; these clear the cookies.
1613
1649
  updatePasswordWithCookie(req: Request, options: { new_password: string; current_password?: string }): Promise<{ updated: true }>;
1614
- deleteUserWithCookie(req: Request): Promise<SomewhereAuthUserDeletion>;
1650
+ deleteUserWithCookie(req: Request, options?: { erase?: 'owned' }): Promise<SomewhereAuthUserDeletion>;
1615
1651
  // Start Google/GitHub/Discord sign-in from a server handler: stages this attempt's HttpOnly
1616
1652
  // verifier cookie on the response and resolves the provider start URL (only its challenge travels).
1617
1653
  oauthStart(provider: 'google' | 'github' | 'discord', options: { redirect_uri: string }): Promise<string>;
@@ -1635,7 +1671,8 @@ interface SomewhereRuntimeAuth {
1635
1671
  signupWithCookie(options: SomewhereAuthSignupOptions): Promise<{ user: SomewhereAuthUser }>;
1636
1672
  clearSessionCookies(): void;
1637
1673
  logoutWithCookie(req: Request): Promise<{ ok: true }>;
1638
- signInWithOtp(options: { email: string; redirect_uri?: string }): Promise<SomewhereAuthOtpSent>;
1674
+ // purpose 'confirm' words the same link "Confirm your request" (a booking, an order) instead of "Sign in".
1675
+ signInWithOtp(options: { email: string; redirect_uri?: string; purpose?: 'sign_in' | 'confirm' }): Promise<SomewhereAuthOtpSent>;
1639
1676
  verifyOtp(options: { token: string }): Promise<SomewhereAuthOtpSession>;
1640
1677
  // One invite email; the link signs the invitee in as the invited address.
1641
1678
  invite(options: SomewhereAuthInviteOptions): Promise<SomewhereAuthInviteSent>;
@@ -2091,6 +2128,32 @@ interface SomewhereCalendarPolicyInput {
2091
2128
  turnaround_hours?: number | null;
2092
2129
  // Seats per exact [start, end) class slot. Omitted or null: one reservation per overlapping range.
2093
2130
  capacity?: number | null;
2131
+ // Weekly open hours in one IANA zone; hold and rebook refuse ranges outside them (CALENDAR_OUTSIDE_HOURS).
2132
+ hours?: SomewhereCalendarHours | null;
2133
+ // Starts at most this many days from now; hold and rebook refuse later ones (CALENDAR_TOO_FAR_AHEAD).
2134
+ max_days_ahead?: number | null;
2135
+ }
2136
+ type SomewhereCalendarWeekday = 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
2137
+ interface SomewhereCalendarHours {
2138
+ timezone: string;
2139
+ // 'HH:MM-HH:MM' wall-clock windows per day, e.g. { mon: ['09:00-12:00', '13:00-17:00'] }. A missing day is closed.
2140
+ weekly: Partial<Record<SomewhereCalendarWeekday, readonly string[]>>;
2141
+ }
2142
+ interface SomewhereCalendarSlotsOptions {
2143
+ resource: string;
2144
+ range: SomewhereCalendarReadRange;
2145
+ duration_minutes: number;
2146
+ // Distance between starts; defaults to duration_minutes.
2147
+ step_minutes?: number;
2148
+ }
2149
+ interface SomewhereCalendarOpenSlot { start_ms: number; end_ms: number; start: string; end: string }
2150
+ interface SomewhereCalendarSlotsResult {
2151
+ resource: string;
2152
+ range: { start_ms: number; end_ms: number };
2153
+ duration_minutes: number;
2154
+ step_minutes: number;
2155
+ timezone: string | null;
2156
+ slots: SomewhereCalendarOpenSlot[];
2094
2157
  }
2095
2158
  type SomewhereCalendarSetPolicyOptions = { resource: string } & ({ policy: SomewhereCalendarPolicyInput } | (SomewhereCalendarPolicyInput & { policy?: never }));
2096
2159
  interface SomewhereCalendarPolicy {
@@ -2101,6 +2164,8 @@ interface SomewhereCalendarPolicy {
2101
2164
  bookable_from_ms: number | null;
2102
2165
  turnaround_hours: number | null;
2103
2166
  capacity: number | null;
2167
+ hours: SomewhereCalendarHours | null;
2168
+ max_days_ahead: number | null;
2104
2169
  created_at: number | null;
2105
2170
  updated_at: number | null;
2106
2171
  }
@@ -2149,6 +2214,8 @@ interface SomewhereRuntimeCalendar {
2149
2214
  getPolicy(resourceOrOpts: string | { resource: string }): Promise<{ policy: SomewhereCalendarPolicy }>;
2150
2215
  availability(opts: { resource: string; range: SomewhereCalendarReadRange }): Promise<SomewhereCalendarAvailabilityResult>;
2151
2216
  availability(resource: string, range: SomewhereCalendarReadRange): Promise<SomewhereCalendarAvailabilityResult>;
2217
+ slots(opts: SomewhereCalendarSlotsOptions): Promise<SomewhereCalendarSlotsResult>;
2218
+ slots(resource: string, range: SomewhereCalendarReadRange, opts: { duration_minutes: number; step_minutes?: number }): Promise<SomewhereCalendarSlotsResult>;
2152
2219
  list(opts: SomewhereCalendarListOptions): Promise<SomewhereCalendarListResult>;
2153
2220
  list(resource: string, opts?: SomewhereCalendarListExtras | null): Promise<SomewhereCalendarListResult>;
2154
2221
  get(idOrOpts: string | __SomewhereCalendarIdRef): Promise<{ reservation: SomewhereCalendarReservation }>;
@@ -2962,10 +3029,11 @@ interface SomewhereAgentStep {
2962
3029
  duration_ms: number;
2963
3030
  completion_reason: string;
2964
3031
  on_step?: unknown;
2965
- // Non-enumerable; null while the step's cost is pending.
3032
+ // This model call's cost in cents; null while it is pending. Kept in a durable run's stored steps.
2966
3033
  readonly cost_cents: number | null;
2967
3034
  }
2968
3035
  interface SomewhereAgentPrepareStepContext {
3036
+ // 0 for a run's first model call (it equals the number of steps already taken).
2969
3037
  stepNumber: number;
2970
3038
  steps: SomewhereAgentStep[];
2971
3039
  messages: SomewhereAiMessage[];
@@ -2985,7 +3053,7 @@ interface SomewhereAgentPrepareStepOverride {
2985
3053
  toolChoice?: string | SomewhereJsonObject;
2986
3054
  maxTokens?: number;
2987
3055
  }
2988
- interface SomewhereAgentStepEvent { step: SomewhereAgentStep; steps: SomewhereAgentStep[] }
3056
+ interface SomewhereAgentStepEvent { step: SomewhereAgentStep; steps: SomewhereAgentStep[]; agentId: string | null }
2989
3057
  interface SomewhereAgentOnStepEvent {
2990
3058
  agentId: string | null;
2991
3059
  turn: number;
@@ -3119,6 +3187,8 @@ type SomewhereEmailSendOptions = {
3119
3187
  in_reply_to?: string;
3120
3188
  references?: readonly string[];
3121
3189
  app_user_id?: string;
3190
+ // Up to 3 files, 256 KB total, content in base64. Extensions: ics pdf png jpg jpeg gif webp csv txt json.
3191
+ attachments?: readonly { filename: string; content_type?: string; content: string }[];
3122
3192
  } & __SomewhereEmailBody;
3123
3193
  interface SomewhereEmailSendResult {
3124
3194
  id: string;
@@ -3186,6 +3256,8 @@ interface SomewhereEmailTestInboxMessage {
3186
3256
  magic_link: string | null;
3187
3257
  /** The code an auth message carries (email verification, sign-in code); null otherwise. */
3188
3258
  verification_code: string | null;
3259
+ /** Files the send attached; content is base64. Empty when none. */
3260
+ attachments: { filename: string; content_type: string; content: string }[];
3189
3261
  created_at: string;
3190
3262
  }
3191
3263
  interface SomewhereRuntimeEmail {
@@ -3223,179 +3295,6 @@ interface SomewhereRuntimeContacts {
3223
3295
  list(options?: { limit?: number; offset?: number } | null): Promise<{ contacts: SomewhereEmailContact[] }>;
3224
3296
  }
3225
3297
 
3226
- // \u2500\u2500 sw.inbox \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
3227
- type SomewhereInboxOwnershipStatus = 'app_user' | 'project_owner' | 'legacy_project';
3228
- // At least one of body / text / html is required (body is an alias of text).
3229
- type __SomewhereInboxBody =
3230
- | { body: string; text?: string; html?: string }
3231
- | { text: string; body?: string; html?: string }
3232
- | { html: string; body?: string; text?: string };
3233
- interface SomewhereInboxAddressCreateOptions {
3234
- address: string;
3235
- label?: string;
3236
- webhook_url?: string;
3237
- forward_to?: string;
3238
- }
3239
- interface SomewhereInboxAddressCreated {
3240
- id: string;
3241
- project_id: string;
3242
- address: string;
3243
- label: string | null;
3244
- kind: 'admin' | 'app';
3245
- ownership_status: 'app_user' | 'project_owner';
3246
- webhook_url: string | null;
3247
- // Returned once, only when webhook_url was set.
3248
- webhook_secret: string | null;
3249
- forward?: SomewhereJsonObject;
3250
- created_at: string;
3251
- }
3252
- interface SomewhereInboxAddress {
3253
- id: string;
3254
- address: string;
3255
- label: string | null;
3256
- created_at: string;
3257
- webhook_url: string | null;
3258
- forward_to: string | null;
3259
- forward_status: 'active' | 'pending_verification' | null;
3260
- ownership_status: SomewhereInboxOwnershipStatus;
3261
- }
3262
- interface SomewhereInboxListOptions {
3263
- address_id?: string;
3264
- limit?: number;
3265
- unread?: boolean;
3266
- q?: string;
3267
- include_spam?: boolean;
3268
- }
3269
- interface SomewhereInboxMessageSummary {
3270
- id: string;
3271
- address_id: string;
3272
- mail_from: string;
3273
- mail_to: string;
3274
- subject: string | null;
3275
- text_preview: string | null;
3276
- has_html: boolean;
3277
- attachment_count: number;
3278
- size_bytes: number;
3279
- read_at: string | null;
3280
- received_at: string;
3281
- thread_root: string | null;
3282
- spf_result: string | null;
3283
- dkim_result: string | null;
3284
- dmarc_result: string | null;
3285
- spam_suspect: boolean;
3286
- ownership_status: SomewhereInboxOwnershipStatus;
3287
- }
3288
- interface SomewhereInboxAttachmentMeta {
3289
- filename: string | null;
3290
- content_type: string;
3291
- size_bytes: number;
3292
- r2_key: string;
3293
- }
3294
- interface SomewhereInboxMessage extends SomewhereInboxMessageSummary {
3295
- project_id: string;
3296
- r2_key: string;
3297
- message_id_header: string | null;
3298
- in_reply_to_header: string | null;
3299
- references_header: string | null;
3300
- attachments: SomewhereInboxAttachmentMeta[];
3301
- raw_url: string;
3302
- // Present only with include_html: true.
3303
- html_preview?: string | null;
3304
- }
3305
- interface SomewhereInboxSendPending {
3306
- id: string;
3307
- message_id: string;
3308
- status: 'pending';
3309
- code: 'EMAIL_SEND_PENDING';
3310
- duplicate?: true;
3311
- }
3312
- interface __SomewhereInboxSentBase {
3313
- id: string;
3314
- from: string;
3315
- to: string;
3316
- subject: string;
3317
- thread_root: string;
3318
- status?: never;
3319
- duplicate?: true;
3320
- test_inbox?: { address: string; delivered: false };
3321
- }
3322
- interface SomewhereInboxSent extends __SomewhereInboxSentBase { message_id: string }
3323
- interface SomewhereInboxReplySent extends __SomewhereInboxSentBase { inbox_message_id: string }
3324
- interface SomewhereInboxThreadSummary {
3325
- thread_root: string;
3326
- last_at: string;
3327
- first_at: string;
3328
- message_count: number;
3329
- unread_count: number;
3330
- last_subject: string | null;
3331
- last_counterparty: string;
3332
- last_direction: 'in' | 'out';
3333
- ownership_status: SomewhereInboxOwnershipStatus;
3334
- }
3335
- type SomewhereInboxThreadMessage =
3336
- | {
3337
- direction: 'in'; id: string; address_id: string; mail_from: string; mail_to: string;
3338
- subject: string | null; text_preview: string | null; has_html: boolean;
3339
- attachment_count: number; read_at: string | null; received_at: string;
3340
- spf_result: string | null; dkim_result: string | null; dmarc_result: string | null;
3341
- spam_suspect: boolean; message_id: string | null; ownership_status: SomewhereInboxOwnershipStatus;
3342
- }
3343
- | {
3344
- direction: 'out'; id: string; to: string; from: string; subject: string | null;
3345
- body: string | null; text_preview: string | null; sent_at: string; is_reply: boolean;
3346
- message_id: string | null; inbox_message_id: string | null; ownership_status: SomewhereInboxOwnershipStatus;
3347
- };
3348
- interface SomewhereInboxRule {
3349
- id: string;
3350
- address_id: string | null;
3351
- pattern: string;
3352
- action: 'allow' | 'deny';
3353
- created_at: string;
3354
- }
3355
- interface SomewhereInboxRules {
3356
- list(options?: { address_id?: string } | null): Promise<{ rules: SomewhereInboxRule[] }>;
3357
- // Omit address_id for a project-wide rule (sw.inbox.project only).
3358
- create(rule: { pattern: string; action: 'allow' | 'deny'; address_id?: string }): Promise<SomewhereInboxRule & { project_id: string }>;
3359
- delete(id: string): Promise<{ id: string; deleted: true }>;
3360
- }
3361
- interface SomewhereInboxClient {
3362
- listAddresses(): Promise<{ addresses: SomewhereInboxAddress[] }>;
3363
- createAddress(options: SomewhereInboxAddressCreateOptions): Promise<SomewhereInboxAddressCreated>;
3364
- listAppAddresses(): Promise<{ addresses: SomewhereInboxAddress[] }>;
3365
- deleteAddress(id: string): Promise<{ id: string; deleted: true }>;
3366
- list(options?: SomewhereInboxListOptions | null): Promise<{ messages: SomewhereInboxMessageSummary[]; count: number }>;
3367
- get(id: string, options?: { include_html?: boolean } | null): Promise<SomewhereInboxMessage>;
3368
- // Raw RFC-822 bytes; the Response carries X-Somewhere-Ownership-Status.
3369
- raw(id: string): Promise<Response>;
3370
- attachment(id: string, index: number): Promise<Response>;
3371
- markRead(id: string, read?: boolean): Promise<{ id: string; read: boolean; ownership_status: SomewhereInboxOwnershipStatus; read_at: string | null }>;
3372
- delete(id: string): Promise<{ id: string; deleted: true }>;
3373
- reply(id: string, reply: { subject?: string; idempotency_key?: string } & __SomewhereInboxBody): Promise<SomewhereInboxReplySent | SomewhereInboxSendPending>;
3374
- send(addressId: string, message: { to: string; subject: string; idempotency_key?: string } & __SomewhereInboxBody): Promise<SomewhereInboxSent | SomewhereInboxSendPending>;
3375
- threads(options?: { address_id?: string; limit?: number; include_spam?: boolean } | null): Promise<{ threads: SomewhereInboxThreadSummary[] }>;
3376
- thread(root: string): Promise<{ thread_root: string; messages: SomewhereInboxThreadMessage[] }>;
3377
- readonly rules: SomewhereInboxRules;
3378
- }
3379
- interface SomewhereInboxGrant {
3380
- collaborator_user_id: string;
3381
- role: 'viewer' | 'editor';
3382
- granted_by: string;
3383
- created_at: string;
3384
- }
3385
- // Trusted project-scope inbox: createAddress makes admin mailboxes; owner-only grants/migration.
3386
- interface SomewhereRuntimeProjectInbox extends SomewhereInboxClient {
3387
- assignLegacyOwner(addressId: string, appUserId: string): Promise<{ id: string; ownership_status: 'app_user'; migrated_message_count: number; migration_id: string }>;
3388
- readonly grants: {
3389
- list(addressId: string): Promise<{ address_id: string; ownership_status: SomewhereInboxOwnershipStatus; grants: SomewhereInboxGrant[] }>;
3390
- set(addressId: string, collaboratorUserId: string, role: 'viewer' | 'editor'): Promise<{ address_id: string; collaborator_user_id: string; role: 'viewer' | 'editor'; ownership_status: 'app_user'; created_at: string }>;
3391
- delete(addressId: string, collaboratorUserId: string): Promise<{ address_id: string; collaborator_user_id: string; deleted: true }>;
3392
- };
3393
- }
3394
- // Scoped to the request's verified app user; createAddress makes app mailboxes.
3395
- interface SomewhereRuntimeInbox extends SomewhereInboxClient {
3396
- readonly project: SomewhereRuntimeProjectInbox;
3397
- }
3398
-
3399
3298
  // \u2500\u2500 sw.notifications \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
3400
3299
  type SomewhereNotificationsChannel = 'bell' | 'push' | 'email';
3401
3300
  interface SomewhereNotificationsSendOptions {
@@ -3933,11 +3832,75 @@ interface SomewhereRuntimeRooms extends SomewhereRoomOps {
3933
3832
  live<Row>(name: string, read: SomewhereDbResult<Row> | PromiseLike<SomewhereDbResult<Row>>): Promise<SomewhereDbLiveResult<Row>>;
3934
3833
  }
3935
3834
 
3835
+ // sw.mail: the signed-in app user's own mailbox (the server picks it from the session; no method takes a
3836
+ // user). sw.mail.project: the project's mailbox. Failures throw; an id from another mailbox reads as not found.
3837
+ type SomewhereMailStatus = 'draft' | 'awaiting_approval' | 'requested' | 'accepted' | 'delivered' | 'bounced'
3838
+ | 'complained' | 'failed' | 'outcome_unknown' | 'received' | 'refused';
3839
+ interface SomewhereMailSummary {
3840
+ id: string; direction: 'in' | 'out'; from: string; to: string[]; subject: string; status: SomewhereMailStatus;
3841
+ conversation: string; created_at: number; template_version: string | null; author: string;
3842
+ // The number of attachments; read one with attachment(id, n).
3843
+ attachments: number;
3844
+ }
3845
+ interface SomewhereMailEmail {
3846
+ id: string; direction: 'in' | 'out'; from_addr: string; to_addrs: string[]; cc_addrs: string[]; bcc_addrs: string[];
3847
+ reply_to: string | null; subject: string; text: string | null; html: string | null;
3848
+ message_id: string | null; in_reply_to: string | null; conversation: string;
3849
+ person: string | null; person_user_id: string | null; status: SomewhereMailStatus; status_at: number;
3850
+ author: string; template_version: string | null; approved_by: string | null; approved_at: number | null;
3851
+ kind: string; test: boolean; spam: string | null; provider_id: string | null; idempotency_key: string | null;
3852
+ note: string | null; created_at: number;
3853
+ attachments: Array<{ n: number; name: string; type: string; size: number }>;
3854
+ // Raw header lines, kept for mail received or written from 2026-11-20 on; null for older mail.
3855
+ headers: Array<{ name: string; value: string }> | null;
3856
+ checks: { spf: string | null; dkim: string | null; dmarc: string | null } | null;
3857
+ }
3858
+ interface SomewhereMailSearchResult {
3859
+ id: string; subject: string; from_addr: string; to_addrs: string[]; created_at: number; conversation: string;
3860
+ has_attachments: boolean; direction: 'in' | 'out'; status: SomewhereMailStatus;
3861
+ }
3862
+ interface SomewhereMailSendOptions {
3863
+ // An address registered in this mailbox (sw.mail.project may also send a template from a person address).
3864
+ from: string;
3865
+ // One to ten addresses.
3866
+ to: string | readonly string[];
3867
+ subject?: string; text?: string; html?: string;
3868
+ // Required with subject and html or text when from is a person address; vars fill its {{slots}}.
3869
+ template_key?: string; vars?: Record<string, string>;
3870
+ idempotency_key?: string;
3871
+ // An email in this mailbox to reply to; the reply joins its conversation.
3872
+ reply_to_email_id?: string;
3873
+ // A step name: this step goes to this one recipient at most once.
3874
+ once?: string;
3875
+ // true: send nothing to a recipient this mailbox has received mail from.
3876
+ unless_replied?: boolean;
3877
+ }
3878
+ interface SomewhereMailSendResult {
3879
+ email_id: string | null; status: SomewhereMailStatus | 'skipped'; duplicate: boolean;
3880
+ skipped?: 'replied'; sent_version?: string; waiting_version?: string | null;
3881
+ }
3882
+ interface SomewhereMailOps {
3883
+ list(options?: { limit?: number; before?: number; conversation?: string } | null): Promise<{ emails: SomewhereMailSummary[]; mailbox: 'app_user' | 'project' | null }>;
3884
+ get(id: string): Promise<{ email: SomewhereMailEmail }>;
3885
+ // The attachment's bytes as a Response (404 when there is no such attachment).
3886
+ attachment(id: string, n: number): Promise<Response>;
3887
+ search(text: string, options?: { limit?: number } | null): Promise<{ results: SomewhereMailSearchResult[]; searched: Array<{ mailbox: 'app_user' | 'project'; answered: boolean }> }>;
3888
+ send(message: SomewhereMailSendOptions): Promise<SomewhereMailSendResult>;
3889
+ readonly addresses: {
3890
+ list(): Promise<{ addresses: Array<{ address: string; signs_as_user_id: string | null }> }>;
3891
+ create(address: string): Promise<{ address: string; mailbox: 'app_user' | 'project'; sends_as: string }>;
3892
+ remove(address: string): Promise<{ removed: string }>;
3893
+ };
3894
+ }
3895
+ interface SomewhereRuntimeMail extends SomewhereMailOps {
3896
+ readonly project: SomewhereMailOps;
3897
+ }
3898
+
3936
3899
  interface SomewhereRuntimeContext {
3937
3900
  readonly email: SomewhereRuntimeEmail;
3901
+ readonly mail: SomewhereRuntimeMail;
3938
3902
  readonly rooms: SomewhereRuntimeRooms;
3939
3903
  readonly contacts: SomewhereRuntimeContacts;
3940
- readonly inbox: SomewhereRuntimeInbox;
3941
3904
  readonly notifications: SomewhereRuntimeNotifications;
3942
3905
  readonly push: SomewhereRuntimePush;
3943
3906
  readonly queue: SomewhereRuntimeQueue;
@@ -4502,8 +4465,8 @@ var require_consumer_contract = __commonJS({
4502
4465
  "worker/containers/compile/consumer-contract.cjs"(exports2, module2) {
4503
4466
  "use strict";
4504
4467
  var CONSUMER_CONTRACT2 = Object.freeze({
4505
- version: 22,
4506
- digest: "da61ee52a81d1b7cb5324c8b88bc0b7f1883d213f8ef7280eddbf8449207c22f"
4468
+ version: 28,
4469
+ digest: "e4a7b324f259d0bc92b20434ff153cdfadebf865dd96dfa3e19e8b9811d43692"
4507
4470
  });
4508
4471
  var MEMBERSHIPS = "memberships: table({ id: id(), team_id: text(), member_id: text() }, { scope: owner(), client: { read: true } }),";
4509
4472
  var SHARES = "shares: table({ id: id(), grantee_id: text() }, { scope: owner(), client: { read: true, create: ['grantee_id'], delete: true }, unique: [['user_id', 'grantee_id']] }),";
@@ -5196,6 +5159,7 @@ var ROLE_DOMAIN_MAP_JS = `
5196
5159
 
5197
5160
 
5198
5161
  init_console_privacy();
5162
+ init_d1_session();
5199
5163
 
5200
5164
 
5201
5165
  init_console_privacy();