@casys/mcp-server 0.21.1 → 0.23.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.
@@ -0,0 +1,558 @@
1
+ /**
2
+ * Subscription registry for subscriptions/listen (spec 2026-07-28, SEP-2575).
3
+ *
4
+ * Owns the lifecycle of long-lived notification streams opened by the client
5
+ * via subscriptions/listen. Handles filter intersection, fan-out, keep-alive,
6
+ * and both client- and server-initiated teardown.
7
+ *
8
+ * Everything here is pure-function-first and testable without a real HTTP
9
+ * server. The SubscriptionSink interface is the seam: in production it wraps
10
+ * a ReadableStreamDefaultController; in tests it can be an in-memory array.
11
+ *
12
+ * SSE format: spec 2026-07-28 drops resumable streams (Last-Event-ID is
13
+ * ignored, event IDs MUST NOT be emitted). Every event is just:
14
+ * data: {json}\n\n
15
+ * Keep-alive lines are SSE comment lines:
16
+ * :\n\n
17
+ *
18
+ * @module lib/server/subscriptions/subscription-registry
19
+ */
20
+
21
+ // ── Spec constants ────────────────────────────────────────────────────────────
22
+
23
+ /** _meta key identifying the subscription (spec 2026-07-28). */
24
+ const SUBSCRIPTION_ID_KEY = "io.modelcontextprotocol/subscriptionId";
25
+
26
+ /**
27
+ * _meta key carrying server identity in results (spec 2026-07-28, SHOULD).
28
+ * Duplicated from mcp-app.ts to keep this module self-contained and testable
29
+ * without importing from the app layer.
30
+ */
31
+ const SERVER_INFO_KEY = "io.modelcontextprotocol/serverInfo";
32
+
33
+ // ── Interfaces ────────────────────────────────────────────────────────────────
34
+
35
+ /**
36
+ * Notification filter from params.notifications of a subscriptions/listen
37
+ * request. All fields optional — an omitted field means "not subscribed".
38
+ */
39
+ export interface SubscriptionFilter {
40
+ readonly toolsListChanged?: boolean;
41
+ readonly promptsListChanged?: boolean;
42
+ readonly resourcesListChanged?: boolean;
43
+ /** URIs for which the client wants notifications/resources/updated events. */
44
+ readonly resourceSubscriptions?: readonly string[];
45
+ /**
46
+ * Task ids for which the client wants `notifications/tasks` (Tasks extension).
47
+ *
48
+ * Recognising this field is not optional even though *pushing* task updates is:
49
+ * a client that asks for task notifications without declaring the Tasks
50
+ * extension MUST be refused with the missing-capability error, and a filter that
51
+ * does not know the field cannot tell the difference between that and a client
52
+ * asking for nothing.
53
+ */
54
+ readonly taskIds?: readonly string[];
55
+ }
56
+
57
+ /**
58
+ * Injectable stream sink. In production wraps a ReadableStreamDefaultController.
59
+ * In tests, an in-memory collector.
60
+ *
61
+ * Implementations MUST silently swallow errors from writing to an already-
62
+ * closed controller — the ReadableStream cancel() callback fires before
63
+ * unregister(), so a race window exists on every HTTP client disconnect.
64
+ */
65
+ export interface SubscriptionSink {
66
+ enqueue(chunk: Uint8Array): void;
67
+ /** Idempotent: calling twice MUST NOT throw. */
68
+ close(): void;
69
+ /** True once close() has been called or the underlying stream errored. */
70
+ readonly isClosed: boolean;
71
+ }
72
+
73
+ // ── Pure functions ────────────────────────────────────────────────────────────
74
+
75
+ function isRecord(v: unknown): v is Record<string, unknown> {
76
+ return typeof v === "object" && v !== null && !Array.isArray(v);
77
+ }
78
+
79
+ /**
80
+ * Compute the subset of requestedFilter the server agrees to honour.
81
+ *
82
+ * Spec: "The notifications field in the acknowledgment reflects the subset
83
+ * the server agreed to honor. Notification types the server does not support
84
+ * are omitted."
85
+ *
86
+ * For boolean fields: include only when both the client requested (true) AND
87
+ * the server supports (true). For resourceSubscriptions: accept all requested
88
+ * URIs when the server mask has a non-empty or undefined resourceSubscriptions
89
+ * (undefined = "accept all"). A server that sets serverSupports.resourceSubscriptions
90
+ * to [] opts out of resource URI tracking entirely.
91
+ */
92
+ export function intersectFilter(
93
+ requested: SubscriptionFilter,
94
+ serverSupports: SubscriptionFilter,
95
+ ): SubscriptionFilter {
96
+ const result: Record<string, boolean | string[]> = {};
97
+
98
+ if (requested.toolsListChanged && serverSupports.toolsListChanged) {
99
+ result.toolsListChanged = true;
100
+ }
101
+ if (requested.promptsListChanged && serverSupports.promptsListChanged) {
102
+ result.promptsListChanged = true;
103
+ }
104
+ if (requested.resourcesListChanged && serverSupports.resourcesListChanged) {
105
+ result.resourcesListChanged = true;
106
+ }
107
+
108
+ if (
109
+ Array.isArray(requested.resourceSubscriptions) &&
110
+ requested.resourceSubscriptions.length > 0
111
+ ) {
112
+ // Server's resourceSubscriptions mask: undefined means "accept all",
113
+ // empty array means "refuse all", non-empty array means "accept only these".
114
+ const serverMask = serverSupports.resourceSubscriptions;
115
+ if (serverMask === undefined) {
116
+ // No server-side restriction — accept all requested URIs.
117
+ result.resourceSubscriptions = [...requested.resourceSubscriptions];
118
+ } else if (serverMask.length > 0) {
119
+ const allowed = new Set(serverMask);
120
+ const intersection = requested.resourceSubscriptions.filter((u) =>
121
+ allowed.has(u)
122
+ );
123
+ if (intersection.length > 0) result.resourceSubscriptions = intersection;
124
+ }
125
+ // serverMask === [] → no URI tracking, field omitted.
126
+ }
127
+
128
+ // taskIds mirrors resourceSubscriptions: same undefined/empty/non-empty mask
129
+ // semantics. Carried through so the acknowledgement tells the client which task
130
+ // ids the server actually agreed to track.
131
+ if (Array.isArray(requested.taskIds) && requested.taskIds.length > 0) {
132
+ const serverMask = serverSupports.taskIds;
133
+ if (serverMask === undefined) {
134
+ result.taskIds = [...requested.taskIds];
135
+ } else if (serverMask.length > 0) {
136
+ const allowed = new Set(serverMask);
137
+ const intersection = requested.taskIds.filter((tid) => allowed.has(tid));
138
+ if (intersection.length > 0) result.taskIds = intersection;
139
+ }
140
+ }
141
+
142
+ return result as SubscriptionFilter;
143
+ }
144
+
145
+ /**
146
+ * Build the notifications/subscriptions/acknowledged JSON-RPC notification.
147
+ *
148
+ * Spec (subscriptions page — Acknowledgment): MUST be the first message;
149
+ * MUST carry subscriptionId in _meta; MUST echo only the agreed filter.
150
+ */
151
+ export function buildAcknowledgedMessage(
152
+ subscriptionId: string | number,
153
+ agreedFilter: SubscriptionFilter,
154
+ ): Record<string, unknown> {
155
+ return {
156
+ jsonrpc: "2.0",
157
+ method: "notifications/subscriptions/acknowledged",
158
+ params: {
159
+ _meta: { [SUBSCRIPTION_ID_KEY]: subscriptionId },
160
+ notifications: agreedFilter,
161
+ },
162
+ };
163
+ }
164
+
165
+ /**
166
+ * Inject io.modelcontextprotocol/subscriptionId into a notification's _meta.
167
+ *
168
+ * Called on every outgoing notification before it is enqueued on the stream.
169
+ * Merges rather than replaces _meta so that other _meta fields are preserved.
170
+ * Merges rather than replaces params so non-_meta fields (e.g. uri) survive.
171
+ */
172
+ export function stampSubscriptionMeta(
173
+ message: Record<string, unknown>,
174
+ subscriptionId: string | number,
175
+ ): Record<string, unknown> {
176
+ const existingParams = isRecord(message["params"]) ? message["params"] : {};
177
+ const existingMeta = isRecord(existingParams["_meta"])
178
+ ? existingParams["_meta"]
179
+ : {};
180
+ return {
181
+ ...message,
182
+ params: {
183
+ ...existingParams,
184
+ _meta: {
185
+ ...existingMeta,
186
+ [SUBSCRIPTION_ID_KEY]: subscriptionId,
187
+ },
188
+ },
189
+ };
190
+ }
191
+
192
+ /**
193
+ * Build the graceful-close JSON-RPC response for the subscriptions/listen
194
+ * request.
195
+ *
196
+ * Spec (subscriptions page — Graceful Closure): server SHOULD respond to the
197
+ * original subscriptions/listen request with an empty result before closing
198
+ * the stream. The result carries resultType: "complete" and subscriptionId in
199
+ * _meta, identifying which subscription is closing.
200
+ *
201
+ * The id in the response is the JSON-RPC id of the original request, which
202
+ * is the same value as the subscriptionId.
203
+ */
204
+ export function buildGracefulCloseResult(
205
+ subscriptionId: string | number,
206
+ serverInfo: { readonly name: string; readonly version: string },
207
+ ): Record<string, unknown> {
208
+ return {
209
+ jsonrpc: "2.0",
210
+ id: subscriptionId,
211
+ result: {
212
+ resultType: "complete",
213
+ _meta: {
214
+ [SUBSCRIPTION_ID_KEY]: subscriptionId,
215
+ [SERVER_INFO_KEY]: serverInfo,
216
+ },
217
+ },
218
+ };
219
+ }
220
+
221
+ /**
222
+ * Build the notifications/cancelled notification the server MUST emit when it
223
+ * tears down a subscription on its own initiative.
224
+ *
225
+ * Spec (cancellation page — §2): "A server MUST send notifications/cancelled
226
+ * referencing a subscriptions/listen request ID when it tears down that
227
+ * subscription stream."
228
+ *
229
+ * On HTTP the sequence is: enqueue this, then enqueue the graceful-close
230
+ * result, then close the stream. On stdio it travels on the shared channel.
231
+ */
232
+ export function buildServerCancelledNotification(
233
+ subscriptionId: string | number,
234
+ ): Record<string, unknown> {
235
+ // Stamped like every other message on the stream. The rule is unconditional —
236
+ // "All notifications delivered on the stream carry
237
+ // io.modelcontextprotocol/subscriptionId in _meta" — and on stdio, where every
238
+ // subscription shares one channel, it is the only way a client can tell which
239
+ // subscription is being torn down.
240
+ return stampSubscriptionMeta({
241
+ jsonrpc: "2.0",
242
+ method: "notifications/cancelled",
243
+ params: {
244
+ requestId: subscriptionId,
245
+ },
246
+ }, subscriptionId);
247
+ }
248
+
249
+ /**
250
+ * Encode a JSON-RPC message as a single SSE event chunk.
251
+ *
252
+ * Format: "data: {json}\n\n" — NO "id:" line.
253
+ * Spec 2026-07-28 drops resumable streams: SSE event IDs MUST NOT be emitted
254
+ * (streamable-http page — Earlier Streamable HTTP Revisions: "Resumable SSE
255
+ * streams via Last-Event-ID are not supported").
256
+ */
257
+ export function encodeSSEEvent(message: Record<string, unknown>): Uint8Array {
258
+ return new TextEncoder().encode(`data: ${JSON.stringify(message)}\n\n`);
259
+ }
260
+
261
+ /**
262
+ * Emit a bare SSE comment line as a keep-alive heartbeat.
263
+ *
264
+ * Format: ":\n\n" — per the SSE spec any line beginning with ":" is a
265
+ * comment; clients MUST ignore it. Spec 2026-07-28 explicitly encourages
266
+ * servers to use these for long-lived streams to prevent intermediary timeouts.
267
+ */
268
+ export function encodeSSEKeepAlive(): Uint8Array {
269
+ return new TextEncoder().encode(":\n\n");
270
+ }
271
+
272
+ // ── Registry ──────────────────────────────────────────────────────────────────
273
+
274
+ export interface SubscriptionRegistryOptions {
275
+ /** Server identity echoed in graceful-close results. */
276
+ readonly serverInfo: { readonly name: string; readonly version: string };
277
+ /**
278
+ * Interval between keep-alive SSE comment lines. Default: 30_000 ms.
279
+ * "Periodically" per spec; 30 s is the de-facto SSE convention and avoids
280
+ * intermediate proxy idle timeouts (nginx default keepalive_timeout: 65 s).
281
+ */
282
+ readonly keepAliveIntervalMs?: number;
283
+ /**
284
+ * Server capability mask — which notification types this server can deliver.
285
+ *
286
+ * An **allowlist**: a supplied mask must name every type it wants delivered,
287
+ * because an omitted field means "not supported". This is deliberate — an
288
+ * operator narrowing delivery should not have a type they forgot to mention
289
+ * granted back to them.
290
+ *
291
+ * Omit the option entirely (the default) to support all four types. Supplying
292
+ * `{}` therefore supports none, which is a legal way to accept subscriptions
293
+ * while delivering nothing.
294
+ */
295
+ readonly serverSupports?: SubscriptionFilter;
296
+ }
297
+
298
+ interface SubscriptionEntry {
299
+ /** JSON-RPC id of the subscriptions/listen request — echoed in every message. */
300
+ readonly subscriptionId: string | number;
301
+ /** The agreed (intersected) filter for this subscription. */
302
+ readonly agreedFilter: SubscriptionFilter;
303
+ readonly sink: SubscriptionSink;
304
+ }
305
+
306
+ // Map notification-filter field names to their wire method names.
307
+ const TYPE_TO_METHOD: Readonly<
308
+ Record<
309
+ "toolsListChanged" | "promptsListChanged" | "resourcesListChanged",
310
+ string
311
+ >
312
+ > = {
313
+ toolsListChanged: "notifications/tools/list_changed",
314
+ promptsListChanged: "notifications/prompts/list_changed",
315
+ resourcesListChanged: "notifications/resources/list_changed",
316
+ };
317
+
318
+ /**
319
+ * Registry that owns live subscriptions and their fan-out.
320
+ *
321
+ * Keyed internally by a random UUID generated at register() time — NOT by the
322
+ * client-visible subscriptionId, because two concurrent HTTP connections MAY
323
+ * legitimately use the same JSON-RPC id value (e.g., both send id: 1). The
324
+ * UUID is the opaque key returned to the caller for later unregister() calls.
325
+ *
326
+ * Thread-safety note: Deno is single-threaded, so concurrent access between
327
+ * the register/unregister path and the fan-out path is serialised by the event
328
+ * loop. No locking is needed, but async gaps (await) inside register/unregister
329
+ * must not be introduced.
330
+ */
331
+ export class SubscriptionRegistry {
332
+ private readonly entries = new Map<string, SubscriptionEntry>();
333
+ private readonly opts: Required<SubscriptionRegistryOptions>;
334
+ private keepAliveTimer: ReturnType<typeof setInterval> | null = null;
335
+
336
+ constructor(options: SubscriptionRegistryOptions) {
337
+ // Default: all four notification types supported.
338
+ const defaultSupports: SubscriptionFilter = {
339
+ toolsListChanged: true,
340
+ promptsListChanged: true,
341
+ resourcesListChanged: true,
342
+ resourceSubscriptions: undefined, // undefined = accept all URIs
343
+ taskIds: undefined, // undefined = accept all task ids
344
+ };
345
+ this.opts = {
346
+ serverInfo: options.serverInfo,
347
+ keepAliveIntervalMs: options.keepAliveIntervalMs ?? 30_000,
348
+ // Whole-object fallback, deliberately: a supplied mask is an ALLOWLIST, so
349
+ // an omitted field means "not supported". Merging per-field would instead
350
+ // make a partial mask grant everything it forgot to mention — the opposite
351
+ // of what an operator restricting delivery intends. Fail closed.
352
+ serverSupports: options.serverSupports ?? defaultSupports,
353
+ };
354
+ }
355
+
356
+ /**
357
+ * The subset of `requested` this server will actually honour.
358
+ *
359
+ * Exposed so a caller can build the acknowledgement from the same value the
360
+ * registry will enforce. Computing it independently on both sides is how a
361
+ * client ends up told it subscribed to something the registry then ignores.
362
+ */
363
+ computeAgreedFilter(requested: SubscriptionFilter): SubscriptionFilter {
364
+ return intersectFilter(requested, this.opts.serverSupports);
365
+ }
366
+
367
+ /**
368
+ * Register a new subscription.
369
+ *
370
+ * MUST be called AFTER the acknowledged message has been successfully
371
+ * enqueued on the sink. The spec requires the acknowledged message to be the
372
+ * FIRST message on the stream — registering before sending it would allow a
373
+ * concurrent fanOut to race ahead of the acknowledged message.
374
+ *
375
+ * @returns Opaque internal key — pass to unregister().
376
+ */
377
+ register(
378
+ subscriptionId: string | number,
379
+ requestedFilter: SubscriptionFilter,
380
+ sink: SubscriptionSink,
381
+ ): string {
382
+ const agreedFilter = intersectFilter(
383
+ requestedFilter,
384
+ this.opts.serverSupports,
385
+ );
386
+ const internalKey = crypto.randomUUID();
387
+ this.entries.set(internalKey, { subscriptionId, agreedFilter, sink });
388
+ return internalKey;
389
+ }
390
+
391
+ /**
392
+ * Remove a subscription by its internal key.
393
+ *
394
+ * Server-initiated teardown ("server"):
395
+ * 1. Enqueue notifications/cancelled (spec MUST, cancellation page §2).
396
+ * 2. Enqueue graceful-close result (spec SHOULD, subscriptions page).
397
+ * 3. Close the sink.
398
+ *
399
+ * Client-initiated (HTTP SSE cancel() callback, "client"):
400
+ * Remove the entry only. The client already closed the stream — enqueue
401
+ * attempts would silently fail or throw, and the spec says no further
402
+ * messages are required or expected when the client disconnects.
403
+ *
404
+ * No-op when the key is not found (race between shutdown and disconnect).
405
+ */
406
+ unregister(
407
+ internalKey: string,
408
+ initiator: "client" | "server" = "client",
409
+ ): void {
410
+ const entry = this.entries.get(internalKey);
411
+ if (!entry) return;
412
+ this.entries.delete(internalKey);
413
+
414
+ if (initiator === "server") {
415
+ // MUST send notifications/cancelled before the graceful-close result.
416
+ // (spec: cancellation page §2 — server MUST send this when tearing down
417
+ // a subscription on its own initiative.)
418
+ entry.sink.enqueue(
419
+ encodeSSEEvent(
420
+ buildServerCancelledNotification(entry.subscriptionId),
421
+ ),
422
+ );
423
+ // SHOULD send the empty graceful-close result (spec: subscriptions page
424
+ // — Graceful Closure). Lets the client distinguish a clean shutdown from
425
+ // an unexpected transport drop.
426
+ entry.sink.enqueue(
427
+ encodeSSEEvent(
428
+ buildGracefulCloseResult(entry.subscriptionId, this.opts.serverInfo),
429
+ ),
430
+ );
431
+ entry.sink.close();
432
+ }
433
+ // "client": entry removed above; nothing else to do.
434
+ }
435
+
436
+ /**
437
+ * Fan-out a list-changed notification to every subscription that opted in.
438
+ *
439
+ * Prunes sinks whose isClosed is true (client disconnected between the
440
+ * cancel() callback and the next fanOut call). A closed sink is removed from
441
+ * the map so it does not accumulate indefinitely.
442
+ *
443
+ * MUST NOT be called with request-scoped types (progress, message).
444
+ */
445
+ fanOut(
446
+ type: "toolsListChanged" | "promptsListChanged" | "resourcesListChanged",
447
+ ): void {
448
+ const method = TYPE_TO_METHOD[type];
449
+ for (const [key, entry] of this.entries) {
450
+ if (entry.sink.isClosed) {
451
+ // Dead entry — prune it now rather than waiting for unregister.
452
+ this.entries.delete(key);
453
+ continue;
454
+ }
455
+ if (!entry.agreedFilter[type]) continue;
456
+ const notification = stampSubscriptionMeta(
457
+ { jsonrpc: "2.0", method, params: {} },
458
+ entry.subscriptionId,
459
+ );
460
+ entry.sink.enqueue(encodeSSEEvent(notification));
461
+ }
462
+ }
463
+
464
+ /**
465
+ * Fan-out a notifications/resources/updated event to subscriptions whose
466
+ * agreed filter includes the given URI.
467
+ */
468
+ fanOutResourceUpdated(uri: string): void {
469
+ for (const [key, entry] of this.entries) {
470
+ if (entry.sink.isClosed) {
471
+ this.entries.delete(key);
472
+ continue;
473
+ }
474
+ const uris = entry.agreedFilter.resourceSubscriptions;
475
+ if (!Array.isArray(uris) || !uris.includes(uri)) continue;
476
+ const notification = stampSubscriptionMeta(
477
+ {
478
+ jsonrpc: "2.0",
479
+ method: "notifications/resources/updated",
480
+ params: { uri },
481
+ },
482
+ entry.subscriptionId,
483
+ );
484
+ entry.sink.enqueue(encodeSSEEvent(notification));
485
+ }
486
+ }
487
+
488
+ /**
489
+ * Gracefully shut down all live subscriptions (call from McpApp.stop()).
490
+ *
491
+ * Equivalent to unregister(key, "server") for every live entry, then
492
+ * stopping the keep-alive timer.
493
+ */
494
+ shutdown(): void {
495
+ // Snapshot keys to avoid mutation-while-iterating issues.
496
+ const keys = [...this.entries.keys()];
497
+ for (const key of keys) {
498
+ this.unregister(key, "server");
499
+ }
500
+ this.stopKeepAlive();
501
+ }
502
+
503
+ /** Count of live (not-yet-unregistered) subscriptions. */
504
+ get count(): number {
505
+ return this.entries.size;
506
+ }
507
+
508
+ /**
509
+ * Start the periodic keep-alive timer.
510
+ *
511
+ * Injectable setInterval and unref so tests can use fake timers and the
512
+ * timer does not prevent process exit. Calling again while a timer is
513
+ * already running is a no-op (guards against double-start in embedded mode
514
+ * where startHttp may be called via getFetchHandler).
515
+ */
516
+ startKeepAlive(
517
+ setIntervalFn: (
518
+ fn: () => void,
519
+ ms: number,
520
+ ) => ReturnType<typeof setInterval> = globalThis.setInterval,
521
+ unrefFn?: (id: ReturnType<typeof setInterval>) => void,
522
+ ): void {
523
+ if (this.keepAliveTimer !== null) return;
524
+ this.keepAliveTimer = setIntervalFn(
525
+ () => this._sendKeepAlive(),
526
+ this.opts.keepAliveIntervalMs,
527
+ );
528
+ if (unrefFn) unrefFn(this.keepAliveTimer);
529
+ }
530
+
531
+ /** Stop the keep-alive timer (called internally by shutdown()). */
532
+ stopKeepAlive(): void {
533
+ if (this.keepAliveTimer === null) return;
534
+ clearInterval(this.keepAliveTimer);
535
+ this.keepAliveTimer = null;
536
+ }
537
+
538
+ /**
539
+ * Emit a keep-alive comment line on every live sink.
540
+ *
541
+ * Spec (streamable-http page — Receiving Messages Note): "servers are
542
+ * encouraged to periodically emit an SSE comment line (a line beginning
543
+ * with a colon, e.g. `:\r\n`) as a keep-alive".
544
+ *
545
+ * Internal — called by the interval timer. Not private so tests can invoke
546
+ * it directly without fake timers.
547
+ */
548
+ _sendKeepAlive(): void {
549
+ const ping = encodeSSEKeepAlive();
550
+ for (const [key, entry] of this.entries) {
551
+ if (entry.sink.isClosed) {
552
+ this.entries.delete(key);
553
+ continue;
554
+ }
555
+ entry.sink.enqueue(ping);
556
+ }
557
+ }
558
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Public API for the Tasks extension (io.modelcontextprotocol/tasks, SEP-2663).
3
+ *
4
+ * Tool handlers use `createTask()` to opt into async-task mode.
5
+ * The transport layer uses `TaskStore` to manage task lifecycle.
6
+ * `isAsyncTaskDescriptor()` is the discriminant the framework uses at the
7
+ * tools/call boundary to decide whether to spawn a task or return a result.
8
+ *
9
+ * @module lib/server/tasks
10
+ */
11
+
12
+ export type {
13
+ AsyncTaskDescriptor,
14
+ CancelledTask,
15
+ CompletedTask,
16
+ CreateTaskOptions,
17
+ CreateTaskResultFields,
18
+ DetailedTask,
19
+ FailedTask,
20
+ InputRequest,
21
+ InputRequiredTask,
22
+ Task,
23
+ TaskController,
24
+ TaskStoreOptions,
25
+ WorkingTask,
26
+ } from "./task-store.js";
27
+
28
+ export {
29
+ createTask,
30
+ generateTaskId,
31
+ isAsyncTaskDescriptor,
32
+ TaskStore,
33
+ } from "./task-store.js";