yaml-flow 4.0.0 → 5.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.
Files changed (95) hide show
  1. package/browser/board-livegraph-runtime.js +1453 -0
  2. package/browser/board-livegraph-runtime.js.map +1 -0
  3. package/browser/card-compute.js +36 -17
  4. package/browser/live-cards.js +848 -109
  5. package/browser/live-cards.schema.json +46 -21
  6. package/dist/board-livegraph-runtime/index.cjs +1448 -0
  7. package/dist/board-livegraph-runtime/index.cjs.map +1 -0
  8. package/dist/board-livegraph-runtime/index.d.cts +101 -0
  9. package/dist/board-livegraph-runtime/index.d.ts +101 -0
  10. package/dist/board-livegraph-runtime/index.js +1441 -0
  11. package/dist/board-livegraph-runtime/index.js.map +1 -0
  12. package/dist/card-compute/index.cjs +159 -44
  13. package/dist/card-compute/index.cjs.map +1 -1
  14. package/dist/card-compute/index.d.cts +36 -11
  15. package/dist/card-compute/index.d.ts +36 -11
  16. package/dist/card-compute/index.js +156 -44
  17. package/dist/card-compute/index.js.map +1 -1
  18. package/dist/cli/board-live-cards-cli.cjs +476 -105
  19. package/dist/cli/board-live-cards-cli.cjs.map +1 -1
  20. package/dist/cli/board-live-cards-cli.d.cts +8 -16
  21. package/dist/cli/board-live-cards-cli.d.ts +8 -16
  22. package/dist/cli/board-live-cards-cli.js +476 -106
  23. package/dist/cli/board-live-cards-cli.js.map +1 -1
  24. package/dist/continuous-event-graph/index.cjs +74 -33
  25. package/dist/continuous-event-graph/index.cjs.map +1 -1
  26. package/dist/continuous-event-graph/index.d.cts +7 -23
  27. package/dist/continuous-event-graph/index.d.ts +7 -23
  28. package/dist/continuous-event-graph/index.js +73 -32
  29. package/dist/continuous-event-graph/index.js.map +1 -1
  30. package/dist/index.cjs +1440 -56
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +21 -3
  33. package/dist/index.d.ts +21 -3
  34. package/dist/index.js +1434 -56
  35. package/dist/index.js.map +1 -1
  36. package/dist/journal-DRfJiheM.d.cts +28 -0
  37. package/dist/journal-NLYuqege.d.ts +28 -0
  38. package/dist/{journal-B_2JnBMF.d.ts → live-cards-bridge-Or7fdEJV.d.ts} +5 -32
  39. package/dist/{journal-BJDjWb5Q.d.cts → live-cards-bridge-vGJ6tMzN.d.cts} +5 -32
  40. package/dist/schedule-CMcZe5Ny.d.ts +21 -0
  41. package/dist/schedule-CiucyCan.d.cts +21 -0
  42. package/examples/browser/boards/portfolio-tracker/cards/holdings-table.json +1 -1
  43. package/examples/browser/boards/portfolio-tracker/cards/portfolio-form.json +3 -3
  44. package/examples/browser/boards/portfolio-tracker/cards/portfolio-value.json +1 -1
  45. package/examples/browser/boards/portfolio-tracker/cards/price-fetch.json +3 -3
  46. package/examples/browser/boards/portfolio-tracker/portfolio-tracker-task-executor.cjs +96 -0
  47. package/examples/browser/boards/portfolio-tracker/portfolio-tracker.js +33 -5
  48. package/examples/browser/livecards-browser/index.html +37 -684
  49. package/examples/cli/step-machine-cli/portfolio-tracker/cards/holdings-table.json +1 -1
  50. package/examples/cli/step-machine-cli/portfolio-tracker/cards/portfolio-form.json +3 -3
  51. package/examples/cli/step-machine-cli/portfolio-tracker/cards/portfolio-value.json +1 -1
  52. package/examples/cli/step-machine-cli/portfolio-tracker/cards/price-fetch.json +3 -3
  53. package/examples/cli/step-machine-cli/portfolio-tracker/handlers/update-holdings-cli.js +2 -2
  54. package/examples/example-board/board.yaml +23 -0
  55. package/examples/example-board/bootstrap_payload.json +1 -0
  56. package/examples/example-board/cards/card-chain-region-alert.json +39 -0
  57. package/examples/example-board/cards/card-chain-region-totals.json +26 -0
  58. package/examples/example-board/cards/card-chain-top-region.json +24 -0
  59. package/examples/example-board/cards/card-ex-actions.json +32 -0
  60. package/examples/example-board/cards/card-ex-chart.json +30 -0
  61. package/examples/example-board/cards/card-ex-filter.json +36 -0
  62. package/examples/example-board/cards/card-ex-filtered-by-preference.json +59 -0
  63. package/examples/example-board/cards/card-ex-form.json +91 -0
  64. package/examples/example-board/cards/card-ex-list.json +22 -0
  65. package/examples/example-board/cards/card-ex-markdown.json +17 -0
  66. package/examples/example-board/cards/card-ex-metric.json +19 -0
  67. package/examples/example-board/cards/card-ex-narrative.json +36 -0
  68. package/examples/example-board/cards/card-ex-source-http.json +28 -0
  69. package/examples/example-board/cards/card-ex-source.json +21 -0
  70. package/examples/example-board/cards/card-ex-status.json +35 -0
  71. package/examples/example-board/cards/card-ex-table.json +30 -0
  72. package/examples/example-board/cards/card-ex-todo.json +29 -0
  73. package/examples/example-board/demo-chat-handler.js +69 -0
  74. package/examples/example-board/demo-server.js +87 -0
  75. package/examples/example-board/demo-shell-browser.html +806 -0
  76. package/examples/example-board/demo-shell-with-server.html +280 -0
  77. package/examples/example-board/demo-shell.html +62 -0
  78. package/examples/example-board/demo-task-executor.js +255 -0
  79. package/examples/example-board/mock.db +15 -0
  80. package/examples/example-board/reusable-board-runtime-client.js +265 -0
  81. package/examples/example-board/reusable-runtime-artifacts-adapter.js +233 -0
  82. package/examples/example-board/reusable-server-runtime.js +1284 -0
  83. package/examples/index.html +16 -9
  84. package/examples/npm-libs/continuous-event-graph/live-cards-board.ts +17 -17
  85. package/examples/npm-libs/continuous-event-graph/live-portfolio-dashboard.ts +23 -23
  86. package/examples/step-machine-cli/portfolio-tracker/cards/holdings-table.json +1 -1
  87. package/examples/step-machine-cli/portfolio-tracker/cards/portfolio-form.json +3 -3
  88. package/examples/step-machine-cli/portfolio-tracker/cards/portfolio-value.json +1 -1
  89. package/examples/step-machine-cli/portfolio-tracker/cards/price-fetch.json +1 -1
  90. package/examples/step-machine-cli/portfolio-tracker/portfolio-tracker-task-executor.cjs +96 -0
  91. package/package.json +16 -2
  92. package/schema/card-runtime.schema.json +25 -0
  93. package/schema/live-cards.schema.json +46 -21
  94. package/browser/ingest-board.js +0 -296
  95. package/examples/ingest.js +0 -733
@@ -1,23 +1,10 @@
1
1
  import { b as LiveGraphSnapshot, L as LiveGraph } from '../types-BzLD8bjb.cjs';
2
- import { J as Journal, a as LiveCard, R as ReactiveGraph } from '../journal-BJDjWb5Q.cjs';
2
+ import { a as LiveCard, R as ReactiveGraph } from '../live-cards-bridge-vGJ6tMzN.cjs';
3
3
  import { f as GraphEvent, T as TaskConfig } from '../types-CMFSIjpc.cjs';
4
+ import { J as Journal } from '../journal-DRfJiheM.cjs';
4
5
 
5
6
  /**
6
7
  * Board Live Cards — Disk persistence + CLI for ReactiveGraph.
7
- *
8
- * Library:
9
- * initBoard(dir) — create dir + board-graph.json (idempotent)
10
- * loadBoard(dir) — read board-graph.json → LiveGraph
11
- * saveBoard(dir, rg) — rg.snapshot() → write board-graph.json
12
- *
13
- * CLI:
14
- * board-live-cards init <dir>
15
- * board-live-cards status --rg <dir>
16
- * board-live-cards add-cards --rg <dir> --card <card.json>
17
- * board-live-cards run-sources-internal --card <card.json> --token <callbackToken> --rg <dir>
18
- *
19
- * Card transform:
20
- * liveCardToTaskConfig(card) — LiveCard → TaskConfig (handler mapping)
21
8
  */
22
9
 
23
10
  /** Envelope stored in board-graph.json — wraps the LiveGraph snapshot with journal pointer. */
@@ -43,9 +30,14 @@ interface CardInventoryEntry {
43
30
  cardFilePath: string;
44
31
  addedAt: string;
45
32
  }
33
+ interface CardInventoryIndex {
34
+ byCardId: Map<string, CardInventoryEntry>;
35
+ byCardPath: Map<string, CardInventoryEntry>;
36
+ }
46
37
  declare function readCardInventory(boardDir: string): CardInventoryEntry[];
47
38
  declare function lookupCardPath(boardDir: string, cardId: string): string | null;
48
39
  declare function appendCardInventory(boardDir: string, entry: CardInventoryEntry): void;
40
+ declare function buildCardInventoryIndex(boardDir: string): CardInventoryIndex;
49
41
  /**
50
42
  * Initialize a board directory.
51
43
  * - Dir doesn't exist → create it, write empty board-graph.json
@@ -210,4 +202,4 @@ interface BoardStatusObject {
210
202
  }
211
203
  declare function cli(argv: string[]): Promise<void>;
212
204
 
213
- export { type BoardEnvelope, BoardJournal, type BoardLiveCard, type BoardReactiveGraph, type BoardStatusCard, type BoardStatusObject, type CardInventoryEntry, type CardRuntimeState, type JournalEntry, type SourceRuntimeEntry, type SourceTokenPayload, appendCardInventory, appendEventToJournal, cli, createBoardReactiveGraph, decodeSourceToken, encodeSourceToken, getUndrainedEntries, initBoard, liveCardToTaskConfig, loadBoard, loadBoardEnvelope, lookupCardPath, processAccumulatedEvents, processAccumulatedEventsForced, processAccumulatedEventsInfinitePass, readCardInventory, saveBoard, withBoardLock };
205
+ export { type BoardEnvelope, BoardJournal, type BoardLiveCard, type BoardReactiveGraph, type BoardStatusCard, type BoardStatusObject, type CardInventoryEntry, type CardInventoryIndex, type CardRuntimeState, type JournalEntry, type SourceRuntimeEntry, type SourceTokenPayload, appendCardInventory, appendEventToJournal, buildCardInventoryIndex, cli, createBoardReactiveGraph, decodeSourceToken, encodeSourceToken, getUndrainedEntries, initBoard, liveCardToTaskConfig, loadBoard, loadBoardEnvelope, lookupCardPath, processAccumulatedEvents, processAccumulatedEventsForced, processAccumulatedEventsInfinitePass, readCardInventory, saveBoard, withBoardLock };
@@ -1,23 +1,10 @@
1
1
  import { b as LiveGraphSnapshot, L as LiveGraph } from '../types-C2eJ7DAV.js';
2
- import { J as Journal, a as LiveCard, R as ReactiveGraph } from '../journal-B_2JnBMF.js';
2
+ import { a as LiveCard, R as ReactiveGraph } from '../live-cards-bridge-Or7fdEJV.js';
3
3
  import { f as GraphEvent, T as TaskConfig } from '../types-CMFSIjpc.js';
4
+ import { J as Journal } from '../journal-NLYuqege.js';
4
5
 
5
6
  /**
6
7
  * Board Live Cards — Disk persistence + CLI for ReactiveGraph.
7
- *
8
- * Library:
9
- * initBoard(dir) — create dir + board-graph.json (idempotent)
10
- * loadBoard(dir) — read board-graph.json → LiveGraph
11
- * saveBoard(dir, rg) — rg.snapshot() → write board-graph.json
12
- *
13
- * CLI:
14
- * board-live-cards init <dir>
15
- * board-live-cards status --rg <dir>
16
- * board-live-cards add-cards --rg <dir> --card <card.json>
17
- * board-live-cards run-sources-internal --card <card.json> --token <callbackToken> --rg <dir>
18
- *
19
- * Card transform:
20
- * liveCardToTaskConfig(card) — LiveCard → TaskConfig (handler mapping)
21
8
  */
22
9
 
23
10
  /** Envelope stored in board-graph.json — wraps the LiveGraph snapshot with journal pointer. */
@@ -43,9 +30,14 @@ interface CardInventoryEntry {
43
30
  cardFilePath: string;
44
31
  addedAt: string;
45
32
  }
33
+ interface CardInventoryIndex {
34
+ byCardId: Map<string, CardInventoryEntry>;
35
+ byCardPath: Map<string, CardInventoryEntry>;
36
+ }
46
37
  declare function readCardInventory(boardDir: string): CardInventoryEntry[];
47
38
  declare function lookupCardPath(boardDir: string, cardId: string): string | null;
48
39
  declare function appendCardInventory(boardDir: string, entry: CardInventoryEntry): void;
40
+ declare function buildCardInventoryIndex(boardDir: string): CardInventoryIndex;
49
41
  /**
50
42
  * Initialize a board directory.
51
43
  * - Dir doesn't exist → create it, write empty board-graph.json
@@ -210,4 +202,4 @@ interface BoardStatusObject {
210
202
  }
211
203
  declare function cli(argv: string[]): Promise<void>;
212
204
 
213
- export { type BoardEnvelope, BoardJournal, type BoardLiveCard, type BoardReactiveGraph, type BoardStatusCard, type BoardStatusObject, type CardInventoryEntry, type CardRuntimeState, type JournalEntry, type SourceRuntimeEntry, type SourceTokenPayload, appendCardInventory, appendEventToJournal, cli, createBoardReactiveGraph, decodeSourceToken, encodeSourceToken, getUndrainedEntries, initBoard, liveCardToTaskConfig, loadBoard, loadBoardEnvelope, lookupCardPath, processAccumulatedEvents, processAccumulatedEventsForced, processAccumulatedEventsInfinitePass, readCardInventory, saveBoard, withBoardLock };
205
+ export { type BoardEnvelope, BoardJournal, type BoardLiveCard, type BoardReactiveGraph, type BoardStatusCard, type BoardStatusObject, type CardInventoryEntry, type CardInventoryIndex, type CardRuntimeState, type JournalEntry, type SourceRuntimeEntry, type SourceTokenPayload, appendCardInventory, appendEventToJournal, buildCardInventoryIndex, cli, createBoardReactiveGraph, decodeSourceToken, encodeSourceToken, getUndrainedEntries, initBoard, liveCardToTaskConfig, loadBoard, loadBoardEnvelope, lookupCardPath, processAccumulatedEvents, processAccumulatedEventsForced, processAccumulatedEventsInfinitePass, readCardInventory, saveBoard, withBoardLock };