yaml-flow 8.7.1 → 8.8.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/adapters/firebase-storage.js +2 -2
- package/browser/adapters/firestore-storage.js +2 -2
- package/browser/adapters/localstorage-storage.js +3 -3
- package/browser/asset-integrity.json +9 -13
- package/browser/server-runtime-controlface.js +5 -5
- package/examples/ARCHITECTURE.md +0 -27
- package/examples/board/server/board-server.js +150 -100
- package/examples/board/server/board-worker/source_def_flows.json +0 -8
- package/examples/board/server/board-worker/task-executor.js +1 -3
- package/examples/board/test/server-http-test.js +108 -73
- package/examples/board-firestore/server/worker.js +8 -0
- package/examples/portfolio-tracker/portfolio-tracker.js +11 -1
- package/examples/portfolio-tracker/test/portfolio-t4.js +12 -2
- package/lib/{artifacts-store-lib-D9nMkVcE.d.cts → artifacts-store-lib-C6qBpMfU.d.cts} +1 -1
- package/lib/{artifacts-store-lib-DSSMqVL2.d.ts → artifacts-store-lib-D4qf7Q-7.d.ts} +1 -1
- package/lib/artifacts-store-public.d.cts +3 -3
- package/lib/artifacts-store-public.d.ts +3 -3
- package/lib/board-live-cards-mcp.cjs +1 -1
- package/lib/board-live-cards-mcp.d.cts +6 -7
- package/lib/board-live-cards-mcp.d.ts +6 -7
- package/lib/board-live-cards-mcp.js +1 -1
- package/lib/board-live-cards-node.cjs +8 -8
- package/lib/board-live-cards-node.d.cts +15 -14
- package/lib/board-live-cards-node.d.ts +15 -14
- package/lib/board-live-cards-node.js +8 -8
- package/lib/{board-live-cards-public-LlVUQPL2.d.cts → board-live-cards-public-BT5HrgqZ.d.cts} +82 -59
- package/lib/{board-live-cards-public-JNRKfBZy.d.ts → board-live-cards-public-DSRamFm8.d.ts} +82 -59
- package/lib/{board-live-cards-public-async-Di9QB141.d.cts → board-live-cards-public-async-CYjr4mgX.d.cts} +18 -8
- package/lib/{board-live-cards-public-async-fwd1QI82.d.ts → board-live-cards-public-async-DlyC3PgC.d.ts} +18 -8
- package/lib/board-live-cards-public.cjs +1 -1
- package/lib/board-live-cards-public.d.cts +2 -2
- package/lib/board-live-cards-public.d.ts +2 -2
- package/lib/board-live-cards-public.js +1 -1
- package/lib/board-live-cards-server-runtime.cjs +1 -1
- package/lib/board-live-cards-server-runtime.d.cts +6 -8
- package/lib/board-live-cards-server-runtime.d.ts +6 -8
- package/lib/board-live-cards-server-runtime.js +1 -1
- package/lib/{board-platform-adapter-async-BfHmHdx2.d.cts → board-platform-adapter-async-BZIftm36.d.cts} +18 -14
- package/lib/{board-platform-adapter-async-DYahVzIK.d.ts → board-platform-adapter-async-JP9V-U5E.d.ts} +18 -14
- package/lib/board-worker-adapter.cjs +1 -24
- package/lib/board-worker-adapter.d.cts +68 -3
- package/lib/board-worker-adapter.d.ts +68 -3
- package/lib/board-worker-adapter.js +1 -24
- package/lib/card-store-public.d.cts +2 -2
- package/lib/card-store-public.d.ts +2 -2
- package/lib/chat-store-public.cjs +1 -1
- package/lib/chat-store-public.d.cts +20 -20
- package/lib/chat-store-public.d.ts +20 -20
- package/lib/chat-store-public.js +1 -1
- package/lib/chunk-2GSI6C45.js +7 -0
- package/lib/chunk-35N7ONTH.js +2 -0
- package/lib/chunk-37HDEW26.cjs +2 -0
- package/lib/{chunk-PMUSJQSR.cjs → chunk-3CZCGNY4.cjs} +2 -2
- package/lib/{chunk-BQS3EIEK.js → chunk-44L64VQ2.js} +3 -3
- package/lib/chunk-6OPXQPSC.js +2 -0
- package/lib/chunk-7BTZCOT5.js +2 -0
- package/lib/{chunk-U2N6MCD5.cjs → chunk-7JVHYHT2.cjs} +2 -2
- package/lib/chunk-7QZ267XP.cjs +2 -0
- package/lib/{chunk-XQRNDX4Q.js → chunk-ANKA7HEJ.js} +2 -2
- package/lib/{chunk-KAWQPLIE.cjs → chunk-BQUQTOPB.cjs} +2 -2
- package/lib/chunk-CMFD27ZC.cjs +3 -0
- package/lib/chunk-DOFNXJ4C.js +3 -0
- package/lib/chunk-ETW3BXHD.cjs +2 -0
- package/lib/{chunk-SGV7PU4H.js → chunk-FOFGEABN.js} +2 -2
- package/lib/chunk-GPCMBPLK.cjs +2 -0
- package/lib/chunk-GU3T75C4.js +3 -0
- package/lib/chunk-H3EHFCDZ.js +3 -0
- package/lib/chunk-H4TYOSMD.cjs +45 -0
- package/lib/chunk-HFW7E2Z7.cjs +4 -0
- package/lib/chunk-IQIZA7TN.cjs +7 -0
- package/lib/chunk-J4MHQ7JF.js +45 -0
- package/lib/chunk-MCPADH33.cjs +2 -0
- package/lib/chunk-NBJTYAYN.cjs +2 -0
- package/lib/chunk-NDAKMJQK.cjs +3 -0
- package/lib/chunk-NNSBBO5R.js +2 -0
- package/lib/chunk-NU5NO5NM.js +2 -0
- package/lib/chunk-O4RKTQBP.cjs +3 -0
- package/lib/chunk-O5UYCGIN.js +2 -0
- package/lib/chunk-Q3OTUDIE.js +2 -0
- package/lib/chunk-R44X3RQB.cjs +2 -0
- package/lib/chunk-RKKSVOP2.js +2 -0
- package/lib/chunk-UB54HZA4.cjs +2 -0
- package/lib/{chunk-CIAJNUR4.js → chunk-VGDLSS2H.js} +2 -2
- package/lib/{chunk-SFVO2LB2.cjs → chunk-VQCIOKJV.cjs} +3 -3
- package/lib/chunk-VS3BXEYK.js +4 -0
- package/lib/chunk-Y4WK7HE4.js +2 -0
- package/lib/chunk-ZK3E7L4Y.cjs +2 -0
- package/lib/cloud-storage.cjs +1 -1
- package/lib/cloud-storage.d.cts +6 -6
- package/lib/cloud-storage.d.ts +6 -6
- package/lib/cloud-storage.js +1 -1
- package/lib/execution-refs.cjs +1 -1
- package/lib/execution-refs.js +1 -1
- package/lib/firebase-storage/index.cjs +2 -2
- package/lib/firebase-storage/index.d.cts +2 -2
- package/lib/firebase-storage/index.d.ts +2 -2
- package/lib/firebase-storage/index.js +2 -2
- package/lib/firestore-storage/index.cjs +2 -2
- package/lib/firestore-storage/index.d.cts +12 -10
- package/lib/firestore-storage/index.d.ts +12 -10
- package/lib/firestore-storage/index.js +2 -2
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/localstorage-storage/index.cjs +1 -1
- package/lib/localstorage-storage/index.d.cts +10 -6
- package/lib/localstorage-storage/index.d.ts +10 -6
- package/lib/localstorage-storage/index.js +1 -1
- package/lib/{mcp-tool-registries-W3TRj6O5.d.cts → mcp-tool-registries-CRtea2x4.d.cts} +3 -0
- package/lib/{mcp-tool-registries-BBObLYga.d.ts → mcp-tool-registries-D3rWSppt.d.ts} +3 -0
- package/lib/server-jobs-queue-runner/index.cjs +1 -1
- package/lib/server-jobs-queue-runner/index.d.cts +12 -9
- package/lib/server-jobs-queue-runner/index.d.ts +12 -9
- package/lib/server-jobs-queue-runner/index.js +1 -1
- package/lib/server-runtime/index.cjs +1 -1
- package/lib/server-runtime/index.d.cts +7 -9
- package/lib/server-runtime/index.d.ts +7 -9
- package/lib/server-runtime/index.js +1 -1
- package/lib/server-runtime-agentface/index.d.cts +7 -9
- package/lib/server-runtime-agentface/index.d.ts +7 -9
- package/lib/server-runtime-controlface/index.cjs +1 -1
- package/lib/server-runtime-controlface/index.d.cts +8 -9
- package/lib/server-runtime-controlface/index.d.ts +8 -9
- package/lib/server-runtime-controlface/index.js +1 -1
- package/lib/server-runtime-core/index.cjs +1 -1
- package/lib/server-runtime-core/index.d.cts +59 -21
- package/lib/server-runtime-core/index.d.ts +59 -21
- package/lib/server-runtime-core/index.js +1 -1
- package/lib/server-runtime-watchers/index.cjs +1 -1
- package/lib/server-runtime-watchers/index.d.cts +9 -65
- package/lib/server-runtime-watchers/index.d.ts +9 -65
- package/lib/server-runtime-watchers/index.js +1 -1
- package/lib/server-runtime-webhooks/index.d.cts +7 -9
- package/lib/server-runtime-webhooks/index.d.ts +7 -9
- package/lib/sse-hub-CYXisfXJ.d.cts +63 -0
- package/lib/sse-hub-Dodwtc3_.d.ts +63 -0
- package/lib/step-machine-public/index.cjs +1 -1
- package/lib/step-machine-public/index.d.cts +1 -1
- package/lib/step-machine-public/index.d.ts +1 -1
- package/lib/step-machine-public/index.js +1 -1
- package/lib/{storage-async-interface-BRR4eBjx.d.cts → storage-async-interface-CG0bMqvE.d.ts} +20 -1
- package/lib/{storage-async-interface-DhlOVPSp.d.ts → storage-async-interface-CyO-zwVQ.d.cts} +20 -1
- package/lib/{storage-interface-BFiD3kyB.d.ts → storage-interface-D-iEiTJA.d.cts} +45 -1
- package/lib/{storage-interface-BFiD3kyB.d.cts → storage-interface-D-iEiTJA.d.ts} +45 -1
- package/lib/stores/index.d.cts +1 -1
- package/lib/stores/index.d.ts +1 -1
- package/lib/stores/kv.d.cts +1 -1
- package/lib/stores/kv.d.ts +1 -1
- package/lib/{types-SO5OZm4s.d.ts → types-BtH3scgE.d.ts} +64 -29
- package/lib/{types-Ba8H5_Wo.d.cts → types-Ch0u3FKP.d.cts} +64 -29
- package/package.json +4 -5
- package/browser/board-livecards-client.js +0 -2
- package/examples/board/demo-shell-with-server.html +0 -272
- package/examples/board/doc.html +0 -465
- package/examples/board/server-config.json +0 -24
- package/lib/chat-storage-lib-B9Q34Dyv.d.cts +0 -54
- package/lib/chat-storage-lib-DB9iSai2.d.ts +0 -54
- package/lib/chunk-5XHOHTLZ.cjs +0 -2
- package/lib/chunk-6APH25VI.js +0 -2
- package/lib/chunk-76C7N4YT.js +0 -3
- package/lib/chunk-76ON3V7R.js +0 -2
- package/lib/chunk-7ICPAABP.cjs +0 -7
- package/lib/chunk-ASR44K7H.cjs +0 -3
- package/lib/chunk-CPAXTVBQ.cjs +0 -2
- package/lib/chunk-EGRHWZRV.js +0 -2
- package/lib/chunk-EZENHAVZ.cjs +0 -2
- package/lib/chunk-GL2OHR2E.cjs +0 -2
- package/lib/chunk-GYQXDNNI.cjs +0 -2
- package/lib/chunk-IPLSRN6P.cjs +0 -4
- package/lib/chunk-J6EGN6S4.cjs +0 -3
- package/lib/chunk-JH37NJGP.js +0 -3
- package/lib/chunk-JJL5VOQZ.cjs +0 -3
- package/lib/chunk-NJJ7WEDT.cjs +0 -2
- package/lib/chunk-NKIQRCOM.cjs +0 -2
- package/lib/chunk-PBOQ4HYB.cjs +0 -2
- package/lib/chunk-PRKRXAVN.js +0 -3
- package/lib/chunk-QJVR3FWQ.js +0 -2
- package/lib/chunk-S44QZUDX.js +0 -2
- package/lib/chunk-TSN3RTXT.js +0 -4
- package/lib/chunk-VXJHBWK3.js +0 -2
- package/lib/chunk-WHDEBJLT.js +0 -7
- package/lib/chunk-YGALANRO.js +0 -2
- package/lib/chunk-ZCNN6XPV.js +0 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { d as BoardRuntimePlatformAdapter } from '../types-
|
|
2
|
-
export { A as Awaitable, B as BoardContextConfig, c as BoardRuntimeNonCorePublic, e as BoardRuntimePublic, C as ChatHandlerFlowRunner, D as DescribeEnvelope, H as HostedBoardQueueLaneTuning, I as InvocationAdapter, a as MultiBoardRuntime, M as MultiBoardRuntimeOptions, N as NotificationTransport, Q as QueueLaneRuntimeTuning, R as RuntimeLogger,
|
|
1
|
+
import { d as BoardRuntimePlatformAdapter } from '../types-Ch0u3FKP.cjs';
|
|
2
|
+
export { A as Awaitable, B as BoardContextConfig, c as BoardRuntimeNonCorePublic, e as BoardRuntimePublic, f as BoardWorkerRequest, C as ChatHandlerFlowRunner, D as DescribeEnvelope, H as HostedBoardQueueLaneTuning, I as InvocationAdapter, a as MultiBoardRuntime, M as MultiBoardRuntimeOptions, N as NotificationTransport, Q as QueueLaneRuntimeTuning, R as RuntimeLogger, g as RuntimeRequest, h as RuntimeResponse, b as SingleBoardRuntime, S as SingleBoardRuntimeOptions } from '../types-Ch0u3FKP.cjs';
|
|
3
3
|
export { HostedBoardQueueLaneRegistryOptions, createHostedBoardQueueLaneRegistry } from '../server-jobs-queue-runner/index.cjs';
|
|
4
|
-
export { M as McpControlplaneRegistryDeps, a as McpFacadeForRegistry, b as McpWebhookFacadeForRegistry, T as ToolRegistry, c as createMcpControlplaneToolRegistry, d as createMcpToolRegistry, e as createMcpWebhookToolRegistry } from '../mcp-tool-registries-
|
|
4
|
+
export { M as McpControlplaneRegistryDeps, a as McpFacadeForRegistry, b as McpWebhookFacadeForRegistry, T as ToolRegistry, c as createMcpControlplaneToolRegistry, d as createMcpToolRegistry, e as createMcpWebhookToolRegistry } from '../mcp-tool-registries-CRtea2x4.cjs';
|
|
5
5
|
import { createBoardLiveCardsMcp, BoardLiveCardsMcpBoardDeps, BoardLiveCardsMcpNonCoreDeps, BoardLiveCardsMcpCardStoreDeps, BoardLiveCardsMcp } from '../board-live-cards-mcp.cjs';
|
|
6
|
-
import { a as CommandResult } from '../board-live-cards-public-
|
|
7
|
-
export { B as BoardChangeNotification, c as BoardLiveCardsPublic, d as BoardNonCorePlatformAdapter, e as BoardPlatformAdapter, f as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { a as CommandResult } from '../board-live-cards-public-BT5HrgqZ.cjs';
|
|
7
|
+
export { B as BoardChangeNotification, c as BoardLiveCardsPublic, d as BoardNonCorePlatformAdapter, e as BoardPlatformAdapter, f as ChatStorage, C as CommandInput } from '../board-live-cards-public-BT5HrgqZ.cjs';
|
|
8
|
+
import { S as SseHub } from '../sse-hub-CYXisfXJ.cjs';
|
|
9
|
+
import { C as CardFileMetadataStore } from '../artifacts-store-lib-C6qBpMfU.cjs';
|
|
10
|
+
import { A as AsyncBoardPlatformAdapter } from '../board-platform-adapter-async-BZIftm36.cjs';
|
|
10
11
|
import { ExecutionRef } from '../execution-refs.cjs';
|
|
11
|
-
export { A as AsyncBoardLiveCardsPublic } from '../board-live-cards-public-async-
|
|
12
|
-
export { B as BlobStorage, K as KVStorage, a as KindValueRef } from '../storage-interface-
|
|
13
|
-
export { C as ChatStorage } from '../chat-storage-lib-B9Q34Dyv.cjs';
|
|
12
|
+
export { A as AsyncBoardLiveCardsPublic } from '../board-live-cards-public-async-CYjr4mgX.cjs';
|
|
13
|
+
export { B as BlobStorage, K as KVStorage, a as KindValueRef } from '../storage-interface-D-iEiTJA.cjs';
|
|
14
14
|
import '../queue-lane-registry-PaZuFpwp.cjs';
|
|
15
15
|
import '../chat-store-public.cjs';
|
|
16
16
|
import '../types-BBhqYGhE.cjs';
|
|
17
|
-
import '../storage-async-interface-
|
|
17
|
+
import '../storage-async-interface-CyO-zwVQ.cjs';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* server-runtime/notifications.ts
|
|
@@ -221,8 +221,8 @@ interface RuntimePayloadDeps {
|
|
|
221
221
|
/** Live reference to the runtime's board-contexts array (read on each call). */
|
|
222
222
|
boardContexts: ReadonlyArray<RuntimePayloadBoardContext>;
|
|
223
223
|
readCardDefinitions: () => Promise<Array<Record<string, unknown>>>;
|
|
224
|
-
readChatRecords: (cardId: string) => Array<Record<string, unknown
|
|
225
|
-
getChatProcessing: (cardId: string) => boolean
|
|
224
|
+
readChatRecords: (cardId: string) => Promise<Array<Record<string, unknown>>>;
|
|
225
|
+
getChatProcessing: (cardId: string) => Promise<boolean>;
|
|
226
226
|
}
|
|
227
227
|
interface RuntimePayloadModule {
|
|
228
228
|
readStatusSnapshot: () => Promise<unknown>;
|
|
@@ -247,17 +247,27 @@ declare function createRuntimePayloadModule(deps: RuntimePayloadDeps): RuntimePa
|
|
|
247
247
|
|
|
248
248
|
interface ControlplaneToolHandlersDeps {
|
|
249
249
|
boardId: string;
|
|
250
|
+
bootstrapBoard: () => Promise<void>;
|
|
251
|
+
sseHub: Pick<SseHub, 'has' | 'subscribeChat' | 'unsubscribeChat'>;
|
|
252
|
+
onChannelSubscribed?: (clientId: string, channelName: string, params: {
|
|
253
|
+
cardId?: string;
|
|
254
|
+
}) => void;
|
|
255
|
+
onChannelUnsubscribed?: (clientId: string, channelName: string, params: {
|
|
256
|
+
cardId?: string;
|
|
257
|
+
}) => void;
|
|
250
258
|
/** Returns the live MCP facade (chat processing getters/setters). */
|
|
251
259
|
getMcpFacade: () => {
|
|
252
260
|
setChatProcessing: (args: {
|
|
253
261
|
cardId: string;
|
|
254
262
|
active: boolean;
|
|
255
|
-
}) =>
|
|
263
|
+
}) => Promise<{
|
|
264
|
+
active: boolean;
|
|
265
|
+
}>;
|
|
256
266
|
getChatProcessing: (args: {
|
|
257
267
|
cardId: string;
|
|
258
|
-
}) => {
|
|
268
|
+
}) => Promise<{
|
|
259
269
|
active: boolean;
|
|
260
|
-
}
|
|
270
|
+
}>;
|
|
261
271
|
};
|
|
262
272
|
/** Returns the card-store facade used for meta reads/writes. */
|
|
263
273
|
getMcpCardStoreFacade: () => BoardLiveCardsMcpCardStoreDeps;
|
|
@@ -266,22 +276,50 @@ interface ControlplaneToolHandlers {
|
|
|
266
276
|
requireCardArgs: (args: Record<string, unknown>) => {
|
|
267
277
|
cardId: string;
|
|
268
278
|
};
|
|
269
|
-
|
|
279
|
+
subscribeChat: (args: Record<string, unknown>) => Promise<{
|
|
280
|
+
status: 'success';
|
|
281
|
+
data: {
|
|
282
|
+
boardId: string;
|
|
283
|
+
cardId: string;
|
|
284
|
+
clientId: string;
|
|
285
|
+
subscribed: boolean;
|
|
286
|
+
};
|
|
287
|
+
}>;
|
|
288
|
+
unsubscribeChat: (args: Record<string, unknown>) => Promise<{
|
|
289
|
+
status: 'success';
|
|
290
|
+
data: {
|
|
291
|
+
boardId: string;
|
|
292
|
+
cardId: string;
|
|
293
|
+
clientId: string;
|
|
294
|
+
subscribed: boolean;
|
|
295
|
+
};
|
|
296
|
+
}>;
|
|
297
|
+
watchChannel: (args: Record<string, unknown>, subscribed: boolean) => Promise<{
|
|
298
|
+
status: 'success';
|
|
299
|
+
data: {
|
|
300
|
+
boardId: string;
|
|
301
|
+
clientId: string;
|
|
302
|
+
channelName: string;
|
|
303
|
+
subscribed: boolean;
|
|
304
|
+
cardId?: string;
|
|
305
|
+
};
|
|
306
|
+
}>;
|
|
307
|
+
setChatProcessing: (args: Record<string, unknown>, active: boolean) => Promise<{
|
|
270
308
|
status: 'success';
|
|
271
309
|
data: {
|
|
272
310
|
boardId: string;
|
|
273
311
|
cardId: string;
|
|
274
312
|
active: boolean;
|
|
275
313
|
};
|
|
276
|
-
}
|
|
277
|
-
getChatProcessing: (args: Record<string, unknown>) => {
|
|
314
|
+
}>;
|
|
315
|
+
getChatProcessing: (args: Record<string, unknown>) => Promise<{
|
|
278
316
|
status: 'success';
|
|
279
317
|
data: {
|
|
280
318
|
boardId: string;
|
|
281
319
|
cardId: string;
|
|
282
320
|
active: boolean;
|
|
283
321
|
};
|
|
284
|
-
}
|
|
322
|
+
}>;
|
|
285
323
|
setCardMeta: (args: Record<string, unknown>) => Promise<{
|
|
286
324
|
status: 'success';
|
|
287
325
|
data: {
|
|
@@ -347,7 +385,7 @@ interface CardFileOpsDeps {
|
|
|
347
385
|
/** Apply a local-only update to a card; same shape as updateCardLocalOnly. */
|
|
348
386
|
updateCardLocalOnly: (cardId: string, updateFn: (card: Record<string, unknown>) => Record<string, unknown> | void) => Promise<void>;
|
|
349
387
|
/** Append a chat record (used for in-chat upload announcements). */
|
|
350
|
-
writeChatRecord: (cardId: string, role: string, text: string, files: unknown[], turnId: string) => unknown
|
|
388
|
+
writeChatRecord: (cardId: string, role: string, text: string, files: unknown[], turnId: string) => unknown | Promise<unknown>;
|
|
351
389
|
}
|
|
352
390
|
interface CardFileOps {
|
|
353
391
|
uploadCardFile: (cardId: string, requestedName: string, contentType: string, buffer: Uint8Array, opts?: {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { d as BoardRuntimePlatformAdapter } from '../types-
|
|
2
|
-
export { A as Awaitable, B as BoardContextConfig, c as BoardRuntimeNonCorePublic, e as BoardRuntimePublic, C as ChatHandlerFlowRunner, D as DescribeEnvelope, H as HostedBoardQueueLaneTuning, I as InvocationAdapter, a as MultiBoardRuntime, M as MultiBoardRuntimeOptions, N as NotificationTransport, Q as QueueLaneRuntimeTuning, R as RuntimeLogger,
|
|
1
|
+
import { d as BoardRuntimePlatformAdapter } from '../types-BtH3scgE.js';
|
|
2
|
+
export { A as Awaitable, B as BoardContextConfig, c as BoardRuntimeNonCorePublic, e as BoardRuntimePublic, f as BoardWorkerRequest, C as ChatHandlerFlowRunner, D as DescribeEnvelope, H as HostedBoardQueueLaneTuning, I as InvocationAdapter, a as MultiBoardRuntime, M as MultiBoardRuntimeOptions, N as NotificationTransport, Q as QueueLaneRuntimeTuning, R as RuntimeLogger, g as RuntimeRequest, h as RuntimeResponse, b as SingleBoardRuntime, S as SingleBoardRuntimeOptions } from '../types-BtH3scgE.js';
|
|
3
3
|
export { HostedBoardQueueLaneRegistryOptions, createHostedBoardQueueLaneRegistry } from '../server-jobs-queue-runner/index.js';
|
|
4
|
-
export { M as McpControlplaneRegistryDeps, a as McpFacadeForRegistry, b as McpWebhookFacadeForRegistry, T as ToolRegistry, c as createMcpControlplaneToolRegistry, d as createMcpToolRegistry, e as createMcpWebhookToolRegistry } from '../mcp-tool-registries-
|
|
4
|
+
export { M as McpControlplaneRegistryDeps, a as McpFacadeForRegistry, b as McpWebhookFacadeForRegistry, T as ToolRegistry, c as createMcpControlplaneToolRegistry, d as createMcpToolRegistry, e as createMcpWebhookToolRegistry } from '../mcp-tool-registries-D3rWSppt.js';
|
|
5
5
|
import { createBoardLiveCardsMcp, BoardLiveCardsMcpBoardDeps, BoardLiveCardsMcpNonCoreDeps, BoardLiveCardsMcpCardStoreDeps, BoardLiveCardsMcp } from '../board-live-cards-mcp.js';
|
|
6
|
-
import { a as CommandResult } from '../board-live-cards-public-
|
|
7
|
-
export { B as BoardChangeNotification, c as BoardLiveCardsPublic, d as BoardNonCorePlatformAdapter, e as BoardPlatformAdapter, f as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { a as CommandResult } from '../board-live-cards-public-DSRamFm8.js';
|
|
7
|
+
export { B as BoardChangeNotification, c as BoardLiveCardsPublic, d as BoardNonCorePlatformAdapter, e as BoardPlatformAdapter, f as ChatStorage, C as CommandInput } from '../board-live-cards-public-DSRamFm8.js';
|
|
8
|
+
import { S as SseHub } from '../sse-hub-Dodwtc3_.js';
|
|
9
|
+
import { C as CardFileMetadataStore } from '../artifacts-store-lib-D4qf7Q-7.js';
|
|
10
|
+
import { A as AsyncBoardPlatformAdapter } from '../board-platform-adapter-async-JP9V-U5E.js';
|
|
10
11
|
import { ExecutionRef } from '../execution-refs.js';
|
|
11
|
-
export { A as AsyncBoardLiveCardsPublic } from '../board-live-cards-public-async-
|
|
12
|
-
export { B as BlobStorage, K as KVStorage, a as KindValueRef } from '../storage-interface-
|
|
13
|
-
export { C as ChatStorage } from '../chat-storage-lib-DB9iSai2.js';
|
|
12
|
+
export { A as AsyncBoardLiveCardsPublic } from '../board-live-cards-public-async-DlyC3PgC.js';
|
|
13
|
+
export { B as BlobStorage, K as KVStorage, a as KindValueRef } from '../storage-interface-D-iEiTJA.js';
|
|
14
14
|
import '../queue-lane-registry-PaZuFpwp.js';
|
|
15
15
|
import '../chat-store-public.js';
|
|
16
16
|
import '../types-BBhqYGhE.js';
|
|
17
|
-
import '../storage-async-interface-
|
|
17
|
+
import '../storage-async-interface-CG0bMqvE.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* server-runtime/notifications.ts
|
|
@@ -221,8 +221,8 @@ interface RuntimePayloadDeps {
|
|
|
221
221
|
/** Live reference to the runtime's board-contexts array (read on each call). */
|
|
222
222
|
boardContexts: ReadonlyArray<RuntimePayloadBoardContext>;
|
|
223
223
|
readCardDefinitions: () => Promise<Array<Record<string, unknown>>>;
|
|
224
|
-
readChatRecords: (cardId: string) => Array<Record<string, unknown
|
|
225
|
-
getChatProcessing: (cardId: string) => boolean
|
|
224
|
+
readChatRecords: (cardId: string) => Promise<Array<Record<string, unknown>>>;
|
|
225
|
+
getChatProcessing: (cardId: string) => Promise<boolean>;
|
|
226
226
|
}
|
|
227
227
|
interface RuntimePayloadModule {
|
|
228
228
|
readStatusSnapshot: () => Promise<unknown>;
|
|
@@ -247,17 +247,27 @@ declare function createRuntimePayloadModule(deps: RuntimePayloadDeps): RuntimePa
|
|
|
247
247
|
|
|
248
248
|
interface ControlplaneToolHandlersDeps {
|
|
249
249
|
boardId: string;
|
|
250
|
+
bootstrapBoard: () => Promise<void>;
|
|
251
|
+
sseHub: Pick<SseHub, 'has' | 'subscribeChat' | 'unsubscribeChat'>;
|
|
252
|
+
onChannelSubscribed?: (clientId: string, channelName: string, params: {
|
|
253
|
+
cardId?: string;
|
|
254
|
+
}) => void;
|
|
255
|
+
onChannelUnsubscribed?: (clientId: string, channelName: string, params: {
|
|
256
|
+
cardId?: string;
|
|
257
|
+
}) => void;
|
|
250
258
|
/** Returns the live MCP facade (chat processing getters/setters). */
|
|
251
259
|
getMcpFacade: () => {
|
|
252
260
|
setChatProcessing: (args: {
|
|
253
261
|
cardId: string;
|
|
254
262
|
active: boolean;
|
|
255
|
-
}) =>
|
|
263
|
+
}) => Promise<{
|
|
264
|
+
active: boolean;
|
|
265
|
+
}>;
|
|
256
266
|
getChatProcessing: (args: {
|
|
257
267
|
cardId: string;
|
|
258
|
-
}) => {
|
|
268
|
+
}) => Promise<{
|
|
259
269
|
active: boolean;
|
|
260
|
-
}
|
|
270
|
+
}>;
|
|
261
271
|
};
|
|
262
272
|
/** Returns the card-store facade used for meta reads/writes. */
|
|
263
273
|
getMcpCardStoreFacade: () => BoardLiveCardsMcpCardStoreDeps;
|
|
@@ -266,22 +276,50 @@ interface ControlplaneToolHandlers {
|
|
|
266
276
|
requireCardArgs: (args: Record<string, unknown>) => {
|
|
267
277
|
cardId: string;
|
|
268
278
|
};
|
|
269
|
-
|
|
279
|
+
subscribeChat: (args: Record<string, unknown>) => Promise<{
|
|
280
|
+
status: 'success';
|
|
281
|
+
data: {
|
|
282
|
+
boardId: string;
|
|
283
|
+
cardId: string;
|
|
284
|
+
clientId: string;
|
|
285
|
+
subscribed: boolean;
|
|
286
|
+
};
|
|
287
|
+
}>;
|
|
288
|
+
unsubscribeChat: (args: Record<string, unknown>) => Promise<{
|
|
289
|
+
status: 'success';
|
|
290
|
+
data: {
|
|
291
|
+
boardId: string;
|
|
292
|
+
cardId: string;
|
|
293
|
+
clientId: string;
|
|
294
|
+
subscribed: boolean;
|
|
295
|
+
};
|
|
296
|
+
}>;
|
|
297
|
+
watchChannel: (args: Record<string, unknown>, subscribed: boolean) => Promise<{
|
|
298
|
+
status: 'success';
|
|
299
|
+
data: {
|
|
300
|
+
boardId: string;
|
|
301
|
+
clientId: string;
|
|
302
|
+
channelName: string;
|
|
303
|
+
subscribed: boolean;
|
|
304
|
+
cardId?: string;
|
|
305
|
+
};
|
|
306
|
+
}>;
|
|
307
|
+
setChatProcessing: (args: Record<string, unknown>, active: boolean) => Promise<{
|
|
270
308
|
status: 'success';
|
|
271
309
|
data: {
|
|
272
310
|
boardId: string;
|
|
273
311
|
cardId: string;
|
|
274
312
|
active: boolean;
|
|
275
313
|
};
|
|
276
|
-
}
|
|
277
|
-
getChatProcessing: (args: Record<string, unknown>) => {
|
|
314
|
+
}>;
|
|
315
|
+
getChatProcessing: (args: Record<string, unknown>) => Promise<{
|
|
278
316
|
status: 'success';
|
|
279
317
|
data: {
|
|
280
318
|
boardId: string;
|
|
281
319
|
cardId: string;
|
|
282
320
|
active: boolean;
|
|
283
321
|
};
|
|
284
|
-
}
|
|
322
|
+
}>;
|
|
285
323
|
setCardMeta: (args: Record<string, unknown>) => Promise<{
|
|
286
324
|
status: 'success';
|
|
287
325
|
data: {
|
|
@@ -347,7 +385,7 @@ interface CardFileOpsDeps {
|
|
|
347
385
|
/** Apply a local-only update to a card; same shape as updateCardLocalOnly. */
|
|
348
386
|
updateCardLocalOnly: (cardId: string, updateFn: (card: Record<string, unknown>) => Record<string, unknown> | void) => Promise<void>;
|
|
349
387
|
/** Append a chat record (used for in-chat upload announcements). */
|
|
350
|
-
writeChatRecord: (cardId: string, role: string, text: string, files: unknown[], turnId: string) => unknown
|
|
388
|
+
writeChatRecord: (cardId: string, role: string, text: string, files: unknown[], turnId: string) => unknown | Promise<unknown>;
|
|
351
389
|
}
|
|
352
390
|
interface CardFileOps {
|
|
353
391
|
uploadCardFile: (cardId: string, requestedName: string, contentType: string, buffer: Uint8Array, opts?: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{c as appendNotification,j as createCardFileOps,h as createControlplaneToolHandlers,m as createMcpControlplaneToolRegistry,n as createMcpFacadeModule,k as createMcpToolRegistry,l as createMcpWebhookToolRegistry,i as createRuntimePayloadModule,d as expectControlplaneSuccess,e as expectControlplaneSuccessAsync,f as getCardMetaKey,b as hasNonEmptyCardCountStatus,a as makeNotificationState,g as readCardMetaValue}from'../chunk-
|
|
1
|
+
export{c as appendNotification,j as createCardFileOps,h as createControlplaneToolHandlers,m as createMcpControlplaneToolRegistry,n as createMcpFacadeModule,k as createMcpToolRegistry,l as createMcpWebhookToolRegistry,i as createRuntimePayloadModule,d as expectControlplaneSuccess,e as expectControlplaneSuccessAsync,f as getCardMetaKey,b as hasNonEmptyCardCountStatus,a as makeNotificationState,g as readCardMetaValue}from'../chunk-NU5NO5NM.js';export{b as getMcpArgNumber,c as getMcpArgRecord,a as getMcpArgString,e as getRequiredMcpArgNumber,d as getRequiredMcpArgRecord,f as parseMcpUploadBytes}from'../chunk-O7NOHKVR.js';export{b as extractMcpFailureMessage,a as invokeMcpTool}from'../chunk-ZJ5M5COT.js';export{a as createHostedBoardQueueLaneRegistry}from'../chunk-6OPXQPSC.js';export{d as concatUint8Arrays,c as escapeRegExp,b as executionWhatToRunValue,a as isAsyncBoardPlatformAdapter}from'../chunk-FOFGEABN.js';import'../chunk-RKKSVOP2.js';import'../chunk-NNSBBO5R.js';import'../chunk-ANKA7HEJ.js';import'../chunk-44L64VQ2.js';import'../chunk-35N7ONTH.js';import'../chunk-JMDHDY6M.js';import'../chunk-3KC6LBOG.js';import'../chunk-MNEOJWPS.js';import'../chunk-FW4363Y4.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkIQIZA7TN_cjs=require('../chunk-IQIZA7TN.cjs');require('../chunk-BQUQTOPB.cjs'),require('../chunk-VQCIOKJV.cjs'),require('../chunk-GNFE24S7.cjs');Object.defineProperty(exports,"createRoutesWatchers",{enumerable:true,get:function(){return chunkIQIZA7TN_cjs.b}});Object.defineProperty(exports,"createSseHub",{enumerable:true,get:function(){return chunkIQIZA7TN_cjs.a}});//# sourceMappingURL=index.cjs.map
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,69 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import '../
|
|
5
|
-
import '../
|
|
1
|
+
import { h as RuntimeResponse, g as RuntimeRequest } from '../types-Ch0u3FKP.cjs';
|
|
2
|
+
import { S as SseHub } from '../sse-hub-CYXisfXJ.cjs';
|
|
3
|
+
export { a as SseHubDeps, c as createSseHub } from '../sse-hub-CYXisfXJ.cjs';
|
|
4
|
+
import '../board-live-cards-public-BT5HrgqZ.cjs';
|
|
5
|
+
import '../storage-interface-D-iEiTJA.cjs';
|
|
6
6
|
import '../execution-refs.cjs';
|
|
7
7
|
import '../types-BBhqYGhE.cjs';
|
|
8
|
-
import '../board-platform-adapter-async-
|
|
9
|
-
import '../storage-async-interface-
|
|
10
|
-
import '../board-live-cards-public-async-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* server-runtime/sse-hub.ts
|
|
14
|
-
*
|
|
15
|
-
* Owns the per-runtime SSE client registry, the chat-subscription scanner, and
|
|
16
|
-
* all broadcast helpers. The HTTP route handler for the SSE endpoint still
|
|
17
|
-
* lives in index.ts because it sequences SSE registration with runtime
|
|
18
|
-
* bootstrap; this hub exposes the primitives it needs.
|
|
19
|
-
*
|
|
20
|
-
* State owned here:
|
|
21
|
-
* - sseClients (clientId -> { res, subscribedChatCardIds })
|
|
22
|
-
* - sseEventId monotonic counter
|
|
23
|
-
* - chat-subscription scan timer + per-card cursor/processing snapshots
|
|
24
|
-
*
|
|
25
|
-
* Dependencies passed in by the runtime:
|
|
26
|
-
* - chatStorage for tailing chat history
|
|
27
|
-
* - readChatRecords for building chat-scoped notifications
|
|
28
|
-
* - optional host hooks (onSseClientDisconnected, etc.)
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
interface SseClientState {
|
|
32
|
-
res: RuntimeResponse;
|
|
33
|
-
subscribedChatCardIds: Set<string>;
|
|
34
|
-
}
|
|
35
|
-
interface SseHub {
|
|
36
|
-
/** Number of currently-registered SSE clients. */
|
|
37
|
-
size(): number;
|
|
38
|
-
/** Whether a client id is currently registered. */
|
|
39
|
-
has(clientId: string): boolean;
|
|
40
|
-
/** Returns the existing client state if present (used to migrate chat subs on reconnect). */
|
|
41
|
-
get(clientId: string): SseClientState | undefined;
|
|
42
|
-
/** Build a wire-format SSE frame for the given payload. Increments the event id. */
|
|
43
|
-
buildFrame(payload: unknown): string;
|
|
44
|
-
/** Best-effort transport-level flush for the underlying response object. */
|
|
45
|
-
flushTransport(res: RuntimeResponse): void;
|
|
46
|
-
/** Register a fresh client. Any prior registration with the same id is disconnected first. */
|
|
47
|
-
register(clientId: string, res: RuntimeResponse, subscribedChatCardIds?: Set<string>): void;
|
|
48
|
-
/** Drop a registered client. If expectedRes is supplied and does not match, no-op. */
|
|
49
|
-
disconnect(clientId: string, expectedRes?: RuntimeResponse): void;
|
|
50
|
-
/** Write an SSE frame to one client; transport errors disconnect that client. */
|
|
51
|
-
writeFrame(clientId: string, payload: unknown): void;
|
|
52
|
-
/** Subscribe a client to a card's chat stream and prime its cursor. */
|
|
53
|
-
subscribeChat(clientId: string, cardId: string): boolean;
|
|
54
|
-
/** Unsubscribe a client from a card's chat stream. */
|
|
55
|
-
unsubscribeChat(clientId: string, cardId: string): boolean;
|
|
56
|
-
/** Broadcast a notification batch; chat-scoped notes are routed to chat-subscribed clients. */
|
|
57
|
-
broadcastNotificationBatch(notifications: unknown[]): void;
|
|
58
|
-
/** Push a fresh card-chats notification to every chat-subscribed client. */
|
|
59
|
-
broadcastCardChats(cardId: string, receiving?: boolean): void;
|
|
60
|
-
}
|
|
61
|
-
interface SseHubDeps {
|
|
62
|
-
chatStorage: ChatStorage;
|
|
63
|
-
readChatRecords: (cardId: string) => Array<Record<string, unknown>>;
|
|
64
|
-
onSseClientDisconnected?: (clientId: string) => void;
|
|
65
|
-
}
|
|
66
|
-
declare function createSseHub(deps: SseHubDeps): SseHub;
|
|
8
|
+
import '../board-platform-adapter-async-BZIftm36.cjs';
|
|
9
|
+
import '../storage-async-interface-CyO-zwVQ.cjs';
|
|
10
|
+
import '../board-live-cards-public-async-CYjr4mgX.cjs';
|
|
67
11
|
|
|
68
12
|
/**
|
|
69
13
|
* server-runtime/routes-sse.ts
|
|
@@ -124,4 +68,4 @@ interface RoutesWatchers {
|
|
|
124
68
|
}
|
|
125
69
|
declare function createRoutesWatchers(deps: RoutesWatchersDeps): RoutesWatchers;
|
|
126
70
|
|
|
127
|
-
export { type RoutesWatchers, type RoutesWatchersDeps,
|
|
71
|
+
export { type RoutesWatchers, type RoutesWatchersDeps, SseHub, createRoutesWatchers };
|
|
@@ -1,69 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import '../
|
|
5
|
-
import '../
|
|
1
|
+
import { h as RuntimeResponse, g as RuntimeRequest } from '../types-BtH3scgE.js';
|
|
2
|
+
import { S as SseHub } from '../sse-hub-Dodwtc3_.js';
|
|
3
|
+
export { a as SseHubDeps, c as createSseHub } from '../sse-hub-Dodwtc3_.js';
|
|
4
|
+
import '../board-live-cards-public-DSRamFm8.js';
|
|
5
|
+
import '../storage-interface-D-iEiTJA.js';
|
|
6
6
|
import '../execution-refs.js';
|
|
7
7
|
import '../types-BBhqYGhE.js';
|
|
8
|
-
import '../board-platform-adapter-async-
|
|
9
|
-
import '../storage-async-interface-
|
|
10
|
-
import '../board-live-cards-public-async-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* server-runtime/sse-hub.ts
|
|
14
|
-
*
|
|
15
|
-
* Owns the per-runtime SSE client registry, the chat-subscription scanner, and
|
|
16
|
-
* all broadcast helpers. The HTTP route handler for the SSE endpoint still
|
|
17
|
-
* lives in index.ts because it sequences SSE registration with runtime
|
|
18
|
-
* bootstrap; this hub exposes the primitives it needs.
|
|
19
|
-
*
|
|
20
|
-
* State owned here:
|
|
21
|
-
* - sseClients (clientId -> { res, subscribedChatCardIds })
|
|
22
|
-
* - sseEventId monotonic counter
|
|
23
|
-
* - chat-subscription scan timer + per-card cursor/processing snapshots
|
|
24
|
-
*
|
|
25
|
-
* Dependencies passed in by the runtime:
|
|
26
|
-
* - chatStorage for tailing chat history
|
|
27
|
-
* - readChatRecords for building chat-scoped notifications
|
|
28
|
-
* - optional host hooks (onSseClientDisconnected, etc.)
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
interface SseClientState {
|
|
32
|
-
res: RuntimeResponse;
|
|
33
|
-
subscribedChatCardIds: Set<string>;
|
|
34
|
-
}
|
|
35
|
-
interface SseHub {
|
|
36
|
-
/** Number of currently-registered SSE clients. */
|
|
37
|
-
size(): number;
|
|
38
|
-
/** Whether a client id is currently registered. */
|
|
39
|
-
has(clientId: string): boolean;
|
|
40
|
-
/** Returns the existing client state if present (used to migrate chat subs on reconnect). */
|
|
41
|
-
get(clientId: string): SseClientState | undefined;
|
|
42
|
-
/** Build a wire-format SSE frame for the given payload. Increments the event id. */
|
|
43
|
-
buildFrame(payload: unknown): string;
|
|
44
|
-
/** Best-effort transport-level flush for the underlying response object. */
|
|
45
|
-
flushTransport(res: RuntimeResponse): void;
|
|
46
|
-
/** Register a fresh client. Any prior registration with the same id is disconnected first. */
|
|
47
|
-
register(clientId: string, res: RuntimeResponse, subscribedChatCardIds?: Set<string>): void;
|
|
48
|
-
/** Drop a registered client. If expectedRes is supplied and does not match, no-op. */
|
|
49
|
-
disconnect(clientId: string, expectedRes?: RuntimeResponse): void;
|
|
50
|
-
/** Write an SSE frame to one client; transport errors disconnect that client. */
|
|
51
|
-
writeFrame(clientId: string, payload: unknown): void;
|
|
52
|
-
/** Subscribe a client to a card's chat stream and prime its cursor. */
|
|
53
|
-
subscribeChat(clientId: string, cardId: string): boolean;
|
|
54
|
-
/** Unsubscribe a client from a card's chat stream. */
|
|
55
|
-
unsubscribeChat(clientId: string, cardId: string): boolean;
|
|
56
|
-
/** Broadcast a notification batch; chat-scoped notes are routed to chat-subscribed clients. */
|
|
57
|
-
broadcastNotificationBatch(notifications: unknown[]): void;
|
|
58
|
-
/** Push a fresh card-chats notification to every chat-subscribed client. */
|
|
59
|
-
broadcastCardChats(cardId: string, receiving?: boolean): void;
|
|
60
|
-
}
|
|
61
|
-
interface SseHubDeps {
|
|
62
|
-
chatStorage: ChatStorage;
|
|
63
|
-
readChatRecords: (cardId: string) => Array<Record<string, unknown>>;
|
|
64
|
-
onSseClientDisconnected?: (clientId: string) => void;
|
|
65
|
-
}
|
|
66
|
-
declare function createSseHub(deps: SseHubDeps): SseHub;
|
|
8
|
+
import '../board-platform-adapter-async-JP9V-U5E.js';
|
|
9
|
+
import '../storage-async-interface-CG0bMqvE.js';
|
|
10
|
+
import '../board-live-cards-public-async-DlyC3PgC.js';
|
|
67
11
|
|
|
68
12
|
/**
|
|
69
13
|
* server-runtime/routes-sse.ts
|
|
@@ -124,4 +68,4 @@ interface RoutesWatchers {
|
|
|
124
68
|
}
|
|
125
69
|
declare function createRoutesWatchers(deps: RoutesWatchersDeps): RoutesWatchers;
|
|
126
70
|
|
|
127
|
-
export { type RoutesWatchers, type RoutesWatchersDeps,
|
|
71
|
+
export { type RoutesWatchers, type RoutesWatchersDeps, SseHub, createRoutesWatchers };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{b as createRoutesWatchers,a as createSseHub}from'../chunk-
|
|
1
|
+
export{b as createRoutesWatchers,a as createSseHub}from'../chunk-2GSI6C45.js';import'../chunk-FOFGEABN.js';import'../chunk-44L64VQ2.js';import'../chunk-FW4363Y4.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as ToolRegistry } from '../mcp-tool-registries-
|
|
3
|
-
import '../
|
|
4
|
-
import '../storage-interface-
|
|
5
|
-
import '../board-live-cards-public-LlVUQPL2.cjs';
|
|
1
|
+
import { g as RuntimeRequest, h as RuntimeResponse } from '../types-Ch0u3FKP.cjs';
|
|
2
|
+
import { T as ToolRegistry } from '../mcp-tool-registries-CRtea2x4.cjs';
|
|
3
|
+
import '../board-live-cards-public-BT5HrgqZ.cjs';
|
|
4
|
+
import '../storage-interface-D-iEiTJA.cjs';
|
|
6
5
|
import '../execution-refs.cjs';
|
|
7
6
|
import '../types-BBhqYGhE.cjs';
|
|
8
|
-
import '../board-platform-adapter-async-
|
|
9
|
-
import '../storage-async-interface-
|
|
10
|
-
import '../board-live-cards-public-async-
|
|
11
|
-
import '../chat-storage-lib-B9Q34Dyv.cjs';
|
|
7
|
+
import '../board-platform-adapter-async-BZIftm36.cjs';
|
|
8
|
+
import '../storage-async-interface-CyO-zwVQ.cjs';
|
|
9
|
+
import '../board-live-cards-public-async-CYjr4mgX.cjs';
|
|
12
10
|
import '../board-live-cards-mcp.cjs';
|
|
13
11
|
import '../chat-store-public.cjs';
|
|
14
12
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as ToolRegistry } from '../mcp-tool-registries-
|
|
3
|
-
import '../
|
|
4
|
-
import '../storage-interface-
|
|
5
|
-
import '../board-live-cards-public-JNRKfBZy.js';
|
|
1
|
+
import { g as RuntimeRequest, h as RuntimeResponse } from '../types-BtH3scgE.js';
|
|
2
|
+
import { T as ToolRegistry } from '../mcp-tool-registries-D3rWSppt.js';
|
|
3
|
+
import '../board-live-cards-public-DSRamFm8.js';
|
|
4
|
+
import '../storage-interface-D-iEiTJA.js';
|
|
6
5
|
import '../execution-refs.js';
|
|
7
6
|
import '../types-BBhqYGhE.js';
|
|
8
|
-
import '../board-platform-adapter-async-
|
|
9
|
-
import '../storage-async-interface-
|
|
10
|
-
import '../board-live-cards-public-async-
|
|
11
|
-
import '../chat-storage-lib-DB9iSai2.js';
|
|
7
|
+
import '../board-platform-adapter-async-JP9V-U5E.js';
|
|
8
|
+
import '../storage-async-interface-CG0bMqvE.js';
|
|
9
|
+
import '../board-live-cards-public-async-DlyC3PgC.js';
|
|
12
10
|
import '../board-live-cards-mcp.js';
|
|
13
11
|
import '../chat-store-public.js';
|
|
14
12
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { h as RuntimeResponse } from './types-Ch0u3FKP.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* server-runtime/sse-hub.ts
|
|
5
|
+
*
|
|
6
|
+
* Owns the per-runtime SSE client registry, the chat-subscription scanner, and
|
|
7
|
+
* all broadcast helpers. The HTTP route handler for the SSE endpoint still
|
|
8
|
+
* lives in index.ts because it sequences SSE registration with runtime
|
|
9
|
+
* bootstrap; this hub exposes the primitives it needs.
|
|
10
|
+
*
|
|
11
|
+
* State owned here:
|
|
12
|
+
* - sseClients (clientId -> { res, subscribedChatCardIds })
|
|
13
|
+
* - sseEventId monotonic counter
|
|
14
|
+
* - chat-subscription scan timer + per-card cursor/processing snapshots
|
|
15
|
+
*
|
|
16
|
+
* Dependencies passed in by the runtime:
|
|
17
|
+
* - chatStorage for tailing chat history
|
|
18
|
+
* - readChatRecords for building chat-scoped notifications
|
|
19
|
+
* - optional host hooks (onSseClientDisconnected, etc.)
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
interface SseClientState {
|
|
23
|
+
res: RuntimeResponse;
|
|
24
|
+
subscribedChatCardIds: Set<string>;
|
|
25
|
+
}
|
|
26
|
+
interface SseHub {
|
|
27
|
+
/** Number of currently-registered SSE clients. */
|
|
28
|
+
size(): number;
|
|
29
|
+
/** Whether a client id is currently registered. */
|
|
30
|
+
has(clientId: string): boolean;
|
|
31
|
+
/** Returns the existing client state if present (used to migrate chat subs on reconnect). */
|
|
32
|
+
get(clientId: string): SseClientState | undefined;
|
|
33
|
+
/** Build a wire-format SSE frame for the given payload. Increments the event id. */
|
|
34
|
+
buildFrame(payload: unknown): string;
|
|
35
|
+
/** Best-effort transport-level flush for the underlying response object. */
|
|
36
|
+
flushTransport(res: RuntimeResponse): void;
|
|
37
|
+
/** Register a fresh client. Any prior registration with the same id is disconnected first. */
|
|
38
|
+
register(clientId: string, res: RuntimeResponse, subscribedChatCardIds?: Set<string>): void;
|
|
39
|
+
/** Drop a registered client. If expectedRes is supplied and does not match, no-op. */
|
|
40
|
+
disconnect(clientId: string, expectedRes?: RuntimeResponse): void;
|
|
41
|
+
/** Write an SSE frame to one client; transport errors disconnect that client. */
|
|
42
|
+
writeFrame(clientId: string, payload: unknown): void;
|
|
43
|
+
/** Subscribe a client to a card's chat stream and prime its cursor. */
|
|
44
|
+
subscribeChat(clientId: string, cardId: string): Promise<boolean>;
|
|
45
|
+
/** Unsubscribe a client from a card's chat stream. */
|
|
46
|
+
unsubscribeChat(clientId: string, cardId: string): boolean;
|
|
47
|
+
/** Broadcast a notification batch; chat-scoped notes are routed to chat-subscribed clients. */
|
|
48
|
+
broadcastNotificationBatch(notifications: unknown[]): void;
|
|
49
|
+
/** Push a fresh card-chats notification to every chat-subscribed client. */
|
|
50
|
+
broadcastCardChats(cardId: string, receiving?: boolean): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
interface SseHubDeps {
|
|
53
|
+
readChatRecords: (cardId: string) => Promise<Array<Record<string, unknown>>>;
|
|
54
|
+
readChatAfter: (cardId: string, cursor: string | null) => Promise<{
|
|
55
|
+
records: Array<Record<string, unknown>>;
|
|
56
|
+
cursor: string | null;
|
|
57
|
+
}>;
|
|
58
|
+
getChatProcessing: (cardId: string) => Promise<boolean>;
|
|
59
|
+
onSseClientDisconnected?: (clientId: string) => void;
|
|
60
|
+
}
|
|
61
|
+
declare function createSseHub(deps: SseHubDeps): SseHub;
|
|
62
|
+
|
|
63
|
+
export { type SseHub as S, type SseHubDeps as a, createSseHub as c };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { h as RuntimeResponse } from './types-BtH3scgE.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* server-runtime/sse-hub.ts
|
|
5
|
+
*
|
|
6
|
+
* Owns the per-runtime SSE client registry, the chat-subscription scanner, and
|
|
7
|
+
* all broadcast helpers. The HTTP route handler for the SSE endpoint still
|
|
8
|
+
* lives in index.ts because it sequences SSE registration with runtime
|
|
9
|
+
* bootstrap; this hub exposes the primitives it needs.
|
|
10
|
+
*
|
|
11
|
+
* State owned here:
|
|
12
|
+
* - sseClients (clientId -> { res, subscribedChatCardIds })
|
|
13
|
+
* - sseEventId monotonic counter
|
|
14
|
+
* - chat-subscription scan timer + per-card cursor/processing snapshots
|
|
15
|
+
*
|
|
16
|
+
* Dependencies passed in by the runtime:
|
|
17
|
+
* - chatStorage for tailing chat history
|
|
18
|
+
* - readChatRecords for building chat-scoped notifications
|
|
19
|
+
* - optional host hooks (onSseClientDisconnected, etc.)
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
interface SseClientState {
|
|
23
|
+
res: RuntimeResponse;
|
|
24
|
+
subscribedChatCardIds: Set<string>;
|
|
25
|
+
}
|
|
26
|
+
interface SseHub {
|
|
27
|
+
/** Number of currently-registered SSE clients. */
|
|
28
|
+
size(): number;
|
|
29
|
+
/** Whether a client id is currently registered. */
|
|
30
|
+
has(clientId: string): boolean;
|
|
31
|
+
/** Returns the existing client state if present (used to migrate chat subs on reconnect). */
|
|
32
|
+
get(clientId: string): SseClientState | undefined;
|
|
33
|
+
/** Build a wire-format SSE frame for the given payload. Increments the event id. */
|
|
34
|
+
buildFrame(payload: unknown): string;
|
|
35
|
+
/** Best-effort transport-level flush for the underlying response object. */
|
|
36
|
+
flushTransport(res: RuntimeResponse): void;
|
|
37
|
+
/** Register a fresh client. Any prior registration with the same id is disconnected first. */
|
|
38
|
+
register(clientId: string, res: RuntimeResponse, subscribedChatCardIds?: Set<string>): void;
|
|
39
|
+
/** Drop a registered client. If expectedRes is supplied and does not match, no-op. */
|
|
40
|
+
disconnect(clientId: string, expectedRes?: RuntimeResponse): void;
|
|
41
|
+
/** Write an SSE frame to one client; transport errors disconnect that client. */
|
|
42
|
+
writeFrame(clientId: string, payload: unknown): void;
|
|
43
|
+
/** Subscribe a client to a card's chat stream and prime its cursor. */
|
|
44
|
+
subscribeChat(clientId: string, cardId: string): Promise<boolean>;
|
|
45
|
+
/** Unsubscribe a client from a card's chat stream. */
|
|
46
|
+
unsubscribeChat(clientId: string, cardId: string): boolean;
|
|
47
|
+
/** Broadcast a notification batch; chat-scoped notes are routed to chat-subscribed clients. */
|
|
48
|
+
broadcastNotificationBatch(notifications: unknown[]): void;
|
|
49
|
+
/** Push a fresh card-chats notification to every chat-subscribed client. */
|
|
50
|
+
broadcastCardChats(cardId: string, receiving?: boolean): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
interface SseHubDeps {
|
|
53
|
+
readChatRecords: (cardId: string) => Promise<Array<Record<string, unknown>>>;
|
|
54
|
+
readChatAfter: (cardId: string, cursor: string | null) => Promise<{
|
|
55
|
+
records: Array<Record<string, unknown>>;
|
|
56
|
+
cursor: string | null;
|
|
57
|
+
}>;
|
|
58
|
+
getChatProcessing: (cardId: string) => Promise<boolean>;
|
|
59
|
+
onSseClientDisconnected?: (clientId: string) => void;
|
|
60
|
+
}
|
|
61
|
+
declare function createSseHub(deps: SseHubDeps): SseHub;
|
|
62
|
+
|
|
63
|
+
export { type SseHub as S, type SseHubDeps as a, createSseHub as c };
|