@fluidgrids/cli 2026.1021.1 → 2026.1028.2

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 (134) hide show
  1. package/README.md +157 -5
  2. package/dist/auth/device-login.d.ts +31 -0
  3. package/dist/auth/device-login.d.ts.map +1 -0
  4. package/dist/auth/device-login.js +75 -0
  5. package/dist/auth/device-login.js.map +1 -0
  6. package/dist/auth/token-auth.d.ts +49 -0
  7. package/dist/auth/token-auth.d.ts.map +1 -0
  8. package/dist/auth/token-auth.js +279 -0
  9. package/dist/auth/token-auth.js.map +1 -0
  10. package/dist/cli.d.ts +4 -5
  11. package/dist/cli.d.ts.map +1 -1
  12. package/dist/cli.js +18 -32
  13. package/dist/cli.js.map +1 -1
  14. package/dist/code-first/api.d.ts +357 -0
  15. package/dist/code-first/api.d.ts.map +1 -0
  16. package/dist/code-first/api.js +288 -0
  17. package/dist/code-first/api.js.map +1 -0
  18. package/dist/code-first/code-upload.d.ts +52 -0
  19. package/dist/code-first/code-upload.d.ts.map +1 -0
  20. package/dist/code-first/code-upload.js +161 -0
  21. package/dist/code-first/code-upload.js.map +1 -0
  22. package/dist/code-first/commands/codegen.d.ts +20 -0
  23. package/dist/code-first/commands/codegen.d.ts.map +1 -0
  24. package/dist/code-first/commands/codegen.js +50 -0
  25. package/dist/code-first/commands/codegen.js.map +1 -0
  26. package/dist/code-first/commands/diff.d.ts +28 -0
  27. package/dist/code-first/commands/diff.d.ts.map +1 -0
  28. package/dist/code-first/commands/diff.js +73 -0
  29. package/dist/code-first/commands/diff.js.map +1 -0
  30. package/dist/code-first/commands/hotfix.d.ts +54 -0
  31. package/dist/code-first/commands/hotfix.d.ts.map +1 -0
  32. package/dist/code-first/commands/hotfix.js +225 -0
  33. package/dist/code-first/commands/hotfix.js.map +1 -0
  34. package/dist/code-first/commands/import.d.ts +40 -0
  35. package/dist/code-first/commands/import.d.ts.map +1 -0
  36. package/dist/code-first/commands/import.js +235 -0
  37. package/dist/code-first/commands/import.js.map +1 -0
  38. package/dist/code-first/commands/init.d.ts +33 -0
  39. package/dist/code-first/commands/init.d.ts.map +1 -0
  40. package/dist/code-first/commands/init.js +177 -0
  41. package/dist/code-first/commands/init.js.map +1 -0
  42. package/dist/code-first/commands/interface.d.ts +12 -0
  43. package/dist/code-first/commands/interface.d.ts.map +1 -0
  44. package/dist/code-first/commands/interface.js +21 -0
  45. package/dist/code-first/commands/interface.js.map +1 -0
  46. package/dist/code-first/commands/pull.d.ts +63 -0
  47. package/dist/code-first/commands/pull.d.ts.map +1 -0
  48. package/dist/code-first/commands/pull.js +266 -0
  49. package/dist/code-first/commands/pull.js.map +1 -0
  50. package/dist/code-first/commands/push.d.ts +97 -0
  51. package/dist/code-first/commands/push.d.ts.map +1 -0
  52. package/dist/code-first/commands/push.js +313 -0
  53. package/dist/code-first/commands/push.js.map +1 -0
  54. package/dist/code-first/commands/replay.d.ts +44 -0
  55. package/dist/code-first/commands/replay.d.ts.map +1 -0
  56. package/dist/code-first/commands/replay.js +238 -0
  57. package/dist/code-first/commands/replay.js.map +1 -0
  58. package/dist/code-first/commands/runs.d.ts +94 -0
  59. package/dist/code-first/commands/runs.d.ts.map +1 -0
  60. package/dist/code-first/commands/runs.js +304 -0
  61. package/dist/code-first/commands/runs.js.map +1 -0
  62. package/dist/code-first/commands/validate.d.ts +38 -0
  63. package/dist/code-first/commands/validate.d.ts.map +1 -0
  64. package/dist/code-first/commands/validate.js +140 -0
  65. package/dist/code-first/commands/validate.js.map +1 -0
  66. package/dist/code-first/commands/versions.d.ts +14 -0
  67. package/dist/code-first/commands/versions.d.ts.map +1 -0
  68. package/dist/code-first/commands/versions.js +30 -0
  69. package/dist/code-first/commands/versions.js.map +1 -0
  70. package/dist/code-first/connections.d.ts +55 -0
  71. package/dist/code-first/connections.d.ts.map +1 -0
  72. package/dist/code-first/connections.js +180 -0
  73. package/dist/code-first/connections.js.map +1 -0
  74. package/dist/code-first/durable-operations.d.ts +42 -0
  75. package/dist/code-first/durable-operations.d.ts.map +1 -0
  76. package/dist/code-first/durable-operations.js +136 -0
  77. package/dist/code-first/durable-operations.js.map +1 -0
  78. package/dist/code-first/history.d.ts +30 -0
  79. package/dist/code-first/history.d.ts.map +1 -0
  80. package/dist/code-first/history.js +139 -0
  81. package/dist/code-first/history.js.map +1 -0
  82. package/dist/code-first/imports.d.ts +22 -0
  83. package/dist/code-first/imports.d.ts.map +1 -0
  84. package/dist/code-first/imports.js +67 -0
  85. package/dist/code-first/imports.js.map +1 -0
  86. package/dist/code-first/index.d.ts +17 -0
  87. package/dist/code-first/index.d.ts.map +1 -0
  88. package/dist/code-first/index.js +35 -0
  89. package/dist/code-first/index.js.map +1 -0
  90. package/dist/code-first/lowering.d.ts +81 -0
  91. package/dist/code-first/lowering.d.ts.map +1 -0
  92. package/dist/code-first/lowering.js +225 -0
  93. package/dist/code-first/lowering.js.map +1 -0
  94. package/dist/code-first/operations.d.ts +57 -0
  95. package/dist/code-first/operations.d.ts.map +1 -0
  96. package/dist/code-first/operations.js +167 -0
  97. package/dist/code-first/operations.js.map +1 -0
  98. package/dist/code-first/presigned.d.ts +21 -0
  99. package/dist/code-first/presigned.d.ts.map +1 -0
  100. package/dist/code-first/presigned.js +85 -0
  101. package/dist/code-first/presigned.js.map +1 -0
  102. package/dist/code-first/project.d.ts +123 -0
  103. package/dist/code-first/project.d.ts.map +1 -0
  104. package/dist/code-first/project.js +301 -0
  105. package/dist/code-first/project.js.map +1 -0
  106. package/dist/code-first/python.d.ts +81 -0
  107. package/dist/code-first/python.d.ts.map +1 -0
  108. package/dist/code-first/python.js +249 -0
  109. package/dist/code-first/python.js.map +1 -0
  110. package/dist/code-first/register.d.ts +27 -0
  111. package/dist/code-first/register.d.ts.map +1 -0
  112. package/dist/code-first/register.js +270 -0
  113. package/dist/code-first/register.js.map +1 -0
  114. package/dist/code-first/remote.d.ts +58 -0
  115. package/dist/code-first/remote.d.ts.map +1 -0
  116. package/dist/code-first/remote.js +126 -0
  117. package/dist/code-first/remote.js.map +1 -0
  118. package/dist/code-first/replay.d.ts +36 -0
  119. package/dist/code-first/replay.d.ts.map +1 -0
  120. package/dist/code-first/replay.js +52 -0
  121. package/dist/code-first/replay.js.map +1 -0
  122. package/dist/code-first/shared.d.ts +51 -0
  123. package/dist/code-first/shared.d.ts.map +1 -0
  124. package/dist/code-first/shared.js +93 -0
  125. package/dist/code-first/shared.js.map +1 -0
  126. package/dist/modules.d.ts +4 -0
  127. package/dist/modules.d.ts.map +1 -1
  128. package/dist/modules.js +6 -0
  129. package/dist/modules.js.map +1 -1
  130. package/dist/program.d.ts +20 -0
  131. package/dist/program.d.ts.map +1 -0
  132. package/dist/program.js +43 -0
  133. package/dist/program.js.map +1 -0
  134. package/package.json +3 -1
@@ -0,0 +1,266 @@
1
+ /**
2
+ * `fluidgrids pull [key…] [--as ts|py|json] [--check]`: export workflows into
3
+ * the project (spec 07 §3, §7).
4
+ *
5
+ * Code is lifted locally with `@fluidgrids/workflows` (the library the service
6
+ * uses as well), and the fidelity report comes from lowering the lifted code
7
+ * and comparing `irHash`, never from heuristics. `--server` asks the service
8
+ * to render instead, which checks that the service and the CLI agree.
9
+ *
10
+ * The code format option is `--as`, because `-f/--format` is the CLI-wide
11
+ * output format (json, table, yaml). The spelling of spec 07 §7,
12
+ * `--format ts|py`, is accepted too: those two values cannot be output formats.
13
+ * `--format json` stays the output format; JSON files are pulled with `--as json`.
14
+ */
15
+ import { unlinkSync, existsSync } from 'fs';
16
+ import { join } from 'path';
17
+ import { CliUserError } from '@burdenoff/cli-sdk/core';
18
+ import { registrySnapshotHash } from '@fluidgrids/workflows/codegen';
19
+ import { buildExportDocument, irHash, serializeWorkflowDocument } from '@fluidgrids/workflows/ir';
20
+ import { exportWorkflowCode } from '@fluidgrids/workflows/roundtrip';
21
+ import { buildConnectionIndex, namesForDefinitions } from '../connections.js';
22
+ import { assertProjectWorkspace, GENERATED_DIR, isSidecar, loadProject, readProjectFile, safeRelativePath, WORKFLOW_FORMATS, WORKFLOWS_DIR, writeLock, writeProjectFile, } from '../project.js';
23
+ import { pickVersion, sortVersions } from '../remote.js';
24
+ import { writeNodeClients } from './codegen.js';
25
+ import { emit, parseChoice } from '../shared.js';
26
+ function isNodesFile(path) {
27
+ return path === `${GENERATED_DIR}/nodes.ts` || path === `${GENERATED_DIR}/nodes.py`;
28
+ }
29
+ function versionCreatedAt(versions, version) {
30
+ const found = versions.find((candidate) => candidate.version === version);
31
+ return found ? new Date(found.createdAt) : new Date(0);
32
+ }
33
+ /** The export envelope as Git sync writes it: exportedAt pinned to the version's creation time. */
34
+ export function envelopeFile(exported, createdAt) {
35
+ const document = buildExportDocument({
36
+ exportedAt: exported.exportedAt,
37
+ workflowKey: exported.workflowKey,
38
+ version: exported.version,
39
+ name: exported.name,
40
+ description: exported.description,
41
+ definitionJson: exported.definitionJson,
42
+ context: exported.context,
43
+ tags: exported.tags,
44
+ tagsV2: exported.tagsV2,
45
+ icon: exported.icon,
46
+ category: exported.category,
47
+ nodeReferences: exported.nodeReferences,
48
+ });
49
+ return {
50
+ path: `${WORKFLOWS_DIR}/${exported.workflowKey}.json`,
51
+ contentType: 'application/json',
52
+ content: serializeWorkflowDocument(document, createdAt),
53
+ };
54
+ }
55
+ function toLevel(level) {
56
+ return level.toLowerCase() === 'lossless' ? 'lossless' : 'lossy';
57
+ }
58
+ /** `--format ts|py` is the code format (spec 07 §7 spelling); any other value is the output format. */
59
+ export function splitFormat(options) {
60
+ const format = options.format;
61
+ if (format !== 'ts' && format !== 'py')
62
+ return { options, codeFormat: undefined };
63
+ if (options.as !== undefined && options.as !== format) {
64
+ throw new CliUserError(`--format ${format} and --as ${options.as} disagree.`);
65
+ }
66
+ const rest = { ...options };
67
+ delete rest.format;
68
+ return { options: rest, codeFormat: format };
69
+ }
70
+ async function keysToPull(env, project, keys) {
71
+ if (keys.length > 0)
72
+ return [...new Set(keys)];
73
+ const tracked = Object.keys(project.lock.workflows).sort();
74
+ if (tracked.length > 0)
75
+ return tracked;
76
+ return env.api.listWorkflowKeys();
77
+ }
78
+ export async function runPull(env, keys, rawOptions) {
79
+ const { options, codeFormat } = splitFormat(rawOptions);
80
+ const project = loadProject(options.project, env.cwd());
81
+ assertProjectWorkspace(env, project);
82
+ const requested = parseChoice(options.as ?? codeFormat, '--as', WORKFLOW_FORMATS);
83
+ if (options.wfVersion && keys.length !== 1) {
84
+ throw new CliUserError('--wf-version needs exactly one workflow key.');
85
+ }
86
+ if (options.server && requested === 'json') {
87
+ throw new CliUserError('--server renders code; JSON is always exported as stored.');
88
+ }
89
+ const targets = await keysToPull(env, project, keys);
90
+ if (targets.length === 0) {
91
+ throw new CliUserError('The workspace has no workflows to pull.');
92
+ }
93
+ const formats = new Map(targets.map((key) => [
94
+ key,
95
+ requested ?? project.lock.workflows[key]?.format ?? project.config.language,
96
+ ]));
97
+ const needsCode = [...formats.values()].some((format) => format !== 'json');
98
+ let registry = [];
99
+ let snapshot = '';
100
+ let namesById = {};
101
+ if (needsCode) {
102
+ // Both lifts name connections; only the local one needs the registry.
103
+ const [manifests, connections] = await Promise.all([
104
+ options.server ? Promise.resolve([]) : env.api.nodeManifests(),
105
+ env.api.connections(),
106
+ ]);
107
+ registry = manifests;
108
+ snapshot = registrySnapshotHash(manifests.filter((manifest) => !manifest.nodeType.startsWith('internal:')));
109
+ namesById = buildConnectionIndex(connections).namesById;
110
+ }
111
+ const items = [];
112
+ const writes = [];
113
+ const removals = [];
114
+ let clientsUsed;
115
+ for (const key of targets) {
116
+ const versions = sortVersions(await env.api.workflowVersions(key));
117
+ const target = options.wfVersion
118
+ ? pickVersion(versions, options.wfVersion)
119
+ : pickVersion(versions, 'latest');
120
+ if (!target) {
121
+ throw new CliUserError(versions.length === 0
122
+ ? `No workflow with key ${key} in this workspace.`
123
+ : `${key} has no version "${options.wfVersion ?? ''}".`);
124
+ }
125
+ const format = formats.get(key) ?? project.config.language;
126
+ let files;
127
+ let fidelity;
128
+ let hash;
129
+ if (format === 'json') {
130
+ const exported = await env.api.exportWorkflow(key, target.version);
131
+ files = [envelopeFile(exported, versionCreatedAt(versions, exported.version))];
132
+ fidelity = { level: 'lossless', items: [] };
133
+ hash = irHash(exported.definitionJson);
134
+ }
135
+ else if (options.server) {
136
+ // Only the names this version binds go to the service: it caps the map,
137
+ // and a workspace may hold more connections than that.
138
+ const stored = await env.api.exportWorkflow(key, target.version);
139
+ const rendered = await env.api.exportRendered(key, format === 'ts' ? 'TYPESCRIPT' : 'PYTHON', {
140
+ version: target.version,
141
+ includePinnedData: options.pinnedData ?? false,
142
+ connectionNameMap: namesForDefinitions(namesById, [stored.definitionJson]),
143
+ });
144
+ files = rendered.files.map((file) => {
145
+ if (file.content === null) {
146
+ throw new CliUserError(`The service returned ${file.path} without content.`);
147
+ }
148
+ return { path: file.path, contentType: file.contentType, content: file.content };
149
+ });
150
+ fidelity = {
151
+ level: toLevel(rendered.fidelity.level),
152
+ items: rendered.fidelity.items.map((item) => ({
153
+ kind: item.kind,
154
+ detail: item.detail,
155
+ ...(item.nodeId ? { nodeId: item.nodeId } : {}),
156
+ ...(item.path ? { path: item.path } : {}),
157
+ })),
158
+ };
159
+ hash = rendered.irHash;
160
+ }
161
+ else {
162
+ const exported = await env.api.exportWorkflow(key, target.version);
163
+ const code = await exportWorkflowCode(exported.definitionJson, {
164
+ format: format === 'ts' ? 'TYPESCRIPT' : 'PYTHON',
165
+ workflowKey: key,
166
+ registry,
167
+ connectionNames: namesById,
168
+ includeLayout: true,
169
+ includePinnedData: options.pinnedData ?? false,
170
+ header: {
171
+ workflowKey: key,
172
+ version: exported.version,
173
+ irHash: irHash(exported.definitionJson),
174
+ registrySnapshot: snapshot,
175
+ },
176
+ });
177
+ files = code.files;
178
+ fidelity = code.fidelity;
179
+ hash = code.irHash;
180
+ }
181
+ for (const file of files) {
182
+ const path = safeRelativePath(file.path, `${key} export`);
183
+ // An export only ever carries workflow files and generated clients; a path
184
+ // elsewhere (package.json, CI configuration, …) is refused.
185
+ if (!path.startsWith(`${WORKFLOWS_DIR}/`) && !path.startsWith(`${GENERATED_DIR}/`)) {
186
+ throw new CliUserError(`${key} export: refusing ${path}, which is outside ${WORKFLOWS_DIR}/ and ${GENERATED_DIR}/.`);
187
+ }
188
+ }
189
+ // Local lifts regenerate the clients once after the loop; a service render
190
+ // carries the clients for the service's own registry snapshot.
191
+ const codeFiles = options.server ? files : files.filter((file) => !isNodesFile(file.path));
192
+ if (!options.server && files.some((file) => isNodesFile(file.path)) && format !== 'json') {
193
+ clientsUsed = format;
194
+ }
195
+ const changed = codeFiles
196
+ .filter((file) => readProjectFile(project.root, file.path) !== file.content)
197
+ .map((file) => file.path);
198
+ const main = codeFiles.find((file) => file.path.startsWith(`${WORKFLOWS_DIR}/`) && !isSidecar(file.path));
199
+ if (!main)
200
+ throw new CliUserError(`The export of ${key} has no workflow file.`);
201
+ const previous = project.lock.workflows[key];
202
+ if (previous && previous.path !== main.path)
203
+ removals.push(previous.path);
204
+ writes.push(...codeFiles);
205
+ project.lock.workflows[key] = {
206
+ version: target.version,
207
+ irHash: hash,
208
+ format,
209
+ path: main.path,
210
+ };
211
+ items.push({
212
+ key,
213
+ version: target.version,
214
+ format,
215
+ irHash: hash,
216
+ fidelity,
217
+ files: codeFiles.map((file) => file.path),
218
+ changed,
219
+ });
220
+ }
221
+ const lossy = items.filter((item) => item.fidelity.level === 'lossy').map((item) => item.key);
222
+ const result = { check: options.check === true, workflows: items, lossy };
223
+ if (!options.check) {
224
+ for (const file of writes)
225
+ writeProjectFile(project.root, file.path, file.content);
226
+ for (const path of removals) {
227
+ const absolute = join(project.root, ...safeRelativePath(path, 'lock.json').split('/'));
228
+ if (!writes.some((file) => file.path === path) && existsSync(absolute))
229
+ unlinkSync(absolute);
230
+ }
231
+ // The clients come from the same registry snapshot the lift used.
232
+ if (clientsUsed && registry.length > 0)
233
+ await writeNodeClients(project, registry, clientsUsed);
234
+ writeLock(project);
235
+ }
236
+ const details = [];
237
+ for (const item of items) {
238
+ for (const entry of item.fidelity.items) {
239
+ const where = [entry.nodeId, entry.path].filter(Boolean).join(' ');
240
+ details.push(`${item.key}: ${entry.kind}${where ? ` (${where})` : ''}: ${entry.detail}`);
241
+ }
242
+ }
243
+ emit(env, options, result, {
244
+ headers: [
245
+ 'Workflow',
246
+ 'Version',
247
+ 'Format',
248
+ 'Fidelity',
249
+ options.check ? 'Would change' : 'Changed',
250
+ ],
251
+ rows: items.map((item) => [
252
+ item.key,
253
+ item.version,
254
+ item.format,
255
+ item.fidelity.level,
256
+ String(item.changed.length),
257
+ ]),
258
+ }, details);
259
+ if (options.check && lossy.length > 0) {
260
+ throw new CliUserError(`Lossy export: ${lossy.join(', ')}`, {
261
+ hint: 'The fidelity items above say what code cannot express exactly.',
262
+ });
263
+ }
264
+ return result;
265
+ }
266
+ //# sourceMappingURL=pull.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pull.js","sourceRoot":"","sources":["../../../src/code-first/commands/pull.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,SAAS,EACT,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,gBAAgB,GAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,E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C,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YAC1D,IAAI,EAAE,gEAAgE;SACvE,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * `fluidgrids push [key…] [--dry-run]`: lower the project locally and create a
3
+ * version for every workflow whose IR changed (spec 07 §4, Phase A).
4
+ *
5
+ * - An existing key gets `createWorkflowVersion`; a new key gets `importWorkflow`
6
+ * (a DRAFT, with the installed-node check and the workflow-count quota).
7
+ * - Unchanged workflows (same `irHash` as the latest version) get no version.
8
+ * - The result prints `workflowVersionDiff` between the previous latest version
9
+ * and the new one.
10
+ * - Connection names resolve in the target workspace; a name that does not
11
+ * resolve fails the push before anything is written.
12
+ * - Every workflow is validated locally first, so a push is all-or-nothing up
13
+ * to the first service-side refusal.
14
+ * - A workflow whose latest stored version is newer than the one `lock.json`
15
+ * records (changed on the canvas or pushed from elsewhere since the pull) is
16
+ * refused, unless `--force` is given, so a push never silently reverts it.
17
+ *
18
+ * Durable functions (Phase B, BOFF-9905):
19
+ * - A workflow whose definition carries a `code` block (tier-2 `workflow()`
20
+ * functions, or a tier-1 graph with `wf.codeWorkflow`) gets its version with
21
+ * `codeBundle`: the bundle is uploaded through `prepareWorkflowCodeUpload`
22
+ * (see `code-upload.ts`). One bundle serves every version of the push.
23
+ * - Findings in the sources (`durable.phaseC`, `durable.activityTypeNotAllowed`)
24
+ * refuse the push before anything is written. Python durable functions are
25
+ * Phase C.
26
+ * - `--hotfix <version>` replaces the bundle of an existing version instead
27
+ * (see `hotfix.ts`).
28
+ * - `lock.json` records `{buildId, sourceHash, sdkVersion}` of the bundle and
29
+ * the `buildId` of each version that references it.
30
+ */
31
+ import { type DurableIssue, type LocalWorkflow, type LoweredProject } from '../lowering.js';
32
+ import { type Project } from '../project.js';
33
+ import { RemoteWorkflows } from '../remote.js';
34
+ import { type CommandEnv, type ProjectOptions } from '../shared.js';
35
+ export interface PushOptions extends ProjectOptions {
36
+ dryRun?: boolean;
37
+ message?: string;
38
+ /** Push even over versions created in the workspace after the project pulled the workflow. */
39
+ force?: boolean;
40
+ /** Replace the code bundle of this existing version instead of creating a version. */
41
+ hotfix?: string;
42
+ /** With `--hotfix`: replay this many recent runs of the version locally first. */
43
+ replaySample?: string;
44
+ /** With `--hotfix`: false skips the service's replay verification (audited). */
45
+ verifyReplay?: boolean;
46
+ /** With `--hotfix`: how long to wait for the replacement job, in milliseconds. */
47
+ timeout?: string;
48
+ }
49
+ export type PushAction = 'created' | 'versioned' | 'unchanged' | 'would-create' | 'would-version';
50
+ export interface PushItem {
51
+ key: string;
52
+ action: PushAction;
53
+ fromVersion: string | null;
54
+ toVersion: string | null;
55
+ irHash: string;
56
+ /** `workflowVersionDiff` entries after a push; the local diff on a dry run. */
57
+ changes: Array<{
58
+ path: string;
59
+ kind: string;
60
+ before?: unknown;
61
+ after?: unknown;
62
+ }>;
63
+ truncated: boolean;
64
+ warnings: string[];
65
+ /** The code bundle the version references; null for a graph-only workflow. */
66
+ bundle: {
67
+ buildId: string;
68
+ uploaded: boolean;
69
+ } | null;
70
+ }
71
+ export interface PushResult {
72
+ dryRun: boolean;
73
+ buildId: string | null;
74
+ sourceHash: string | null;
75
+ workflows: PushItem[];
76
+ }
77
+ /** The sentence `push` and `validate` give for durable-function findings. */
78
+ export declare function durableSummary(issues: readonly DurableIssue[]): string;
79
+ /** Refuse a project with durable-function findings, before anything is written. */
80
+ export declare function assertNoDurableIssues(issues: readonly DurableIssue[]): void;
81
+ /** The `buildId` a definition's `code` block records. */
82
+ export declare function codeBuildId(workflow: LocalWorkflow): string | undefined;
83
+ /** What a push works from: the project, its lowering and the selected workflows. */
84
+ export interface PushInputs {
85
+ project: Project;
86
+ lowered: LoweredProject;
87
+ selected: LocalWorkflow[];
88
+ remote: RemoteWorkflows;
89
+ }
90
+ /**
91
+ * Load, lower and validate the project for a push (and a hotfix): connection
92
+ * names resolve in the workspace, the named keys must exist, every selected
93
+ * workflow must validate, and durable-function findings refuse the push.
94
+ */
95
+ export declare function loadPushInputs(env: CommandEnv, keys: readonly string[], options: PushOptions): Promise<PushInputs>;
96
+ export declare function runPush(env: CommandEnv, keys: readonly string[], options: PushOptions): Promise<PushResult>;
97
+ //# sourceMappingURL=push.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../src/code-first/commands/push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAcH,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAKL,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAIL,eAAe,EAEhB,MAAM,cAAc,CAAC;AACtB,OAAO,EAA0B,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE5F,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,GAAG,eAAe,CAAC;AAElG,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAA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