@kadi.build/core 0.0.1-alpha.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +362 -1305
- package/dist/client.d.ts +573 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +1673 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +107 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +147 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +37 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -23
- package/dist/index.js.map +1 -1
- package/dist/lockfile.d.ts +190 -0
- package/dist/lockfile.d.ts.map +1 -0
- package/dist/lockfile.js +373 -0
- package/dist/lockfile.js.map +1 -0
- package/dist/transports/broker.d.ts +75 -0
- package/dist/transports/broker.d.ts.map +1 -0
- package/dist/transports/broker.js +383 -0
- package/dist/transports/broker.js.map +1 -0
- package/dist/transports/native.d.ts +39 -0
- package/dist/transports/native.d.ts.map +1 -0
- package/dist/transports/native.js +189 -0
- package/dist/transports/native.js.map +1 -0
- package/dist/transports/stdio.d.ts +46 -0
- package/dist/transports/stdio.d.ts.map +1 -0
- package/dist/transports/stdio.js +460 -0
- package/dist/transports/stdio.js.map +1 -0
- package/dist/types.d.ts +664 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/zod.d.ts +34 -0
- package/dist/zod.d.ts.map +1 -0
- package/dist/zod.js +60 -0
- package/dist/zod.js.map +1 -0
- package/package.json +13 -28
- package/dist/KadiClient.d.ts +0 -432
- package/dist/KadiClient.d.ts.map +0 -1
- package/dist/KadiClient.js +0 -1506
- package/dist/KadiClient.js.map +0 -1
- package/dist/errors/error-codes.d.ts +0 -985
- package/dist/errors/error-codes.d.ts.map +0 -1
- package/dist/errors/error-codes.js +0 -638
- package/dist/errors/error-codes.js.map +0 -1
- package/dist/loadAbility.d.ts +0 -105
- package/dist/loadAbility.d.ts.map +0 -1
- package/dist/loadAbility.js +0 -370
- package/dist/loadAbility.js.map +0 -1
- package/dist/messages/BrokerMessages.d.ts +0 -84
- package/dist/messages/BrokerMessages.d.ts.map +0 -1
- package/dist/messages/BrokerMessages.js +0 -125
- package/dist/messages/BrokerMessages.js.map +0 -1
- package/dist/messages/MessageBuilder.d.ts +0 -83
- package/dist/messages/MessageBuilder.d.ts.map +0 -1
- package/dist/messages/MessageBuilder.js +0 -144
- package/dist/messages/MessageBuilder.js.map +0 -1
- package/dist/schemas/events.schemas.d.ts +0 -177
- package/dist/schemas/events.schemas.d.ts.map +0 -1
- package/dist/schemas/events.schemas.js +0 -265
- package/dist/schemas/events.schemas.js.map +0 -1
- package/dist/schemas/index.d.ts +0 -3
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/index.js +0 -4
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/kadi.schemas.d.ts +0 -70
- package/dist/schemas/kadi.schemas.d.ts.map +0 -1
- package/dist/schemas/kadi.schemas.js +0 -120
- package/dist/schemas/kadi.schemas.js.map +0 -1
- package/dist/transports/BrokerTransport.d.ts +0 -102
- package/dist/transports/BrokerTransport.d.ts.map +0 -1
- package/dist/transports/BrokerTransport.js +0 -177
- package/dist/transports/BrokerTransport.js.map +0 -1
- package/dist/transports/NativeTransport.d.ts +0 -82
- package/dist/transports/NativeTransport.d.ts.map +0 -1
- package/dist/transports/NativeTransport.js +0 -263
- package/dist/transports/NativeTransport.js.map +0 -1
- package/dist/transports/StdioTransport.d.ts +0 -112
- package/dist/transports/StdioTransport.d.ts.map +0 -1
- package/dist/transports/StdioTransport.js +0 -450
- package/dist/transports/StdioTransport.js.map +0 -1
- package/dist/transports/Transport.d.ts +0 -93
- package/dist/transports/Transport.d.ts.map +0 -1
- package/dist/transports/Transport.js +0 -13
- package/dist/transports/Transport.js.map +0 -1
- package/dist/types/broker.d.ts +0 -31
- package/dist/types/broker.d.ts.map +0 -1
- package/dist/types/broker.js +0 -6
- package/dist/types/broker.js.map +0 -1
- package/dist/types/core.d.ts +0 -139
- package/dist/types/core.d.ts.map +0 -1
- package/dist/types/core.js +0 -26
- package/dist/types/core.js.map +0 -1
- package/dist/types/events.d.ts +0 -186
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/events.js +0 -16
- package/dist/types/events.js.map +0 -1
- package/dist/types/index.d.ts +0 -9
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -13
- package/dist/types/index.js.map +0 -1
- package/dist/types/protocol.d.ts +0 -160
- package/dist/types/protocol.d.ts.map +0 -1
- package/dist/types/protocol.js +0 -5
- package/dist/types/protocol.js.map +0 -1
- package/dist/utils/agentUtils.d.ts +0 -187
- package/dist/utils/agentUtils.d.ts.map +0 -1
- package/dist/utils/agentUtils.js +0 -185
- package/dist/utils/agentUtils.js.map +0 -1
- package/dist/utils/commandUtils.d.ts +0 -45
- package/dist/utils/commandUtils.d.ts.map +0 -1
- package/dist/utils/commandUtils.js +0 -145
- package/dist/utils/commandUtils.js.map +0 -1
- package/dist/utils/configUtils.d.ts +0 -55
- package/dist/utils/configUtils.d.ts.map +0 -1
- package/dist/utils/configUtils.js +0 -100
- package/dist/utils/configUtils.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -59
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -122
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/pathUtils.d.ts +0 -48
- package/dist/utils/pathUtils.d.ts.map +0 -1
- package/dist/utils/pathUtils.js +0 -128
- package/dist/utils/pathUtils.js.map +0 -1
|
@@ -1,985 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* KADI Core Error Codes
|
|
3
|
-
*
|
|
4
|
-
* Inspired by the broker error system to ensure consistency
|
|
5
|
-
*
|
|
6
|
-
* Format: DOMAIN_SPECIFIC_ERROR
|
|
7
|
-
* Ranges:
|
|
8
|
-
* 1000-1999: Connection errors
|
|
9
|
-
* 2000-2999: Authentication errors
|
|
10
|
-
* 3000-3999: Ability/Loading errors
|
|
11
|
-
* 4000-4999: Tool execution errors
|
|
12
|
-
* 5000-5999: Protocol errors
|
|
13
|
-
* 6000-6999: Configuration errors
|
|
14
|
-
* 7000-7999: System/Internal errors
|
|
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
|
-
};
|
|
470
|
-
export declare const ErrorCodes: {
|
|
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";
|
|
778
|
-
readonly httpStatus: 503;
|
|
779
|
-
readonly message: "Failed to establish connection";
|
|
780
|
-
};
|
|
781
|
-
readonly CORE_CONNECTION_TIMEOUT: {
|
|
782
|
-
readonly code: "CORE_CONNECTION_TIMEOUT";
|
|
783
|
-
readonly httpStatus: 408;
|
|
784
|
-
readonly message: "Connection attempt timed out";
|
|
785
|
-
};
|
|
786
|
-
readonly CORE_CONNECTION_REFUSED: {
|
|
787
|
-
readonly code: "CORE_CONNECTION_REFUSED";
|
|
788
|
-
readonly httpStatus: 503;
|
|
789
|
-
readonly message: "Connection refused by remote server";
|
|
790
|
-
};
|
|
791
|
-
readonly CORE_BROKER_UNAVAILABLE: {
|
|
792
|
-
readonly code: "CORE_BROKER_UNAVAILABLE";
|
|
793
|
-
readonly httpStatus: 503;
|
|
794
|
-
readonly message: "Broker service is unavailable";
|
|
795
|
-
};
|
|
796
|
-
readonly CORE_BROKER_CONNECTION_LOST: {
|
|
797
|
-
readonly code: "CORE_BROKER_CONNECTION_LOST";
|
|
798
|
-
readonly httpStatus: 503;
|
|
799
|
-
readonly message: "Connection to broker was lost";
|
|
800
|
-
};
|
|
801
|
-
readonly CORE_AUTH_FAILED: {
|
|
802
|
-
readonly code: "CORE_AUTH_FAILED";
|
|
803
|
-
readonly httpStatus: 401;
|
|
804
|
-
readonly message: "Authentication failed";
|
|
805
|
-
};
|
|
806
|
-
readonly CORE_AUTH_HANDSHAKE_FAILED: {
|
|
807
|
-
readonly code: "CORE_AUTH_HANDSHAKE_FAILED";
|
|
808
|
-
readonly httpStatus: 400;
|
|
809
|
-
readonly message: "Authentication handshake failed";
|
|
810
|
-
};
|
|
811
|
-
readonly CORE_AUTH_TOKEN_INVALID: {
|
|
812
|
-
readonly code: "CORE_AUTH_TOKEN_INVALID";
|
|
813
|
-
readonly httpStatus: 401;
|
|
814
|
-
readonly message: "Invalid authentication token";
|
|
815
|
-
};
|
|
816
|
-
readonly CORE_ABILITY_NOT_FOUND: {
|
|
817
|
-
readonly code: "CORE_ABILITY_NOT_FOUND";
|
|
818
|
-
readonly httpStatus: 404;
|
|
819
|
-
readonly message: "Requested ability does not exist";
|
|
820
|
-
};
|
|
821
|
-
readonly CORE_ABILITY_LOAD_FAILED: {
|
|
822
|
-
readonly code: "CORE_ABILITY_LOAD_FAILED";
|
|
823
|
-
readonly httpStatus: 500;
|
|
824
|
-
readonly message: "Failed to load ability";
|
|
825
|
-
};
|
|
826
|
-
readonly CORE_ABILITY_NOT_ACCESSIBLE: {
|
|
827
|
-
readonly code: "CORE_ABILITY_NOT_ACCESSIBLE";
|
|
828
|
-
readonly httpStatus: 403;
|
|
829
|
-
readonly message: "Ability not accessible in current context";
|
|
830
|
-
};
|
|
831
|
-
readonly CORE_ABILITY_START_FAILED: {
|
|
832
|
-
readonly code: "CORE_ABILITY_START_FAILED";
|
|
833
|
-
readonly httpStatus: 500;
|
|
834
|
-
readonly message: "Failed to start ability process";
|
|
835
|
-
};
|
|
836
|
-
readonly CORE_ABILITY_TIMEOUT: {
|
|
837
|
-
readonly code: "CORE_ABILITY_TIMEOUT";
|
|
838
|
-
readonly httpStatus: 408;
|
|
839
|
-
readonly message: "Ability operation timed out";
|
|
840
|
-
};
|
|
841
|
-
readonly CORE_ABILITY_PATH_INVALID: {
|
|
842
|
-
readonly code: "CORE_ABILITY_PATH_INVALID";
|
|
843
|
-
readonly httpStatus: 400;
|
|
844
|
-
readonly message: "Invalid ability path or name format";
|
|
845
|
-
};
|
|
846
|
-
readonly CORE_ABILITY_MANIFEST_INVALID: {
|
|
847
|
-
readonly code: "CORE_ABILITY_MANIFEST_INVALID";
|
|
848
|
-
readonly httpStatus: 400;
|
|
849
|
-
readonly message: "Ability manifest file is invalid or missing";
|
|
850
|
-
};
|
|
851
|
-
readonly CORE_TOOL_NOT_FOUND: {
|
|
852
|
-
readonly code: "CORE_TOOL_NOT_FOUND";
|
|
853
|
-
readonly httpStatus: 404;
|
|
854
|
-
readonly message: "Requested tool does not exist";
|
|
855
|
-
};
|
|
856
|
-
readonly CORE_TOOL_INVOCATION_FAILED: {
|
|
857
|
-
readonly code: "CORE_TOOL_INVOCATION_FAILED";
|
|
858
|
-
readonly httpStatus: 500;
|
|
859
|
-
readonly message: "Tool invocation failed";
|
|
860
|
-
};
|
|
861
|
-
readonly CORE_TOOL_TIMEOUT: {
|
|
862
|
-
readonly code: "CORE_TOOL_TIMEOUT";
|
|
863
|
-
readonly httpStatus: 408;
|
|
864
|
-
readonly message: "Tool execution timed out";
|
|
865
|
-
};
|
|
866
|
-
readonly CORE_TOOL_INPUT_INVALID: {
|
|
867
|
-
readonly code: "CORE_TOOL_INPUT_INVALID";
|
|
868
|
-
readonly httpStatus: 400;
|
|
869
|
-
readonly message: "Tool input validation failed";
|
|
870
|
-
};
|
|
871
|
-
readonly CORE_PROTOCOL_UNSUPPORTED: {
|
|
872
|
-
readonly code: "CORE_PROTOCOL_UNSUPPORTED";
|
|
873
|
-
readonly httpStatus: 400;
|
|
874
|
-
readonly message: "Protocol not supported";
|
|
875
|
-
};
|
|
876
|
-
readonly CORE_PROTOCOL_VERSION_MISMATCH: {
|
|
877
|
-
readonly code: "CORE_PROTOCOL_VERSION_MISMATCH";
|
|
878
|
-
readonly httpStatus: 400;
|
|
879
|
-
readonly message: "Protocol version mismatch";
|
|
880
|
-
};
|
|
881
|
-
readonly CORE_MESSAGE_INVALID: {
|
|
882
|
-
readonly code: "CORE_MESSAGE_INVALID";
|
|
883
|
-
readonly httpStatus: 400;
|
|
884
|
-
readonly message: "Invalid message format";
|
|
885
|
-
};
|
|
886
|
-
readonly CORE_RPC_REQUEST_FAILED: {
|
|
887
|
-
readonly code: "CORE_RPC_REQUEST_FAILED";
|
|
888
|
-
readonly httpStatus: 500;
|
|
889
|
-
readonly message: "RPC request failed";
|
|
890
|
-
};
|
|
891
|
-
readonly CORE_CONFIG_INVALID: {
|
|
892
|
-
readonly code: "CORE_CONFIG_INVALID";
|
|
893
|
-
readonly httpStatus: 400;
|
|
894
|
-
readonly message: "Invalid configuration";
|
|
895
|
-
};
|
|
896
|
-
readonly CORE_CONFIG_MISSING: {
|
|
897
|
-
readonly code: "CORE_CONFIG_MISSING";
|
|
898
|
-
readonly httpStatus: 400;
|
|
899
|
-
readonly message: "Required configuration missing";
|
|
900
|
-
};
|
|
901
|
-
readonly CORE_CONFIG_PATH_INVALID: {
|
|
902
|
-
readonly code: "CORE_CONFIG_PATH_INVALID";
|
|
903
|
-
readonly httpStatus: 400;
|
|
904
|
-
readonly message: "Invalid configuration file path";
|
|
905
|
-
};
|
|
906
|
-
readonly CORE_INTERNAL_ERROR: {
|
|
907
|
-
readonly code: "CORE_INTERNAL_ERROR";
|
|
908
|
-
readonly httpStatus: 500;
|
|
909
|
-
readonly message: "An internal error occurred";
|
|
910
|
-
};
|
|
911
|
-
readonly CORE_NOT_IMPLEMENTED: {
|
|
912
|
-
readonly code: "CORE_NOT_IMPLEMENTED";
|
|
913
|
-
readonly httpStatus: 501;
|
|
914
|
-
readonly message: "Feature not yet implemented";
|
|
915
|
-
};
|
|
916
|
-
readonly CORE_SYSTEM_OVERLOADED: {
|
|
917
|
-
readonly code: "CORE_SYSTEM_OVERLOADED";
|
|
918
|
-
readonly httpStatus: 503;
|
|
919
|
-
readonly message: "System is currently overloaded";
|
|
920
|
-
};
|
|
921
|
-
};
|
|
922
|
-
export type CoreErrorCode = keyof typeof CoreErrorCodes;
|
|
923
|
-
export type BrokerErrorCode = keyof typeof BrokerErrorCodes;
|
|
924
|
-
export type ErrorCode = keyof typeof ErrorCodes;
|
|
925
|
-
export interface ErrorContext {
|
|
926
|
-
domain?: 'core' | 'broker';
|
|
927
|
-
abilityName?: string;
|
|
928
|
-
transport?: string;
|
|
929
|
-
brokerUrl?: string;
|
|
930
|
-
toolName?: string;
|
|
931
|
-
method?: string;
|
|
932
|
-
requestId?: string;
|
|
933
|
-
networks?: string[];
|
|
934
|
-
originalError?: Error;
|
|
935
|
-
[key: string]: unknown;
|
|
936
|
-
}
|
|
937
|
-
/**
|
|
938
|
-
* Custom error class for KADI Core operations
|
|
939
|
-
*/
|
|
940
|
-
export declare class KadiError extends Error {
|
|
941
|
-
readonly code: ErrorCode;
|
|
942
|
-
readonly httpStatus: number;
|
|
943
|
-
readonly context: ErrorContext;
|
|
944
|
-
readonly timestamp: number;
|
|
945
|
-
readonly id: string;
|
|
946
|
-
constructor(code: ErrorCode, message?: string, context?: ErrorContext);
|
|
947
|
-
private generateErrorId;
|
|
948
|
-
/**
|
|
949
|
-
* Create a KadiError from another error
|
|
950
|
-
*/
|
|
951
|
-
static fromError(error: Error, code: ErrorCode, context?: ErrorContext): KadiError;
|
|
952
|
-
/**
|
|
953
|
-
* Create a broker connection error
|
|
954
|
-
*/
|
|
955
|
-
static brokerUnavailable(brokerUrl: string, originalError?: Error): KadiError;
|
|
956
|
-
/**
|
|
957
|
-
* Create an ability not found error
|
|
958
|
-
*/
|
|
959
|
-
static abilityNotFound(abilityName: string, transport?: string): KadiError;
|
|
960
|
-
/**
|
|
961
|
-
* Create a tool not found error
|
|
962
|
-
*/
|
|
963
|
-
static toolNotFound(toolName: string, abilityName?: string): KadiError;
|
|
964
|
-
/**
|
|
965
|
-
* Convert to client-friendly format
|
|
966
|
-
*/
|
|
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
|
-
};
|
|
976
|
-
/**
|
|
977
|
-
* Convert to detailed log format
|
|
978
|
-
*/
|
|
979
|
-
toLogFormat(): string;
|
|
980
|
-
}
|
|
981
|
-
/**
|
|
982
|
-
* Type guard to check if an error is a KadiError
|
|
983
|
-
*/
|
|
984
|
-
export declare function isKadiError(error: unknown): error is KadiError;
|
|
985
|
-
//# sourceMappingURL=error-codes.d.ts.map
|