@relayflows/sdk 2.0.14 → 2.0.16

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 (98) hide show
  1. package/dist/agent-artifacts.d.ts +20 -0
  2. package/dist/agent-artifacts.d.ts.map +1 -0
  3. package/dist/agent-artifacts.js +81 -0
  4. package/dist/agent-artifacts.js.map +1 -0
  5. package/dist/authored-flow-executor.d.ts +33 -3
  6. package/dist/authored-flow-executor.d.ts.map +1 -1
  7. package/dist/authored-flow-executor.js +56 -10
  8. package/dist/authored-flow-executor.js.map +1 -1
  9. package/dist/authored-node-runner.d.ts.map +1 -1
  10. package/dist/authored-node-runner.js +11 -4
  11. package/dist/authored-node-runner.js.map +1 -1
  12. package/dist/authored-root.d.ts.map +1 -1
  13. package/dist/authored-root.js +2 -2
  14. package/dist/authored-root.js.map +1 -1
  15. package/dist/authored-step-output.d.ts +2 -0
  16. package/dist/authored-step-output.d.ts.map +1 -1
  17. package/dist/authored-step-output.js +5 -1
  18. package/dist/authored-step-output.js.map +1 -1
  19. package/dist/authored-worker-step.d.ts.map +1 -1
  20. package/dist/authored-worker-step.js +19 -1
  21. package/dist/authored-worker-step.js.map +1 -1
  22. package/dist/cli/check-triggers.d.ts.map +1 -1
  23. package/dist/cli/check-triggers.js +14 -3
  24. package/dist/cli/check-triggers.js.map +1 -1
  25. package/dist/cli/check.js +6 -1
  26. package/dist/cli/check.js.map +1 -1
  27. package/dist/cli/cloud-deploy.d.ts +30 -0
  28. package/dist/cli/cloud-deploy.d.ts.map +1 -0
  29. package/dist/cli/cloud-deploy.js +162 -0
  30. package/dist/cli/cloud-deploy.js.map +1 -0
  31. package/dist/cli/cloud-run.d.ts +3 -1
  32. package/dist/cli/cloud-run.d.ts.map +1 -1
  33. package/dist/cli/cloud-run.js +37 -5
  34. package/dist/cli/cloud-run.js.map +1 -1
  35. package/dist/cli/cloud-sync.d.ts +13 -0
  36. package/dist/cli/cloud-sync.d.ts.map +1 -0
  37. package/dist/cli/cloud-sync.js +39 -0
  38. package/dist/cli/cloud-sync.js.map +1 -0
  39. package/dist/cli/direct-run.d.ts.map +1 -1
  40. package/dist/cli/direct-run.js +2 -26
  41. package/dist/cli/direct-run.js.map +1 -1
  42. package/dist/cli/run.d.ts +20 -1
  43. package/dist/cli/run.d.ts.map +1 -1
  44. package/dist/cli/run.js +77 -15
  45. package/dist/cli/run.js.map +1 -1
  46. package/dist/cli.d.ts.map +1 -1
  47. package/dist/cli.js +82 -12
  48. package/dist/cli.js.map +1 -1
  49. package/dist/cloud-deploy.d.ts +70 -0
  50. package/dist/cloud-deploy.d.ts.map +1 -0
  51. package/dist/cloud-deploy.js +181 -0
  52. package/dist/cloud-deploy.js.map +1 -0
  53. package/dist/cloud-http.d.ts +37 -2
  54. package/dist/cloud-http.d.ts.map +1 -1
  55. package/dist/cloud-http.js +98 -8
  56. package/dist/cloud-http.js.map +1 -1
  57. package/dist/cloud-run.d.ts +23 -0
  58. package/dist/cloud-run.d.ts.map +1 -1
  59. package/dist/cloud-run.js +30 -1
  60. package/dist/cloud-run.js.map +1 -1
  61. package/dist/cloud-sync.d.ts +66 -0
  62. package/dist/cloud-sync.d.ts.map +1 -0
  63. package/dist/cloud-sync.js +287 -0
  64. package/dist/cloud-sync.js.map +1 -0
  65. package/dist/failure-kinds.d.ts +8 -1
  66. package/dist/failure-kinds.d.ts.map +1 -1
  67. package/dist/failure-kinds.js +8 -0
  68. package/dist/failure-kinds.js.map +1 -1
  69. package/dist/index.d.ts +2 -0
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +2 -0
  72. package/dist/index.js.map +1 -1
  73. package/dist/provider-trigger-contract.d.ts +27 -0
  74. package/dist/provider-trigger-contract.d.ts.map +1 -0
  75. package/dist/provider-trigger-contract.js +0 -0
  76. package/dist/provider-trigger-contract.js.map +1 -0
  77. package/package.json +2 -2
  78. package/src/agent-artifacts.ts +76 -0
  79. package/src/authored-flow-executor.ts +77 -15
  80. package/src/authored-node-runner.ts +11 -4
  81. package/src/authored-root.ts +2 -2
  82. package/src/authored-step-output.ts +6 -1
  83. package/src/authored-worker-step.ts +19 -1
  84. package/src/cli/check-triggers.ts +14 -5
  85. package/src/cli/check.ts +6 -1
  86. package/src/cli/cloud-deploy.ts +157 -0
  87. package/src/cli/cloud-run.ts +37 -6
  88. package/src/cli/cloud-sync.ts +37 -0
  89. package/src/cli/direct-run.ts +2 -25
  90. package/src/cli/run.ts +86 -16
  91. package/src/cli.ts +75 -12
  92. package/src/cloud-deploy.ts +236 -0
  93. package/src/cloud-http.ts +129 -9
  94. package/src/cloud-run.ts +47 -1
  95. package/src/cloud-sync.ts +315 -0
  96. package/src/failure-kinds.ts +8 -0
  97. package/src/index.ts +8 -0
  98. package/src/provider-trigger-contract.ts +0 -0
@@ -0,0 +1,315 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ import { createReadStream, createWriteStream, existsSync, lstatSync, mkdtempSync, readdirSync, readlinkSync, rmSync } from 'node:fs';
3
+ import { readFile } from 'node:fs/promises';
4
+ import { tmpdir } from 'node:os';
5
+ import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
6
+ import { Readable } from 'node:stream';
7
+ import { pipeline } from 'node:stream/promises';
8
+ import { createGzip } from 'node:zlib';
9
+ import {
10
+ CloudFlowError, cloudFetch, cloudRequest, cloudRunId, isCloudRecord, type CloudConnectionOptions,
11
+ } from './cloud-http.js';
12
+
13
+ /**
14
+ * Code sync for hosted v2 runs, Cloud-API transport only.
15
+ *
16
+ * v1's `--sync-code` had two transports: an S3 client with STS credentials and
17
+ * the Cloud API's own storage route. v2 runs on Cloudflare, so this module
18
+ * speaks only the second: `prepare` must answer with a `cloud-api` storage
19
+ * backend, the tarball is `PUT` to `/workflows/runs/<id>/storage/<key>`, and
20
+ * the sandbox's post-run patch is read from `/workflows/runs/<id>/patch`. A
21
+ * `prepare` that hands back anything else is refused before any upload — the
22
+ * SDK never carries an AWS dependency and never sends code to a bucket it did
23
+ * not get through the Cloud API.
24
+ */
25
+
26
+ /** Uncompressed bytes. Matches the sandbox's extraction budget with headroom. */
27
+ export const MAX_SYNC_BYTES = 256 * 1024 * 1024;
28
+ const ALWAYS_SKIPPED = new Set(['.git', 'node_modules']);
29
+ const CODE_KEY = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u;
30
+
31
+ export interface PreparedCloudSync {
32
+ runId: string;
33
+ codeKey: string;
34
+ /** Run-scoped upload credential from `prepare`; falls back to the session token. */
35
+ uploadToken?: string;
36
+ }
37
+
38
+ /** `POST /api/v1/workflows/prepare`, refusing every non-Cloud-API storage backend. */
39
+ export async function prepareCloudSync(options: CloudConnectionOptions): Promise<PreparedCloudSync> {
40
+ const receipt = await cloudFetch('/api/v1/workflows/prepare', options, { method: 'POST' });
41
+ if (!isCloudRecord(receipt)) throw new CloudFlowError('invalid_response', 'Cloud prepare returned a non-object.');
42
+ const storage = isCloudRecord(receipt.workflowStorage) ? receipt.workflowStorage : undefined;
43
+ const credentials = isCloudRecord(receipt.s3Credentials) ? receipt.s3Credentials : undefined;
44
+ const backend = storage?.backend ?? credentials?.backend;
45
+ if (backend !== 'cloud-api') {
46
+ throw new CloudFlowError('unsupported_storage_backend',
47
+ 'Cloud offered a workflow storage backend other than the Cloud API (R2). '
48
+ + 'flows v2 syncs code only through the Cloud API; it never uploads to AWS directly.');
49
+ }
50
+ const codeKey = typeof receipt.s3CodeKey === 'string' ? receipt.s3CodeKey : '';
51
+ if (!CODE_KEY.test(codeKey)) throw new CloudFlowError('invalid_response', 'Cloud prepare returned an unusable code key.');
52
+ const uploadToken = credentials?.cloudApiAccessToken;
53
+ if (uploadToken !== undefined && typeof uploadToken !== 'string') {
54
+ throw new CloudFlowError('invalid_response', 'Cloud prepare returned an unusable storage credential.');
55
+ }
56
+ return {
57
+ runId: cloudRunId(receipt.runId), codeKey,
58
+ ...(uploadToken === undefined ? {} : { uploadToken }),
59
+ };
60
+ }
61
+
62
+ export interface PackedTree {
63
+ /** The gzip'd ustar, spooled to a temporary file; `dispose()` removes it. */
64
+ archivePath: string;
65
+ /** Archive members, `root`-relative POSIX paths, sorted. */
66
+ files: string[];
67
+ /** Uncompressed byte total across regular files. */
68
+ bytes: number;
69
+ /** Symlinks left out because their target resolves outside `root`. */
70
+ skippedLinks: string[];
71
+ dispose(): void;
72
+ }
73
+
74
+ /**
75
+ * gzip'd ustar of the working tree at `root`, streamed to a temporary file so
76
+ * the peak footprint is one file plus the compressor's window, never the
77
+ * whole tree. Inside a Git checkout the member list is `git ls-files --cached
78
+ * --others --exclude-standard`, so `.gitignore` governs and untracked-but-
79
+ * not-ignored files ride along, as they do in v1. Outside Git, every regular
80
+ * file and in-tree symlink except `.git`/`node_modules`. A Git failure other
81
+ * than "not a repository" is refused rather than silently widened to the walk:
82
+ * an ignored `.env` must never reach Cloud because `git` was missing or the
83
+ * index was locked. Executable bits survive; symlinks whose target leaves the
84
+ * tree are dropped and reported, since on the host they would point at
85
+ * whatever happens to live at that path. Ordering and mtimes are
86
+ * deterministic, so the same tree packs to the same bytes.
87
+ */
88
+ export async function packWorkingTree(root: string): Promise<PackedTree> {
89
+ const absoluteRoot = resolve(root);
90
+ const files = listTreeFiles(absoluteRoot);
91
+ const spool = mkdtempSync(join(tmpdir(), 'flows-sync-'));
92
+ const archivePath = join(spool, 'code.tar.gz');
93
+ const dispose = (): void => rmSync(spool, { recursive: true, force: true });
94
+ const members: string[] = [];
95
+ const skippedLinks: string[] = [];
96
+ let bytes = 0;
97
+ async function* entries(): AsyncGenerator<Buffer | NodeJS.ReadableStream> {
98
+ for (const path of files) {
99
+ const absolute = join(absoluteRoot, ...path.split('/'));
100
+ const stat = lstatSync(absolute);
101
+ if (stat.isSymbolicLink()) {
102
+ const target = readlinkSync(absolute);
103
+ const relativeTarget = relative(absoluteRoot, resolve(dirname(absolute), target));
104
+ if (isAbsolute(target) || relativeTarget === '..' || relativeTarget.startsWith(`..${sep}`)) {
105
+ skippedLinks.push(path);
106
+ continue;
107
+ }
108
+ members.push(path);
109
+ yield ustarHeader(path, 0, '2', 0o777, target);
110
+ continue;
111
+ }
112
+ if (!stat.isFile()) continue;
113
+ bytes += stat.size;
114
+ if (bytes > MAX_SYNC_BYTES) {
115
+ throw new CloudFlowError('sync_too_large',
116
+ `The working tree exceeds the ${MAX_SYNC_BYTES}-byte code sync limit; narrow it with .gitignore.`);
117
+ }
118
+ members.push(path);
119
+ yield ustarHeader(path, stat.size, '0', stat.mode & 0o111 ? 0o755 : 0o644);
120
+ yield createReadStream(absolute);
121
+ const padding = (512 - (stat.size % 512)) % 512;
122
+ if (padding) yield Buffer.alloc(padding);
123
+ }
124
+ yield Buffer.alloc(1024);
125
+ }
126
+ try {
127
+ await pipeline(Readable.from(flatten(entries())), createGzip({ level: 6 }), createWriteStream(archivePath));
128
+ } catch (error) {
129
+ dispose();
130
+ throw error;
131
+ }
132
+ return { archivePath, files: members, bytes, skippedLinks, dispose };
133
+ }
134
+
135
+ /** Yield file streams chunk by chunk so `Readable.from` never buffers a whole file. */
136
+ async function* flatten(source: AsyncGenerator<Buffer | NodeJS.ReadableStream>): AsyncGenerator<Buffer> {
137
+ for await (const part of source) {
138
+ if (Buffer.isBuffer(part)) { yield part; continue; }
139
+ for await (const chunk of part as AsyncIterable<Buffer>) yield chunk;
140
+ }
141
+ }
142
+
143
+ /** The nearest `.git` entry at `root` or any ancestor — the checkout a .gitignore would belong to. */
144
+ function nearestGitEntry(root: string): string | undefined {
145
+ let directory = root;
146
+ while (true) {
147
+ if (existsSync(join(directory, '.git'))) return join(directory, '.git');
148
+ const parent = dirname(directory);
149
+ if (parent === directory) return undefined;
150
+ directory = parent;
151
+ }
152
+ }
153
+
154
+ function listTreeFiles(root: string): string[] {
155
+ const inside = spawnSync('git', ['-C', root, 'rev-parse', '--is-inside-work-tree'], { encoding: 'utf8' });
156
+ if (inside.error !== undefined) {
157
+ // Without git there is no way to honour a .gitignore, so a tree that has
158
+ // one anywhere above it cannot be described honestly; a tree with none is
159
+ // a plain directory and can be walked.
160
+ const entry = nearestGitEntry(root);
161
+ if (entry !== undefined) {
162
+ throw new CloudFlowError('sync_unsupported',
163
+ `git is not available (${summarize(inside.error.message)}) but ${entry} exists; `
164
+ + 'refusing to upload a checkout without its .gitignore.');
165
+ }
166
+ }
167
+ const notARepository = inside.error !== undefined
168
+ || (inside.status !== 0 && /not a git repository/iu.test(inside.stderr));
169
+ let candidates: string[];
170
+ if (notARepository) {
171
+ // A `.git` that git itself cannot read — here or in a parent — is a broken
172
+ // checkout, not a plain directory: its .gitignore was meant to apply, so
173
+ // walking would upload exactly what it excluded.
174
+ const entry = nearestGitEntry(root);
175
+ if (entry !== undefined) {
176
+ throw new CloudFlowError('sync_unsupported',
177
+ `${entry} exists but git cannot read it (${summarize(inside.stderr ?? inside.error?.message)}); `
178
+ + 'refusing to upload a checkout without its .gitignore.');
179
+ }
180
+ candidates = [];
181
+ walk(root, root, candidates);
182
+ } else {
183
+ if (inside.status !== 0 || inside.stdout.trim() !== 'true') {
184
+ throw new CloudFlowError('sync_unsupported',
185
+ `git could not describe ${root} (${summarize(inside.stderr)}); refusing to guess which files to upload.`);
186
+ }
187
+ const git = spawnSync('git', ['-C', root, 'ls-files', '-z', '--cached', '--others', '--exclude-standard'],
188
+ { encoding: 'utf8', maxBuffer: 256 * 1024 * 1024 });
189
+ if (git.status !== 0) {
190
+ throw new CloudFlowError('sync_unsupported',
191
+ `git ls-files failed in ${root} (${summarize(git.stderr)}); refusing to upload without .gitignore.`);
192
+ }
193
+ candidates = git.stdout.split('\0').filter(Boolean);
194
+ }
195
+ const files = new Set<string>();
196
+ for (const candidate of candidates) {
197
+ const path = candidate.split(sep).join('/');
198
+ const segments = path.split('/');
199
+ if (segments.some(segment => ALWAYS_SKIPPED.has(segment) || segment === '..' || segment === '')) continue;
200
+ let stat;
201
+ try { stat = lstatSync(join(root, ...segments)); } catch { continue; }
202
+ if (stat.isFile() || stat.isSymbolicLink()) files.add(path);
203
+ }
204
+ return [...files].sort();
205
+ }
206
+
207
+ function summarize(stderr: string | undefined): string {
208
+ const line = (stderr ?? '').split('\n').map(l => l.trim()).find(Boolean) ?? 'no diagnostic';
209
+ return line.length > 160 ? `${line.slice(0, 157)}...` : line;
210
+ }
211
+
212
+ function walk(root: string, current: string, out: string[]): void {
213
+ for (const entry of readdirSync(current, { withFileTypes: true })) {
214
+ if (ALWAYS_SKIPPED.has(entry.name)) continue;
215
+ const path = join(current, entry.name);
216
+ if (entry.isDirectory()) walk(root, path, out);
217
+ else if (entry.isFile() || entry.isSymbolicLink()) out.push(relative(root, path));
218
+ }
219
+ }
220
+
221
+ /** POSIX ustar header. Names beyond the 100+155 split are refused, not truncated. */
222
+ function ustarHeader(path: string, size: number, type: '0' | '2', mode: number, link = ''): Buffer {
223
+ let name = path;
224
+ let prefix = '';
225
+ if (Buffer.byteLength(name) > 100) {
226
+ const cut = name.lastIndexOf('/', 154);
227
+ if (cut <= 0 || Buffer.byteLength(name.slice(cut + 1)) > 100 || Buffer.byteLength(name.slice(0, cut)) > 155) {
228
+ throw new CloudFlowError('sync_unsupported', `Path "${path}" is too long for the code sync archive.`);
229
+ }
230
+ prefix = name.slice(0, cut);
231
+ name = name.slice(cut + 1);
232
+ }
233
+ if (Buffer.byteLength(link) > 100) {
234
+ throw new CloudFlowError('sync_unsupported', `Symlink target of "${path}" is too long for the code sync archive.`);
235
+ }
236
+ const header = Buffer.alloc(512);
237
+ header.write(name, 0, 100);
238
+ header.write(mode.toString(8).padStart(7, '0'), 100, 8);
239
+ header.write('0000000', 108, 8);
240
+ header.write('0000000', 116, 8);
241
+ header.write(size.toString(8).padStart(11, '0'), 124, 12);
242
+ header.write('00000000000', 136, 12);
243
+ header.write(' ', 148, 8);
244
+ header.write(type, 156, 1);
245
+ header.write(link, 157, 100);
246
+ header.write('ustar\0', 257, 6);
247
+ header.write('00', 263, 2);
248
+ header.write(prefix, 345, 155);
249
+ let checksum = 0;
250
+ for (const byte of header) checksum += byte;
251
+ header.write(checksum.toString(8).padStart(6, '0') + '\0 ', 148, 8);
252
+ return header;
253
+ }
254
+
255
+ /** `PUT` the archive through the Cloud API; the run-scoped credential wins when present. */
256
+ export async function uploadCloudCode(
257
+ prepared: PreparedCloudSync, packed: PackedTree, options: CloudConnectionOptions,
258
+ ): Promise<void> {
259
+ // The request needs a sized body, so the compressed archive is read back
260
+ // once; that is the one copy that has to exist, and it is the small one.
261
+ const tarball = await readFile(packed.archivePath);
262
+ await cloudFetch(
263
+ `/api/v1/workflows/runs/${encodeURIComponent(prepared.runId)}/storage/${encodeURIComponent(prepared.codeKey)}`,
264
+ { ...options, requestTimeoutMs: options.requestTimeoutMs ?? 300_000 },
265
+ { method: 'PUT', body: tarball, contentType: 'application/gzip',
266
+ ...(prepared.uploadToken === undefined ? {} : { bearerToken: prepared.uploadToken }) },
267
+ );
268
+ }
269
+
270
+ export interface CloudPatch {
271
+ patch: string;
272
+ hasChanges: boolean;
273
+ }
274
+
275
+ /** The sandbox's post-run diff. Multi-path runs carry several patches and are refused here. */
276
+ export async function downloadCloudPatch(runId: string, options: CloudConnectionOptions): Promise<CloudPatch> {
277
+ const payload = await cloudRequest(`/api/v1/workflows/runs/${encodeURIComponent(cloudRunId(runId))}/patch`, options);
278
+ if (!isCloudRecord(payload)) throw new CloudFlowError('invalid_response', 'Cloud patch response was not an object.');
279
+ if (isCloudRecord(payload.patches)) {
280
+ const names = Object.keys(payload.patches);
281
+ throw new CloudFlowError('sync_unsupported',
282
+ `Run ${runId} produced ${names.length} path-scoped patches (${names.join(', ')}); flows sync applies single-tree runs only.`);
283
+ }
284
+ if (typeof payload.patch !== 'string' || typeof payload.hasChanges !== 'boolean') {
285
+ throw new CloudFlowError('invalid_response', 'Cloud patch response is missing patch or hasChanges.');
286
+ }
287
+ return { patch: payload.patch, hasChanges: payload.hasChanges };
288
+ }
289
+
290
+ /** Every path a unified diff touches, deletions included, in order of first appearance. */
291
+ export function patchedPaths(patch: string): string[] {
292
+ const paths: string[] = [];
293
+ for (const match of patch.matchAll(/^diff --git a\/(.+?) b\/(.+)$/gmu)) {
294
+ for (const path of [match[1]!, match[2]!]) if (!paths.includes(path)) paths.push(path);
295
+ }
296
+ return paths;
297
+ }
298
+
299
+ /**
300
+ * `git apply --check` then `git apply`; a conflict leaves the tree untouched.
301
+ * The patch lands in the working tree uncommitted, so what the run changed is
302
+ * reviewed with `git diff` before anything is kept — the same contract as v1.
303
+ */
304
+ export function applyCloudPatch(root: string, patch: string): void {
305
+ const args = ['-C', resolve(root), 'apply', '--whitespace=nowarn'];
306
+ const check = spawnSync('git', [...args, '--check'], { input: patch, encoding: 'utf8' });
307
+ if (check.status !== 0) {
308
+ throw new CloudFlowError('patch_conflict',
309
+ `The patch does not apply cleanly to ${resolve(root)}:\n${check.stderr.trim()}`);
310
+ }
311
+ const apply = spawnSync('git', args, { input: patch, encoding: 'utf8' });
312
+ if (apply.status !== 0) {
313
+ throw new CloudFlowError('patch_conflict', `git apply failed:\n${apply.stderr.trim()}`);
314
+ }
315
+ }
@@ -85,6 +85,13 @@ export const PREFLIGHT_WARNING_KINDS = [
85
85
  * serving and this invocation was told not to start one" (`--no-spawn`), while
86
86
  * a spawn that was attempted and did not produce a serving daemon names which
87
87
  * step failed. All of them are still exit 2 — refused before a journal write.
88
+ *
89
+ * Despite the name, this list is the run-outcome diagnostic vocabulary rather
90
+ * than failures alone. `run_parked` has always sat here and exits 3 under
91
+ * severity `parked`; `run_declined` joins it, exiting 0 under severity
92
+ * `declined`. The mismatch between the constant's name and its non-failure
93
+ * members is pre-existing — renaming it is a separate change, and neither this
94
+ * list nor `RunDiagnostic` is exported from the package index.
88
95
  */
89
96
  export const RUN_FAILURE_KINDS = [
90
97
  'bucket_unconfigured',
@@ -102,6 +109,7 @@ export const RUN_FAILURE_KINDS = [
102
109
  'relayflowd_not_found',
103
110
  'protocol_error',
104
111
  'run_parked',
112
+ 'run_declined',
105
113
  'run_unavailable',
106
114
  ] as const;
107
115
 
package/src/index.ts CHANGED
@@ -63,6 +63,14 @@ export {
63
63
  runInCloud, getCloudFlowRun, waitForCloudFlowRun,
64
64
  type CloudFlowSource, type RunInCloudOptions, type CloudRunReceipt, type CloudRunState,
65
65
  } from './cloud-run.js';
66
+ export {
67
+ downloadCloudPatch, applyCloudPatch, packWorkingTree, patchedPaths, MAX_SYNC_BYTES,
68
+ type CloudPatch, type PackedTree,
69
+ } from './cloud-sync.js';
70
+ export {
71
+ deployToCloud, listCloudDeployments, undeployFromCloud, parseRepository, parseTriggerSource, FLOW_TRIGGER_PROVIDERS,
72
+ type DeployToCloudInput, type CloudDeployment, type CloudDeploymentSummary, type FlowTriggerSource, type FlowTriggerProvider,
73
+ } from './cloud-deploy.js';
66
74
 
67
75
  export { canonicalize, specHash } from './canonical.js';
68
76
  export {
Binary file