yaml-flow 8.2.5 → 8.4.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/asset-integrity.json +3 -3
- package/browser/board-livecards-client.js +1 -1
- package/browser/board-livecards-localstorage.js +6 -4
- package/browser/live-cards.js +19 -25
- package/cli/{board-live-cards-lib-Iq_XAC09.d.ts → board-live-cards-lib-tjYsPt5U.d.ts} +1 -1
- package/cli/browser-api/board-live-cards-browser-adapter.d.ts +3 -3
- package/cli/browser-api/board-live-cards-browser-adapter.js +3 -2
- package/cli/browser-api/card-store-browser-api.d.ts +1 -1
- package/cli/browser-api/card-store-browser-api.js +1 -1
- package/cli/{execution-interface-ftO1W7Po.d.ts → execution-interface-DCFBy4L8.d.ts} +151 -2
- package/cli/node/artifacts-store-cli.js +5 -5
- package/cli/node/batch-runner-cli.d.ts +3 -0
- package/cli/node/batch-runner-cli.js +2 -1
- package/cli/node/board-live-cards-cli.js +14 -8
- package/cli/node/card-store-cli.js +6 -6
- package/cli/node/chat-store-cli.d.ts +23 -0
- package/cli/node/chat-store-cli.js +8 -0
- package/cli/node/execution-adapter.d.ts +4 -2
- package/cli/node/execution-adapter.js +2 -2
- package/cli/node/fs-board-adapter.d.ts +75 -75
- package/cli/node/fs-board-adapter.js +14 -10
- package/cli/node/source-cli-task-executor.js +4 -4
- package/cli/node/step-machine-cli.js +3 -3
- package/cli/{types--rXGWbSR.d.ts → types-Dc2VRMUw.d.ts} +27 -124
- package/examples/board/demo-shell-with-server.html +3 -196
- package/examples/board/doc.html +465 -0
- package/examples/board/server/board-server.js +30 -82
- package/examples/board/server/board-worker/source_def_flows.json +2 -2
- package/examples/board/server/chat-flow/copilot-chat/assistant.js +44 -185
- package/examples/board/server/chat-flow/copilot-chat/copilot_wrapper.bat +157 -0
- package/examples/board/server/chat-flow/copilot-chat/copilot_wrapper_helper.ps1 +190 -0
- package/examples/board/server/chat-flow/flow-steps.json +122 -56
- package/examples/board/test/server-http-test.js +252 -220
- package/examples/board-local/demo-shell-localstorage.html +3 -3
- package/lib/{artifacts-store-lib-public-GD4H-fFp.d.ts → artifacts-store-lib-454TAuov.d.ts} +2 -32
- package/lib/{artifacts-store-lib-public-C5UL5tyG.d.cts → artifacts-store-lib-zsGFbBV8.d.cts} +2 -32
- package/lib/artifacts-store-public.d.cts +34 -3
- package/lib/artifacts-store-public.d.ts +34 -3
- package/lib/board-live-cards-node.cjs +14 -10
- package/lib/board-live-cards-node.d.cts +42 -21
- package/lib/board-live-cards-node.d.ts +42 -21
- package/lib/board-live-cards-node.js +14 -10
- package/lib/{board-live-cards-public-BLXbcBNk.d.cts → board-live-cards-public-BM6jCEIa.d.cts} +25 -5
- package/lib/{board-live-cards-public-BZaNb2mi.d.ts → board-live-cards-public-Bz07XKRK.d.ts} +25 -5
- package/lib/board-live-cards-public.cjs +2 -2
- 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 +2 -2
- package/lib/board-live-cards-server-runtime.cjs +4 -4
- package/lib/board-live-cards-server-runtime.d.cts +5 -3
- package/lib/board-live-cards-server-runtime.d.ts +5 -3
- package/lib/board-live-cards-server-runtime.js +4 -4
- package/lib/board-worker-adapter.cjs +2 -2
- package/lib/board-worker-adapter.js +2 -2
- package/lib/card-store-public.d.cts +2 -2
- package/lib/card-store-public.d.ts +2 -2
- package/lib/chat-storage-lib-DGaKrjVe.d.ts +53 -0
- package/lib/chat-storage-lib-OX0Q_Ttf.d.cts +53 -0
- package/lib/chat-store-public.cjs +2 -0
- package/lib/chat-store-public.d.cts +128 -0
- package/lib/chat-store-public.d.ts +128 -0
- package/lib/chat-store-public.js +2 -0
- package/lib/execution-refs.cjs +1 -1
- package/lib/execution-refs.d.cts +10 -1
- package/lib/execution-refs.d.ts +10 -1
- package/lib/execution-refs.js +1 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/server-runtime/index.cjs +4 -4
- package/lib/server-runtime/index.d.cts +6 -4
- package/lib/server-runtime/index.d.ts +6 -4
- package/lib/server-runtime/index.js +4 -4
- package/lib/step-machine-public/index.cjs +3 -3
- 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 +3 -3
- package/lib/{storage-interface-B6ecOulj.d.ts → storage-interface-B-7pDHwD.d.cts} +36 -1
- package/lib/{storage-interface-B6ecOulj.d.cts → storage-interface-B-7pDHwD.d.ts} +36 -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-D-xVWPdY.d.ts → types-Cn0b8G-i.d.ts} +16 -65
- package/lib/{types-Bztd1KoK.d.cts → types-Dszjwfud.d.cts} +16 -65
- package/package.json +8 -2
- package/examples/board/.board-ws/cards/store/_index.json +0 -17
- package/examples/board/.board-ws/cards/store/card-market-prices.json +0 -80
- package/examples/board/.board-ws/cards/store/card-portfolio-value.json +0 -90
- package/examples/board/.board-ws/cards/store/card-portfolio.json +0 -78
- package/examples/board/server/chat-flow/chat-clear-processing.js +0 -41
- package/examples/board/server/chat-flow/chat-open-turn.js +0 -144
- package/examples/board/server/chat-flow/chat-write-assistant.js +0 -44
- package/examples/board/server/chat-flow/echo-probe/assistant.js +0 -28
|
@@ -1,28 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "chat-flow-steps",
|
|
3
3
|
"settings": {
|
|
4
|
-
"start_step": "
|
|
4
|
+
"start_step": "read_chats",
|
|
5
5
|
"max_total_steps": 10,
|
|
6
6
|
"timeout_ms": 300000
|
|
7
7
|
},
|
|
8
8
|
"steps": {
|
|
9
|
-
"
|
|
10
|
-
"description": "
|
|
11
|
-
"
|
|
9
|
+
"read_chats": {
|
|
10
|
+
"description": "Read chats from runtime storage via chat-store-cli and pass them through the flow",
|
|
11
|
+
"expects_data": ["boardSetupRoot", "boardRuntimeDir", "cardId"],
|
|
12
|
+
"produces_data": ["chatMessages"],
|
|
12
13
|
"input_validations": [
|
|
13
|
-
"$type(
|
|
14
|
-
"$type(
|
|
15
|
-
"$type(apiBasePath) = \"string\" and $length(apiBasePath) > 0",
|
|
16
|
-
"$type(lastChatEntryId) = \"string\" and $length(lastChatEntryId) > 0"
|
|
14
|
+
"$type(boardSetupRoot) = \"string\" and $length(boardSetupRoot) > 0",
|
|
15
|
+
"$type(cardId) = \"string\" and $length(cardId) > 0"
|
|
17
16
|
],
|
|
18
17
|
"handler": {
|
|
19
18
|
"type": "ref",
|
|
20
19
|
"howToRun": "local-node",
|
|
21
20
|
"whatToRun": {
|
|
22
|
-
"kind": "
|
|
23
|
-
"value": "
|
|
21
|
+
"kind": "yaml-flow-cli",
|
|
22
|
+
"value": "chat-store-cli.js"
|
|
24
23
|
},
|
|
25
|
-
"meta": "chat-handler"
|
|
24
|
+
"meta": "chat-handler",
|
|
25
|
+
"argsMassaging": {
|
|
26
|
+
"stdinTemplate": "{ 'command': 'read-all', 'boardDir': boardSetupRoot & '/' & boardRuntimeDir, 'cardId': cardId }"
|
|
27
|
+
},
|
|
28
|
+
"outputTransforms": {
|
|
29
|
+
"dataTemplate": "{ 'chatMessages': output.data.records }"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"transitions": {
|
|
33
|
+
"success": "open_turn",
|
|
34
|
+
"failure": "cleanup_failure",
|
|
35
|
+
"error": "cleanup_failure"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"open_turn": {
|
|
39
|
+
"description": "Resolve the current user turn from flow-provided chat messages and parse any chat envelope options",
|
|
40
|
+
"produces_data": ["boardId", "cardId", "boardSetupRoot", "boardRuntimeDir", "runtimeStatusDir", "cardsDir", "projectRoot", "chatFlowRoot", "chatMessages", "userText", "lastChatEntryId", "probe", "chatHandlerMode", "chatCopilotTimeoutMs"],
|
|
41
|
+
"input_validations": [
|
|
42
|
+
"$type(cardId) = \"string\" and $length(cardId) > 0",
|
|
43
|
+
"$type(chatMessages) = \"array\"",
|
|
44
|
+
"$type(lastChatEntryId) = \"string\" and $length(lastChatEntryId) > 0",
|
|
45
|
+
"$count($filter(chatMessages, function($message) { $message.id = lastChatEntryId and $message.role = \"user\" and $type($message.text) = \"string\" and $length($trim($message.text)) > 0 })) > 0"
|
|
46
|
+
],
|
|
47
|
+
"handler": {
|
|
48
|
+
"type": "compute-jsonata",
|
|
49
|
+
"expr": [
|
|
50
|
+
"data.boardId = $type(expects_data.boardId) = \"string\" ? expects_data.boardId : \"\"",
|
|
51
|
+
"data.cardId = $type(expects_data.cardId) = \"string\" ? expects_data.cardId : \"\"",
|
|
52
|
+
"data.boardSetupRoot = $type(expects_data.boardSetupRoot) = \"string\" ? expects_data.boardSetupRoot : \"\"",
|
|
53
|
+
"data.boardRuntimeDir = ($type(expects_data.boardRuntimeDir) = \"string\" and $length(expects_data.boardRuntimeDir) > 0) ? expects_data.boardRuntimeDir : \"runtime\"",
|
|
54
|
+
"data.runtimeStatusDir = ($type(expects_data.runtimeStatusDir) = \"string\" and $length(expects_data.runtimeStatusDir) > 0) ? expects_data.runtimeStatusDir : \"runtime-out\"",
|
|
55
|
+
"data.cardsDir = ($type(expects_data.cardsDir) = \"string\" and $length(expects_data.cardsDir) > 0) ? expects_data.cardsDir : \"cards\"",
|
|
56
|
+
"data.projectRoot = $type(expects_data.projectRoot) = \"string\" ? expects_data.projectRoot : \"\"",
|
|
57
|
+
"data.chatFlowRoot = $type(expects_data.chatFlowRoot) = \"string\" ? expects_data.chatFlowRoot : \"\"",
|
|
58
|
+
"data.chatMessages = expects_data.chatMessages",
|
|
59
|
+
"data.lastChatEntryId = expects_data.lastChatEntryId",
|
|
60
|
+
"data._rawMessageText = $trim($string($filter(expects_data.chatMessages, function($message) { $message.id = expects_data.lastChatEntryId and $message.role = \"user\" })[0].text))",
|
|
61
|
+
"data._marker = \"__probe__echo__probe__\"",
|
|
62
|
+
"data._markerLen = $length(data._marker)",
|
|
63
|
+
"data._isEchoProbe = $length(data._rawMessageText) >= (data._markerLen * 2) and $substring(data._rawMessageText, 0, data._markerLen) = data._marker and $substring(data._rawMessageText, $length(data._rawMessageText) - data._markerLen) = data._marker",
|
|
64
|
+
"data._hasLegacyEnvelope = $length(data._rawMessageText) >= 2 and $substring(data._rawMessageText, 0, 1) = \"{\" and $substring(data._rawMessageText, $length(data._rawMessageText) - 1) = \"}\" and $count($match(data._rawMessageText, /^\\s*\\{\\s*\"(prompt|text|userText|query|probe|chatHandlerMode|chatTimeoutMs|chatCopilotTimeoutMs)\"/)) > 0",
|
|
65
|
+
"data._legacyEnvelope = data._hasLegacyEnvelope ? $eval(data._rawMessageText) : null",
|
|
66
|
+
"data._legacyPrompt = ($type(data._legacyEnvelope.prompt) = \"string\" and $length($trim(data._legacyEnvelope.prompt)) > 0) ? data._legacyEnvelope.prompt : (($type(data._legacyEnvelope.text) = \"string\" and $length($trim(data._legacyEnvelope.text)) > 0) ? data._legacyEnvelope.text : (($type(data._legacyEnvelope.userText) = \"string\" and $length($trim(data._legacyEnvelope.userText)) > 0) ? data._legacyEnvelope.userText : (($type(data._legacyEnvelope.query) = \"string\" and $length($trim(data._legacyEnvelope.query)) > 0) ? data._legacyEnvelope.query : null)))",
|
|
67
|
+
"data.userText = data._isEchoProbe ? $trim($substring(data._rawMessageText, data._markerLen, $length(data._rawMessageText) - (data._markerLen * 2))) : (($type(data._legacyPrompt) = \"string\" and $length($trim(data._legacyPrompt)) > 0) ? $trim(data._legacyPrompt) : data._rawMessageText)",
|
|
68
|
+
"data.probe = data._isEchoProbe ? true : (data._legacyEnvelope.probe = true or data._legacyEnvelope.probe = 1 or ($type(data._legacyEnvelope.probe) = \"string\" and $count($filter([\"1\", \"true\", \"yes\", \"on\"], function($value) { $value = $lowercase($trim(data._legacyEnvelope.probe)) })) > 0))",
|
|
69
|
+
"data.chatHandlerMode = data._isEchoProbe ? \"echo-probe\" : (($type(data._legacyEnvelope.chatHandlerMode) = \"string\" and $length($trim(data._legacyEnvelope.chatHandlerMode)) > 0) ? $lowercase($trim(data._legacyEnvelope.chatHandlerMode)) : (data.probe ? \"probe\" : \"copilot\"))",
|
|
70
|
+
"data.chatCopilotTimeoutMs = ($parsePositiveInt := function($value) { ($type($value) = \"number\" and $value > 0) ? $floor($value) : (($type($value) = \"string\" and $count($match($trim($value), /^[0-9]+$/)) > 0 and $number($trim($value)) > 0) ? $floor($number($trim($value))) : null) }; $legacyTimeout := $parsePositiveInt(data._legacyEnvelope.chatTimeoutMs); $legacyCopilotTimeout := $parsePositiveInt(data._legacyEnvelope.chatCopilotTimeoutMs); $fallbackTimeout := $parsePositiveInt(expects_data.chatCopilotTimeoutMs); $legacyTimeout ? $legacyTimeout : ($legacyCopilotTimeout ? $legacyCopilotTimeout : ($fallbackTimeout ? $fallbackTimeout : 300000)))",
|
|
71
|
+
"result = \"success\""
|
|
72
|
+
]
|
|
26
73
|
},
|
|
27
74
|
"transitions": {
|
|
28
75
|
"success": "select_assistant",
|
|
@@ -37,7 +84,7 @@
|
|
|
37
84
|
"handler": {
|
|
38
85
|
"type": "compute-jsonata",
|
|
39
86
|
"expr": [
|
|
40
|
-
"data.selectedAssistant = (expects_data.probe = true or expects_data.probe = \"true\" or expects_data.probe = 1 or $lowercase($string(expects_data.chatHandlerMode)) = \"probe\") ? \"probe\" : \"copilot\"",
|
|
87
|
+
"data.selectedAssistant = (expects_data.probe = true or expects_data.probe = \"true\" or expects_data.probe = 1 or $lowercase($string(expects_data.chatHandlerMode)) = \"probe\" or $lowercase($string(expects_data.chatHandlerMode)) = \"echo-probe\") ? \"probe\" : \"copilot\"",
|
|
41
88
|
"result = data.selectedAssistant"
|
|
42
89
|
]
|
|
43
90
|
},
|
|
@@ -48,21 +95,19 @@
|
|
|
48
95
|
"error": "cleanup_failure"
|
|
49
96
|
}
|
|
50
97
|
},
|
|
51
|
-
"
|
|
52
|
-
"description": "
|
|
53
|
-
"expects_data": ["userText", "boardId", "cardId", "boardSetupRoot", "boardRuntimeDir", "runtimeStatusDir", "cardsDir", "projectRoot", "chatFlowRoot", "serverUrl", "apiBasePath", "lastChatEntryId", "chatCopilotTimeoutMs"],
|
|
54
|
-
"produces_data": ["replyText"],
|
|
55
|
-
"input_validations": [
|
|
56
|
-
"$type(userText) = \"string\""
|
|
57
|
-
],
|
|
98
|
+
"probe_in_progress": {
|
|
99
|
+
"description": "Append a probe-only in-progress system message before generating the deterministic echo reply",
|
|
58
100
|
"handler": {
|
|
59
101
|
"type": "ref",
|
|
60
102
|
"howToRun": "local-node",
|
|
61
103
|
"whatToRun": {
|
|
62
|
-
"kind": "
|
|
63
|
-
"value": "
|
|
104
|
+
"kind": "yaml-flow-cli",
|
|
105
|
+
"value": "chat-store-cli.js"
|
|
64
106
|
},
|
|
65
|
-
"meta": "chat-handler"
|
|
107
|
+
"meta": "chat-handler",
|
|
108
|
+
"argsMassaging": {
|
|
109
|
+
"stdinTemplate": "{ 'boardDir': boardSetupRoot & '/' & boardRuntimeDir, 'cardId': cardId, 'commands': [{ 'command': 'append', 'role': 'system', 'text': 'in-progress', 'files': [] }] }"
|
|
110
|
+
}
|
|
66
111
|
},
|
|
67
112
|
"transitions": {
|
|
68
113
|
"success": "write_reply",
|
|
@@ -70,19 +115,24 @@
|
|
|
70
115
|
"error": "cleanup_failure"
|
|
71
116
|
}
|
|
72
117
|
},
|
|
73
|
-
"
|
|
74
|
-
"description": "Run the
|
|
75
|
-
"expects_data": ["userText", "
|
|
118
|
+
"copilot_assistant": {
|
|
119
|
+
"description": "Run the Copilot-backed assistant logic to generate the reply from the resolved chat history",
|
|
120
|
+
"expects_data": ["userText", "chatMessages", "boardId", "cardId", "boardSetupRoot", "boardRuntimeDir", "runtimeStatusDir", "cardsDir", "projectRoot", "chatFlowRoot", "chatCopilotTimeoutMs"],
|
|
76
121
|
"produces_data": ["replyText"],
|
|
77
122
|
"input_validations": [
|
|
78
|
-
"$type(userText) = \"string\""
|
|
123
|
+
"$type(userText) = \"string\"",
|
|
124
|
+
"$type(chatMessages) = \"array\""
|
|
79
125
|
],
|
|
80
126
|
"handler": {
|
|
81
127
|
"type": "ref",
|
|
82
|
-
"howToRun": "local-
|
|
128
|
+
"howToRun": "local-process",
|
|
83
129
|
"whatToRun": {
|
|
84
|
-
"kind": "
|
|
85
|
-
"value": "
|
|
130
|
+
"kind": "process-name",
|
|
131
|
+
"value": "node"
|
|
132
|
+
},
|
|
133
|
+
"argsMassaging": {
|
|
134
|
+
"cmdTemplate": ["chatFlowRoot & '/copilot-chat/assistant.js'"],
|
|
135
|
+
"stdinTemplate": "{ 'cardId': cardId, 'boardSetupRoot': boardSetupRoot, 'boardRuntimeDir': boardRuntimeDir, 'runtimeStatusDir': runtimeStatusDir, 'cardsDir': cardsDir, 'chatMessages': chatMessages, 'userText': userText, 'chatCopilotTimeoutMs': chatCopilotTimeoutMs }"
|
|
86
136
|
},
|
|
87
137
|
"meta": "chat-handler"
|
|
88
138
|
},
|
|
@@ -92,58 +142,74 @@
|
|
|
92
142
|
"error": "cleanup_failure"
|
|
93
143
|
}
|
|
94
144
|
},
|
|
95
|
-
"
|
|
96
|
-
"description": "
|
|
97
|
-
"expects_data": ["
|
|
98
|
-
"produces_data": ["replyText"
|
|
145
|
+
"probe_assistant": {
|
|
146
|
+
"description": "Compute the deterministic echo assistant reply for echo-probe and test flows",
|
|
147
|
+
"expects_data": ["userText"],
|
|
148
|
+
"produces_data": ["replyText"],
|
|
99
149
|
"input_validations": [
|
|
100
|
-
"$type(
|
|
101
|
-
"$type(apiBasePath) = \"string\" and $length(apiBasePath) > 0",
|
|
102
|
-
"$type(cardId) = \"string\" and $length(cardId) > 0",
|
|
103
|
-
"$type(replyText) = \"string\""
|
|
150
|
+
"$type(userText) = \"string\""
|
|
104
151
|
],
|
|
105
152
|
"handler": {
|
|
106
|
-
"type": "
|
|
107
|
-
"
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
"meta": "chat-handler"
|
|
153
|
+
"type": "compute-jsonata",
|
|
154
|
+
"expr": [
|
|
155
|
+
"data.replyText = \"Echo: \" & expects_data.userText",
|
|
156
|
+
"result = $contains($lowercase(expects_data.userText), \"simulate-failure\") ? \"failure\" : \"success\""
|
|
157
|
+
]
|
|
113
158
|
},
|
|
114
159
|
"transitions": {
|
|
115
|
-
"success": "
|
|
160
|
+
"success": "probe_in_progress",
|
|
116
161
|
"failure": "cleanup_failure",
|
|
117
162
|
"error": "cleanup_failure"
|
|
118
163
|
}
|
|
119
164
|
},
|
|
120
|
-
"
|
|
121
|
-
"description": "
|
|
165
|
+
"write_reply": {
|
|
166
|
+
"description": "Append the assistant reply and clear processing via one chat-store-cli command envelope",
|
|
167
|
+
"expects_data": ["boardSetupRoot", "boardRuntimeDir", "cardId", "replyText"],
|
|
168
|
+
"produces_data": ["replyId"],
|
|
169
|
+
"input_validations": [
|
|
170
|
+
"$type(boardSetupRoot) = \"string\" and $length(boardSetupRoot) > 0",
|
|
171
|
+
"$type(cardId) = \"string\" and $length(cardId) > 0",
|
|
172
|
+
"$type(replyText) = \"string\""
|
|
173
|
+
],
|
|
122
174
|
"handler": {
|
|
123
175
|
"type": "ref",
|
|
124
176
|
"howToRun": "local-node",
|
|
125
177
|
"whatToRun": {
|
|
126
|
-
"kind": "
|
|
127
|
-
"value": "
|
|
178
|
+
"kind": "yaml-flow-cli",
|
|
179
|
+
"value": "chat-store-cli.js"
|
|
128
180
|
},
|
|
129
|
-
"meta": "chat-handler"
|
|
181
|
+
"meta": "chat-handler",
|
|
182
|
+
"argsMassaging": {
|
|
183
|
+
"stdinTemplate": "{ 'boardDir': boardSetupRoot & '/' & boardRuntimeDir, 'cardId': cardId, 'commands': [{ 'command': 'append', 'role': 'assistant', 'text': replyText, 'files': [] }, { 'command': 'set-processing', 'active': false }] }"
|
|
184
|
+
},
|
|
185
|
+
"outputTransforms": {
|
|
186
|
+
"dataTemplate": "{ 'replyId': output.data.results[0].data.id }"
|
|
187
|
+
}
|
|
130
188
|
},
|
|
131
189
|
"transitions": {
|
|
132
190
|
"success": "completed",
|
|
133
|
-
"failure": "
|
|
134
|
-
"error": "
|
|
191
|
+
"failure": "cleanup_failure",
|
|
192
|
+
"error": "cleanup_failure"
|
|
135
193
|
}
|
|
136
194
|
},
|
|
137
195
|
"cleanup_failure": {
|
|
138
|
-
"description": "
|
|
196
|
+
"description": "Write a failure system message and clear processing via one chat-store-cli command envelope",
|
|
197
|
+
"expects_data": ["boardSetupRoot", "boardRuntimeDir", "cardId"],
|
|
198
|
+
"input_validations": [
|
|
199
|
+
"$type(boardSetupRoot) = \"string\" and $length(boardSetupRoot) > 0",
|
|
200
|
+
"$type(cardId) = \"string\" and $length(cardId) > 0"
|
|
201
|
+
],
|
|
139
202
|
"handler": {
|
|
140
203
|
"type": "ref",
|
|
141
204
|
"howToRun": "local-node",
|
|
142
205
|
"whatToRun": {
|
|
143
|
-
"kind": "
|
|
144
|
-
"value": "
|
|
206
|
+
"kind": "yaml-flow-cli",
|
|
207
|
+
"value": "chat-store-cli.js"
|
|
145
208
|
},
|
|
146
|
-
"meta": "chat-handler"
|
|
209
|
+
"meta": "chat-handler",
|
|
210
|
+
"argsMassaging": {
|
|
211
|
+
"stdinTemplate": "{ 'boardDir': boardSetupRoot & '/' & boardRuntimeDir, 'cardId': cardId, 'commands': [{ 'command': 'append', 'role': 'system', 'text': 'AI response failed - the assistant could not generate a reply. Check server configuration and logs.', 'files': [] }, { 'command': 'set-processing', 'active': false }] }"
|
|
212
|
+
}
|
|
147
213
|
},
|
|
148
214
|
"transitions": {
|
|
149
215
|
"success": "failed",
|