yaml-flow 8.5.3 → 8.6.2

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 (176) hide show
  1. package/browser/asset-integrity.json +3 -3
  2. package/examples/board/demo-shell-with-server.html +2 -2
  3. package/examples/board/doc.html +2 -2
  4. package/examples/board/server/board-server.js +773 -13
  5. package/examples/board/server/board-worker/task-executor.js +166 -51
  6. package/examples/board/server/chat-flow/copilot-chat/assistant.js +25 -12
  7. package/examples/board/server/chat-flow/copilot-chat/probe.js +7 -0
  8. package/examples/board/server/chat-flow/copilot-chat/shared.js +97 -0
  9. package/examples/board/server/chat-flow/flow-steps.json +109 -51
  10. package/examples/board/server-config.json +2 -0
  11. package/examples/board/test/server-http-test.js +878 -67
  12. package/examples/board-local/demo-shell-localstorage.html +3 -3
  13. package/lib/{artifacts-store-lib-CVgtQrNZ.d.cts → artifacts-store-lib-BR-Samty.d.cts} +1 -1
  14. package/lib/{artifacts-store-lib-D-k-E8Vy.d.ts → artifacts-store-lib-DT7XlWUL.d.ts} +1 -1
  15. package/lib/artifacts-store-public.cjs +1 -1
  16. package/lib/artifacts-store-public.d.cts +3 -3
  17. package/lib/artifacts-store-public.d.ts +3 -3
  18. package/lib/artifacts-store-public.js +1 -1
  19. package/lib/batch/index.cjs +1 -1
  20. package/lib/batch/index.js +1 -1
  21. package/lib/board-live-cards-mcp.cjs +1 -1
  22. package/lib/board-live-cards-mcp.d.cts +87 -34
  23. package/lib/board-live-cards-mcp.d.ts +87 -34
  24. package/lib/board-live-cards-mcp.js +1 -1
  25. package/lib/board-live-cards-node.cjs +8 -16
  26. package/lib/board-live-cards-node.d.cts +52 -14
  27. package/lib/board-live-cards-node.d.ts +52 -14
  28. package/lib/board-live-cards-node.js +8 -16
  29. package/lib/{board-live-cards-public-BGS22cMb.d.ts → board-live-cards-public-BMUIPOrc.d.ts} +90 -30
  30. package/lib/board-live-cards-public-async-DKZqbJVU.d.ts +256 -0
  31. package/lib/board-live-cards-public-async-dMWNbWq6.d.cts +256 -0
  32. package/lib/{board-live-cards-public-B13InXhC.d.cts → board-live-cards-public-wkNmBIRC.d.cts} +90 -30
  33. package/lib/board-live-cards-public.cjs +1 -2
  34. package/lib/board-live-cards-public.d.cts +2 -2
  35. package/lib/board-live-cards-public.d.ts +2 -2
  36. package/lib/board-live-cards-public.js +1 -2
  37. package/lib/board-live-cards-server-runtime.cjs +1 -7
  38. package/lib/board-live-cards-server-runtime.d.cts +7 -6
  39. package/lib/board-live-cards-server-runtime.d.ts +7 -6
  40. package/lib/board-live-cards-server-runtime.js +1 -7
  41. package/lib/board-livegraph-runtime/index.cjs +1 -2
  42. package/lib/board-livegraph-runtime/index.js +1 -2
  43. package/lib/board-worker-adapter.cjs +22 -7
  44. package/lib/board-worker-adapter.d.cts +28 -3
  45. package/lib/board-worker-adapter.d.ts +28 -3
  46. package/lib/board-worker-adapter.js +22 -7
  47. package/lib/card-compute/index.cjs +1 -9
  48. package/lib/card-compute/index.js +1 -9
  49. package/lib/card-store-public.cjs +1 -1
  50. package/lib/card-store-public.d.cts +2 -2
  51. package/lib/card-store-public.d.ts +2 -2
  52. package/lib/card-store-public.js +1 -1
  53. package/lib/card-validation.cjs +1 -9
  54. package/lib/card-validation.js +1 -9
  55. package/lib/{chat-storage-lib-0imhRX3l.d.cts → chat-storage-lib-BIUbE-fM.d.cts} +1 -1
  56. package/lib/{chat-storage-lib-CJn7a6OH.d.ts → chat-storage-lib-BlG-sobS.d.ts} +1 -1
  57. package/lib/chat-store-public.cjs +1 -1
  58. package/lib/chat-store-public.d.cts +3 -3
  59. package/lib/chat-store-public.d.ts +3 -3
  60. package/lib/chat-store-public.js +1 -1
  61. package/lib/chunk-2MZUYY65.cjs +2 -0
  62. package/lib/chunk-5EA2ESS4.cjs +16 -0
  63. package/lib/chunk-76ON3V7R.js +2 -0
  64. package/lib/chunk-7BKNHFNH.js +2 -0
  65. package/lib/chunk-BQS3EIEK.js +3 -0
  66. package/lib/chunk-CIAJNUR4.js +2 -0
  67. package/lib/chunk-DAXACY63.js +2 -0
  68. package/lib/chunk-FW4363Y4.js +2 -0
  69. package/lib/chunk-FZ2SBU5M.js +3 -0
  70. package/lib/chunk-G4XXRHL2.cjs +3 -0
  71. package/lib/chunk-GJJMEAVN.cjs +2 -0
  72. package/lib/chunk-GNFE24S7.cjs +2 -0
  73. package/lib/chunk-GYQXDNNI.cjs +2 -0
  74. package/lib/chunk-H5HBXPOI.cjs +3 -0
  75. package/lib/chunk-H5KD3JPY.cjs +2 -0
  76. package/lib/chunk-HEEDJEKM.js +2 -0
  77. package/lib/chunk-HLJH7LGW.js +16 -0
  78. package/lib/chunk-IXZG74EW.cjs +2 -0
  79. package/lib/chunk-JAL25FGA.cjs +2 -0
  80. package/lib/chunk-JM5EKT57.js +2 -0
  81. package/lib/chunk-JMDHDY6M.js +2 -0
  82. package/lib/chunk-KBELAKIY.js +2 -0
  83. package/lib/chunk-KHJABJ45.cjs +3 -0
  84. package/lib/chunk-KLRUISRY.cjs +2 -0
  85. package/lib/chunk-KQX6R4PV.cjs +8 -0
  86. package/lib/chunk-LODXIALE.cjs +2 -0
  87. package/lib/chunk-MLVTJASJ.js +2 -0
  88. package/lib/chunk-MNEOJWPS.js +10 -0
  89. package/lib/chunk-N6P2JW4W.js +3 -0
  90. package/lib/chunk-NMZ6XNLB.cjs +3 -0
  91. package/lib/chunk-OEFTOO47.cjs +3 -0
  92. package/lib/chunk-OPNGCSXJ.js +2 -0
  93. package/lib/chunk-OSWJKJLB.js +8 -0
  94. package/lib/chunk-P7ZCDICS.cjs +2 -0
  95. package/lib/chunk-PBCDDO4V.cjs +2 -0
  96. package/lib/chunk-PMUSJQSR.cjs +2 -0
  97. package/lib/chunk-Q6H7NINN.cjs +5 -0
  98. package/lib/chunk-QWBNDVUA.js +5 -0
  99. package/lib/chunk-S6DRP2HX.cjs +2 -0
  100. package/lib/chunk-SCWHDI3I.js +2 -0
  101. package/lib/chunk-SFVO2LB2.cjs +3 -0
  102. package/lib/chunk-U2N6MCD5.cjs +2 -0
  103. package/lib/chunk-UJ7ZTV4J.cjs +10 -0
  104. package/lib/chunk-VGT3TRQG.js +3 -0
  105. package/lib/chunk-VLBB3D6B.js +3 -0
  106. package/lib/chunk-VMW4Z6EF.js +3 -0
  107. package/lib/chunk-WDPOGXTY.js +2 -0
  108. package/lib/chunk-WOALA3V5.cjs +2 -0
  109. package/lib/chunk-X3LC4LII.js +2 -0
  110. package/lib/chunk-XQRNDX4Q.js +2 -0
  111. package/lib/chunk-YGKDQLYP.js +2 -0
  112. package/lib/chunk-YMEIPKLW.cjs +2 -0
  113. package/lib/cloud-storage.cjs +2 -0
  114. package/lib/cloud-storage.d.cts +177 -0
  115. package/lib/cloud-storage.d.ts +177 -0
  116. package/lib/cloud-storage.js +2 -0
  117. package/lib/config/index.cjs +1 -1
  118. package/lib/config/index.js +1 -1
  119. package/lib/continuous-event-graph/index.cjs +1 -2
  120. package/lib/continuous-event-graph/index.js +1 -2
  121. package/lib/event-graph/index.cjs +1 -22
  122. package/lib/event-graph/index.js +1 -22
  123. package/lib/execution-refs.cjs +1 -2
  124. package/lib/execution-refs.d.cts +3 -2
  125. package/lib/execution-refs.d.ts +3 -2
  126. package/lib/execution-refs.js +1 -2
  127. package/lib/index.cjs +2 -24
  128. package/lib/index.d.cts +1 -1
  129. package/lib/index.d.ts +1 -1
  130. package/lib/index.js +2 -24
  131. package/lib/{types-CIgsh56O.d.cts → queue-lane-registry-BPKWWgd4.d.cts} +66 -14
  132. package/lib/{types-30R357js.d.ts → queue-lane-registry-Be6c0ftj.d.ts} +66 -14
  133. package/lib/server-runtime/index.cjs +1 -7
  134. package/lib/server-runtime/index.d.cts +18 -7
  135. package/lib/server-runtime/index.d.ts +18 -7
  136. package/lib/server-runtime/index.js +1 -7
  137. package/lib/step-machine/index.cjs +1 -11
  138. package/lib/step-machine/index.js +1 -11
  139. package/lib/step-machine-public/index.cjs +1 -4
  140. package/lib/step-machine-public/index.d.cts +1 -1
  141. package/lib/step-machine-public/index.d.ts +1 -1
  142. package/lib/step-machine-public/index.js +1 -4
  143. package/lib/{storage-interface-B2WD9D5n.d.cts → storage-interface-BFiD3kyB.d.cts} +38 -1
  144. package/lib/{storage-interface-B2WD9D5n.d.ts → storage-interface-BFiD3kyB.d.ts} +38 -1
  145. package/lib/stores/index.cjs +1 -2
  146. package/lib/stores/index.d.cts +1 -1
  147. package/lib/stores/index.d.ts +1 -1
  148. package/lib/stores/index.js +1 -2
  149. package/lib/stores/kv.cjs +1 -2
  150. package/lib/stores/kv.d.cts +1 -1
  151. package/lib/stores/kv.d.ts +1 -1
  152. package/lib/stores/kv.js +1 -2
  153. package/lib/stores/memory.cjs +1 -1
  154. package/lib/stores/memory.js +1 -1
  155. package/package.json +7 -16
  156. package/cli/board-live-cards-lib-COi4bSpk.d.ts +0 -322
  157. package/cli/browser-api/board-live-cards-browser-adapter.d.ts +0 -36
  158. package/cli/browser-api/board-live-cards-browser-adapter.js +0 -4
  159. package/cli/browser-api/card-store-browser-api.d.ts +0 -25
  160. package/cli/browser-api/card-store-browser-api.js +0 -2
  161. package/cli/browser-api/jsonata-sync.cjs +0 -7623
  162. package/cli/bundled/artifacts-store-cli.mjs +0 -12
  163. package/cli/bundled/batch-runner-cli.mjs +0 -3
  164. package/cli/bundled/board-live-cards-cli.mjs +0 -29
  165. package/cli/bundled/card-store-cli.mjs +0 -154
  166. package/cli/bundled/chat-store-cli.mjs +0 -16
  167. package/cli/bundled/jsonata-sync.cjs +0 -7623
  168. package/cli/bundled/step-machine-cli.mjs +0 -150
  169. package/cli/execution-interface-BCIhu1gO.d.ts +0 -442
  170. package/cli/types-H3EMBPY2.d.ts +0 -398
  171. package/examples/board/server/README-mcp-api.md +0 -690
  172. package/examples/board/test/server-http-mcp-test.js +0 -1280
  173. package/lib/board-livegraph-runtime/jsonata-sync.cjs +0 -7623
  174. package/lib/card-compute/jsonata-sync.cjs +0 -7623
  175. package/lib/continuous-event-graph/jsonata-sync.cjs +0 -7623
  176. package/lib/server-runtime/jsonata-sync.cjs +0 -7623
@@ -1,4 +1,4 @@
1
- import { K as KVStorage, B as BlobStorage, S as ScratchStorage, A as ArchiveFactory, b as AtomicRelayLock, a as KindValueRef } from './storage-interface-B2WD9D5n.js';
1
+ import { g as QueueStorage, K as KVStorage, B as BlobStorage, S as ScratchStorage, A as ArchiveFactory, h as AtomicRelayLock, a as KindValueRef } from './storage-interface-BFiD3kyB.js';
2
2
  import { ExecutionRef } from './execution-refs.js';
3
3
  import { f as GraphEvent, G as GraphConfig } from './types-BBhqYGhE.js';
4
4
 
@@ -71,6 +71,10 @@ interface JournalStorageAdapter {
71
71
  }
72
72
  declare const SNAPSHOT_SCHEMA_VERSION_V1 = "v1";
73
73
  declare const BOARD_GRAPH_KEY = "board/graph";
74
+ interface StateSnapshotReadView {
75
+ version: string | null;
76
+ values: Record<string, unknown>;
77
+ }
74
78
  type OutputStoreEvent = {
75
79
  kind: 'computed_values';
76
80
  cardId: string;
@@ -136,6 +140,52 @@ interface BoardStatusObject {
136
140
  }
137
141
  declare const EMPTY_CONFIG: GraphConfig;
138
142
 
143
+ interface BoardTaskCallback {
144
+ token: string;
145
+ via: ExecutionRef;
146
+ }
147
+ interface BoardCallbackTransport {
148
+ createCallback(token: string): BoardTaskCallback;
149
+ }
150
+ declare function createHttpBoardCallbackTransport(baseUrl: string): BoardCallbackTransport;
151
+ declare function createInProcessBoardCallbackTransport(handlerKey: string): BoardCallbackTransport;
152
+ declare function createLocalNodeBoardCallbackTransport(notifyChannel?: string): BoardCallbackTransport;
153
+
154
+ interface BoardWorkerRequest {
155
+ boardId?: string;
156
+ ref: ExecutionRef;
157
+ args: Record<string, unknown>;
158
+ }
159
+ interface BoardWorkerQueuedRequest {
160
+ messageId: string;
161
+ enqueuedAt: string;
162
+ attempt: number;
163
+ request: BoardWorkerRequest;
164
+ }
165
+ interface BoardWorkerLeasedRequest extends BoardWorkerQueuedRequest {
166
+ leaseToken: string;
167
+ leaseExpiresAt: string;
168
+ }
169
+ interface BoardWorkerDeadLetterRequest extends BoardWorkerQueuedRequest {
170
+ reason?: string;
171
+ }
172
+ interface BoardWorkerStore {
173
+ enqueueRequest(request: BoardWorkerRequest): string;
174
+ enqueueRequestIfAbsent?(request: BoardWorkerRequest, dedupKey: string): string | null;
175
+ leaseRequests(opts?: {
176
+ max?: number;
177
+ visibilityMs?: number;
178
+ }): BoardWorkerLeasedRequest[];
179
+ ackRequest(messageId: string, leaseToken: string): boolean;
180
+ nackRequest(messageId: string, leaseToken: string, opts?: {
181
+ dead?: boolean;
182
+ reason?: string;
183
+ }): boolean;
184
+ peekActive(): BoardWorkerQueuedRequest[];
185
+ peekDeadLetter(): BoardWorkerDeadLetterRequest[];
186
+ }
187
+ declare function createBoardWorkerStore(queue: QueueStorage): BoardWorkerStore;
188
+
139
189
  /**
140
190
  * board-live-cards-public.ts
141
191
  *
@@ -233,6 +283,22 @@ interface BoardPlatformAdapter {
233
283
  * One journal per board — no namespace parameter needed.
234
284
  */
235
285
  journalAdapter(): JournalStorageAdapter;
286
+ /**
287
+ * Semantic board-worker queue for hosted task execution.
288
+ * Implementations may back this with QueueStorage, Service Bus, Pub/Sub, etc.
289
+ */
290
+ boardWorkerStore(): BoardWorkerStore;
291
+ /**
292
+ * Semantic queue for chat-agent dispatch requests.
293
+ * Kept separate from task execution so chat work can be drained independently.
294
+ */
295
+ chatAgentStore(): BoardWorkerStore;
296
+ /**
297
+ * Queue of board wake-up requests for processAccumulatedEvents scheduling.
298
+ * Implementations should use enqueueIfAbsent when they want single-pending
299
+ * drain semantics.
300
+ */
301
+ processAccumulatedStore(): QueueStorage;
236
302
  /**
237
303
  * AtomicRelayLock — non-blocking try-acquire with relay-on-busy semantics.
238
304
  * Guards processAccumulatedEvents drain cycle.
@@ -242,17 +308,15 @@ interface BoardPlatformAdapter {
242
308
  */
243
309
  lock: AtomicRelayLock;
244
310
  /**
245
- * Self-identity ExecutionRef how to invoke THIS board instance.
246
- * Embedded in source callback tokens so executors know where to report back.
247
- * Node/FS: { howToRun: 'local-node', whatToRun: 'b64:<base64url({"kind":"yaml-flow-cli","value":"board-live-cards-cli.js"})>' }
248
- * Azure Fn: { howToRun: 'http:post', whatToRun: 'b64:<base64url({"kind":"http-url","value":"https://…/api/board"})>' }
311
+ * Adapter-owned callback transport used to build worker callback payloads.
312
+ * The board core treats callback delivery as a platform concern.
249
313
  */
250
- selfRef: ExecutionRef;
314
+ callbackTransport?: BoardCallbackTransport;
251
315
  /**
252
316
  * Generic execution dispatch — platform adapts ExecutionRef → actual transport.
253
317
  * Public layer constructs fully-formed semantic args (source def, base_ref,
254
318
  * callback token with selfRef baked in). Platform handles transport:
255
- * Node: writes args to temp file, spawns detached process
319
+ * Node host adapter: may write args to temp file and may spawn a detached process
256
320
  * Azure: HTTP POST args as JSON body
257
321
  * Firebase: publishes args as pubsub message
258
322
  */
@@ -260,6 +324,12 @@ interface BoardPlatformAdapter {
260
324
  dispatched: boolean;
261
325
  error?: string;
262
326
  }>;
327
+ /**
328
+ * Whether dispatchExecution can accept a board-owned staged source output ref
329
+ * for this executor. When false/absent, the adapter keeps its legacy staging
330
+ * protocol such as scratch in/out refs for local process launch.
331
+ */
332
+ supportsDirectSourceOutput?(ref: ExecutionRef): boolean;
263
333
  /**
264
334
  * Resolve a blob ref to its string contents.
265
335
  * The adapter handles the platform-specific lookup (e.g. absolute FS path vs board-relative key).
@@ -355,13 +425,13 @@ type BoardChangeNotification = OutputStoreEvent | {
355
425
  declare function createBoardLiveCardsPublic(baseRef: KindValueRef, adapter: BoardPlatformAdapter): BoardLiveCardsPublic;
356
426
  interface BoardNonCorePlatformAdapter extends BoardPlatformAdapter {
357
427
  /**
358
- * Synchronously invoke a task executor subcommand and return stdout.
359
- * Throws on non-zero exit or timeout.
428
+ * Invoke a task executor subcommand and return stdout.
429
+ * Throws on transport failure, non-zero exit, or timeout.
360
430
  */
361
- invokeExecutorSync(ref: ExecutionRef, subcommand: string, args: string[], opts?: {
431
+ invokeExecutor(ref: ExecutionRef, subcommand: string, opts?: {
362
432
  timeout?: number;
363
433
  input?: string;
364
- }): string;
434
+ }): Promise<string>;
365
435
  /** Schema-only card validator (no executor invocation). */
366
436
  validateSchema(card: Record<string, unknown>): {
367
437
  ok: boolean;
@@ -370,7 +440,7 @@ interface BoardNonCorePlatformAdapter extends BoardPlatformAdapter {
370
440
  /** Absolute-path blob I/O for resolving arbitrary KindValueRef blobs. */
371
441
  absoluteBlob: BlobStorage;
372
442
  /**
373
- * Default timeouts (ms) for synchronous executor invocations.
443
+ * Default timeouts (ms) for executor request/response calls.
374
444
  * Each field can also be overridden per-source via source_def.timeout.
375
445
  *
376
446
  * validationMs — validate-source-def, validate-card-preflight (structural, fast). Default: 10_000.
@@ -386,31 +456,21 @@ interface BoardNonCorePlatformAdapter extends BoardPlatformAdapter {
386
456
  };
387
457
  }
388
458
  interface BoardLiveCardsNonCorePublic {
389
- /** params: cardId? or all?; returns array even for single card */
390
- validateCard(input: CommandInput): CommandResult<Array<{
391
- cardId: string;
392
- isValid: boolean;
393
- issues: string[];
394
- }>>;
395
459
  /** body: { "card-content": <card> } — card JSON arrives via stdin; validates schema + JSONata + provides refs + source_defs (executor, if configured) */
396
- validateCardPreflight(input: CommandInput): CommandResult<{
460
+ validateCardPreflight(input: CommandInput): Promise<CommandResult<{
397
461
  cardId: string;
398
462
  isValid: boolean;
399
463
  issues: string[];
400
- }>;
401
- /** params: cardId, sourceIdx, outRef?; body — mockProjections object */
402
- probeSource(input: CommandInput): CommandResult;
403
- /** body: { sourceDef, mockProjections }; params: outRef? */
404
- probeTmpSource(input: CommandInput): CommandResult;
464
+ }>>;
405
465
  /** body: { "card-content": <card>, "mock-projections"?: {} }; params: sourceIdx, outRef? — card JSON arrives via stdin; no board state needed */
406
- probeSourcePreflight(input: CommandInput): CommandResult;
466
+ probeSourcePreflight(input: CommandInput): Promise<CommandResult>;
407
467
  /** body: { "card-content": <card>, "mock-projections"?: {} }; params: sourceIdx, outRef? — runs the real source fetch flow as a preflight */
408
- runSourcePreflight(input: CommandInput): CommandResult<{
468
+ runSourcePreflight(input: CommandInput): Promise<CommandResult<{
409
469
  bindTo: string;
410
470
  ok: boolean;
411
471
  result: unknown;
412
472
  issues: string[];
413
- }>;
473
+ }>>;
414
474
  /** body: { "card-content": <card>, "mock-fetched-sources"?: {}, "mock-requires"?: {} } — evaluates compute expressions with supplied data; no board state needed */
415
475
  evalCardCompute(input: CommandInput): CommandResult<{
416
476
  cardId: string;
@@ -422,9 +482,9 @@ interface BoardLiveCardsNonCorePublic {
422
482
  }>;
423
483
  }>;
424
484
  /** body: { "card-content": <card>, "mock-fetched-sources"?: {}, "mock-requires"?: {} } — full cycle: validate → resolve projections → probe sources → compute */
425
- simulateCardCycle(input: CommandInput): CommandResult;
485
+ simulateCardCycle(input: CommandInput): Promise<CommandResult>;
426
486
  /** no params needed */
427
- describeTaskExecutorCapabilities(input: CommandInput): CommandResult;
487
+ describeTaskExecutorCapabilities(input: CommandInput): Promise<CommandResult>;
428
488
  /**
429
489
  * Write/update cards in the configured card store.
430
490
  * body: { ops: Array<{ op: 'update', id: string, 'card-content': LiveCard }> }
@@ -443,4 +503,4 @@ interface BoardLiveCardsNonCorePublic {
443
503
  }
444
504
  declare function createBoardLiveCardsNonCorePublic(baseRef: KindValueRef, adapter: BoardNonCorePlatformAdapter): BoardLiveCardsNonCorePublic;
445
505
 
446
- export { type BoardChangeNotification as B, type CommandResult as C, EMPTY_CONFIG as E, type LiveCard as L, SNAPSHOT_SCHEMA_VERSION_V1 as S, type CommandInput as a, type CardAdminStore as b, type BoardLiveCardsPublic as c, type BoardNonCorePlatformAdapter as d, type BoardPlatformAdapter as e, BOARD_GRAPH_KEY as f, type BoardLiveCardsNonCorePublic as g, createBoardLiveCardsNonCorePublic as h, createBoardLiveCardsPublic as i, createCardStore as j };
506
+ export { type BoardWorkerRequest as B, type CommandResult as C, EMPTY_CONFIG as E, type LiveCard as L, type StateSnapshotReadView as S, type CommandInput as a, type CardAdminStore as b, type BoardChangeNotification as c, type BoardLiveCardsPublic as d, type BoardNonCorePlatformAdapter as e, type BoardPlatformAdapter as f, type BoardCallbackTransport as g, type BoardStatusObject as h, type CardChecksumIndex as i, type CardUpsertValidation as j, type CardIndex as k, type BoardWorkerStore as l, BOARD_GRAPH_KEY as m, type BoardLiveCardsNonCorePublic as n, type BoardWorkerDeadLetterRequest as o, type BoardWorkerLeasedRequest as p, type BoardWorkerQueuedRequest as q, SNAPSHOT_SCHEMA_VERSION_V1 as r, createBoardLiveCardsNonCorePublic as s, createBoardLiveCardsPublic as t, createBoardWorkerStore as u, createCardStore as v, createHttpBoardCallbackTransport as w, createInProcessBoardCallbackTransport as x, createLocalNodeBoardCallbackTransport as y };
@@ -0,0 +1,256 @@
1
+ import { b as BlobStat, a as KindValueRef, c as JournalEntry, d as JournalReadResult, Q as QueueMessage, e as QueueLeasedMessage, f as QueueDeadLetterMessage } from './storage-interface-BFiD3kyB.js';
2
+ import { g as BoardCallbackTransport, c as BoardChangeNotification, a as CommandInput, C as CommandResult, h as BoardStatusObject } from './board-live-cards-public-BMUIPOrc.js';
3
+ import { ExecutionRef } from './execution-refs.js';
4
+
5
+ interface AsyncBlobStorage {
6
+ read(key: string): Promise<string | null>;
7
+ write(key: string, content: string): Promise<void>;
8
+ exists(key: string): Promise<boolean>;
9
+ remove(key: string): Promise<void>;
10
+ readBytes?(key: string): Promise<Uint8Array | null>;
11
+ writeBytes?(key: string, content: Uint8Array): Promise<void>;
12
+ listKeys(prefix?: string): Promise<string[]>;
13
+ stat?(key: string): Promise<BlobStat | null>;
14
+ keyRef?(key: string): Promise<KindValueRef> | KindValueRef;
15
+ }
16
+ interface AsyncJournalStorage {
17
+ append(payload: unknown): Promise<JournalEntry>;
18
+ readAll(): Promise<JournalEntry[]>;
19
+ readAfter(cursor: string | null): Promise<JournalReadResult>;
20
+ clear?(): Promise<void>;
21
+ }
22
+ interface AsyncQueueStorage {
23
+ enqueue<T>(body: T): Promise<QueueMessage<T>>;
24
+ /** See QueueStorage.enqueueIfAbsent. Optional on adapters that cannot cheaply dedup. */
25
+ enqueueIfAbsent?<T>(body: T, dedupKey: string): Promise<QueueMessage<T> | null>;
26
+ lease<T>(opts?: {
27
+ max?: number;
28
+ visibilityMs?: number;
29
+ }): Promise<QueueLeasedMessage<T>[]>;
30
+ ack(messageId: string, leaseToken: string): Promise<boolean>;
31
+ nack(messageId: string, leaseToken: string, opts?: {
32
+ dead?: boolean;
33
+ reason?: string;
34
+ }): Promise<boolean>;
35
+ peekActive<T>(prefix?: string): Promise<QueueMessage<T>[]>;
36
+ peekDeadLetter<T>(prefix?: string): Promise<QueueDeadLetterMessage<T>[]>;
37
+ }
38
+ interface AsyncKVStorage {
39
+ read(key: string): Promise<unknown | null>;
40
+ write(key: string, value: unknown): Promise<void>;
41
+ delete(key: string): Promise<void>;
42
+ listKeys(prefix?: string): Promise<string[]>;
43
+ }
44
+ interface AsyncJSONStorage {
45
+ read(key: string): Promise<unknown | null>;
46
+ get(key: string, jsonPath: string): Promise<unknown | null>;
47
+ write(key: string, value: unknown): Promise<void>;
48
+ delete(key: string): Promise<void>;
49
+ listKeys(prefix?: string): Promise<string[]>;
50
+ shallowMerge(key: string, patch: Record<string, unknown>): Promise<void>;
51
+ deepMerge(key: string, patch: Record<string, unknown>): Promise<void>;
52
+ patch(key: string, jsonPath: string, value: unknown): Promise<void>;
53
+ }
54
+ interface AsyncScratchStorage extends AsyncBlobStorage {
55
+ getUniqueKey(prefix?: string, suffix?: string): Promise<string>;
56
+ create(data: string, prefix?: string, suffix?: string): Promise<string>;
57
+ keyRef(key: string): Promise<KindValueRef> | KindValueRef;
58
+ config: {
59
+ get(k: string): Promise<unknown> | unknown;
60
+ set(k: string, v: unknown): Promise<void> | void;
61
+ };
62
+ }
63
+ interface AsyncArchiveFactory {
64
+ stream(name: string): AsyncJournalStorage;
65
+ blob(name: string): AsyncBlobStorage;
66
+ listStreams(prefix?: string): Promise<string[]>;
67
+ listBlobs(prefix?: string): Promise<string[]>;
68
+ config: {
69
+ get(k: string): Promise<unknown> | unknown;
70
+ set(k: string, v: unknown): Promise<void> | void;
71
+ };
72
+ }
73
+ interface AsyncStorageProvider {
74
+ blob: AsyncBlobStorage;
75
+ journal: AsyncJournalStorage;
76
+ kv: AsyncKVStorage;
77
+ }
78
+ interface AsyncAtomicRelayLock {
79
+ tryAcquire(): Promise<(() => Promise<void> | void) | null>;
80
+ }
81
+ declare function withAsyncRelayLock(lock: AsyncAtomicRelayLock, work: () => Promise<void>, continuation?: () => Promise<void> | void): Promise<boolean>;
82
+
83
+ interface AsyncBoardWorkerRequest {
84
+ boardId?: string;
85
+ ref: ExecutionRef;
86
+ args: Record<string, unknown>;
87
+ }
88
+ interface AsyncBoardWorkerQueuedRequest {
89
+ messageId: string;
90
+ enqueuedAt: string;
91
+ attempt: number;
92
+ request: AsyncBoardWorkerRequest;
93
+ }
94
+ interface AsyncBoardWorkerLeasedRequest extends AsyncBoardWorkerQueuedRequest {
95
+ leaseToken: string;
96
+ leaseExpiresAt: string;
97
+ }
98
+ interface AsyncBoardWorkerDeadLetterRequest extends AsyncBoardWorkerQueuedRequest {
99
+ reason?: string;
100
+ }
101
+ interface AsyncBoardWorkerStore {
102
+ enqueueRequest(request: AsyncBoardWorkerRequest): Promise<string>;
103
+ leaseRequests(opts?: {
104
+ max?: number;
105
+ visibilityMs?: number;
106
+ }): Promise<AsyncBoardWorkerLeasedRequest[]>;
107
+ ackRequest(messageId: string, leaseToken: string): Promise<boolean>;
108
+ nackRequest(messageId: string, leaseToken: string, opts?: {
109
+ dead?: boolean;
110
+ reason?: string;
111
+ }): Promise<boolean>;
112
+ peekActive(): Promise<AsyncBoardWorkerQueuedRequest[]>;
113
+ peekDeadLetter(): Promise<AsyncBoardWorkerDeadLetterRequest[]>;
114
+ }
115
+ interface AsyncBoardConfigStore {
116
+ readTaskExecutorRef(): Promise<ExecutionRef | undefined>;
117
+ writeTaskExecutorRef(ref: ExecutionRef): Promise<void>;
118
+ readChatHandlerFlow(): Promise<unknown>;
119
+ writeChatHandlerFlow(flow: unknown): Promise<void>;
120
+ readCardStoreRef(): Promise<string | null>;
121
+ writeCardStoreRef(ref: string): Promise<void>;
122
+ readOutputsStoreRef(): Promise<string | null>;
123
+ writeOutputsStoreRef(ref: string): Promise<void>;
124
+ readScratchStoreRef(): Promise<string | null>;
125
+ writeScratchStoreRef(ref: string): Promise<void>;
126
+ readArchiveStoreRef(): Promise<string | null>;
127
+ writeArchiveStoreRef(ref: string): Promise<void>;
128
+ readChatStoreRef(): Promise<string | null>;
129
+ writeChatStoreRef(ref: string): Promise<void>;
130
+ readArtifactsStoreRef(): Promise<string | null>;
131
+ writeArtifactsStoreRef(ref: string): Promise<void>;
132
+ }
133
+ interface AsyncBoardPlatformAdapter {
134
+ kvStorage(namespace: string): AsyncKVStorage;
135
+ kvStorageForRef(ref: string): AsyncKVStorage;
136
+ blobStorage(namespace: string): AsyncBlobStorage;
137
+ scratchStorage(): AsyncScratchStorage;
138
+ scratchStorageForRef(ref: string): AsyncScratchStorage;
139
+ archiveFactory(): AsyncArchiveFactory;
140
+ archiveFactoryForRef(ref: string): AsyncArchiveFactory;
141
+ journalStorage(): AsyncJournalStorage;
142
+ boardWorkerStore(): AsyncBoardWorkerStore;
143
+ chatAgentStore(): AsyncBoardWorkerStore;
144
+ processAccumulatedStore(): AsyncQueueStorage;
145
+ lock: AsyncAtomicRelayLock;
146
+ callbackTransport?: BoardCallbackTransport;
147
+ dispatchExecution(ref: ExecutionRef, args: Record<string, unknown>): Promise<{
148
+ dispatched: boolean;
149
+ error?: string;
150
+ }>;
151
+ supportsDirectSourceOutput?(ref: ExecutionRef): boolean;
152
+ resolveBlob(ref: KindValueRef): Promise<string>;
153
+ hashFn(value: unknown): string;
154
+ genId(): string;
155
+ requestProcessAccumulated?(): void | Promise<void>;
156
+ publishBoardChangeNotifications?(notifications: BoardChangeNotification[]): void | Promise<void>;
157
+ warn?: (msg: string) => void;
158
+ }
159
+ interface HostedFetchResponseLike {
160
+ ok: boolean;
161
+ status: number;
162
+ text(): Promise<string>;
163
+ }
164
+ interface HostedFetchLike {
165
+ (input: string, init: {
166
+ method: string;
167
+ headers: Record<string, string>;
168
+ body: string;
169
+ }): Promise<HostedFetchResponseLike>;
170
+ }
171
+ interface HostedAsyncBoardPlatformAdapterOptions {
172
+ boardId?: string;
173
+ kvStorage(namespace: string): AsyncKVStorage;
174
+ kvStorageForRef(ref: string): AsyncKVStorage;
175
+ blobStorage(namespace: string): AsyncBlobStorage;
176
+ scratchStorage(): AsyncScratchStorage;
177
+ scratchStorageForRef(ref: string): AsyncScratchStorage;
178
+ archiveFactory(): AsyncArchiveFactory;
179
+ archiveFactoryForRef(ref: string): AsyncArchiveFactory;
180
+ journalStorage(): AsyncJournalStorage;
181
+ queueStorage?: AsyncQueueStorage;
182
+ boardWorkerStore?: AsyncBoardWorkerStore;
183
+ chatAgentQueueStorage?: AsyncQueueStorage;
184
+ chatAgentStore?: AsyncBoardWorkerStore;
185
+ processAccumulatedQueueStorage?: AsyncQueueStorage;
186
+ processAccumulatedStore?: AsyncQueueStorage;
187
+ lock: AsyncAtomicRelayLock;
188
+ callbackTransport?: BoardCallbackTransport;
189
+ fetch?: HostedFetchLike;
190
+ dispatchExecution?: (ref: ExecutionRef, args: Record<string, unknown>) => Promise<{
191
+ dispatched: boolean;
192
+ error?: string;
193
+ }>;
194
+ supportsDirectSourceOutput?: (ref: ExecutionRef) => boolean;
195
+ resolveBlob?: (ref: KindValueRef) => Promise<string>;
196
+ hashFn: (value: unknown) => string;
197
+ genId: () => string;
198
+ requestProcessAccumulated?: () => void | Promise<void>;
199
+ publishBoardChangeNotifications?: (notifications: BoardChangeNotification[]) => void | Promise<void>;
200
+ onWarn?: (msg: string) => void;
201
+ }
202
+ declare function createAsyncBoardWorkerStore(queue: AsyncQueueStorage): AsyncBoardWorkerStore;
203
+ declare function createAsyncBoardConfigStore(kv: AsyncKVStorage): AsyncBoardConfigStore;
204
+ declare function createHostedAsyncBoardPlatformAdapter(options: HostedAsyncBoardPlatformAdapterOptions): AsyncBoardPlatformAdapter;
205
+
206
+ interface AsyncBoardLiveCardsPublic {
207
+ init(input: CommandInput): Promise<CommandResult>;
208
+ status(input: CommandInput): Promise<CommandResult<BoardStatusObject>>;
209
+ getCardStoreRef(input: CommandInput): Promise<CommandResult<{
210
+ storeRef: string;
211
+ }>>;
212
+ getOutputsStoreRef(input: CommandInput): Promise<CommandResult<{
213
+ storeRef: string;
214
+ }>>;
215
+ getScratchStoreRef(input: CommandInput): Promise<CommandResult<{
216
+ storeRef: string | null;
217
+ }>>;
218
+ getArchiveStoreRef(input: CommandInput): Promise<CommandResult<{
219
+ storeRef: string | null;
220
+ }>>;
221
+ getChatStoreRef(input: CommandInput): Promise<CommandResult<{
222
+ storeRef: string | null;
223
+ }>>;
224
+ getArtifactsStoreRef(input: CommandInput): Promise<CommandResult<{
225
+ storeRef: string | null;
226
+ }>>;
227
+ getConfig(input: CommandInput): Promise<CommandResult<{
228
+ value: unknown;
229
+ }>>;
230
+ getOutputsDataObject(input: CommandInput): Promise<CommandResult>;
231
+ getAllOutputsDataObjects(input: CommandInput): Promise<CommandResult<Record<string, unknown>>>;
232
+ getOutputsComputedValues(input: CommandInput): Promise<CommandResult>;
233
+ getAllOutputsComputedValues(input: CommandInput): Promise<CommandResult<Record<string, unknown>>>;
234
+ getOutputsFetchedSources(input: CommandInput): Promise<CommandResult<Record<string, string>>>;
235
+ getAllOutputsFetchedSources(input: CommandInput): Promise<CommandResult<Record<string, Record<string, string>>>>;
236
+ addCardFiles(input: CommandInput): Promise<CommandResult<{
237
+ cardId: string;
238
+ files_added: Array<{
239
+ idx: number;
240
+ entry: unknown;
241
+ }>;
242
+ notified: true;
243
+ }>>;
244
+ cardRefreshedNotify(input: CommandInput): Promise<CommandResult>;
245
+ removeCard(input: CommandInput): Promise<CommandResult>;
246
+ retrigger(input: CommandInput): Promise<CommandResult>;
247
+ upsertCard(input: CommandInput): Promise<CommandResult>;
248
+ processAccumulatedEvents(input: CommandInput): Promise<CommandResult>;
249
+ taskFailed(input: CommandInput): Promise<CommandResult>;
250
+ taskProgress(input: CommandInput): Promise<CommandResult>;
251
+ sourceDataFetched(input: CommandInput): Promise<CommandResult>;
252
+ sourceDataFetchFailure(input: CommandInput): Promise<CommandResult>;
253
+ }
254
+ declare function createAsyncBoardLiveCardsPublic(baseRef: KindValueRef, adapter: AsyncBoardPlatformAdapter): AsyncBoardLiveCardsPublic;
255
+
256
+ export { type AsyncBoardLiveCardsPublic as A, type HostedAsyncBoardPlatformAdapterOptions as H, type AsyncBoardPlatformAdapter as a, type AsyncJSONStorage as b, type AsyncKVStorage as c, type AsyncBlobStorage as d, type AsyncJournalStorage as e, type AsyncStorageProvider as f, type AsyncAtomicRelayLock as g, type AsyncQueueStorage as h, type AsyncBoardConfigStore as i, type AsyncBoardWorkerDeadLetterRequest as j, type AsyncBoardWorkerLeasedRequest as k, type AsyncBoardWorkerQueuedRequest as l, type AsyncBoardWorkerRequest as m, type AsyncBoardWorkerStore as n, type HostedFetchLike as o, type HostedFetchResponseLike as p, createAsyncBoardConfigStore as q, createAsyncBoardLiveCardsPublic as r, createAsyncBoardWorkerStore as s, createHostedAsyncBoardPlatformAdapter as t, withAsyncRelayLock as w };