@run402/sdk 1.70.0 → 2.0.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.
Files changed (47) hide show
  1. package/README.md +47 -34
  2. package/dist/errors.d.ts +23 -0
  3. package/dist/errors.d.ts.map +1 -1
  4. package/dist/errors.js +30 -0
  5. package/dist/errors.js.map +1 -1
  6. package/dist/index.d.ts +13 -6
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +13 -6
  9. package/dist/index.js.map +1 -1
  10. package/dist/namespaces/{blobs.d.ts → assets.d.ts} +3 -3
  11. package/dist/namespaces/assets.d.ts.map +1 -0
  12. package/dist/namespaces/{blobs.js → assets.js} +2 -2
  13. package/dist/namespaces/assets.js.map +1 -0
  14. package/dist/namespaces/{blobs.types.d.ts → assets.types.d.ts} +1 -1
  15. package/dist/namespaces/assets.types.d.ts.map +1 -0
  16. package/dist/namespaces/{blobs.types.js → assets.types.js} +1 -1
  17. package/dist/namespaces/assets.types.js.map +1 -0
  18. package/dist/namespaces/billing.d.ts +31 -2
  19. package/dist/namespaces/billing.d.ts.map +1 -1
  20. package/dist/namespaces/billing.js +8 -2
  21. package/dist/namespaces/billing.js.map +1 -1
  22. package/dist/namespaces/deploy.d.ts +3 -3
  23. package/dist/namespaces/deploy.js +20 -20
  24. package/dist/namespaces/deploy.js.map +1 -1
  25. package/dist/namespaces/deploy.types.d.ts +130 -4
  26. package/dist/namespaces/deploy.types.d.ts.map +1 -1
  27. package/dist/namespaces/deploy.types.js +1 -1
  28. package/dist/namespaces/deploy.types.js.map +1 -1
  29. package/dist/node/assets-node.d.ts +205 -0
  30. package/dist/node/assets-node.d.ts.map +1 -0
  31. package/dist/node/assets-node.js +368 -0
  32. package/dist/node/assets-node.js.map +1 -0
  33. package/dist/node/canonicalize.d.ts +1 -1
  34. package/dist/node/canonicalize.js +1 -1
  35. package/dist/node/index.d.ts +9 -2
  36. package/dist/node/index.d.ts.map +1 -1
  37. package/dist/node/index.js +9 -0
  38. package/dist/node/index.js.map +1 -1
  39. package/dist/scoped.d.ts +38 -12
  40. package/dist/scoped.d.ts.map +1 -1
  41. package/dist/scoped.js +52 -35
  42. package/dist/scoped.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/namespaces/blobs.d.ts.map +0 -1
  45. package/dist/namespaces/blobs.js.map +0 -1
  46. package/dist/namespaces/blobs.types.d.ts.map +0 -1
  47. package/dist/namespaces/blobs.types.js.map +0 -1
@@ -0,0 +1,368 @@
1
+ /**
2
+ * Node-only `Assets` namespace enrichments (v1.48 unified-apply).
3
+ *
4
+ * `NodeAssets` extends the isomorphic {@link Assets} with directory-walking
5
+ * helpers — `uploadDir` (additive), `syncDir` (declarative prune), and
6
+ * `prepareDir` (pre-commit URL injection) — that read bytes from disk
7
+ * lazily, compute SHA-256s in streaming chunks, and submit through the
8
+ * single hero `r.project(id).apply(spec)` engine. See design D8/D10/D11.
9
+ *
10
+ * Imports `node:fs/promises` via `fileSetFromDir`, so this module is
11
+ * Node-only — V8 isolates use `r.project(id).assets.putMany(items)` with
12
+ * in-memory byte sources.
13
+ */
14
+ import { Assets } from "../namespaces/assets.js";
15
+ import { Deploy } from "../namespaces/deploy.js";
16
+ import { LocalError } from "../errors.js";
17
+ import { createHash } from "node:crypto";
18
+ import { readFile } from "node:fs/promises";
19
+ import { fileSetFromDir } from "./files.js";
20
+ /**
21
+ * Build a `LocalDirRef` for the given filesystem path. Synchronous — the
22
+ * actual filesystem walk happens at `apply()` submission time per design
23
+ * D12 ("dir(path) returns synchronous LocalDirRef; SDK-input-only").
24
+ *
25
+ * @example
26
+ * import { dir, run402 } from "@run402/sdk/node";
27
+ * const r = run402();
28
+ * await r.project(p).apply({
29
+ * site: dir("./dist"),
30
+ * assets: dir("./assets", { prefix: "static/" }),
31
+ * });
32
+ */
33
+ export function dir(path, opts = {}) {
34
+ return {
35
+ __source: "local-dir",
36
+ path,
37
+ prefix: opts.prefix,
38
+ ignore: opts.ignore,
39
+ includeSensitive: opts.includeSensitive,
40
+ };
41
+ }
42
+ // ───────────────────────────────────────────────────────────────────────────
43
+ // Asset slice normalization (SDK input → wire)
44
+ // ───────────────────────────────────────────────────────────────────────────
45
+ /**
46
+ * Normalize one disk entry into a wire-shaped `AssetPutEntry`. Reads the
47
+ * file once, streams SHA-256, captures size, infers content_type from
48
+ * extension via the existing `guessContentType` table. Defaults
49
+ * `immutable: true` and `visibility: "public"`.
50
+ */
51
+ async function entryFromFile(absolutePath, key, contentType) {
52
+ const buf = await readFile(absolutePath);
53
+ const sha = createHash("sha256").update(buf).digest("hex");
54
+ return {
55
+ key,
56
+ sha256: sha,
57
+ size_bytes: buf.length,
58
+ content_type: contentType,
59
+ visibility: "public",
60
+ immutable: true,
61
+ };
62
+ }
63
+ /**
64
+ * Normalize one in-memory `ContentSource` into a wire-shaped entry.
65
+ * Buffers the bytes (compatible with Uint8Array, ArrayBuffer, Blob,
66
+ * string). Streams aren't supported here yet — pass a Blob or pre-read.
67
+ */
68
+ async function entryFromContent(key, source, contentType, immutable, visibility) {
69
+ const bytes = await readContentSourceBytes(source);
70
+ const sha = createHash("sha256").update(bytes).digest("hex");
71
+ return {
72
+ key,
73
+ sha256: sha,
74
+ size_bytes: bytes.length,
75
+ content_type: contentType ?? "application/octet-stream",
76
+ visibility: visibility ?? "public",
77
+ immutable: immutable ?? true,
78
+ };
79
+ }
80
+ async function readContentSourceBytes(src) {
81
+ if (typeof src === "string")
82
+ return new TextEncoder().encode(src);
83
+ if (src instanceof Uint8Array)
84
+ return src;
85
+ if (src instanceof ArrayBuffer)
86
+ return new Uint8Array(src);
87
+ if (typeof Blob !== "undefined" && src instanceof Blob) {
88
+ return new Uint8Array(await src.arrayBuffer());
89
+ }
90
+ if (typeof src === "object" && src !== null && "data" in src) {
91
+ return readContentSourceBytes(src.data);
92
+ }
93
+ if (typeof src === "object" && src !== null && "__source" in src) {
94
+ const fs = src;
95
+ if (fs.__source === "fs-file") {
96
+ return await readFile(fs.path);
97
+ }
98
+ }
99
+ throw new LocalError("Unsupported ContentSource for asset put (Streams not yet supported; pass a Blob or pre-read bytes)", "normalizing asset entry");
100
+ }
101
+ /**
102
+ * Walk a `LocalDirRef`, hash every file, and return wire-shaped
103
+ * `AssetPutEntry[]`. The prefix is applied to relative keys.
104
+ *
105
+ * This is the single normalization point — uploadDir/syncDir/prepareDir
106
+ * /putMany all funnel through here so the wire submission carries
107
+ * normalized entries only (gateway rejects LocalDirRef objects).
108
+ */
109
+ export async function entriesFromLocalDir(ref) {
110
+ const fileSetOpts = {
111
+ ignore: ref.ignore,
112
+ includeSensitive: ref.includeSensitive,
113
+ };
114
+ const fileSet = await fileSetFromDir(ref.path, fileSetOpts);
115
+ const entries = [];
116
+ for (const [relPath, source] of Object.entries(fileSet)) {
117
+ const key = applyPrefix(ref.prefix, relPath);
118
+ if (typeof source === "object" && source !== null && "__source" in source) {
119
+ const fs = source;
120
+ if (fs.__source === "fs-file") {
121
+ const contentType = fs.contentType ?? "application/octet-stream";
122
+ entries.push(await entryFromFile(fs.path, key, contentType));
123
+ continue;
124
+ }
125
+ }
126
+ entries.push(await entryFromContent(key, source));
127
+ }
128
+ return entries;
129
+ }
130
+ function applyPrefix(prefix, relPath) {
131
+ if (!prefix)
132
+ return relPath;
133
+ return prefix.endsWith("/") ? `${prefix}${relPath}` : `${prefix}/${relPath}`;
134
+ }
135
+ function buildAssetManifest(releaseResult, entries, pruned, durationMs) {
136
+ const projectPublicId = releaseResult.urls?.project_public_id ?? "";
137
+ return buildManifestFromEntries(entries, projectPublicId, pruned, durationMs);
138
+ }
139
+ function buildManifestFromEntries(entries, projectPublicId, pruned, durationMs) {
140
+ const list = [];
141
+ const byKey = Object.create(null);
142
+ const manifest = Object.create(null);
143
+ for (const entry of entries) {
144
+ const e = buildEntryFromAssetPut(entry, projectPublicId);
145
+ list.push(e);
146
+ byKey[entry.key] = e;
147
+ manifest[entry.key] = e;
148
+ }
149
+ const result = {
150
+ list,
151
+ byKey,
152
+ manifest,
153
+ totals: {
154
+ files: entries.length,
155
+ // Byte counts come from the activation-transaction promote
156
+ // response; the SDK doesn't yet thread them through DeployResult
157
+ // (the gateway plan-response enrichment is a separate follow-up).
158
+ // Placeholder 0 keeps the shape stable.
159
+ bytes_uploaded: 0,
160
+ bytes_reused: 0,
161
+ duration_ms: durationMs,
162
+ },
163
+ };
164
+ if (pruned)
165
+ result.pruned = pruned;
166
+ return result;
167
+ }
168
+ /**
169
+ * Build an `AssetManifestEntry` from an `AssetPutEntry` and the
170
+ * project's public id. The URL form mirrors the gateway's
171
+ * `buildAssetRefForPlan` — deterministic from `(project_public_id, key,
172
+ * content_sha256)`. Private assets return null for all public URL
173
+ * fields per the visibility-aware URL matrix (design D6/D8).
174
+ */
175
+ function buildEntryFromAssetPut(entry, projectPublicId) {
176
+ const visibility = entry.visibility ?? "public";
177
+ const immutable = entry.immutable ?? true;
178
+ const isPublic = visibility === "public";
179
+ const suffix = entry.sha256.slice(0, 8);
180
+ const dotIdx = entry.key.lastIndexOf(".");
181
+ const suffixedKey = dotIdx > 0
182
+ ? `${entry.key.slice(0, dotIdx)}-${suffix}${entry.key.slice(dotIdx)}`
183
+ : `${entry.key}-${suffix}`;
184
+ const host = projectPublicId ? `pr-${projectPublicId}.run402.com` : "";
185
+ const url = isPublic && host ? `https://${host}/_blob/${entry.key}` : null;
186
+ const immutableUrl = isPublic && immutable && host
187
+ ? `https://${host}/_blob/${suffixedKey}`
188
+ : null;
189
+ const contentDigest = `sha-256=:${Buffer.from(entry.sha256, "hex").toString("base64")}:`;
190
+ return {
191
+ key: entry.key,
192
+ sha256: entry.sha256,
193
+ size_bytes: entry.size_bytes,
194
+ content_type: entry.content_type ?? "application/octet-stream",
195
+ visibility,
196
+ url,
197
+ immutable_url: immutableUrl,
198
+ cdn_url: url,
199
+ cdn_immutable_url: immutableUrl,
200
+ sri: null,
201
+ etag: `"sha256-${entry.sha256}"`,
202
+ content_digest: contentDigest,
203
+ };
204
+ }
205
+ /**
206
+ * Error thrown by `syncDir({ prune: true })` when called without a
207
+ * `confirm` token. Carries the values the caller must echo back to
208
+ * commit the destructive operation. The SDK auto-throws this before the
209
+ * destructive apply lands so the agent has a chance to surface the
210
+ * planned delete set to the user.
211
+ */
212
+ export class PruneConfirmationRequired extends LocalError {
213
+ code = "PRUNE_CONFIRMATION_REQUIRED";
214
+ base_revision;
215
+ delete_set_digest;
216
+ expected_delete_count;
217
+ sample_keys;
218
+ constructor(args) {
219
+ super(`Destructive syncDir requires a confirmation token. Re-call with confirm: { base_revision, delete_set_digest, expected_delete_count } from a prior plan.`, "preparing destructive asset sync");
220
+ this.base_revision = args.base_revision;
221
+ this.delete_set_digest = args.delete_set_digest;
222
+ this.expected_delete_count = args.expected_delete_count;
223
+ this.sample_keys = args.sample_keys;
224
+ }
225
+ }
226
+ export class NodeAssets extends Assets {
227
+ /**
228
+ * Additive directory upload. Existing keys under the (optional) prefix
229
+ * that aren't in the new directory are left untouched. Per design
230
+ * D10. Wraps `r._applyEngine.apply({ project, assets: { put: ... } })`.
231
+ */
232
+ async uploadDir(path, opts) {
233
+ const start = Date.now();
234
+ const ref = dir(path, {
235
+ prefix: opts.prefix,
236
+ ignore: opts.ignore,
237
+ includeSensitive: opts.includeSensitive,
238
+ });
239
+ const entries = await entriesFromLocalDir(ref);
240
+ if (entries.length === 0) {
241
+ throw new LocalError(`No files found under ${path} (after applying the ignore list)`, "uploading asset directory");
242
+ }
243
+ const result = await this.applyEngine().apply({ project: opts.project, assets: { put: entries } }, { onEvent: opts.onEvent });
244
+ return buildAssetManifest(result, entries, undefined, Date.now() - start);
245
+ }
246
+ /**
247
+ * Declarative directory sync. Per design D10:
248
+ * - Without `prune: true`, behaves identically to {@link uploadDir}
249
+ * (additive only).
250
+ * - With `prune: true` AND no `confirm` token, runs a plan first and
251
+ * throws {@link PruneConfirmationRequired} carrying the values the
252
+ * caller must echo back to commit.
253
+ * - With `prune: true` AND a `confirm` token, commits the destructive
254
+ * sync. The gateway's activation-time drift check
255
+ * (`ASSET_SYNC_DRIFT`) catches the narrower race where inventory
256
+ * mutates between commit and activation.
257
+ */
258
+ async syncDir(path, opts) {
259
+ const start = Date.now();
260
+ const ref = dir(path, {
261
+ prefix: opts.prefix,
262
+ ignore: opts.ignore,
263
+ includeSensitive: opts.includeSensitive,
264
+ });
265
+ const entries = await entriesFromLocalDir(ref);
266
+ if (!opts.prune) {
267
+ // Additive sync — same path as uploadDir.
268
+ const result = await this.applyEngine().apply({ project: opts.project, assets: { put: entries } }, { onEvent: opts.onEvent });
269
+ return buildAssetManifest(result, entries, undefined, Date.now() - start);
270
+ }
271
+ if (!opts.prefix) {
272
+ throw new LocalError("syncDir({ prune: true }) requires an explicit prefix (no implicit project-root prune)", "preparing destructive asset sync");
273
+ }
274
+ if (!opts.confirm) {
275
+ // Run a plan to obtain the gateway-computed base_revision +
276
+ // delete_set_digest + sample of planned-delete keys (design D10).
277
+ // The plan response carries an `asset_sync` block when the spec
278
+ // declares destructive sync; we surface its values via the typed
279
+ // PruneConfirmationRequired error so the caller can present them
280
+ // to a user, then retry with `confirm: {...}` populated.
281
+ const { plan } = await this.applyEngine().plan({
282
+ project: opts.project,
283
+ assets: {
284
+ put: entries,
285
+ sync: { prefix: opts.prefix, prune: true },
286
+ },
287
+ }, { dryRun: true });
288
+ const block = plan.asset_sync;
289
+ throw new PruneConfirmationRequired({
290
+ base_revision: block?.base_revision ?? "",
291
+ delete_set_digest: block?.delete_set_digest ?? "",
292
+ expected_delete_count: block?.expected_delete_count ?? 0,
293
+ sample_keys: block?.sample_keys ?? [],
294
+ });
295
+ }
296
+ const result = await this.applyEngine().apply({
297
+ project: opts.project,
298
+ assets: {
299
+ put: entries,
300
+ sync: {
301
+ prefix: opts.prefix,
302
+ prune: true,
303
+ confirm: opts.confirm,
304
+ },
305
+ },
306
+ }, { onEvent: opts.onEvent });
307
+ return buildAssetManifest(result, entries,
308
+ // pruned[] is populated by the activation transaction (gateway-
309
+ // side asset slice promotion). Without the enriched plan response
310
+ // (follow-up), we don't yet have the materialized list here.
311
+ undefined, Date.now() - start);
312
+ }
313
+ /**
314
+ * Pre-commit URL injection helper (design D8 / spec Requirement
315
+ * "assets.prepareDir"). Runs a plan against `r.project(id).apply.plan`
316
+ * and returns `{ manifest, applySlice }` so the caller can render HTML
317
+ * against the final resolved URLs and submit the same `applySlice` to
318
+ * the commit step without re-uploading. Currently a thin shim — the
319
+ * full plan-response enrichment lands in a follow-up.
320
+ */
321
+ async prepareDir(path, opts) {
322
+ const start = Date.now();
323
+ const ref = dir(path, {
324
+ prefix: opts.prefix,
325
+ ignore: opts.ignore,
326
+ includeSensitive: opts.includeSensitive,
327
+ });
328
+ const entries = await entriesFromLocalDir(ref);
329
+ if (entries.length === 0) {
330
+ throw new LocalError(`No files found under ${path} (after applying the ignore list)`, "preparing asset directory");
331
+ }
332
+ // Plan-only via the engine. The result's URLs are best-effort
333
+ // built locally until the gateway plan-response enrichment lands.
334
+ const plan = await this.applyEngine().plan({ project: opts.project, assets: { put: entries } }, { dryRun: true });
335
+ void plan; // referenced for type-check; consumed by URL-enrich follow-up
336
+ return {
337
+ manifest: buildManifestFromEntries(entries, "", undefined, Date.now() - start),
338
+ applySlice: { put: entries },
339
+ };
340
+ }
341
+ /**
342
+ * In-memory batch upload. Each item carries the key + an in-memory
343
+ * `ContentSource` (string, Uint8Array, ArrayBuffer, Blob). SHA-256 is
344
+ * computed locally, then a single apply call submits all entries.
345
+ * Returns `AssetManifest`.
346
+ */
347
+ async putMany(items, opts) {
348
+ const start = Date.now();
349
+ if (items.length === 0) {
350
+ throw new LocalError("putMany() requires at least one item", "uploading asset batch");
351
+ }
352
+ const entries = [];
353
+ for (const item of items) {
354
+ entries.push(await entryFromContent(item.key, item.source, item.contentType, item.immutable, item.visibility));
355
+ }
356
+ const result = await this.applyEngine().apply({ project: opts.project, assets: { put: entries } }, { onEvent: opts.onEvent });
357
+ return buildAssetManifest(result, entries, undefined, Date.now() - start);
358
+ }
359
+ /**
360
+ * Internal: instantiate a Deploy (engine) bound to the same Client
361
+ * this Assets instance was constructed with. Avoids requiring a
362
+ * separate apply-engine parameter on the namespace constructor.
363
+ */
364
+ applyEngine() {
365
+ return new Deploy(this.client);
366
+ }
367
+ }
368
+ //# sourceMappingURL=assets-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets-node.js","sourceRoot":"","sources":["../../src/node/assets-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAY5C,OAAO,EAAE,cAAc,EAA8B,MAAM,YAAY,CAAC;AAoCxE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,OAAmB,EAAE;IACrD,OAAO;QACL,QAAQ,EAAE,WAAW;QACrB,IAAI;QACJ,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;KACxC,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAE9E;;;;;GAKG;AACH,KAAK,UAAU,aAAa,CAC1B,YAAoB,EACpB,GAAW,EACX,WAAmB;IAEnB,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3D,OAAO;QACL,GAAG;QACH,MAAM,EAAE,GAAG;QACX,UAAU,EAAE,GAAG,CAAC,MAAM;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onical JSON utility — kept as a UX / diagnostic helper.
3
3
  *
4
4
  * **As of v1.34, the gateway is authoritative for the deploy manifest
5
- * digest.** `POST /deploy/v2/plans` returns the gateway-computed digest in
5
+ * digest.** `POST /apply/v1/plans` returns the gateway-computed digest in
6
6
  * the response, and operation idempotency keys on it (combined with
7
7
  * `project_id`, `base_release_id`, and an optional client idempotency key).
8
8
  * A drift between this implementation and the gateway's canonicalize
@@ -2,7 +2,7 @@
2
2
  * RFC 8785 (JCS) canonical JSON utility — kept as a UX / diagnostic helper.
3
3
  *
4
4
  * **As of v1.34, the gateway is authoritative for the deploy manifest
5
- * digest.** `POST /deploy/v2/plans` returns the gateway-computed digest in
5
+ * digest.** `POST /apply/v1/plans` returns the gateway-computed digest in
6
6
  * the response, and operation idempotency keys on it (combined with
7
7
  * `project_id`, `base_release_id`, and an optional client idempotency key).
8
8
  * A drift between this implementation and the gateway's canonicalize
@@ -22,6 +22,7 @@
22
22
  import { Run402 } from "../index.js";
23
23
  import type { CredentialsProvider } from "../credentials.js";
24
24
  import { NodeSites } from "./sites-node.js";
25
+ import { NodeAssets } from "./assets-node.js";
25
26
  export interface NodeRun402Options {
26
27
  /** Override the API base URL. Defaults to `getApiBase()` (env var or production URL). */
27
28
  apiBase?: string;
@@ -39,9 +40,13 @@ export interface NodeRun402Options {
39
40
  /** Fully custom fetch implementation. Takes precedence over `disablePaidFetch`. */
40
41
  fetch?: typeof globalThis.fetch;
41
42
  }
42
- /** Run402 instance with the Node-only `sites.deployDir` helper wired in. */
43
- export type NodeRun402 = Omit<Run402, "sites"> & {
43
+ /** Run402 instance with Node-only helpers wired in: `sites.deployDir`
44
+ * (v1.34 unified-deploy convenience) and `assets.uploadDir` /
45
+ * `assets.syncDir` / `assets.prepareDir` / `assets.putMany`
46
+ * (v1.48 unified-apply ergonomics). */
47
+ export type NodeRun402 = Omit<Run402, "sites" | "assets"> & {
44
48
  sites: NodeSites;
49
+ assets: NodeAssets;
45
50
  };
46
51
  /**
47
52
  * Construct a Run402 client wired with Node defaults.
@@ -58,6 +63,8 @@ export { NodeSites } from "./sites-node.js";
58
63
  export type { DeployDirOptions, DeployEvent as DeployDirEvent, } from "./sites-node.js";
59
64
  export { fileSetFromDir, normalizeRelPath } from "./files.js";
60
65
  export type { FileSetFromDirOptions } from "./files.js";
66
+ export { NodeAssets, dir, PruneConfirmationRequired } from "./assets-node.js";
67
+ export type { AssetManifest, AssetManifestEntry, AssetManifestTotals, DirOptions, LocalDirRef, PutManyItem, UploadDirOptions, SyncDirOptions, PrepareDirOptions, } from "./assets-node.js";
61
68
  export { loadDeployManifest, normalizeDeployManifest } from "./deploy-manifest.js";
62
69
  export type { DeployManifestDatabaseSpec, DeployManifestFileEntry, DeployManifestFileSet, DeployManifestFunctionsSpec, DeployManifestFunctionSpec, DeployManifestInput, DeployManifestMigrationSpec, DeployManifestSiteSpec, LoadDeployManifestOptions, NormalizedDeployManifest, NormalizeDeployManifestOptions, } from "./deploy-manifest.js";
63
70
  export { signCiDelegation } from "./ci.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;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,iBAAiB;IAChC,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mGAAmG;IACnG,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mFAAmF;IACnF,KAAK,CAAC,EAAE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AQ,EACR,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,8BAA8B,EAC9B,kBAAkB,EAClB,EAAE,EACF,sBAAsB,EACtB,MAAM,EACN,KAAK,EACL,WAAW,EACX,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,+BAA+B,EAC/B,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,SAAS,GACV,MAAM,aAAa,CAAC"}
@@ -24,6 +24,7 @@ import { Run402 } from "../index.js";
24
24
  import { NodeCredentialsProvider } from "./credentials.js";
25
25
  import { createLazyPaidFetch } from "./paid-fetch.js";
26
26
  import { NodeSites } from "./sites-node.js";
27
+ import { NodeAssets } from "./assets-node.js";
27
28
  /**
28
29
  * Construct a Run402 client wired with Node defaults.
29
30
  *
@@ -51,10 +52,18 @@ export function run402(opts = {}) {
51
52
  // the field; this keeps a single Client per instance (no divergent state).
52
53
  const client = base.sites.client;
53
54
  base.sites = new NodeSites(client);
55
+ // v1.48 unified-apply: upgrade `assets` to the Node-aware variant.
56
+ // Same single-Client pattern as the sites upgrade above.
57
+ base.assets = new NodeAssets(client);
54
58
  return base;
55
59
  }
56
60
  export { NodeSites } from "./sites-node.js";
57
61
  export { fileSetFromDir, normalizeRelPath } from "./files.js";
62
+ // v1.48 unified-apply: Node-only `assets.{uploadDir,syncDir,prepareDir,
63
+ // putMany}` ergonomics + `dir(path)` LocalDirRef helper. The
64
+ // `dir(path)` call is synchronous (per design D12); the filesystem
65
+ // walk happens at apply() submission time.
66
+ export { NodeAssets, dir, PruneConfirmationRequired } from "./assets-node.js";
58
67
  export { loadDeployManifest, normalizeDeployManifest } from "./deploy-manifest.js";
59
68
  export { signCiDelegation } from "./ci.js";
60
69
  export { NodeCredentialsProvider } from "./credentials.js";
@@ -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;AAGzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAuB5C;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAAC,OAA0B,EAAE;IACjD,MAAM,OAAO,GAAkB;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,UAAU,EAAE;QACrC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,IAAI,uBAAuB,CAAC;YAC3D,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,IAA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K5C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9D,wEAAwE;AACxE,6DAA6D;AAC7D,mEAAmE;AACnE,2CAA2C;AAC3C,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAY9E,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAcnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,6EAA6E;AAC7E,OAAO,EACL,MAAM,EACN,WAAW,EACX,eAAe,EACf,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,8BAA8B,EAC9B,kBAAkB,EAClB,EAAE,EACF,sBAAsB,EACtB,MAAM,EACN,KAAK,EACL,WAAW,EACX,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,EAC5B,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,+BAA+B,EAC/B,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,SAAS,GACV,MAAM,aAAa,CAAC"}
package/dist/scoped.d.ts CHANGED
@@ -22,7 +22,7 @@ import type { ExposeManifestValidationInput, ExposeManifestValidationResult, Lis
22
22
  import type { AppDetails, BrowseAppsResult, ForkAppOptions, ForkAppResult, ListVersionsResult, PublishAppOptions, PublishedVersion, UpdateVersionOptions } from "./namespaces/apps.js";
23
23
  import type { AiUsageResult, GenerateImageOptions, GenerateImageResult, ModerateResult, TranslateOptions, TranslateResult } from "./namespaces/ai.js";
24
24
  import type { AuthSettings, AuthSettingsResult, AuthSessionResult, AuthUserAdminResult, CreateAuthUserOptions, MagicLinkOptions, MagicLinkVerifyResult, PasskeyDeleteOptions, PasskeyListOptions, PasskeyLoginOptions, PasskeyLoginVerifyOptions, PasskeyOptionsResult, PasskeyRecord, PasskeyRegistrationOptions, PasskeyRegistrationVerifyOptions, SetPasswordOptions } from "./namespaces/auth.js";
25
- import type { BlobDiagnoseEnvelope, BlobLsOptions, BlobLsResult, BlobPutOptions, BlobPutResult, BlobPutSource, BlobSignOptions, BlobSignResult, BlobUploadCompleteOptions, BlobUploadCompleteResult, BlobUploadInitOptions, BlobUploadInitResult, BlobUploadStatusResult, BlobWaitFreshOptions, BlobWaitFreshResult } from "./namespaces/blobs.types.js";
25
+ import type { BlobDiagnoseEnvelope, BlobLsOptions, BlobLsResult, BlobPutOptions, BlobPutResult, BlobPutSource, BlobSignOptions, BlobSignResult, BlobUploadCompleteOptions, BlobUploadCompleteResult, BlobUploadInitOptions, BlobUploadInitResult, BlobUploadStatusResult, BlobWaitFreshOptions, BlobWaitFreshResult } from "./namespaces/assets.types.js";
26
26
  import type { ContractCallOptions, ContractReadOptions, ProvisionWalletOptions } from "./namespaces/contracts.js";
27
27
  import type { CustomDomainAddResult, CustomDomainListResult, CustomDomainRemoveResult, CustomDomainStatusResult } from "./namespaces/domains.js";
28
28
  import type { CreateMailboxResult, DeleteMailboxResult, EmailDetail, EmailSummary, ListEmailsOptions, MailboxInfo, MailboxWebhookSummary, MailboxWebhooksResult, RawEmailResult, RegisterWebhookOptions, SendEmailOptions, SendEmailResult, UpdateWebhookOptions } from "./namespaces/email.js";
@@ -97,7 +97,7 @@ declare class ScopedAuth {
97
97
  promote(email: string): Promise<void>;
98
98
  demote(email: string): Promise<void>;
99
99
  }
100
- declare class ScopedBlobs {
100
+ declare class ScopedAssets {
101
101
  private readonly parent;
102
102
  private readonly projectId;
103
103
  constructor(parent: Run402, projectId: string);
@@ -129,16 +129,17 @@ declare class ScopedContracts {
129
129
  deleteWallet(walletId: string): Promise<unknown>;
130
130
  read(opts: ContractReadOptions): Promise<unknown>;
131
131
  }
132
- declare class ScopedDeploy {
133
- private readonly parent;
134
- private readonly projectId;
135
- constructor(parent: Run402, projectId: string);
136
- apply(spec: Omit<ReleaseSpec, "project"> & {
132
+ /**
133
+ * Callable hero shape for `r.project(id).apply`. The function form is the
134
+ * documented happy path; the attached `plan`/`start`/`resume` sub-methods
135
+ * are advanced primitives for callers building their own plan/upload/commit
136
+ * pipelines. Per design D5 the hero is the only public apply surface no
137
+ * bare `r.apply`, no `r.deploy.apply`, no `r.assets.apply`.
138
+ */
139
+ export interface ScopedApplyHero {
140
+ (spec: Omit<ReleaseSpec, "project"> & {
137
141
  project?: string;
138
142
  }, opts?: ApplyOptions): Promise<DeployResult>;
139
- start(spec: Omit<ReleaseSpec, "project"> & {
140
- project?: string;
141
- }, opts?: StartOptions): Promise<DeployOperation>;
142
143
  plan(spec: Omit<ReleaseSpec, "project"> & {
143
144
  project?: string;
144
145
  }, opts?: {
@@ -148,6 +149,18 @@ declare class ScopedDeploy {
148
149
  plan: PlanResponse;
149
150
  byteReaders: Map<string, ByteReader>;
150
151
  }>;
152
+ start(spec: Omit<ReleaseSpec, "project"> & {
153
+ project?: string;
154
+ }, opts?: StartOptions): Promise<DeployOperation>;
155
+ resume(operationId: string, opts?: {
156
+ onEvent?: (event: DeployEvent) => void;
157
+ project?: string;
158
+ }): Promise<DeployResult>;
159
+ }
160
+ declare class ScopedDeploy {
161
+ private readonly parent;
162
+ private readonly projectId;
163
+ constructor(parent: Run402, projectId: string);
151
164
  upload(plan: PlanResponse, opts: {
152
165
  project?: string;
153
166
  byteReaders: Map<string, ByteReader>;
@@ -178,7 +191,6 @@ declare class ScopedDeploy {
178
191
  project?: string;
179
192
  }): Promise<ReleaseToReleaseDiff>;
180
193
  resolve(opts: ScopedDeployResolveOptions): Promise<DeployResolveResponse>;
181
- private bindProject;
182
194
  }
183
195
  declare class ScopedDomains {
184
196
  private readonly parent;
@@ -258,8 +270,22 @@ export declare class ScopedRun402 {
258
270
  readonly apps: ScopedApps;
259
271
  readonly ai: ScopedAi;
260
272
  readonly auth: ScopedAuth;
261
- readonly blobs: ScopedBlobs;
273
+ readonly assets: ScopedAssets;
262
274
  readonly contracts: ScopedContracts;
275
+ /**
276
+ * Hero apply surface. Per design D5 / unified-apply: `r.project(id).apply(spec)`
277
+ * is the documented happy path for both release-only and mixed apply.
278
+ * Callable directly, with `.plan(spec)` / `.start(spec)` / `.resume(opId)`
279
+ * sub-methods for advanced plan-upload-commit pipelines.
280
+ */
281
+ readonly apply: ScopedApplyHero;
282
+ /**
283
+ * Release/operation read primitives — events streams, status reads,
284
+ * release inventory + diff, operation list, resolve. Distinct from the
285
+ * hero `apply` which is for writes. The legacy `.deploy.apply` /
286
+ * `.deploy.start` / `.deploy.plan` aliases were removed in v1.48
287
+ * (use `r.project(id).apply` directly).
288
+ */
263
289
  readonly deploy: ScopedDeploy;
264
290
  readonly domains: ScopedDomains;
265
291
  readonly email: ScopedEmail;