yaml-flow 7.1.0 → 8.0.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.
- package/browser/asset-integrity.json +8 -4
- package/browser/board-livecards-client.js +1 -1
- package/browser/board-livecards-localstorage.js +4 -4
- package/browser/live-cards.js +19 -3309
- 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/{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-ftO1W7Po.d.ts +286 -0
- package/{dist/cli → cli}/node/artifacts-store-cli.js +2 -2
- package/cli/node/batch-runner-cli.js +3 -0
- package/cli/node/board-live-cards-cli.js +15 -0
- package/{dist/cli → cli}/node/card-store-cli.js +1 -1
- package/{dist/cli → cli}/node/execution-adapter.d.ts +49 -4
- 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/cli/node/step-machine-cli.d.ts +7 -0
- package/cli/node/step-machine-cli.js +5 -0
- package/{dist/board-live-cards-public-5n1-syA3.d.cts → cli/types-C2YQXFwo.d.ts} +68 -5
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/gandalf-runtime/.config/card-store-ref.json +1 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/gandalf-runtime/.config/chat-handler.json +1 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/gandalf-runtime/.config/outputs-store-ref.json +1 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/gandalf-runtime/.config/task-executor.json +1 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/gandalf-runtime/.state-snapshot/board/graph.json +29 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/gandalf-runtime/.state-snapshot/board/lastJournalProcessedId.json +1 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/gandalf-runtime-out/.outputs/status.json +25 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/runtime-out/.outputs/cards/card-market-prices/computed_values.json +67 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/runtime-out/.outputs/cards/card-portfolio/computed_values.json +1 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/runtime-out/.outputs/cards/card-portfolio-value/computed_values.json +52 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/runtime-out/.outputs/data-objects/holdings.json +22 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/runtime-out/.outputs/data-objects/positions.json +46 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/runtime-out/.outputs/data-objects/quotes.json +35 -0
- package/examples/board/.demo-setup/run-1778665078572-3466-a8ay4k/board-default/runtime-out/.outputs/status.json +113 -0
- package/examples/{example-board → board}/demo-server-config.json +0 -1
- package/examples/{example-board → board}/demo-server.js +23 -48
- package/examples/{example-board → board}/demo-shell-with-server.html +3 -3
- package/examples/{example-board → board}/demo-task-executor.js +71 -24
- 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/lib/board-live-cards-node.d.cts +178 -0
- package/lib/board-live-cards-node.d.ts +178 -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-CK_J8uv0.d.ts → lib/board-live-cards-public-CsmYrvpd.d.ts} +142 -76
- 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/{dist/storage-refs.cjs → lib/board-worker-adapter.cjs} +2 -2
- package/{dist/storage-refs.d.cts → lib/board-worker-adapter.d.cts} +4 -3
- package/{dist/storage-refs.d.ts → lib/board-worker-adapter.d.ts} +4 -3
- package/{dist/storage-refs.js → lib/board-worker-adapter.js} +2 -2
- 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 +33 -12
- package/{dist → lib}/execution-refs.d.ts +33 -12
- 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 +14 -1
- package/{dist → lib}/step-machine-public/index.d.ts +14 -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-HGDTWIun.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-CU3DjTKL.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.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.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.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.d.cts +0 -174
- 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 -3
- package/dist/step-machine-public/index.cjs.map +0 -1
- package/dist/step-machine-public/index.js +0 -3
- package/dist/step-machine-public/index.js.map +0 -1
- package/dist/storage-refs.cjs.map +0 -1
- 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 -370
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-http-test.py +0 -398
- 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/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/cli → cli}/browser-api/board-live-cards-browser-adapter.js +0 -0
- /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/{dist/cli → cli}/node/source-cli-task-executor.js +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 → board}/cards/cardT-market-prices.json +0 -0
- /package/examples/{example-board → board}/cards/cardT-portfolio-value.json +0 -0
- /package/examples/{example-board → board}/cards/cardT-portfolio.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,367 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>Step Machine Browser Example — yaml-flow</title>
|
|
7
|
-
<style>
|
|
8
|
-
* { box-sizing: border-box; }
|
|
9
|
-
body {
|
|
10
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
11
|
-
max-width: 800px;
|
|
12
|
-
margin: 40px auto;
|
|
13
|
-
padding: 20px;
|
|
14
|
-
background: #f5f5f5;
|
|
15
|
-
}
|
|
16
|
-
h1 { color: #333; }
|
|
17
|
-
.card {
|
|
18
|
-
background: white;
|
|
19
|
-
border-radius: 8px;
|
|
20
|
-
padding: 20px;
|
|
21
|
-
margin: 20px 0;
|
|
22
|
-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
23
|
-
}
|
|
24
|
-
.step-list {
|
|
25
|
-
display: flex;
|
|
26
|
-
gap: 10px;
|
|
27
|
-
flex-wrap: wrap;
|
|
28
|
-
margin: 10px 0;
|
|
29
|
-
}
|
|
30
|
-
.step {
|
|
31
|
-
padding: 8px 16px;
|
|
32
|
-
border-radius: 20px;
|
|
33
|
-
background: #e0e0e0;
|
|
34
|
-
font-size: 14px;
|
|
35
|
-
}
|
|
36
|
-
.step.active {
|
|
37
|
-
background: #2196F3;
|
|
38
|
-
color: white;
|
|
39
|
-
}
|
|
40
|
-
.step.completed {
|
|
41
|
-
background: #4CAF50;
|
|
42
|
-
color: white;
|
|
43
|
-
}
|
|
44
|
-
button {
|
|
45
|
-
background: #2196F3;
|
|
46
|
-
color: white;
|
|
47
|
-
border: none;
|
|
48
|
-
padding: 12px 24px;
|
|
49
|
-
border-radius: 6px;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
font-size: 16px;
|
|
52
|
-
margin: 5px;
|
|
53
|
-
}
|
|
54
|
-
button:hover { background: #1976D2; }
|
|
55
|
-
button:disabled { background: #ccc; cursor: not-allowed; }
|
|
56
|
-
.log {
|
|
57
|
-
background: #263238;
|
|
58
|
-
color: #aed581;
|
|
59
|
-
padding: 15px;
|
|
60
|
-
border-radius: 6px;
|
|
61
|
-
font-family: 'Consolas', monospace;
|
|
62
|
-
font-size: 13px;
|
|
63
|
-
max-height: 300px;
|
|
64
|
-
overflow-y: auto;
|
|
65
|
-
}
|
|
66
|
-
.log-entry { margin: 5px 0; }
|
|
67
|
-
.log-entry.error { color: #ef5350; }
|
|
68
|
-
.log-entry.transition { color: #64B5F6; }
|
|
69
|
-
.result {
|
|
70
|
-
padding: 15px;
|
|
71
|
-
border-radius: 6px;
|
|
72
|
-
margin-top: 15px;
|
|
73
|
-
}
|
|
74
|
-
.result.success { background: #C8E6C9; }
|
|
75
|
-
.result.error { background: #FFCDD2; }
|
|
76
|
-
input {
|
|
77
|
-
padding: 10px;
|
|
78
|
-
border: 1px solid #ddd;
|
|
79
|
-
border-radius: 4px;
|
|
80
|
-
font-size: 16px;
|
|
81
|
-
width: 200px;
|
|
82
|
-
}
|
|
83
|
-
</style>
|
|
84
|
-
</head>
|
|
85
|
-
<body>
|
|
86
|
-
<h1>yaml-flow Step Machine Browser Example</h1>
|
|
87
|
-
|
|
88
|
-
<div class="card">
|
|
89
|
-
<h2>Simple Greeting Flow</h2>
|
|
90
|
-
<p>Enter your name and run the flow to see it in action.</p>
|
|
91
|
-
|
|
92
|
-
<div style="margin: 15px 0;">
|
|
93
|
-
<input type="text" id="nameInput" placeholder="Enter your name" value="Developer">
|
|
94
|
-
<button onclick="runFlow()">Run Flow</button>
|
|
95
|
-
<button onclick="clearLog()">Clear Log</button>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<h3>Steps</h3>
|
|
99
|
-
<div class="step-list" id="stepList">
|
|
100
|
-
<div class="step" data-step="greet">greet</div>
|
|
101
|
-
<div class="step" data-step="validate">validate</div>
|
|
102
|
-
<div class="step" data-step="personalize">personalize</div>
|
|
103
|
-
<div class="step" data-step="success_state">✓ success</div>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<div class="card">
|
|
108
|
-
<h3>Execution Log</h3>
|
|
109
|
-
<div class="log" id="log"></div>
|
|
110
|
-
|
|
111
|
-
<div id="result"></div>
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
<script type="module">
|
|
115
|
-
// Import from CDN (in production) or local build
|
|
116
|
-
// For this demo, we'll inline a simplified version
|
|
117
|
-
|
|
118
|
-
// ============= Inline yaml-flow (simplified for demo) =============
|
|
119
|
-
|
|
120
|
-
class MemoryStore {
|
|
121
|
-
constructor() {
|
|
122
|
-
this.runs = new Map();
|
|
123
|
-
this.data = new Map();
|
|
124
|
-
}
|
|
125
|
-
async saveRunState(runId, state) { this.runs.set(runId, {...state}); }
|
|
126
|
-
async loadRunState(runId) { return this.runs.get(runId) || null; }
|
|
127
|
-
async deleteRunState(runId) { this.runs.delete(runId); this.data.delete(runId); }
|
|
128
|
-
async setData(runId, key, value) {
|
|
129
|
-
if (!this.data.has(runId)) this.data.set(runId, {});
|
|
130
|
-
this.data.get(runId)[key] = value;
|
|
131
|
-
}
|
|
132
|
-
async getData(runId, key) { return this.data.get(runId)?.[key]; }
|
|
133
|
-
async getAllData(runId) { return {...(this.data.get(runId) || {})}; }
|
|
134
|
-
async clearData(runId) { this.data.delete(runId); }
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
class FlowEngine {
|
|
138
|
-
constructor(flow, handlers, options = {}) {
|
|
139
|
-
this.flow = flow;
|
|
140
|
-
this.handlers = handlers;
|
|
141
|
-
this.store = options.store || new MemoryStore();
|
|
142
|
-
this.components = options.components || {};
|
|
143
|
-
this.options = options;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
async run(initialData = {}) {
|
|
147
|
-
const runId = crypto.randomUUID();
|
|
148
|
-
const startedAt = Date.now();
|
|
149
|
-
|
|
150
|
-
const runState = {
|
|
151
|
-
runId,
|
|
152
|
-
currentStep: this.flow.settings.start_step,
|
|
153
|
-
status: 'running',
|
|
154
|
-
stepHistory: [],
|
|
155
|
-
iterationCounts: {},
|
|
156
|
-
retryCounts: {},
|
|
157
|
-
startedAt,
|
|
158
|
-
updatedAt: startedAt,
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
await this.store.saveRunState(runId, runState);
|
|
162
|
-
for (const [key, value] of Object.entries(initialData)) {
|
|
163
|
-
await this.store.setData(runId, key, value);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
let iterations = 0;
|
|
167
|
-
const maxSteps = this.flow.settings.max_total_steps || 100;
|
|
168
|
-
|
|
169
|
-
while (iterations < maxSteps) {
|
|
170
|
-
const currentStep = runState.currentStep;
|
|
171
|
-
|
|
172
|
-
// Check terminal state
|
|
173
|
-
const terminalState = this.flow.terminal_states[currentStep];
|
|
174
|
-
if (terminalState) {
|
|
175
|
-
const allData = await this.store.getAllData(runId);
|
|
176
|
-
return {
|
|
177
|
-
runId,
|
|
178
|
-
status: 'completed',
|
|
179
|
-
intent: terminalState.return_intent,
|
|
180
|
-
data: this.extractReturnData(terminalState.return_artifacts, allData),
|
|
181
|
-
finalStep: currentStep,
|
|
182
|
-
stepHistory: runState.stepHistory,
|
|
183
|
-
durationMs: Date.now() - startedAt,
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const stepConfig = this.flow.steps[currentStep];
|
|
188
|
-
const handler = this.handlers[currentStep];
|
|
189
|
-
|
|
190
|
-
// Build input
|
|
191
|
-
const allData = await this.store.getAllData(runId);
|
|
192
|
-
const input = stepConfig.expects_data
|
|
193
|
-
? Object.fromEntries(stepConfig.expects_data.map(k => [k, allData[k]]))
|
|
194
|
-
: allData;
|
|
195
|
-
|
|
196
|
-
// Execute
|
|
197
|
-
this.options.onStep?.(currentStep, 'start');
|
|
198
|
-
const result = await handler(input, { runId, stepName: currentStep, components: this.components, store: this.store });
|
|
199
|
-
this.options.onStep?.(currentStep, result.result);
|
|
200
|
-
|
|
201
|
-
// Store output
|
|
202
|
-
if (result.data) {
|
|
203
|
-
for (const [key, value] of Object.entries(result.data)) {
|
|
204
|
-
await this.store.setData(runId, key, value);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// Transition
|
|
209
|
-
const nextStep = stepConfig.transitions[result.result];
|
|
210
|
-
this.options.onTransition?.(currentStep, nextStep);
|
|
211
|
-
|
|
212
|
-
runState.stepHistory.push(currentStep);
|
|
213
|
-
runState.currentStep = nextStep;
|
|
214
|
-
iterations++;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
return { runId, status: 'max_iterations', data: {}, stepHistory: runState.stepHistory };
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
extractReturnData(artifacts, allData) {
|
|
221
|
-
if (!artifacts || artifacts === false) return {};
|
|
222
|
-
if (typeof artifacts === 'string') return { [artifacts]: allData[artifacts] };
|
|
223
|
-
if (Array.isArray(artifacts)) return Object.fromEntries(artifacts.map(k => [k, allData[k]]));
|
|
224
|
-
return allData;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// ============= Flow Definition =============
|
|
229
|
-
|
|
230
|
-
const flow = {
|
|
231
|
-
settings: {
|
|
232
|
-
start_step: 'greet',
|
|
233
|
-
max_total_steps: 10
|
|
234
|
-
},
|
|
235
|
-
steps: {
|
|
236
|
-
greet: {
|
|
237
|
-
produces_data: ['greeting', 'user_name'],
|
|
238
|
-
transitions: { success: 'validate', failure: 'error_state' }
|
|
239
|
-
},
|
|
240
|
-
validate: {
|
|
241
|
-
expects_data: ['greeting', 'user_name'],
|
|
242
|
-
produces_data: ['is_valid'],
|
|
243
|
-
transitions: { success: 'personalize', invalid: 'error_state', failure: 'error_state' }
|
|
244
|
-
},
|
|
245
|
-
personalize: {
|
|
246
|
-
expects_data: ['greeting', 'user_name'],
|
|
247
|
-
produces_data: ['final_message'],
|
|
248
|
-
transitions: { success: 'success_state', failure: 'error_state' }
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
terminal_states: {
|
|
252
|
-
success_state: { return_intent: 'success', return_artifacts: ['final_message', 'user_name'] },
|
|
253
|
-
error_state: { return_intent: 'error', return_artifacts: false }
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
// ============= Step Handlers =============
|
|
258
|
-
|
|
259
|
-
const handlers = {
|
|
260
|
-
async greet(input) {
|
|
261
|
-
const userName = input.initial_name || 'World';
|
|
262
|
-
await sleep(300); // Simulate async work
|
|
263
|
-
return {
|
|
264
|
-
result: 'success',
|
|
265
|
-
data: { greeting: 'Hello', user_name: userName }
|
|
266
|
-
};
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
async validate(input) {
|
|
270
|
-
const { greeting, user_name } = input;
|
|
271
|
-
await sleep(200);
|
|
272
|
-
const isValid = greeting && user_name;
|
|
273
|
-
return {
|
|
274
|
-
result: isValid ? 'success' : 'invalid',
|
|
275
|
-
data: { is_valid: isValid }
|
|
276
|
-
};
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
async personalize(input) {
|
|
280
|
-
const { greeting, user_name } = input;
|
|
281
|
-
await sleep(200);
|
|
282
|
-
return {
|
|
283
|
-
result: 'success',
|
|
284
|
-
data: { final_message: `${greeting}, ${user_name}! Welcome to yaml-flow in the browser! 🎉` }
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
function sleep(ms) {
|
|
290
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// ============= UI Functions =============
|
|
294
|
-
|
|
295
|
-
const logEl = document.getElementById('log');
|
|
296
|
-
const resultEl = document.getElementById('result');
|
|
297
|
-
const stepEls = document.querySelectorAll('.step');
|
|
298
|
-
|
|
299
|
-
function log(message, type = '') {
|
|
300
|
-
const entry = document.createElement('div');
|
|
301
|
-
entry.className = `log-entry ${type}`;
|
|
302
|
-
entry.textContent = `[${new Date().toLocaleTimeString()}] ${message}`;
|
|
303
|
-
logEl.appendChild(entry);
|
|
304
|
-
logEl.scrollTop = logEl.scrollHeight;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
function updateStep(stepName, status) {
|
|
308
|
-
stepEls.forEach(el => {
|
|
309
|
-
if (el.dataset.step === stepName) {
|
|
310
|
-
el.classList.remove('active', 'completed');
|
|
311
|
-
el.classList.add(status);
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
function resetSteps() {
|
|
317
|
-
stepEls.forEach(el => el.classList.remove('active', 'completed'));
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
window.clearLog = function() {
|
|
321
|
-
logEl.innerHTML = '';
|
|
322
|
-
resultEl.innerHTML = '';
|
|
323
|
-
resetSteps();
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
window.runFlow = async function() {
|
|
327
|
-
resetSteps();
|
|
328
|
-
resultEl.innerHTML = '';
|
|
329
|
-
|
|
330
|
-
const name = document.getElementById('nameInput').value || 'World';
|
|
331
|
-
log(`Starting flow with name: "${name}"`);
|
|
332
|
-
|
|
333
|
-
const engine = new FlowEngine(flow, handlers, {
|
|
334
|
-
store: new MemoryStore(),
|
|
335
|
-
onStep: (step, status) => {
|
|
336
|
-
log(`Step [${step}]: ${status}`);
|
|
337
|
-
updateStep(step, status === 'start' ? 'active' : 'completed');
|
|
338
|
-
},
|
|
339
|
-
onTransition: (from, to) => {
|
|
340
|
-
log(`Transition: ${from} → ${to}`, 'transition');
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
try {
|
|
345
|
-
const result = await engine.run({ initial_name: name });
|
|
346
|
-
|
|
347
|
-
log(`Flow completed: ${result.intent}`);
|
|
348
|
-
updateStep(result.finalStep, 'completed');
|
|
349
|
-
|
|
350
|
-
resultEl.innerHTML = `
|
|
351
|
-
<div class="result ${result.intent === 'success' ? 'success' : 'error'}">
|
|
352
|
-
<strong>Result:</strong> ${result.intent}<br>
|
|
353
|
-
<strong>Message:</strong> ${result.data.final_message || 'N/A'}<br>
|
|
354
|
-
<strong>Duration:</strong> ${result.durationMs}ms<br>
|
|
355
|
-
<strong>Steps:</strong> ${result.stepHistory.join(' → ')} → ${result.finalStep}
|
|
356
|
-
</div>
|
|
357
|
-
`;
|
|
358
|
-
} catch (error) {
|
|
359
|
-
log(`Error: ${error.message}`, 'error');
|
|
360
|
-
resultEl.innerHTML = `<div class="result error">Error: ${error.message}</div>`;
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
|
|
364
|
-
log('yaml-flow browser demo loaded. Click "Run Flow" to start.');
|
|
365
|
-
</script>
|
|
366
|
-
</body>
|
|
367
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--base-ref\runtime-out
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"graph": {
|
|
3
|
-
"version": 1,
|
|
4
|
-
"config": {
|
|
5
|
-
"settings": {
|
|
6
|
-
"completion": "manual",
|
|
7
|
-
"refreshStrategy": "data-changed"
|
|
8
|
-
},
|
|
9
|
-
"tasks": {}
|
|
10
|
-
},
|
|
11
|
-
"state": {
|
|
12
|
-
"status": "running",
|
|
13
|
-
"tasks": {},
|
|
14
|
-
"availableOutputs": [],
|
|
15
|
-
"stuckDetection": {
|
|
16
|
-
"is_stuck": false,
|
|
17
|
-
"stuck_description": null,
|
|
18
|
-
"outputs_unresolvable": [],
|
|
19
|
-
"tasks_blocked": []
|
|
20
|
-
},
|
|
21
|
-
"lastUpdated": "2026-05-02T15:18:33.305Z",
|
|
22
|
-
"executionId": "live-1777735113305",
|
|
23
|
-
"executionConfig": {
|
|
24
|
-
"executionMode": "eligibility-mode",
|
|
25
|
-
"conflictStrategy": "alphabetical",
|
|
26
|
-
"completionStrategy": "manual"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"snapshotAt": "2026-05-02T15:18:33.305Z"
|
|
30
|
-
},
|
|
31
|
-
"lastDrainedJournalId": ""
|
|
32
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "holdings-table",
|
|
3
|
-
"meta": { "title": "Holdings Table" },
|
|
4
|
-
"requires": ["holdings", "prices"],
|
|
5
|
-
"provides": [{ "bindTo": "table", "ref": "computed_values.table" }],
|
|
6
|
-
"card_data": {},
|
|
7
|
-
"compute": [
|
|
8
|
-
{
|
|
9
|
-
"bindTo": "table",
|
|
10
|
-
"expr": "{ \"rows\": $map(requires.holdings, function($h) { { \"symbol\": $h.symbol, \"qty\": $h.qty, \"price\": $lookup(requires.prices, $h.symbol), \"value\": $h.qty * $lookup(requires.prices, $h.symbol) } }) }"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"view": {
|
|
14
|
-
"elements": [
|
|
15
|
-
{
|
|
16
|
-
"kind": "table",
|
|
17
|
-
"label": "Portfolio Positions",
|
|
18
|
-
"data": { "bind": "computed_values.table.rows", "columns": ["symbol", "qty", "price", "value"] }
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "portfolio-form",
|
|
3
|
-
"meta": {
|
|
4
|
-
"title": "Portfolio Holdings Form"
|
|
5
|
-
},
|
|
6
|
-
"provides": [
|
|
7
|
-
{
|
|
8
|
-
"bindTo": "holdings",
|
|
9
|
-
"ref": "card_data.holdings"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"card_data": {
|
|
13
|
-
"holdings": [
|
|
14
|
-
{
|
|
15
|
-
"symbol": "AAPL",
|
|
16
|
-
"qty": 50
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"symbol": "MSFT",
|
|
20
|
-
"qty": 30
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"symbol": "GOOG",
|
|
24
|
-
"qty": 100
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"view": {
|
|
29
|
-
"elements": [
|
|
30
|
-
{
|
|
31
|
-
"kind": "table",
|
|
32
|
-
"label": "Holdings",
|
|
33
|
-
"data": {
|
|
34
|
-
"bind": "card_data.holdings",
|
|
35
|
-
"columns": [
|
|
36
|
-
"symbol",
|
|
37
|
-
"qty"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "portfolio-value",
|
|
3
|
-
"meta": { "title": "Portfolio Total Value" },
|
|
4
|
-
"requires": ["table"],
|
|
5
|
-
"provides": [{ "bindTo": "totalValue", "ref": "computed_values.totalValue" }],
|
|
6
|
-
"card_data": {},
|
|
7
|
-
"compute": [
|
|
8
|
-
{ "bindTo": "totalValue", "expr": "$sum(requires.table.rows.value)" }
|
|
9
|
-
],
|
|
10
|
-
"view": {
|
|
11
|
-
"elements": [
|
|
12
|
-
{ "kind": "metric", "label": "Total Portfolio Value", "data": { "bind": "computed_values.totalValue" } }
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "price-fetch",
|
|
3
|
-
"meta": { "title": "Fetch Market Prices" },
|
|
4
|
-
"requires": ["holdings"],
|
|
5
|
-
"provides": [{ "bindTo": "prices", "ref": "fetched_sources.prices" }],
|
|
6
|
-
"card_data": {},
|
|
7
|
-
"source_defs": [
|
|
8
|
-
{ "cli": "node ../fetch-prices.js --tmp-file-name tmp_file1", "bindTo": "prices", "outputFile": "prices.json" }
|
|
9
|
-
],
|
|
10
|
-
"view": {
|
|
11
|
-
"elements": [
|
|
12
|
-
{ "kind": "table", "label": "Market Prices", "data": { "bind": "fetched_sources.prices" } }
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* fetch-prices.js
|
|
3
|
-
* Polls for tmp_file1 payload and outputs JSON to stdout once available.
|
|
4
|
-
*/
|
|
5
|
-
import * as fs from 'node:fs';
|
|
6
|
-
import * as path from 'node:path';
|
|
7
|
-
|
|
8
|
-
function getArgValue(flagName) {
|
|
9
|
-
const idx = process.argv.indexOf(flagName);
|
|
10
|
-
if (idx < 0) return undefined;
|
|
11
|
-
return process.argv[idx + 1];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const envBoardDir = (process.env.BOARD_DIR ?? '').trim();
|
|
15
|
-
const tmpFileName = String(getArgValue('--tmp-file-name') ?? process.env.TMP_FILE_NAME ?? 'tmp_file1').trim();
|
|
16
|
-
const tmpFilePath = envBoardDir ? path.join(envBoardDir, tmpFileName) : '';
|
|
17
|
-
|
|
18
|
-
if (!tmpFilePath) {
|
|
19
|
-
console.error('BOARD_DIR environment variable is required for fetch-prices.js');
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function getReadableTmpFile() {
|
|
24
|
-
if (!fs.existsSync(tmpFilePath)) return undefined;
|
|
25
|
-
const content = fs.readFileSync(tmpFilePath, 'utf-8').trim();
|
|
26
|
-
if (!content) return undefined;
|
|
27
|
-
return { tmpFile: tmpFilePath, content };
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function waitForFile(timeoutMs = 120000) {
|
|
31
|
-
const started = Date.now();
|
|
32
|
-
const interval = setInterval(() => {
|
|
33
|
-
if (Date.now() - started > timeoutMs) {
|
|
34
|
-
clearInterval(interval);
|
|
35
|
-
console.error('Timed out waiting for tmp_file1 market prices input.');
|
|
36
|
-
process.exit(1);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const ready = getReadableTmpFile();
|
|
40
|
-
if (!ready) return;
|
|
41
|
-
|
|
42
|
-
clearInterval(interval);
|
|
43
|
-
fs.writeFileSync(ready.tmpFile, '', 'utf-8');
|
|
44
|
-
process.stdout.write(`${ready.content}\n`);
|
|
45
|
-
}, 250);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
waitForFile();
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import * as path from 'node:path';
|
|
2
|
-
import { spawnSync } from 'node:child_process';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = path.dirname(__filename);
|
|
7
|
-
const repoRoot = path.resolve(__dirname, '..', '..', '..', '..', '..');
|
|
8
|
-
const boardCliPath = path.join(repoRoot, 'board-live-cards-cli.js');
|
|
9
|
-
const cardStoreCliPath = path.join(repoRoot, 'card-store.js');
|
|
10
|
-
|
|
11
|
-
export function toFsRef(value) {
|
|
12
|
-
const payload = Buffer.from(JSON.stringify({ kind: 'fs-path', value }), 'utf-8').toString('base64url');
|
|
13
|
-
return `b64:${payload}`;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function normalizeRefArg(v) {
|
|
17
|
-
if (typeof v !== 'string') return v;
|
|
18
|
-
return v;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function normalizeArgs(args) {
|
|
22
|
-
return args.map((v) => normalizeRefArg(v));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function runBoardCli(args, options = {}) {
|
|
26
|
-
const { capture = false, cwd = process.cwd() } = options;
|
|
27
|
-
const result = spawnSync(process.execPath, [boardCliPath, ...normalizeArgs(args)], {
|
|
28
|
-
cwd,
|
|
29
|
-
encoding: 'utf-8',
|
|
30
|
-
windowsHide: true,
|
|
31
|
-
stdio: capture ? 'pipe' : 'pipe',
|
|
32
|
-
env: {
|
|
33
|
-
...process.env,
|
|
34
|
-
BOARD_DIR: process.env.BOARD_DIR ?? '',
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
if (result.error) {
|
|
39
|
-
throw new Error(`Failed to launch board-live-cards-cli: ${result.error.message}`);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if ((result.status ?? 1) !== 0) {
|
|
43
|
-
const stderr = (result.stderr ?? '').trim();
|
|
44
|
-
const stdout = (result.stdout ?? '').trim();
|
|
45
|
-
throw new Error(`board-live-cards-cli failed (${result.status}): ${stderr || stdout || 'no output'}`);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return capture ? (result.stdout ?? '') : '';
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/** Spawn CLI with JSON piped to stdin. */
|
|
52
|
-
export function runBoardCliWithInput(args, inputJson, options = {}) {
|
|
53
|
-
const { cwd = process.cwd() } = options;
|
|
54
|
-
const result = spawnSync(process.execPath, [boardCliPath, ...normalizeArgs(args)], {
|
|
55
|
-
input: inputJson,
|
|
56
|
-
cwd,
|
|
57
|
-
encoding: 'utf-8',
|
|
58
|
-
windowsHide: true,
|
|
59
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
60
|
-
env: {
|
|
61
|
-
...process.env,
|
|
62
|
-
BOARD_DIR: process.env.BOARD_DIR ?? '',
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
if (result.error) {
|
|
67
|
-
throw new Error(`Failed to launch board-live-cards-cli: ${result.error.message}`);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if ((result.status ?? 1) !== 0) {
|
|
71
|
-
const stderr = (result.stderr ?? '').trim();
|
|
72
|
-
const stdout = (result.stdout ?? '').trim();
|
|
73
|
-
throw new Error(`board-live-cards-cli failed (${result.status}): ${stderr || stdout || 'no output'}`);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return result.stdout ?? '';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/** Spawn card-store-cli with JSON piped to stdin. */
|
|
80
|
-
export function runCardStoreCliWithInput(args, inputJson, options = {}) {
|
|
81
|
-
const { cwd = process.cwd() } = options;
|
|
82
|
-
const result = spawnSync(process.execPath, [cardStoreCliPath, ...normalizeArgs(args)], {
|
|
83
|
-
input: inputJson,
|
|
84
|
-
cwd,
|
|
85
|
-
encoding: 'utf-8',
|
|
86
|
-
windowsHide: true,
|
|
87
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
if (result.error) {
|
|
91
|
-
throw new Error(`Failed to launch card-store-cli: ${result.error.message}`);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if ((result.status ?? 1) !== 0) {
|
|
95
|
-
const stderr = (result.stderr ?? '').trim();
|
|
96
|
-
const stdout = (result.stdout ?? '').trim();
|
|
97
|
-
throw new Error(`card-store-cli failed (${result.status}): ${stderr || stdout || 'no output'}`);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return result.stdout ?? '';
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export async function readStdinJson() {
|
|
104
|
-
let raw = '';
|
|
105
|
-
process.stdin.setEncoding('utf-8');
|
|
106
|
-
|
|
107
|
-
for await (const chunk of process.stdin) {
|
|
108
|
-
raw += chunk;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (!raw.trim()) {
|
|
112
|
-
return {};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return JSON.parse(raw);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export function writeResult(payload) {
|
|
119
|
-
process.stdout.write(JSON.stringify(payload));
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function writeFailure(message) {
|
|
123
|
-
process.stderr.write(message);
|
|
124
|
-
process.exit(1);
|
|
125
|
-
}
|