yaml-flow 8.2.5 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/browser/asset-integrity.json +3 -3
  2. package/browser/board-livecards-client.js +1 -1
  3. package/browser/board-livecards-localstorage.js +4 -4
  4. package/browser/live-cards.js +19 -19
  5. package/cli/{board-live-cards-lib-Iq_XAC09.d.ts → board-live-cards-lib-tjYsPt5U.d.ts} +1 -1
  6. package/cli/browser-api/board-live-cards-browser-adapter.d.ts +3 -3
  7. package/cli/browser-api/card-store-browser-api.d.ts +1 -1
  8. package/cli/{execution-interface-ftO1W7Po.d.ts → execution-interface-CrG5gzAx.d.ts} +116 -2
  9. package/cli/node/batch-runner-cli.d.ts +3 -0
  10. package/cli/node/batch-runner-cli.js +2 -1
  11. package/cli/node/board-live-cards-cli.js +9 -9
  12. package/cli/node/chat-store-cli.d.ts +23 -0
  13. package/cli/node/chat-store-cli.js +8 -0
  14. package/cli/node/execution-adapter.d.ts +4 -2
  15. package/cli/node/execution-adapter.js +2 -2
  16. package/cli/node/fs-board-adapter.d.ts +7 -6
  17. package/cli/node/fs-board-adapter.js +8 -8
  18. package/cli/node/source-cli-task-executor.js +4 -4
  19. package/cli/node/step-machine-cli.js +3 -3
  20. package/cli/{types--rXGWbSR.d.ts → types-PUfPBxc_.d.ts} +4 -109
  21. package/examples/board/demo-shell-with-server.html +3 -196
  22. package/examples/board/doc.html +465 -0
  23. package/examples/board/server/board-server.js +20 -81
  24. package/examples/board/server/board-worker/source_def_flows.json +2 -2
  25. package/examples/board/server/chat-flow/copilot-chat/assistant.js +44 -185
  26. package/examples/board/server/chat-flow/copilot-chat/copilot_wrapper.bat +157 -0
  27. package/examples/board/server/chat-flow/copilot-chat/copilot_wrapper_helper.ps1 +190 -0
  28. package/examples/board/server/chat-flow/flow-steps.json +122 -56
  29. package/examples/board/test/server-http-test.js +252 -220
  30. package/examples/board-local/demo-shell-localstorage.html +3 -3
  31. package/lib/{artifacts-store-lib-public-C5UL5tyG.d.cts → artifacts-store-lib-public-Cz8-kdXG.d.cts} +1 -1
  32. package/lib/{artifacts-store-lib-public-GD4H-fFp.d.ts → artifacts-store-lib-public-ksGIExhc.d.ts} +1 -1
  33. package/lib/artifacts-store-public.d.cts +2 -2
  34. package/lib/artifacts-store-public.d.ts +2 -2
  35. package/lib/board-live-cards-node.cjs +8 -8
  36. package/lib/board-live-cards-node.d.cts +26 -6
  37. package/lib/board-live-cards-node.d.ts +26 -6
  38. package/lib/board-live-cards-node.js +8 -8
  39. package/lib/{board-live-cards-public-BLXbcBNk.d.cts → board-live-cards-public-BwZYGAsF.d.cts} +1 -1
  40. package/lib/{board-live-cards-public-BZaNb2mi.d.ts → board-live-cards-public-DWpZVDXN.d.ts} +1 -1
  41. package/lib/board-live-cards-public.d.cts +1 -1
  42. package/lib/board-live-cards-public.d.ts +1 -1
  43. package/lib/board-live-cards-server-runtime.cjs +3 -3
  44. package/lib/board-live-cards-server-runtime.d.cts +3 -2
  45. package/lib/board-live-cards-server-runtime.d.ts +3 -2
  46. package/lib/board-live-cards-server-runtime.js +3 -3
  47. package/lib/board-worker-adapter.cjs +2 -2
  48. package/lib/board-worker-adapter.js +2 -2
  49. package/lib/card-store-public.d.cts +1 -1
  50. package/lib/card-store-public.d.ts +1 -1
  51. package/lib/chat-storage-lib-BK5Njslc.d.ts +53 -0
  52. package/lib/chat-storage-lib-C5bQ7bGe.d.cts +53 -0
  53. package/lib/chat-store-public.cjs +2 -0
  54. package/lib/chat-store-public.d.cts +128 -0
  55. package/lib/chat-store-public.d.ts +128 -0
  56. package/lib/chat-store-public.js +2 -0
  57. package/lib/execution-refs.d.cts +10 -1
  58. package/lib/execution-refs.d.ts +10 -1
  59. package/lib/server-runtime/index.cjs +3 -3
  60. package/lib/server-runtime/index.d.cts +4 -3
  61. package/lib/server-runtime/index.d.ts +4 -3
  62. package/lib/server-runtime/index.js +3 -3
  63. package/lib/{types-Bztd1KoK.d.cts → types-D9B0Vrwg.d.cts} +4 -53
  64. package/lib/{types-D-xVWPdY.d.ts → types-DNYhCFNJ.d.ts} +4 -53
  65. package/package.json +8 -2
  66. package/examples/board/.board-ws/cards/store/_index.json +0 -17
  67. package/examples/board/.board-ws/cards/store/card-market-prices.json +0 -80
  68. package/examples/board/.board-ws/cards/store/card-portfolio-value.json +0 -90
  69. package/examples/board/.board-ws/cards/store/card-portfolio.json +0 -78
  70. package/examples/board/server/chat-flow/chat-clear-processing.js +0 -41
  71. package/examples/board/server/chat-flow/chat-open-turn.js +0 -144
  72. package/examples/board/server/chat-flow/chat-write-assistant.js +0 -44
  73. package/examples/board/server/chat-flow/echo-probe/assistant.js +0 -28
@@ -0,0 +1,53 @@
1
+ import { J as JournalStorage, K as KVStorage } from './storage-interface-B6ecOulj.cjs';
2
+
3
+ /**
4
+ * chat-storage-lib.ts
5
+ *
6
+ * ChatStorage interface + factories backed by JournalStorage (history) and
7
+ * KVStorage (processing state and config).
8
+ *
9
+ * Platform-free — no node:fs or node:crypto imports.
10
+ */
11
+
12
+ interface ChatRecord {
13
+ /** Journal entry id — also used as SSE cursor. */
14
+ id: string;
15
+ role: string;
16
+ text: string;
17
+ files: unknown[];
18
+ updated_at: string;
19
+ }
20
+ interface ChatConfig {
21
+ systemPrompt?: string;
22
+ }
23
+ interface ChatReadAfterResult {
24
+ records: ChatRecord[];
25
+ /** Pass as cursor on the next call. Null when the journal is empty. */
26
+ cursor: string | null;
27
+ }
28
+ interface ChatStorage {
29
+ /** Append a message; returns the new entry id (usable as a cursor). */
30
+ append(cardId: string, role: string, text: string, files?: unknown[]): string;
31
+ /** Read all messages in insertion order. */
32
+ readAll(cardId: string): ChatRecord[];
33
+ /**
34
+ * Read messages appended after cursor.
35
+ * Pass null to read from the beginning.
36
+ */
37
+ readAfter(cardId: string, cursor: string | null): ChatReadAfterResult;
38
+ /** Remove all messages for this card. */
39
+ clear(cardId: string): void;
40
+ setProcessing(cardId: string, active: boolean): void;
41
+ isProcessing(cardId: string): boolean;
42
+ getConfig(cardId: string): ChatConfig;
43
+ setConfig(cardId: string, patch: Partial<ChatConfig>): void;
44
+ }
45
+ /**
46
+ * Create a ChatStorage backed by:
47
+ * - journalFactory(cardId) → JournalStorage (one per-card journal for history)
48
+ * - kv → KVStorage (shared processing flags + config)
49
+ */
50
+ declare function createChatStorage(journalFactory: (cardId: string) => JournalStorage, kv: KVStorage): ChatStorage;
51
+ declare function createInMemoryChatStorage(): ChatStorage;
52
+
53
+ export { type ChatRecord as C, type ChatReadAfterResult as a, type ChatConfig as b, type ChatStorage as c, createChatStorage as d, createInMemoryChatStorage as e };
@@ -0,0 +1,2 @@
1
+ 'use strict';function f(d){function o(r){return {status:"success",data:r}}function a(r){return {status:"fail",error:r}}function m(r){return {status:"error",error:r instanceof Error?r.message:String(r)}}function i(r,t="command envelope"){let n=typeof r.cardId=="string"?r.cardId:void 0;if(!r.command)return a(`chat-store: ${t} missing "command"`);if(!n)return a(`chat-store: ${t} missing "cardId"`);if(r.command==="append")return s.append({params:{cardId:n},body:{role:r.role,text:r.text,files:r.files}});if(r.command==="read-all")return s.readAll({params:{cardId:n}});if(r.command==="read-after")return s.readAfter({params:{cardId:n},body:{cursor:r.cursor??null}});if(r.command==="clear")return s.clear({params:{cardId:n}});if(r.command==="set-processing")return s.setProcessing({params:{cardId:n},body:{active:r.active}});if(r.command==="is-processing")return s.isProcessing({params:{cardId:n}});if(r.command==="get-config")return s.getConfig({params:{cardId:n}});if(r.command==="set-config"){let{command:e,cardId:u,...c}=r;return s.setConfig({params:{cardId:n},body:c})}return a(`chat-store: unknown command "${String(r.command)}"`)}function C(r){if(!Array.isArray(r.commands)||r.commands.length===0)return a('chat-store: command envelope must include a non-empty "commands" array');let t=[];for(let n=0;n<r.commands.length;n+=1){let e=r.commands[n];if(!e||typeof e!="object"||Array.isArray(e))return a(`chat-store: command envelope entry ${n} must be an object`);let u={cardId:r.cardId,...e},c=i(u,`command envelope entry ${n}`);if(c.status!=="success")return c;t.push({index:n,command:String(u.command),data:c.data});}return o({results:t})}let s={append(r){try{let t=r.params?.cardId;if(!t)return a("append requires params.cardId");let n=r.body??{},e=typeof n.role=="string"?n.role:"",u=typeof n.text=="string"?n.text:"",c=Array.isArray(n.files)?n.files:[];if(!e)return a("append requires body.role");let l=d.append(t,e,u,c);return o({id:l})}catch(t){return m(t)}},readAll(r){try{let t=r.params?.cardId;return t?o({records:d.readAll(t)}):a("readAll requires params.cardId")}catch(t){return m(t)}},readAfter(r){try{let t=r.params?.cardId;if(!t)return a("readAfter requires params.cardId");let e=(r.body??{}).cursor??null;return o(d.readAfter(t,e))}catch(t){return m(t)}},clear(r){try{let t=r.params?.cardId;return t?(d.clear(t),o({ok:!0})):a("clear requires params.cardId")}catch(t){return m(t)}},setProcessing(r){try{let t=r.params?.cardId;if(!t)return a("setProcessing requires params.cardId");let n=r.body??{};return typeof n.active!="boolean"?a("setProcessing requires body.active (boolean)"):(d.setProcessing(t,n.active),o({ok:!0}))}catch(t){return m(t)}},isProcessing(r){try{let t=r.params?.cardId;return t?o({active:d.isProcessing(t)}):a("isProcessing requires params.cardId")}catch(t){return m(t)}},getConfig(r){try{let t=r.params?.cardId;return t?o({config:d.getConfig(t)}):a("getConfig requires params.cardId")}catch(t){return m(t)}},setConfig(r){try{let t=r.params?.cardId;if(!t)return a("setConfig requires params.cardId");let n=r.body??{};return d.setConfig(t,n),o({ok:!0})}catch(t){return m(t)}},run:i,runBatch:C};return s}exports.createChatStorePublic=f;//# sourceMappingURL=chat-store-public.cjs.map
2
+ //# sourceMappingURL=chat-store-public.cjs.map
@@ -0,0 +1,128 @@
1
+ import { C as CommandInput, a as CommandResult } from './board-live-cards-public-BwZYGAsF.cjs';
2
+ import { C as ChatRecord, a as ChatReadAfterResult, b as ChatConfig, c as ChatStorage } from './chat-storage-lib-C5bQ7bGe.cjs';
3
+ import './storage-interface-B6ecOulj.cjs';
4
+ import './execution-refs.cjs';
5
+ import './types-BBhqYGhE.cjs';
6
+
7
+ /**
8
+ * chat-store-lib-public.ts
9
+ *
10
+ * Platform-free public API for ChatStorage operations.
11
+ *
12
+ * Follows the same CommandInput / CommandResult convention as
13
+ * card-store-lib-public.ts and artifacts-store-lib-public.ts.
14
+ * No platform code here — inject a ChatStorage built from your platform adapter.
15
+ *
16
+ * Usage:
17
+ * import { createChatStorePublic } from './chat-store-lib-public.js';
18
+ * import { createFsBoardChatStorage } from '../node/fs-board-adapter.js';
19
+ *
20
+ * const store = createChatStorePublic(createFsBoardChatStorage(boardDir));
21
+ * const result = store.append({ params: { cardId: 'c1' }, body: { role: 'user', text: 'hello' } });
22
+ * const result = store.readAll({ params: { cardId: 'c1' } });
23
+ * const result = store.readAfter({ params: { cardId: 'c1', cursor: '<id>' } });
24
+ * const result = store.clear({ params: { cardId: 'c1' } });
25
+ * const result = store.setProcessing({ params: { cardId: 'c1' }, body: { active: true } });
26
+ * const result = store.isProcessing({ params: { cardId: 'c1' } });
27
+ * const result = store.getConfig({ params: { cardId: 'c1' } });
28
+ * const result = store.setConfig({ params: { cardId: 'c1' }, body: { systemPrompt: '...' } });
29
+ */
30
+
31
+ type ChatStoreCommandName = 'append' | 'read-all' | 'read-after' | 'clear' | 'set-processing' | 'is-processing' | 'get-config' | 'set-config';
32
+ type ChatStoreCommandEnvelope = {
33
+ command: ChatStoreCommandName;
34
+ cardId?: string;
35
+ role?: unknown;
36
+ text?: unknown;
37
+ files?: unknown;
38
+ cursor?: unknown;
39
+ active?: unknown;
40
+ [key: string]: unknown;
41
+ };
42
+ type ChatStoreCommandBatchEnvelope = {
43
+ cardId?: string;
44
+ commands: ChatStoreCommandEnvelope[];
45
+ };
46
+ type ChatStoreBatchResult = {
47
+ results: Array<{
48
+ index: number;
49
+ command: string;
50
+ data?: unknown;
51
+ }>;
52
+ };
53
+ interface ChatStorePublic {
54
+ /**
55
+ * Append a message to a card's chat history.
56
+ * params.cardId: string
57
+ * body.role: string
58
+ * body.text: string
59
+ * body.files?: unknown[]
60
+ */
61
+ append(input: CommandInput): CommandResult<{
62
+ id: string;
63
+ }>;
64
+ /**
65
+ * Read all messages for a card in insertion order.
66
+ * params.cardId: string
67
+ */
68
+ readAll(input: CommandInput): CommandResult<{
69
+ records: ChatRecord[];
70
+ }>;
71
+ /**
72
+ * Read messages appended after a cursor.
73
+ * params.cardId: string
74
+ * params.cursor?: string | null (omit or null to read from the beginning)
75
+ */
76
+ readAfter(input: CommandInput): CommandResult<ChatReadAfterResult>;
77
+ /**
78
+ * Remove all messages for a card.
79
+ * params.cardId: string
80
+ */
81
+ clear(input: CommandInput): CommandResult<{
82
+ ok: true;
83
+ }>;
84
+ /**
85
+ * Set or clear the processing flag for a card.
86
+ * params.cardId: string
87
+ * body.active: boolean
88
+ */
89
+ setProcessing(input: CommandInput): CommandResult<{
90
+ ok: true;
91
+ }>;
92
+ /**
93
+ * Check whether a card is currently processing.
94
+ * params.cardId: string
95
+ */
96
+ isProcessing(input: CommandInput): CommandResult<{
97
+ active: boolean;
98
+ }>;
99
+ /**
100
+ * Read the chat config for a card.
101
+ * params.cardId: string
102
+ */
103
+ getConfig(input: CommandInput): CommandResult<{
104
+ config: ChatConfig;
105
+ }>;
106
+ /**
107
+ * Patch (merge) the chat config for a card.
108
+ * params.cardId: string
109
+ * body: Partial<ChatConfig> e.g. { systemPrompt: '...' }
110
+ */
111
+ setConfig(input: CommandInput): CommandResult<{
112
+ ok: true;
113
+ }>;
114
+ /**
115
+ * Run a single command envelope against this store instance.
116
+ * The store is already bound to a backing adapter, so boardDir is not part
117
+ * of the public contract here.
118
+ */
119
+ run(envelope: ChatStoreCommandEnvelope, label?: string): CommandResult<unknown>;
120
+ /**
121
+ * Run a sequence of command envelopes with optional top-level cardId default.
122
+ * Stops on first non-success result and returns that failure/error.
123
+ */
124
+ runBatch(envelope: ChatStoreCommandBatchEnvelope): CommandResult<ChatStoreBatchResult>;
125
+ }
126
+ declare function createChatStorePublic(store: ChatStorage): ChatStorePublic;
127
+
128
+ export { type ChatStoreBatchResult, type ChatStoreCommandBatchEnvelope, type ChatStoreCommandEnvelope, type ChatStoreCommandName, type ChatStorePublic, createChatStorePublic };
@@ -0,0 +1,128 @@
1
+ import { C as CommandInput, a as CommandResult } from './board-live-cards-public-DWpZVDXN.js';
2
+ import { C as ChatRecord, a as ChatReadAfterResult, b as ChatConfig, c as ChatStorage } from './chat-storage-lib-BK5Njslc.js';
3
+ import './storage-interface-B6ecOulj.js';
4
+ import './execution-refs.js';
5
+ import './types-BBhqYGhE.js';
6
+
7
+ /**
8
+ * chat-store-lib-public.ts
9
+ *
10
+ * Platform-free public API for ChatStorage operations.
11
+ *
12
+ * Follows the same CommandInput / CommandResult convention as
13
+ * card-store-lib-public.ts and artifacts-store-lib-public.ts.
14
+ * No platform code here — inject a ChatStorage built from your platform adapter.
15
+ *
16
+ * Usage:
17
+ * import { createChatStorePublic } from './chat-store-lib-public.js';
18
+ * import { createFsBoardChatStorage } from '../node/fs-board-adapter.js';
19
+ *
20
+ * const store = createChatStorePublic(createFsBoardChatStorage(boardDir));
21
+ * const result = store.append({ params: { cardId: 'c1' }, body: { role: 'user', text: 'hello' } });
22
+ * const result = store.readAll({ params: { cardId: 'c1' } });
23
+ * const result = store.readAfter({ params: { cardId: 'c1', cursor: '<id>' } });
24
+ * const result = store.clear({ params: { cardId: 'c1' } });
25
+ * const result = store.setProcessing({ params: { cardId: 'c1' }, body: { active: true } });
26
+ * const result = store.isProcessing({ params: { cardId: 'c1' } });
27
+ * const result = store.getConfig({ params: { cardId: 'c1' } });
28
+ * const result = store.setConfig({ params: { cardId: 'c1' }, body: { systemPrompt: '...' } });
29
+ */
30
+
31
+ type ChatStoreCommandName = 'append' | 'read-all' | 'read-after' | 'clear' | 'set-processing' | 'is-processing' | 'get-config' | 'set-config';
32
+ type ChatStoreCommandEnvelope = {
33
+ command: ChatStoreCommandName;
34
+ cardId?: string;
35
+ role?: unknown;
36
+ text?: unknown;
37
+ files?: unknown;
38
+ cursor?: unknown;
39
+ active?: unknown;
40
+ [key: string]: unknown;
41
+ };
42
+ type ChatStoreCommandBatchEnvelope = {
43
+ cardId?: string;
44
+ commands: ChatStoreCommandEnvelope[];
45
+ };
46
+ type ChatStoreBatchResult = {
47
+ results: Array<{
48
+ index: number;
49
+ command: string;
50
+ data?: unknown;
51
+ }>;
52
+ };
53
+ interface ChatStorePublic {
54
+ /**
55
+ * Append a message to a card's chat history.
56
+ * params.cardId: string
57
+ * body.role: string
58
+ * body.text: string
59
+ * body.files?: unknown[]
60
+ */
61
+ append(input: CommandInput): CommandResult<{
62
+ id: string;
63
+ }>;
64
+ /**
65
+ * Read all messages for a card in insertion order.
66
+ * params.cardId: string
67
+ */
68
+ readAll(input: CommandInput): CommandResult<{
69
+ records: ChatRecord[];
70
+ }>;
71
+ /**
72
+ * Read messages appended after a cursor.
73
+ * params.cardId: string
74
+ * params.cursor?: string | null (omit or null to read from the beginning)
75
+ */
76
+ readAfter(input: CommandInput): CommandResult<ChatReadAfterResult>;
77
+ /**
78
+ * Remove all messages for a card.
79
+ * params.cardId: string
80
+ */
81
+ clear(input: CommandInput): CommandResult<{
82
+ ok: true;
83
+ }>;
84
+ /**
85
+ * Set or clear the processing flag for a card.
86
+ * params.cardId: string
87
+ * body.active: boolean
88
+ */
89
+ setProcessing(input: CommandInput): CommandResult<{
90
+ ok: true;
91
+ }>;
92
+ /**
93
+ * Check whether a card is currently processing.
94
+ * params.cardId: string
95
+ */
96
+ isProcessing(input: CommandInput): CommandResult<{
97
+ active: boolean;
98
+ }>;
99
+ /**
100
+ * Read the chat config for a card.
101
+ * params.cardId: string
102
+ */
103
+ getConfig(input: CommandInput): CommandResult<{
104
+ config: ChatConfig;
105
+ }>;
106
+ /**
107
+ * Patch (merge) the chat config for a card.
108
+ * params.cardId: string
109
+ * body: Partial<ChatConfig> e.g. { systemPrompt: '...' }
110
+ */
111
+ setConfig(input: CommandInput): CommandResult<{
112
+ ok: true;
113
+ }>;
114
+ /**
115
+ * Run a single command envelope against this store instance.
116
+ * The store is already bound to a backing adapter, so boardDir is not part
117
+ * of the public contract here.
118
+ */
119
+ run(envelope: ChatStoreCommandEnvelope, label?: string): CommandResult<unknown>;
120
+ /**
121
+ * Run a sequence of command envelopes with optional top-level cardId default.
122
+ * Stops on first non-success result and returns that failure/error.
123
+ */
124
+ runBatch(envelope: ChatStoreCommandBatchEnvelope): CommandResult<ChatStoreBatchResult>;
125
+ }
126
+ declare function createChatStorePublic(store: ChatStorage): ChatStorePublic;
127
+
128
+ export { type ChatStoreBatchResult, type ChatStoreCommandBatchEnvelope, type ChatStoreCommandEnvelope, type ChatStoreCommandName, type ChatStorePublic, createChatStorePublic };
@@ -0,0 +1,2 @@
1
+ function f(d){function o(r){return {status:"success",data:r}}function a(r){return {status:"fail",error:r}}function m(r){return {status:"error",error:r instanceof Error?r.message:String(r)}}function i(r,t="command envelope"){let n=typeof r.cardId=="string"?r.cardId:void 0;if(!r.command)return a(`chat-store: ${t} missing "command"`);if(!n)return a(`chat-store: ${t} missing "cardId"`);if(r.command==="append")return s.append({params:{cardId:n},body:{role:r.role,text:r.text,files:r.files}});if(r.command==="read-all")return s.readAll({params:{cardId:n}});if(r.command==="read-after")return s.readAfter({params:{cardId:n},body:{cursor:r.cursor??null}});if(r.command==="clear")return s.clear({params:{cardId:n}});if(r.command==="set-processing")return s.setProcessing({params:{cardId:n},body:{active:r.active}});if(r.command==="is-processing")return s.isProcessing({params:{cardId:n}});if(r.command==="get-config")return s.getConfig({params:{cardId:n}});if(r.command==="set-config"){let{command:e,cardId:u,...c}=r;return s.setConfig({params:{cardId:n},body:c})}return a(`chat-store: unknown command "${String(r.command)}"`)}function C(r){if(!Array.isArray(r.commands)||r.commands.length===0)return a('chat-store: command envelope must include a non-empty "commands" array');let t=[];for(let n=0;n<r.commands.length;n+=1){let e=r.commands[n];if(!e||typeof e!="object"||Array.isArray(e))return a(`chat-store: command envelope entry ${n} must be an object`);let u={cardId:r.cardId,...e},c=i(u,`command envelope entry ${n}`);if(c.status!=="success")return c;t.push({index:n,command:String(u.command),data:c.data});}return o({results:t})}let s={append(r){try{let t=r.params?.cardId;if(!t)return a("append requires params.cardId");let n=r.body??{},e=typeof n.role=="string"?n.role:"",u=typeof n.text=="string"?n.text:"",c=Array.isArray(n.files)?n.files:[];if(!e)return a("append requires body.role");let l=d.append(t,e,u,c);return o({id:l})}catch(t){return m(t)}},readAll(r){try{let t=r.params?.cardId;return t?o({records:d.readAll(t)}):a("readAll requires params.cardId")}catch(t){return m(t)}},readAfter(r){try{let t=r.params?.cardId;if(!t)return a("readAfter requires params.cardId");let e=(r.body??{}).cursor??null;return o(d.readAfter(t,e))}catch(t){return m(t)}},clear(r){try{let t=r.params?.cardId;return t?(d.clear(t),o({ok:!0})):a("clear requires params.cardId")}catch(t){return m(t)}},setProcessing(r){try{let t=r.params?.cardId;if(!t)return a("setProcessing requires params.cardId");let n=r.body??{};return typeof n.active!="boolean"?a("setProcessing requires body.active (boolean)"):(d.setProcessing(t,n.active),o({ok:!0}))}catch(t){return m(t)}},isProcessing(r){try{let t=r.params?.cardId;return t?o({active:d.isProcessing(t)}):a("isProcessing requires params.cardId")}catch(t){return m(t)}},getConfig(r){try{let t=r.params?.cardId;return t?o({config:d.getConfig(t)}):a("getConfig requires params.cardId")}catch(t){return m(t)}},setConfig(r){try{let t=r.params?.cardId;if(!t)return a("setConfig requires params.cardId");let n=r.body??{};return d.setConfig(t,n),o({ok:!0})}catch(t){return m(t)}},run:i,runBatch:C};return s}export{f as createChatStorePublic};//# sourceMappingURL=chat-store-public.js.map
2
+ //# sourceMappingURL=chat-store-public.js.map
@@ -77,6 +77,13 @@
77
77
  * whatToRun: 'b64:<base64url({"kind":"fs-path","value":"/path/to/my-executor.js"})>',
78
78
  * };
79
79
  *
80
+ * // Packaged yaml-flow CLI entrypoint resolved by the Node adapter:
81
+ * const yamlFlowCli: ExecutionRef = {
82
+ * meta: 'chat-handler',
83
+ * howToRun: 'local-node',
84
+ * whatToRun: 'b64:<base64url({"kind":"yaml-flow-cli","value":"chat-store-cli.js"})>',
85
+ * };
86
+ *
80
87
  * // Azure Function task executor with custom arg mapping:
81
88
  * const azureFn: ExecutionRef = {
82
89
  * meta: 'task-executor',
@@ -204,7 +211,9 @@ interface ExecutionRef {
204
211
  * Address of the artifact to run. Two valid forms:
205
212
  * - string: must be KindValueRef wire form `b64:<base64url(json)>` (programmatically generated via serializeRef)
206
213
  * - object: `{ kind: string; value: string }` plain object (human-authored flow files — normalized by the handler factory)
207
- * @example 'b64:<base64url({"kind":"fs-path","value":"/dist/cli/source-cli-task-executor.js"})>'
214
+ * Prefer `kind: 'yaml-flow-cli'` when targeting a packaged public yaml-flow CLI entrypoint.
215
+ * Use `kind: 'fs-path'` for external scripts or non-packaged local executables.
216
+ * @example 'b64:<base64url({"kind":"yaml-flow-cli","value":"chat-store-cli.js"})>'
208
217
  * @example { kind: 'http-url', value: '/api/workiq/ask' }
209
218
  * @example { kind: 'fs-path', value: './my-handler.js' }
210
219
  */
@@ -77,6 +77,13 @@
77
77
  * whatToRun: 'b64:<base64url({"kind":"fs-path","value":"/path/to/my-executor.js"})>',
78
78
  * };
79
79
  *
80
+ * // Packaged yaml-flow CLI entrypoint resolved by the Node adapter:
81
+ * const yamlFlowCli: ExecutionRef = {
82
+ * meta: 'chat-handler',
83
+ * howToRun: 'local-node',
84
+ * whatToRun: 'b64:<base64url({"kind":"yaml-flow-cli","value":"chat-store-cli.js"})>',
85
+ * };
86
+ *
80
87
  * // Azure Function task executor with custom arg mapping:
81
88
  * const azureFn: ExecutionRef = {
82
89
  * meta: 'task-executor',
@@ -204,7 +211,9 @@ interface ExecutionRef {
204
211
  * Address of the artifact to run. Two valid forms:
205
212
  * - string: must be KindValueRef wire form `b64:<base64url(json)>` (programmatically generated via serializeRef)
206
213
  * - object: `{ kind: string; value: string }` plain object (human-authored flow files — normalized by the handler factory)
207
- * @example 'b64:<base64url({"kind":"fs-path","value":"/dist/cli/source-cli-task-executor.js"})>'
214
+ * Prefer `kind: 'yaml-flow-cli'` when targeting a packaged public yaml-flow CLI entrypoint.
215
+ * Use `kind: 'fs-path'` for external scripts or non-packaged local executables.
216
+ * @example 'b64:<base64url({"kind":"yaml-flow-cli","value":"chat-store-cli.js"})>'
208
217
  * @example { kind: 'http-url', value: '/api/workiq/ask' }
209
218
  * @example { kind: 'fs-path', value: './my-handler.js' }
210
219
  */