run402 1.51.1 → 1.52.0

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/lib/apps.mjs CHANGED
@@ -131,15 +131,13 @@ async function fork(versionId, name, args) {
131
131
  subdomain: opts.subdomain,
132
132
  });
133
133
 
134
- // SDK persists via the Node provider's saveProject/setActiveProject; we
135
- // mirror the old CLI behavior here (deployed_at + site_url surfaced from
136
- // the fork response) with a follow-up updateProject for the extra fields.
134
+ // SDK persists keys via the Node provider's saveProject; mirror that
135
+ // here so we also capture site_url from the fork response.
137
136
  if (data.project_id) {
138
137
  saveProject(data.project_id, {
139
138
  anon_key: data.anon_key,
140
139
  service_key: data.service_key,
141
140
  site_url: data.site_url || data.subdomain_url,
142
- deployed_at: new Date().toISOString(),
143
141
  });
144
142
  }
145
143
  console.log(JSON.stringify(data, null, 2));
package/lib/deploy.mjs CHANGED
@@ -1,81 +1,9 @@
1
1
  import { readFileSync } from "fs";
2
2
  import { dirname, resolve } from "path";
3
- import { Agent, fetch as undiciFetch } from "undici";
4
- import { API, allowanceAuthHeaders, resolveProjectId } from "./config.mjs";
3
+ import { resolveProjectId } from "./config.mjs";
5
4
  import { resolveFilePathsInManifest, resolveMigrationsFile } from "./manifest.mjs";
6
-
7
- // Custom undici dispatcher with longer timeouts for large-batch deploys.
8
- // Default Node undici headersTimeout is ~5 min; large image uploads can exceed it.
9
- // We MUST pair this Agent (from the installed undici major) with undici.fetch
10
- // — not globalThis.fetch — because Node's built-in fetch ships its own bundled
11
- // undici whose Dispatcher interface may differ by major version, which would
12
- // cause UND_ERR_INVALID_ARG ("invalid onRequestStart method") at dispatch time.
13
- const deployDispatcher = new Agent({
14
- headersTimeout: 600_000, // 10 min
15
- bodyTimeout: 600_000,
16
- connectTimeout: 30_000,
17
- });
18
-
19
- // Retry policy for transient network errors and 5xx gateway errors.
20
- // We retry on these because they tend to be load-shedding/blip-related; we do
21
- // NOT retry on other 4xx/5xx (402, 400, etc.) — those are deterministic.
22
- const RETRY_CAUSE_CODES = new Set([
23
- "UND_ERR_HEADERS_TIMEOUT",
24
- "UND_ERR_BODY_TIMEOUT",
25
- "UND_ERR_SOCKET",
26
- "ECONNRESET",
27
- "ECONNREFUSED",
28
- "ETIMEDOUT",
29
- ]);
30
- const RETRY_HTTP_STATUSES = new Set([502, 503, 504]);
31
-
32
- // Test-only injection seam. Tests can replace the fetch implementation used by
33
- // run() without monkey-patching globalThis.fetch (which would not intercept
34
- // undici.fetch anyway). Pass null/undefined to reset.
35
- let _runFetchImpl = undiciFetch;
36
- export function _setFetchImpl(fn) { _runFetchImpl = fn ?? undiciFetch; }
37
-
38
- function isRetriableError(err) {
39
- if (!err) return false;
40
- const code = err.code || (err.cause && err.cause.code);
41
- return typeof code === "string" && RETRY_CAUSE_CODES.has(code);
42
- }
43
-
44
- function sleep(ms) {
45
- return new Promise((r) => setTimeout(r, ms));
46
- }
47
-
48
- /**
49
- * Fetch with bounded retries on transient errors. Exported for testability.
50
- * - 2 retries (3 total attempts)
51
- * - Backoff ~1s then ~4s with small jitter
52
- * - Retries on RETRY_CAUSE_CODES network errors and RETRY_HTTP_STATUSES
53
- * - Silent: no stdout noise on retry (CLI is agent-first)
54
- */
55
- export async function fetchWithRetry(url, init, { attempts = 3, fetchImpl = undiciFetch } = {}) {
56
- for (let attempt = 1; attempt <= attempts; attempt++) {
57
- try {
58
- const res = await fetchImpl(url, init);
59
- if (attempt < attempts && RETRY_HTTP_STATUSES.has(res.status)) {
60
- // Drain body so the connection can be reused, then retry.
61
- try { await res.arrayBuffer(); } catch { /* noop */ }
62
- const delay = (attempt === 1 ? 1000 : 4000) + Math.floor(Math.random() * 250);
63
- await sleep(delay);
64
- continue;
65
- }
66
- return res;
67
- } catch (err) {
68
- if (attempt < attempts && isRetriableError(err)) {
69
- const delay = (attempt === 1 ? 1000 : 4000) + Math.floor(Math.random() * 250);
70
- await sleep(delay);
71
- continue;
72
- }
73
- throw err;
74
- }
75
- }
76
- // Unreachable: the loop above either returns a response or throws.
77
- throw new Error("fetchWithRetry: exhausted attempts without returning");
78
- }
5
+ import { getSdk } from "./sdk.mjs";
6
+ import { reportSdkError } from "./sdk-errors.mjs";
79
7
 
80
8
  const HELP = `run402 deploy — Deploy to an existing project on Run402
81
9
 
@@ -106,13 +34,11 @@ Manifest format (JSON):
106
34
  { "file": "index.html", "data": "<html>...</html>" },
107
35
  { "file": "style.css", "path": "./dist/style.css" }
108
36
  ],
109
- "subdomain": "my-app",
110
- "inherit": true
37
+ "subdomain": "my-app"
111
38
  }
112
39
 
113
40
  project_id is required (provision first with 'run402 provision').
114
41
  All other fields are optional.
115
- inherit: copy unchanged site files from previous deployment (only upload changed files).
116
42
 
117
43
  Migrations can be inline or read from a file:
118
44
  "migrations": "CREATE TABLE ..." ← inline SQL
@@ -168,6 +94,8 @@ Prerequisites:
168
94
  - run402 provision Provision a project first
169
95
 
170
96
  Notes:
97
+ - Routes through the unified deploy primitive (POST /deploy/v2/plans);
98
+ bytes ride through the CAS substrate, only changed files get uploaded.
171
99
  - Requires an active tier subscription (run402 tier set <tier>)
172
100
  - Provision a project first with 'run402 provision', then deploy to it
173
101
  - Use 'run402 projects list' to see all provisioned projects
@@ -185,16 +113,11 @@ async function readStdin() {
185
113
  *
186
114
  * Returns { manifest } on success, or { error } with a structured error object
187
115
  * on any fs / parse failure. Never throws.
188
- *
189
- * The returned error shape (GH-44):
190
- * { status: "error", message, field, path?, hint? }
191
- * where `field` is one of: "manifest", "stdin", "migrations_file", "files[<i>].path".
192
116
  */
193
117
  async function loadManifest(opts) {
194
118
  let raw;
195
119
  let baseDir = null;
196
120
 
197
- // Step 1: read the manifest source.
198
121
  if (opts.manifest) {
199
122
  const manifestAbs = resolve(opts.manifest);
200
123
  baseDir = dirname(manifestAbs);
@@ -222,7 +145,6 @@ async function loadManifest(opts) {
222
145
  raw = await readStdin();
223
146
  }
224
147
 
225
- // Step 2: parse JSON.
226
148
  let manifest;
227
149
  try {
228
150
  manifest = JSON.parse(raw);
@@ -235,8 +157,6 @@ async function loadManifest(opts) {
235
157
  } };
236
158
  }
237
159
 
238
- // Step 3: resolve file paths (only when reading from a manifest file — we
239
- // can't resolve relative paths without a baseDir).
240
160
  if (opts.manifest) {
241
161
  try {
242
162
  resolveMigrationsFile(manifest, baseDir);
@@ -270,7 +190,7 @@ export async function run(args) {
270
190
  // run402 deploy resume <op> → resume an activation_pending operation
271
191
  // run402 deploy list → list recent deploy operations
272
192
  // run402 deploy events <op> → fetch recorded event stream for an operation
273
- // run402 deploy --manifest … → legacy bundle deploy (still works)
193
+ // run402 deploy --manifest … → legacy bundle deploy (routes through v2)
274
194
  const sub = args[0];
275
195
  switch (sub) {
276
196
  case "apply":
@@ -290,10 +210,6 @@ export async function run(args) {
290
210
  if (args[i] === "--project" && args[i + 1]) opts.project = args[++i];
291
211
  }
292
212
 
293
- // Load + parse the manifest. Errors here (missing --manifest path, malformed
294
- // JSON, or any referenced files[].path / migrations_file that doesn't exist)
295
- // must be surfaced as structured JSON on stderr — never as a raw Node stack
296
- // trace (GH-44). The CLI is agent-first; stack traces break JSON consumers.
297
213
  const manifestResult = await loadManifest(opts);
298
214
  if (manifestResult.error) {
299
215
  console.error(JSON.stringify(manifestResult.error));
@@ -302,8 +218,7 @@ export async function run(args) {
302
218
  const manifest = manifestResult.manifest;
303
219
 
304
220
  // If both sources set project_id and they disagree, refuse to deploy rather
305
- // than silently shipping to the wrong target. Agents and humans should be
306
- // forced to be explicit when the two sources conflict (GH-42).
221
+ // than silently shipping to the wrong target.
307
222
  if (opts.project && manifest.project_id && opts.project !== manifest.project_id) {
308
223
  const err = {
309
224
  status: "error",
@@ -316,58 +231,21 @@ export async function run(args) {
316
231
  process.exit(1);
317
232
  }
318
233
 
319
- // --project flag fills in manifest's project_id when the manifest doesn't
320
- // specify one. (When both are set they must already agree — enforced above.)
321
234
  if (opts.project) manifest.project_id = opts.project;
322
-
323
- // If no project_id in manifest, fall back to the active project.
324
- // resolveProjectId() returns the active project id when its argument is
325
- // falsy, and emits a clear error + exits non-zero when no active project
326
- // is set either.
327
235
  if (!manifest.project_id) {
328
236
  manifest.project_id = resolveProjectId(null);
329
237
  }
330
238
 
331
- // Remove legacy 'name' field if present
239
+ // Strip fields that aren't part of the bundleDeploy contract.
240
+ const projectId = manifest.project_id;
241
+ delete manifest.project_id;
332
242
  delete manifest.name;
243
+ delete manifest.migrations_file;
333
244
 
334
- const authHeaders = allowanceAuthHeaders("/deploy/v1");
335
- const body = JSON.stringify(manifest);
336
- const res = await fetchWithRetry(`${API}/deploy/v1`, {
337
- method: "POST",
338
- headers: { "Content-Type": "application/json", ...authHeaders },
339
- body,
340
- dispatcher: deployDispatcher,
341
- }, { fetchImpl: _runFetchImpl });
342
-
343
- // Content-type aware parsing: gateways (ALB, CloudFront, etc.) return HTML on
344
- // 504/413/etc., which would otherwise crash res.json() with SyntaxError.
345
- const contentType = res.headers.get("content-type") || "";
346
- let result = null;
347
- let parseError = null;
348
- let bodyText = null;
349
- if (contentType.includes("application/json")) {
350
- try {
351
- result = await res.json();
352
- } catch (e) {
353
- parseError = e;
354
- try { bodyText = await res.text(); } catch { bodyText = ""; }
355
- }
356
- } else {
357
- try { bodyText = await res.text(); } catch { bodyText = ""; }
358
- }
359
-
360
- if (!res.ok || parseError || result === null) {
361
- const err = { status: "error", http: res.status, content_type: contentType || null };
362
- if (result && typeof result === "object") {
363
- Object.assign(err, result);
364
- } else {
365
- const preview = typeof bodyText === "string" ? bodyText.slice(0, 500) : "";
366
- err.body_preview = preview;
367
- if (parseError) err.parse_error = "response body was not valid JSON";
368
- }
369
- console.error(JSON.stringify(err));
370
- process.exit(1);
245
+ try {
246
+ const result = await getSdk().apps.bundleDeploy(projectId, manifest);
247
+ console.log(JSON.stringify(result, null, 2));
248
+ } catch (err) {
249
+ reportSdkError(err);
371
250
  }
372
- console.log(JSON.stringify(result, null, 2));
373
251
  }
package/lib/projects.mjs CHANGED
@@ -136,22 +136,6 @@ async function provision(args) {
136
136
  }
137
137
  }
138
138
 
139
- async function rls(projectId, template, tablesJson) {
140
- let tables;
141
- try {
142
- tables = JSON.parse(tablesJson);
143
- } catch {
144
- console.error(JSON.stringify({ status: "error", message: "Invalid JSON for tables argument" }));
145
- process.exit(1);
146
- }
147
- try {
148
- const data = await getSdk().projects.setupRls(projectId, { template, tables });
149
- console.log(JSON.stringify(data, null, 2));
150
- } catch (err) {
151
- reportSdkError(err);
152
- }
153
- }
154
-
155
139
  async function applyExpose(projectId, args = []) {
156
140
  const p = findProject(projectId);
157
141
  let file = null;
@@ -193,7 +177,7 @@ async function list() {
193
177
  const entries = Object.entries(store.projects);
194
178
  if (entries.length === 0) { console.log(JSON.stringify({ status: "ok", projects: [], message: "No projects yet." })); return; }
195
179
  const activeId = store.active_project_id;
196
- console.log(JSON.stringify(entries.map(([id, p]) => ({ project_id: id, active: id === activeId, site_url: p.site_url, deployed_at: p.deployed_at })), null, 2));
180
+ console.log(JSON.stringify(entries.map(([id, p]) => ({ project_id: id, active: id === activeId, site_url: p.site_url })), null, 2));
197
181
  }
198
182
 
199
183
  async function info(projectId) {
@@ -205,7 +189,6 @@ async function info(projectId) {
205
189
  anon_key: data.anon_key,
206
190
  service_key: data.service_key,
207
191
  site_url: data.site_url || null,
208
- deployed_at: data.deployed_at || null,
209
192
  }, null, 2));
210
193
  } catch (err) {
211
194
  reportSdkError(err);
@@ -361,7 +344,6 @@ export async function run(sub, args) {
361
344
  case "rest": { const { projectId, rest: restArgs } = resolvePositionalProject(args); await rest(projectId, restArgs[0], restArgs[1]); break; }
362
345
  case "usage": { const { projectId } = resolvePositionalProject(args); await usage(projectId); break; }
363
346
  case "schema": { const { projectId } = resolvePositionalProject(args); await schema(projectId); break; }
364
- case "rls": { const { projectId, rest } = resolvePositionalProject(args); await rls(projectId, rest[0], rest[1]); break; }
365
347
  case "apply-expose": { const { projectId, rest } = resolvePositionalProject(args); await applyExpose(projectId, rest); break; }
366
348
  case "get-expose": { const { projectId } = resolvePositionalProject(args); await getExpose(projectId); break; }
367
349
  case "delete": { const { projectId } = resolvePositionalProject(args); await deleteProject(projectId); break; }
package/lib/sites.mjs CHANGED
@@ -11,13 +11,11 @@ const HELP = `run402 sites - Deploy and manage static sites
11
11
  Usage:
12
12
  run402 sites deploy --manifest <file> [--project <id>] [--target <target>]
13
13
  run402 sites deploy-dir <path> --project <id> [--target <target>]
14
- run402 sites status <deployment_id>
15
14
  cat manifest.json | run402 sites deploy
16
15
 
17
16
  Subcommands:
18
17
  deploy Deploy a static site from a manifest JSON
19
18
  deploy-dir Deploy a static site from a local directory (SDK walks it for you)
20
- status Check the status of a deployment
21
19
 
22
20
  Options (deploy):
23
21
  --manifest <file> Path to manifest JSON file (or read from stdin)
@@ -48,18 +46,19 @@ Manifest format (JSON):
48
46
  Examples:
49
47
  run402 sites deploy --manifest site.json
50
48
  run402 sites deploy-dir ./my-site --project prj_abc
51
- run402 sites status dpl_abc123
52
49
  cat site.json | run402 sites deploy
53
50
 
54
51
  Notes:
55
- - Both deploy and deploy-dir use the v1.32 plan/commit transport: only
56
- bytes the gateway doesn't already have are uploaded. Re-deploys of an
57
- unchanged tree make no S3 PUTs.
52
+ - Both deploy and deploy-dir route through the unified deploy primitive
53
+ (CAS-backed): only bytes the gateway doesn't already have are uploaded.
54
+ Re-deploys of an unchanged tree make no S3 PUTs.
55
+ - To check status of an in-flight deploy, use 'run402 deploy events <op>'
56
+ or 'run402 deploy list --project <id>'.
58
57
  - deploy-dir walks the directory, skips .git / node_modules / .DS_Store,
59
58
  and auto-detects binary files. Symlinks are rejected.
60
59
  - Progress events are emitted as JSON-line objects on stderr by default
61
- (one object per line: {"phase":"plan",...}/{"phase":"upload",...}/...).
62
- Final result envelope goes to stdout. Pass --quiet to silence stderr.
60
+ (one object per line). Final result envelope goes to stdout. Pass --quiet
61
+ to silence stderr.
63
62
  - Free with active tier - requires allowance auth
64
63
  `;
65
64
 
@@ -111,21 +110,17 @@ Options:
111
110
  Behavior:
112
111
  - Walks <path> recursively, skips .git / node_modules / .DS_Store
113
112
  - Computes per-file SHA-256 and uploads only bytes the gateway doesn't
114
- already have (plan/commit transport, v1.32+)
113
+ already have (CAS-backed unified deploy primitive)
115
114
  - Symlinks are rejected (no following)
116
115
  - Paths in the manifest are POSIX-style relative to <path>
117
116
 
118
117
  Progress events:
119
118
  By default, the CLI streams JSON-line events to stderr while the deploy
120
- progresses. Each line is one JSON object terminated by \\n. Phases:
121
- {"phase":"plan","manifest_size":N} - after POST /deploy/v1/plan
122
- {"phase":"upload","file":"...","sha256":"...","done":k,"total":N}
123
- - per uploaded file (k of N)
124
- {"phase":"commit"} - before POST /deploy/v1/commit
125
- {"phase":"poll","status":"copying","elapsed_ms":N}
126
- - per Stage-2 copy poll tick
127
- Stdout receives only the final result envelope. To consume both streams
128
- separately: \`run402 sites deploy-dir ./dist --project p > result.json 2> events.log\`.
119
+ progresses. Each line is one JSON object terminated by \\n. Both the
120
+ unified DeployEvent shapes and legacy phase events ({"phase":...}) are
121
+ emitted for back-compat. Stdout receives only the final result envelope.
122
+ To consume both streams separately:
123
+ \`run402 sites deploy-dir ./dist --project p > result.json 2> events.log\`
129
124
 
130
125
  Notes:
131
126
  - Re-deploying an unchanged tree makes no S3 PUTs (returns immediately
@@ -145,11 +140,6 @@ async function readStdin() {
145
140
  return Buffer.concat(chunks).toString("utf-8");
146
141
  }
147
142
 
148
- /**
149
- * Stage manifest files to a temp directory so the SDK's deployDir can walk
150
- * them. The v1.32 SDK no longer accepts inline file bytes — every deploy
151
- * goes through plan/commit and reads from a directory.
152
- */
153
143
  function stageFilesToTempDir(files) {
154
144
  const stage = mkdtempSync(join(tmpdir(), "run402-deploy-stage-"));
155
145
  for (const f of files) {
@@ -166,15 +156,6 @@ function stageFilesToTempDir(files) {
166
156
  return stage;
167
157
  }
168
158
 
169
- /**
170
- * Returns an onEvent callback that writes each event as a single-line JSON
171
- * object to stderr — or a no-op when --quiet was passed. The CLI is
172
- * agent-first; structured stderr lets a piping agent stream progress with
173
- * `2>events.log` while keeping stdout reserved for the final result envelope.
174
- *
175
- * Uses `console.error` so that test harnesses intercepting console output
176
- * see each event line; `console.error` appends a newline by default.
177
- */
178
159
  function makeStderrEventWriter(quiet) {
179
160
  if (quiet) return undefined;
180
161
  return (event) => {
@@ -193,7 +174,7 @@ async function deploy(args) {
193
174
  if (args[i] === "--inherit") {
194
175
  console.error(JSON.stringify({
195
176
  status: "error",
196
- message: "--inherit is removed in v1.32; the SDK now uploads only changed files automatically.",
177
+ message: "--inherit is removed; the SDK now uploads only changed files automatically.",
197
178
  }));
198
179
  process.exit(1);
199
180
  }
@@ -204,7 +185,7 @@ async function deploy(args) {
204
185
  if (opts.manifest) resolveFilePathsInManifest(manifest, dirname(resolve(opts.manifest)));
205
186
 
206
187
  // Preserve the aggressive early exit when no allowance is configured.
207
- allowanceAuthHeaders("/deploy/v1/plan");
188
+ allowanceAuthHeaders("/deploy/v2/plans");
208
189
 
209
190
  const stage = stageFilesToTempDir(manifest.files || []);
210
191
  try {
@@ -235,7 +216,7 @@ async function deployDir(args) {
235
216
  if (args[i] === "--inherit") {
236
217
  console.error(JSON.stringify({
237
218
  status: "error",
238
- message: "--inherit is removed in v1.32; the SDK now uploads only changed files automatically.",
219
+ message: "--inherit is removed; the SDK now uploads only changed files automatically.",
239
220
  }));
240
221
  process.exit(1);
241
222
  }
@@ -248,7 +229,7 @@ async function deployDir(args) {
248
229
  const projectId = resolveProjectId(opts.project);
249
230
 
250
231
  // Preserve the aggressive early exit when no allowance is configured.
251
- allowanceAuthHeaders("/deploy/v1/plan");
232
+ allowanceAuthHeaders("/deploy/v2/plans");
252
233
 
253
234
  try {
254
235
  const data = await getSdk().sites.deployDir({
@@ -266,27 +247,12 @@ async function deployDir(args) {
266
247
  }
267
248
  }
268
249
 
269
- async function status(args) {
270
- let deploymentId = null;
271
- for (let i = 0; i < args.length; i++) {
272
- if (!args[i].startsWith("-")) { deploymentId = args[i]; break; }
273
- }
274
- if (!deploymentId) { console.error(JSON.stringify({ status: "error", message: "Missing deployment ID" })); process.exit(1); }
275
- try {
276
- const data = await getSdk().sites.getDeployment(deploymentId);
277
- console.log(JSON.stringify(data, null, 2));
278
- } catch (err) {
279
- reportSdkError(err);
280
- }
281
- }
282
-
283
250
  export async function run(sub, args) {
284
251
  if (!sub || sub === '--help' || sub === '-h') { console.log(HELP); process.exit(0); }
285
252
  if (Array.isArray(args) && (args.includes("--help") || args.includes("-h"))) { console.log(SUB_HELP[sub] || HELP); process.exit(0); }
286
253
  switch (sub) {
287
254
  case "deploy": await deploy(args); break;
288
255
  case "deploy-dir": await deployDir(args); break;
289
- case "status": await status(args); break;
290
256
  default:
291
257
  console.error(`Unknown subcommand: ${sub}\n`);
292
258
  console.log(HELP);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "1.51.1",
3
+ "version": "1.52.0",
4
4
  "description": "CLI for Run402 — provision Postgres databases, deploy static sites, generate images, and manage wallets via x402 and MPP micropayments.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,7 +24,6 @@
24
24
  "@x402/evm": "^2.6.0",
25
25
  "@x402/fetch": "^2.6.0",
26
26
  "mppx": "^0.4.7",
27
- "undici": "^8.0.2",
28
27
  "viem": "^2.47.1"
29
28
  },
30
29
  "engines": {
@@ -2,12 +2,12 @@
2
2
  * `projects` namespace — project lifecycle, introspection, and admin.
3
3
  *
4
4
  * Covers:
5
- * - remote: provision, delete, list, getUsage, getSchema, setupRls, pin, getQuote
5
+ * - remote: provision, delete, list, getUsage, getSchema, pin, getQuote
6
6
  * - local: info, keys, use (require provider support for persistence methods)
7
7
  */
8
8
  import type { Client } from "../kernel.js";
9
9
  import type { ProjectKeys } from "../credentials.js";
10
- import type { ListProjectsResult, PinResult, ProjectInfo, ProvisionOptions, ProvisionResult, QuoteResult, RlsSetupOptions, RlsSetupResult, SchemaReport, UsageReport } from "./projects.types.js";
10
+ import type { ListProjectsResult, PinResult, ProjectInfo, ProvisionOptions, ProvisionResult, QuoteResult, SchemaReport, UsageReport } from "./projects.types.js";
11
11
  export declare class Projects {
12
12
  private readonly client;
13
13
  constructor(client: Client);
@@ -54,17 +54,6 @@ export declare class Projects {
54
54
  * constraints, and RLS policies.
55
55
  */
56
56
  getSchema(id: string): Promise<SchemaReport>;
57
- /**
58
- * Apply a row-level-security template to one or more tables.
59
- *
60
- * ⚠ The gateway endpoint is deprecated (sunset 2026-05-23). Prefer the
61
- * manifest-based `apply_expose` flow for new code.
62
- *
63
- * @throws {Run402Error} with `context: "setting up RLS"` when
64
- * `i_understand_this_is_unrestricted` is missing for the
65
- * `public_read_write_UNRESTRICTED` template.
66
- */
67
- setupRls(id: string, opts: RlsSetupOptions): Promise<RlsSetupResult>;
68
57
  /**
69
58
  * Pin a project so it is not garbage-collected or expired.
70
59
  *
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/namespaces/projects.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,eAAe,EACf,cAAc,EACd,YAAY,EACZ,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;;;;;OAQG;IACG,SAAS,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;IAyBtE;;;;;;;OAOG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcvC;;;;;;;;;;;;OAYG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB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,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;IAyBtE;;;;;;;OAOG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAcvC;;;;;;;;;;;;OAYG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA8BxD;;;OAGG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAUhD;;;OAGG;IACG,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAUlD;;;;;;;;OAQG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAWzC;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC;IAOtC;;;;;OAKG;IACG,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAM5C;;;;;OAKG;IACG,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAM5C;;;;;;OAMG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAapC;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAKvC"}
@@ -2,7 +2,7 @@
2
2
  * `projects` namespace — project lifecycle, introspection, and admin.
3
3
  *
4
4
  * Covers:
5
- * - remote: provision, delete, list, getUsage, getSchema, setupRls, pin, getQuote
5
+ * - remote: provision, delete, list, getUsage, getSchema, pin, getQuote
6
6
  * - local: info, keys, use (require provider support for persistence methods)
7
7
  */
8
8
  import { ProjectNotFound, Run402Error } from "../errors.js";
@@ -125,39 +125,6 @@ export class Projects {
125
125
  context: "fetching schema",
126
126
  });
127
127
  }
128
- /**
129
- * Apply a row-level-security template to one or more tables.
130
- *
131
- * ⚠ The gateway endpoint is deprecated (sunset 2026-05-23). Prefer the
132
- * manifest-based `apply_expose` flow for new code.
133
- *
134
- * @throws {Run402Error} with `context: "setting up RLS"` when
135
- * `i_understand_this_is_unrestricted` is missing for the
136
- * `public_read_write_UNRESTRICTED` template.
137
- */
138
- async setupRls(id, opts) {
139
- if (opts.template === "public_read_write_UNRESTRICTED" &&
140
- opts.i_understand_this_is_unrestricted !== true) {
141
- throw new (class extends Run402Error {
142
- })("i_understand_this_is_unrestricted must be true when template is public_read_write_UNRESTRICTED", null, null, "setting up RLS");
143
- }
144
- const keys = await this.client.getProject(id);
145
- if (!keys)
146
- throw new ProjectNotFound(id, "setting up RLS");
147
- const body = {
148
- template: opts.template,
149
- tables: opts.tables,
150
- };
151
- if (opts.i_understand_this_is_unrestricted !== undefined) {
152
- body.i_understand_this_is_unrestricted = opts.i_understand_this_is_unrestricted;
153
- }
154
- return this.client.request(`/projects/v1/admin/${id}/rls`, {
155
- method: "POST",
156
- headers: { Authorization: `Bearer ${keys.service_key}` },
157
- body,
158
- context: "setting up RLS",
159
- });
160
- }
161
128
  /**
162
129
  * Pin a project so it is not garbage-collected or expired.
163
130
  *
@@ -1 +1 @@
1
- {"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/namespaces/projects.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAc5D,MAAM,OAAO,QAAQ;IACU;IAA7B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C;;;;;;;;OAQG;IACH,KAAK,CAAC,SAAS,CAAC,OAAyB,EAAE;QACzC,MAAM,IAAI,GAA4B,EAAE,CAAC;QACzC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACnD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,GAA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GG;IACH,KAAK,CAAC,MAAM;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC;QACxD,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QACzB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;CACF"}
@@ -83,20 +83,6 @@ export interface RlsTableSpec {
83
83
  /** Column holding the owning user's id. Required when `template: "user_owns_rows"`. */
84
84
  owner_column?: string;
85
85
  }
86
- export interface RlsSetupOptions {
87
- template: RlsTemplate;
88
- tables: RlsTableSpec[];
89
- /**
90
- * Required to be `true` when `template: "public_read_write_UNRESTRICTED"`.
91
- * Acknowledges that the anon key gains INSERT/UPDATE/DELETE on the listed tables.
92
- */
93
- i_understand_this_is_unrestricted?: boolean;
94
- }
95
- export interface RlsSetupResult {
96
- status: string;
97
- template: string;
98
- tables: string[];
99
- }
100
86
  export interface PinResult {
101
87
  status: string;
102
88
  project_id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"projects.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/projects.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,+FAA+F;IAC/F,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAID,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IA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ACrB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAID,MAAM,MAAM,WAAW,GACnB,gBAAgB,GAChB,iCAAiC,GACjC,gCAAgC,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB;;;OAGG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;CAC7C;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAID,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClC;AAID,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,UAAU,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"projects.types.d.ts","sourceRoot":"","sources":["../../src/namespaces/projects.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,MAAM,MAAM,WAAW,GAA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1.32 the inline-bytes deploy path (`POST /deployments/v1` with
5
- * base64 file blobs) is REMOVED at the gateway (returns 410 Gone). Callers
6
- * migrate to `NodeSites.deployDir` from `@run402/sdk/node`, which uses the
7
- * plan/commit transport over `/deploy/v1/plan` + `/deploy/v1/commit`.
4
+ * As of v1.34 every static-site deploy flows through the unified
5
+ * {@link Deploy.apply} primitive. The legacy isomorphic surface is empty
6
+ * here; the Node-only `deployDir` convenience lives in
7
+ * {@link "../node/sites-node".NodeSites}.
8
8
  *
9
- * The isomorphic surface keeps only the public read-only `getDeployment`
10
- * call. `SiteFile` is preserved for `apps.bundleDeploy` (separate `/deploy/v1`
11
- * endpoint, unaffected by the v1.32 cutover).
9
+ * `SiteFile` is preserved for `apps.bundleDeploy` callers that still pass
10
+ * inline file bytes; the bundle shim translates these into a v2
11
+ * {@link ReleaseSpec} before dispatching.
12
12
  */
13
13
  import type { Client } from "../kernel.js";
14
14
  export interface SiteFile {
@@ -26,19 +26,8 @@ export interface SiteDeployResult {
26
26
  /** Bytes uploaded in this deploy (0 on a no-op redeploy). */
27
27
  bytes_uploaded?: number;
28
28
  }
29
- export interface DeploymentInfo {
30
- id: string;
31
- name: string;
32
- url: string;
33
- project_id?: string;
34
- status: string;
35
- files_count: number;
36
- total_size: number;
37
- }
38
29
  export declare class Sites {
39
30
  private readonly client;
40
31
  constructor(client: Client);
41
- /** Get deployment metadata by id. Public — no project auth. */
42
- getDeployment(deploymentId: string): Promise<DeploymentInfo>;
43
32
  }
44
33
  //# sourceMappingURL=sites.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../src/namespaces/sites.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,QAAQ;IACvB,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC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CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;CAC5C"}
@@ -1,26 +1,19 @@
1
1
  /**
2
2
  * `sites` namespace — static site deployments.
3
3
  *
4
- * As of v1.32 the inline-bytes deploy path (`POST /deployments/v1` with
5
- * base64 file blobs) is REMOVED at the gateway (returns 410 Gone). Callers
6
- * migrate to `NodeSites.deployDir` from `@run402/sdk/node`, which uses the
7
- * plan/commit transport over `/deploy/v1/plan` + `/deploy/v1/commit`.
4
+ * As of v1.34 every static-site deploy flows through the unified
5
+ * {@link Deploy.apply} primitive. The legacy isomorphic surface is empty
6
+ * here; the Node-only `deployDir` convenience lives in
7
+ * {@link "../node/sites-node".NodeSites}.
8
8
  *
9
- * The isomorphic surface keeps only the public read-only `getDeployment`
10
- * call. `SiteFile` is preserved for `apps.bundleDeploy` (separate `/deploy/v1`
11
- * endpoint, unaffected by the v1.32 cutover).
9
+ * `SiteFile` is preserved for `apps.bundleDeploy` callers that still pass
10
+ * inline file bytes; the bundle shim translates these into a v2
11
+ * {@link ReleaseSpec} before dispatching.
12
12
  */
13
13
  export class Sites {
14
14
  client;
15
15
  constructor(client) {
16
16
  this.client = client;
17
17
  }
18
- /** Get deployment metadata by id. Public — no project auth. */
19
- async getDeployment(deploymentId) {
20
- return this.client.request(`/deployments/v1/${deploymentId}`, {
21
- context: "fetching deployment",
22
- withAuth: false,
23
- });
24
- }
25
18
  }
26
19
  //# sourceMappingURL=sites.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sites.js","sourceRoot":"","sources":["../../src/namespaces/sites.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA+BH,MAAM,OAAO,KAAK;IACa;IAA7B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,+DAA+D;IAC/D,KAAK,CAAC,aAAa,CAAC,YAAoB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAiB,mBAAmB,YAAY,EAAE,EAAE;YAC5E,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"sites.js","sourceRoot":"","sources":["../../src/namespaces/sites.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAqBH,MAAM,OAAO,KAAK;IACa;IAA7B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;CAChD"}
@@ -15,9 +15,9 @@
15
15
  * await r.sites.deployDir({ project: project.project_id, dir: "./my-site" });
16
16
  * ```
17
17
  *
18
- * `deployDir` uses the v1.32 plan/commit transport and only uploads the
19
- * bytes the gateway doesn't already have. Re-deploying an unchanged tree
20
- * issues no S3 PUTs.
18
+ * `deployDir` is a thin wrapper over `r.deploy.apply` bytes ride through
19
+ * the unified CAS substrate, so only files the gateway doesn't already have
20
+ * are uploaded. Re-deploying an unchanged tree issues no S3 PUTs.
21
21
  */
22
22
  import { Run402 } from "../index.js";
23
23
  import { NodeSites } from "./sites-node.js";
@@ -48,8 +48,7 @@ export type NodeRun402 = Omit<Run402, "sites"> & {
48
48
  * `@x402/fetch` when the allowance wallet has USDC balance.
49
49
  *
50
50
  * The returned instance's `sites` namespace is a {@link NodeSites}, which
51
- * adds a `deployDir({ dir })` helper on top of the isomorphic `deploy()`
52
- * and `getDeployment()` methods.
51
+ * exposes the `deployDir({ dir })` helper.
53
52
  */
54
53
  export declare function run402(opts?: NodeRun402Options): NodeRun402;
55
54
  export { NodeSites } from "./sites-node.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AAIzD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,iBAAiB;IAChC,yFAAyF;IACzF,OAAO,CAAC,EAAE,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,MAAM,iBAAiB,CAAC;AAEtE,OAAO,EACL,MAAM,EACN,WAAW,EACX,eAAe,EACf,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,MAAM,EACN,KAAK,GACN,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,cAAc,EACd,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,cAAc,GACf,MAAM,aAAa,CAAC"}
@@ -15,9 +15,9 @@
15
15
  * await r.sites.deployDir({ project: project.project_id, dir: "./my-site" });
16
16
  * ```
17
17
  *
18
- * `deployDir` uses the v1.32 plan/commit transport and only uploads the
19
- * bytes the gateway doesn't already have. Re-deploying an unchanged tree
20
- * issues no S3 PUTs.
18
+ * `deployDir` is a thin wrapper over `r.deploy.apply` bytes ride through
19
+ * the unified CAS substrate, so only files the gateway doesn't already have
20
+ * are uploaded. Re-deploying an unchanged tree issues no S3 PUTs.
21
21
  */
22
22
  import { getApiBase } from "../../core-dist/config.js";
23
23
  import { Run402 } from "../index.js";
@@ -32,8 +32,7 @@ import { NodeSites } from "./sites-node.js";
32
32
  * `@x402/fetch` when the allowance wallet has USDC balance.
33
33
  *
34
34
  * The returned instance's `sites` namespace is a {@link NodeSites}, which
35
- * adds a `deployDir({ dir })` helper on top of the isomorphic `deploy()`
36
- * and `getDeployment()` methods.
35
+ * exposes the `deployDir({ dir })` helper.
37
36
  */
38
37
  export function run402(opts = {}) {
39
38
  const runOpts = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAqB5C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,MAAM,CAAC,OAA0B,EAAE;IACjD,MAAM,OAAO,GAAkB;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,UAAU,EAAE;QACrC,WAAW,EAAE,IAAI,uBAAuB,CAAC;YACvC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC;QACF,KAAK,EACH,IAAI,CAAC,KAAK;YACV,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,mBAAmB,EAAE,CAAC;KACtF,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;IAEjC,yEAAyE;IACzE,0EAA0E;IAC1E,4EAA4E;IAC5E,2EAA2E;IAC3E,MAAM,MAAM,GAAI,IAAI,CAAC,KAAuC,CAAC,MAAM,CAAC;IACnE,IAAwC,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAExE,OAAO,IAA6B,CAAC;AACvC,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAA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