@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 @@
1
+ {"version":3,"file":"python.js","sourceRoot":"","sources":["../../src/code-first/python.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAsB,MAAM,0BAA0B,CAAC;AAEtE,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,CAAC;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AACrD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gCAAgC,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD,6FAA6F;AAC7F,MAAM,iBAAiB,GAAG,mDAAmD,CAAC;AA2B9E,iFAAiF;AACjF,MAAM,O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CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Commander registrations of the code-first commands.
3
+ *
4
+ * The command implementations under `./commands/` load `@fluidgrids/workflows`
5
+ * (the IR library, esbuild, Prettier and QuickJS), which costs hundreds of
6
+ * milliseconds. Every action therefore imports its implementation on demand,
7
+ * so the rest of the CLI (`fluidgrids workflows list`, `fluidgrids runs wait`,
8
+ * …) starts as fast as it did before the code-first commands existed. Only
9
+ * types are imported statically here; keep it that way.
10
+ */
11
+ import type { Command } from 'commander';
12
+ import { type CommandEnv } from './shared.js';
13
+ export declare function registerInit(program: Command, env: CommandEnv): void;
14
+ export declare function registerCodegen(program: Command, env: CommandEnv): void;
15
+ export declare function registerPull(program: Command, env: CommandEnv): void;
16
+ export declare function registerPush(program: Command, env: CommandEnv): void;
17
+ export declare function registerDiff(program: Command, env: CommandEnv): void;
18
+ export declare function registerValidate(program: Command, env: CommandEnv): void;
19
+ export declare function registerImport(program: Command, env: CommandEnv): void;
20
+ export declare function registerInterface(program: Command, env: CommandEnv): void;
21
+ /**
22
+ * Durable-function commands (Phase B): `runs start|describe|history|signal|
23
+ * terminate|stack` on the cli-sdk `runs` group, plus the top-level `history`,
24
+ * `signal`, `replay`, `test`, `run` and `versions list`.
25
+ */
26
+ export declare function registerDurable(program: Command, env: CommandEnv): void;
27
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/code-first/register.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBzC,OAAO,EAEL,KAAK,UAAU,EAGhB,MAAM,aAAa,CAAC;AAQrB,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAgBpE;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAavE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAkBpE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAgCpE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAYpE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAgBxE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAetE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAUzE;AAoCD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAmHvE"}
@@ -0,0 +1,270 @@
1
+ /**
2
+ * Commander registrations of the code-first commands.
3
+ *
4
+ * The command implementations under `./commands/` load `@fluidgrids/workflows`
5
+ * (the IR library, esbuild, Prettier and QuickJS), which costs hundreds of
6
+ * milliseconds. Every action therefore imports its implementation on demand,
7
+ * so the rest of the CLI (`fluidgrids workflows list`, `fluidgrids runs wait`,
8
+ * …) starts as fast as it did before the code-first commands existed. Only
9
+ * types are imported statically here; keep it that way.
10
+ */
11
+ import { withGlobalFormat, } from './shared.js';
12
+ const PROJECT_OPTION = [
13
+ '--project <dir>',
14
+ 'Project directory (default: nearest fluidgrids.config.json)',
15
+ ];
16
+ const OUTPUT_OPTION = ['-f, --format <format>', 'Output format (json, table, yaml)'];
17
+ export function registerInit(program, env) {
18
+ program
19
+ .command('init [dir]')
20
+ .description('Scaffold a code-first workflow project (fluidgrids.config.json, workflows/, lock.json)')
21
+ .option('--lang <lang>', 'Project language: ts or py', 'ts')
22
+ .option('--workspace <id>', 'Workspace to sign in to and record in fluidgrids.config.json')
23
+ .option('--force', 'Overwrite existing scaffold files')
24
+ .option('--no-codegen', 'Do not generate the node clients now')
25
+ .option('--no-login', 'Do not start the device-code login when signed out')
26
+ .option(...OUTPUT_OPTION)
27
+ .action(async (dir, options, command) => {
28
+ const { runInit } = await import('./commands/init.js');
29
+ await runInit(env, dir, withGlobalFormat(options, command));
30
+ });
31
+ }
32
+ export function registerCodegen(program, env) {
33
+ program
34
+ .command('codegen')
35
+ .description('Regenerate the typed node clients (.fluidgrids/nodes.ts|py) from the workspace registry')
36
+ .option('--lang <lang>', 'Client language: ts or py (default: the project language)')
37
+ .option(...PROJECT_OPTION)
38
+ .option(...OUTPUT_OPTION)
39
+ .action(async (options, command) => {
40
+ const { runCodegen } = await import('./commands/codegen.js');
41
+ await runCodegen(env, withGlobalFormat(options, command));
42
+ });
43
+ }
44
+ export function registerPull(program, env) {
45
+ program
46
+ .command('pull [keys...]')
47
+ .description('Export workflows into the project as TypeScript, Python or JSON')
48
+ .option('--as <format>', 'Code format: ts, py or json (default: as tracked in lock.json, else the project language); `--format ts|py` also works')
49
+ .option('--check', 'Write nothing; print the fidelity report and fail when an export is lossy')
50
+ .option('--wf-version <version>', 'Pull this version instead of the latest (one key only)')
51
+ .option('--server', 'Render the code on the service instead of locally')
52
+ .option('--pinned-data', 'Also write pinned TEST data to workflows/<key>.pinned.json')
53
+ .option(...PROJECT_OPTION)
54
+ .option(...OUTPUT_OPTION)
55
+ .action(async (keys, options, command) => {
56
+ const { runPull } = await import('./commands/pull.js');
57
+ await runPull(env, keys, withGlobalFormat(options, command));
58
+ });
59
+ }
60
+ export function registerPush(program, env) {
61
+ program
62
+ .command('push [keys...]')
63
+ .description('Lower the project and create a version for every workflow that changed')
64
+ .option('--dry-run', 'Lower, validate and diff against the latest version; create nothing')
65
+ .option('-m, --message <text>', 'Description for the new versions')
66
+ .option('--force', 'Push even when the workspace has versions newer than the one the project pulled')
67
+ .option('--hotfix <version>', 'Replace the code bundle of this existing version instead (durable functions; replay-verified by the service)')
68
+ .option('--replay-sample <n>', 'With --hotfix: replay the n latest runs of the version locally first')
69
+ .option('--no-verify-replay', 'With --hotfix: skip the service replay verification (audited)')
70
+ .option('--timeout <ms>', 'With --hotfix: how long to wait for the replacement job', '600000')
71
+ .option(...PROJECT_OPTION)
72
+ .option(...OUTPUT_OPTION)
73
+ .action(async (keys, options, command) => {
74
+ const resolved = withGlobalFormat(options, command);
75
+ if (resolved.hotfix !== undefined) {
76
+ const { runHotfix } = await import('./commands/hotfix.js');
77
+ await runHotfix(env, keys, resolved);
78
+ return;
79
+ }
80
+ const { runPush } = await import('./commands/push.js');
81
+ await runPush(env, keys, resolved);
82
+ });
83
+ }
84
+ export function registerDiff(program, env) {
85
+ program
86
+ .command('diff [keys...]')
87
+ .description('IR diff of the local workflows against a stored version')
88
+ .option('--against <version>', 'latest, active or a version such as v3', 'latest')
89
+ .option('--exit-code', 'Exit with status 1 when any workflow differs')
90
+ .option(...PROJECT_OPTION)
91
+ .option(...OUTPUT_OPTION)
92
+ .action(async (keys, options, command) => {
93
+ const { runDiff } = await import('./commands/diff.js');
94
+ await runDiff(env, keys, withGlobalFormat(options, command));
95
+ });
96
+ }
97
+ export function registerValidate(program, env) {
98
+ program
99
+ .command('validate [keys...]')
100
+ .description('Validate the local workflows as IR v2 (lowered from code where needed)')
101
+ .option('--strict', 'Also apply the strict rules: no legacy mirrors, no ${...} templates, slug node ids')
102
+ .option('--remote', 'Also validate on the service (task queues, installed nodes)')
103
+ .option('--offline', 'Do not contact the workspace; connection names are not resolved')
104
+ .option(...PROJECT_OPTION)
105
+ .option(...OUTPUT_OPTION)
106
+ .action(async (keys, options, command) => {
107
+ const { runValidate } = await import('./commands/validate.js');
108
+ await runValidate(env, keys, withGlobalFormat(options, command));
109
+ });
110
+ }
111
+ export function registerImport(program, env) {
112
+ program
113
+ .command('import <file>')
114
+ .description('Create a new workflow (DRAFT) from a .json, .ts or .py file; the service lowers TypeScript itself')
115
+ .option('--key <key>', 'Workflow key (default: the key the file declares)')
116
+ .option('--name <name>', 'Workflow name (default: the name the file declares, else the key)')
117
+ .option('--description <text>', 'Description of the new workflow')
118
+ .option('--allow-missing-nodes', 'Create it even when nodes it uses are not installed')
119
+ .option(...OUTPUT_OPTION)
120
+ .action(async (file, options, command) => {
121
+ const { runImport } = await import('./commands/import.js');
122
+ await runImport(env, file, withGlobalFormat(options, command));
123
+ });
124
+ }
125
+ export function registerInterface(program, env) {
126
+ program
127
+ .command('interface <key>')
128
+ .description("Print a stored workflow's interface (inputs, outputs, signals)")
129
+ .option('--wf-version <version>', 'Version (default: the ACTIVE version, else the newest)')
130
+ .option('-f, --format <format>', 'Output format (json, yaml)')
131
+ .action(async (key, options, command) => {
132
+ const { runInterface } = await import('./commands/interface.js');
133
+ await runInterface(env, key, withGlobalFormat(options, command));
134
+ });
135
+ }
136
+ const WAIT_OPTIONS = {
137
+ timeout: ['--timeout <ms>', 'With --wait: give up after this many milliseconds', '300000'],
138
+ poll: ['--poll-interval <ms>', 'With --wait: delay between polls in milliseconds', '1000'],
139
+ };
140
+ function collect(value, previous = []) {
141
+ return [...previous, value];
142
+ }
143
+ function addHistory(parent, env, name) {
144
+ parent
145
+ .command(`${name} <runId>`)
146
+ .description("Download a durable run's event history (a fluidgrids.history file for replay)")
147
+ .option('--out <file>', 'Write the history file here instead of printing the events')
148
+ .option(...OUTPUT_OPTION)
149
+ .action(async (runId, options, command) => {
150
+ const { runHistory } = await import('./commands/runs.js');
151
+ await runHistory(env, runId, withGlobalFormat(options, command));
152
+ });
153
+ }
154
+ function addSignal(parent, env, name) {
155
+ parent
156
+ .command(`${name} <runId> <signal>`)
157
+ .description('Send a signal to a run (a durable run, or a canvas run waiting for it)')
158
+ .option('--payload <json>', 'Signal payload (JSON)')
159
+ .option('--idempotency-key <key>', 'Deliver at most once for this key')
160
+ .option(...OUTPUT_OPTION)
161
+ .action(async (runId, signal, options, command) => {
162
+ const { runSignal } = await import('./commands/runs.js');
163
+ await runSignal(env, runId, signal, withGlobalFormat(options, command));
164
+ });
165
+ }
166
+ /**
167
+ * Durable-function commands (Phase B): `runs start|describe|history|signal|
168
+ * terminate|stack` on the cli-sdk `runs` group, plus the top-level `history`,
169
+ * `signal`, `replay`, `test`, `run` and `versions list`.
170
+ */
171
+ export function registerDurable(program, env) {
172
+ const runs = program.commands.find((command) => command.name() === 'runs') ??
173
+ program.command('runs').description('FluidGrids workflow runs');
174
+ runs
175
+ .command('start <workflowKey>')
176
+ .description('Start a durable-function run of a workflow (startWorkflow)')
177
+ .option('--wf-version <version>', 'Version (default: the active version)')
178
+ .option('--fn <name>', 'Workflow function (default: the single exported one)')
179
+ .option('-i, --input <json>', 'Input (JSON)')
180
+ .option('--signal <name[=json]>', 'Signal delivered with the start (repeatable)', collect)
181
+ .option('--idempotency-key <key>', 'Return the existing run for a repeated key')
182
+ .option('--wait', 'Wait for the run to finish and print its output')
183
+ .option(...WAIT_OPTIONS.timeout)
184
+ .option(...WAIT_OPTIONS.poll)
185
+ .option(...OUTPUT_OPTION)
186
+ .action(async (workflowKey, options, command) => {
187
+ const { runStart } = await import('./commands/runs.js');
188
+ await runStart(env, workflowKey, withGlobalFormat(options, command));
189
+ });
190
+ runs
191
+ .command('describe <runId>')
192
+ .description('A run with its durable fields (kind, function, build, history length, task state)')
193
+ .option(...OUTPUT_OPTION)
194
+ .action(async (runId, options, command) => {
195
+ const { runDescribe } = await import('./commands/runs.js');
196
+ await runDescribe(env, runId, withGlobalFormat(options, command));
197
+ });
198
+ addHistory(runs, env, 'history');
199
+ addSignal(runs, env, 'signal');
200
+ runs
201
+ .command('terminate <runId>')
202
+ .description('Terminate a run now: no further code or node runs (both kinds)')
203
+ .option('--reason <text>', 'Reason recorded on the run')
204
+ .option('--force', 'Skip the confirmation prompt')
205
+ .option(...OUTPUT_OPTION)
206
+ .action(async (runId, options, command) => {
207
+ const { runTerminate } = await import('./commands/runs.js');
208
+ await runTerminate(env, runId, withGlobalFormat(options, command));
209
+ });
210
+ runs
211
+ .command('stack <runId>')
212
+ .description("Where a durable run's code is waiting (the __stack_trace query)")
213
+ .option('--enhanced', 'Structured trace with source locations (__enhanced_stack_trace)')
214
+ .option(...OUTPUT_OPTION)
215
+ .action(async (runId, options, command) => {
216
+ const { runStack } = await import('./commands/runs.js');
217
+ await runStack(env, runId, withGlobalFormat(options, command));
218
+ });
219
+ addHistory(program, env, 'history');
220
+ addSignal(program, env, 'signal');
221
+ program
222
+ .command('replay <history>')
223
+ .description('Replay a history file (or a run id) against the local code; fails on non-determinism')
224
+ .option('--isolate', 'Replay in the QuickJS isolate the managed workers use')
225
+ .option('--debug', 'Print the full task result (commands, logs, stack)')
226
+ .option(...PROJECT_OPTION)
227
+ .option(...OUTPUT_OPTION)
228
+ .action(async (history, options, command) => {
229
+ const { runReplay } = await import('./commands/replay.js');
230
+ await runReplay(env, history, withGlobalFormat(options, command));
231
+ });
232
+ program
233
+ .command('test')
234
+ .description("Run the project's test script, then replay every *.history.json under --replay")
235
+ .option('--replay <dir>', 'Directory of history files to replay against the local code')
236
+ .option('--isolate', 'Replay in the QuickJS isolate the managed workers use')
237
+ .option('--no-script', 'Do not run the package.json test script')
238
+ .option(...PROJECT_OPTION)
239
+ .option(...OUTPUT_OPTION)
240
+ .action(async (options, command) => {
241
+ const { runTest } = await import('./commands/replay.js');
242
+ await runTest(env, withGlobalFormat(options, command));
243
+ });
244
+ program
245
+ .command('run <workflowKey>')
246
+ .description("Trigger a workflow from its version's trigger node, optionally waiting for the result")
247
+ .option('--wf-version <version>', 'Version (default: the active version, else the newest)')
248
+ .option('--trigger-node <id>', 'Trigger node (default: the only one)')
249
+ .option('-i, --input <json>', 'Trigger data (a JSON object)')
250
+ .option('--test', 'Run in TEST mode instead of PRODUCTION')
251
+ .option('--wait', 'Wait for the run to finish')
252
+ .option(...WAIT_OPTIONS.timeout)
253
+ .option(...WAIT_OPTIONS.poll)
254
+ .option(...OUTPUT_OPTION)
255
+ .action(async (workflowKey, options, command) => {
256
+ const { runRun } = await import('./commands/runs.js');
257
+ await runRun(env, workflowKey, withGlobalFormat(options, command));
258
+ });
259
+ program
260
+ .command('versions')
261
+ .description('Workflow versions and their code bundles')
262
+ .command('list <workflowKey>')
263
+ .description('Every stored version with the code bundle it runs')
264
+ .option(...OUTPUT_OPTION)
265
+ .action(async (workflowKey, options, command) => {
266
+ const { runVersionsList } = await import('./commands/versions.js');
267
+ await runVersionsList(env, workflowKey, withGlobalFormat(options, command));
268
+ });
269
+ }
270
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/code-first/register.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAoBH,OAAO,EACL,gBAAgB,GAIjB,MAAM,aAAa,CAAC;AAErB,MAAM,cAAc,GAAG;IACrB,iBAAiB;IACjB,6DAA6D;CACrD,CAAC;AACX,MAAM,aAAa,GAAG,CAAC,uBAAuB,EAAE,mCAAmC,CAAU,CAAC;AAE9F,MAAM,UAAU,YAAY,CAAC,OAAgB,EAAE,GAAe;IAC5D,OAAO;SACJ,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CACV,wFAAwF,CACzF;SACA,MAAM,CAAC,eAAe,EAAE,4BAA4B,EAAE,IAAI,CAAC;SAC3D,MAAM,CAAC,kBAAkB,EAAE,8DAA8D,CAAC;SAC1F,MAAM,CAAC,SAAS,EAAE,mCAAmC,CAAC;SACtD,MAAM,CAAC,cAAc,EAAE,sCAAsC,CAAC;SAC9D,MAAM,CAAC,YAAY,EAAE,oDAAoD,CAAC;SAC1E,MAAM,CAAC,GAAG,aAAa,CAAC;SACxB,MAAM,CAAC,KAAK,EAAE,GAAuB,EAAE,OAAoB,EAAE,OAAgB,EAAE,EAAE;QAChF,MAAM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as definition has no `key` (the key lives on the row), and code
5
+ * never carries pinned TEST data unless a `workflows/<key>.pinned.json` sidecar
6
+ * exists (spec 07 §3 rule 10). Both are therefore aligned before hashing, and
7
+ * a push keeps the stored pinned data instead of silently dropping it.
8
+ */
9
+ import type { NodeManifest } from '@fluidgrids/workflows/ir';
10
+ import type { CodeFirstApi, RemoteExport, RemoteVersion } from './api.js';
11
+ import { type Project } from './project.js';
12
+ import { type ConnectionIndex } from './connections.js';
13
+ /** Versions oldest first. */
14
+ export declare function sortVersions(versions: readonly RemoteVersion[]): RemoteVersion[];
15
+ /** `latest` (newest), `active` (the ACTIVE version) or an exact version string. */
16
+ export declare function pickVersion(versions: readonly RemoteVersion[], against: string): RemoteVersion | undefined;
17
+ /** The stored definition normalised, with its workflow key, as lowering would produce it. */
18
+ export declare function comparableRemote(definition: unknown, workflowKey: string): Record<string, unknown>;
19
+ /** The local definition as it would be stored: stored pinned data is kept when code has none. */
20
+ export declare function outgoingDefinition(local: Record<string, unknown>, remote: Record<string, unknown> | undefined): Record<string, unknown>;
21
+ export declare function sameContent(a: unknown, b: unknown): boolean;
22
+ /** One workflow key's stored state. */
23
+ export interface RemoteWorkflow {
24
+ key: string;
25
+ versions: RemoteVersion[];
26
+ /** The export of the compared version; undefined when the key does not exist. */
27
+ export?: RemoteExport;
28
+ }
29
+ /** Fetches each key's versions and the export of the requested version once. */
30
+ export declare class RemoteWorkflows {
31
+ private readonly api;
32
+ private readonly against;
33
+ private readonly cache;
34
+ constructor(api: CodeFirstApi, against?: string);
35
+ get(key: string): Promise<RemoteWorkflow>;
36
+ private load;
37
+ }
38
+ /**
39
+ * The workspace's connections indexed by name. The node registry is fetched
40
+ * only when some connection is not already bound by one of `remoteDefinitions`.
41
+ */
42
+ export declare function loadConnectionIndex(api: CodeFirstApi, remoteDefinitions: readonly unknown[], registry?: readonly NodeManifest[]): Promise<{
43
+ index: ConnectionIndex;
44
+ registry?: readonly NodeManifest[];
45
+ }>;
46
+ /**
47
+ * Keys the project probably defines, before lowering tells for sure: named
48
+ * keys, tracked keys and workflow file stems (a Python stem `lead_enrichment`
49
+ * also as `lead-enrichment`). Fetching a key that does not exist is harmless.
50
+ */
51
+ export declare function likelyKeys(project: Project, requested: readonly string[]): string[];
52
+ /**
53
+ * The connection index for lowering this project: the latest stored version of
54
+ * every key the project probably defines is read first, because those say
55
+ * which adapter each connection is bound to.
56
+ */
57
+ export declare function projectConnectionIndex(api: CodeFirstApi, project: Project, keys: readonly string[], latest?: RemoteWorkflows): Promise<ConnectionIndex>;
58
+ //# sourceMappingURL=remote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/code-first/remote.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAkC,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAM1B,6BAA6B;AAC7B,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,GAAG,aAAa,EAAE,CAIhF;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CACzB,QAAQ,EAAE,SAAS,aAAa,EAAE,EAClC,OAAO,EAAE,MAAM,GACd,aAAa,GAAG,SAAS,CAK3B;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,OAAO,EACnB,WAAW,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBzB;AAED,iGAAiG;AACjG,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,G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+ * A stored canvas definition has no `key` (the key lives on the row), and code
5
+ * never carries pinned TEST data unless a `workflows/<key>.pinned.json` sidecar
6
+ * exists (spec 07 §3 rule 10). Both are therefore aligned before hashing, and
7
+ * a push keeps the stored pinned data instead of silently dropping it.
8
+ */
9
+ import { CliUserError } from '@burdenoff/cli-sdk/core';
10
+ import { irHash, normalizeDefinition } from '@fluidgrids/workflows/ir';
11
+ import { listSourcePaths, WORKFLOWS_DIR } from './project.js';
12
+ import { buildConnectionIndex, adaptersInDefinitions, } from './connections.js';
13
+ function isRecord(value) {
14
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
15
+ }
16
+ /** Versions oldest first. */
17
+ export function sortVersions(versions) {
18
+ return [...versions].sort((a, b) => a.createdAt < b.createdAt ? -1 : a.createdAt > b.createdAt ? 1 : 0);
19
+ }
20
+ /** `latest` (newest), `active` (the ACTIVE version) or an exact version string. */
21
+ export function pickVersion(versions, against) {
22
+ const sorted = sortVersions(versions);
23
+ if (against === 'latest')
24
+ return sorted[sorted.length - 1];
25
+ if (against === 'active')
26
+ return sorted.filter((version) => version.isActive).pop();
27
+ return sorted.find((version) => version.version === against);
28
+ }
29
+ /** The stored definition normalised, with its workflow key, as lowering would produce it. */
30
+ export function comparableRemote(definition, workflowKey) {
31
+ const normalized = normalizeDefinition(definition);
32
+ if (!isRecord(normalized)) {
33
+ throw new CliUserError(`The stored definition of ${workflowKey} is not an object.`);
34
+ }
35
+ const copy = { ...normalized };
36
+ if (typeof copy['key'] !== 'string' || copy['key'] === '')
37
+ copy['key'] = workflowKey;
38
+ // `code.bundleRef` and `code.sourceRef` are informational copies the service
39
+ // writes when it stores a bundle (spec 01 §5); code never carries them.
40
+ const code = copy['code'];
41
+ if (isRecord(code) && ('bundleRef' in code || 'sourceRef' in code)) {
42
+ copy['code'] = Object.fromEntries(Object.entries(code).filter(([name]) => name !== 'bundleRef' && name !== 'sourceRef'));
43
+ }
44
+ return copy;
45
+ }
46
+ /** The local definition as it would be stored: stored pinned data is kept when code has none. */
47
+ export function outgoingDefinition(local, remote) {
48
+ if (!remote || local['pinnedData'] !== undefined || remote['pinnedData'] === undefined) {
49
+ return local;
50
+ }
51
+ return { ...local, pinnedData: remote['pinnedData'] };
52
+ }
53
+ export function sameContent(a, b) {
54
+ return irHash(a) === irHash(b);
55
+ }
56
+ /** Fetches each key's versions and the export of the requested version once. */
57
+ export class RemoteWorkflows {
58
+ api;
59
+ against;
60
+ cache = new Map();
61
+ constructor(api, against = 'latest') {
62
+ this.api = api;
63
+ this.against = against;
64
+ }
65
+ get(key) {
66
+ let entry = this.cache.get(key);
67
+ if (!entry) {
68
+ entry = this.load(key);
69
+ this.cache.set(key, entry);
70
+ }
71
+ return entry;
72
+ }
73
+ async load(key) {
74
+ const versions = sortVersions(await this.api.workflowVersions(key));
75
+ if (versions.length === 0)
76
+ return { key, versions };
77
+ const target = pickVersion(versions, this.against);
78
+ if (!target) {
79
+ throw new CliUserError(this.against === 'active'
80
+ ? `${key} has no ACTIVE version.`
81
+ : `${key} has no version "${this.against}".`, { hint: `Stored versions: ${versions.map((version) => version.version).join(', ')}` });
82
+ }
83
+ return { key, versions, export: await this.api.exportWorkflow(key, target.version) };
84
+ }
85
+ }
86
+ /**
87
+ * The workspace's connections indexed by name. The node registry is fetched
88
+ * only when some connection is not already bound by one of `remoteDefinitions`.
89
+ */
90
+ export async function loadConnectionIndex(api, remoteDefinitions, registry) {
91
+ const connections = await api.connections();
92
+ const bound = adaptersInDefinitions(remoteDefinitions);
93
+ const needsRegistry = connections.some((connection) => !bound.has(connection.id));
94
+ const manifests = registry ?? (needsRegistry ? await api.nodeManifests() : undefined);
95
+ return {
96
+ index: buildConnectionIndex(connections, {
97
+ remoteDefinitions,
98
+ ...(manifests ? { registry: manifests } : {}),
99
+ }),
100
+ ...(manifests ? { registry: manifests } : {}),
101
+ };
102
+ }
103
+ /**
104
+ * Keys the project probably defines, before lowering tells for sure: named
105
+ * keys, tracked keys and workflow file stems (a Python stem `lead_enrichment`
106
+ * also as `lead-enrichment`). Fetching a key that does not exist is harmless.
107
+ */
108
+ export function likelyKeys(project, requested) {
109
+ const stems = listSourcePaths(project.root)
110
+ .filter((path) => path.startsWith(`${WORKFLOWS_DIR}/`))
111
+ .map((path) => path.slice(path.lastIndexOf('/') + 1).split('.')[0] ?? '')
112
+ .filter((stem) => stem !== '' && !stem.startsWith('_'))
113
+ .flatMap((stem) => (stem.includes('_') ? [stem, stem.replace(/_/g, '-')] : [stem]));
114
+ return [...new Set([...requested, ...Object.keys(project.lock.workflows), ...stems])].sort();
115
+ }
116
+ /**
117
+ * The connection index for lowering this project: the latest stored version of
118
+ * every key the project probably defines is read first, because those say
119
+ * which adapter each connection is bound to.
120
+ */
121
+ export async function projectConnectionIndex(api, project, keys, latest = new RemoteWorkflows(api, 'latest')) {
122
+ const prefetched = await Promise.all(likelyKeys(project, keys).map((key) => latest.get(key)));
123
+ const { index } = await loadConnectionIndex(api, prefetched.flatMap((entry) => (entry.export ? [entry.export.definitionJson] : [])));
124
+ return index;
125
+ }
126
+ //# sourceMappingURL=remote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.js","sourceRoot":"","sources":["../../src/code-first/remote.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAgB,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GAEtB,MAAM,kBAAkB,CAAC;AAE1B,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,6BAA6B;AAC7B,MAAM,UAAU,YAAY,CAAC,QAA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AAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtF,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC/F,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,GAAiB,EACjB,OAAgB,EAChB,IAAuB,EACvB,SAA0B,IAAI,eAAe,CAAC,GAAG,EAAE,QAAQ,CAAC;IAE5D,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC9F,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,mBAAmB,CACzC,GAAG,EACH,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CACnF,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Replaying histories against the project's code bundle (spec 10 §1, C-ABI).
3
+ *
4
+ * - Default engine: a fresh Node `vm` context with the SDK's task prelude
5
+ * (`runWorkflowTaskInVm`), fast and good for development.
6
+ * - `--isolate`: the QuickJS runner the managed workers and the service use
7
+ * (`createWorkflowTaskRunner`), so a pass here is a pass there.
8
+ *
9
+ * Both run a `verify` task request over the whole history and report
10
+ * `NON_DETERMINISM` when the code no longer produces the recorded commands.
11
+ */
12
+ import type { HistoryFile, WorkflowTaskResult } from '@fluidgrids/workflows/history';
13
+ export type ReplayEngine = 'vm' | 'quickjs';
14
+ export interface ReplayOutcome {
15
+ name: string;
16
+ workflowFn: string;
17
+ events: number;
18
+ engine: ReplayEngine;
19
+ ok: boolean;
20
+ /** `NON_DETERMINISM`, `WORKFLOW_CODE_ERROR`, …; null when the replay passed. */
21
+ cause: string | null;
22
+ message: string | null;
23
+ /** The first history event the failure points at, when the runtime knows it. */
24
+ seq: number | null;
25
+ result: WorkflowTaskResult;
26
+ }
27
+ /** Replays many histories against one bundle; close it when done. */
28
+ export interface Replayer {
29
+ replay(file: HistoryFile, name: string): Promise<ReplayOutcome>;
30
+ close(): Promise<void>;
31
+ }
32
+ /** A replayer for `bundle` (verified against `buildId` in the isolate). */
33
+ export declare function createReplayer(bundle: string, buildId: string, engine: ReplayEngine): Promise<Replayer>;
34
+ /** One line per failed replay, for hints and details. */
35
+ export declare function describeOutcome(outcome: ReplayOutcome): string;
36
+ //# sourceMappingURL=replay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../src/code-first/replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAIrF,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,gFAAgF;IAChF,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,gFAAgF;IAChF,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,qEAAqE;AACrE,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAChE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,2EAA2E;AAC3E,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,QAAQ,CAAC,CAmCnB;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAI9D"}