yaml-flow 7.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/asset-integrity.json +8 -4
- package/browser/board-livecards-client.js +1 -1
- package/browser/board-livecards-localstorage.js +5 -5
- package/browser/live-cards.js +19 -3307
- package/cli/board-live-cards-lib-tjYsPt5U.d.ts +321 -0
- package/{dist/cli → cli}/browser-api/board-live-cards-browser-adapter.d.ts +3 -5
- package/cli/browser-api/board-live-cards-browser-adapter.js +3 -0
- package/{dist/cli → cli}/browser-api/card-store-browser-api.d.ts +1 -2
- package/{dist/cli → cli}/browser-api/card-store-browser-api.js +1 -1
- package/cli/execution-interface-C_A6WCiK.d.ts +284 -0
- package/cli/node/artifacts-store-cli.js +11 -0
- package/cli/node/batch-runner-cli.js +3 -0
- package/cli/node/board-live-cards-cli.js +15 -0
- package/cli/node/card-store-cli.js +8 -0
- package/{dist/cli → cli}/node/execution-adapter.d.ts +3 -3
- package/cli/node/execution-adapter.js +3 -0
- package/{dist/cli → cli}/node/fs-board-adapter.d.ts +24 -11
- package/cli/node/fs-board-adapter.js +14 -0
- package/{dist/cli → cli}/node/source-cli-task-executor.js +2 -2
- package/cli/node/step-machine-cli.d.ts +7 -0
- package/cli/node/step-machine-cli.js +5 -0
- package/{dist/board-live-cards-public-CW5074xr.d.cts → cli/types-CziUxkiv.d.ts} +69 -7
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/gandalf-runtime/.config/card-store-ref.json +1 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/gandalf-runtime/.config/chat-handler.json +1 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/gandalf-runtime/.config/outputs-store-ref.json +1 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/gandalf-runtime/.config/task-executor.json +1 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/gandalf-runtime/.state-snapshot/board/graph.json +29 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/gandalf-runtime/.state-snapshot/board/lastJournalProcessedId.json +1 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/gandalf-runtime-out/.outputs/status.json +25 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/runtime-out/.outputs/cards/card-market-prices/computed_values.json +67 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/runtime-out/.outputs/cards/card-portfolio/computed_values.json +1 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/runtime-out/.outputs/cards/card-portfolio-value/computed_values.json +52 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/runtime-out/.outputs/data-objects/holdings.json +22 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/runtime-out/.outputs/data-objects/positions.json +46 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/runtime-out/.outputs/data-objects/quotes.json +35 -0
- package/examples/board/.demo-setup/run-1778643703151-3360-dopnpv/board-default/runtime-out/.outputs/status.json +113 -0
- package/examples/{example-board/cards/card-market-prices.json → board/cards/cardT-market-prices.json} +2 -2
- package/examples/{example-board/cards/card-portfolio.json → board/cards/cardT-portfolio.json} +3 -13
- package/examples/{example-board → board}/demo-server-config.json +0 -1
- package/examples/{example-board → board}/demo-server.js +70 -72
- package/examples/{example-board → board}/demo-shell-with-server.html +3 -3
- package/examples/{example-board → board}/demo-task-executor.js +75 -32
- package/examples/board/gandalf-cards/card-source-kinds.json +36 -0
- package/examples/board/gandalf-cards/cards/_index.json +7 -0
- package/examples/board/gandalf-cards/cards/card-source-kinds.json +64 -0
- package/examples/board/source-def-flows/copilot.flow.json +33 -0
- package/examples/board/source-def-flows/mock.flow.json +35 -0
- package/examples/board/source-def-flows/url-list.flow.json +33 -0
- package/examples/board/source-def-flows/url.flow.json +33 -0
- package/examples/board/source-def-flows/workiq.flow.json +34 -0
- package/examples/board/source-def-handlers/copilot-source-handler.js +141 -0
- package/examples/board/source-def-handlers/http-source-handler.js +145 -0
- package/examples/board/source_def_flows.json +249 -0
- package/examples/board/test/demo-http-test.js +317 -0
- package/examples/{example-board → board-local}/demo-shell-localstorage.html +4 -4
- package/examples/{browser/boards/portfolio-tracker → portfolio-tracker/handlers}/portfolio-tracker-fetch-prices.js +1 -1
- package/examples/{browser/boards/portfolio-tracker/portfolio-tracker-public.js → portfolio-tracker/portfolio-tracker.js} +11 -14
- package/examples/{browser/boards/portfolio-tracker → portfolio-tracker/test}/portfolio-t4.js +32 -50
- package/lib/artifacts-store-lib-public-BABrgFkV.d.ts +119 -0
- package/lib/artifacts-store-lib-public-DGa8BpJT.d.cts +119 -0
- package/lib/artifacts-store-public.cjs +2 -0
- package/lib/artifacts-store-public.d.cts +5 -0
- package/lib/artifacts-store-public.d.ts +5 -0
- package/lib/artifacts-store-public.js +2 -0
- package/lib/board-live-cards-node.cjs +14 -0
- package/{dist/cli/node/execution-adapter.d.cts → lib/board-live-cards-node.d.cts} +45 -85
- package/lib/board-live-cards-node.d.ts +134 -0
- package/lib/board-live-cards-node.js +14 -0
- package/lib/board-live-cards-public-BnmRAbQV.d.cts +383 -0
- package/{dist/board-live-cards-public-hnZo0mAf.d.ts → lib/board-live-cards-public-CsmYrvpd.d.ts} +142 -77
- package/lib/board-live-cards-public.cjs +3 -0
- package/lib/board-live-cards-public.d.cts +4 -0
- package/lib/board-live-cards-public.d.ts +4 -0
- package/lib/board-live-cards-public.js +3 -0
- package/lib/board-live-cards-server-runtime.cjs +9 -0
- package/lib/board-live-cards-server-runtime.d.cts +6 -0
- package/lib/board-live-cards-server-runtime.d.ts +6 -0
- package/lib/board-live-cards-server-runtime.js +9 -0
- package/lib/board-livegraph-runtime/index.cjs +3 -0
- package/{dist → lib}/board-livegraph-runtime/index.d.cts +1 -2
- package/{dist → lib}/board-livegraph-runtime/index.d.ts +1 -2
- package/lib/board-livegraph-runtime/index.js +3 -0
- package/lib/board-worker-adapter.cjs +10 -0
- package/{dist/storage-refs.d.cts → lib/board-worker-adapter.d.cts} +5 -5
- package/{dist/storage-refs.d.ts → lib/board-worker-adapter.d.ts} +5 -5
- package/lib/board-worker-adapter.js +10 -0
- package/{dist → lib}/card-compute/index.cjs +1 -1
- package/{dist → lib}/card-compute/index.js +1 -1
- package/lib/card-store-public.cjs +2 -0
- package/lib/card-store-public.d.cts +61 -0
- package/lib/card-store-public.d.ts +61 -0
- package/lib/card-store-public.js +2 -0
- package/lib/card-validation.cjs +10 -0
- package/lib/card-validation.d.cts +35 -0
- package/lib/card-validation.d.ts +35 -0
- package/lib/card-validation.js +10 -0
- package/{dist/constants-oCEbNpul.d.ts → lib/constants-BPVLb3Es.d.ts} +1 -1
- package/{dist/constants-BzZUyYlp.d.cts → lib/constants-DXxsRN9y.d.cts} +1 -1
- package/{dist → lib}/continuous-event-graph/index.cjs +2 -2
- package/{dist → lib}/continuous-event-graph/index.d.cts +3 -5
- package/{dist → lib}/continuous-event-graph/index.d.ts +3 -5
- package/{dist → lib}/continuous-event-graph/index.js +2 -2
- package/{dist → lib}/event-graph/index.d.cts +2 -2
- package/{dist → lib}/event-graph/index.d.ts +2 -2
- package/lib/execution-refs.cjs +3 -0
- package/{dist → lib}/execution-refs.d.cts +38 -14
- package/{dist → lib}/execution-refs.d.ts +38 -14
- package/lib/execution-refs.js +3 -0
- package/lib/index.cjs +25 -0
- package/{dist → lib}/index.d.cts +7 -8
- package/{dist → lib}/index.d.ts +7 -8
- package/lib/index.js +25 -0
- package/{dist/live-cards-bridge-BXbVTsna.d.cts → lib/live-cards-bridge-DC_ZU0eS.d.ts} +134 -3
- package/{dist/live-cards-bridge-Ds28XR15.d.ts → lib/live-cards-bridge-b25aAVvE.d.cts} +134 -3
- package/lib/loader-CuuLjxVA.d.cts +42 -0
- package/lib/loader-Zborm2pq.d.ts +42 -0
- package/lib/server-runtime/index.cjs +9 -0
- package/{dist → lib}/server-runtime/index.d.cts +4 -4
- package/{dist → lib}/server-runtime/index.d.ts +4 -4
- package/lib/server-runtime/index.js +9 -0
- package/lib/step-machine/index.d.cts +64 -0
- package/lib/step-machine/index.d.ts +64 -0
- package/lib/step-machine-public/index.cjs +5 -0
- package/{dist → lib}/step-machine-public/index.d.cts +21 -1
- package/{dist → lib}/step-machine-public/index.d.ts +21 -1
- package/lib/step-machine-public/index.js +5 -0
- package/lib/storage-interface-BhAON-gW.d.cts +84 -0
- package/lib/storage-interface-BhAON-gW.d.ts +84 -0
- package/lib/stores/index.cjs +3 -0
- package/lib/stores/index.d.cts +4 -0
- package/lib/stores/index.d.ts +4 -0
- package/lib/stores/index.js +3 -0
- package/lib/stores/kv.cjs +3 -0
- package/lib/stores/kv.d.cts +32 -0
- package/lib/stores/kv.d.ts +32 -0
- package/lib/stores/kv.js +3 -0
- package/{dist → lib}/stores/memory.d.cts +1 -1
- package/{dist → lib}/stores/memory.d.ts +1 -1
- package/{dist/types-B1ZRa4aI.d.ts → lib/types-CBxkYuLY.d.ts} +2 -1
- package/{dist/types-ycun84cq.d.cts → lib/types-DQ1bKuB1.d.cts} +11 -0
- package/{dist/types-ycun84cq.d.ts → lib/types-DQ1bKuB1.d.ts} +11 -0
- package/{dist/types-BxEFcVK9.d.cts → lib/types-DkFvgxwq.d.cts} +2 -1
- package/package.json +79 -119
- package/board-live-cards-cli.js +0 -37
- package/browser/board-livecards-client.js.map +0 -1
- package/browser/board-livecards-localstorage.js.map +0 -1
- package/browser/board-livegraph-engine.js +0 -3
- package/browser/board-livegraph-engine.js.map +0 -1
- package/browser/card-compute.js +0 -266
- package/browser/compute-jsonata.js.map +0 -1
- package/card-store.js +0 -37
- package/dist/batch/index.cjs.map +0 -1
- package/dist/batch/index.js.map +0 -1
- package/dist/board-live-cards-lib-Bg6EvCo5.d.cts +0 -136
- package/dist/board-live-cards-lib-jM2uYG1v.d.ts +0 -136
- package/dist/board-livegraph-runtime/index.cjs +0 -3
- package/dist/board-livegraph-runtime/index.cjs.map +0 -1
- package/dist/board-livegraph-runtime/index.js +0 -3
- package/dist/board-livegraph-runtime/index.js.map +0 -1
- package/dist/card-compute/index.cjs.map +0 -1
- package/dist/card-compute/index.js.map +0 -1
- package/dist/cli/browser-api/board-live-cards-browser-adapter.cjs +0 -3
- package/dist/cli/browser-api/board-live-cards-browser-adapter.cjs.map +0 -1
- package/dist/cli/browser-api/board-live-cards-browser-adapter.d.cts +0 -37
- package/dist/cli/browser-api/board-live-cards-browser-adapter.js +0 -3
- package/dist/cli/browser-api/board-live-cards-browser-adapter.js.map +0 -1
- package/dist/cli/browser-api/card-store-browser-api.cjs +0 -2
- package/dist/cli/browser-api/card-store-browser-api.cjs.map +0 -1
- package/dist/cli/browser-api/card-store-browser-api.d.cts +0 -26
- package/dist/cli/browser-api/card-store-browser-api.js.map +0 -1
- package/dist/cli/node/artifacts-store-cli.cjs +0 -11
- package/dist/cli/node/artifacts-store-cli.cjs.map +0 -1
- package/dist/cli/node/artifacts-store-cli.d.cts +0 -8
- package/dist/cli/node/artifacts-store-cli.js +0 -11
- package/dist/cli/node/artifacts-store-cli.js.map +0 -1
- package/dist/cli/node/board-live-cards-cli.cjs +0 -15
- package/dist/cli/node/board-live-cards-cli.cjs.map +0 -1
- package/dist/cli/node/board-live-cards-cli.d.cts +0 -20
- package/dist/cli/node/board-live-cards-cli.js +0 -15
- package/dist/cli/node/board-live-cards-cli.js.map +0 -1
- package/dist/cli/node/card-store-cli.cjs +0 -8
- package/dist/cli/node/card-store-cli.cjs.map +0 -1
- package/dist/cli/node/card-store-cli.d.cts +0 -15
- package/dist/cli/node/card-store-cli.js +0 -8
- package/dist/cli/node/card-store-cli.js.map +0 -1
- package/dist/cli/node/execution-adapter.cjs +0 -3
- package/dist/cli/node/execution-adapter.cjs.map +0 -1
- package/dist/cli/node/execution-adapter.js +0 -3
- package/dist/cli/node/execution-adapter.js.map +0 -1
- package/dist/cli/node/fs-board-adapter.cjs +0 -14
- package/dist/cli/node/fs-board-adapter.cjs.map +0 -1
- package/dist/cli/node/fs-board-adapter.d.cts +0 -204
- package/dist/cli/node/fs-board-adapter.js +0 -14
- package/dist/cli/node/fs-board-adapter.js.map +0 -1
- package/dist/cli/node/source-cli-task-executor.cjs +0 -11
- package/dist/cli/node/source-cli-task-executor.cjs.map +0 -1
- package/dist/cli/node/source-cli-task-executor.js.map +0 -1
- package/dist/config/index.cjs.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/continuous-event-graph/index.cjs.map +0 -1
- package/dist/continuous-event-graph/index.js.map +0 -1
- package/dist/event-graph/index.cjs.map +0 -1
- package/dist/event-graph/index.js.map +0 -1
- package/dist/execution-refs.cjs +0 -3
- package/dist/execution-refs.cjs.map +0 -1
- package/dist/execution-refs.js +0 -3
- package/dist/execution-refs.js.map +0 -1
- package/dist/index.cjs +0 -30
- package/dist/index.cjs.map +0 -1
- package/dist/index.js +0 -30
- package/dist/index.js.map +0 -1
- package/dist/inference/index.cjs +0 -7
- package/dist/inference/index.cjs.map +0 -1
- package/dist/inference/index.d.cts +0 -229
- package/dist/inference/index.d.ts +0 -229
- package/dist/inference/index.js +0 -7
- package/dist/inference/index.js.map +0 -1
- package/dist/server-runtime/index.cjs +0 -9
- package/dist/server-runtime/index.cjs.map +0 -1
- package/dist/server-runtime/index.js +0 -9
- package/dist/server-runtime/index.js.map +0 -1
- package/dist/step-machine/index.cjs.map +0 -1
- package/dist/step-machine/index.d.cts +0 -102
- package/dist/step-machine/index.d.ts +0 -102
- package/dist/step-machine/index.js.map +0 -1
- package/dist/step-machine-public/index.cjs +0 -2
- package/dist/step-machine-public/index.cjs.map +0 -1
- package/dist/step-machine-public/index.js +0 -2
- package/dist/step-machine-public/index.js.map +0 -1
- package/dist/storage-refs.cjs +0 -10
- package/dist/storage-refs.cjs.map +0 -1
- package/dist/storage-refs.js +0 -10
- package/dist/storage-refs.js.map +0 -1
- package/dist/stores/file.cjs +0 -2
- package/dist/stores/file.cjs.map +0 -1
- package/dist/stores/file.d.cts +0 -36
- package/dist/stores/file.d.ts +0 -36
- package/dist/stores/file.js +0 -2
- package/dist/stores/file.js.map +0 -1
- package/dist/stores/index.cjs +0 -2
- package/dist/stores/index.cjs.map +0 -1
- package/dist/stores/index.d.cts +0 -4
- package/dist/stores/index.d.ts +0 -4
- package/dist/stores/index.js +0 -2
- package/dist/stores/index.js.map +0 -1
- package/dist/stores/localStorage.cjs +0 -2
- package/dist/stores/localStorage.cjs.map +0 -1
- package/dist/stores/localStorage.d.cts +0 -34
- package/dist/stores/localStorage.d.ts +0 -34
- package/dist/stores/localStorage.js +0 -2
- package/dist/stores/localStorage.js.map +0 -1
- package/dist/stores/memory.cjs.map +0 -1
- package/dist/stores/memory.js.map +0 -1
- package/dist/types-CHSdoAAA.d.cts +0 -135
- package/dist/types-CoW0gQl3.d.ts +0 -135
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-fetch-prices.py +0 -201
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-http-test.js +0 -357
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-inference-adapter.js +0 -196
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-server.js +0 -300
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-server.py +0 -617
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.py +0 -366
- package/examples/browser/livecards-browser/index.html +0 -41
- package/examples/browser/step-machine-browser/index.html +0 -367
- package/examples/cli/step-machine-cli/portfolio-tracker/--base-ref/.runtime-out +0 -1
- package/examples/cli/step-machine-cli/portfolio-tracker/--base-ref/board-graph.json +0 -32
- package/examples/cli/step-machine-cli/portfolio-tracker/cards/holdings-table.json +0 -22
- package/examples/cli/step-machine-cli/portfolio-tracker/cards/portfolio-form.json +0 -43
- package/examples/cli/step-machine-cli/portfolio-tracker/cards/portfolio-value.json +0 -15
- package/examples/cli/step-machine-cli/portfolio-tracker/cards/price-fetch.json +0 -15
- package/examples/cli/step-machine-cli/portfolio-tracker/fetch-prices.js +0 -48
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/_board-cli.js +0 -125
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/add-cards-cli.js +0 -32
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/init-board-cli.js +0 -26
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/poll-status-cli.js +0 -49
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/reset-board-dir-cli.js +0 -25
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/retrigger-cli.js +0 -23
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/status-cli.js +0 -21
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/update-holdings-cli.js +0 -38
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/wait-completed-cli.js +0 -48
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/write-prices-cli.js +0 -31
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/_board_pycli.py +0 -107
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/add-cards.py +0 -51
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/init-board.py +0 -45
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/poll-status.py +0 -71
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/reset-board-dir.py +0 -36
- package/examples/cli/step-machine-cli/portfolio-tracker/inline-python-demo.flow.yaml +0 -26
- package/examples/cli/step-machine-cli/portfolio-tracker/inline-python-handlers.py +0 -39
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker-pycli.flow.yaml +0 -80
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml +0 -76
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.input.json +0 -44
- package/examples/cli/step-machine-cli/portfolio-tracker/run-inline-python-demo-pycli.py +0 -43
- package/examples/cli/step-machine-cli/portfolio-tracker/run-portfolio-tracker-pycli.py +0 -77
- package/examples/cli/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat +0 -28
- package/examples/cli/step-machine-demo/jsonata-init-board-cli.js +0 -31
- package/examples/cli/step-machine-demo/jsonata-init-board.flow.yaml +0 -54
- package/examples/cli/step-machine-demo/one-step-cli-only.flow.yaml +0 -21
- package/examples/cli/step-machine-demo/step-cli-echo-y.js +0 -15
- package/examples/cli/step-machine-demo/step2-double-cli.js +0 -33
- package/examples/cli/step-machine-demo/two-step-math.flow.yaml +0 -93
- package/examples/cli/step-machine-demo/two-step-mixed.flow.yaml +0 -43
- package/examples/example-board/agent-instructions-cardlayout.md +0 -56
- package/examples/example-board/agent-instructions.md +0 -834
- package/examples/example-board/cards/_index.json +0 -47
- package/examples/example-board/demo-shell.html +0 -63
- package/examples/index.html +0 -785
- package/examples/npm-libs/batch/batch-step-machine.ts +0 -121
- package/examples/npm-libs/continuous-event-graph/live-cards-board.ts +0 -215
- package/examples/npm-libs/continuous-event-graph/live-portfolio-dashboard.ts +0 -555
- package/examples/npm-libs/continuous-event-graph/portfolio-tracker.ts +0 -287
- package/examples/npm-libs/continuous-event-graph/reactive-monitoring.ts +0 -265
- package/examples/npm-libs/continuous-event-graph/reactive-pipeline.ts +0 -168
- package/examples/npm-libs/continuous-event-graph/soc-incident-board.ts +0 -287
- package/examples/npm-libs/continuous-event-graph/stock-dashboard.ts +0 -229
- package/examples/npm-libs/event-graph/ci-cd-pipeline.ts +0 -243
- package/examples/npm-libs/event-graph/executor-diamond.ts +0 -165
- package/examples/npm-libs/event-graph/executor-pipeline.ts +0 -161
- package/examples/npm-libs/event-graph/research-pipeline.ts +0 -137
- package/examples/npm-libs/flows/ai-conversation.yaml +0 -116
- package/examples/npm-libs/flows/order-processing.yaml +0 -143
- package/examples/npm-libs/flows/simple-greeting.yaml +0 -54
- package/examples/npm-libs/graph-of-graphs/multi-stage-etl.ts +0 -307
- package/examples/npm-libs/graph-of-graphs/url-processing-pipeline.ts +0 -254
- package/examples/npm-libs/inference/azure-deployment.ts +0 -149
- package/examples/npm-libs/inference/copilot-cli.ts +0 -138
- package/examples/npm-libs/inference/data-pipeline.ts +0 -145
- package/examples/npm-libs/inference/pluggable-adapters.ts +0 -254
- package/examples/npm-libs/node/ai-conversation.ts +0 -195
- package/examples/npm-libs/node/simple-greeting.ts +0 -101
- package/examples/step-machine-cli/portfolio-tracker/cards/holdings-table.json +0 -22
- package/examples/step-machine-cli/portfolio-tracker/cards/portfolio-form.json +0 -43
- package/examples/step-machine-cli/portfolio-tracker/cards/portfolio-value.json +0 -15
- package/examples/step-machine-cli/portfolio-tracker/cards/price-fetch.json +0 -15
- package/examples/step-machine-cli/portfolio-tracker/fetch-prices.js +0 -48
- package/examples/step-machine-cli/portfolio-tracker/handlers/_board-cli.js +0 -57
- package/examples/step-machine-cli/portfolio-tracker/handlers/add-cards-cli.js +0 -27
- package/examples/step-machine-cli/portfolio-tracker/handlers/init-board-cli.js +0 -25
- package/examples/step-machine-cli/portfolio-tracker/handlers/reset-board-dir-cli.js +0 -29
- package/examples/step-machine-cli/portfolio-tracker/handlers/retrigger-cli.js +0 -27
- package/examples/step-machine-cli/portfolio-tracker/handlers/status-cli.js +0 -25
- package/examples/step-machine-cli/portfolio-tracker/handlers/update-holdings-cli.js +0 -37
- package/examples/step-machine-cli/portfolio-tracker/handlers/wait-completed-cli.js +0 -53
- package/examples/step-machine-cli/portfolio-tracker/handlers/write-prices-cli.js +0 -35
- package/examples/step-machine-cli/portfolio-tracker/portfolio-tracker-task-executor.cjs +0 -96
- package/examples/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml +0 -227
- package/examples/step-machine-cli/portfolio-tracker/portfolio-tracker.input.json +0 -38
- package/examples/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat +0 -28
- package/step-machine-cli.js +0 -407
- /package/{dist/board-livegraph-runtime → cli/browser-api}/jsonata-sync.cjs +0 -0
- /package/{dist/cli → cli}/node/artifacts-store-cli.d.ts +0 -0
- /package/{dist/cli/node/source-cli-task-executor.d.cts → cli/node/batch-runner-cli.d.ts} +0 -0
- /package/{dist/cli → cli}/node/board-live-cards-cli.d.ts +0 -0
- /package/{dist/cli → cli}/node/card-store-cli.d.ts +0 -0
- /package/{dist/card-compute → cli/node}/jsonata-sync.cjs +0 -0
- /package/{dist/cli → cli}/node/source-cli-task-executor.d.ts +0 -0
- /package/examples/{example-board → board}/cards/card-concentration.json +0 -0
- /package/examples/{example-board → board}/cards/card-my-identity.json +0 -0
- /package/examples/{example-board → board}/cards/card-portfolio-action.json +0 -0
- /package/examples/{example-board → board}/cards/card-portfolio-intelligence.json +0 -0
- /package/examples/{example-board → board}/cards/card-portfolio-risks.json +0 -0
- /package/examples/{example-board → board}/cards/card-rebalance-impact.json +0 -0
- /package/examples/{example-board → board}/cards/card-rebalance-sim.json +0 -0
- /package/examples/{example-board/cards/card-portfolio-value.json → board/cards/cardT-portfolio-value.json} +0 -0
- /package/examples/{example-board → board}/demo-chat-handler.js +0 -0
- /package/examples/{example-board → board}/scripts/copilot_wrapper.bat +0 -0
- /package/examples/{example-board → board}/scripts/copilot_wrapper_helper.ps1 +0 -0
- /package/examples/{example-board → board}/scripts/workiq_wrapper.mjs +0 -0
- /package/examples/{browser/boards/portfolio-tracker → board/test}/portfolio-tracker-sse-worker.js +0 -0
- /package/{dist → lib}/batch/index.cjs +0 -0
- /package/{dist → lib}/batch/index.d.cts +0 -0
- /package/{dist → lib}/batch/index.d.ts +0 -0
- /package/{dist → lib}/batch/index.js +0 -0
- /package/{dist/cli/browser-api → lib/board-livegraph-runtime}/jsonata-sync.cjs +0 -0
- /package/{dist → lib}/card-compute/index.d.cts +0 -0
- /package/{dist → lib}/card-compute/index.d.ts +0 -0
- /package/{dist/cli/node → lib/card-compute}/jsonata-sync.cjs +0 -0
- /package/{dist → lib}/config/index.cjs +0 -0
- /package/{dist → lib}/config/index.d.cts +0 -0
- /package/{dist → lib}/config/index.d.ts +0 -0
- /package/{dist → lib}/config/index.js +0 -0
- /package/{dist → lib}/continuous-event-graph/jsonata-sync.cjs +0 -0
- /package/{dist → lib}/event-graph/index.cjs +0 -0
- /package/{dist → lib}/event-graph/index.js +0 -0
- /package/{dist → lib}/jsonata-sync.cjs +0 -0
- /package/{dist → lib}/server-runtime/jsonata-sync.cjs +0 -0
- /package/{dist → lib}/step-machine/index.cjs +0 -0
- /package/{dist → lib}/step-machine/index.js +0 -0
- /package/{dist → lib}/step-machine-public/jsonata-sync.cjs +0 -0
- /package/{dist → lib}/stores/memory.cjs +0 -0
- /package/{dist → lib}/stores/memory.js +0 -0
- /package/{dist → lib}/types-BBhqYGhE.d.cts +0 -0
- /package/{dist → lib}/types-BBhqYGhE.d.ts +0 -0
- /package/{dist → lib}/validate-BAVzUJWa.d.ts +0 -0
- /package/{dist → lib}/validate-Dbu7ygys.d.cts +0 -0
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
setlocal
|
|
3
|
-
cd /d "%~dp0"
|
|
4
|
-
|
|
5
|
-
set "EXAMPLE_TEMP_ROOT=%TEMP%\yaml-flow-step-machine-portfolio-tracker"
|
|
6
|
-
set "STORE_DIR=%EXAMPLE_TEMP_ROOT%\store"
|
|
7
|
-
set "RUNTIME_ROOT=%EXAMPLE_TEMP_ROOT%\runtime"
|
|
8
|
-
|
|
9
|
-
if /I "%~1"=="pause" goto :pause
|
|
10
|
-
if /I "%~1"=="resume" goto :resume
|
|
11
|
-
if /I "%~1"=="status" goto :status
|
|
12
|
-
goto :run
|
|
13
|
-
|
|
14
|
-
:pause
|
|
15
|
-
node ..\..\..\step-machine-cli.js --store file --store-dir "%STORE_DIR%" --pause
|
|
16
|
-
exit /b %ERRORLEVEL%
|
|
17
|
-
|
|
18
|
-
:resume
|
|
19
|
-
node ..\..\..\step-machine-cli.js portfolio-tracker.flow.yaml --store file --store-dir "%STORE_DIR%" --resume
|
|
20
|
-
exit /b %ERRORLEVEL%
|
|
21
|
-
|
|
22
|
-
:status
|
|
23
|
-
node ..\..\..\step-machine-cli.js --store file --store-dir "%STORE_DIR%" --status
|
|
24
|
-
exit /b %ERRORLEVEL%
|
|
25
|
-
|
|
26
|
-
:run
|
|
27
|
-
node -e "const fs=require('fs');const cp=require('child_process');const raw=JSON.parse(fs.readFileSync('portfolio-tracker.input.json','utf8'));raw.runtime_root=(process.env.RUNTIME_ROOT||'').replace(/\\\\/g,'/');const input=JSON.stringify(raw);const r=cp.spawnSync(process.execPath,['..\\..\\..\\step-machine-cli.js','portfolio-tracker.flow.yaml','--store','file','--store-dir',process.env.STORE_DIR,'--initial-data',input],{stdio:'inherit',windowsHide:true});process.exit(r.status??1);"
|
|
28
|
-
exit /b %ERRORLEVEL%
|
package/step-machine-cli.js
DELETED
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import * as fs from 'node:fs';
|
|
4
|
-
import * as path from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import { spawnSync } from 'node:child_process';
|
|
7
|
-
|
|
8
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
const srcCli = path.join(__dirname, 'src', 'cli', 'node', 'step-machine-cli.ts');
|
|
10
|
-
const tsxCli = path.join(__dirname, 'node_modules', 'tsx', 'dist', 'cli.mjs');
|
|
11
|
-
|
|
12
|
-
if (fs.existsSync(srcCli)) {
|
|
13
|
-
const result = spawnSync(process.execPath, [tsxCli, srcCli, ...process.argv.slice(2)], {
|
|
14
|
-
stdio: 'inherit',
|
|
15
|
-
shell: false,
|
|
16
|
-
windowsHide: true,
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
if (result.error) {
|
|
20
|
-
console.error(`[step-machine-cli] Failed to launch dev fallback: ${result.error.message}`);
|
|
21
|
-
process.exit(1);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
process.exit(result.status ?? 0);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const { loadStepFlow, createStepMachine, MemoryStore, FileStore } = await import('./dist/index.js');
|
|
28
|
-
const { buildStepHandlersForFlow } = await import('./dist/step-machine-public/index.js');
|
|
29
|
-
const { invokeRefSync } = await import('./dist/cli/node/execution-adapter.js');
|
|
30
|
-
const PAUSE_FILE_NAME = '.pause';
|
|
31
|
-
|
|
32
|
-
async function main() {
|
|
33
|
-
const args = process.argv.slice(2);
|
|
34
|
-
const parsed = parseCliArgs(args);
|
|
35
|
-
|
|
36
|
-
if (parsed.help || args.length === 0) {
|
|
37
|
-
printUsage();
|
|
38
|
-
process.exit(args.length === 0 ? 1 : 0);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const {
|
|
42
|
-
flowArg,
|
|
43
|
-
dataArg,
|
|
44
|
-
storeArg,
|
|
45
|
-
storeDirArg,
|
|
46
|
-
resumeRequested,
|
|
47
|
-
pauseRequested,
|
|
48
|
-
statusRequested,
|
|
49
|
-
} = parsed;
|
|
50
|
-
|
|
51
|
-
if ((pauseRequested || statusRequested) && (dataArg || resumeRequested || flowArg)) {
|
|
52
|
-
throw new Error('[step-machine-cli] --pause and --status are store-level operations. Do not provide flow, data, or --resume.');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (resumeRequested && dataArg) {
|
|
56
|
-
throw new Error('[step-machine-cli] --initial-data cannot be combined with --resume.');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const storeContext = createStoreContext(storeArg, storeDirArg);
|
|
60
|
-
|
|
61
|
-
if (statusRequested) {
|
|
62
|
-
await printStoreStatus(storeContext);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (pauseRequested) {
|
|
67
|
-
await requestPause(storeContext);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (!flowArg) {
|
|
72
|
-
throw new Error('[step-machine-cli] Flow path is required for run/resume operations.');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const flowPath = resolveInputPath(flowArg);
|
|
76
|
-
const flowDir = path.dirname(flowPath);
|
|
77
|
-
const initialData = parseInitialData(dataArg);
|
|
78
|
-
const { store } = storeContext;
|
|
79
|
-
|
|
80
|
-
const flow = await loadStepFlow(flowPath);
|
|
81
|
-
const handlers = buildStepHandlers(flow, flowDir);
|
|
82
|
-
|
|
83
|
-
// Resume/start should ignore stale pause markers from previous runs.
|
|
84
|
-
clearPauseRequest(storeContext);
|
|
85
|
-
|
|
86
|
-
const abortController = new AbortController();
|
|
87
|
-
let pauseSignalSeen = false;
|
|
88
|
-
|
|
89
|
-
const machine = createStepMachine(flow, handlers, {
|
|
90
|
-
store,
|
|
91
|
-
signal: abortController.signal,
|
|
92
|
-
onStep: () => {
|
|
93
|
-
if (!pauseSignalSeen && hasPauseRequest(storeContext)) {
|
|
94
|
-
pauseSignalSeen = true;
|
|
95
|
-
abortController.abort();
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
let runIdToResume;
|
|
101
|
-
if (resumeRequested) {
|
|
102
|
-
runIdToResume = await resolveRunIdToResume(storeContext);
|
|
103
|
-
if (!runIdToResume) {
|
|
104
|
-
console.warn('[step-machine-cli] No paused run found in store directory.');
|
|
105
|
-
console.log(JSON.stringify({ status: 'noop', reason: 'no-paused-run' }, null, 2));
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
} else if (storeContext.storeType === 'file' && !initialData) {
|
|
109
|
-
runIdToResume = await resolveRunIdToResume(storeContext);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const result = runIdToResume
|
|
113
|
-
? await machine.resume(runIdToResume)
|
|
114
|
-
: await machine.run(initialData);
|
|
115
|
-
|
|
116
|
-
if (pauseSignalSeen && result.status === 'cancelled') {
|
|
117
|
-
const pausedState = await markRunPaused(store, result.runId);
|
|
118
|
-
clearPauseRequest(storeContext);
|
|
119
|
-
console.log(JSON.stringify({
|
|
120
|
-
runId: result.runId,
|
|
121
|
-
status: 'paused',
|
|
122
|
-
currentStep: pausedState?.currentStep,
|
|
123
|
-
pausedAt: pausedState?.pausedAt,
|
|
124
|
-
stepHistory: result.stepHistory,
|
|
125
|
-
data: result.data,
|
|
126
|
-
}, null, 2));
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (result.status !== 'completed') {
|
|
131
|
-
const reason = result.error?.message ?? result.intent ?? result.status;
|
|
132
|
-
console.error(`[step-machine-cli] Run failed: ${reason}`);
|
|
133
|
-
process.exit(1);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
console.log(JSON.stringify({
|
|
137
|
-
runId: result.runId,
|
|
138
|
-
status: result.status,
|
|
139
|
-
intent: result.intent,
|
|
140
|
-
finalStep: result.finalStep,
|
|
141
|
-
stepHistory: result.stepHistory,
|
|
142
|
-
data: result.data,
|
|
143
|
-
}, null, 2));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function parseCliArgs(args) {
|
|
147
|
-
const valueFlags = new Set(['--initial-data', '--store', '--store-dir']);
|
|
148
|
-
const values = {};
|
|
149
|
-
const positionals = [];
|
|
150
|
-
let help = false;
|
|
151
|
-
let resumeRequested = false;
|
|
152
|
-
let pauseRequested = false;
|
|
153
|
-
let statusRequested = false;
|
|
154
|
-
|
|
155
|
-
for (let i = 0; i < args.length; i++) {
|
|
156
|
-
const arg = args[i];
|
|
157
|
-
if (arg === '-h' || arg === '--help') {
|
|
158
|
-
help = true;
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
if (arg === '--resume') {
|
|
163
|
-
resumeRequested = true;
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (arg === '--pause') {
|
|
168
|
-
pauseRequested = true;
|
|
169
|
-
continue;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (arg === '--status') {
|
|
173
|
-
statusRequested = true;
|
|
174
|
-
continue;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (valueFlags.has(arg)) {
|
|
178
|
-
const value = args[i + 1];
|
|
179
|
-
if (!value || value.startsWith('--')) {
|
|
180
|
-
throw new Error(`[step-machine-cli] Missing value for ${arg}.`);
|
|
181
|
-
}
|
|
182
|
-
values[arg] = value;
|
|
183
|
-
i++;
|
|
184
|
-
continue;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (arg.startsWith('--')) {
|
|
188
|
-
throw new Error(`[step-machine-cli] Unknown flag: ${arg}`);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
positionals.push(arg);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if ([resumeRequested, pauseRequested, statusRequested].filter(Boolean).length > 1) {
|
|
195
|
-
throw new Error('[step-machine-cli] Use only one of --resume, --pause, or --status at a time.');
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return {
|
|
199
|
-
help,
|
|
200
|
-
flowArg: positionals[0],
|
|
201
|
-
dataArg: values['--initial-data'],
|
|
202
|
-
storeArg: String(values['--store'] ?? 'memory').toLowerCase(),
|
|
203
|
-
storeDirArg: values['--store-dir'],
|
|
204
|
-
resumeRequested,
|
|
205
|
-
pauseRequested,
|
|
206
|
-
statusRequested,
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function resolveInputPath(inputPath) {
|
|
211
|
-
return path.isAbsolute(inputPath)
|
|
212
|
-
? inputPath
|
|
213
|
-
: path.resolve(process.cwd(), inputPath);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function createStoreContext(storeType, storeDirArg) {
|
|
217
|
-
if (storeType !== 'memory' && storeType !== 'file') {
|
|
218
|
-
throw new Error(`[step-machine-cli] Invalid --store value "${storeType}". Expected "memory" or "file".`);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (storeType === 'memory') {
|
|
222
|
-
return {
|
|
223
|
-
storeType,
|
|
224
|
-
storeDir: undefined,
|
|
225
|
-
pauseFilePath: undefined,
|
|
226
|
-
store: new MemoryStore(),
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
if (!storeDirArg || storeDirArg.trim().length === 0) {
|
|
231
|
-
throw new Error('[step-machine-cli] --store file requires --store-dir <directory>.');
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
const storeDir = resolveInputPath(storeDirArg);
|
|
235
|
-
return {
|
|
236
|
-
storeType,
|
|
237
|
-
storeDir,
|
|
238
|
-
pauseFilePath: path.join(storeDir, PAUSE_FILE_NAME),
|
|
239
|
-
store: new FileStore({ directory: storeDir }),
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
async function listRunStates(store) {
|
|
244
|
-
if (!store.listRuns) {
|
|
245
|
-
return [];
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
const runIds = await store.listRuns();
|
|
249
|
-
const states = [];
|
|
250
|
-
for (const runId of runIds) {
|
|
251
|
-
const state = await store.loadRunState(runId);
|
|
252
|
-
if (state) {
|
|
253
|
-
states.push(state);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
states.sort((a, b) => (b.updatedAt ?? b.startedAt ?? 0) - (a.updatedAt ?? a.startedAt ?? 0));
|
|
258
|
-
return states;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
function hasPauseRequest(storeContext) {
|
|
262
|
-
if (storeContext.storeType !== 'file' || !storeContext.pauseFilePath) {
|
|
263
|
-
return false;
|
|
264
|
-
}
|
|
265
|
-
return fs.existsSync(storeContext.pauseFilePath);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
function clearPauseRequest(storeContext) {
|
|
269
|
-
if (!hasPauseRequest(storeContext)) {
|
|
270
|
-
return;
|
|
271
|
-
}
|
|
272
|
-
fs.unlinkSync(storeContext.pauseFilePath);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
async function requestPause(storeContext) {
|
|
276
|
-
if (storeContext.storeType !== 'file' || !storeContext.pauseFilePath) {
|
|
277
|
-
throw new Error('[step-machine-cli] --pause requires --store file --store-dir <directory>.');
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
const states = await listRunStates(storeContext.store);
|
|
281
|
-
if (states.length === 0) {
|
|
282
|
-
console.warn('[step-machine-cli] No runs found in store directory. Pause is a no-op.');
|
|
283
|
-
console.log(JSON.stringify({ status: 'noop', reason: 'no-runs' }, null, 2));
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
const running = states.find((s) => s.status === 'running');
|
|
288
|
-
if (!running) {
|
|
289
|
-
console.warn('[step-machine-cli] No running run found. Pause is a no-op.');
|
|
290
|
-
console.log(JSON.stringify({ status: 'noop', reason: 'no-running-run' }, null, 2));
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
fs.mkdirSync(storeContext.storeDir, { recursive: true });
|
|
295
|
-
fs.writeFileSync(storeContext.pauseFilePath, JSON.stringify({ requestedAt: Date.now() }), 'utf-8');
|
|
296
|
-
console.log(JSON.stringify({ status: 'pause-requested', storeDir: storeContext.storeDir }, null, 2));
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
async function resolveRunIdToResume(storeContext) {
|
|
300
|
-
const states = await listRunStates(storeContext.store);
|
|
301
|
-
const pausedStates = states.filter((s) => s.status === 'paused');
|
|
302
|
-
if (pausedStates.length === 0) {
|
|
303
|
-
return undefined;
|
|
304
|
-
}
|
|
305
|
-
if (pausedStates.length > 1) {
|
|
306
|
-
console.warn('[step-machine-cli] Multiple paused runs found; resuming the most recently updated run.');
|
|
307
|
-
}
|
|
308
|
-
return pausedStates[0].runId;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
async function markRunPaused(store, runId) {
|
|
312
|
-
const state = await store.loadRunState(runId);
|
|
313
|
-
if (!state) {
|
|
314
|
-
return null;
|
|
315
|
-
}
|
|
316
|
-
const pausedState = {
|
|
317
|
-
...state,
|
|
318
|
-
status: 'paused',
|
|
319
|
-
pausedAt: Date.now(),
|
|
320
|
-
updatedAt: Date.now(),
|
|
321
|
-
};
|
|
322
|
-
await store.saveRunState(runId, pausedState);
|
|
323
|
-
return pausedState;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
async function printStoreStatus(storeContext) {
|
|
327
|
-
if (storeContext.storeType !== 'file') {
|
|
328
|
-
throw new Error('[step-machine-cli] --status requires --store file --store-dir <directory>.');
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
const states = await listRunStates(storeContext.store);
|
|
332
|
-
const summary = {
|
|
333
|
-
store: 'file',
|
|
334
|
-
storeDir: storeContext.storeDir,
|
|
335
|
-
pauseRequested: hasPauseRequest(storeContext),
|
|
336
|
-
totalRuns: states.length,
|
|
337
|
-
runs: states.map((s) => ({
|
|
338
|
-
runId: s.runId,
|
|
339
|
-
status: s.status,
|
|
340
|
-
currentStep: s.currentStep,
|
|
341
|
-
startedAt: s.startedAt,
|
|
342
|
-
updatedAt: s.updatedAt,
|
|
343
|
-
pausedAt: s.pausedAt,
|
|
344
|
-
})),
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
console.log(JSON.stringify(summary, null, 2));
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
function parseInitialData(dataArg) {
|
|
351
|
-
if (!dataArg) {
|
|
352
|
-
return undefined;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
try {
|
|
356
|
-
const parsed = JSON.parse(dataArg);
|
|
357
|
-
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
358
|
-
throw new Error('Initial data must be a JSON object.');
|
|
359
|
-
}
|
|
360
|
-
return parsed;
|
|
361
|
-
} catch (error) {
|
|
362
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
363
|
-
throw new Error(`[step-machine-cli] Invalid --initial-data value: ${msg}`);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
function normalizeExecutionRef(ref) {
|
|
368
|
-
if (!ref || typeof ref !== 'object') return ref;
|
|
369
|
-
if (typeof ref.whatToRun !== 'string' || !ref.whatToRun.startsWith('b64:')) return ref;
|
|
370
|
-
|
|
371
|
-
try {
|
|
372
|
-
const payload = ref.whatToRun.slice(4);
|
|
373
|
-
const padded = payload + '='.repeat((4 - (payload.length % 4)) % 4);
|
|
374
|
-
const json = Buffer.from(padded.replace(/-/g, '+').replace(/_/g, '/'), 'base64').toString('utf8');
|
|
375
|
-
const decoded = JSON.parse(json);
|
|
376
|
-
if (!decoded || typeof decoded !== 'object' || typeof decoded.value !== 'string') {
|
|
377
|
-
return ref;
|
|
378
|
-
}
|
|
379
|
-
return { ...ref, whatToRun: decoded.value };
|
|
380
|
-
} catch {
|
|
381
|
-
return ref;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
function buildStepHandlers(flow, flowDir) {
|
|
386
|
-
const invoke = (ref, args) => invokeRefSync(normalizeExecutionRef(ref), args, { cliDir: flowDir, cwd: flowDir });
|
|
387
|
-
return buildStepHandlersForFlow(flow, { invoke });
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
function printUsage() {
|
|
391
|
-
console.error('Usage: step-machine-cli <step-flow.yaml> [--initial-data <json>] [--store <memory|file>] [--store-dir <directory>] [--resume]');
|
|
392
|
-
console.error(' step-machine-cli --store file --store-dir <directory> --pause');
|
|
393
|
-
console.error(' step-machine-cli --store file --store-dir <directory> --status');
|
|
394
|
-
console.error('');
|
|
395
|
-
console.error('Example:');
|
|
396
|
-
console.error(' step-machine-cli examples/cli/step-machine-demo/two-step-math.flow.yaml --initial-data "{\"a\":3,\"b\":4}"');
|
|
397
|
-
console.error(' step-machine-cli ./flow.yaml --store file --store-dir ./.runs');
|
|
398
|
-
console.error(' step-machine-cli ./flow.yaml --store file --store-dir ./.runs --resume');
|
|
399
|
-
console.error(' step-machine-cli --store file --store-dir ./.runs --pause');
|
|
400
|
-
console.error(' step-machine-cli --store file --store-dir ./.runs --status');
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
main().catch((error) => {
|
|
404
|
-
const msg = error instanceof Error ? error.stack ?? error.message : String(error);
|
|
405
|
-
console.error(msg);
|
|
406
|
-
process.exit(1);
|
|
407
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/examples/{browser/boards/portfolio-tracker → board/test}/portfolio-tracker-sse-worker.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|