@nhtio/adk 0.1.0-master-e04b0eba → 0.1.0-master-bd43a4ea
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/CHANGELOG.md +27 -0
- package/batteries/embeddings/index.d.ts +25 -0
- package/batteries/embeddings/openai/adapter.cjs +185 -0
- package/batteries/embeddings/openai/adapter.cjs.map +1 -0
- package/batteries/embeddings/openai/adapter.d.ts +74 -0
- package/batteries/embeddings/openai/adapter.mjs +183 -0
- package/batteries/embeddings/openai/adapter.mjs.map +1 -0
- package/batteries/embeddings/openai/exceptions.cjs +48 -0
- package/batteries/embeddings/openai/exceptions.cjs.map +1 -0
- package/batteries/embeddings/openai/exceptions.d.ts +45 -0
- package/batteries/embeddings/openai/exceptions.mjs +43 -0
- package/batteries/embeddings/openai/exceptions.mjs.map +1 -0
- package/batteries/embeddings/openai/helpers.cjs +25 -0
- package/batteries/embeddings/openai/helpers.cjs.map +1 -0
- package/batteries/embeddings/openai/helpers.d.ts +25 -0
- package/batteries/embeddings/openai/helpers.mjs +23 -0
- package/batteries/embeddings/openai/helpers.mjs.map +1 -0
- package/batteries/embeddings/openai/index.d.ts +17 -0
- package/batteries/embeddings/openai/types.cjs +2 -0
- package/batteries/embeddings/openai/types.d.ts +123 -0
- package/batteries/embeddings/openai/types.mjs +0 -0
- package/batteries/embeddings/openai/validation.cjs +56 -0
- package/batteries/embeddings/openai/validation.cjs.map +1 -0
- package/batteries/embeddings/openai/validation.d.ts +24 -0
- package/batteries/embeddings/openai/validation.mjs +53 -0
- package/batteries/embeddings/openai/validation.mjs.map +1 -0
- package/batteries/embeddings/openai.cjs +14 -0
- package/batteries/embeddings/openai.mjs +5 -0
- package/batteries/embeddings/webllm/adapter.cjs +147 -0
- package/batteries/embeddings/webllm/adapter.cjs.map +1 -0
- package/batteries/embeddings/webllm/adapter.d.ts +74 -0
- package/batteries/embeddings/webllm/adapter.mjs +145 -0
- package/batteries/embeddings/webllm/adapter.mjs.map +1 -0
- package/batteries/embeddings/webllm/exceptions.cjs +31 -0
- package/batteries/embeddings/webllm/exceptions.cjs.map +1 -0
- package/batteries/embeddings/webllm/exceptions.d.ts +25 -0
- package/batteries/embeddings/webllm/exceptions.mjs +28 -0
- package/batteries/embeddings/webllm/exceptions.mjs.map +1 -0
- package/batteries/embeddings/webllm/index.d.ts +15 -0
- package/batteries/embeddings/webllm/types.cjs +2 -0
- package/batteries/embeddings/webllm/types.d.ts +52 -0
- package/batteries/embeddings/webllm/types.mjs +0 -0
- package/batteries/embeddings/webllm/validation.cjs +43 -0
- package/batteries/embeddings/webllm/validation.cjs.map +1 -0
- package/batteries/embeddings/webllm/validation.d.ts +25 -0
- package/batteries/embeddings/webllm/validation.mjs +40 -0
- package/batteries/embeddings/webllm/validation.mjs.map +1 -0
- package/batteries/embeddings/webllm.cjs +10 -0
- package/batteries/embeddings/webllm.mjs +4 -0
- package/batteries/embeddings.cjs +15 -0
- package/batteries/embeddings.mjs +6 -0
- package/batteries/index.d.ts +1 -0
- package/batteries/llm/openai_chat_completions/adapter.cjs +14 -73
- package/batteries/llm/openai_chat_completions/adapter.cjs.map +1 -1
- package/batteries/llm/openai_chat_completions/adapter.mjs +8 -67
- package/batteries/llm/openai_chat_completions/adapter.mjs.map +1 -1
- package/batteries/llm/openai_chat_completions/helpers.cjs +2 -2
- package/batteries/llm/openai_chat_completions/helpers.mjs +2 -2
- package/batteries/llm/openai_chat_completions/validation.cjs +1 -1
- package/batteries/llm/openai_chat_completions/validation.mjs +1 -1
- package/batteries/llm/webllm_chat_completions/adapter.cjs +7 -6
- package/batteries/llm/webllm_chat_completions/adapter.cjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/adapter.mjs +7 -6
- package/batteries/llm/webllm_chat_completions/adapter.mjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/validation.cjs +1 -1
- package/batteries/llm/webllm_chat_completions/validation.mjs +1 -1
- package/batteries/storage/flydrive.cjs +1 -1
- package/batteries/storage/flydrive.mjs +1 -1
- package/batteries/storage/in_memory.cjs +1 -1
- package/batteries/storage/in_memory.mjs +1 -1
- package/batteries/storage/opfs.cjs +1 -1
- package/batteries/storage/opfs.mjs +1 -1
- package/batteries/tools/color.cjs +2 -2
- package/batteries/tools/color.mjs +2 -2
- package/batteries/tools/comparison.cjs +3 -3
- package/batteries/tools/comparison.mjs +3 -3
- package/batteries/tools/data_structure.cjs +3 -3
- package/batteries/tools/data_structure.mjs +3 -3
- package/batteries/tools/datetime_extended.cjs +2 -2
- package/batteries/tools/datetime_extended.mjs +2 -2
- package/batteries/tools/datetime_math.cjs +2 -2
- package/batteries/tools/datetime_math.mjs +2 -2
- package/batteries/tools/encoding.cjs +3 -3
- package/batteries/tools/encoding.mjs +3 -3
- package/batteries/tools/formatting.cjs +3 -3
- package/batteries/tools/formatting.mjs +3 -3
- package/batteries/tools/geo_basics.cjs +2 -2
- package/batteries/tools/geo_basics.mjs +2 -2
- package/batteries/tools/math.cjs +3 -3
- package/batteries/tools/math.mjs +3 -3
- package/batteries/tools/memory.cjs +5 -5
- package/batteries/tools/memory.mjs +5 -5
- package/batteries/tools/parsing.cjs +4 -4
- package/batteries/tools/parsing.mjs +4 -4
- package/batteries/tools/retrievables.cjs +4 -4
- package/batteries/tools/retrievables.mjs +4 -4
- package/batteries/tools/standing_instructions.cjs +4 -4
- package/batteries/tools/standing_instructions.mjs +4 -4
- package/batteries/tools/statistics.cjs +4 -4
- package/batteries/tools/statistics.mjs +4 -4
- package/batteries/tools/string_processing.cjs +3 -3
- package/batteries/tools/string_processing.mjs +3 -3
- package/batteries/tools/structured_data.cjs +3 -3
- package/batteries/tools/structured_data.mjs +3 -3
- package/batteries/tools/text_analysis.cjs +3 -3
- package/batteries/tools/text_analysis.mjs +3 -3
- package/batteries/tools/text_comparison.cjs +2 -2
- package/batteries/tools/text_comparison.mjs +2 -2
- package/batteries/tools/time.cjs +2 -2
- package/batteries/tools/time.mjs +2 -2
- package/batteries/tools/unit_conversion.cjs +2 -2
- package/batteries/tools/unit_conversion.mjs +2 -2
- package/batteries.cjs +13 -0
- package/batteries.mjs +8 -3
- package/{common-DuKWGTVd.js → common-D_e5zYsG.js} +8 -8
- package/{common-DuKWGTVd.js.map → common-D_e5zYsG.js.map} +1 -1
- package/{common-ClCHam5-.mjs → common-lMrnzoyn.mjs} +8 -8
- package/{common-ClCHam5-.mjs.map → common-lMrnzoyn.mjs.map} +1 -1
- package/common.cjs +7 -7
- package/common.mjs +7 -7
- package/{dispatch_runner-uNtS-XSP.mjs → dispatch_runner-CDF3X0nv.mjs} +3 -3
- package/{dispatch_runner-uNtS-XSP.mjs.map → dispatch_runner-CDF3X0nv.mjs.map} +1 -1
- package/{dispatch_runner-CEFHXRJZ.js → dispatch_runner-CpuyATj1.js} +3 -3
- package/{dispatch_runner-CEFHXRJZ.js.map → dispatch_runner-CpuyATj1.js.map} +1 -1
- package/dispatch_runner.cjs +1 -1
- package/dispatch_runner.mjs +1 -1
- package/exceptions.cjs +1 -1
- package/exceptions.mjs +1 -1
- package/forge.cjs +4 -4
- package/forge.mjs +4 -4
- package/guards.cjs +8 -8
- package/guards.mjs +8 -8
- package/index.cjs +12 -12
- package/index.mjs +12 -12
- package/lib/exceptions/runtime.d.ts +5 -0
- package/lib/utils/retry.cjs +107 -0
- package/lib/utils/retry.cjs.map +1 -0
- package/lib/utils/retry.d.ts +63 -0
- package/lib/utils/retry.mjs +102 -0
- package/lib/utils/retry.mjs.map +1 -0
- package/mcp/adk-docs-corpus.json +1 -1
- package/package.json +138 -73
- package/{runtime-DyD9oQjH.js → runtime-MFFcJrRv.js} +6 -2
- package/runtime-MFFcJrRv.js.map +1 -0
- package/{runtime-CDIZwCT0.mjs → runtime-j92CNi5z.mjs} +6 -2
- package/runtime-j92CNi5z.mjs.map +1 -0
- package/skills/adk-assembly/SKILL.md +2 -2
- package/{spooled_artifact-CHvDDYGA.js → spooled_artifact-B8gIIn9h.js} +4 -4
- package/{spooled_artifact-CHvDDYGA.js.map → spooled_artifact-B8gIIn9h.js.map} +1 -1
- package/{spooled_artifact-D-JrpY4W.mjs → spooled_artifact-CWoKUDEm.mjs} +4 -4
- package/{spooled_artifact-D-JrpY4W.mjs.map → spooled_artifact-CWoKUDEm.mjs.map} +1 -1
- package/spooled_artifact.cjs +2 -2
- package/spooled_artifact.mjs +2 -2
- package/{spooled_markdown_artifact-B4eWOfCX.mjs → spooled_markdown_artifact-CNle4jXN.mjs} +3 -3
- package/{spooled_markdown_artifact-B4eWOfCX.mjs.map → spooled_markdown_artifact-CNle4jXN.mjs.map} +1 -1
- package/{spooled_markdown_artifact-BYfPqFvk.js → spooled_markdown_artifact-DQX0RCdI.js} +3 -3
- package/{spooled_markdown_artifact-BYfPqFvk.js.map → spooled_markdown_artifact-DQX0RCdI.js.map} +1 -1
- package/{thought-DBNsR6l8.js → thought-BD6AkkOr.js} +4 -4
- package/{thought-DBNsR6l8.js.map → thought-BD6AkkOr.js.map} +1 -1
- package/{thought-D9IS11b5.mjs → thought-B_P8LiB6.mjs} +4 -4
- package/{thought-D9IS11b5.mjs.map → thought-B_P8LiB6.mjs.map} +1 -1
- package/{tool-CsYuHhiS.mjs → tool-CRZSUcdP.mjs} +3 -3
- package/{tool-CsYuHhiS.mjs.map → tool-CRZSUcdP.mjs.map} +1 -1
- package/{tool-DIHzOZiV.js → tool-CX9vNHAw.js} +3 -3
- package/{tool-DIHzOZiV.js.map → tool-CX9vNHAw.js.map} +1 -1
- package/{tool_call-CkOVOhg0.js → tool_call--7ti-frB.js} +4 -4
- package/{tool_call-CkOVOhg0.js.map → tool_call--7ti-frB.js.map} +1 -1
- package/{tool_call-Bs_Q5LOG.mjs → tool_call-BUeMuCc6.mjs} +4 -4
- package/{tool_call-Bs_Q5LOG.mjs.map → tool_call-BUeMuCc6.mjs.map} +1 -1
- package/{tool_registry-CX3ofUh9.mjs → tool_registry-BGHg6KTq.mjs} +2 -2
- package/{tool_registry-CX3ofUh9.mjs.map → tool_registry-BGHg6KTq.mjs.map} +1 -1
- package/{tool_registry-CKk5ooxm.js → tool_registry-CtCQ4Xoz.js} +2 -2
- package/{tool_registry-CKk5ooxm.js.map → tool_registry-CtCQ4Xoz.js.map} +1 -1
- package/{turn_runner-D0qGIrRI.js → turn_runner-BJTtAORU.js} +7 -6
- package/turn_runner-BJTtAORU.js.map +1 -0
- package/{turn_runner-C1-mup84.mjs → turn_runner-C02LZHjt.mjs} +8 -7
- package/turn_runner-C02LZHjt.mjs.map +1 -0
- package/turn_runner.cjs +1 -1
- package/turn_runner.mjs +1 -1
- package/runtime-CDIZwCT0.mjs.map +0 -1
- package/runtime-DyD9oQjH.js.map +0 -1
- package/turn_runner-C1-mup84.mjs.map +0 -1
- package/turn_runner-D0qGIrRI.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nhtio/adk",
|
|
3
|
-
"version": "0.1.0-master-
|
|
3
|
+
"version": "0.1.0-master-bd43a4ea",
|
|
4
4
|
"description": "An opinionated Agent Development Kit for building custom AI agents with bring-your-own infrastructure and opt-in batteries.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -117,20 +117,15 @@
|
|
|
117
117
|
"require": "./forge.cjs",
|
|
118
118
|
"types": "./forge.d.ts"
|
|
119
119
|
},
|
|
120
|
-
"./exceptions": {
|
|
121
|
-
"import": "./exceptions.mjs",
|
|
122
|
-
"require": "./exceptions.cjs",
|
|
123
|
-
"types": "./exceptions.d.ts"
|
|
124
|
-
},
|
|
125
120
|
"./guards": {
|
|
126
121
|
"import": "./guards.mjs",
|
|
127
122
|
"require": "./guards.cjs",
|
|
128
123
|
"types": "./guards.d.ts"
|
|
129
124
|
},
|
|
130
|
-
"./
|
|
131
|
-
"import": "./
|
|
132
|
-
"require": "./
|
|
133
|
-
"types": "./
|
|
125
|
+
"./exceptions": {
|
|
126
|
+
"import": "./exceptions.mjs",
|
|
127
|
+
"require": "./exceptions.cjs",
|
|
128
|
+
"types": "./exceptions.d.ts"
|
|
134
129
|
},
|
|
135
130
|
"./turn_runner": {
|
|
136
131
|
"import": "./turn_runner.mjs",
|
|
@@ -142,16 +137,31 @@
|
|
|
142
137
|
"require": "./types.cjs",
|
|
143
138
|
"types": "./types.d.ts"
|
|
144
139
|
},
|
|
145
|
-
"./
|
|
146
|
-
"import": "./
|
|
147
|
-
"require": "./
|
|
148
|
-
"types": "./
|
|
140
|
+
"./spooled_artifact": {
|
|
141
|
+
"import": "./spooled_artifact.mjs",
|
|
142
|
+
"require": "./spooled_artifact.cjs",
|
|
143
|
+
"types": "./spooled_artifact.d.ts"
|
|
144
|
+
},
|
|
145
|
+
"./lib/utils/retry": {
|
|
146
|
+
"import": "./lib/utils/retry.mjs",
|
|
147
|
+
"require": "./lib/utils/retry.cjs",
|
|
148
|
+
"types": "./lib/utils/retry.d.ts"
|
|
149
149
|
},
|
|
150
150
|
"./batteries/tools": {
|
|
151
151
|
"import": "./batteries/tools.mjs",
|
|
152
152
|
"require": "./batteries/tools.cjs",
|
|
153
153
|
"types": "./batteries/tools/index.d.ts"
|
|
154
154
|
},
|
|
155
|
+
"./batteries": {
|
|
156
|
+
"import": "./batteries.mjs",
|
|
157
|
+
"require": "./batteries.cjs",
|
|
158
|
+
"types": "./batteries/index.d.ts"
|
|
159
|
+
},
|
|
160
|
+
"./batteries/tools/text_comparison": {
|
|
161
|
+
"import": "./batteries/tools/text_comparison.mjs",
|
|
162
|
+
"require": "./batteries/tools/text_comparison.cjs",
|
|
163
|
+
"types": "./batteries/tools/text_comparison/index.d.ts"
|
|
164
|
+
},
|
|
155
165
|
"./batteries/tools/unit_conversion": {
|
|
156
166
|
"import": "./batteries/tools/unit_conversion.mjs",
|
|
157
167
|
"require": "./batteries/tools/unit_conversion.cjs",
|
|
@@ -162,46 +172,36 @@
|
|
|
162
172
|
"require": "./batteries/tools/time.cjs",
|
|
163
173
|
"types": "./batteries/tools/time/index.d.ts"
|
|
164
174
|
},
|
|
165
|
-
"./batteries/tools/text_comparison": {
|
|
166
|
-
"import": "./batteries/tools/text_comparison.mjs",
|
|
167
|
-
"require": "./batteries/tools/text_comparison.cjs",
|
|
168
|
-
"types": "./batteries/tools/text_comparison/index.d.ts"
|
|
169
|
-
},
|
|
170
175
|
"./batteries/tools/text_analysis": {
|
|
171
176
|
"import": "./batteries/tools/text_analysis.mjs",
|
|
172
177
|
"require": "./batteries/tools/text_analysis.cjs",
|
|
173
178
|
"types": "./batteries/tools/text_analysis/index.d.ts"
|
|
174
179
|
},
|
|
175
|
-
"./batteries/tools/structured_data": {
|
|
176
|
-
"import": "./batteries/tools/structured_data.mjs",
|
|
177
|
-
"require": "./batteries/tools/structured_data.cjs",
|
|
178
|
-
"types": "./batteries/tools/structured_data/index.d.ts"
|
|
179
|
-
},
|
|
180
180
|
"./batteries/tools/string_processing": {
|
|
181
181
|
"import": "./batteries/tools/string_processing.mjs",
|
|
182
182
|
"require": "./batteries/tools/string_processing.cjs",
|
|
183
183
|
"types": "./batteries/tools/string_processing/index.d.ts"
|
|
184
184
|
},
|
|
185
|
+
"./batteries/tools/structured_data": {
|
|
186
|
+
"import": "./batteries/tools/structured_data.mjs",
|
|
187
|
+
"require": "./batteries/tools/structured_data.cjs",
|
|
188
|
+
"types": "./batteries/tools/structured_data/index.d.ts"
|
|
189
|
+
},
|
|
185
190
|
"./batteries/tools/statistics": {
|
|
186
191
|
"import": "./batteries/tools/statistics.mjs",
|
|
187
192
|
"require": "./batteries/tools/statistics.cjs",
|
|
188
193
|
"types": "./batteries/tools/statistics/index.d.ts"
|
|
189
194
|
},
|
|
190
|
-
"./batteries/tools/standing_instructions": {
|
|
191
|
-
"import": "./batteries/tools/standing_instructions.mjs",
|
|
192
|
-
"require": "./batteries/tools/standing_instructions.cjs",
|
|
193
|
-
"types": "./batteries/tools/standing_instructions/index.d.ts"
|
|
194
|
-
},
|
|
195
|
-
"./batteries/tools/memory": {
|
|
196
|
-
"import": "./batteries/tools/memory.mjs",
|
|
197
|
-
"require": "./batteries/tools/memory.cjs",
|
|
198
|
-
"types": "./batteries/tools/memory/index.d.ts"
|
|
199
|
-
},
|
|
200
195
|
"./batteries/tools/retrievables": {
|
|
201
196
|
"import": "./batteries/tools/retrievables.mjs",
|
|
202
197
|
"require": "./batteries/tools/retrievables.cjs",
|
|
203
198
|
"types": "./batteries/tools/retrievables/index.d.ts"
|
|
204
199
|
},
|
|
200
|
+
"./batteries/tools/parsing": {
|
|
201
|
+
"import": "./batteries/tools/parsing.mjs",
|
|
202
|
+
"require": "./batteries/tools/parsing.cjs",
|
|
203
|
+
"types": "./batteries/tools/parsing/index.d.ts"
|
|
204
|
+
},
|
|
205
205
|
"./batteries/tools/math": {
|
|
206
206
|
"import": "./batteries/tools/math.mjs",
|
|
207
207
|
"require": "./batteries/tools/math.cjs",
|
|
@@ -212,21 +212,36 @@
|
|
|
212
212
|
"require": "./batteries/tools/geo_basics.cjs",
|
|
213
213
|
"types": "./batteries/tools/geo_basics/index.d.ts"
|
|
214
214
|
},
|
|
215
|
-
"./batteries/tools/
|
|
216
|
-
"import": "./batteries/tools/
|
|
217
|
-
"require": "./batteries/tools/
|
|
218
|
-
"types": "./batteries/tools/
|
|
215
|
+
"./batteries/tools/memory": {
|
|
216
|
+
"import": "./batteries/tools/memory.mjs",
|
|
217
|
+
"require": "./batteries/tools/memory.cjs",
|
|
218
|
+
"types": "./batteries/tools/memory/index.d.ts"
|
|
219
219
|
},
|
|
220
220
|
"./batteries/tools/encoding": {
|
|
221
221
|
"import": "./batteries/tools/encoding.mjs",
|
|
222
222
|
"require": "./batteries/tools/encoding.cjs",
|
|
223
223
|
"types": "./batteries/tools/encoding/index.d.ts"
|
|
224
224
|
},
|
|
225
|
+
"./batteries/tools/formatting": {
|
|
226
|
+
"import": "./batteries/tools/formatting.mjs",
|
|
227
|
+
"require": "./batteries/tools/formatting.cjs",
|
|
228
|
+
"types": "./batteries/tools/formatting/index.d.ts"
|
|
229
|
+
},
|
|
225
230
|
"./batteries/tools/datetime_math": {
|
|
226
231
|
"import": "./batteries/tools/datetime_math.mjs",
|
|
227
232
|
"require": "./batteries/tools/datetime_math.cjs",
|
|
228
233
|
"types": "./batteries/tools/datetime_math/index.d.ts"
|
|
229
234
|
},
|
|
235
|
+
"./batteries/tools/datetime_extended": {
|
|
236
|
+
"import": "./batteries/tools/datetime_extended.mjs",
|
|
237
|
+
"require": "./batteries/tools/datetime_extended.cjs",
|
|
238
|
+
"types": "./batteries/tools/datetime_extended/index.d.ts"
|
|
239
|
+
},
|
|
240
|
+
"./batteries/tools/standing_instructions": {
|
|
241
|
+
"import": "./batteries/tools/standing_instructions.mjs",
|
|
242
|
+
"require": "./batteries/tools/standing_instructions.cjs",
|
|
243
|
+
"types": "./batteries/tools/standing_instructions/index.d.ts"
|
|
244
|
+
},
|
|
230
245
|
"./batteries/tools/data_structure": {
|
|
231
246
|
"import": "./batteries/tools/data_structure.mjs",
|
|
232
247
|
"require": "./batteries/tools/data_structure.cjs",
|
|
@@ -237,21 +252,16 @@
|
|
|
237
252
|
"require": "./batteries/tools/comparison.cjs",
|
|
238
253
|
"types": "./batteries/tools/comparison/index.d.ts"
|
|
239
254
|
},
|
|
240
|
-
"./batteries/
|
|
241
|
-
"import": "./batteries/
|
|
242
|
-
"require": "./batteries/
|
|
243
|
-
"types": "./batteries/
|
|
255
|
+
"./batteries/storage": {
|
|
256
|
+
"import": "./batteries/storage.mjs",
|
|
257
|
+
"require": "./batteries/storage.cjs",
|
|
258
|
+
"types": "./batteries/storage/index.d.ts"
|
|
244
259
|
},
|
|
245
260
|
"./batteries/tools/color": {
|
|
246
261
|
"import": "./batteries/tools/color.mjs",
|
|
247
262
|
"require": "./batteries/tools/color.cjs",
|
|
248
263
|
"types": "./batteries/tools/color/index.d.ts"
|
|
249
264
|
},
|
|
250
|
-
"./batteries/storage": {
|
|
251
|
-
"import": "./batteries/storage.mjs",
|
|
252
|
-
"require": "./batteries/storage.cjs",
|
|
253
|
-
"types": "./batteries/storage/index.d.ts"
|
|
254
|
-
},
|
|
255
265
|
"./batteries/storage/opfs": {
|
|
256
266
|
"import": "./batteries/storage/opfs.mjs",
|
|
257
267
|
"require": "./batteries/storage/opfs.cjs",
|
|
@@ -262,26 +272,26 @@
|
|
|
262
272
|
"require": "./batteries/storage/in_memory.cjs",
|
|
263
273
|
"types": "./batteries/storage/in_memory/index.d.ts"
|
|
264
274
|
},
|
|
265
|
-
"./batteries/llm": {
|
|
266
|
-
"import": "./batteries/llm.mjs",
|
|
267
|
-
"require": "./batteries/llm.cjs",
|
|
268
|
-
"types": "./batteries/llm/index.d.ts"
|
|
269
|
-
},
|
|
270
275
|
"./batteries/storage/flydrive": {
|
|
271
276
|
"import": "./batteries/storage/flydrive.mjs",
|
|
272
277
|
"require": "./batteries/storage/flydrive.cjs",
|
|
273
278
|
"types": "./batteries/storage/flydrive/index.d.ts"
|
|
274
279
|
},
|
|
275
|
-
"./batteries/llm
|
|
276
|
-
"import": "./batteries/llm
|
|
277
|
-
"require": "./batteries/llm
|
|
278
|
-
"types": "./batteries/llm/
|
|
280
|
+
"./batteries/llm": {
|
|
281
|
+
"import": "./batteries/llm.mjs",
|
|
282
|
+
"require": "./batteries/llm.cjs",
|
|
283
|
+
"types": "./batteries/llm/index.d.ts"
|
|
279
284
|
},
|
|
280
285
|
"./batteries/llm/webllm_chat_completions/exceptions": {
|
|
281
286
|
"import": "./batteries/llm/webllm_chat_completions/exceptions.mjs",
|
|
282
287
|
"require": "./batteries/llm/webllm_chat_completions/exceptions.cjs",
|
|
283
288
|
"types": "./batteries/llm/webllm_chat_completions/exceptions.d.ts"
|
|
284
289
|
},
|
|
290
|
+
"./batteries/llm/webllm_chat_completions/adapter": {
|
|
291
|
+
"import": "./batteries/llm/webllm_chat_completions/adapter.mjs",
|
|
292
|
+
"require": "./batteries/llm/webllm_chat_completions/adapter.cjs",
|
|
293
|
+
"types": "./batteries/llm/webllm_chat_completions/adapter.d.ts"
|
|
294
|
+
},
|
|
285
295
|
"./batteries/llm/webllm_chat_completions/helpers": {
|
|
286
296
|
"import": "./batteries/llm/webllm_chat_completions/helpers.mjs",
|
|
287
297
|
"require": "./batteries/llm/webllm_chat_completions/helpers.cjs",
|
|
@@ -297,40 +307,95 @@
|
|
|
297
307
|
"require": "./batteries/llm/webllm_chat_completions/validation.cjs",
|
|
298
308
|
"types": "./batteries/llm/webllm_chat_completions/validation.d.ts"
|
|
299
309
|
},
|
|
300
|
-
"./batteries/llm/openai_chat_completions/exceptions": {
|
|
301
|
-
"import": "./batteries/llm/openai_chat_completions/exceptions.mjs",
|
|
302
|
-
"require": "./batteries/llm/openai_chat_completions/exceptions.cjs",
|
|
303
|
-
"types": "./batteries/llm/openai_chat_completions/exceptions.d.ts"
|
|
304
|
-
},
|
|
305
310
|
"./batteries/llm/openai_chat_completions/adapter": {
|
|
306
311
|
"import": "./batteries/llm/openai_chat_completions/adapter.mjs",
|
|
307
312
|
"require": "./batteries/llm/openai_chat_completions/adapter.cjs",
|
|
308
313
|
"types": "./batteries/llm/openai_chat_completions/adapter.d.ts"
|
|
309
314
|
},
|
|
310
|
-
"./batteries/llm/openai_chat_completions": {
|
|
311
|
-
"import": "./batteries/llm/openai_chat_completions.mjs",
|
|
312
|
-
"require": "./batteries/llm/openai_chat_completions.cjs",
|
|
313
|
-
"types": "./batteries/llm/openai_chat_completions/
|
|
315
|
+
"./batteries/llm/openai_chat_completions/exceptions": {
|
|
316
|
+
"import": "./batteries/llm/openai_chat_completions/exceptions.mjs",
|
|
317
|
+
"require": "./batteries/llm/openai_chat_completions/exceptions.cjs",
|
|
318
|
+
"types": "./batteries/llm/openai_chat_completions/exceptions.d.ts"
|
|
314
319
|
},
|
|
315
320
|
"./batteries/llm/openai_chat_completions/helpers": {
|
|
316
321
|
"import": "./batteries/llm/openai_chat_completions/helpers.mjs",
|
|
317
322
|
"require": "./batteries/llm/openai_chat_completions/helpers.cjs",
|
|
318
323
|
"types": "./batteries/llm/openai_chat_completions/helpers.d.ts"
|
|
319
324
|
},
|
|
320
|
-
"./batteries/llm/openai_chat_completions
|
|
321
|
-
"import": "./batteries/llm/openai_chat_completions
|
|
322
|
-
"require": "./batteries/llm/openai_chat_completions
|
|
323
|
-
"types": "./batteries/llm/openai_chat_completions/
|
|
325
|
+
"./batteries/llm/openai_chat_completions": {
|
|
326
|
+
"import": "./batteries/llm/openai_chat_completions.mjs",
|
|
327
|
+
"require": "./batteries/llm/openai_chat_completions.cjs",
|
|
328
|
+
"types": "./batteries/llm/openai_chat_completions/index.d.ts"
|
|
324
329
|
},
|
|
325
330
|
"./batteries/llm/openai_chat_completions/validation": {
|
|
326
331
|
"import": "./batteries/llm/openai_chat_completions/validation.mjs",
|
|
327
332
|
"require": "./batteries/llm/openai_chat_completions/validation.cjs",
|
|
328
333
|
"types": "./batteries/llm/openai_chat_completions/validation.d.ts"
|
|
329
334
|
},
|
|
330
|
-
"./batteries/
|
|
331
|
-
"import": "./batteries/
|
|
332
|
-
"require": "./batteries/
|
|
333
|
-
"types": "./batteries/
|
|
335
|
+
"./batteries/embeddings": {
|
|
336
|
+
"import": "./batteries/embeddings.mjs",
|
|
337
|
+
"require": "./batteries/embeddings.cjs",
|
|
338
|
+
"types": "./batteries/embeddings/index.d.ts"
|
|
339
|
+
},
|
|
340
|
+
"./batteries/llm/openai_chat_completions/types": {
|
|
341
|
+
"import": "./batteries/llm/openai_chat_completions/types.mjs",
|
|
342
|
+
"require": "./batteries/llm/openai_chat_completions/types.cjs",
|
|
343
|
+
"types": "./batteries/llm/openai_chat_completions/types.d.ts"
|
|
344
|
+
},
|
|
345
|
+
"./batteries/embeddings/webllm/adapter": {
|
|
346
|
+
"import": "./batteries/embeddings/webllm/adapter.mjs",
|
|
347
|
+
"require": "./batteries/embeddings/webllm/adapter.cjs",
|
|
348
|
+
"types": "./batteries/embeddings/webllm/adapter.d.ts"
|
|
349
|
+
},
|
|
350
|
+
"./batteries/embeddings/webllm/exceptions": {
|
|
351
|
+
"import": "./batteries/embeddings/webllm/exceptions.mjs",
|
|
352
|
+
"require": "./batteries/embeddings/webllm/exceptions.cjs",
|
|
353
|
+
"types": "./batteries/embeddings/webllm/exceptions.d.ts"
|
|
354
|
+
},
|
|
355
|
+
"./batteries/embeddings/webllm": {
|
|
356
|
+
"import": "./batteries/embeddings/webllm.mjs",
|
|
357
|
+
"require": "./batteries/embeddings/webllm.cjs",
|
|
358
|
+
"types": "./batteries/embeddings/webllm/index.d.ts"
|
|
359
|
+
},
|
|
360
|
+
"./batteries/embeddings/webllm/types": {
|
|
361
|
+
"import": "./batteries/embeddings/webllm/types.mjs",
|
|
362
|
+
"require": "./batteries/embeddings/webllm/types.cjs",
|
|
363
|
+
"types": "./batteries/embeddings/webllm/types.d.ts"
|
|
364
|
+
},
|
|
365
|
+
"./batteries/embeddings/webllm/validation": {
|
|
366
|
+
"import": "./batteries/embeddings/webllm/validation.mjs",
|
|
367
|
+
"require": "./batteries/embeddings/webllm/validation.cjs",
|
|
368
|
+
"types": "./batteries/embeddings/webllm/validation.d.ts"
|
|
369
|
+
},
|
|
370
|
+
"./batteries/embeddings/openai/adapter": {
|
|
371
|
+
"import": "./batteries/embeddings/openai/adapter.mjs",
|
|
372
|
+
"require": "./batteries/embeddings/openai/adapter.cjs",
|
|
373
|
+
"types": "./batteries/embeddings/openai/adapter.d.ts"
|
|
374
|
+
},
|
|
375
|
+
"./batteries/embeddings/openai/exceptions": {
|
|
376
|
+
"import": "./batteries/embeddings/openai/exceptions.mjs",
|
|
377
|
+
"require": "./batteries/embeddings/openai/exceptions.cjs",
|
|
378
|
+
"types": "./batteries/embeddings/openai/exceptions.d.ts"
|
|
379
|
+
},
|
|
380
|
+
"./batteries/embeddings/openai": {
|
|
381
|
+
"import": "./batteries/embeddings/openai.mjs",
|
|
382
|
+
"require": "./batteries/embeddings/openai.cjs",
|
|
383
|
+
"types": "./batteries/embeddings/openai/index.d.ts"
|
|
384
|
+
},
|
|
385
|
+
"./batteries/embeddings/openai/helpers": {
|
|
386
|
+
"import": "./batteries/embeddings/openai/helpers.mjs",
|
|
387
|
+
"require": "./batteries/embeddings/openai/helpers.cjs",
|
|
388
|
+
"types": "./batteries/embeddings/openai/helpers.d.ts"
|
|
389
|
+
},
|
|
390
|
+
"./batteries/embeddings/openai/types": {
|
|
391
|
+
"import": "./batteries/embeddings/openai/types.mjs",
|
|
392
|
+
"require": "./batteries/embeddings/openai/types.cjs",
|
|
393
|
+
"types": "./batteries/embeddings/openai/types.d.ts"
|
|
394
|
+
},
|
|
395
|
+
"./batteries/embeddings/openai/validation": {
|
|
396
|
+
"import": "./batteries/embeddings/openai/validation.mjs",
|
|
397
|
+
"require": "./batteries/embeddings/openai/validation.cjs",
|
|
398
|
+
"types": "./batteries/embeddings/openai/validation.d.ts"
|
|
334
399
|
}
|
|
335
400
|
},
|
|
336
401
|
"type": "module",
|
|
@@ -7,9 +7,13 @@ const require_exceptions = require("./exceptions-CitH5wZI.js");
|
|
|
7
7
|
* @remarks
|
|
8
8
|
* Marked fatal — a misconfigured runner must not be allowed to execute turns.
|
|
9
9
|
*
|
|
10
|
+
* The single printf argument carries the validator's field-level detail (e.g.
|
|
11
|
+
* `"storeMediaBytesCallback is required"`) so a misconfiguration names the offending field
|
|
12
|
+
* instead of failing opaquely. The underlying `ValidationError` is also attached on `cause`.
|
|
13
|
+
*
|
|
10
14
|
* @group Turn Runner Construction
|
|
11
15
|
*/
|
|
12
|
-
var E_INVALID_TURN_RUNNER_CONFIG = require_exceptions.createException("E_INVALID_TURN_RUNNER_CONFIG", "The turn runner cannot be instantiated with the provided configuration
|
|
16
|
+
var E_INVALID_TURN_RUNNER_CONFIG = require_exceptions.createException("E_INVALID_TURN_RUNNER_CONFIG", "The turn runner cannot be instantiated with the provided configuration: %s", "E_INVALID_TURN_RUNNER_CONFIG", 529, true);
|
|
13
17
|
/**
|
|
14
18
|
* Thrown by {@link @nhtio/adk!TurnRunner} when the {@link @nhtio/adk!TurnContext} supplied to `run` fails schema
|
|
15
19
|
* validation.
|
|
@@ -516,4 +520,4 @@ Object.defineProperty(exports, "E_TURN_GATE_TIMEOUT", {
|
|
|
516
520
|
}
|
|
517
521
|
});
|
|
518
522
|
|
|
519
|
-
//# sourceMappingURL=runtime-
|
|
523
|
+
//# sourceMappingURL=runtime-MFFcJrRv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-MFFcJrRv.js","names":[],"sources":["../src/lib/exceptions/runtime.ts"],"sourcesContent":["import { createException } from '../utils/exceptions'\n\n/**\n * Thrown by {@link @nhtio/adk!TurnRunner} when the supplied config object fails schema validation at\n * construction time.\n *\n * @remarks\n * Marked fatal — a misconfigured runner must not be allowed to execute turns.\n *\n * The single printf argument carries the validator's field-level detail (e.g.\n * `\"storeMediaBytesCallback is required\"`) so a misconfiguration names the offending field\n * instead of failing opaquely. The underlying `ValidationError` is also attached on `cause`.\n *\n * @group Turn Runner Construction\n */\nexport const E_INVALID_TURN_RUNNER_CONFIG = createException<[string]>(\n 'E_INVALID_TURN_RUNNER_CONFIG',\n 'The turn runner cannot be instantiated with the provided configuration: %s',\n 'E_INVALID_TURN_RUNNER_CONFIG',\n 529,\n true\n)\n\n/**\n * Thrown by {@link @nhtio/adk!TurnRunner} when the {@link @nhtio/adk!TurnContext} supplied to `run` fails schema\n * validation.\n *\n * @remarks\n * Marked fatal — an invalid context indicates a programming error in the caller, not a\n * recoverable runtime condition. Thrown synchronously out of `run()` before `turnStart` is\n * emitted.\n *\n * @group Turn Input Validation\n */\nexport const E_INVALID_TURN_CONTEXT = createException(\n 'E_INVALID_TURN_CONTEXT',\n 'The turn runner received an invalid context object.',\n 'E_INVALID_TURN_CONTEXT',\n 529,\n true\n)\n\n/**\n * Emitted (via the `error` event) when a non-abort error propagates out of the input\n * middleware pipeline during {@link @nhtio/adk!TurnRunner.run}.\n *\n * @remarks\n * Not fatal — the turn runner emits this on the `error` event rather than throwing, so\n * registered listeners can handle or log the failure without crashing the pipeline. Dispatch\n * and output middleware are skipped; `turnEnd` still fires.\n *\n * @group Pipelines\n */\nexport const E_INPUT_PIPELINE_ERROR = createException(\n 'E_INPUT_PIPELINE_ERROR',\n 'An error occurred in the input pipeline.',\n 'E_INPUT_PIPELINE_ERROR',\n 500,\n false\n)\n\n/**\n * Emitted (via the `error` event) when a non-abort error propagates out of the output\n * middleware pipeline during {@link @nhtio/adk!TurnRunner.run}.\n *\n * @remarks\n * Not fatal — the turn runner emits this on the `error` event rather than throwing, so\n * registered listeners can handle or log the failure without crashing the pipeline. `turnEnd`\n * still fires.\n *\n * @group Pipelines\n */\nexport const E_OUTPUT_PIPELINE_ERROR = createException(\n 'E_OUTPUT_PIPELINE_ERROR',\n 'An error occurred in the output pipeline.',\n 'E_OUTPUT_PIPELINE_ERROR',\n 500,\n false\n)\n\n/**\n * Emitted (via the `error` event) when a middleware pipeline resolves without reaching its\n * terminal handler and without the turn being aborted. Indicates that some middleware\n * returned without calling `next` and without signalling a deliberate refusal via the turn's\n * abort controller.\n *\n * @remarks\n * Not fatal — the runner emits this on the `error` event so the failure is observable, then\n * proceeds to short-circuit the remainder of the turn the same way any other pipeline error\n * would. The constructor takes a single positional argument identifying the pipeline that\n * short-circuited: one of `'turn-input'`, `'turn-output'`, `'dispatch-input'`, or `'dispatch-output'`.\n *\n * Deliberate refusals should call `ctx.abort(reason)`, which sets the `'aborted'` outcome\n * instead of emitting this error.\n *\n * @warning\n * This is a **detection condition**, not a thrown exception. The runner constructs and emits\n * the code itself when it detects a missing `next()` on the unwind — nothing in user code\n * throws it. Upstream post-steps still run normally.\n *\n * @example\n * ```ts\n * throw new E_PIPELINE_SHORT_CIRCUITED(['turn-input'])\n * ```\n *\n * @group Pipelines\n */\nexport const E_PIPELINE_SHORT_CIRCUITED = createException<[string]>(\n 'E_PIPELINE_SHORT_CIRCUITED',\n \"The '%s' middleware pipeline short-circuited without calling next or aborting the turn.\",\n 'E_PIPELINE_SHORT_CIRCUITED',\n 500,\n false\n)\n\n/**\n * Thrown when a registry is initialised with a value that is defined but not a plain object.\n *\n * @remarks\n * Registries expect either `undefined` (empty start) or a plain object as their initial value.\n * Passing a primitive, array, class instance, or other non-object signals a programming error\n * in the caller.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_REGISTRY_VALUE = createException(\n 'E_INVALID_INITIAL_REGISTRY_VALUE',\n 'Attempted to initialize a registry with a defined non-object value.',\n 'E_INVALID_INITIAL_REGISTRY_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Memory} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Memory` requires all fields — `id`, `content`, `confidence`, `importance`, `createdAt`,\n * `updatedAt` — to be present and of the correct type. Passing an incomplete or incorrectly\n * typed object signals a programming error in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_MEMORY_VALUE = createException(\n 'E_INVALID_INITIAL_MEMORY_VALUE',\n 'Attempted to initialize a memory with an invalid value.',\n 'E_INVALID_INITIAL_MEMORY_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Retrievable} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Retrievable` requires `id`, `content`, `trustTier`, `createdAt`, and `updatedAt` to be present\n * and of the correct type, and `trustTier` must be one of `'first-party'`, `'third-party-public'`,\n * or `'third-party-private'`. The `trustTier` decision must be made consciously by the retrieval\n * middleware at construction time — there is no default. Passing an incomplete or incorrectly\n * typed object signals a programming error in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_RETRIEVABLE_VALUE = createException(\n 'E_INVALID_INITIAL_RETRIEVABLE_VALUE',\n 'Invalid initial value supplied to Retrievable constructor.',\n 'E_INVALID_INITIAL_RETRIEVABLE_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Message} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Message` requires `id`, `role` (`user` or `assistant`), `content`, `createdAt`, and\n * `updatedAt` to be present and of the correct type. Passing an incomplete or incorrectly\n * typed object signals a programming error in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_MESSAGE_VALUE = createException(\n 'E_INVALID_INITIAL_MESSAGE_VALUE',\n 'Attempted to initialize a message with an invalid value.',\n 'E_INVALID_INITIAL_MESSAGE_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when an {@link @nhtio/adk!Identity} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Identity` requires both `identifier` (string or number) and `representation` (string or\n * {@link @nhtio/adk!Tokenizable}) to be present and of the correct type. Passing an incomplete or\n * incorrectly typed object signals a programming error in the caller.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_IDENTITY_VALUE = createException(\n 'E_INVALID_INITIAL_IDENTITY_VALUE',\n 'Attempted to initialize an identity with an invalid value.',\n 'E_INVALID_INITIAL_IDENTITY_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Thought} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Thought` requires `id`, `content`, `createdAt`, and `updatedAt` to be present and of the\n * correct type. Passing an incomplete or incorrectly typed object signals a programming error\n * in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_THOUGHT_VALUE = createException(\n 'E_INVALID_INITIAL_THOUGHT_VALUE',\n 'Attempted to initialize a thought with an invalid value.',\n 'E_INVALID_INITIAL_THOUGHT_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!TurnGate} is constructed with a value that fails schema validation.\n *\n * @remarks\n * Fatal — bad construction arguments indicate a programming error in the caller.\n *\n * @group Gates\n */\nexport const E_INVALID_INITIAL_TURN_GATE_VALUE = createException(\n 'E_INVALID_INITIAL_TURN_GATE_VALUE',\n 'Attempted to initialize a turn gate with an invalid value.',\n 'E_INVALID_INITIAL_TURN_GATE_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown synchronously in the caller's context when {@link @nhtio/adk!TurnGate.resolve} is called with a\n * value that fails the gate's schema.\n *\n * @remarks\n * Fatal — passing the wrong type to `resolve()` is a programming error. The internal promise is\n * NOT settled when this is thrown; the gate remains open.\n *\n * @group Gates\n */\nexport const E_INVALID_TURN_GATE_RESOLUTION = createException(\n 'E_INVALID_TURN_GATE_RESOLUTION',\n 'The value supplied to TurnGate.resolve() failed schema validation.',\n 'E_INVALID_TURN_GATE_RESOLUTION',\n 500,\n true\n)\n\n/**\n * Thrown (as a rejection reason) when a {@link @nhtio/adk!TurnGate} times out before being resolved.\n *\n * @remarks\n * Not fatal — a timeout is a recoverable runtime condition; the caller may retry or surface it\n * to the user.\n *\n * @warning\n * A timeout does **not** cancel the external event or clear any remote queue. The gate closes\n * locally, but whatever external system was expected to call `gate.resolve()` may still fire\n * later. Orphaned external state must be handled by the caller.\n *\n * @group Gates\n */\nexport const E_TURN_GATE_TIMEOUT = createException(\n 'E_TURN_GATE_TIMEOUT',\n 'The turn gate timed out before being resolved.',\n 'E_TURN_GATE_TIMEOUT',\n 408,\n false\n)\n\n/**\n * Thrown (as a rejection reason) when a {@link @nhtio/adk!TurnGate} is aborted — either because the turn's\n * `AbortSignal` fired or because {@link @nhtio/adk!TurnGate.abort} was called directly.\n *\n * @remarks\n * Not fatal — abort is an intentional cancellation, not an error in the caller.\n *\n * @group Gates\n */\nexport const E_TURN_GATE_ABORTED = createException(\n 'E_TURN_GATE_ABORTED',\n 'The turn gate was aborted before being resolved.',\n 'E_TURN_GATE_ABORTED',\n 499,\n false\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!SpooledArtifact} is constructed with a value that does not implement the\n * {@link @nhtio/adk!SpoolReader} interface.\n *\n * @remarks\n * Validated at construction time via {@link @nhtio/adk!implementsSpoolReader}. Passing anything that lacks\n * `line`, `byteLength`, or `lineCount` as callable functions signals a programming error in the\n * caller.\n *\n * @group Artifacts\n */\nexport const E_NOT_A_SPOOL_READER = createException(\n 'E_NOT_A_SPOOL_READER',\n 'The provided value does not implement the SpoolReader interface.',\n 'E_NOT_A_SPOOL_READER',\n 500,\n true\n)\n\n/**\n * Thrown when a Media is constructed with a value that does not implement the MediaReader\n * interface.\n *\n * @remarks\n * Validated at construction time. Passing anything that lacks `stream` or `byteLength` as\n * callable functions signals a programming error in the caller.\n *\n * @group Artifacts\n */\nexport const E_NOT_A_MEDIA_READER = createException(\n 'E_NOT_A_MEDIA_READER',\n 'The provided value does not implement the MediaReader interface.',\n 'E_NOT_A_MEDIA_READER',\n 500,\n true\n)\n\n/**\n * Thrown when a Media is initialised with a value that fails schema validation.\n *\n * @remarks\n * Fatal — bad construction arguments indicate a programming error in the caller.\n *\n * @group Artifacts\n */\nexport const E_INVALID_INITIAL_MEDIA_VALUE = createException(\n 'E_INVALID_INITIAL_MEDIA_VALUE',\n 'Attempted to initialize a media with an invalid value.',\n 'E_INVALID_INITIAL_MEDIA_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!ToolCall} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `ToolCall` requires `id`, `tool`, `args`, `checksum`, `isComplete`, `isError`, `createdAt`,\n * and `updatedAt` to be present and of the correct type. Passing an incomplete or incorrectly\n * typed object signals a programming error in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_TOOL_CALL_VALUE = createException(\n 'E_INVALID_INITIAL_TOOL_CALL_VALUE',\n 'Attempted to initialize a tool call with an invalid value.',\n 'E_INVALID_INITIAL_TOOL_CALL_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Tool} is constructed with a value that fails schema validation.\n *\n * @remarks\n * Fatal — bad construction arguments indicate a programming error in the caller.\n *\n * @group Tools\n */\nexport const E_INVALID_INITIAL_TOOL_VALUE = createException(\n 'E_INVALID_INITIAL_TOOL_VALUE',\n 'Attempted to initialize a tool with an invalid value.',\n 'E_INVALID_INITIAL_TOOL_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown synchronously when {@link @nhtio/adk!Tool.validate} is called with arguments that fail the tool's\n * input schema.\n *\n * @remarks\n * Not fatal — an arg validation failure in the tool call loop is a caller mistake that can be\n * surfaced as an error response. The tool handler is NOT called when this is thrown.\n *\n * @group Tools\n */\nexport const E_INVALID_TOOL_ARGS = createException(\n 'E_INVALID_TOOL_ARGS',\n 'The arguments supplied to the tool failed input schema validation.',\n 'E_INVALID_TOOL_ARGS',\n 422,\n false\n)\n\n/**\n * Thrown (as a rejection reason) when a {@link @nhtio/adk!Tool}'s handler throws during execution.\n *\n * @remarks\n * Not fatal — a downstream tool failure is a recoverable runtime condition. The tool call loop\n * catches this error specifically to report the failure back to the model rather than crashing\n * the pipeline.\n *\n * @group Tools\n */\nexport const E_TOOL_DOWNSTREAM_ERROR = createException(\n 'E_TOOL_DOWNSTREAM_ERROR',\n 'The tool handler threw an error during execution.',\n 'E_TOOL_DOWNSTREAM_ERROR',\n 500,\n false\n)\n\n/**\n * Thrown when {@link @nhtio/adk!ToolRegistry.register} is called for a tool name that is already registered\n * and `overwrite` is not `true`.\n *\n * @remarks\n * Fatal — accidentally overwriting a registered tool indicates a programming error. Pass\n * `overwrite: true` to replace an existing tool intentionally.\n *\n * @group Tools\n */\nexport const E_TOOL_ALREADY_REGISTERED = createException(\n 'E_TOOL_ALREADY_REGISTERED',\n 'A tool with this name is already registered. Pass overwrite: true to replace it.',\n 'E_TOOL_ALREADY_REGISTERED',\n 409,\n true\n)\n\n/**\n * Thrown when {@link @nhtio/adk!DispatchContext} is constructed with a value that fails schema validation.\n *\n * @remarks\n * Fatal — bad construction arguments indicate a programming error in the caller.\n *\n * @group Dispatch\n */\nexport const E_INVALID_LLM_EXECUTION_CONTEXT = createException(\n 'E_INVALID_LLM_EXECUTION_CONTEXT',\n 'The LLM execution context cannot be instantiated with the provided value.',\n 'E_INVALID_LLM_EXECUTION_CONTEXT',\n 529,\n true\n)\n\n/**\n * Thrown (as a rejection reason) when {@link @nhtio/adk!DispatchContext.waitFor} is called on a\n * standalone context that was constructed without a `waitFor` function.\n *\n * @remarks\n * Not fatal — the caller can catch this and handle the case where gate suspension is not\n * supported for this execution context.\n *\n * @group Dispatch\n */\nexport const E_LLM_EXECUTION_GATE_NOT_SUPPORTED = createException(\n 'E_LLM_EXECUTION_GATE_NOT_SUPPORTED',\n 'waitFor was called on a standalone DispatchContext with no gate function provided.',\n 'E_LLM_EXECUTION_GATE_NOT_SUPPORTED',\n 501,\n false\n)\n\n/**\n * Thrown when {@link @nhtio/adk!DispatchContext.ack} or {@link @nhtio/adk!DispatchContext.nack} is called on a\n * context that has already been signalled.\n *\n * @remarks\n * Fatal — signalling twice is a programming error in the caller. The first signal wins; the\n * second call is rejected loudly so callers cannot accidentally race between ack and nack.\n *\n * @danger\n * Signalling is **not** silently idempotent. The first `ack()` or `nack()` wins; the second\n * throws immediately. Guard with `if (!ctx.isSignalled)` when more than one seam may signal.\n *\n * @group Dispatch\n */\nexport const E_LLM_EXECUTION_ALREADY_SIGNALLED = createException(\n 'E_LLM_EXECUTION_ALREADY_SIGNALLED',\n 'ack() or nack() was called on an DispatchContext that has already been signalled.',\n 'E_LLM_EXECUTION_ALREADY_SIGNALLED',\n 500,\n true\n)\n\n/**\n * Thrown when {@link @nhtio/adk!DispatchRunner.dispatch} receives an input that fails schema validation.\n *\n * @remarks\n * Fatal — invalid dispatch input indicates a programming error in the caller.\n *\n * @group Dispatch\n */\nexport const E_INVALID_LLM_DISPATCH_INPUT = createException(\n 'E_INVALID_LLM_DISPATCH_INPUT',\n 'The LLM execution runner received an invalid dispatch input.',\n 'E_INVALID_LLM_DISPATCH_INPUT',\n 529,\n true\n)\n\n/**\n * Emitted (via the observability `error` hook) and re-thrown when a non-abort error propagates\n * out of the input or output middleware pipeline during {@link @nhtio/adk!DispatchRunner.dispatch}.\n *\n * @remarks\n * Not fatal — pipeline errors are recoverable runtime conditions. `dispatch()` rejects with this\n * exception so callers can handle the failure via try/catch. Both `dispatchInputPipeline` and\n * `dispatchOutputPipeline` share this one code — the runner does not split input vs. output at\n * this layer.\n *\n * @group Pipelines\n */\nexport const E_DISPATCH_PIPELINE_ERROR = createException(\n 'E_DISPATCH_PIPELINE_ERROR',\n 'An error occurred in an LLM execution pipeline.',\n 'E_DISPATCH_PIPELINE_ERROR',\n 500,\n false\n)\n\n/**\n * Emitted (via the observability `error` hook) and re-thrown when the user-supplied executor\n * callback throws during {@link @nhtio/adk!DispatchRunner.dispatch}.\n *\n * @remarks\n * Not fatal — executor errors are recoverable runtime conditions. `dispatch()` rejects with this\n * exception so callers can handle the failure via try/catch.\n *\n * @group Dispatch\n */\nexport const E_LLM_EXECUTION_EXECUTOR_ERROR = createException(\n 'E_LLM_EXECUTION_EXECUTOR_ERROR',\n 'The LLM execution executor callback threw an error.',\n 'E_LLM_EXECUTION_EXECUTOR_ERROR',\n 500,\n false\n)\n"],"mappings":";;;;;;;;;;;;;;;AAeA,IAAa,+BAA+B,mBAAA,gBAC1C,gCACA,8EACA,gCACA,KACA,IACF;;;;;;;;;;;;AAaA,IAAa,yBAAyB,mBAAA,gBACpC,0BACA,uDACA,0BACA,KACA,IACF;;;;;;;;;;;;AAaA,IAAa,yBAAyB,mBAAA,gBACpC,0BACA,4CACA,0BACA,KACA,KACF;;;;;;;;;;;;AAaA,IAAa,0BAA0B,mBAAA,gBACrC,2BACA,6CACA,2BACA,KACA,KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,6BAA6B,mBAAA,gBACxC,8BACA,2FACA,8BACA,KACA,KACF;;;;;;;;;;;AAYA,IAAa,mCAAmC,mBAAA,gBAC9C,oCACA,uEACA,oCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,iCAAiC,mBAAA,gBAC5C,kCACA,2DACA,kCACA,KACA,IACF;;;;;;;;;;;;;AAcA,IAAa,sCAAsC,mBAAA,gBACjD,uCACA,8DACA,uCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,kCAAkC,mBAAA,gBAC7C,mCACA,4DACA,mCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,mCAAmC,mBAAA,gBAC9C,oCACA,8DACA,oCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,kCAAkC,mBAAA,gBAC7C,mCACA,4DACA,mCACA,KACA,IACF;;;;;;;;;AAUA,IAAa,oCAAoC,mBAAA,gBAC/C,qCACA,8DACA,qCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,iCAAiC,mBAAA,gBAC5C,kCACA,sEACA,kCACA,KACA,IACF;;;;;;;;;;;;;;;AAgBA,IAAa,sBAAsB,mBAAA,gBACjC,uBACA,kDACA,uBACA,KACA,KACF;;;;;;;;;;AAWA,IAAa,sBAAsB,mBAAA,gBACjC,uBACA,oDACA,uBACA,KACA,KACF;;;;;;;;;;;;AAaA,IAAa,uBAAuB,mBAAA,gBAClC,wBACA,oEACA,wBACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,uBAAuB,mBAAA,gBAClC,wBACA,oEACA,wBACA,KACA,IACF;;;;;;;;;AAUA,IAAa,gCAAgC,mBAAA,gBAC3C,iCACA,0DACA,iCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,oCAAoC,mBAAA,gBAC/C,qCACA,8DACA,qCACA,KACA,IACF;;;;;;;;;AAUA,IAAa,+BAA+B,mBAAA,gBAC1C,gCACA,yDACA,gCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,sBAAsB,mBAAA,gBACjC,uBACA,sEACA,uBACA,KACA,KACF;;;;;;;;;;;AAYA,IAAa,0BAA0B,mBAAA,gBACrC,2BACA,qDACA,2BACA,KACA,KACF;;;;;;;;;;;AAYA,IAAa,4BAA4B,mBAAA,gBACvC,6BACA,oFACA,6BACA,KACA,IACF;;;;;;;;;AAUA,IAAa,kCAAkC,mBAAA,gBAC7C,mCACA,6EACA,mCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,qCAAqC,mBAAA,gBAChD,sCACA,sFACA,sCACA,KACA,KACF;;;;;;;;;;;;;;;AAgBA,IAAa,oCAAoC,mBAAA,gBAC/C,qCACA,qFACA,qCACA,KACA,IACF;;;;;;;;;AAUA,IAAa,+BAA+B,mBAAA,gBAC1C,gCACA,gEACA,gCACA,KACA,IACF;;;;;;;;;;;;;AAcA,IAAa,4BAA4B,mBAAA,gBACvC,6BACA,mDACA,6BACA,KACA,KACF;;;;;;;;;;;AAYA,IAAa,iCAAiC,mBAAA,gBAC5C,kCACA,uDACA,kCACA,KACA,KACF"}
|
|
@@ -7,9 +7,13 @@ import { t as createException } from "./exceptions-BeWH2FwP.mjs";
|
|
|
7
7
|
* @remarks
|
|
8
8
|
* Marked fatal — a misconfigured runner must not be allowed to execute turns.
|
|
9
9
|
*
|
|
10
|
+
* The single printf argument carries the validator's field-level detail (e.g.
|
|
11
|
+
* `"storeMediaBytesCallback is required"`) so a misconfiguration names the offending field
|
|
12
|
+
* instead of failing opaquely. The underlying `ValidationError` is also attached on `cause`.
|
|
13
|
+
*
|
|
10
14
|
* @group Turn Runner Construction
|
|
11
15
|
*/
|
|
12
|
-
var E_INVALID_TURN_RUNNER_CONFIG = createException("E_INVALID_TURN_RUNNER_CONFIG", "The turn runner cannot be instantiated with the provided configuration
|
|
16
|
+
var E_INVALID_TURN_RUNNER_CONFIG = createException("E_INVALID_TURN_RUNNER_CONFIG", "The turn runner cannot be instantiated with the provided configuration: %s", "E_INVALID_TURN_RUNNER_CONFIG", 529, true);
|
|
13
17
|
/**
|
|
14
18
|
* Thrown by {@link @nhtio/adk!TurnRunner} when the {@link @nhtio/adk!TurnContext} supplied to `run` fails schema
|
|
15
19
|
* validation.
|
|
@@ -343,4 +347,4 @@ var E_LLM_EXECUTION_EXECUTOR_ERROR = createException("E_LLM_EXECUTION_EXECUTOR_E
|
|
|
343
347
|
//#endregion
|
|
344
348
|
export { E_NOT_A_SPOOL_READER as C, E_TOOL_DOWNSTREAM_ERROR as D, E_TOOL_ALREADY_REGISTERED as E, E_TURN_GATE_ABORTED as O, E_NOT_A_MEDIA_READER as S, E_PIPELINE_SHORT_CIRCUITED as T, E_INVALID_TURN_GATE_RESOLUTION as _, E_INVALID_INITIAL_MEMORY_VALUE as a, E_LLM_EXECUTION_EXECUTOR_ERROR as b, E_INVALID_INITIAL_RETRIEVABLE_VALUE as c, E_INVALID_INITIAL_TOOL_VALUE as d, E_INVALID_INITIAL_TURN_GATE_VALUE as f, E_INVALID_TURN_CONTEXT as g, E_INVALID_TOOL_ARGS as h, E_INVALID_INITIAL_MEDIA_VALUE as i, E_TURN_GATE_TIMEOUT as k, E_INVALID_INITIAL_THOUGHT_VALUE as l, E_INVALID_LLM_EXECUTION_CONTEXT as m, E_INPUT_PIPELINE_ERROR as n, E_INVALID_INITIAL_MESSAGE_VALUE as o, E_INVALID_LLM_DISPATCH_INPUT as p, E_INVALID_INITIAL_IDENTITY_VALUE as r, E_INVALID_INITIAL_REGISTRY_VALUE as s, E_DISPATCH_PIPELINE_ERROR as t, E_INVALID_INITIAL_TOOL_CALL_VALUE as u, E_INVALID_TURN_RUNNER_CONFIG as v, E_OUTPUT_PIPELINE_ERROR as w, E_LLM_EXECUTION_GATE_NOT_SUPPORTED as x, E_LLM_EXECUTION_ALREADY_SIGNALLED as y };
|
|
345
349
|
|
|
346
|
-
//# sourceMappingURL=runtime-
|
|
350
|
+
//# sourceMappingURL=runtime-j92CNi5z.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-j92CNi5z.mjs","names":[],"sources":["../src/lib/exceptions/runtime.ts"],"sourcesContent":["import { createException } from '../utils/exceptions'\n\n/**\n * Thrown by {@link @nhtio/adk!TurnRunner} when the supplied config object fails schema validation at\n * construction time.\n *\n * @remarks\n * Marked fatal — a misconfigured runner must not be allowed to execute turns.\n *\n * The single printf argument carries the validator's field-level detail (e.g.\n * `\"storeMediaBytesCallback is required\"`) so a misconfiguration names the offending field\n * instead of failing opaquely. The underlying `ValidationError` is also attached on `cause`.\n *\n * @group Turn Runner Construction\n */\nexport const E_INVALID_TURN_RUNNER_CONFIG = createException<[string]>(\n 'E_INVALID_TURN_RUNNER_CONFIG',\n 'The turn runner cannot be instantiated with the provided configuration: %s',\n 'E_INVALID_TURN_RUNNER_CONFIG',\n 529,\n true\n)\n\n/**\n * Thrown by {@link @nhtio/adk!TurnRunner} when the {@link @nhtio/adk!TurnContext} supplied to `run` fails schema\n * validation.\n *\n * @remarks\n * Marked fatal — an invalid context indicates a programming error in the caller, not a\n * recoverable runtime condition. Thrown synchronously out of `run()` before `turnStart` is\n * emitted.\n *\n * @group Turn Input Validation\n */\nexport const E_INVALID_TURN_CONTEXT = createException(\n 'E_INVALID_TURN_CONTEXT',\n 'The turn runner received an invalid context object.',\n 'E_INVALID_TURN_CONTEXT',\n 529,\n true\n)\n\n/**\n * Emitted (via the `error` event) when a non-abort error propagates out of the input\n * middleware pipeline during {@link @nhtio/adk!TurnRunner.run}.\n *\n * @remarks\n * Not fatal — the turn runner emits this on the `error` event rather than throwing, so\n * registered listeners can handle or log the failure without crashing the pipeline. Dispatch\n * and output middleware are skipped; `turnEnd` still fires.\n *\n * @group Pipelines\n */\nexport const E_INPUT_PIPELINE_ERROR = createException(\n 'E_INPUT_PIPELINE_ERROR',\n 'An error occurred in the input pipeline.',\n 'E_INPUT_PIPELINE_ERROR',\n 500,\n false\n)\n\n/**\n * Emitted (via the `error` event) when a non-abort error propagates out of the output\n * middleware pipeline during {@link @nhtio/adk!TurnRunner.run}.\n *\n * @remarks\n * Not fatal — the turn runner emits this on the `error` event rather than throwing, so\n * registered listeners can handle or log the failure without crashing the pipeline. `turnEnd`\n * still fires.\n *\n * @group Pipelines\n */\nexport const E_OUTPUT_PIPELINE_ERROR = createException(\n 'E_OUTPUT_PIPELINE_ERROR',\n 'An error occurred in the output pipeline.',\n 'E_OUTPUT_PIPELINE_ERROR',\n 500,\n false\n)\n\n/**\n * Emitted (via the `error` event) when a middleware pipeline resolves without reaching its\n * terminal handler and without the turn being aborted. Indicates that some middleware\n * returned without calling `next` and without signalling a deliberate refusal via the turn's\n * abort controller.\n *\n * @remarks\n * Not fatal — the runner emits this on the `error` event so the failure is observable, then\n * proceeds to short-circuit the remainder of the turn the same way any other pipeline error\n * would. The constructor takes a single positional argument identifying the pipeline that\n * short-circuited: one of `'turn-input'`, `'turn-output'`, `'dispatch-input'`, or `'dispatch-output'`.\n *\n * Deliberate refusals should call `ctx.abort(reason)`, which sets the `'aborted'` outcome\n * instead of emitting this error.\n *\n * @warning\n * This is a **detection condition**, not a thrown exception. The runner constructs and emits\n * the code itself when it detects a missing `next()` on the unwind — nothing in user code\n * throws it. Upstream post-steps still run normally.\n *\n * @example\n * ```ts\n * throw new E_PIPELINE_SHORT_CIRCUITED(['turn-input'])\n * ```\n *\n * @group Pipelines\n */\nexport const E_PIPELINE_SHORT_CIRCUITED = createException<[string]>(\n 'E_PIPELINE_SHORT_CIRCUITED',\n \"The '%s' middleware pipeline short-circuited without calling next or aborting the turn.\",\n 'E_PIPELINE_SHORT_CIRCUITED',\n 500,\n false\n)\n\n/**\n * Thrown when a registry is initialised with a value that is defined but not a plain object.\n *\n * @remarks\n * Registries expect either `undefined` (empty start) or a plain object as their initial value.\n * Passing a primitive, array, class instance, or other non-object signals a programming error\n * in the caller.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_REGISTRY_VALUE = createException(\n 'E_INVALID_INITIAL_REGISTRY_VALUE',\n 'Attempted to initialize a registry with a defined non-object value.',\n 'E_INVALID_INITIAL_REGISTRY_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Memory} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Memory` requires all fields — `id`, `content`, `confidence`, `importance`, `createdAt`,\n * `updatedAt` — to be present and of the correct type. Passing an incomplete or incorrectly\n * typed object signals a programming error in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_MEMORY_VALUE = createException(\n 'E_INVALID_INITIAL_MEMORY_VALUE',\n 'Attempted to initialize a memory with an invalid value.',\n 'E_INVALID_INITIAL_MEMORY_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Retrievable} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Retrievable` requires `id`, `content`, `trustTier`, `createdAt`, and `updatedAt` to be present\n * and of the correct type, and `trustTier` must be one of `'first-party'`, `'third-party-public'`,\n * or `'third-party-private'`. The `trustTier` decision must be made consciously by the retrieval\n * middleware at construction time — there is no default. Passing an incomplete or incorrectly\n * typed object signals a programming error in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_RETRIEVABLE_VALUE = createException(\n 'E_INVALID_INITIAL_RETRIEVABLE_VALUE',\n 'Invalid initial value supplied to Retrievable constructor.',\n 'E_INVALID_INITIAL_RETRIEVABLE_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Message} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Message` requires `id`, `role` (`user` or `assistant`), `content`, `createdAt`, and\n * `updatedAt` to be present and of the correct type. Passing an incomplete or incorrectly\n * typed object signals a programming error in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_MESSAGE_VALUE = createException(\n 'E_INVALID_INITIAL_MESSAGE_VALUE',\n 'Attempted to initialize a message with an invalid value.',\n 'E_INVALID_INITIAL_MESSAGE_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when an {@link @nhtio/adk!Identity} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Identity` requires both `identifier` (string or number) and `representation` (string or\n * {@link @nhtio/adk!Tokenizable}) to be present and of the correct type. Passing an incomplete or\n * incorrectly typed object signals a programming error in the caller.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_IDENTITY_VALUE = createException(\n 'E_INVALID_INITIAL_IDENTITY_VALUE',\n 'Attempted to initialize an identity with an invalid value.',\n 'E_INVALID_INITIAL_IDENTITY_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Thought} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `Thought` requires `id`, `content`, `createdAt`, and `updatedAt` to be present and of the\n * correct type. Passing an incomplete or incorrectly typed object signals a programming error\n * in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_THOUGHT_VALUE = createException(\n 'E_INVALID_INITIAL_THOUGHT_VALUE',\n 'Attempted to initialize a thought with an invalid value.',\n 'E_INVALID_INITIAL_THOUGHT_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!TurnGate} is constructed with a value that fails schema validation.\n *\n * @remarks\n * Fatal — bad construction arguments indicate a programming error in the caller.\n *\n * @group Gates\n */\nexport const E_INVALID_INITIAL_TURN_GATE_VALUE = createException(\n 'E_INVALID_INITIAL_TURN_GATE_VALUE',\n 'Attempted to initialize a turn gate with an invalid value.',\n 'E_INVALID_INITIAL_TURN_GATE_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown synchronously in the caller's context when {@link @nhtio/adk!TurnGate.resolve} is called with a\n * value that fails the gate's schema.\n *\n * @remarks\n * Fatal — passing the wrong type to `resolve()` is a programming error. The internal promise is\n * NOT settled when this is thrown; the gate remains open.\n *\n * @group Gates\n */\nexport const E_INVALID_TURN_GATE_RESOLUTION = createException(\n 'E_INVALID_TURN_GATE_RESOLUTION',\n 'The value supplied to TurnGate.resolve() failed schema validation.',\n 'E_INVALID_TURN_GATE_RESOLUTION',\n 500,\n true\n)\n\n/**\n * Thrown (as a rejection reason) when a {@link @nhtio/adk!TurnGate} times out before being resolved.\n *\n * @remarks\n * Not fatal — a timeout is a recoverable runtime condition; the caller may retry or surface it\n * to the user.\n *\n * @warning\n * A timeout does **not** cancel the external event or clear any remote queue. The gate closes\n * locally, but whatever external system was expected to call `gate.resolve()` may still fire\n * later. Orphaned external state must be handled by the caller.\n *\n * @group Gates\n */\nexport const E_TURN_GATE_TIMEOUT = createException(\n 'E_TURN_GATE_TIMEOUT',\n 'The turn gate timed out before being resolved.',\n 'E_TURN_GATE_TIMEOUT',\n 408,\n false\n)\n\n/**\n * Thrown (as a rejection reason) when a {@link @nhtio/adk!TurnGate} is aborted — either because the turn's\n * `AbortSignal` fired or because {@link @nhtio/adk!TurnGate.abort} was called directly.\n *\n * @remarks\n * Not fatal — abort is an intentional cancellation, not an error in the caller.\n *\n * @group Gates\n */\nexport const E_TURN_GATE_ABORTED = createException(\n 'E_TURN_GATE_ABORTED',\n 'The turn gate was aborted before being resolved.',\n 'E_TURN_GATE_ABORTED',\n 499,\n false\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!SpooledArtifact} is constructed with a value that does not implement the\n * {@link @nhtio/adk!SpoolReader} interface.\n *\n * @remarks\n * Validated at construction time via {@link @nhtio/adk!implementsSpoolReader}. Passing anything that lacks\n * `line`, `byteLength`, or `lineCount` as callable functions signals a programming error in the\n * caller.\n *\n * @group Artifacts\n */\nexport const E_NOT_A_SPOOL_READER = createException(\n 'E_NOT_A_SPOOL_READER',\n 'The provided value does not implement the SpoolReader interface.',\n 'E_NOT_A_SPOOL_READER',\n 500,\n true\n)\n\n/**\n * Thrown when a Media is constructed with a value that does not implement the MediaReader\n * interface.\n *\n * @remarks\n * Validated at construction time. Passing anything that lacks `stream` or `byteLength` as\n * callable functions signals a programming error in the caller.\n *\n * @group Artifacts\n */\nexport const E_NOT_A_MEDIA_READER = createException(\n 'E_NOT_A_MEDIA_READER',\n 'The provided value does not implement the MediaReader interface.',\n 'E_NOT_A_MEDIA_READER',\n 500,\n true\n)\n\n/**\n * Thrown when a Media is initialised with a value that fails schema validation.\n *\n * @remarks\n * Fatal — bad construction arguments indicate a programming error in the caller.\n *\n * @group Artifacts\n */\nexport const E_INVALID_INITIAL_MEDIA_VALUE = createException(\n 'E_INVALID_INITIAL_MEDIA_VALUE',\n 'Attempted to initialize a media with an invalid value.',\n 'E_INVALID_INITIAL_MEDIA_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!ToolCall} is initialised with a value that fails schema validation.\n *\n * @remarks\n * `ToolCall` requires `id`, `tool`, `args`, `checksum`, `isComplete`, `isError`, `createdAt`,\n * and `updatedAt` to be present and of the correct type. Passing an incomplete or incorrectly\n * typed object signals a programming error in the caller, not a recoverable runtime condition.\n *\n * @group Primitive Validation\n */\nexport const E_INVALID_INITIAL_TOOL_CALL_VALUE = createException(\n 'E_INVALID_INITIAL_TOOL_CALL_VALUE',\n 'Attempted to initialize a tool call with an invalid value.',\n 'E_INVALID_INITIAL_TOOL_CALL_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown when a {@link @nhtio/adk!Tool} is constructed with a value that fails schema validation.\n *\n * @remarks\n * Fatal — bad construction arguments indicate a programming error in the caller.\n *\n * @group Tools\n */\nexport const E_INVALID_INITIAL_TOOL_VALUE = createException(\n 'E_INVALID_INITIAL_TOOL_VALUE',\n 'Attempted to initialize a tool with an invalid value.',\n 'E_INVALID_INITIAL_TOOL_VALUE',\n 500,\n true\n)\n\n/**\n * Thrown synchronously when {@link @nhtio/adk!Tool.validate} is called with arguments that fail the tool's\n * input schema.\n *\n * @remarks\n * Not fatal — an arg validation failure in the tool call loop is a caller mistake that can be\n * surfaced as an error response. The tool handler is NOT called when this is thrown.\n *\n * @group Tools\n */\nexport const E_INVALID_TOOL_ARGS = createException(\n 'E_INVALID_TOOL_ARGS',\n 'The arguments supplied to the tool failed input schema validation.',\n 'E_INVALID_TOOL_ARGS',\n 422,\n false\n)\n\n/**\n * Thrown (as a rejection reason) when a {@link @nhtio/adk!Tool}'s handler throws during execution.\n *\n * @remarks\n * Not fatal — a downstream tool failure is a recoverable runtime condition. The tool call loop\n * catches this error specifically to report the failure back to the model rather than crashing\n * the pipeline.\n *\n * @group Tools\n */\nexport const E_TOOL_DOWNSTREAM_ERROR = createException(\n 'E_TOOL_DOWNSTREAM_ERROR',\n 'The tool handler threw an error during execution.',\n 'E_TOOL_DOWNSTREAM_ERROR',\n 500,\n false\n)\n\n/**\n * Thrown when {@link @nhtio/adk!ToolRegistry.register} is called for a tool name that is already registered\n * and `overwrite` is not `true`.\n *\n * @remarks\n * Fatal — accidentally overwriting a registered tool indicates a programming error. Pass\n * `overwrite: true` to replace an existing tool intentionally.\n *\n * @group Tools\n */\nexport const E_TOOL_ALREADY_REGISTERED = createException(\n 'E_TOOL_ALREADY_REGISTERED',\n 'A tool with this name is already registered. Pass overwrite: true to replace it.',\n 'E_TOOL_ALREADY_REGISTERED',\n 409,\n true\n)\n\n/**\n * Thrown when {@link @nhtio/adk!DispatchContext} is constructed with a value that fails schema validation.\n *\n * @remarks\n * Fatal — bad construction arguments indicate a programming error in the caller.\n *\n * @group Dispatch\n */\nexport const E_INVALID_LLM_EXECUTION_CONTEXT = createException(\n 'E_INVALID_LLM_EXECUTION_CONTEXT',\n 'The LLM execution context cannot be instantiated with the provided value.',\n 'E_INVALID_LLM_EXECUTION_CONTEXT',\n 529,\n true\n)\n\n/**\n * Thrown (as a rejection reason) when {@link @nhtio/adk!DispatchContext.waitFor} is called on a\n * standalone context that was constructed without a `waitFor` function.\n *\n * @remarks\n * Not fatal — the caller can catch this and handle the case where gate suspension is not\n * supported for this execution context.\n *\n * @group Dispatch\n */\nexport const E_LLM_EXECUTION_GATE_NOT_SUPPORTED = createException(\n 'E_LLM_EXECUTION_GATE_NOT_SUPPORTED',\n 'waitFor was called on a standalone DispatchContext with no gate function provided.',\n 'E_LLM_EXECUTION_GATE_NOT_SUPPORTED',\n 501,\n false\n)\n\n/**\n * Thrown when {@link @nhtio/adk!DispatchContext.ack} or {@link @nhtio/adk!DispatchContext.nack} is called on a\n * context that has already been signalled.\n *\n * @remarks\n * Fatal — signalling twice is a programming error in the caller. The first signal wins; the\n * second call is rejected loudly so callers cannot accidentally race between ack and nack.\n *\n * @danger\n * Signalling is **not** silently idempotent. The first `ack()` or `nack()` wins; the second\n * throws immediately. Guard with `if (!ctx.isSignalled)` when more than one seam may signal.\n *\n * @group Dispatch\n */\nexport const E_LLM_EXECUTION_ALREADY_SIGNALLED = createException(\n 'E_LLM_EXECUTION_ALREADY_SIGNALLED',\n 'ack() or nack() was called on an DispatchContext that has already been signalled.',\n 'E_LLM_EXECUTION_ALREADY_SIGNALLED',\n 500,\n true\n)\n\n/**\n * Thrown when {@link @nhtio/adk!DispatchRunner.dispatch} receives an input that fails schema validation.\n *\n * @remarks\n * Fatal — invalid dispatch input indicates a programming error in the caller.\n *\n * @group Dispatch\n */\nexport const E_INVALID_LLM_DISPATCH_INPUT = createException(\n 'E_INVALID_LLM_DISPATCH_INPUT',\n 'The LLM execution runner received an invalid dispatch input.',\n 'E_INVALID_LLM_DISPATCH_INPUT',\n 529,\n true\n)\n\n/**\n * Emitted (via the observability `error` hook) and re-thrown when a non-abort error propagates\n * out of the input or output middleware pipeline during {@link @nhtio/adk!DispatchRunner.dispatch}.\n *\n * @remarks\n * Not fatal — pipeline errors are recoverable runtime conditions. `dispatch()` rejects with this\n * exception so callers can handle the failure via try/catch. Both `dispatchInputPipeline` and\n * `dispatchOutputPipeline` share this one code — the runner does not split input vs. output at\n * this layer.\n *\n * @group Pipelines\n */\nexport const E_DISPATCH_PIPELINE_ERROR = createException(\n 'E_DISPATCH_PIPELINE_ERROR',\n 'An error occurred in an LLM execution pipeline.',\n 'E_DISPATCH_PIPELINE_ERROR',\n 500,\n false\n)\n\n/**\n * Emitted (via the observability `error` hook) and re-thrown when the user-supplied executor\n * callback throws during {@link @nhtio/adk!DispatchRunner.dispatch}.\n *\n * @remarks\n * Not fatal — executor errors are recoverable runtime conditions. `dispatch()` rejects with this\n * exception so callers can handle the failure via try/catch.\n *\n * @group Dispatch\n */\nexport const E_LLM_EXECUTION_EXECUTOR_ERROR = createException(\n 'E_LLM_EXECUTION_EXECUTOR_ERROR',\n 'The LLM execution executor callback threw an error.',\n 'E_LLM_EXECUTION_EXECUTOR_ERROR',\n 500,\n false\n)\n"],"mappings":";;;;;;;;;;;;;;;AAeA,IAAa,+BAA+B,gBAC1C,gCACA,8EACA,gCACA,KACA,IACF;;;;;;;;;;;;AAaA,IAAa,yBAAyB,gBACpC,0BACA,uDACA,0BACA,KACA,IACF;;;;;;;;;;;;AAaA,IAAa,yBAAyB,gBACpC,0BACA,4CACA,0BACA,KACA,KACF;;;;;;;;;;;;AAaA,IAAa,0BAA0B,gBACrC,2BACA,6CACA,2BACA,KACA,KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,6BAA6B,gBACxC,8BACA,2FACA,8BACA,KACA,KACF;;;;;;;;;;;AAYA,IAAa,mCAAmC,gBAC9C,oCACA,uEACA,oCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,iCAAiC,gBAC5C,kCACA,2DACA,kCACA,KACA,IACF;;;;;;;;;;;;;AAcA,IAAa,sCAAsC,gBACjD,uCACA,8DACA,uCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,kCAAkC,gBAC7C,mCACA,4DACA,mCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,mCAAmC,gBAC9C,oCACA,8DACA,oCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,kCAAkC,gBAC7C,mCACA,4DACA,mCACA,KACA,IACF;;;;;;;;;AAUA,IAAa,oCAAoC,gBAC/C,qCACA,8DACA,qCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,iCAAiC,gBAC5C,kCACA,sEACA,kCACA,KACA,IACF;;;;;;;;;;;;;;;AAgBA,IAAa,sBAAsB,gBACjC,uBACA,kDACA,uBACA,KACA,KACF;;;;;;;;;;AAWA,IAAa,sBAAsB,gBACjC,uBACA,oDACA,uBACA,KACA,KACF;;;;;;;;;;;;AAaA,IAAa,uBAAuB,gBAClC,wBACA,oEACA,wBACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,uBAAuB,gBAClC,wBACA,oEACA,wBACA,KACA,IACF;;;;;;;;;AAUA,IAAa,gCAAgC,gBAC3C,iCACA,0DACA,iCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,oCAAoC,gBAC/C,qCACA,8DACA,qCACA,KACA,IACF;;;;;;;;;AAUA,IAAa,+BAA+B,gBAC1C,gCACA,yDACA,gCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,sBAAsB,gBACjC,uBACA,sEACA,uBACA,KACA,KACF;;;;;;;;;;;AAYA,IAAa,0BAA0B,gBACrC,2BACA,qDACA,2BACA,KACA,KACF;;;;;;;;;;;AAYA,IAAa,4BAA4B,gBACvC,6BACA,oFACA,6BACA,KACA,IACF;;;;;;;;;AAUA,IAAa,kCAAkC,gBAC7C,mCACA,6EACA,mCACA,KACA,IACF;;;;;;;;;;;AAYA,IAAa,qCAAqC,gBAChD,sCACA,sFACA,sCACA,KACA,KACF;;;;;;;;;;;;;;;AAgBA,IAAa,oCAAoC,gBAC/C,qCACA,qFACA,qCACA,KACA,IACF;;;;;;;;;AAUA,IAAa,+BAA+B,gBAC1C,gCACA,gEACA,gCACA,KACA,IACF;;;;;;;;;;;;;AAcA,IAAa,4BAA4B,gBACvC,6BACA,mDACA,6BACA,KACA,KACF;;;;;;;;;;;AAYA,IAAa,iCAAiC,gBAC5C,kCACA,uDACA,kCACA,KACA,KACF"}
|
|
@@ -5,7 +5,7 @@ license: MIT
|
|
|
5
5
|
compatibility: "Requires TypeScript/JavaScript project using @nhtio/adk; examples assume Node 20+ or compatible browser/runtime."
|
|
6
6
|
metadata:
|
|
7
7
|
package: "@nhtio/adk"
|
|
8
|
-
version: "0.1.0-master-
|
|
8
|
+
version: "0.1.0-master-bd43a4ea"
|
|
9
9
|
author: "Jak Giveon <jak@nht.io>"
|
|
10
10
|
copyright: "© 2025-present New Horizon Technology LTD"
|
|
11
11
|
---
|
|
@@ -17,7 +17,7 @@ Use this skill to help users build or review an `@nhtio/adk` assembly: the appli
|
|
|
17
17
|
## Package Metadata
|
|
18
18
|
|
|
19
19
|
- Package: `@nhtio/adk`
|
|
20
|
-
- Version: `0.1.0-master-
|
|
20
|
+
- Version: `0.1.0-master-bd43a4ea`
|
|
21
21
|
- License: MIT
|
|
22
22
|
- Author: Jak Giveon <jak@nht.io>
|
|
23
23
|
- Copyright: © 2025-present New Horizon Technology LTD
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require("./chunk-Ble4zEEl.js");
|
|
2
2
|
const require_exceptions = require("./exceptions-CitH5wZI.js");
|
|
3
|
-
const require_tool_registry = require("./tool_registry-
|
|
4
|
-
const require_runtime = require("./runtime-
|
|
5
|
-
const require_tool = require("./tool-
|
|
3
|
+
const require_tool_registry = require("./tool_registry-CtCQ4Xoz.js");
|
|
4
|
+
const require_runtime = require("./runtime-MFFcJrRv.js");
|
|
5
|
+
const require_tool = require("./tool-CX9vNHAw.js");
|
|
6
6
|
let _nhtio_validation = require("@nhtio/validation");
|
|
7
7
|
//#region src/lib/classes/artifact_tool.ts
|
|
8
8
|
/**
|
|
@@ -565,4 +565,4 @@ Object.defineProperty(exports, "implementsSpoolReader", {
|
|
|
565
565
|
}
|
|
566
566
|
});
|
|
567
567
|
|
|
568
|
-
//# sourceMappingURL=spooled_artifact-
|
|
568
|
+
//# sourceMappingURL=spooled_artifact-B8gIIn9h.js.map
|