@fluidgrids/cli 2026.1107.1 → 2026.1109.1

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 (162) hide show
  1. package/README.md +98 -6
  2. package/dist/cli.js +9705 -33
  3. package/package.json +42 -35
  4. package/dist/auth/device-login.d.ts +0 -31
  5. package/dist/auth/device-login.d.ts.map +0 -1
  6. package/dist/auth/device-login.js +0 -75
  7. package/dist/auth/device-login.js.map +0 -1
  8. package/dist/auth/token-auth.d.ts +0 -49
  9. package/dist/auth/token-auth.d.ts.map +0 -1
  10. package/dist/auth/token-auth.js +0 -279
  11. package/dist/auth/token-auth.js.map +0 -1
  12. package/dist/cli.d.ts +0 -10
  13. package/dist/cli.d.ts.map +0 -1
  14. package/dist/cli.js.map +0 -1
  15. package/dist/code-first/api.d.ts +0 -601
  16. package/dist/code-first/api.d.ts.map +0 -1
  17. package/dist/code-first/api.js +0 -432
  18. package/dist/code-first/api.js.map +0 -1
  19. package/dist/code-first/code-upload.d.ts +0 -53
  20. package/dist/code-first/code-upload.d.ts.map +0 -1
  21. package/dist/code-first/code-upload.js +0 -165
  22. package/dist/code-first/code-upload.js.map +0 -1
  23. package/dist/code-first/commands/codegen.d.ts +0 -20
  24. package/dist/code-first/commands/codegen.d.ts.map +0 -1
  25. package/dist/code-first/commands/codegen.js +0 -50
  26. package/dist/code-first/commands/codegen.js.map +0 -1
  27. package/dist/code-first/commands/diff.d.ts +0 -28
  28. package/dist/code-first/commands/diff.d.ts.map +0 -1
  29. package/dist/code-first/commands/diff.js +0 -73
  30. package/dist/code-first/commands/diff.js.map +0 -1
  31. package/dist/code-first/commands/hotfix.d.ts +0 -54
  32. package/dist/code-first/commands/hotfix.d.ts.map +0 -1
  33. package/dist/code-first/commands/hotfix.js +0 -225
  34. package/dist/code-first/commands/hotfix.js.map +0 -1
  35. package/dist/code-first/commands/import.d.ts +0 -40
  36. package/dist/code-first/commands/import.d.ts.map +0 -1
  37. package/dist/code-first/commands/import.js +0 -235
  38. package/dist/code-first/commands/import.js.map +0 -1
  39. package/dist/code-first/commands/init.d.ts +0 -33
  40. package/dist/code-first/commands/init.d.ts.map +0 -1
  41. package/dist/code-first/commands/init.js +0 -177
  42. package/dist/code-first/commands/init.js.map +0 -1
  43. package/dist/code-first/commands/interface.d.ts +0 -12
  44. package/dist/code-first/commands/interface.d.ts.map +0 -1
  45. package/dist/code-first/commands/interface.js +0 -21
  46. package/dist/code-first/commands/interface.js.map +0 -1
  47. package/dist/code-first/commands/pull.d.ts +0 -63
  48. package/dist/code-first/commands/pull.d.ts.map +0 -1
  49. package/dist/code-first/commands/pull.js +0 -266
  50. package/dist/code-first/commands/pull.js.map +0 -1
  51. package/dist/code-first/commands/push.d.ts +0 -97
  52. package/dist/code-first/commands/push.d.ts.map +0 -1
  53. package/dist/code-first/commands/push.js +0 -313
  54. package/dist/code-first/commands/push.js.map +0 -1
  55. package/dist/code-first/commands/replay.d.ts +0 -44
  56. package/dist/code-first/commands/replay.d.ts.map +0 -1
  57. package/dist/code-first/commands/replay.js +0 -238
  58. package/dist/code-first/commands/replay.js.map +0 -1
  59. package/dist/code-first/commands/runs.d.ts +0 -160
  60. package/dist/code-first/commands/runs.d.ts.map +0 -1
  61. package/dist/code-first/commands/runs.js +0 -565
  62. package/dist/code-first/commands/runs.js.map +0 -1
  63. package/dist/code-first/commands/suite.d.ts +0 -57
  64. package/dist/code-first/commands/suite.d.ts.map +0 -1
  65. package/dist/code-first/commands/suite.js +0 -197
  66. package/dist/code-first/commands/suite.js.map +0 -1
  67. package/dist/code-first/commands/validate.d.ts +0 -38
  68. package/dist/code-first/commands/validate.d.ts.map +0 -1
  69. package/dist/code-first/commands/validate.js +0 -140
  70. package/dist/code-first/commands/validate.js.map +0 -1
  71. package/dist/code-first/commands/versions.d.ts +0 -63
  72. package/dist/code-first/commands/versions.d.ts.map +0 -1
  73. package/dist/code-first/commands/versions.js +0 -204
  74. package/dist/code-first/commands/versions.js.map +0 -1
  75. package/dist/code-first/connections.d.ts +0 -55
  76. package/dist/code-first/connections.d.ts.map +0 -1
  77. package/dist/code-first/connections.js +0 -180
  78. package/dist/code-first/connections.js.map +0 -1
  79. package/dist/code-first/durable-operations.d.ts +0 -41
  80. package/dist/code-first/durable-operations.d.ts.map +0 -1
  81. package/dist/code-first/durable-operations.js +0 -135
  82. package/dist/code-first/durable-operations.js.map +0 -1
  83. package/dist/code-first/history.d.ts +0 -30
  84. package/dist/code-first/history.d.ts.map +0 -1
  85. package/dist/code-first/history.js +0 -139
  86. package/dist/code-first/history.js.map +0 -1
  87. package/dist/code-first/imports.d.ts +0 -22
  88. package/dist/code-first/imports.d.ts.map +0 -1
  89. package/dist/code-first/imports.js +0 -67
  90. package/dist/code-first/imports.js.map +0 -1
  91. package/dist/code-first/index.d.ts +0 -18
  92. package/dist/code-first/index.d.ts.map +0 -1
  93. package/dist/code-first/index.js +0 -36
  94. package/dist/code-first/index.js.map +0 -1
  95. package/dist/code-first/junit.d.ts +0 -24
  96. package/dist/code-first/junit.d.ts.map +0 -1
  97. package/dist/code-first/junit.js +0 -163
  98. package/dist/code-first/junit.js.map +0 -1
  99. package/dist/code-first/lowering.d.ts +0 -94
  100. package/dist/code-first/lowering.d.ts.map +0 -1
  101. package/dist/code-first/lowering.js +0 -248
  102. package/dist/code-first/lowering.js.map +0 -1
  103. package/dist/code-first/operations.d.ts +0 -55
  104. package/dist/code-first/operations.d.ts.map +0 -1
  105. package/dist/code-first/operations.js +0 -165
  106. package/dist/code-first/operations.js.map +0 -1
  107. package/dist/code-first/parity-operations.d.ts +0 -44
  108. package/dist/code-first/parity-operations.d.ts.map +0 -1
  109. package/dist/code-first/parity-operations.js +0 -211
  110. package/dist/code-first/parity-operations.js.map +0 -1
  111. package/dist/code-first/parity.d.ts +0 -83
  112. package/dist/code-first/parity.d.ts.map +0 -1
  113. package/dist/code-first/parity.js +0 -301
  114. package/dist/code-first/parity.js.map +0 -1
  115. package/dist/code-first/presigned.d.ts +0 -21
  116. package/dist/code-first/presigned.d.ts.map +0 -1
  117. package/dist/code-first/presigned.js +0 -85
  118. package/dist/code-first/presigned.js.map +0 -1
  119. package/dist/code-first/project.d.ts +0 -123
  120. package/dist/code-first/project.d.ts.map +0 -1
  121. package/dist/code-first/project.js +0 -301
  122. package/dist/code-first/project.js.map +0 -1
  123. package/dist/code-first/python.d.ts +0 -81
  124. package/dist/code-first/python.d.ts.map +0 -1
  125. package/dist/code-first/python.js +0 -249
  126. package/dist/code-first/python.js.map +0 -1
  127. package/dist/code-first/redact.d.ts +0 -31
  128. package/dist/code-first/redact.d.ts.map +0 -1
  129. package/dist/code-first/redact.js +0 -159
  130. package/dist/code-first/redact.js.map +0 -1
  131. package/dist/code-first/register.d.ts +0 -35
  132. package/dist/code-first/register.d.ts.map +0 -1
  133. package/dist/code-first/register.js +0 -415
  134. package/dist/code-first/register.js.map +0 -1
  135. package/dist/code-first/remote.d.ts +0 -58
  136. package/dist/code-first/remote.d.ts.map +0 -1
  137. package/dist/code-first/remote.js +0 -126
  138. package/dist/code-first/remote.js.map +0 -1
  139. package/dist/code-first/replay.d.ts +0 -36
  140. package/dist/code-first/replay.d.ts.map +0 -1
  141. package/dist/code-first/replay.js +0 -52
  142. package/dist/code-first/replay.js.map +0 -1
  143. package/dist/code-first/shared.d.ts +0 -53
  144. package/dist/code-first/shared.d.ts.map +0 -1
  145. package/dist/code-first/shared.js +0 -94
  146. package/dist/code-first/shared.js.map +0 -1
  147. package/dist/code-first/test-suite-operations.d.ts +0 -16
  148. package/dist/code-first/test-suite-operations.d.ts.map +0 -1
  149. package/dist/code-first/test-suite-operations.js +0 -44
  150. package/dist/code-first/test-suite-operations.js.map +0 -1
  151. package/dist/modules.d.ts +0 -15
  152. package/dist/modules.d.ts.map +0 -1
  153. package/dist/modules.js +0 -61
  154. package/dist/modules.js.map +0 -1
  155. package/dist/product-defaults.d.ts +0 -11
  156. package/dist/product-defaults.d.ts.map +0 -1
  157. package/dist/product-defaults.js +0 -25
  158. package/dist/product-defaults.js.map +0 -1
  159. package/dist/program.d.ts +0 -20
  160. package/dist/program.d.ts.map +0 -1
  161. package/dist/program.js +0 -44
  162. package/dist/program.js.map +0 -1
package/README.md CHANGED
@@ -239,11 +239,24 @@ fluidgrids run lead-enrichment --wait # trigger a canvas workflow fr
239
239
  imports, are neither bundled nor archived. The bundle and archive size caps
240
240
  are checked before the first version is written, and on `--dry-run`.
241
241
  `lock.json` records the bundle's `buildId`, `sourceHash` and SDK version.
242
- - **Refusals.** Features that arrive in Phase C (user activities and task
243
- queues, custom queries and updates, search attributes, interceptors and
244
- sinks, Python durable functions) and activity node types a durable run cannot
245
- run stop the push before anything is written. `validate` reports the same
246
- findings as errors.
242
+ - **Refusals.** User local activities (`ctx.localActivity` with a function)
243
+ and activity node types a durable run cannot run stop the push before
244
+ anything is written; `validate` reports the same findings as errors. The
245
+ Phase C features (user activities and self-hosted task queues, queries and
246
+ updates, search attributes, interceptors, dynamic workflows, Python durable
247
+ functions) are pushed and gated by the service on their workspace flags.
248
+ - **Build output.** The bundle a push uploads is also written to
249
+ `.fluidgrids/build/bundle.mjs` (`bundle.pyz` for Python), so
250
+ `fluidgrids worker run` serves the same bytes and `buildId`. `init` adds the
251
+ directory to `.gitignore`.
252
+ - **Python.** In a `--lang py` project, tier-2 `@workflow` functions are built
253
+ with `python -m fluidgrids_workflows build` (the function the service's build
254
+ VM runs) into a deterministic `.pyz`, uploaded with
255
+ `prepareWorkflowCodeUpload(language: python)` and a source archive of the
256
+ files the Python SDK hashes. `push --hotfix`, `replay` and `test` replay with
257
+ the Python SDK, and `test` runs `python -m fluidgrids_workflows test` when
258
+ the project has `tests/`. The workspace needs
259
+ `fluidgrids.python-durable-functions`.
247
260
  - **Hotfix.** `push --hotfix <version>` replaces the code of an existing version
248
261
  when the graph, the exported functions and their interfaces are unchanged.
249
262
  `--replay-sample N` replays the N latest durable runs of that version locally
@@ -305,6 +318,85 @@ fluidgrids versions override <runId> --pin v3 # or --auto-upgrade, --clear
305
318
  - Without the feature the service refuses each of these options with
306
319
  `FEATURE_DISABLED`; commands run without them behave as before.
307
320
 
321
+ ## Self-hosted workers and run control (Phase C)
322
+
323
+ BOFF-9906, spec `code-first` 11 §2.36. Every command wraps the GraphQL
324
+ operation of the same name; the service checks the workspace flag each needs
325
+ (`fluidgrids.self-hosted-workers`, `fluidgrids.run-control`,
326
+ `fluidgrids.search-attributes`, `fluidgrids.run-archival`,
327
+ `fluidgrids.schedule-policies`) and answers `FEATURE_DISABLED` without it; the
328
+ CLI then names the flag.
329
+
330
+ ```bash
331
+ # Task queues and self-hosted workers
332
+ fluidgrids queues create gpu --max-tasks-per-second 20
333
+ fluidgrids queues list | describe gpu | builds gpu | update gpu --clear-max-tasks-per-second | delete gpu
334
+ fluidgrids workers tokens create ci --queue gpu # the token is shown once
335
+ fluidgrids workers tokens list | rotate <id> | delete <id>
336
+ fluidgrids workers tokens allow-connections <id> crm # workspace admins; each release is audited
337
+ fluidgrids workers list --queue gpu --stale
338
+ FLUIDGRIDS_WORKER_TOKEN=fgr_... fluidgrids worker run --queue gpu --activities activities/index.ts
339
+ fluidgrids dev # ephemeral queue + token + worker until Ctrl-C
340
+ fluidgrids runs start approvals --task-queue dev-1a2b3c4d
341
+
342
+ # Run control
343
+ fluidgrids runs query <runId> progress
344
+ fluidgrids runs update <runId> addItem --args '{"sku":"a"}' # waits, then polls until completed
345
+ fluidgrids runs reset <runId> --to last-clean-task # or a seq, first-task, last-task, last-continue-as-new, build-id
346
+ fluidgrids runs trace <runId> # hierarchy with what each open run waits on
347
+ fluidgrids activities pause <runId> --type internal:http --reason 'vendor down'
348
+ fluidgrids activities unpause <runId> --all --reset-attempts
349
+ fluidgrids activities complete <runId> <activityId> --result '{"ok":true}'
350
+ fluidgrids activities complete --task-token-env TASK_TOKEN # asynchronous completion by token
351
+ fluidgrids activities update-options <runId> --all --max-retries 10 --start-to-close 2m
352
+ fluidgrids activities pause-rules create --activity-type internal:http --reason 'vendor down' --expires-in 2h
353
+ fluidgrids signal-token create <runId> --signal approve --ttl 7d # POST URL shown once
354
+
355
+ # Search attributes, batches and schedules
356
+ fluidgrids search-attributes create customer --type keyword
357
+ fluidgrids runs batch signal --key approvals --status running --signal nudge --reason 'resend' --dry-run
358
+ fluidgrids runs batch terminate --run-id r1,r2 --reason cleanup
359
+ fluidgrids batch list | describe <id> --watch | cancel <id>
360
+ fluidgrids schedules list | describe <key> <trigger> | trigger <key> <trigger>
361
+ fluidgrids schedules backfill <key> <trigger> --from 2026-10-01T00:00:00Z --to 2026-10-02T00:00:00Z
362
+ fluidgrids schedules pause <key> <trigger> --note maintenance | unpause <key> <trigger>
363
+ ```
364
+
365
+ - Run-scoped commands take a run id or `--workflow-id <id> --key <key>`.
366
+ - Tokens are never taken from the command line: worker tokens come from
367
+ `FLUIDGRIDS_WORKER_TOKEN` (or `--token-env`), activity task tokens from
368
+ `--task-token-env`. Issued tokens are printed once and never stored.
369
+ - `worker run` serves `.fluidgrids/build/bundle.mjs|.pyz` (or `--build` builds
370
+ it now) and the activities a module exports, through
371
+ `@fluidgrids/workflows/worker` for TypeScript and the project interpreter's
372
+ `fluidgrids_workflows.worker` for Python. The bridge URL defaults to the
373
+ workspace gateway's `/runner-bridge`; `FLUIDGRIDS_CF_ACCESS_CLIENT_ID` and
374
+ `_SECRET` add the Cloudflare Access headers alpha needs.
375
+ - Destructive commands (reset, batch starts, deletes, rotations) ask for
376
+ confirmation; pass `--force` in scripts.
377
+
378
+ ### Client profiles
379
+
380
+ `~/.fluidgrids/config.toml` holds named profiles that the CLI and both workflow
381
+ SDKs read (`FLUIDGRIDS_CONFIG` points at another file):
382
+
383
+ ```bash
384
+ fluidgrids config set apiUrl https://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql --profile alpha
385
+ fluidgrids config set workspace <workspaceId> --profile alpha
386
+ printf %s "$TOKEN" | fluidgrids config set token --profile alpha # into the OS keychain
387
+ fluidgrids config set defaultProfile alpha
388
+ fluidgrids config get | list | delete [key] | migrate --profile prod
389
+ fluidgrids --profile alpha runs list
390
+ ```
391
+
392
+ - Keys: `apiUrl` (the workspace gateway), `workspace`, `product`,
393
+ `environment`, `tokenRef`, `codecServerUrl`, `payloadConverter`.
394
+ - `tokenRef` is `env:<VAR>` or `keychain:<service>/<account>`; a token is never
395
+ stored in the file, and any other reference is refused.
396
+ - `--profile`, then `FLUIDGRIDS_PROFILE`, then `defaultProfile` picks the
397
+ profile; `FLUIDGRIDS_<KEY>` variables and the usual `FLUIDGRIDS_*` overrides
398
+ win over it key by key. Without a config file nothing changes.
399
+
308
400
  ## Credentials, webhooks, scheduled jobs
309
401
 
310
402
  A credential is an integration connection. Creating one is a two-step flow:
@@ -355,7 +447,7 @@ gateway and `https://alphaapp.fluidgrids.ai` to the alpha gateway automatically.
355
447
  bun install
356
448
  bun run dev -- --help
357
449
  bun run test
358
- bun run sanity # format:check + lint + type-check + test + build
450
+ bun run sanity # format check + lint + type check + build + test + knip (boff sanity)
359
451
  ```
360
452
 
361
453
  Changes to the shared command behaviour belong in `cli-sdk`