@kadi.build/core 0.0.1-alpha.6 → 0.0.1-alpha.8
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/README.md +112 -16
- package/dist/KadiClient.d.ts +7 -15
- package/dist/KadiClient.d.ts.map +1 -1
- package/dist/KadiClient.js +82 -94
- package/dist/KadiClient.js.map +1 -1
- package/dist/errors/error-codes.d.ts +830 -60
- package/dist/errors/error-codes.d.ts.map +1 -1
- package/dist/errors/error-codes.js +409 -66
- package/dist/errors/error-codes.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/loadAbility.d.ts +3 -4
- package/dist/loadAbility.d.ts.map +1 -1
- package/dist/loadAbility.js +50 -56
- package/dist/loadAbility.js.map +1 -1
- package/dist/transports/BrokerTransport.d.ts +0 -4
- package/dist/transports/BrokerTransport.d.ts.map +1 -1
- package/dist/transports/BrokerTransport.js.map +1 -1
- package/dist/transports/NativeTransport.d.ts.map +1 -1
- package/dist/transports/NativeTransport.js.map +1 -1
- package/dist/transports/StdioTransport.d.ts +7 -7
- package/dist/transports/StdioTransport.d.ts.map +1 -1
- package/dist/transports/StdioTransport.js +57 -52
- package/dist/transports/StdioTransport.js.map +1 -1
- package/dist/types/core.d.ts +4 -4
- package/dist/types/core.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -13,157 +13,919 @@
|
|
|
13
13
|
* 6000-6999: Configuration errors
|
|
14
14
|
* 7000-7999: System/Internal errors
|
|
15
15
|
*/
|
|
16
|
+
export declare const CoreErrorCodes: {
|
|
17
|
+
readonly CORE_CONNECTION_FAILED: {
|
|
18
|
+
readonly code: "CORE_CONNECTION_FAILED";
|
|
19
|
+
readonly httpStatus: 503;
|
|
20
|
+
readonly message: "Failed to establish connection";
|
|
21
|
+
};
|
|
22
|
+
readonly CORE_CONNECTION_TIMEOUT: {
|
|
23
|
+
readonly code: "CORE_CONNECTION_TIMEOUT";
|
|
24
|
+
readonly httpStatus: 408;
|
|
25
|
+
readonly message: "Connection attempt timed out";
|
|
26
|
+
};
|
|
27
|
+
readonly CORE_CONNECTION_REFUSED: {
|
|
28
|
+
readonly code: "CORE_CONNECTION_REFUSED";
|
|
29
|
+
readonly httpStatus: 503;
|
|
30
|
+
readonly message: "Connection refused by remote server";
|
|
31
|
+
};
|
|
32
|
+
readonly CORE_BROKER_UNAVAILABLE: {
|
|
33
|
+
readonly code: "CORE_BROKER_UNAVAILABLE";
|
|
34
|
+
readonly httpStatus: 503;
|
|
35
|
+
readonly message: "Broker service is unavailable";
|
|
36
|
+
};
|
|
37
|
+
readonly CORE_BROKER_CONNECTION_LOST: {
|
|
38
|
+
readonly code: "CORE_BROKER_CONNECTION_LOST";
|
|
39
|
+
readonly httpStatus: 503;
|
|
40
|
+
readonly message: "Connection to broker was lost";
|
|
41
|
+
};
|
|
42
|
+
readonly CORE_AUTH_FAILED: {
|
|
43
|
+
readonly code: "CORE_AUTH_FAILED";
|
|
44
|
+
readonly httpStatus: 401;
|
|
45
|
+
readonly message: "Authentication failed";
|
|
46
|
+
};
|
|
47
|
+
readonly CORE_AUTH_HANDSHAKE_FAILED: {
|
|
48
|
+
readonly code: "CORE_AUTH_HANDSHAKE_FAILED";
|
|
49
|
+
readonly httpStatus: 400;
|
|
50
|
+
readonly message: "Authentication handshake failed";
|
|
51
|
+
};
|
|
52
|
+
readonly CORE_AUTH_TOKEN_INVALID: {
|
|
53
|
+
readonly code: "CORE_AUTH_TOKEN_INVALID";
|
|
54
|
+
readonly httpStatus: 401;
|
|
55
|
+
readonly message: "Invalid authentication token";
|
|
56
|
+
};
|
|
57
|
+
readonly CORE_ABILITY_NOT_FOUND: {
|
|
58
|
+
readonly code: "CORE_ABILITY_NOT_FOUND";
|
|
59
|
+
readonly httpStatus: 404;
|
|
60
|
+
readonly message: "Requested ability does not exist";
|
|
61
|
+
};
|
|
62
|
+
readonly CORE_ABILITY_LOAD_FAILED: {
|
|
63
|
+
readonly code: "CORE_ABILITY_LOAD_FAILED";
|
|
64
|
+
readonly httpStatus: 500;
|
|
65
|
+
readonly message: "Failed to load ability";
|
|
66
|
+
};
|
|
67
|
+
readonly CORE_ABILITY_NOT_ACCESSIBLE: {
|
|
68
|
+
readonly code: "CORE_ABILITY_NOT_ACCESSIBLE";
|
|
69
|
+
readonly httpStatus: 403;
|
|
70
|
+
readonly message: "Ability not accessible in current context";
|
|
71
|
+
};
|
|
72
|
+
readonly CORE_ABILITY_START_FAILED: {
|
|
73
|
+
readonly code: "CORE_ABILITY_START_FAILED";
|
|
74
|
+
readonly httpStatus: 500;
|
|
75
|
+
readonly message: "Failed to start ability process";
|
|
76
|
+
};
|
|
77
|
+
readonly CORE_ABILITY_TIMEOUT: {
|
|
78
|
+
readonly code: "CORE_ABILITY_TIMEOUT";
|
|
79
|
+
readonly httpStatus: 408;
|
|
80
|
+
readonly message: "Ability operation timed out";
|
|
81
|
+
};
|
|
82
|
+
readonly CORE_ABILITY_PATH_INVALID: {
|
|
83
|
+
readonly code: "CORE_ABILITY_PATH_INVALID";
|
|
84
|
+
readonly httpStatus: 400;
|
|
85
|
+
readonly message: "Invalid ability path or name format";
|
|
86
|
+
};
|
|
87
|
+
readonly CORE_ABILITY_MANIFEST_INVALID: {
|
|
88
|
+
readonly code: "CORE_ABILITY_MANIFEST_INVALID";
|
|
89
|
+
readonly httpStatus: 400;
|
|
90
|
+
readonly message: "Ability manifest file is invalid or missing";
|
|
91
|
+
};
|
|
92
|
+
readonly CORE_TOOL_NOT_FOUND: {
|
|
93
|
+
readonly code: "CORE_TOOL_NOT_FOUND";
|
|
94
|
+
readonly httpStatus: 404;
|
|
95
|
+
readonly message: "Requested tool does not exist";
|
|
96
|
+
};
|
|
97
|
+
readonly CORE_TOOL_INVOCATION_FAILED: {
|
|
98
|
+
readonly code: "CORE_TOOL_INVOCATION_FAILED";
|
|
99
|
+
readonly httpStatus: 500;
|
|
100
|
+
readonly message: "Tool invocation failed";
|
|
101
|
+
};
|
|
102
|
+
readonly CORE_TOOL_TIMEOUT: {
|
|
103
|
+
readonly code: "CORE_TOOL_TIMEOUT";
|
|
104
|
+
readonly httpStatus: 408;
|
|
105
|
+
readonly message: "Tool execution timed out";
|
|
106
|
+
};
|
|
107
|
+
readonly CORE_TOOL_INPUT_INVALID: {
|
|
108
|
+
readonly code: "CORE_TOOL_INPUT_INVALID";
|
|
109
|
+
readonly httpStatus: 400;
|
|
110
|
+
readonly message: "Tool input validation failed";
|
|
111
|
+
};
|
|
112
|
+
readonly CORE_PROTOCOL_UNSUPPORTED: {
|
|
113
|
+
readonly code: "CORE_PROTOCOL_UNSUPPORTED";
|
|
114
|
+
readonly httpStatus: 400;
|
|
115
|
+
readonly message: "Protocol not supported";
|
|
116
|
+
};
|
|
117
|
+
readonly CORE_PROTOCOL_VERSION_MISMATCH: {
|
|
118
|
+
readonly code: "CORE_PROTOCOL_VERSION_MISMATCH";
|
|
119
|
+
readonly httpStatus: 400;
|
|
120
|
+
readonly message: "Protocol version mismatch";
|
|
121
|
+
};
|
|
122
|
+
readonly CORE_MESSAGE_INVALID: {
|
|
123
|
+
readonly code: "CORE_MESSAGE_INVALID";
|
|
124
|
+
readonly httpStatus: 400;
|
|
125
|
+
readonly message: "Invalid message format";
|
|
126
|
+
};
|
|
127
|
+
readonly CORE_RPC_REQUEST_FAILED: {
|
|
128
|
+
readonly code: "CORE_RPC_REQUEST_FAILED";
|
|
129
|
+
readonly httpStatus: 500;
|
|
130
|
+
readonly message: "RPC request failed";
|
|
131
|
+
};
|
|
132
|
+
readonly CORE_CONFIG_INVALID: {
|
|
133
|
+
readonly code: "CORE_CONFIG_INVALID";
|
|
134
|
+
readonly httpStatus: 400;
|
|
135
|
+
readonly message: "Invalid configuration";
|
|
136
|
+
};
|
|
137
|
+
readonly CORE_CONFIG_MISSING: {
|
|
138
|
+
readonly code: "CORE_CONFIG_MISSING";
|
|
139
|
+
readonly httpStatus: 400;
|
|
140
|
+
readonly message: "Required configuration missing";
|
|
141
|
+
};
|
|
142
|
+
readonly CORE_CONFIG_PATH_INVALID: {
|
|
143
|
+
readonly code: "CORE_CONFIG_PATH_INVALID";
|
|
144
|
+
readonly httpStatus: 400;
|
|
145
|
+
readonly message: "Invalid configuration file path";
|
|
146
|
+
};
|
|
147
|
+
readonly CORE_INTERNAL_ERROR: {
|
|
148
|
+
readonly code: "CORE_INTERNAL_ERROR";
|
|
149
|
+
readonly httpStatus: 500;
|
|
150
|
+
readonly message: "An internal error occurred";
|
|
151
|
+
};
|
|
152
|
+
readonly CORE_NOT_IMPLEMENTED: {
|
|
153
|
+
readonly code: "CORE_NOT_IMPLEMENTED";
|
|
154
|
+
readonly httpStatus: 501;
|
|
155
|
+
readonly message: "Feature not yet implemented";
|
|
156
|
+
};
|
|
157
|
+
readonly CORE_SYSTEM_OVERLOADED: {
|
|
158
|
+
readonly code: "CORE_SYSTEM_OVERLOADED";
|
|
159
|
+
readonly httpStatus: 503;
|
|
160
|
+
readonly message: "System is currently overloaded";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
export declare const BrokerErrorCodes: {
|
|
164
|
+
readonly BROKER_TOOL_NOT_FOUND: {
|
|
165
|
+
readonly code: "BROKER_TOOL_NOT_FOUND";
|
|
166
|
+
readonly httpStatus: 404;
|
|
167
|
+
readonly message: "Requested tool does not exist";
|
|
168
|
+
};
|
|
169
|
+
readonly BROKER_TOOL_NOT_ACCESSIBLE: {
|
|
170
|
+
readonly code: "BROKER_TOOL_NOT_ACCESSIBLE";
|
|
171
|
+
readonly httpStatus: 403;
|
|
172
|
+
readonly message: "Tool not accessible within caller networks";
|
|
173
|
+
};
|
|
174
|
+
readonly BROKER_TOOL_INPUT_SCHEMA_VIOLATION: {
|
|
175
|
+
readonly code: "BROKER_TOOL_INPUT_SCHEMA_VIOLATION";
|
|
176
|
+
readonly httpStatus: 400;
|
|
177
|
+
readonly message: "Tool input does not match schema";
|
|
178
|
+
};
|
|
179
|
+
readonly BROKER_TOOL_OUTPUT_SCHEMA_VIOLATION: {
|
|
180
|
+
readonly code: "BROKER_TOOL_OUTPUT_SCHEMA_VIOLATION";
|
|
181
|
+
readonly httpStatus: 500;
|
|
182
|
+
readonly message: "Tool output does not match schema";
|
|
183
|
+
};
|
|
184
|
+
readonly BROKER_SESSION_NOT_INITIALIZED: {
|
|
185
|
+
readonly code: "BROKER_SESSION_NOT_INITIALIZED";
|
|
186
|
+
readonly httpStatus: 400;
|
|
187
|
+
readonly message: "Session not initialized";
|
|
188
|
+
};
|
|
189
|
+
readonly BROKER_SESSION_ALREADY_INITIALIZED: {
|
|
190
|
+
readonly code: "BROKER_SESSION_ALREADY_INITIALIZED";
|
|
191
|
+
readonly httpStatus: 409;
|
|
192
|
+
readonly message: "Session already initialized";
|
|
193
|
+
};
|
|
194
|
+
readonly BROKER_SESSION_INVALID_STATE: {
|
|
195
|
+
readonly code: "BROKER_SESSION_INVALID_STATE";
|
|
196
|
+
readonly httpStatus: 400;
|
|
197
|
+
readonly message: "Invalid session state";
|
|
198
|
+
};
|
|
199
|
+
readonly BROKER_SESSION_HANDSHAKE_FAILED: {
|
|
200
|
+
readonly code: "BROKER_SESSION_HANDSHAKE_FAILED";
|
|
201
|
+
readonly httpStatus: 400;
|
|
202
|
+
readonly message: "Handshake failed";
|
|
203
|
+
};
|
|
204
|
+
readonly BROKER_SESSION_NOT_FOUND: {
|
|
205
|
+
readonly code: "BROKER_SESSION_NOT_FOUND";
|
|
206
|
+
readonly httpStatus: 404;
|
|
207
|
+
readonly message: "Session not found";
|
|
208
|
+
};
|
|
209
|
+
readonly BROKER_SESSION_TIMEOUT: {
|
|
210
|
+
readonly code: "BROKER_SESSION_TIMEOUT";
|
|
211
|
+
readonly httpStatus: 408;
|
|
212
|
+
readonly message: "Session timeout";
|
|
213
|
+
};
|
|
214
|
+
readonly BROKER_SESSION_ROLE_INVALID: {
|
|
215
|
+
readonly code: "BROKER_SESSION_ROLE_INVALID";
|
|
216
|
+
readonly httpStatus: 400;
|
|
217
|
+
readonly message: "Invalid session role";
|
|
218
|
+
};
|
|
219
|
+
readonly BROKER_SESSION_KADI_HANDLER_FAILED: {
|
|
220
|
+
readonly code: "BROKER_SESSION_KADI_HANDLER_FAILED";
|
|
221
|
+
readonly httpStatus: 500;
|
|
222
|
+
readonly message: "KADI handler failed";
|
|
223
|
+
};
|
|
224
|
+
readonly BROKER_SESSION_RATE_LIMITED: {
|
|
225
|
+
readonly code: "BROKER_SESSION_RATE_LIMITED";
|
|
226
|
+
readonly httpStatus: 429;
|
|
227
|
+
readonly message: "Session rate limited";
|
|
228
|
+
};
|
|
229
|
+
readonly BROKER_SESSION_NOT_READY: {
|
|
230
|
+
readonly code: "BROKER_SESSION_NOT_READY";
|
|
231
|
+
readonly httpStatus: 400;
|
|
232
|
+
readonly message: "Session not ready";
|
|
233
|
+
};
|
|
234
|
+
readonly BROKER_AUTH_MISSING_CREDENTIALS: {
|
|
235
|
+
readonly code: "BROKER_AUTH_MISSING_CREDENTIALS";
|
|
236
|
+
readonly httpStatus: 401;
|
|
237
|
+
readonly message: "Missing credentials";
|
|
238
|
+
};
|
|
239
|
+
readonly BROKER_AUTH_SIGNATURE_INVALID: {
|
|
240
|
+
readonly code: "BROKER_AUTH_SIGNATURE_INVALID";
|
|
241
|
+
readonly httpStatus: 401;
|
|
242
|
+
readonly message: "Invalid signature";
|
|
243
|
+
};
|
|
244
|
+
readonly BROKER_AUTH_PUBLIC_KEY_INVALID: {
|
|
245
|
+
readonly code: "BROKER_AUTH_PUBLIC_KEY_INVALID";
|
|
246
|
+
readonly httpStatus: 401;
|
|
247
|
+
readonly message: "Invalid public key";
|
|
248
|
+
};
|
|
249
|
+
readonly BROKER_AUTH_NONCE_MISMATCH: {
|
|
250
|
+
readonly code: "BROKER_AUTH_NONCE_MISMATCH";
|
|
251
|
+
readonly httpStatus: 401;
|
|
252
|
+
readonly message: "Nonce mismatch";
|
|
253
|
+
};
|
|
254
|
+
readonly BROKER_AUTH_AGENT_UNKNOWN: {
|
|
255
|
+
readonly code: "BROKER_AUTH_AGENT_UNKNOWN";
|
|
256
|
+
readonly httpStatus: 404;
|
|
257
|
+
readonly message: "Unknown agent";
|
|
258
|
+
};
|
|
259
|
+
readonly BROKER_AUTH_SEQUENCE_ERROR: {
|
|
260
|
+
readonly code: "BROKER_AUTH_SEQUENCE_ERROR";
|
|
261
|
+
readonly httpStatus: 400;
|
|
262
|
+
readonly message: "Auth sequence error";
|
|
263
|
+
};
|
|
264
|
+
readonly BROKER_AGENT_NOT_AUTHENTICATED: {
|
|
265
|
+
readonly code: "BROKER_AGENT_NOT_AUTHENTICATED";
|
|
266
|
+
readonly httpStatus: 401;
|
|
267
|
+
readonly message: "Agent not authenticated";
|
|
268
|
+
};
|
|
269
|
+
readonly BROKER_AGENT_NETWORKS_MISSING: {
|
|
270
|
+
readonly code: "BROKER_AGENT_NETWORKS_MISSING";
|
|
271
|
+
readonly httpStatus: 400;
|
|
272
|
+
readonly message: "Networks required";
|
|
273
|
+
};
|
|
274
|
+
readonly BROKER_AGENT_NETWORKS_EMPTY: {
|
|
275
|
+
readonly code: "BROKER_AGENT_NETWORKS_EMPTY";
|
|
276
|
+
readonly httpStatus: 400;
|
|
277
|
+
readonly message: "No networks specified";
|
|
278
|
+
};
|
|
279
|
+
readonly BROKER_AGENT_ALREADY_REGISTERED: {
|
|
280
|
+
readonly code: "BROKER_AGENT_ALREADY_REGISTERED";
|
|
281
|
+
readonly httpStatus: 409;
|
|
282
|
+
readonly message: "Agent already registered";
|
|
283
|
+
};
|
|
284
|
+
readonly BROKER_AGENT_NOT_FOUND: {
|
|
285
|
+
readonly code: "BROKER_AGENT_NOT_FOUND";
|
|
286
|
+
readonly httpStatus: 404;
|
|
287
|
+
readonly message: "Agent not found";
|
|
288
|
+
};
|
|
289
|
+
readonly BROKER_AGENT_ID_NOT_SET: {
|
|
290
|
+
readonly code: "BROKER_AGENT_ID_NOT_SET";
|
|
291
|
+
readonly httpStatus: 400;
|
|
292
|
+
readonly message: "Agent ID required";
|
|
293
|
+
};
|
|
294
|
+
readonly BROKER_AGENT_METADATA_NOT_FOUND: {
|
|
295
|
+
readonly code: "BROKER_AGENT_METADATA_NOT_FOUND";
|
|
296
|
+
readonly httpStatus: 404;
|
|
297
|
+
readonly message: "Agent metadata not found";
|
|
298
|
+
};
|
|
299
|
+
readonly BROKER_NETWORK_NOT_FOUND: {
|
|
300
|
+
readonly code: "BROKER_NETWORK_NOT_FOUND";
|
|
301
|
+
readonly httpStatus: 404;
|
|
302
|
+
readonly message: "Network not found";
|
|
303
|
+
};
|
|
304
|
+
readonly BROKER_NETWORK_ACCESS_DENIED: {
|
|
305
|
+
readonly code: "BROKER_NETWORK_ACCESS_DENIED";
|
|
306
|
+
readonly httpStatus: 403;
|
|
307
|
+
readonly message: "Network access denied";
|
|
308
|
+
};
|
|
309
|
+
readonly BROKER_NETWORK_PUBLISH_DENIED: {
|
|
310
|
+
readonly code: "BROKER_NETWORK_PUBLISH_DENIED";
|
|
311
|
+
readonly httpStatus: 403;
|
|
312
|
+
readonly message: "Publish denied for network";
|
|
313
|
+
};
|
|
314
|
+
readonly BROKER_QUEUE_CONNECTION_FAILED: {
|
|
315
|
+
readonly code: "BROKER_QUEUE_CONNECTION_FAILED";
|
|
316
|
+
readonly httpStatus: 503;
|
|
317
|
+
readonly message: "Failed to connect to message queue";
|
|
318
|
+
};
|
|
319
|
+
readonly BROKER_QUEUE_PUBLISH_FAILED: {
|
|
320
|
+
readonly code: "BROKER_QUEUE_PUBLISH_FAILED";
|
|
321
|
+
readonly httpStatus: 503;
|
|
322
|
+
readonly message: "Failed to publish message to queue";
|
|
323
|
+
};
|
|
324
|
+
readonly BROKER_QUEUE_SUBSCRIBE_FAILED: {
|
|
325
|
+
readonly code: "BROKER_QUEUE_SUBSCRIBE_FAILED";
|
|
326
|
+
readonly httpStatus: 503;
|
|
327
|
+
readonly message: "Failed to subscribe to queue";
|
|
328
|
+
};
|
|
329
|
+
readonly BROKER_QUEUE_NOT_FOUND: {
|
|
330
|
+
readonly code: "BROKER_QUEUE_NOT_FOUND";
|
|
331
|
+
readonly httpStatus: 404;
|
|
332
|
+
readonly message: "Message queue does not exist";
|
|
333
|
+
};
|
|
334
|
+
readonly BROKER_SCHEMA_COMPILATION_ERROR: {
|
|
335
|
+
readonly code: "BROKER_SCHEMA_COMPILATION_ERROR";
|
|
336
|
+
readonly httpStatus: 400;
|
|
337
|
+
readonly message: "Failed to compile JSON Schema";
|
|
338
|
+
};
|
|
339
|
+
readonly BROKER_PROTOCOL_VERSION_UNSUPPORTED: {
|
|
340
|
+
readonly code: "BROKER_PROTOCOL_VERSION_UNSUPPORTED";
|
|
341
|
+
readonly httpStatus: 400;
|
|
342
|
+
readonly message: "Protocol version not supported";
|
|
343
|
+
};
|
|
344
|
+
readonly BROKER_PROTOCOL_METHOD_UNKNOWN: {
|
|
345
|
+
readonly code: "BROKER_PROTOCOL_METHOD_UNKNOWN";
|
|
346
|
+
readonly httpStatus: 400;
|
|
347
|
+
readonly message: "Unknown protocol method";
|
|
348
|
+
};
|
|
349
|
+
readonly BROKER_PROTOCOL_INVALID_MESSAGE: {
|
|
350
|
+
readonly code: "BROKER_PROTOCOL_INVALID_MESSAGE";
|
|
351
|
+
readonly httpStatus: 400;
|
|
352
|
+
readonly message: "Invalid message format";
|
|
353
|
+
};
|
|
354
|
+
readonly BROKER_PROTOCOL_MISSING_PARAMS: {
|
|
355
|
+
readonly code: "BROKER_PROTOCOL_MISSING_PARAMS";
|
|
356
|
+
readonly httpStatus: 400;
|
|
357
|
+
readonly message: "Required parameters missing";
|
|
358
|
+
};
|
|
359
|
+
readonly BROKER_MCP_ALREADY_INITIALIZED: {
|
|
360
|
+
readonly code: "BROKER_MCP_ALREADY_INITIALIZED";
|
|
361
|
+
readonly httpStatus: 409;
|
|
362
|
+
readonly message: "MCP bridge is already initialized";
|
|
363
|
+
};
|
|
364
|
+
readonly BROKER_MCP_NOT_INITIALIZED: {
|
|
365
|
+
readonly code: "BROKER_MCP_NOT_INITIALIZED";
|
|
366
|
+
readonly httpStatus: 400;
|
|
367
|
+
readonly message: "MCP bridge must be initialized first";
|
|
368
|
+
};
|
|
369
|
+
readonly BROKER_MCP_METHOD_UNKNOWN: {
|
|
370
|
+
readonly code: "BROKER_MCP_METHOD_UNKNOWN";
|
|
371
|
+
readonly httpStatus: 400;
|
|
372
|
+
readonly message: "Unknown MCP method";
|
|
373
|
+
};
|
|
374
|
+
readonly BROKER_MCP_CLIENT_NOT_READY: {
|
|
375
|
+
readonly code: "BROKER_MCP_CLIENT_NOT_READY";
|
|
376
|
+
readonly httpStatus: 400;
|
|
377
|
+
readonly message: "MCP client not ready - must initialize first";
|
|
378
|
+
};
|
|
379
|
+
readonly BROKER_MCP_HANDLER_FAILED: {
|
|
380
|
+
readonly code: "BROKER_MCP_HANDLER_FAILED";
|
|
381
|
+
readonly httpStatus: 500;
|
|
382
|
+
readonly message: "MCP message handler failed";
|
|
383
|
+
};
|
|
384
|
+
readonly BROKER_NAMESPACE_INVALID_FORMAT: {
|
|
385
|
+
readonly code: "BROKER_NAMESPACE_INVALID_FORMAT";
|
|
386
|
+
readonly httpStatus: 400;
|
|
387
|
+
readonly message: "Invalid namespace format";
|
|
388
|
+
};
|
|
389
|
+
readonly BROKER_NAMESPACE_RESERVED: {
|
|
390
|
+
readonly code: "BROKER_NAMESPACE_RESERVED";
|
|
391
|
+
readonly httpStatus: 400;
|
|
392
|
+
readonly message: "Namespace is reserved and cannot be used";
|
|
393
|
+
};
|
|
394
|
+
readonly BROKER_NAMESPACE_VERSION_INVALID: {
|
|
395
|
+
readonly code: "BROKER_NAMESPACE_VERSION_INVALID";
|
|
396
|
+
readonly httpStatus: 400;
|
|
397
|
+
readonly message: "Invalid namespace version format";
|
|
398
|
+
};
|
|
399
|
+
readonly BROKER_TOOL_KEY_INVALID: {
|
|
400
|
+
readonly code: "BROKER_TOOL_KEY_INVALID";
|
|
401
|
+
readonly httpStatus: 400;
|
|
402
|
+
readonly message: "Invalid tool key format";
|
|
403
|
+
};
|
|
404
|
+
readonly BROKER_EVENT_SUBSCRIPTION_INVALID: {
|
|
405
|
+
readonly code: "BROKER_EVENT_SUBSCRIPTION_INVALID";
|
|
406
|
+
readonly httpStatus: 400;
|
|
407
|
+
readonly message: "Invalid event subscription parameters";
|
|
408
|
+
};
|
|
409
|
+
readonly BROKER_EVENT_SUBSCRIPTION_FAILED: {
|
|
410
|
+
readonly code: "BROKER_EVENT_SUBSCRIPTION_FAILED";
|
|
411
|
+
readonly httpStatus: 500;
|
|
412
|
+
readonly message: "Failed to establish event subscription";
|
|
413
|
+
};
|
|
414
|
+
readonly BROKER_EVENT_PUBLISH_INVALID: {
|
|
415
|
+
readonly code: "BROKER_EVENT_PUBLISH_INVALID";
|
|
416
|
+
readonly httpStatus: 400;
|
|
417
|
+
readonly message: "Invalid event publish parameters";
|
|
418
|
+
};
|
|
419
|
+
readonly BROKER_EVENT_PUBLISH_FAILED: {
|
|
420
|
+
readonly code: "BROKER_EVENT_PUBLISH_FAILED";
|
|
421
|
+
readonly httpStatus: 500;
|
|
422
|
+
readonly message: "Failed to publish event";
|
|
423
|
+
};
|
|
424
|
+
readonly BROKER_EVENT_DELIVERY_FAILED: {
|
|
425
|
+
readonly code: "BROKER_EVENT_DELIVERY_FAILED";
|
|
426
|
+
readonly httpStatus: 500;
|
|
427
|
+
readonly message: "Failed to deliver event to subscriber";
|
|
428
|
+
};
|
|
429
|
+
readonly BROKER_EVENT_CHANNEL_INVALID: {
|
|
430
|
+
readonly code: "BROKER_EVENT_CHANNEL_INVALID";
|
|
431
|
+
readonly httpStatus: 400;
|
|
432
|
+
readonly message: "Invalid event channel format";
|
|
433
|
+
};
|
|
434
|
+
readonly BROKER_EVENT_NETWORK_ACCESS_DENIED: {
|
|
435
|
+
readonly code: "BROKER_EVENT_NETWORK_ACCESS_DENIED";
|
|
436
|
+
readonly httpStatus: 403;
|
|
437
|
+
readonly message: "Access denied to event network";
|
|
438
|
+
};
|
|
439
|
+
readonly BROKER_EVENT_QUEUE_ERROR: {
|
|
440
|
+
readonly code: "BROKER_EVENT_QUEUE_ERROR";
|
|
441
|
+
readonly httpStatus: 500;
|
|
442
|
+
readonly message: "Event queue operation failed";
|
|
443
|
+
};
|
|
444
|
+
readonly BROKER_EVENT_MESSAGE_INVALID: {
|
|
445
|
+
readonly code: "BROKER_EVENT_MESSAGE_INVALID";
|
|
446
|
+
readonly httpStatus: 400;
|
|
447
|
+
readonly message: "Invalid event message structure";
|
|
448
|
+
};
|
|
449
|
+
readonly BROKER_INVALID_INPUT: {
|
|
450
|
+
readonly code: "BROKER_INVALID_INPUT";
|
|
451
|
+
readonly httpStatus: 400;
|
|
452
|
+
readonly message: "Input validation failed against expected schema";
|
|
453
|
+
};
|
|
454
|
+
readonly BROKER_TOOL_NOT_IN_NETWORK: {
|
|
455
|
+
readonly code: "BROKER_TOOL_NOT_IN_NETWORK";
|
|
456
|
+
readonly httpStatus: 404;
|
|
457
|
+
readonly message: "Tool not available in accessible networks";
|
|
458
|
+
};
|
|
459
|
+
readonly BROKER_TOOL_NAME_REQUIRED: {
|
|
460
|
+
readonly code: "BROKER_TOOL_NAME_REQUIRED";
|
|
461
|
+
readonly httpStatus: 400;
|
|
462
|
+
readonly message: "Tool name is required for invocation";
|
|
463
|
+
};
|
|
464
|
+
readonly BROKER_TOOL_NO_PROVIDERS: {
|
|
465
|
+
readonly code: "BROKER_TOOL_NO_PROVIDERS";
|
|
466
|
+
readonly httpStatus: 503;
|
|
467
|
+
readonly message: "No active providers available for tool";
|
|
468
|
+
};
|
|
469
|
+
};
|
|
16
470
|
export declare const ErrorCodes: {
|
|
17
|
-
readonly
|
|
18
|
-
readonly code: "
|
|
471
|
+
readonly BROKER_TOOL_NOT_FOUND: {
|
|
472
|
+
readonly code: "BROKER_TOOL_NOT_FOUND";
|
|
473
|
+
readonly httpStatus: 404;
|
|
474
|
+
readonly message: "Requested tool does not exist";
|
|
475
|
+
};
|
|
476
|
+
readonly BROKER_TOOL_NOT_ACCESSIBLE: {
|
|
477
|
+
readonly code: "BROKER_TOOL_NOT_ACCESSIBLE";
|
|
478
|
+
readonly httpStatus: 403;
|
|
479
|
+
readonly message: "Tool not accessible within caller networks";
|
|
480
|
+
};
|
|
481
|
+
readonly BROKER_TOOL_INPUT_SCHEMA_VIOLATION: {
|
|
482
|
+
readonly code: "BROKER_TOOL_INPUT_SCHEMA_VIOLATION";
|
|
483
|
+
readonly httpStatus: 400;
|
|
484
|
+
readonly message: "Tool input does not match schema";
|
|
485
|
+
};
|
|
486
|
+
readonly BROKER_TOOL_OUTPUT_SCHEMA_VIOLATION: {
|
|
487
|
+
readonly code: "BROKER_TOOL_OUTPUT_SCHEMA_VIOLATION";
|
|
488
|
+
readonly httpStatus: 500;
|
|
489
|
+
readonly message: "Tool output does not match schema";
|
|
490
|
+
};
|
|
491
|
+
readonly BROKER_SESSION_NOT_INITIALIZED: {
|
|
492
|
+
readonly code: "BROKER_SESSION_NOT_INITIALIZED";
|
|
493
|
+
readonly httpStatus: 400;
|
|
494
|
+
readonly message: "Session not initialized";
|
|
495
|
+
};
|
|
496
|
+
readonly BROKER_SESSION_ALREADY_INITIALIZED: {
|
|
497
|
+
readonly code: "BROKER_SESSION_ALREADY_INITIALIZED";
|
|
498
|
+
readonly httpStatus: 409;
|
|
499
|
+
readonly message: "Session already initialized";
|
|
500
|
+
};
|
|
501
|
+
readonly BROKER_SESSION_INVALID_STATE: {
|
|
502
|
+
readonly code: "BROKER_SESSION_INVALID_STATE";
|
|
503
|
+
readonly httpStatus: 400;
|
|
504
|
+
readonly message: "Invalid session state";
|
|
505
|
+
};
|
|
506
|
+
readonly BROKER_SESSION_HANDSHAKE_FAILED: {
|
|
507
|
+
readonly code: "BROKER_SESSION_HANDSHAKE_FAILED";
|
|
508
|
+
readonly httpStatus: 400;
|
|
509
|
+
readonly message: "Handshake failed";
|
|
510
|
+
};
|
|
511
|
+
readonly BROKER_SESSION_NOT_FOUND: {
|
|
512
|
+
readonly code: "BROKER_SESSION_NOT_FOUND";
|
|
513
|
+
readonly httpStatus: 404;
|
|
514
|
+
readonly message: "Session not found";
|
|
515
|
+
};
|
|
516
|
+
readonly BROKER_SESSION_TIMEOUT: {
|
|
517
|
+
readonly code: "BROKER_SESSION_TIMEOUT";
|
|
518
|
+
readonly httpStatus: 408;
|
|
519
|
+
readonly message: "Session timeout";
|
|
520
|
+
};
|
|
521
|
+
readonly BROKER_SESSION_ROLE_INVALID: {
|
|
522
|
+
readonly code: "BROKER_SESSION_ROLE_INVALID";
|
|
523
|
+
readonly httpStatus: 400;
|
|
524
|
+
readonly message: "Invalid session role";
|
|
525
|
+
};
|
|
526
|
+
readonly BROKER_SESSION_KADI_HANDLER_FAILED: {
|
|
527
|
+
readonly code: "BROKER_SESSION_KADI_HANDLER_FAILED";
|
|
528
|
+
readonly httpStatus: 500;
|
|
529
|
+
readonly message: "KADI handler failed";
|
|
530
|
+
};
|
|
531
|
+
readonly BROKER_SESSION_RATE_LIMITED: {
|
|
532
|
+
readonly code: "BROKER_SESSION_RATE_LIMITED";
|
|
533
|
+
readonly httpStatus: 429;
|
|
534
|
+
readonly message: "Session rate limited";
|
|
535
|
+
};
|
|
536
|
+
readonly BROKER_SESSION_NOT_READY: {
|
|
537
|
+
readonly code: "BROKER_SESSION_NOT_READY";
|
|
538
|
+
readonly httpStatus: 400;
|
|
539
|
+
readonly message: "Session not ready";
|
|
540
|
+
};
|
|
541
|
+
readonly BROKER_AUTH_MISSING_CREDENTIALS: {
|
|
542
|
+
readonly code: "BROKER_AUTH_MISSING_CREDENTIALS";
|
|
543
|
+
readonly httpStatus: 401;
|
|
544
|
+
readonly message: "Missing credentials";
|
|
545
|
+
};
|
|
546
|
+
readonly BROKER_AUTH_SIGNATURE_INVALID: {
|
|
547
|
+
readonly code: "BROKER_AUTH_SIGNATURE_INVALID";
|
|
548
|
+
readonly httpStatus: 401;
|
|
549
|
+
readonly message: "Invalid signature";
|
|
550
|
+
};
|
|
551
|
+
readonly BROKER_AUTH_PUBLIC_KEY_INVALID: {
|
|
552
|
+
readonly code: "BROKER_AUTH_PUBLIC_KEY_INVALID";
|
|
553
|
+
readonly httpStatus: 401;
|
|
554
|
+
readonly message: "Invalid public key";
|
|
555
|
+
};
|
|
556
|
+
readonly BROKER_AUTH_NONCE_MISMATCH: {
|
|
557
|
+
readonly code: "BROKER_AUTH_NONCE_MISMATCH";
|
|
558
|
+
readonly httpStatus: 401;
|
|
559
|
+
readonly message: "Nonce mismatch";
|
|
560
|
+
};
|
|
561
|
+
readonly BROKER_AUTH_AGENT_UNKNOWN: {
|
|
562
|
+
readonly code: "BROKER_AUTH_AGENT_UNKNOWN";
|
|
563
|
+
readonly httpStatus: 404;
|
|
564
|
+
readonly message: "Unknown agent";
|
|
565
|
+
};
|
|
566
|
+
readonly BROKER_AUTH_SEQUENCE_ERROR: {
|
|
567
|
+
readonly code: "BROKER_AUTH_SEQUENCE_ERROR";
|
|
568
|
+
readonly httpStatus: 400;
|
|
569
|
+
readonly message: "Auth sequence error";
|
|
570
|
+
};
|
|
571
|
+
readonly BROKER_AGENT_NOT_AUTHENTICATED: {
|
|
572
|
+
readonly code: "BROKER_AGENT_NOT_AUTHENTICATED";
|
|
573
|
+
readonly httpStatus: 401;
|
|
574
|
+
readonly message: "Agent not authenticated";
|
|
575
|
+
};
|
|
576
|
+
readonly BROKER_AGENT_NETWORKS_MISSING: {
|
|
577
|
+
readonly code: "BROKER_AGENT_NETWORKS_MISSING";
|
|
578
|
+
readonly httpStatus: 400;
|
|
579
|
+
readonly message: "Networks required";
|
|
580
|
+
};
|
|
581
|
+
readonly BROKER_AGENT_NETWORKS_EMPTY: {
|
|
582
|
+
readonly code: "BROKER_AGENT_NETWORKS_EMPTY";
|
|
583
|
+
readonly httpStatus: 400;
|
|
584
|
+
readonly message: "No networks specified";
|
|
585
|
+
};
|
|
586
|
+
readonly BROKER_AGENT_ALREADY_REGISTERED: {
|
|
587
|
+
readonly code: "BROKER_AGENT_ALREADY_REGISTERED";
|
|
588
|
+
readonly httpStatus: 409;
|
|
589
|
+
readonly message: "Agent already registered";
|
|
590
|
+
};
|
|
591
|
+
readonly BROKER_AGENT_NOT_FOUND: {
|
|
592
|
+
readonly code: "BROKER_AGENT_NOT_FOUND";
|
|
593
|
+
readonly httpStatus: 404;
|
|
594
|
+
readonly message: "Agent not found";
|
|
595
|
+
};
|
|
596
|
+
readonly BROKER_AGENT_ID_NOT_SET: {
|
|
597
|
+
readonly code: "BROKER_AGENT_ID_NOT_SET";
|
|
598
|
+
readonly httpStatus: 400;
|
|
599
|
+
readonly message: "Agent ID required";
|
|
600
|
+
};
|
|
601
|
+
readonly BROKER_AGENT_METADATA_NOT_FOUND: {
|
|
602
|
+
readonly code: "BROKER_AGENT_METADATA_NOT_FOUND";
|
|
603
|
+
readonly httpStatus: 404;
|
|
604
|
+
readonly message: "Agent metadata not found";
|
|
605
|
+
};
|
|
606
|
+
readonly BROKER_NETWORK_NOT_FOUND: {
|
|
607
|
+
readonly code: "BROKER_NETWORK_NOT_FOUND";
|
|
608
|
+
readonly httpStatus: 404;
|
|
609
|
+
readonly message: "Network not found";
|
|
610
|
+
};
|
|
611
|
+
readonly BROKER_NETWORK_ACCESS_DENIED: {
|
|
612
|
+
readonly code: "BROKER_NETWORK_ACCESS_DENIED";
|
|
613
|
+
readonly httpStatus: 403;
|
|
614
|
+
readonly message: "Network access denied";
|
|
615
|
+
};
|
|
616
|
+
readonly BROKER_NETWORK_PUBLISH_DENIED: {
|
|
617
|
+
readonly code: "BROKER_NETWORK_PUBLISH_DENIED";
|
|
618
|
+
readonly httpStatus: 403;
|
|
619
|
+
readonly message: "Publish denied for network";
|
|
620
|
+
};
|
|
621
|
+
readonly BROKER_QUEUE_CONNECTION_FAILED: {
|
|
622
|
+
readonly code: "BROKER_QUEUE_CONNECTION_FAILED";
|
|
623
|
+
readonly httpStatus: 503;
|
|
624
|
+
readonly message: "Failed to connect to message queue";
|
|
625
|
+
};
|
|
626
|
+
readonly BROKER_QUEUE_PUBLISH_FAILED: {
|
|
627
|
+
readonly code: "BROKER_QUEUE_PUBLISH_FAILED";
|
|
628
|
+
readonly httpStatus: 503;
|
|
629
|
+
readonly message: "Failed to publish message to queue";
|
|
630
|
+
};
|
|
631
|
+
readonly BROKER_QUEUE_SUBSCRIBE_FAILED: {
|
|
632
|
+
readonly code: "BROKER_QUEUE_SUBSCRIBE_FAILED";
|
|
633
|
+
readonly httpStatus: 503;
|
|
634
|
+
readonly message: "Failed to subscribe to queue";
|
|
635
|
+
};
|
|
636
|
+
readonly BROKER_QUEUE_NOT_FOUND: {
|
|
637
|
+
readonly code: "BROKER_QUEUE_NOT_FOUND";
|
|
638
|
+
readonly httpStatus: 404;
|
|
639
|
+
readonly message: "Message queue does not exist";
|
|
640
|
+
};
|
|
641
|
+
readonly BROKER_SCHEMA_COMPILATION_ERROR: {
|
|
642
|
+
readonly code: "BROKER_SCHEMA_COMPILATION_ERROR";
|
|
643
|
+
readonly httpStatus: 400;
|
|
644
|
+
readonly message: "Failed to compile JSON Schema";
|
|
645
|
+
};
|
|
646
|
+
readonly BROKER_PROTOCOL_VERSION_UNSUPPORTED: {
|
|
647
|
+
readonly code: "BROKER_PROTOCOL_VERSION_UNSUPPORTED";
|
|
648
|
+
readonly httpStatus: 400;
|
|
649
|
+
readonly message: "Protocol version not supported";
|
|
650
|
+
};
|
|
651
|
+
readonly BROKER_PROTOCOL_METHOD_UNKNOWN: {
|
|
652
|
+
readonly code: "BROKER_PROTOCOL_METHOD_UNKNOWN";
|
|
653
|
+
readonly httpStatus: 400;
|
|
654
|
+
readonly message: "Unknown protocol method";
|
|
655
|
+
};
|
|
656
|
+
readonly BROKER_PROTOCOL_INVALID_MESSAGE: {
|
|
657
|
+
readonly code: "BROKER_PROTOCOL_INVALID_MESSAGE";
|
|
658
|
+
readonly httpStatus: 400;
|
|
659
|
+
readonly message: "Invalid message format";
|
|
660
|
+
};
|
|
661
|
+
readonly BROKER_PROTOCOL_MISSING_PARAMS: {
|
|
662
|
+
readonly code: "BROKER_PROTOCOL_MISSING_PARAMS";
|
|
663
|
+
readonly httpStatus: 400;
|
|
664
|
+
readonly message: "Required parameters missing";
|
|
665
|
+
};
|
|
666
|
+
readonly BROKER_MCP_ALREADY_INITIALIZED: {
|
|
667
|
+
readonly code: "BROKER_MCP_ALREADY_INITIALIZED";
|
|
668
|
+
readonly httpStatus: 409;
|
|
669
|
+
readonly message: "MCP bridge is already initialized";
|
|
670
|
+
};
|
|
671
|
+
readonly BROKER_MCP_NOT_INITIALIZED: {
|
|
672
|
+
readonly code: "BROKER_MCP_NOT_INITIALIZED";
|
|
673
|
+
readonly httpStatus: 400;
|
|
674
|
+
readonly message: "MCP bridge must be initialized first";
|
|
675
|
+
};
|
|
676
|
+
readonly BROKER_MCP_METHOD_UNKNOWN: {
|
|
677
|
+
readonly code: "BROKER_MCP_METHOD_UNKNOWN";
|
|
678
|
+
readonly httpStatus: 400;
|
|
679
|
+
readonly message: "Unknown MCP method";
|
|
680
|
+
};
|
|
681
|
+
readonly BROKER_MCP_CLIENT_NOT_READY: {
|
|
682
|
+
readonly code: "BROKER_MCP_CLIENT_NOT_READY";
|
|
683
|
+
readonly httpStatus: 400;
|
|
684
|
+
readonly message: "MCP client not ready - must initialize first";
|
|
685
|
+
};
|
|
686
|
+
readonly BROKER_MCP_HANDLER_FAILED: {
|
|
687
|
+
readonly code: "BROKER_MCP_HANDLER_FAILED";
|
|
688
|
+
readonly httpStatus: 500;
|
|
689
|
+
readonly message: "MCP message handler failed";
|
|
690
|
+
};
|
|
691
|
+
readonly BROKER_NAMESPACE_INVALID_FORMAT: {
|
|
692
|
+
readonly code: "BROKER_NAMESPACE_INVALID_FORMAT";
|
|
693
|
+
readonly httpStatus: 400;
|
|
694
|
+
readonly message: "Invalid namespace format";
|
|
695
|
+
};
|
|
696
|
+
readonly BROKER_NAMESPACE_RESERVED: {
|
|
697
|
+
readonly code: "BROKER_NAMESPACE_RESERVED";
|
|
698
|
+
readonly httpStatus: 400;
|
|
699
|
+
readonly message: "Namespace is reserved and cannot be used";
|
|
700
|
+
};
|
|
701
|
+
readonly BROKER_NAMESPACE_VERSION_INVALID: {
|
|
702
|
+
readonly code: "BROKER_NAMESPACE_VERSION_INVALID";
|
|
703
|
+
readonly httpStatus: 400;
|
|
704
|
+
readonly message: "Invalid namespace version format";
|
|
705
|
+
};
|
|
706
|
+
readonly BROKER_TOOL_KEY_INVALID: {
|
|
707
|
+
readonly code: "BROKER_TOOL_KEY_INVALID";
|
|
708
|
+
readonly httpStatus: 400;
|
|
709
|
+
readonly message: "Invalid tool key format";
|
|
710
|
+
};
|
|
711
|
+
readonly BROKER_EVENT_SUBSCRIPTION_INVALID: {
|
|
712
|
+
readonly code: "BROKER_EVENT_SUBSCRIPTION_INVALID";
|
|
713
|
+
readonly httpStatus: 400;
|
|
714
|
+
readonly message: "Invalid event subscription parameters";
|
|
715
|
+
};
|
|
716
|
+
readonly BROKER_EVENT_SUBSCRIPTION_FAILED: {
|
|
717
|
+
readonly code: "BROKER_EVENT_SUBSCRIPTION_FAILED";
|
|
718
|
+
readonly httpStatus: 500;
|
|
719
|
+
readonly message: "Failed to establish event subscription";
|
|
720
|
+
};
|
|
721
|
+
readonly BROKER_EVENT_PUBLISH_INVALID: {
|
|
722
|
+
readonly code: "BROKER_EVENT_PUBLISH_INVALID";
|
|
723
|
+
readonly httpStatus: 400;
|
|
724
|
+
readonly message: "Invalid event publish parameters";
|
|
725
|
+
};
|
|
726
|
+
readonly BROKER_EVENT_PUBLISH_FAILED: {
|
|
727
|
+
readonly code: "BROKER_EVENT_PUBLISH_FAILED";
|
|
728
|
+
readonly httpStatus: 500;
|
|
729
|
+
readonly message: "Failed to publish event";
|
|
730
|
+
};
|
|
731
|
+
readonly BROKER_EVENT_DELIVERY_FAILED: {
|
|
732
|
+
readonly code: "BROKER_EVENT_DELIVERY_FAILED";
|
|
733
|
+
readonly httpStatus: 500;
|
|
734
|
+
readonly message: "Failed to deliver event to subscriber";
|
|
735
|
+
};
|
|
736
|
+
readonly BROKER_EVENT_CHANNEL_INVALID: {
|
|
737
|
+
readonly code: "BROKER_EVENT_CHANNEL_INVALID";
|
|
738
|
+
readonly httpStatus: 400;
|
|
739
|
+
readonly message: "Invalid event channel format";
|
|
740
|
+
};
|
|
741
|
+
readonly BROKER_EVENT_NETWORK_ACCESS_DENIED: {
|
|
742
|
+
readonly code: "BROKER_EVENT_NETWORK_ACCESS_DENIED";
|
|
743
|
+
readonly httpStatus: 403;
|
|
744
|
+
readonly message: "Access denied to event network";
|
|
745
|
+
};
|
|
746
|
+
readonly BROKER_EVENT_QUEUE_ERROR: {
|
|
747
|
+
readonly code: "BROKER_EVENT_QUEUE_ERROR";
|
|
748
|
+
readonly httpStatus: 500;
|
|
749
|
+
readonly message: "Event queue operation failed";
|
|
750
|
+
};
|
|
751
|
+
readonly BROKER_EVENT_MESSAGE_INVALID: {
|
|
752
|
+
readonly code: "BROKER_EVENT_MESSAGE_INVALID";
|
|
753
|
+
readonly httpStatus: 400;
|
|
754
|
+
readonly message: "Invalid event message structure";
|
|
755
|
+
};
|
|
756
|
+
readonly BROKER_INVALID_INPUT: {
|
|
757
|
+
readonly code: "BROKER_INVALID_INPUT";
|
|
758
|
+
readonly httpStatus: 400;
|
|
759
|
+
readonly message: "Input validation failed against expected schema";
|
|
760
|
+
};
|
|
761
|
+
readonly BROKER_TOOL_NOT_IN_NETWORK: {
|
|
762
|
+
readonly code: "BROKER_TOOL_NOT_IN_NETWORK";
|
|
763
|
+
readonly httpStatus: 404;
|
|
764
|
+
readonly message: "Tool not available in accessible networks";
|
|
765
|
+
};
|
|
766
|
+
readonly BROKER_TOOL_NAME_REQUIRED: {
|
|
767
|
+
readonly code: "BROKER_TOOL_NAME_REQUIRED";
|
|
768
|
+
readonly httpStatus: 400;
|
|
769
|
+
readonly message: "Tool name is required for invocation";
|
|
770
|
+
};
|
|
771
|
+
readonly BROKER_TOOL_NO_PROVIDERS: {
|
|
772
|
+
readonly code: "BROKER_TOOL_NO_PROVIDERS";
|
|
773
|
+
readonly httpStatus: 503;
|
|
774
|
+
readonly message: "No active providers available for tool";
|
|
775
|
+
};
|
|
776
|
+
readonly CORE_CONNECTION_FAILED: {
|
|
777
|
+
readonly code: "CORE_CONNECTION_FAILED";
|
|
19
778
|
readonly httpStatus: 503;
|
|
20
779
|
readonly message: "Failed to establish connection";
|
|
21
780
|
};
|
|
22
|
-
readonly
|
|
23
|
-
readonly code: "
|
|
781
|
+
readonly CORE_CONNECTION_TIMEOUT: {
|
|
782
|
+
readonly code: "CORE_CONNECTION_TIMEOUT";
|
|
24
783
|
readonly httpStatus: 408;
|
|
25
784
|
readonly message: "Connection attempt timed out";
|
|
26
785
|
};
|
|
27
|
-
readonly
|
|
28
|
-
readonly code: "
|
|
786
|
+
readonly CORE_CONNECTION_REFUSED: {
|
|
787
|
+
readonly code: "CORE_CONNECTION_REFUSED";
|
|
29
788
|
readonly httpStatus: 503;
|
|
30
789
|
readonly message: "Connection refused by remote server";
|
|
31
790
|
};
|
|
32
|
-
readonly
|
|
33
|
-
readonly code: "
|
|
791
|
+
readonly CORE_BROKER_UNAVAILABLE: {
|
|
792
|
+
readonly code: "CORE_BROKER_UNAVAILABLE";
|
|
34
793
|
readonly httpStatus: 503;
|
|
35
794
|
readonly message: "Broker service is unavailable";
|
|
36
795
|
};
|
|
37
|
-
readonly
|
|
38
|
-
readonly code: "
|
|
796
|
+
readonly CORE_BROKER_CONNECTION_LOST: {
|
|
797
|
+
readonly code: "CORE_BROKER_CONNECTION_LOST";
|
|
39
798
|
readonly httpStatus: 503;
|
|
40
799
|
readonly message: "Connection to broker was lost";
|
|
41
800
|
};
|
|
42
|
-
readonly
|
|
43
|
-
readonly code: "
|
|
801
|
+
readonly CORE_AUTH_FAILED: {
|
|
802
|
+
readonly code: "CORE_AUTH_FAILED";
|
|
44
803
|
readonly httpStatus: 401;
|
|
45
804
|
readonly message: "Authentication failed";
|
|
46
805
|
};
|
|
47
|
-
readonly
|
|
48
|
-
readonly code: "
|
|
806
|
+
readonly CORE_AUTH_HANDSHAKE_FAILED: {
|
|
807
|
+
readonly code: "CORE_AUTH_HANDSHAKE_FAILED";
|
|
49
808
|
readonly httpStatus: 400;
|
|
50
809
|
readonly message: "Authentication handshake failed";
|
|
51
810
|
};
|
|
52
|
-
readonly
|
|
53
|
-
readonly code: "
|
|
811
|
+
readonly CORE_AUTH_TOKEN_INVALID: {
|
|
812
|
+
readonly code: "CORE_AUTH_TOKEN_INVALID";
|
|
54
813
|
readonly httpStatus: 401;
|
|
55
814
|
readonly message: "Invalid authentication token";
|
|
56
815
|
};
|
|
57
|
-
readonly
|
|
58
|
-
readonly code: "
|
|
816
|
+
readonly CORE_ABILITY_NOT_FOUND: {
|
|
817
|
+
readonly code: "CORE_ABILITY_NOT_FOUND";
|
|
59
818
|
readonly httpStatus: 404;
|
|
60
819
|
readonly message: "Requested ability does not exist";
|
|
61
820
|
};
|
|
62
|
-
readonly
|
|
63
|
-
readonly code: "
|
|
821
|
+
readonly CORE_ABILITY_LOAD_FAILED: {
|
|
822
|
+
readonly code: "CORE_ABILITY_LOAD_FAILED";
|
|
64
823
|
readonly httpStatus: 500;
|
|
65
824
|
readonly message: "Failed to load ability";
|
|
66
825
|
};
|
|
67
|
-
readonly
|
|
68
|
-
readonly code: "
|
|
826
|
+
readonly CORE_ABILITY_NOT_ACCESSIBLE: {
|
|
827
|
+
readonly code: "CORE_ABILITY_NOT_ACCESSIBLE";
|
|
69
828
|
readonly httpStatus: 403;
|
|
70
829
|
readonly message: "Ability not accessible in current context";
|
|
71
830
|
};
|
|
72
|
-
readonly
|
|
73
|
-
readonly code: "
|
|
831
|
+
readonly CORE_ABILITY_START_FAILED: {
|
|
832
|
+
readonly code: "CORE_ABILITY_START_FAILED";
|
|
74
833
|
readonly httpStatus: 500;
|
|
75
834
|
readonly message: "Failed to start ability process";
|
|
76
835
|
};
|
|
77
|
-
readonly
|
|
78
|
-
readonly code: "
|
|
836
|
+
readonly CORE_ABILITY_TIMEOUT: {
|
|
837
|
+
readonly code: "CORE_ABILITY_TIMEOUT";
|
|
79
838
|
readonly httpStatus: 408;
|
|
80
839
|
readonly message: "Ability operation timed out";
|
|
81
840
|
};
|
|
82
|
-
readonly
|
|
83
|
-
readonly code: "
|
|
841
|
+
readonly CORE_ABILITY_PATH_INVALID: {
|
|
842
|
+
readonly code: "CORE_ABILITY_PATH_INVALID";
|
|
84
843
|
readonly httpStatus: 400;
|
|
85
844
|
readonly message: "Invalid ability path or name format";
|
|
86
845
|
};
|
|
87
|
-
readonly
|
|
88
|
-
readonly code: "
|
|
846
|
+
readonly CORE_ABILITY_MANIFEST_INVALID: {
|
|
847
|
+
readonly code: "CORE_ABILITY_MANIFEST_INVALID";
|
|
89
848
|
readonly httpStatus: 400;
|
|
90
849
|
readonly message: "Ability manifest file is invalid or missing";
|
|
91
850
|
};
|
|
92
|
-
readonly
|
|
93
|
-
readonly code: "
|
|
851
|
+
readonly CORE_TOOL_NOT_FOUND: {
|
|
852
|
+
readonly code: "CORE_TOOL_NOT_FOUND";
|
|
94
853
|
readonly httpStatus: 404;
|
|
95
854
|
readonly message: "Requested tool does not exist";
|
|
96
855
|
};
|
|
97
|
-
readonly
|
|
98
|
-
readonly code: "
|
|
856
|
+
readonly CORE_TOOL_INVOCATION_FAILED: {
|
|
857
|
+
readonly code: "CORE_TOOL_INVOCATION_FAILED";
|
|
99
858
|
readonly httpStatus: 500;
|
|
100
859
|
readonly message: "Tool invocation failed";
|
|
101
860
|
};
|
|
102
|
-
readonly
|
|
103
|
-
readonly code: "
|
|
861
|
+
readonly CORE_TOOL_TIMEOUT: {
|
|
862
|
+
readonly code: "CORE_TOOL_TIMEOUT";
|
|
104
863
|
readonly httpStatus: 408;
|
|
105
864
|
readonly message: "Tool execution timed out";
|
|
106
865
|
};
|
|
107
|
-
readonly
|
|
108
|
-
readonly code: "
|
|
866
|
+
readonly CORE_TOOL_INPUT_INVALID: {
|
|
867
|
+
readonly code: "CORE_TOOL_INPUT_INVALID";
|
|
109
868
|
readonly httpStatus: 400;
|
|
110
869
|
readonly message: "Tool input validation failed";
|
|
111
870
|
};
|
|
112
|
-
readonly
|
|
113
|
-
readonly code: "
|
|
871
|
+
readonly CORE_PROTOCOL_UNSUPPORTED: {
|
|
872
|
+
readonly code: "CORE_PROTOCOL_UNSUPPORTED";
|
|
114
873
|
readonly httpStatus: 400;
|
|
115
874
|
readonly message: "Protocol not supported";
|
|
116
875
|
};
|
|
117
|
-
readonly
|
|
118
|
-
readonly code: "
|
|
876
|
+
readonly CORE_PROTOCOL_VERSION_MISMATCH: {
|
|
877
|
+
readonly code: "CORE_PROTOCOL_VERSION_MISMATCH";
|
|
119
878
|
readonly httpStatus: 400;
|
|
120
879
|
readonly message: "Protocol version mismatch";
|
|
121
880
|
};
|
|
122
|
-
readonly
|
|
123
|
-
readonly code: "
|
|
881
|
+
readonly CORE_MESSAGE_INVALID: {
|
|
882
|
+
readonly code: "CORE_MESSAGE_INVALID";
|
|
124
883
|
readonly httpStatus: 400;
|
|
125
884
|
readonly message: "Invalid message format";
|
|
126
885
|
};
|
|
127
|
-
readonly
|
|
128
|
-
readonly code: "
|
|
886
|
+
readonly CORE_RPC_REQUEST_FAILED: {
|
|
887
|
+
readonly code: "CORE_RPC_REQUEST_FAILED";
|
|
129
888
|
readonly httpStatus: 500;
|
|
130
889
|
readonly message: "RPC request failed";
|
|
131
890
|
};
|
|
132
|
-
readonly
|
|
133
|
-
readonly code: "
|
|
891
|
+
readonly CORE_CONFIG_INVALID: {
|
|
892
|
+
readonly code: "CORE_CONFIG_INVALID";
|
|
134
893
|
readonly httpStatus: 400;
|
|
135
894
|
readonly message: "Invalid configuration";
|
|
136
895
|
};
|
|
137
|
-
readonly
|
|
138
|
-
readonly code: "
|
|
896
|
+
readonly CORE_CONFIG_MISSING: {
|
|
897
|
+
readonly code: "CORE_CONFIG_MISSING";
|
|
139
898
|
readonly httpStatus: 400;
|
|
140
899
|
readonly message: "Required configuration missing";
|
|
141
900
|
};
|
|
142
|
-
readonly
|
|
143
|
-
readonly code: "
|
|
901
|
+
readonly CORE_CONFIG_PATH_INVALID: {
|
|
902
|
+
readonly code: "CORE_CONFIG_PATH_INVALID";
|
|
144
903
|
readonly httpStatus: 400;
|
|
145
904
|
readonly message: "Invalid configuration file path";
|
|
146
905
|
};
|
|
147
|
-
readonly
|
|
148
|
-
readonly code: "
|
|
906
|
+
readonly CORE_INTERNAL_ERROR: {
|
|
907
|
+
readonly code: "CORE_INTERNAL_ERROR";
|
|
149
908
|
readonly httpStatus: 500;
|
|
150
909
|
readonly message: "An internal error occurred";
|
|
151
910
|
};
|
|
152
|
-
readonly
|
|
153
|
-
readonly code: "
|
|
911
|
+
readonly CORE_NOT_IMPLEMENTED: {
|
|
912
|
+
readonly code: "CORE_NOT_IMPLEMENTED";
|
|
154
913
|
readonly httpStatus: 501;
|
|
155
914
|
readonly message: "Feature not yet implemented";
|
|
156
915
|
};
|
|
157
|
-
readonly
|
|
158
|
-
readonly code: "
|
|
916
|
+
readonly CORE_SYSTEM_OVERLOADED: {
|
|
917
|
+
readonly code: "CORE_SYSTEM_OVERLOADED";
|
|
159
918
|
readonly httpStatus: 503;
|
|
160
919
|
readonly message: "System is currently overloaded";
|
|
161
920
|
};
|
|
162
921
|
};
|
|
922
|
+
export type CoreErrorCode = keyof typeof CoreErrorCodes;
|
|
923
|
+
export type BrokerErrorCode = keyof typeof BrokerErrorCodes;
|
|
163
924
|
export type ErrorCode = keyof typeof ErrorCodes;
|
|
164
925
|
export interface ErrorContext {
|
|
926
|
+
domain?: 'core' | 'broker';
|
|
165
927
|
abilityName?: string;
|
|
166
|
-
|
|
928
|
+
transport?: string;
|
|
167
929
|
brokerUrl?: string;
|
|
168
930
|
toolName?: string;
|
|
169
931
|
method?: string;
|
|
@@ -194,7 +956,7 @@ export declare class KadiError extends Error {
|
|
|
194
956
|
/**
|
|
195
957
|
* Create an ability not found error
|
|
196
958
|
*/
|
|
197
|
-
static abilityNotFound(abilityName: string,
|
|
959
|
+
static abilityNotFound(abilityName: string, transport?: string): KadiError;
|
|
198
960
|
/**
|
|
199
961
|
* Create a tool not found error
|
|
200
962
|
*/
|
|
@@ -203,6 +965,14 @@ export declare class KadiError extends Error {
|
|
|
203
965
|
* Convert to client-friendly format
|
|
204
966
|
*/
|
|
205
967
|
toClientError(): object;
|
|
968
|
+
/**
|
|
969
|
+
* Convert to JSON-RPC error format (broker-compatible)
|
|
970
|
+
*/
|
|
971
|
+
toJsonRpcError(): {
|
|
972
|
+
code: number;
|
|
973
|
+
message: string;
|
|
974
|
+
data?: unknown;
|
|
975
|
+
};
|
|
206
976
|
/**
|
|
207
977
|
* Convert to detailed log format
|
|
208
978
|
*/
|