yaml-flow 5.4.2 → 7.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/board-live-cards-cli.js +6 -6
- package/browser/asset-integrity.json +10 -0
- package/browser/board-livecards-client.js +2 -0
- package/browser/board-livecards-client.js.map +1 -0
- package/browser/board-livecards-localstorage.js +10 -0
- package/browser/board-livecards-localstorage.js.map +1 -0
- package/browser/board-livegraph-engine.js +2 -1676
- package/browser/board-livegraph-engine.js.map +1 -1
- package/browser/card-compute.js +28 -28
- package/browser/compute-jsonata.js +5 -0
- package/browser/compute-jsonata.js.map +1 -0
- package/browser/live-cards.js +561 -129
- package/browser/live-cards.schema.json +418 -132
- package/card-store.js +37 -0
- package/dist/batch/index.cjs +1 -108
- package/dist/batch/index.cjs.map +1 -1
- package/dist/batch/index.js +1 -106
- package/dist/batch/index.js.map +1 -1
- package/dist/board-live-cards-lib-Bg6EvCo5.d.cts +136 -0
- package/dist/board-live-cards-lib-jM2uYG1v.d.ts +136 -0
- package/dist/board-live-cards-public-CW5074xr.d.cts +318 -0
- package/dist/board-live-cards-public-hnZo0mAf.d.ts +318 -0
- package/dist/board-livegraph-runtime/index.cjs +2 -1671
- package/dist/board-livegraph-runtime/index.cjs.map +1 -1
- package/dist/board-livegraph-runtime/index.d.cts +12 -11
- package/dist/board-livegraph-runtime/index.d.ts +12 -11
- package/dist/board-livegraph-runtime/index.js +2 -1662
- package/dist/board-livegraph-runtime/index.js.map +1 -1
- package/dist/board-livegraph-runtime/jsonata-sync.cjs +7623 -0
- package/dist/card-compute/index.cjs +9 -7159
- package/dist/card-compute/index.cjs.map +1 -1
- package/dist/card-compute/index.d.cts +27 -1
- package/dist/card-compute/index.d.ts +27 -1
- package/dist/card-compute/index.js +9 -7145
- package/dist/card-compute/index.js.map +1 -1
- package/dist/card-compute/jsonata-sync.cjs +7623 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.cjs +3 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.cjs.map +1 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.d.cts +37 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.d.ts +37 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.js +3 -0
- package/dist/cli/browser-api/board-live-cards-browser-adapter.js.map +1 -0
- package/dist/cli/browser-api/card-store-browser-api.cjs +2 -0
- package/dist/cli/browser-api/card-store-browser-api.cjs.map +1 -0
- package/dist/cli/browser-api/card-store-browser-api.d.cts +26 -0
- package/dist/cli/browser-api/card-store-browser-api.d.ts +26 -0
- package/dist/cli/browser-api/card-store-browser-api.js +2 -0
- package/dist/cli/browser-api/card-store-browser-api.js.map +1 -0
- package/dist/cli/browser-api/jsonata-sync.cjs +7623 -0
- package/dist/cli/node/artifacts-store-cli.cjs +11 -0
- package/dist/cli/node/artifacts-store-cli.cjs.map +1 -0
- package/dist/cli/node/artifacts-store-cli.d.cts +8 -0
- package/dist/cli/node/artifacts-store-cli.d.ts +8 -0
- package/dist/cli/node/artifacts-store-cli.js +11 -0
- package/dist/cli/node/artifacts-store-cli.js.map +1 -0
- package/dist/cli/node/board-live-cards-cli.cjs +15 -0
- package/dist/cli/node/board-live-cards-cli.cjs.map +1 -0
- package/dist/cli/node/board-live-cards-cli.d.cts +20 -0
- package/dist/cli/node/board-live-cards-cli.d.ts +20 -0
- package/dist/cli/node/board-live-cards-cli.js +15 -0
- package/dist/cli/node/board-live-cards-cli.js.map +1 -0
- package/dist/cli/node/card-store-cli.cjs +8 -0
- package/dist/cli/node/card-store-cli.cjs.map +1 -0
- package/dist/cli/node/card-store-cli.d.cts +15 -0
- package/dist/cli/node/card-store-cli.d.ts +15 -0
- package/dist/cli/node/card-store-cli.js +8 -0
- package/dist/cli/node/card-store-cli.js.map +1 -0
- package/dist/cli/node/execution-adapter.cjs +3 -0
- package/dist/cli/node/execution-adapter.cjs.map +1 -0
- package/dist/cli/node/execution-adapter.d.cts +174 -0
- package/dist/cli/node/execution-adapter.d.ts +174 -0
- package/dist/cli/node/execution-adapter.js +3 -0
- package/dist/cli/node/execution-adapter.js.map +1 -0
- package/dist/cli/node/fs-board-adapter.cjs +14 -0
- package/dist/cli/node/fs-board-adapter.cjs.map +1 -0
- package/dist/cli/node/fs-board-adapter.d.cts +204 -0
- package/dist/cli/node/fs-board-adapter.d.ts +204 -0
- package/dist/cli/node/fs-board-adapter.js +14 -0
- package/dist/cli/node/fs-board-adapter.js.map +1 -0
- package/dist/cli/node/jsonata-sync.cjs +7623 -0
- package/dist/cli/node/source-cli-task-executor.cjs +11 -0
- package/dist/cli/node/source-cli-task-executor.cjs.map +1 -0
- package/dist/cli/node/source-cli-task-executor.d.cts +1 -0
- package/dist/cli/node/source-cli-task-executor.d.ts +1 -0
- package/dist/cli/node/source-cli-task-executor.js +11 -0
- package/dist/cli/node/source-cli-task-executor.js.map +1 -0
- package/dist/config/index.cjs +1 -79
- package/dist/config/index.cjs.map +1 -1
- package/dist/config/index.js +1 -76
- package/dist/config/index.js.map +1 -1
- package/dist/continuous-event-graph/index.cjs +2 -2129
- package/dist/continuous-event-graph/index.cjs.map +1 -1
- package/dist/continuous-event-graph/index.d.cts +81 -5
- package/dist/continuous-event-graph/index.d.ts +81 -5
- package/dist/continuous-event-graph/index.js +2 -2088
- package/dist/continuous-event-graph/index.js.map +1 -1
- package/dist/continuous-event-graph/jsonata-sync.cjs +7623 -0
- package/dist/event-graph/index.cjs +22 -8292
- package/dist/event-graph/index.cjs.map +1 -1
- package/dist/event-graph/index.js +22 -8237
- package/dist/event-graph/index.js.map +1 -1
- package/dist/execution-refs.cjs +3 -0
- package/dist/execution-refs.cjs.map +1 -0
- package/dist/execution-refs.d.cts +260 -0
- package/dist/execution-refs.d.ts +260 -0
- package/dist/execution-refs.js +3 -0
- package/dist/execution-refs.js.map +1 -0
- package/dist/index.cjs +29 -13221
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +29 -13112
- package/dist/index.js.map +1 -1
- package/dist/inference/index.cjs +5 -617
- package/dist/inference/index.cjs.map +1 -1
- package/dist/inference/index.js +5 -610
- package/dist/inference/index.js.map +1 -1
- package/dist/jsonata-sync.cjs +7623 -0
- package/dist/{live-cards-bridge-x5XREkXm.d.cts → live-cards-bridge-BXbVTsna.d.cts} +27 -4
- package/dist/{live-cards-bridge-EQjytzI_.d.ts → live-cards-bridge-Ds28XR15.d.ts} +27 -4
- package/dist/server-runtime/index.cjs +9 -0
- package/dist/server-runtime/index.cjs.map +1 -0
- package/dist/server-runtime/index.d.cts +31 -0
- package/dist/server-runtime/index.d.ts +31 -0
- package/dist/server-runtime/index.js +9 -0
- package/dist/server-runtime/index.js.map +1 -0
- package/dist/server-runtime/jsonata-sync.cjs +7623 -0
- package/dist/step-machine/index.cjs +11 -7129
- package/dist/step-machine/index.cjs.map +1 -1
- package/dist/step-machine/index.js +11 -7113
- package/dist/step-machine/index.js.map +1 -1
- package/dist/step-machine-public/index.cjs +2 -0
- package/dist/step-machine-public/index.cjs.map +1 -0
- package/dist/step-machine-public/index.d.cts +159 -0
- package/dist/step-machine-public/index.d.ts +159 -0
- package/dist/step-machine-public/index.js +2 -0
- package/dist/step-machine-public/index.js.map +1 -0
- package/dist/step-machine-public/jsonata-sync.cjs +7623 -0
- package/dist/storage-refs.cjs +10 -0
- package/dist/storage-refs.cjs.map +1 -0
- package/dist/storage-refs.d.cts +93 -0
- package/dist/storage-refs.d.ts +93 -0
- package/dist/storage-refs.js +10 -0
- package/dist/storage-refs.js.map +1 -0
- package/dist/stores/file.cjs +1 -114
- package/dist/stores/file.cjs.map +1 -1
- package/dist/stores/file.js +1 -112
- package/dist/stores/file.js.map +1 -1
- package/dist/stores/index.cjs +1 -231
- package/dist/stores/index.cjs.map +1 -1
- package/dist/stores/index.js +1 -227
- package/dist/stores/index.js.map +1 -1
- package/dist/stores/localStorage.cjs +1 -76
- package/dist/stores/localStorage.cjs.map +1 -1
- package/dist/stores/localStorage.js +1 -74
- package/dist/stores/localStorage.js.map +1 -1
- package/dist/stores/memory.cjs +1 -47
- package/dist/stores/memory.cjs.map +1 -1
- package/dist/stores/memory.js +1 -45
- package/dist/stores/memory.js.map +1 -1
- package/dist/types-B1ZRa4aI.d.ts +147 -0
- package/dist/types-BxEFcVK9.d.cts +147 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-t4.js +291 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-fetch-prices.js +218 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-fetch-prices.py +201 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-http-test.js +357 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-inference-adapter.js +25 -16
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-public.js +552 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-server.js +300 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-server.py +617 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-sse-worker.js +48 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.py +366 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/--base-ref/.runtime-out +1 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/--base-ref/board-graph.json +32 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/_board-cli.js +70 -3
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/add-cards-cli.js +16 -11
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/init-board-cli.js +9 -8
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/poll-status-cli.js +49 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/reset-board-dir-cli.js +2 -6
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/retrigger-cli.js +4 -8
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/status-cli.js +3 -7
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/update-holdings-cli.js +9 -8
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/wait-completed-cli.js +12 -17
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/write-prices-cli.js +2 -6
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/_board_pycli.py +107 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/add-cards.py +51 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/init-board.py +45 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/poll-status.py +71 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers-py/reset-board-dir.py +36 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/inline-python-demo.flow.yaml +26 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/inline-python-handlers.py +39 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker-pycli.flow.yaml +80 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml +36 -187
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.input.json +40 -34
- package/examples/cli/step-machine-cli/portfolio-tracker/run-inline-python-demo-pycli.py +43 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/run-portfolio-tracker-pycli.py +77 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat +1 -2
- package/examples/cli/step-machine-demo/jsonata-init-board-cli.js +8 -13
- package/examples/cli/step-machine-demo/jsonata-init-board.flow.yaml +33 -9
- package/examples/cli/step-machine-demo/one-step-cli-only.flow.yaml +3 -1
- package/examples/cli/step-machine-demo/step2-double-cli.js +6 -12
- package/examples/cli/step-machine-demo/two-step-math.flow.yaml +66 -4
- package/examples/cli/step-machine-demo/two-step-mixed.flow.yaml +13 -5
- package/examples/example-board/agent-instructions.md +11 -5
- package/examples/example-board/cards/_index.json +47 -0
- package/examples/example-board/cards/card-market-prices.json +33 -9
- package/examples/example-board/cards/card-my-identity.json +30 -6
- package/examples/example-board/cards/card-portfolio-action.json +24 -6
- package/examples/example-board/cards/card-portfolio-intelligence.json +97 -0
- package/examples/example-board/cards/card-portfolio-risks.json +24 -6
- package/examples/example-board/cards/card-portfolio-value.json +38 -10
- package/examples/example-board/cards/card-portfolio.json +57 -13
- package/examples/example-board/cards/card-rebalance-impact.json +22 -6
- package/examples/example-board/cards/card-rebalance-sim.json +66 -15
- package/examples/example-board/demo-chat-handler.js +14 -4
- package/examples/example-board/demo-server-config.json +1 -0
- package/examples/example-board/demo-server.js +366 -68
- package/examples/example-board/demo-shell-localstorage.html +774 -0
- package/examples/example-board/demo-shell-with-server.html +20 -37
- package/examples/example-board/demo-shell.html +5 -4
- package/examples/example-board/demo-task-executor.js +273 -275
- package/examples/index.html +0 -14
- package/examples/step-machine-cli/portfolio-tracker/handlers/_board-cli.js +0 -1
- package/examples/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat +1 -2
- package/package.json +46 -8
- package/schema/live-cards.schema.json +418 -132
- package/step-machine-cli.js +43 -310
- package/board-livecards-server-runtime.js +0 -1574
- package/browser/board-livecards-runtime-client.js +0 -263
- package/dist/cli/board-live-cards-cli.cjs +0 -10650
- package/dist/cli/board-live-cards-cli.cjs.map +0 -1
- package/dist/cli/board-live-cards-cli.d.cts +0 -179
- package/dist/cli/board-live-cards-cli.d.ts +0 -179
- package/dist/cli/board-live-cards-cli.js +0 -10598
- package/dist/cli/board-live-cards-cli.js.map +0 -1
- package/dist/journal-9HEgs7dU.d.ts +0 -28
- package/dist/journal-B-JCfQnh.d.cts +0 -28
- package/dist/schedule-Cszq9LYY.d.ts +0 -21
- package/dist/schedule-qWNL0RQh.d.cts +0 -21
- package/examples/browser/boards/portfolio-tracker/cards/holdings-table.json +0 -22
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-form.json +0 -16
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-risk-assessment.json +0 -28
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-value.json +0 -15
- package/examples/browser/boards/portfolio-tracker/cards/price-fetch.json +0 -15
- package/examples/browser/boards/portfolio-tracker/cards/rebalancing-strategy.json +0 -28
- package/examples/browser/boards/portfolio-tracker/fetch-prices.js +0 -43
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-task-executor.cjs +0 -96
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.bat +0 -7
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.js +0 -351
- package/examples/cli/step-machine-demo/two-step-math-handlers.js +0 -32
- package/examples/cli/step-machine-demo/two-step-mixed-handlers.js +0 -24
- package/examples/example-board/demo-shell-browser.html +0 -674
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
"id": "card-portfolio",
|
|
3
3
|
"meta": {
|
|
4
4
|
"title": "My Portfolio",
|
|
5
|
-
"tags": [
|
|
5
|
+
"tags": [
|
|
6
|
+
"portfolio"
|
|
7
|
+
],
|
|
6
8
|
"desc": "Manage your stock holdings — edit tickers and quantities inline, add or delete rows. Changes propagate downstream immediately."
|
|
7
9
|
},
|
|
8
10
|
"provides": [
|
|
9
|
-
{
|
|
11
|
+
{
|
|
12
|
+
"bindTo": "holdings",
|
|
13
|
+
"ref": "card_data.holdings"
|
|
14
|
+
}
|
|
10
15
|
],
|
|
11
16
|
"compute": [],
|
|
12
17
|
"view": {
|
|
@@ -17,28 +22,67 @@
|
|
|
17
22
|
"data": {
|
|
18
23
|
"bind": "card_data.holdings",
|
|
19
24
|
"writeTo": "card_data.holdings",
|
|
20
|
-
"columns": [
|
|
25
|
+
"columns": [
|
|
26
|
+
"ticker",
|
|
27
|
+
"quantity",
|
|
28
|
+
"cost_basis"
|
|
29
|
+
],
|
|
21
30
|
"schema": {
|
|
22
31
|
"properties": {
|
|
23
|
-
"quantity":
|
|
24
|
-
|
|
32
|
+
"quantity": {
|
|
33
|
+
"type": "number"
|
|
34
|
+
},
|
|
35
|
+
"cost_basis": {
|
|
36
|
+
"type": "number"
|
|
37
|
+
}
|
|
25
38
|
}
|
|
26
39
|
}
|
|
27
40
|
}
|
|
28
41
|
}
|
|
29
42
|
],
|
|
30
43
|
"layout": {
|
|
31
|
-
"board": {
|
|
32
|
-
|
|
44
|
+
"board": {
|
|
45
|
+
"col": 4,
|
|
46
|
+
"order": 1
|
|
47
|
+
},
|
|
48
|
+
"canvas": {
|
|
49
|
+
"x": 50,
|
|
50
|
+
"y": 50,
|
|
51
|
+
"w": 320,
|
|
52
|
+
"h": 340
|
|
53
|
+
}
|
|
33
54
|
},
|
|
34
|
-
"features": {
|
|
55
|
+
"features": {
|
|
56
|
+
"chat": true
|
|
57
|
+
}
|
|
35
58
|
},
|
|
36
59
|
"card_data": {
|
|
37
60
|
"holdings": [
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
61
|
+
{
|
|
62
|
+
"ticker": "AAPL",
|
|
63
|
+
"quantity": 10,
|
|
64
|
+
"cost_basis": 150
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"ticker": "MSFT",
|
|
68
|
+
"quantity": 5,
|
|
69
|
+
"cost_basis": 310
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"ticker": "GOOGL",
|
|
73
|
+
"quantity": 2,
|
|
74
|
+
"cost_basis": 280
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"ticker": "TSLA",
|
|
78
|
+
"quantity": 3,
|
|
79
|
+
"cost_basis": 200
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"ticker": "NVDA",
|
|
83
|
+
"quantity": 5,
|
|
84
|
+
"cost_basis": 310
|
|
85
|
+
}
|
|
42
86
|
]
|
|
43
87
|
}
|
|
44
|
-
}
|
|
88
|
+
}
|
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
"id": "card-rebalance-impact",
|
|
3
3
|
"meta": {
|
|
4
4
|
"title": "Rebalance Impact",
|
|
5
|
-
"tags": [
|
|
5
|
+
"tags": [
|
|
6
|
+
"portfolio",
|
|
7
|
+
"simulation"
|
|
8
|
+
],
|
|
6
9
|
"simulation": true,
|
|
7
10
|
"desc": "Before/after impact summary of the proposed rebalance scenario."
|
|
8
11
|
},
|
|
9
|
-
"requires": [
|
|
12
|
+
"requires": [
|
|
13
|
+
"positions",
|
|
14
|
+
"proposed_trades"
|
|
15
|
+
],
|
|
10
16
|
"compute": [
|
|
11
17
|
{
|
|
12
18
|
"bindTo": "total_current_value",
|
|
@@ -53,13 +59,23 @@
|
|
|
53
59
|
"elements": [
|
|
54
60
|
{
|
|
55
61
|
"kind": "markdown",
|
|
56
|
-
"data": {
|
|
62
|
+
"data": {
|
|
63
|
+
"bind": "computed_values.summary_md"
|
|
64
|
+
}
|
|
57
65
|
}
|
|
58
66
|
],
|
|
59
67
|
"layout": {
|
|
60
|
-
"board": {
|
|
61
|
-
|
|
68
|
+
"board": {
|
|
69
|
+
"col": 6,
|
|
70
|
+
"order": 8
|
|
71
|
+
},
|
|
72
|
+
"canvas": {
|
|
73
|
+
"x": 1360,
|
|
74
|
+
"y": 480,
|
|
75
|
+
"w": 400,
|
|
76
|
+
"h": 280
|
|
77
|
+
}
|
|
62
78
|
}
|
|
63
79
|
},
|
|
64
80
|
"card_data": {}
|
|
65
|
-
}
|
|
81
|
+
}
|
|
@@ -2,11 +2,20 @@
|
|
|
2
2
|
"id": "card-rebalance-sim",
|
|
3
3
|
"meta": {
|
|
4
4
|
"title": "Rebalance Proposal",
|
|
5
|
-
"tags": [
|
|
5
|
+
"tags": [
|
|
6
|
+
"portfolio",
|
|
7
|
+
"simulation"
|
|
8
|
+
],
|
|
6
9
|
"simulation": true,
|
|
7
10
|
"desc": "AI-proposed rebalance trades based on portfolio intelligence. Edit quantities before pinning."
|
|
8
11
|
},
|
|
9
|
-
"requires": [
|
|
12
|
+
"requires": [
|
|
13
|
+
"holdings",
|
|
14
|
+
"portfolio_mix",
|
|
15
|
+
"portfolio_risks",
|
|
16
|
+
"portfolio_action",
|
|
17
|
+
"positions"
|
|
18
|
+
],
|
|
10
19
|
"source_defs": [
|
|
11
20
|
{
|
|
12
21
|
"bindTo": "rebalance",
|
|
@@ -24,7 +33,20 @@
|
|
|
24
33
|
}
|
|
25
34
|
],
|
|
26
35
|
"provides": [
|
|
27
|
-
{
|
|
36
|
+
{
|
|
37
|
+
"bindTo": "proposed_trades",
|
|
38
|
+
"ref": "fetched_sources.rebalance.proposed_trades"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"compute": [
|
|
42
|
+
{
|
|
43
|
+
"bindTo": "proposed_trades",
|
|
44
|
+
"expr": "fetched_sources.rebalance.proposed_trades"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"bindTo": "_view",
|
|
48
|
+
"expr": "fetched_sources.rebalance._view"
|
|
49
|
+
}
|
|
28
50
|
],
|
|
29
51
|
"view": {
|
|
30
52
|
"elements": [
|
|
@@ -32,18 +54,37 @@
|
|
|
32
54
|
"kind": "ref",
|
|
33
55
|
"label": "Proposed Trades",
|
|
34
56
|
"data": {
|
|
35
|
-
"bind": "
|
|
36
|
-
"viewBind": "
|
|
57
|
+
"bind": "computed_values.proposed_trades",
|
|
58
|
+
"viewBind": "computed_values._view",
|
|
37
59
|
"fallbackKind": "editable-table",
|
|
38
60
|
"writeTo": "card_data.proposed_trades",
|
|
39
|
-
"columns": [
|
|
61
|
+
"columns": [
|
|
62
|
+
"ticker",
|
|
63
|
+
"direction",
|
|
64
|
+
"current_qty",
|
|
65
|
+
"change",
|
|
66
|
+
"proposed_qty",
|
|
67
|
+
"price",
|
|
68
|
+
"trade_value",
|
|
69
|
+
"reason"
|
|
70
|
+
],
|
|
40
71
|
"schema": {
|
|
41
72
|
"properties": {
|
|
42
|
-
"current_qty": {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
73
|
+
"current_qty": {
|
|
74
|
+
"type": "number"
|
|
75
|
+
},
|
|
76
|
+
"change": {
|
|
77
|
+
"type": "number"
|
|
78
|
+
},
|
|
79
|
+
"proposed_qty": {
|
|
80
|
+
"type": "number"
|
|
81
|
+
},
|
|
82
|
+
"price": {
|
|
83
|
+
"type": "number"
|
|
84
|
+
},
|
|
85
|
+
"trade_value": {
|
|
86
|
+
"type": "number"
|
|
87
|
+
}
|
|
47
88
|
}
|
|
48
89
|
}
|
|
49
90
|
}
|
|
@@ -58,10 +99,20 @@
|
|
|
58
99
|
}
|
|
59
100
|
],
|
|
60
101
|
"layout": {
|
|
61
|
-
"board": {
|
|
62
|
-
|
|
102
|
+
"board": {
|
|
103
|
+
"col": 6,
|
|
104
|
+
"order": 7
|
|
105
|
+
},
|
|
106
|
+
"canvas": {
|
|
107
|
+
"x": 840,
|
|
108
|
+
"y": 480,
|
|
109
|
+
"w": 500,
|
|
110
|
+
"h": 280
|
|
111
|
+
}
|
|
63
112
|
},
|
|
64
|
-
"features": {
|
|
113
|
+
"features": {
|
|
114
|
+
"refresh": true
|
|
115
|
+
}
|
|
65
116
|
},
|
|
66
117
|
"card_data": {}
|
|
67
|
-
}
|
|
118
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* runtimeStatusDir— relative subdir: 'runtime-out'
|
|
11
11
|
* cardsDir — relative subdir: 'surface/tmp-cards'
|
|
12
12
|
* chatDir — absolute path to the card's chats directory
|
|
13
|
+
* chatProcessingMarkerKey — relative marker key in chats artifacts store (e.g. 'card-portfolio/.processing')
|
|
13
14
|
* lastChatFile — filename of the just-written user message, e.g. '001_user.txt'
|
|
14
15
|
* serverUrl — base URL of hosting server (e.g. http://127.0.0.1:7799), optional
|
|
15
16
|
*
|
|
@@ -37,13 +38,12 @@ function getArg(name) {
|
|
|
37
38
|
const boardId = getArg('--boardId') || '';
|
|
38
39
|
const cardId = getArg('--cardId') || '';
|
|
39
40
|
const extraStr = getArg('--extraEncJson') || '';
|
|
40
|
-
const cleanOnExit = getArg('--cleanOnExit') || '';
|
|
41
41
|
|
|
42
42
|
let extra = {};
|
|
43
43
|
try { extra = JSON.parse(Buffer.from(extraStr, 'base64').toString('utf-8')); }
|
|
44
44
|
catch { console.error('[demo-chat-handler] bad --extraEncJson'); process.exit(0); }
|
|
45
45
|
|
|
46
|
-
const { boardSetupRoot, boardRuntimeDir, runtimeStatusDir, cardsDir, chatDir, lastChatFile, serverUrl } = extra;
|
|
46
|
+
const { boardSetupRoot, boardRuntimeDir, runtimeStatusDir, cardsDir, chatDir, chatProcessingMarkerKey, lastChatFile, serverUrl } = extra;
|
|
47
47
|
if (!boardSetupRoot || !chatDir || !lastChatFile) {
|
|
48
48
|
console.error('[demo-chat-handler] missing boardSetupRoot/chatDir/lastChatFile');
|
|
49
49
|
process.exit(0);
|
|
@@ -153,7 +153,17 @@ try {
|
|
|
153
153
|
} catch (err) {
|
|
154
154
|
console.error('[demo-chat-handler] wrapper failed: ' + (err?.message ?? err));
|
|
155
155
|
} finally {
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
cleanupProcessingMarker();
|
|
157
|
+
}
|
|
158
|
+
function cleanupProcessingMarker() {
|
|
159
|
+
// Prefer artifacts-style marker key from extra payload so runtime/handler contract
|
|
160
|
+
// does not rely on passing an absolute file path argument.
|
|
161
|
+
if (chatProcessingMarkerKey) {
|
|
162
|
+
try {
|
|
163
|
+
const markerPath = path.join(cardsDirAbs, chatProcessingMarkerKey);
|
|
164
|
+
fs.unlinkSync(markerPath);
|
|
165
|
+
return;
|
|
166
|
+
} catch {}
|
|
158
167
|
}
|
|
168
|
+
try { fs.unlinkSync(path.join(chatDirAbs, '.processing')); } catch {}
|
|
159
169
|
}
|