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
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { K as KVStorage, B as BlobStorage, A as AtomicRelayLock, a as KindValueRef } from './storage-interface-BhAON-gW.cjs';
|
|
2
|
+
import { ExecutionRef } from './execution-refs.cjs';
|
|
3
|
+
import { f as GraphEvent, G as GraphConfig } from './types-BBhqYGhE.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* board-live-cards-lib — Pure logic library for the board-live-cards CLI.
|
|
7
|
+
*
|
|
8
|
+
* Merged from:
|
|
9
|
+
* board-live-cards-all-stores.ts
|
|
10
|
+
* board-live-cards-lib-types.ts
|
|
11
|
+
* board-live-cards-lib-board-status.ts
|
|
12
|
+
* board-live-cards-lib-card-handler.ts
|
|
13
|
+
* board-live-cards-cli-board-commands.ts
|
|
14
|
+
* board-live-cards-cli-card-commands.ts
|
|
15
|
+
* board-live-cards-cli-callbacks.ts
|
|
16
|
+
*
|
|
17
|
+
* Zero platform imports. All storage is injected via adapter interfaces.
|
|
18
|
+
* Safe for Node, browser, and neutral (V8/PyMiniRacer) bundles.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface LiveCard {
|
|
22
|
+
id: string;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
interface CardIndexEntry {
|
|
26
|
+
/** Storage-specific address (file path, Cosmos doc id, localStorage key). */
|
|
27
|
+
key: string;
|
|
28
|
+
/** Checksum of card content — computed by the adapter at write time. */
|
|
29
|
+
checksum: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}
|
|
32
|
+
type CardIndex = Record<string, CardIndexEntry>;
|
|
33
|
+
type CardChecksumIndex = Record<string, string>;
|
|
34
|
+
interface CardStorageAdapter {
|
|
35
|
+
readIndex(): CardIndex | null;
|
|
36
|
+
writeIndex(index: CardIndex): void;
|
|
37
|
+
readCard(key: string): LiveCard | null;
|
|
38
|
+
/** Write card content; returns checksum of what was written. */
|
|
39
|
+
writeCard(key: string, card: LiveCard): string;
|
|
40
|
+
cardExists(key: string): boolean;
|
|
41
|
+
defaultCardKey(cardId: string): string;
|
|
42
|
+
}
|
|
43
|
+
interface CardStore {
|
|
44
|
+
readCard(id: string): LiveCard | null;
|
|
45
|
+
readCardKey(id: string): string | null;
|
|
46
|
+
readAllCards(): LiveCard[];
|
|
47
|
+
readChecksumIndex(): CardChecksumIndex;
|
|
48
|
+
changedSince(snapshotChecksumIndex: CardChecksumIndex): string[];
|
|
49
|
+
}
|
|
50
|
+
interface CardUpsertValidation {
|
|
51
|
+
ok: boolean;
|
|
52
|
+
error?: string;
|
|
53
|
+
}
|
|
54
|
+
interface CardAdminStore extends CardStore {
|
|
55
|
+
validateUpsert(id: string, cardKey: string): CardUpsertValidation;
|
|
56
|
+
writeCard(id: string, card: LiveCard, cardKey?: string): void;
|
|
57
|
+
patchCard(id: string, jsonPath: string, value: unknown): void;
|
|
58
|
+
removeCard(id: string): void;
|
|
59
|
+
readIndex(): CardIndex;
|
|
60
|
+
}
|
|
61
|
+
declare function createCardStore(adapter: CardStorageAdapter, onWarn?: (msg: string) => void): CardAdminStore;
|
|
62
|
+
interface JournalEntry {
|
|
63
|
+
id: string;
|
|
64
|
+
event: GraphEvent;
|
|
65
|
+
}
|
|
66
|
+
interface JournalStorageAdapter {
|
|
67
|
+
readAllEntries(): JournalEntry[];
|
|
68
|
+
appendEntry(entry: JournalEntry): void;
|
|
69
|
+
generateId(): string;
|
|
70
|
+
}
|
|
71
|
+
declare const SNAPSHOT_SCHEMA_VERSION_V1 = "v1";
|
|
72
|
+
declare const BOARD_GRAPH_KEY = "board/graph";
|
|
73
|
+
type OutputStoreEvent = {
|
|
74
|
+
kind: 'computed_values';
|
|
75
|
+
cardId: string;
|
|
76
|
+
values: Record<string, unknown>;
|
|
77
|
+
} | {
|
|
78
|
+
kind: 'data_object';
|
|
79
|
+
key: string;
|
|
80
|
+
payload: unknown;
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'status';
|
|
83
|
+
status: unknown;
|
|
84
|
+
};
|
|
85
|
+
interface BoardStatusCard {
|
|
86
|
+
name: string;
|
|
87
|
+
status: string;
|
|
88
|
+
error?: {
|
|
89
|
+
message: string;
|
|
90
|
+
code?: string;
|
|
91
|
+
at?: string;
|
|
92
|
+
source?: 'task-runtime' | 'source-fetch' | 'timeout' | 'unknown';
|
|
93
|
+
};
|
|
94
|
+
requires: string[];
|
|
95
|
+
requires_satisfied: string[];
|
|
96
|
+
requires_missing: string[];
|
|
97
|
+
provides_declared: string[];
|
|
98
|
+
provides_runtime: string[];
|
|
99
|
+
blocked_by: string[];
|
|
100
|
+
unblocks: string[];
|
|
101
|
+
runtime: {
|
|
102
|
+
attempt_count: number;
|
|
103
|
+
restart_count: number;
|
|
104
|
+
in_progress_since: string | null;
|
|
105
|
+
last_transition_at: string | null;
|
|
106
|
+
last_completed_at: string | null;
|
|
107
|
+
last_restarted_at: string | null;
|
|
108
|
+
status_age_ms: number | null;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
interface BoardStatusObject {
|
|
112
|
+
schema_version: 'v1';
|
|
113
|
+
meta: {
|
|
114
|
+
board: {
|
|
115
|
+
path: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
summary: {
|
|
119
|
+
card_count: number;
|
|
120
|
+
completed: number;
|
|
121
|
+
eligible: number;
|
|
122
|
+
pending: number;
|
|
123
|
+
blocked: number;
|
|
124
|
+
unresolved: number;
|
|
125
|
+
failed?: number;
|
|
126
|
+
in_progress?: number;
|
|
127
|
+
orphan_cards?: number;
|
|
128
|
+
topology?: {
|
|
129
|
+
edge_count: number;
|
|
130
|
+
max_fan_out_card: string | null;
|
|
131
|
+
max_fan_out: number;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
cards: BoardStatusCard[];
|
|
135
|
+
}
|
|
136
|
+
declare const EMPTY_CONFIG: GraphConfig;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* board-live-cards-public.ts
|
|
140
|
+
*
|
|
141
|
+
* Platform-free public API layer for the board-live-cards system.
|
|
142
|
+
*
|
|
143
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
144
|
+
* LAYER DIAGRAM
|
|
145
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
146
|
+
*
|
|
147
|
+
* board-live-cards-cli.ts (THIN — arg parse → call public → print JSON)
|
|
148
|
+
* ↓ calls
|
|
149
|
+
* board-live-cards-public.ts (THIS FILE — facade, all logic, no platform code)
|
|
150
|
+
* ↓ depends on injected
|
|
151
|
+
* board-live-cards-lib.ts (pure domain — stores, graph, codecs)
|
|
152
|
+
*
|
|
153
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
154
|
+
* PLATFORM ADAPTERS (injected into BoardPlatformAdapter)
|
|
155
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
156
|
+
*
|
|
157
|
+
* Node/FS createFsBoardPlatformAdapter(baseRef, cliDir)
|
|
158
|
+
* Azure Functions createAzureBoardPlatformAdapter(baseRef, containerClient, …)
|
|
159
|
+
* Firebase Fn createFirebaseBoardPlatformAdapter(baseRef, firestoreDb, …)
|
|
160
|
+
* In-memory/test createInMemoryBoardPlatformAdapter(baseRef)
|
|
161
|
+
*
|
|
162
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
163
|
+
* USAGE
|
|
164
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
165
|
+
*
|
|
166
|
+
* const board = createBoardLiveCardsPublic(baseRef, adapter);
|
|
167
|
+
* const result = await board.processAccumulatedEvents();
|
|
168
|
+
* const status = board.status();
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
type CommandInput = {
|
|
172
|
+
params?: Record<string, string | number | boolean>;
|
|
173
|
+
body?: unknown;
|
|
174
|
+
};
|
|
175
|
+
type CommandResult<T = undefined> = (T extends undefined ? {
|
|
176
|
+
status: 'success';
|
|
177
|
+
} : {
|
|
178
|
+
status: 'success';
|
|
179
|
+
data: T;
|
|
180
|
+
}) | {
|
|
181
|
+
status: 'fail';
|
|
182
|
+
error: string;
|
|
183
|
+
} | {
|
|
184
|
+
status: 'error';
|
|
185
|
+
error: string;
|
|
186
|
+
};
|
|
187
|
+
interface BoardPlatformAdapter {
|
|
188
|
+
/**
|
|
189
|
+
* KV storage factory — scoped by namespace.
|
|
190
|
+
* Namespaces used by the public layer:
|
|
191
|
+
* 'state-snapshot' — board graph snapshot (StateSnapshotStorageAdapter, built internally)
|
|
192
|
+
* 'config' — board configuration (.task-executor, .chat-handler, .card-store-ref)
|
|
193
|
+
* 'card-upsert' — card upsert dedup index
|
|
194
|
+
* 'execution-requests' — queued execution requests (keyed by journalId)
|
|
195
|
+
* 'card-runtime' — card runtime state snapshots
|
|
196
|
+
* 'output' — published board status + card computed outputs
|
|
197
|
+
*/
|
|
198
|
+
kvStorage(namespace: string): KVStorage;
|
|
199
|
+
/**
|
|
200
|
+
* Build a KVStorage rooted at the given ref.
|
|
201
|
+
* Used by the public layer for both card store and outputs store routing.
|
|
202
|
+
* FS: createFsKvStorage(parseRef(ref).value)
|
|
203
|
+
* localStorage: createLocalStorageKvStorage(parseRef(ref).value)
|
|
204
|
+
*/
|
|
205
|
+
kvStorageForRef(ref: string): KVStorage;
|
|
206
|
+
/**
|
|
207
|
+
* Blob storage factory — scoped by namespace.
|
|
208
|
+
* Namespaces used by the public layer:
|
|
209
|
+
* 'sources' — fetched source data files (keyed by cardId/outputFile)
|
|
210
|
+
* '' — root-scoped blob access (for resolving arbitrary KindValueRef blobs)
|
|
211
|
+
*/
|
|
212
|
+
blobStorage(namespace: string): BlobStorage;
|
|
213
|
+
/**
|
|
214
|
+
* Journal storage adapter (append-only log).
|
|
215
|
+
* Uses the lib's JournalStorageAdapter interface.
|
|
216
|
+
* One journal per board — no namespace parameter needed.
|
|
217
|
+
*/
|
|
218
|
+
journalAdapter(): JournalStorageAdapter;
|
|
219
|
+
/**
|
|
220
|
+
* AtomicRelayLock — non-blocking try-acquire with relay-on-busy semantics.
|
|
221
|
+
* Guards processAccumulatedEvents drain cycle.
|
|
222
|
+
* FS: proper-lockfile (createFsAtomicRelayLock)
|
|
223
|
+
* Azure: blob lease
|
|
224
|
+
* Firestore: Firestore transaction + sentinel document
|
|
225
|
+
*/
|
|
226
|
+
lock: AtomicRelayLock;
|
|
227
|
+
/**
|
|
228
|
+
* Self-identity ExecutionRef — how to invoke THIS board instance.
|
|
229
|
+
* Embedded in source callback tokens so executors know where to report back.
|
|
230
|
+
* Node/FS: { howToRun: 'local-node', whatToRun: 'b64:<base64url({"kind":"fs-path","value":"/path/to/cli.js"})>' }
|
|
231
|
+
* Azure Fn: { howToRun: 'http:post', whatToRun: 'b64:<base64url({"kind":"http-url","value":"https://…/api/board"})>' }
|
|
232
|
+
*/
|
|
233
|
+
selfRef: ExecutionRef;
|
|
234
|
+
/**
|
|
235
|
+
* Generic execution dispatch — platform adapts ExecutionRef → actual transport.
|
|
236
|
+
* Public layer constructs fully-formed semantic args (source def, base_ref,
|
|
237
|
+
* callback token with selfRef baked in). Platform handles transport:
|
|
238
|
+
* Node: writes args to temp file, spawns detached process
|
|
239
|
+
* Azure: HTTP POST args as JSON body
|
|
240
|
+
* Firebase: publishes args as pubsub message
|
|
241
|
+
*/
|
|
242
|
+
dispatchExecution(ref: ExecutionRef, args: Record<string, unknown>): Promise<{
|
|
243
|
+
dispatched: boolean;
|
|
244
|
+
error?: string;
|
|
245
|
+
}>;
|
|
246
|
+
/**
|
|
247
|
+
* Resolve a blob ref to its string contents.
|
|
248
|
+
* The adapter handles the platform-specific lookup (e.g. absolute FS path vs board-relative key).
|
|
249
|
+
* Throws if the blob does not exist.
|
|
250
|
+
*/
|
|
251
|
+
resolveBlob(ref: KindValueRef): string;
|
|
252
|
+
/**
|
|
253
|
+
* Compute a stable, deterministic content hash for any JSON-serializable value.
|
|
254
|
+
* Used for dedup indexes and snapshot versioning.
|
|
255
|
+
* Node/FS: computeStableJsonHash (storage-fs-adapters)
|
|
256
|
+
* Browser: Web Crypto subtle.digest or equivalent
|
|
257
|
+
*/
|
|
258
|
+
hashFn(value: unknown): string;
|
|
259
|
+
/**
|
|
260
|
+
* Generate a random short ID (32 hex chars).
|
|
261
|
+
* Used for commit IDs and delivery tokens.
|
|
262
|
+
* Node/FS: getHash(`${Date.now()}-${Math.random()}`).slice(0, 32)
|
|
263
|
+
* Browser: crypto.randomUUID().replace(/-/g, '')
|
|
264
|
+
*/
|
|
265
|
+
genId(): string;
|
|
266
|
+
/**
|
|
267
|
+
* Request an additional drain pass asynchronously (e.g. spawn a background process).
|
|
268
|
+
* Called as the relay continuation after each drain cycle so that events written
|
|
269
|
+
* during the cycle (e.g. task-completed appended by the card handler) are eventually
|
|
270
|
+
* processed even when the current process exits immediately after returning.
|
|
271
|
+
* Optional — if absent, no continuation is scheduled.
|
|
272
|
+
*/
|
|
273
|
+
requestProcessAccumulated?(): void;
|
|
274
|
+
/**
|
|
275
|
+
* Optional cross-process board change notification publisher (named pipe, webhook, pubsub, etc.).
|
|
276
|
+
* Called once per drain cycle with the complete batch of notifications produced in that cycle.
|
|
277
|
+
*/
|
|
278
|
+
publishBoardChangeNotifications?(notifications: BoardChangeNotification[]): void | Promise<void>;
|
|
279
|
+
/** Optional warn sink — defaults to no-op. */
|
|
280
|
+
onWarn?(msg: string): void;
|
|
281
|
+
}
|
|
282
|
+
interface BoardLiveCardsPublic {
|
|
283
|
+
init(input: CommandInput): CommandResult;
|
|
284
|
+
status(input: CommandInput): CommandResult<BoardStatusObject>;
|
|
285
|
+
getCardStoreRef(input: CommandInput): CommandResult<{
|
|
286
|
+
storeRef: string;
|
|
287
|
+
}>;
|
|
288
|
+
getOutputsStoreRef(input: CommandInput): CommandResult<{
|
|
289
|
+
storeRef: string;
|
|
290
|
+
}>;
|
|
291
|
+
getConfig(input: CommandInput): CommandResult<{
|
|
292
|
+
value: unknown;
|
|
293
|
+
}>;
|
|
294
|
+
getOutputsDataObject(input: CommandInput): CommandResult;
|
|
295
|
+
getAllOutputsDataObjects(input: CommandInput): CommandResult<Record<string, unknown>>;
|
|
296
|
+
getOutputsComputedValues(input: CommandInput): CommandResult;
|
|
297
|
+
getAllOutputsComputedValues(input: CommandInput): CommandResult<Record<string, unknown>>;
|
|
298
|
+
removeCard(input: CommandInput): CommandResult;
|
|
299
|
+
retrigger(input: CommandInput): CommandResult;
|
|
300
|
+
processAccumulatedEvents(input: CommandInput): Promise<CommandResult>;
|
|
301
|
+
upsertCard(input: CommandInput): CommandResult;
|
|
302
|
+
taskFailed(input: CommandInput): CommandResult;
|
|
303
|
+
taskProgress(input: CommandInput): CommandResult;
|
|
304
|
+
sourceDataFetched(input: CommandInput): CommandResult;
|
|
305
|
+
sourceDataFetchFailure(input: CommandInput): CommandResult;
|
|
306
|
+
}
|
|
307
|
+
type BoardChangeNotification = OutputStoreEvent | {
|
|
308
|
+
kind: 'card_refreshed';
|
|
309
|
+
cardId: string;
|
|
310
|
+
card: LiveCard;
|
|
311
|
+
};
|
|
312
|
+
declare function createBoardLiveCardsPublic(baseRef: KindValueRef, adapter: BoardPlatformAdapter): BoardLiveCardsPublic;
|
|
313
|
+
interface BoardNonCorePlatformAdapter extends BoardPlatformAdapter {
|
|
314
|
+
/**
|
|
315
|
+
* Synchronously invoke a task executor subcommand and return stdout.
|
|
316
|
+
* Throws on non-zero exit or timeout.
|
|
317
|
+
*/
|
|
318
|
+
invokeExecutorSync(ref: ExecutionRef, subcommand: string, args: string[], opts?: {
|
|
319
|
+
timeout?: number;
|
|
320
|
+
input?: string;
|
|
321
|
+
}): string;
|
|
322
|
+
/** Schema-only card validator (no executor invocation). */
|
|
323
|
+
validateSchema(card: Record<string, unknown>): {
|
|
324
|
+
ok: boolean;
|
|
325
|
+
errors: string[];
|
|
326
|
+
};
|
|
327
|
+
/** Create a temp file path for I/O staging — absolute, board-scoped. */
|
|
328
|
+
makeTempFilePath(label: string, ext?: string): string;
|
|
329
|
+
/** Absolute-path blob I/O for temp files and card file references. */
|
|
330
|
+
absoluteBlob: BlobStorage;
|
|
331
|
+
}
|
|
332
|
+
interface BoardLiveCardsNonCorePublic {
|
|
333
|
+
/** params: cardId? or all?; returns array even for single card */
|
|
334
|
+
validateCard(input: CommandInput): CommandResult<Array<{
|
|
335
|
+
cardId: string;
|
|
336
|
+
isValid: boolean;
|
|
337
|
+
issues: string[];
|
|
338
|
+
}>>;
|
|
339
|
+
/** body: { "card-content": <card> } — card JSON arrives via stdin; validates schema + JSONata + provides refs + source_defs (executor, if configured) */
|
|
340
|
+
validateCardPreflight(input: CommandInput): CommandResult<{
|
|
341
|
+
cardId: string;
|
|
342
|
+
isValid: boolean;
|
|
343
|
+
issues: string[];
|
|
344
|
+
}>;
|
|
345
|
+
/** params: cardId, sourceIdx, outRef?; body — mockProjections object */
|
|
346
|
+
probeSource(input: CommandInput): CommandResult;
|
|
347
|
+
/** body: { sourceDef, mockProjections }; params: outRef? */
|
|
348
|
+
probeTmpSource(input: CommandInput): CommandResult;
|
|
349
|
+
/** body: { "card-content": <card>, "mock-projections"?: {} }; params: sourceIdx, outRef? — card JSON arrives via stdin; no board state needed */
|
|
350
|
+
probeSourcePreflight(input: CommandInput): CommandResult;
|
|
351
|
+
/** body: { "card-content": <card>, "mock-fetched-sources"?: {}, "mock-requires"?: {} } — evaluates compute expressions with supplied data; no board state needed */
|
|
352
|
+
evalCardCompute(input: CommandInput): CommandResult<{
|
|
353
|
+
cardId: string;
|
|
354
|
+
ok: boolean;
|
|
355
|
+
computed_values: Record<string, unknown>;
|
|
356
|
+
errors: Array<{
|
|
357
|
+
bindTo: string;
|
|
358
|
+
error: string;
|
|
359
|
+
}>;
|
|
360
|
+
}>;
|
|
361
|
+
/** body: { "card-content": <card>, "mock-fetched-sources"?: {}, "mock-requires"?: {} } — full cycle: validate → resolve projections → probe sources → compute */
|
|
362
|
+
simulateCardCycle(input: CommandInput): CommandResult;
|
|
363
|
+
/** no params needed */
|
|
364
|
+
describeTaskExecutorCapabilities(input: CommandInput): CommandResult;
|
|
365
|
+
/**
|
|
366
|
+
* Write/update cards in the configured card store.
|
|
367
|
+
* body: { ops: Array<{ op: 'update', id: string, 'card-content': LiveCard }> }
|
|
368
|
+
*/
|
|
369
|
+
updatesInCardStore(input: CommandInput): CommandResult;
|
|
370
|
+
/**
|
|
371
|
+
* Read cards from the configured card store by id.
|
|
372
|
+
* body: { ids: string[] }
|
|
373
|
+
*/
|
|
374
|
+
readFromCardStore(input: CommandInput): CommandResult<{
|
|
375
|
+
cards: Array<{
|
|
376
|
+
id: string;
|
|
377
|
+
'card-content': LiveCard | null;
|
|
378
|
+
}>;
|
|
379
|
+
}>;
|
|
380
|
+
}
|
|
381
|
+
declare function createBoardLiveCardsNonCorePublic(baseRef: KindValueRef, adapter: BoardNonCorePlatformAdapter): BoardLiveCardsNonCorePublic;
|
|
382
|
+
|
|
383
|
+
export { type BoardChangeNotification as B, type CommandInput as C, EMPTY_CONFIG as E, type LiveCard as L, SNAPSHOT_SCHEMA_VERSION_V1 as S, type CommandResult as a, type CardAdminStore as b, type BoardLiveCardsPublic as c, type BoardPlatformAdapter as d, type BoardNonCorePlatformAdapter as e, BOARD_GRAPH_KEY as f, type BoardLiveCardsNonCorePublic as g, createBoardLiveCardsNonCorePublic as h, createBoardLiveCardsPublic as i, createCardStore as j };
|
package/{dist/board-live-cards-public-hnZo0mAf.d.ts → lib/board-live-cards-public-CsmYrvpd.d.ts}
RENAMED
|
@@ -1,89 +1,139 @@
|
|
|
1
|
+
import { K as KVStorage, B as BlobStorage, A as AtomicRelayLock, a as KindValueRef } from './storage-interface-BhAON-gW.js';
|
|
1
2
|
import { ExecutionRef } from './execution-refs.js';
|
|
2
|
-
import {
|
|
3
|
+
import { f as GraphEvent, G as GraphConfig } from './types-BBhqYGhE.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* board-live-cards-lib — Pure logic library for the board-live-cards CLI.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* Merged from:
|
|
9
|
+
* board-live-cards-all-stores.ts
|
|
10
|
+
* board-live-cards-lib-types.ts
|
|
11
|
+
* board-live-cards-lib-board-status.ts
|
|
12
|
+
* board-live-cards-lib-card-handler.ts
|
|
13
|
+
* board-live-cards-cli-board-commands.ts
|
|
14
|
+
* board-live-cards-cli-card-commands.ts
|
|
15
|
+
* board-live-cards-cli-callbacks.ts
|
|
10
16
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Blob — raw string content at a logical, backend-neutral key
|
|
15
|
-
* Journal — append-only log with cursor-based reads
|
|
16
|
-
* KV — key-value store with list/delete
|
|
17
|
-
*
|
|
18
|
-
* Mapping to existing storage adapters:
|
|
19
|
-
*
|
|
20
|
-
* CardStorageAdapter
|
|
21
|
-
* inventory (cardId → { blobRef, checksum, fileMetadata? }) → KV
|
|
22
|
-
* card JSON files → Blob
|
|
23
|
-
* source output files → Blob
|
|
24
|
-
*
|
|
25
|
-
* JournalStorageAdapter → Journal (board-journal.jsonl)
|
|
26
|
-
*
|
|
27
|
-
* ExecutionRequestStore → KV (keyed by journalId, via createFsKvStorage)
|
|
28
|
-
*
|
|
29
|
-
* StateSnapshotStorageAdapter
|
|
30
|
-
* board-graph.json (packed single JSON, written atomically) → Blob
|
|
31
|
-
* per-card sidecars (cards/<id>/runtime, fetched-sources-manifest) → KV
|
|
17
|
+
* Zero platform imports. All storage is injected via adapter interfaces.
|
|
18
|
+
* Safe for Node, browser, and neutral (V8/PyMiniRacer) bundles.
|
|
32
19
|
*/
|
|
33
|
-
|
|
20
|
+
|
|
21
|
+
interface LiveCard {
|
|
22
|
+
id: string;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
interface CardIndexEntry {
|
|
26
|
+
/** Storage-specific address (file path, Cosmos doc id, localStorage key). */
|
|
34
27
|
key: string;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
/** Checksum of card content — computed by the adapter at write time. */
|
|
29
|
+
checksum: string;
|
|
30
|
+
updatedAt: string;
|
|
38
31
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
readBytes?(key: string): Uint8Array | null;
|
|
50
|
-
/** Optional binary write for file-like artifacts. */
|
|
51
|
-
writeBytes?(key: string, content: Uint8Array): void;
|
|
52
|
-
/** Optional key listing by prefix. */
|
|
53
|
-
listKeys?(prefix?: string): string[];
|
|
54
|
-
/** Optional metadata lookup. */
|
|
55
|
-
stat?(key: string): BlobStat | null;
|
|
32
|
+
type CardIndex = Record<string, CardIndexEntry>;
|
|
33
|
+
type CardChecksumIndex = Record<string, string>;
|
|
34
|
+
interface CardStorageAdapter {
|
|
35
|
+
readIndex(): CardIndex | null;
|
|
36
|
+
writeIndex(index: CardIndex): void;
|
|
37
|
+
readCard(key: string): LiveCard | null;
|
|
38
|
+
/** Write card content; returns checksum of what was written. */
|
|
39
|
+
writeCard(key: string, card: LiveCard): string;
|
|
40
|
+
cardExists(key: string): boolean;
|
|
41
|
+
defaultCardKey(cardId: string): string;
|
|
56
42
|
}
|
|
57
|
-
interface
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
interface CardStore {
|
|
44
|
+
readCard(id: string): LiveCard | null;
|
|
45
|
+
readCardKey(id: string): string | null;
|
|
46
|
+
readAllCards(): LiveCard[];
|
|
47
|
+
readChecksumIndex(): CardChecksumIndex;
|
|
48
|
+
changedSince(snapshotChecksumIndex: CardChecksumIndex): string[];
|
|
60
49
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
* Also accepts the legacy ::fs-path::<path> format for backward compatibility. */
|
|
65
|
-
declare function parseRef(s: string): KindValueRef;
|
|
66
|
-
interface KVStorage {
|
|
67
|
-
/** Returns the stored value, or null if the key does not exist. */
|
|
68
|
-
read(key: string): unknown | null;
|
|
69
|
-
/** Write value at key. Overwrites any existing value. */
|
|
70
|
-
write(key: string, value: unknown): void;
|
|
71
|
-
/** Delete the key. No-op if it does not exist. */
|
|
72
|
-
delete(key: string): void;
|
|
73
|
-
/**
|
|
74
|
-
* List all keys, optionally filtered to those starting with prefix.
|
|
75
|
-
* Order is implementation-defined.
|
|
76
|
-
*/
|
|
77
|
-
listKeys(prefix?: string): string[];
|
|
50
|
+
interface CardUpsertValidation {
|
|
51
|
+
ok: boolean;
|
|
52
|
+
error?: string;
|
|
78
53
|
}
|
|
79
|
-
interface
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
tryAcquire(): (() => void) | null;
|
|
54
|
+
interface CardAdminStore extends CardStore {
|
|
55
|
+
validateUpsert(id: string, cardKey: string): CardUpsertValidation;
|
|
56
|
+
writeCard(id: string, card: LiveCard, cardKey?: string): void;
|
|
57
|
+
patchCard(id: string, jsonPath: string, value: unknown): void;
|
|
58
|
+
removeCard(id: string): void;
|
|
59
|
+
readIndex(): CardIndex;
|
|
86
60
|
}
|
|
61
|
+
declare function createCardStore(adapter: CardStorageAdapter, onWarn?: (msg: string) => void): CardAdminStore;
|
|
62
|
+
interface JournalEntry {
|
|
63
|
+
id: string;
|
|
64
|
+
event: GraphEvent;
|
|
65
|
+
}
|
|
66
|
+
interface JournalStorageAdapter {
|
|
67
|
+
readAllEntries(): JournalEntry[];
|
|
68
|
+
appendEntry(entry: JournalEntry): void;
|
|
69
|
+
generateId(): string;
|
|
70
|
+
}
|
|
71
|
+
declare const SNAPSHOT_SCHEMA_VERSION_V1 = "v1";
|
|
72
|
+
declare const BOARD_GRAPH_KEY = "board/graph";
|
|
73
|
+
type OutputStoreEvent = {
|
|
74
|
+
kind: 'computed_values';
|
|
75
|
+
cardId: string;
|
|
76
|
+
values: Record<string, unknown>;
|
|
77
|
+
} | {
|
|
78
|
+
kind: 'data_object';
|
|
79
|
+
key: string;
|
|
80
|
+
payload: unknown;
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'status';
|
|
83
|
+
status: unknown;
|
|
84
|
+
};
|
|
85
|
+
interface BoardStatusCard {
|
|
86
|
+
name: string;
|
|
87
|
+
status: string;
|
|
88
|
+
error?: {
|
|
89
|
+
message: string;
|
|
90
|
+
code?: string;
|
|
91
|
+
at?: string;
|
|
92
|
+
source?: 'task-runtime' | 'source-fetch' | 'timeout' | 'unknown';
|
|
93
|
+
};
|
|
94
|
+
requires: string[];
|
|
95
|
+
requires_satisfied: string[];
|
|
96
|
+
requires_missing: string[];
|
|
97
|
+
provides_declared: string[];
|
|
98
|
+
provides_runtime: string[];
|
|
99
|
+
blocked_by: string[];
|
|
100
|
+
unblocks: string[];
|
|
101
|
+
runtime: {
|
|
102
|
+
attempt_count: number;
|
|
103
|
+
restart_count: number;
|
|
104
|
+
in_progress_since: string | null;
|
|
105
|
+
last_transition_at: string | null;
|
|
106
|
+
last_completed_at: string | null;
|
|
107
|
+
last_restarted_at: string | null;
|
|
108
|
+
status_age_ms: number | null;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
interface BoardStatusObject {
|
|
112
|
+
schema_version: 'v1';
|
|
113
|
+
meta: {
|
|
114
|
+
board: {
|
|
115
|
+
path: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
summary: {
|
|
119
|
+
card_count: number;
|
|
120
|
+
completed: number;
|
|
121
|
+
eligible: number;
|
|
122
|
+
pending: number;
|
|
123
|
+
blocked: number;
|
|
124
|
+
unresolved: number;
|
|
125
|
+
failed?: number;
|
|
126
|
+
in_progress?: number;
|
|
127
|
+
orphan_cards?: number;
|
|
128
|
+
topology?: {
|
|
129
|
+
edge_count: number;
|
|
130
|
+
max_fan_out_card: string | null;
|
|
131
|
+
max_fan_out: number;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
cards: BoardStatusCard[];
|
|
135
|
+
}
|
|
136
|
+
declare const EMPTY_CONFIG: GraphConfig;
|
|
87
137
|
|
|
88
138
|
/**
|
|
89
139
|
* board-live-cards-public.ts
|
|
@@ -267,6 +317,7 @@ interface BoardNonCorePlatformAdapter extends BoardPlatformAdapter {
|
|
|
267
317
|
*/
|
|
268
318
|
invokeExecutorSync(ref: ExecutionRef, subcommand: string, args: string[], opts?: {
|
|
269
319
|
timeout?: number;
|
|
320
|
+
input?: string;
|
|
270
321
|
}): string;
|
|
271
322
|
/** Schema-only card validator (no executor invocation). */
|
|
272
323
|
validateSchema(card: Record<string, unknown>): {
|
|
@@ -285,8 +336,8 @@ interface BoardLiveCardsNonCorePublic {
|
|
|
285
336
|
isValid: boolean;
|
|
286
337
|
issues: string[];
|
|
287
338
|
}>>;
|
|
288
|
-
/** body: { "card-content": <card> } — card JSON arrives via stdin */
|
|
289
|
-
|
|
339
|
+
/** body: { "card-content": <card> } — card JSON arrives via stdin; validates schema + JSONata + provides refs + source_defs (executor, if configured) */
|
|
340
|
+
validateCardPreflight(input: CommandInput): CommandResult<{
|
|
290
341
|
cardId: string;
|
|
291
342
|
isValid: boolean;
|
|
292
343
|
issues: string[];
|
|
@@ -295,6 +346,20 @@ interface BoardLiveCardsNonCorePublic {
|
|
|
295
346
|
probeSource(input: CommandInput): CommandResult;
|
|
296
347
|
/** body: { sourceDef, mockProjections }; params: outRef? */
|
|
297
348
|
probeTmpSource(input: CommandInput): CommandResult;
|
|
349
|
+
/** body: { "card-content": <card>, "mock-projections"?: {} }; params: sourceIdx, outRef? — card JSON arrives via stdin; no board state needed */
|
|
350
|
+
probeSourcePreflight(input: CommandInput): CommandResult;
|
|
351
|
+
/** body: { "card-content": <card>, "mock-fetched-sources"?: {}, "mock-requires"?: {} } — evaluates compute expressions with supplied data; no board state needed */
|
|
352
|
+
evalCardCompute(input: CommandInput): CommandResult<{
|
|
353
|
+
cardId: string;
|
|
354
|
+
ok: boolean;
|
|
355
|
+
computed_values: Record<string, unknown>;
|
|
356
|
+
errors: Array<{
|
|
357
|
+
bindTo: string;
|
|
358
|
+
error: string;
|
|
359
|
+
}>;
|
|
360
|
+
}>;
|
|
361
|
+
/** body: { "card-content": <card>, "mock-fetched-sources"?: {}, "mock-requires"?: {} } — full cycle: validate → resolve projections → probe sources → compute */
|
|
362
|
+
simulateCardCycle(input: CommandInput): CommandResult;
|
|
298
363
|
/** no params needed */
|
|
299
364
|
describeTaskExecutorCapabilities(input: CommandInput): CommandResult;
|
|
300
365
|
/**
|
|
@@ -315,4 +380,4 @@ interface BoardLiveCardsNonCorePublic {
|
|
|
315
380
|
}
|
|
316
381
|
declare function createBoardLiveCardsNonCorePublic(baseRef: KindValueRef, adapter: BoardNonCorePlatformAdapter): BoardLiveCardsNonCorePublic;
|
|
317
382
|
|
|
318
|
-
export { type
|
|
383
|
+
export { type BoardChangeNotification as B, type CommandInput as C, EMPTY_CONFIG as E, type LiveCard as L, SNAPSHOT_SCHEMA_VERSION_V1 as S, type CommandResult as a, type CardAdminStore as b, type BoardLiveCardsPublic as c, type BoardPlatformAdapter as d, type BoardNonCorePlatformAdapter as e, BOARD_GRAPH_KEY as f, type BoardLiveCardsNonCorePublic as g, createBoardLiveCardsNonCorePublic as h, createBoardLiveCardsPublic as i, createCardStore as j };
|