@illalabs/interfaces 0.3.0-canary.f3dad1f7 → 0.4.0-canary-beta-52713059

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/interfaces/chat/response.d.ts +8 -0
  2. package/dist/interfaces/chat/response.d.ts.map +1 -1
  3. package/dist/schemas/chatContext.d.ts +323 -0
  4. package/dist/schemas/chatContext.d.ts.map +1 -1
  5. package/dist/schemas/chatRequestBody.d.ts +1030 -0
  6. package/dist/schemas/chatRequestBody.d.ts.map +1 -1
  7. package/dist/schemas/chatRequestBody.js +7 -0
  8. package/dist/schemas/chatRequestBody.js.map +1 -1
  9. package/dist/schemas/index.d.ts +1 -0
  10. package/dist/schemas/index.d.ts.map +1 -1
  11. package/dist/schemas/index.js +1 -0
  12. package/dist/schemas/index.js.map +1 -1
  13. package/dist/schemas/messages.d.ts +473 -0
  14. package/dist/schemas/messages.d.ts.map +1 -1
  15. package/dist/schemas/messages.js +64 -0
  16. package/dist/schemas/messages.js.map +1 -1
  17. package/dist/schemas/modelContext.d.ts +3 -3
  18. package/dist/schemas/planning.d.ts +666 -0
  19. package/dist/schemas/planning.d.ts.map +1 -0
  20. package/dist/schemas/planning.js +153 -0
  21. package/dist/schemas/planning.js.map +1 -0
  22. package/dist/schemas/telemetryEvents.d.ts +1836 -48
  23. package/dist/schemas/telemetryEvents.d.ts.map +1 -1
  24. package/dist/schemas/telemetryEvents.js +92 -18
  25. package/dist/schemas/telemetryEvents.js.map +1 -1
  26. package/dist/schemas/userContext.d.ts +3 -0
  27. package/dist/schemas/userContext.d.ts.map +1 -1
  28. package/dist/schemas/userContext.js +4 -0
  29. package/dist/schemas/userContext.js.map +1 -1
  30. package/dist/tools/IllaToolError.d.ts +6 -2
  31. package/dist/tools/IllaToolError.d.ts.map +1 -1
  32. package/dist/tools/IllaToolError.js +6 -2
  33. package/dist/tools/IllaToolError.js.map +1 -1
  34. package/dist/tools/IllaToolOutcome.js +1 -1
  35. package/dist/tools/IllaToolOutcome.js.map +1 -1
  36. package/dist/types/actions/inputs.d.ts +6 -2
  37. package/dist/types/actions/inputs.d.ts.map +1 -1
  38. package/dist/types/actions/outputs.d.ts +19 -1
  39. package/dist/types/actions/outputs.d.ts.map +1 -1
  40. package/dist/types/actions/tools/getWalletBalanceAction.d.ts +3 -1
  41. package/dist/types/actions/tools/getWalletBalanceAction.d.ts.map +1 -1
  42. package/dist/types/actions/tools/index.d.ts +12 -0
  43. package/dist/types/actions/tools/index.d.ts.map +1 -1
  44. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts +81 -0
  45. package/dist/types/actions/tools/polymarketPostOrderAction.d.ts.map +1 -0
  46. package/dist/types/actions/tools/polymarketPostOrderAction.js +2 -0
  47. package/dist/types/actions/tools/polymarketPostOrderAction.js.map +1 -0
  48. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts +19 -0
  49. package/dist/types/actions/tools/predictionMarketsBetAction.d.ts.map +1 -0
  50. package/dist/types/actions/tools/predictionMarketsBetAction.js +2 -0
  51. package/dist/types/actions/tools/predictionMarketsBetAction.js.map +1 -0
  52. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts +21 -0
  53. package/dist/types/actions/tools/predictionMarketsFetchAction.d.ts.map +1 -0
  54. package/dist/types/actions/tools/predictionMarketsFetchAction.js +2 -0
  55. package/dist/types/actions/tools/predictionMarketsFetchAction.js.map +1 -0
  56. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts +25 -0
  57. package/dist/types/actions/tools/predictionMarketsPositionsAction.d.ts.map +1 -0
  58. package/dist/types/actions/tools/predictionMarketsPositionsAction.js +2 -0
  59. package/dist/types/actions/tools/predictionMarketsPositionsAction.js.map +1 -0
  60. package/dist/types/index.d.ts +1 -0
  61. package/dist/types/index.d.ts.map +1 -1
  62. package/dist/types/index.js +1 -0
  63. package/dist/types/index.js.map +1 -1
  64. package/dist/types/planning.d.ts +55 -0
  65. package/dist/types/planning.d.ts.map +1 -0
  66. package/dist/types/planning.js +2 -0
  67. package/dist/types/planning.js.map +1 -0
  68. package/dist/types/telemetry.d.ts +36 -1
  69. package/dist/types/telemetry.d.ts.map +1 -1
  70. package/dist/types/telemetry.js +2 -1
  71. package/dist/types/telemetry.js.map +1 -1
  72. package/dist/utils/constants.d.ts +5 -3
  73. package/dist/utils/constants.d.ts.map +1 -1
  74. package/dist/utils/constants.js +11 -1
  75. package/dist/utils/constants.js.map +1 -1
  76. package/package.json +1 -1
@@ -2,13 +2,13 @@ import type { TypeOf } from "zod";
2
2
  import { z } from "zod";
3
3
  export declare const ModelContextSchema: z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
4
4
  provider: z.ZodLiteral<"openrouter">;
5
- model: z.ZodEnum<["anthropic/claude-sonnet-4.5", "google/gemini-2.5-pro", "openai/gpt-5", "qwen/qwen3-vl-30b-a3b-thinking", "openai/gpt-5-mini"]>;
5
+ model: z.ZodEnum<["anthropic/claude-sonnet-4.5", "google/gemini-2.5-pro", "openai/gpt-5", "qwen/qwen3-vl-30b-a3b-thinking", "openai/gpt-5-mini", "moonshotai/kimi-k2-thinking", "google/gemini-3-flash-preview", "z-ai/glm-4.7-flash", "anthropic/claude-haiku-4.5", "deepseek/deepseek-v3.2"]>;
6
6
  }, "strip", z.ZodTypeAny, {
7
7
  provider: "openrouter";
8
- model: "anthropic/claude-sonnet-4.5" | "google/gemini-2.5-pro" | "openai/gpt-5" | "qwen/qwen3-vl-30b-a3b-thinking" | "openai/gpt-5-mini";
8
+ model: "anthropic/claude-sonnet-4.5" | "google/gemini-2.5-pro" | "openai/gpt-5" | "qwen/qwen3-vl-30b-a3b-thinking" | "openai/gpt-5-mini" | "moonshotai/kimi-k2-thinking" | "google/gemini-3-flash-preview" | "z-ai/glm-4.7-flash" | "anthropic/claude-haiku-4.5" | "deepseek/deepseek-v3.2";
9
9
  }, {
10
10
  provider: "openrouter";
11
- model: "anthropic/claude-sonnet-4.5" | "google/gemini-2.5-pro" | "openai/gpt-5" | "qwen/qwen3-vl-30b-a3b-thinking" | "openai/gpt-5-mini";
11
+ model: "anthropic/claude-sonnet-4.5" | "google/gemini-2.5-pro" | "openai/gpt-5" | "qwen/qwen3-vl-30b-a3b-thinking" | "openai/gpt-5-mini" | "moonshotai/kimi-k2-thinking" | "google/gemini-3-flash-preview" | "z-ai/glm-4.7-flash" | "anthropic/claude-haiku-4.5" | "deepseek/deepseek-v3.2";
12
12
  }>, z.ZodObject<{
13
13
  provider: z.ZodLiteral<"openai">;
14
14
  model: z.ZodEnum<["gpt-4o", "gpt-4o-mini", "gpt-5", "gpt-5-mini-2025-08-07"]>;
@@ -0,0 +1,666 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Plan step status values
4
+ */
5
+ export declare const planStepStatusValues: readonly ["pending", "in_progress", "completed", "failed", "skipped"];
6
+ /**
7
+ * Plan complexity levels
8
+ */
9
+ export declare const planComplexityValues: readonly ["low", "medium", "high"];
10
+ /**
11
+ * Operation types for plan steps
12
+ */
13
+ export declare const operationTypeValues: readonly ["read", "write"];
14
+ /**
15
+ * Conflict types for plan validation
16
+ */
17
+ export declare const planConflictTypeValues: readonly ["conflicting_intent", "impossible_task", "missing_tool", "missing_context", "unsupported_operation"];
18
+ /**
19
+ * Plan execution status values
20
+ */
21
+ export declare const planExecutionStatusValues: readonly ["success", "partial", "failed"];
22
+ /**
23
+ * Schema for plan step execution instructions
24
+ */
25
+ export declare const PlanStepExecutionInstructionsSchema: z.ZodObject<{
26
+ objective: z.ZodString;
27
+ /** Maps input parameter names to their source references (e.g., "from_context.userContext.address") */
28
+ inputSource: z.ZodRecord<z.ZodString, z.ZodString>;
29
+ expectedOutput: z.ZodString;
30
+ errorHandling: z.ZodString;
31
+ constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
32
+ }, "strict", z.ZodTypeAny, {
33
+ objective: string;
34
+ inputSource: Record<string, string>;
35
+ expectedOutput: string;
36
+ errorHandling: string;
37
+ constraints?: string[] | undefined;
38
+ }, {
39
+ objective: string;
40
+ inputSource: Record<string, string>;
41
+ expectedOutput: string;
42
+ errorHandling: string;
43
+ constraints?: string[] | undefined;
44
+ }>;
45
+ /**
46
+ * Schema for individual plan steps
47
+ */
48
+ export declare const PlanStepSchema: z.ZodObject<{
49
+ stepNumber: z.ZodNumber;
50
+ description: z.ZodString;
51
+ operationType: z.ZodEnum<["read", "write"]>;
52
+ requiresUserApproval: z.ZodBoolean;
53
+ dependsOn: z.ZodArray<z.ZodNumber, "many">;
54
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
55
+ /** Step execution result. Structure varies by tool - typically contains tool-specific output data. */
56
+ result: z.ZodOptional<z.ZodUnknown>;
57
+ toolName: z.ZodOptional<z.ZodString>;
58
+ executionInstructions: z.ZodObject<{
59
+ objective: z.ZodString;
60
+ /** Maps input parameter names to their source references (e.g., "from_context.userContext.address") */
61
+ inputSource: z.ZodRecord<z.ZodString, z.ZodString>;
62
+ expectedOutput: z.ZodString;
63
+ errorHandling: z.ZodString;
64
+ constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
65
+ }, "strict", z.ZodTypeAny, {
66
+ objective: string;
67
+ inputSource: Record<string, string>;
68
+ expectedOutput: string;
69
+ errorHandling: string;
70
+ constraints?: string[] | undefined;
71
+ }, {
72
+ objective: string;
73
+ inputSource: Record<string, string>;
74
+ expectedOutput: string;
75
+ errorHandling: string;
76
+ constraints?: string[] | undefined;
77
+ }>;
78
+ }, "strict", z.ZodTypeAny, {
79
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
80
+ description: string;
81
+ stepNumber: number;
82
+ operationType: "read" | "write";
83
+ requiresUserApproval: boolean;
84
+ dependsOn: number[];
85
+ executionInstructions: {
86
+ objective: string;
87
+ inputSource: Record<string, string>;
88
+ expectedOutput: string;
89
+ errorHandling: string;
90
+ constraints?: string[] | undefined;
91
+ };
92
+ result?: unknown;
93
+ toolName?: string | undefined;
94
+ }, {
95
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
96
+ description: string;
97
+ stepNumber: number;
98
+ operationType: "read" | "write";
99
+ requiresUserApproval: boolean;
100
+ dependsOn: number[];
101
+ executionInstructions: {
102
+ objective: string;
103
+ inputSource: Record<string, string>;
104
+ expectedOutput: string;
105
+ errorHandling: string;
106
+ constraints?: string[] | undefined;
107
+ };
108
+ result?: unknown;
109
+ toolName?: string | undefined;
110
+ }>;
111
+ /**
112
+ * Schema for user-readable summary step
113
+ */
114
+ export declare const PlanUserSummaryStepSchema: z.ZodObject<{
115
+ number: z.ZodNumber;
116
+ description: z.ZodString;
117
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
118
+ requiresApproval: z.ZodBoolean;
119
+ }, "strict", z.ZodTypeAny, {
120
+ number: number;
121
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
122
+ description: string;
123
+ requiresApproval: boolean;
124
+ }, {
125
+ number: number;
126
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
127
+ description: string;
128
+ requiresApproval: boolean;
129
+ }>;
130
+ /**
131
+ * Schema for human-readable plan summary
132
+ */
133
+ export declare const PlanUserSummarySchema: z.ZodObject<{
134
+ title: z.ZodString;
135
+ description: z.ZodString;
136
+ steps: z.ZodArray<z.ZodObject<{
137
+ number: z.ZodNumber;
138
+ description: z.ZodString;
139
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
140
+ requiresApproval: z.ZodBoolean;
141
+ }, "strict", z.ZodTypeAny, {
142
+ number: number;
143
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
144
+ description: string;
145
+ requiresApproval: boolean;
146
+ }, {
147
+ number: number;
148
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
149
+ description: string;
150
+ requiresApproval: boolean;
151
+ }>, "many">;
152
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
153
+ }, "strict", z.ZodTypeAny, {
154
+ description: string;
155
+ title: string;
156
+ steps: {
157
+ number: number;
158
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
159
+ description: string;
160
+ requiresApproval: boolean;
161
+ }[];
162
+ warnings?: string[] | undefined;
163
+ }, {
164
+ description: string;
165
+ title: string;
166
+ steps: {
167
+ number: number;
168
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
169
+ description: string;
170
+ requiresApproval: boolean;
171
+ }[];
172
+ warnings?: string[] | undefined;
173
+ }>;
174
+ /**
175
+ * Schema for machine-readable execution details
176
+ */
177
+ export declare const PlanExecutionDetailsSchema: z.ZodObject<{
178
+ steps: z.ZodArray<z.ZodObject<{
179
+ stepNumber: z.ZodNumber;
180
+ description: z.ZodString;
181
+ operationType: z.ZodEnum<["read", "write"]>;
182
+ requiresUserApproval: z.ZodBoolean;
183
+ dependsOn: z.ZodArray<z.ZodNumber, "many">;
184
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
185
+ /** Step execution result. Structure varies by tool - typically contains tool-specific output data. */
186
+ result: z.ZodOptional<z.ZodUnknown>;
187
+ toolName: z.ZodOptional<z.ZodString>;
188
+ executionInstructions: z.ZodObject<{
189
+ objective: z.ZodString;
190
+ /** Maps input parameter names to their source references (e.g., "from_context.userContext.address") */
191
+ inputSource: z.ZodRecord<z.ZodString, z.ZodString>;
192
+ expectedOutput: z.ZodString;
193
+ errorHandling: z.ZodString;
194
+ constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
195
+ }, "strict", z.ZodTypeAny, {
196
+ objective: string;
197
+ inputSource: Record<string, string>;
198
+ expectedOutput: string;
199
+ errorHandling: string;
200
+ constraints?: string[] | undefined;
201
+ }, {
202
+ objective: string;
203
+ inputSource: Record<string, string>;
204
+ expectedOutput: string;
205
+ errorHandling: string;
206
+ constraints?: string[] | undefined;
207
+ }>;
208
+ }, "strict", z.ZodTypeAny, {
209
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
210
+ description: string;
211
+ stepNumber: number;
212
+ operationType: "read" | "write";
213
+ requiresUserApproval: boolean;
214
+ dependsOn: number[];
215
+ executionInstructions: {
216
+ objective: string;
217
+ inputSource: Record<string, string>;
218
+ expectedOutput: string;
219
+ errorHandling: string;
220
+ constraints?: string[] | undefined;
221
+ };
222
+ result?: unknown;
223
+ toolName?: string | undefined;
224
+ }, {
225
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
226
+ description: string;
227
+ stepNumber: number;
228
+ operationType: "read" | "write";
229
+ requiresUserApproval: boolean;
230
+ dependsOn: number[];
231
+ executionInstructions: {
232
+ objective: string;
233
+ inputSource: Record<string, string>;
234
+ expectedOutput: string;
235
+ errorHandling: string;
236
+ constraints?: string[] | undefined;
237
+ };
238
+ result?: unknown;
239
+ toolName?: string | undefined;
240
+ }>, "many">;
241
+ complexity: z.ZodEnum<["low", "medium", "high"]>;
242
+ recommendedModel: z.ZodString;
243
+ /** Ordered tool names for execution — may differ from steps[].toolName when steps run in parallel or tools are reused */
244
+ toolSequence: z.ZodArray<z.ZodString, "many">;
245
+ /** Descriptions of read operations for quick plan summary (derived from read-type steps) */
246
+ readOperations: z.ZodArray<z.ZodString, "many">;
247
+ /** Descriptions of write operations for quick plan summary (derived from write-type steps) */
248
+ writeOperations: z.ZodArray<z.ZodString, "many">;
249
+ pendingApprovals: z.ZodNumber;
250
+ /** All tools the plan may invoke, including conditional/fallback tools not tied to specific steps */
251
+ availableTools: z.ZodArray<z.ZodString, "many">;
252
+ }, "strict", z.ZodTypeAny, {
253
+ steps: {
254
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
255
+ description: string;
256
+ stepNumber: number;
257
+ operationType: "read" | "write";
258
+ requiresUserApproval: boolean;
259
+ dependsOn: number[];
260
+ executionInstructions: {
261
+ objective: string;
262
+ inputSource: Record<string, string>;
263
+ expectedOutput: string;
264
+ errorHandling: string;
265
+ constraints?: string[] | undefined;
266
+ };
267
+ result?: unknown;
268
+ toolName?: string | undefined;
269
+ }[];
270
+ complexity: "low" | "medium" | "high";
271
+ recommendedModel: string;
272
+ toolSequence: string[];
273
+ readOperations: string[];
274
+ writeOperations: string[];
275
+ pendingApprovals: number;
276
+ availableTools: string[];
277
+ }, {
278
+ steps: {
279
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
280
+ description: string;
281
+ stepNumber: number;
282
+ operationType: "read" | "write";
283
+ requiresUserApproval: boolean;
284
+ dependsOn: number[];
285
+ executionInstructions: {
286
+ objective: string;
287
+ inputSource: Record<string, string>;
288
+ expectedOutput: string;
289
+ errorHandling: string;
290
+ constraints?: string[] | undefined;
291
+ };
292
+ result?: unknown;
293
+ toolName?: string | undefined;
294
+ }[];
295
+ complexity: "low" | "medium" | "high";
296
+ recommendedModel: string;
297
+ toolSequence: string[];
298
+ readOperations: string[];
299
+ writeOperations: string[];
300
+ pendingApprovals: number;
301
+ availableTools: string[];
302
+ }>;
303
+ /**
304
+ * Schema for plan conflicts
305
+ */
306
+ export declare const PlanConflictSchema: z.ZodObject<{
307
+ type: z.ZodEnum<["conflicting_intent", "impossible_task", "missing_tool", "missing_context", "unsupported_operation"]>;
308
+ message: z.ZodString;
309
+ suggestion: z.ZodOptional<z.ZodString>;
310
+ }, "strict", z.ZodTypeAny, {
311
+ message: string;
312
+ type: "conflicting_intent" | "impossible_task" | "missing_tool" | "missing_context" | "unsupported_operation";
313
+ suggestion?: string | undefined;
314
+ }, {
315
+ message: string;
316
+ type: "conflicting_intent" | "impossible_task" | "missing_tool" | "missing_context" | "unsupported_operation";
317
+ suggestion?: string | undefined;
318
+ }>;
319
+ /**
320
+ * Schema for re-plan context
321
+ */
322
+ export declare const ReplanContextSchema: z.ZodObject<{
323
+ previousPlanId: z.ZodString;
324
+ replanReason: z.ZodString;
325
+ preservedSteps: z.ZodArray<z.ZodNumber, "many">;
326
+ }, "strict", z.ZodTypeAny, {
327
+ previousPlanId: string;
328
+ replanReason: string;
329
+ preservedSteps: number[];
330
+ }, {
331
+ previousPlanId: string;
332
+ replanReason: string;
333
+ preservedSteps: number[];
334
+ }>;
335
+ /**
336
+ * Schema for complete execution plan
337
+ */
338
+ export declare const ExecutionPlanSchema: z.ZodObject<{
339
+ planId: z.ZodString;
340
+ version: z.ZodNumber;
341
+ isExecutable: z.ZodBoolean;
342
+ autoExecutable: z.ZodBoolean;
343
+ userSummary: z.ZodObject<{
344
+ title: z.ZodString;
345
+ description: z.ZodString;
346
+ steps: z.ZodArray<z.ZodObject<{
347
+ number: z.ZodNumber;
348
+ description: z.ZodString;
349
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
350
+ requiresApproval: z.ZodBoolean;
351
+ }, "strict", z.ZodTypeAny, {
352
+ number: number;
353
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
354
+ description: string;
355
+ requiresApproval: boolean;
356
+ }, {
357
+ number: number;
358
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
359
+ description: string;
360
+ requiresApproval: boolean;
361
+ }>, "many">;
362
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
363
+ }, "strict", z.ZodTypeAny, {
364
+ description: string;
365
+ title: string;
366
+ steps: {
367
+ number: number;
368
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
369
+ description: string;
370
+ requiresApproval: boolean;
371
+ }[];
372
+ warnings?: string[] | undefined;
373
+ }, {
374
+ description: string;
375
+ title: string;
376
+ steps: {
377
+ number: number;
378
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
379
+ description: string;
380
+ requiresApproval: boolean;
381
+ }[];
382
+ warnings?: string[] | undefined;
383
+ }>;
384
+ executionSchema: z.ZodObject<{
385
+ steps: z.ZodArray<z.ZodObject<{
386
+ stepNumber: z.ZodNumber;
387
+ description: z.ZodString;
388
+ operationType: z.ZodEnum<["read", "write"]>;
389
+ requiresUserApproval: z.ZodBoolean;
390
+ dependsOn: z.ZodArray<z.ZodNumber, "many">;
391
+ status: z.ZodEnum<["pending", "in_progress", "completed", "failed", "skipped"]>;
392
+ /** Step execution result. Structure varies by tool - typically contains tool-specific output data. */
393
+ result: z.ZodOptional<z.ZodUnknown>;
394
+ toolName: z.ZodOptional<z.ZodString>;
395
+ executionInstructions: z.ZodObject<{
396
+ objective: z.ZodString;
397
+ /** Maps input parameter names to their source references (e.g., "from_context.userContext.address") */
398
+ inputSource: z.ZodRecord<z.ZodString, z.ZodString>;
399
+ expectedOutput: z.ZodString;
400
+ errorHandling: z.ZodString;
401
+ constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
402
+ }, "strict", z.ZodTypeAny, {
403
+ objective: string;
404
+ inputSource: Record<string, string>;
405
+ expectedOutput: string;
406
+ errorHandling: string;
407
+ constraints?: string[] | undefined;
408
+ }, {
409
+ objective: string;
410
+ inputSource: Record<string, string>;
411
+ expectedOutput: string;
412
+ errorHandling: string;
413
+ constraints?: string[] | undefined;
414
+ }>;
415
+ }, "strict", z.ZodTypeAny, {
416
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
417
+ description: string;
418
+ stepNumber: number;
419
+ operationType: "read" | "write";
420
+ requiresUserApproval: boolean;
421
+ dependsOn: number[];
422
+ executionInstructions: {
423
+ objective: string;
424
+ inputSource: Record<string, string>;
425
+ expectedOutput: string;
426
+ errorHandling: string;
427
+ constraints?: string[] | undefined;
428
+ };
429
+ result?: unknown;
430
+ toolName?: string | undefined;
431
+ }, {
432
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
433
+ description: string;
434
+ stepNumber: number;
435
+ operationType: "read" | "write";
436
+ requiresUserApproval: boolean;
437
+ dependsOn: number[];
438
+ executionInstructions: {
439
+ objective: string;
440
+ inputSource: Record<string, string>;
441
+ expectedOutput: string;
442
+ errorHandling: string;
443
+ constraints?: string[] | undefined;
444
+ };
445
+ result?: unknown;
446
+ toolName?: string | undefined;
447
+ }>, "many">;
448
+ complexity: z.ZodEnum<["low", "medium", "high"]>;
449
+ recommendedModel: z.ZodString;
450
+ /** Ordered tool names for execution — may differ from steps[].toolName when steps run in parallel or tools are reused */
451
+ toolSequence: z.ZodArray<z.ZodString, "many">;
452
+ /** Descriptions of read operations for quick plan summary (derived from read-type steps) */
453
+ readOperations: z.ZodArray<z.ZodString, "many">;
454
+ /** Descriptions of write operations for quick plan summary (derived from write-type steps) */
455
+ writeOperations: z.ZodArray<z.ZodString, "many">;
456
+ pendingApprovals: z.ZodNumber;
457
+ /** All tools the plan may invoke, including conditional/fallback tools not tied to specific steps */
458
+ availableTools: z.ZodArray<z.ZodString, "many">;
459
+ }, "strict", z.ZodTypeAny, {
460
+ steps: {
461
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
462
+ description: string;
463
+ stepNumber: number;
464
+ operationType: "read" | "write";
465
+ requiresUserApproval: boolean;
466
+ dependsOn: number[];
467
+ executionInstructions: {
468
+ objective: string;
469
+ inputSource: Record<string, string>;
470
+ expectedOutput: string;
471
+ errorHandling: string;
472
+ constraints?: string[] | undefined;
473
+ };
474
+ result?: unknown;
475
+ toolName?: string | undefined;
476
+ }[];
477
+ complexity: "low" | "medium" | "high";
478
+ recommendedModel: string;
479
+ toolSequence: string[];
480
+ readOperations: string[];
481
+ writeOperations: string[];
482
+ pendingApprovals: number;
483
+ availableTools: string[];
484
+ }, {
485
+ steps: {
486
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
487
+ description: string;
488
+ stepNumber: number;
489
+ operationType: "read" | "write";
490
+ requiresUserApproval: boolean;
491
+ dependsOn: number[];
492
+ executionInstructions: {
493
+ objective: string;
494
+ inputSource: Record<string, string>;
495
+ expectedOutput: string;
496
+ errorHandling: string;
497
+ constraints?: string[] | undefined;
498
+ };
499
+ result?: unknown;
500
+ toolName?: string | undefined;
501
+ }[];
502
+ complexity: "low" | "medium" | "high";
503
+ recommendedModel: string;
504
+ toolSequence: string[];
505
+ readOperations: string[];
506
+ writeOperations: string[];
507
+ pendingApprovals: number;
508
+ availableTools: string[];
509
+ }>;
510
+ conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
511
+ type: z.ZodEnum<["conflicting_intent", "impossible_task", "missing_tool", "missing_context", "unsupported_operation"]>;
512
+ message: z.ZodString;
513
+ suggestion: z.ZodOptional<z.ZodString>;
514
+ }, "strict", z.ZodTypeAny, {
515
+ message: string;
516
+ type: "conflicting_intent" | "impossible_task" | "missing_tool" | "missing_context" | "unsupported_operation";
517
+ suggestion?: string | undefined;
518
+ }, {
519
+ message: string;
520
+ type: "conflicting_intent" | "impossible_task" | "missing_tool" | "missing_context" | "unsupported_operation";
521
+ suggestion?: string | undefined;
522
+ }>, "many">>;
523
+ replanContext: z.ZodOptional<z.ZodObject<{
524
+ previousPlanId: z.ZodString;
525
+ replanReason: z.ZodString;
526
+ preservedSteps: z.ZodArray<z.ZodNumber, "many">;
527
+ }, "strict", z.ZodTypeAny, {
528
+ previousPlanId: string;
529
+ replanReason: string;
530
+ preservedSteps: number[];
531
+ }, {
532
+ previousPlanId: string;
533
+ replanReason: string;
534
+ preservedSteps: number[];
535
+ }>>;
536
+ createdAt: z.ZodString;
537
+ }, "strict", z.ZodTypeAny, {
538
+ planId: string;
539
+ version: number;
540
+ isExecutable: boolean;
541
+ autoExecutable: boolean;
542
+ userSummary: {
543
+ description: string;
544
+ title: string;
545
+ steps: {
546
+ number: number;
547
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
548
+ description: string;
549
+ requiresApproval: boolean;
550
+ }[];
551
+ warnings?: string[] | undefined;
552
+ };
553
+ executionSchema: {
554
+ steps: {
555
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
556
+ description: string;
557
+ stepNumber: number;
558
+ operationType: "read" | "write";
559
+ requiresUserApproval: boolean;
560
+ dependsOn: number[];
561
+ executionInstructions: {
562
+ objective: string;
563
+ inputSource: Record<string, string>;
564
+ expectedOutput: string;
565
+ errorHandling: string;
566
+ constraints?: string[] | undefined;
567
+ };
568
+ result?: unknown;
569
+ toolName?: string | undefined;
570
+ }[];
571
+ complexity: "low" | "medium" | "high";
572
+ recommendedModel: string;
573
+ toolSequence: string[];
574
+ readOperations: string[];
575
+ writeOperations: string[];
576
+ pendingApprovals: number;
577
+ availableTools: string[];
578
+ };
579
+ createdAt: string;
580
+ conflicts?: {
581
+ message: string;
582
+ type: "conflicting_intent" | "impossible_task" | "missing_tool" | "missing_context" | "unsupported_operation";
583
+ suggestion?: string | undefined;
584
+ }[] | undefined;
585
+ replanContext?: {
586
+ previousPlanId: string;
587
+ replanReason: string;
588
+ preservedSteps: number[];
589
+ } | undefined;
590
+ }, {
591
+ planId: string;
592
+ version: number;
593
+ isExecutable: boolean;
594
+ autoExecutable: boolean;
595
+ userSummary: {
596
+ description: string;
597
+ title: string;
598
+ steps: {
599
+ number: number;
600
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
601
+ description: string;
602
+ requiresApproval: boolean;
603
+ }[];
604
+ warnings?: string[] | undefined;
605
+ };
606
+ executionSchema: {
607
+ steps: {
608
+ status: "pending" | "in_progress" | "completed" | "failed" | "skipped";
609
+ description: string;
610
+ stepNumber: number;
611
+ operationType: "read" | "write";
612
+ requiresUserApproval: boolean;
613
+ dependsOn: number[];
614
+ executionInstructions: {
615
+ objective: string;
616
+ inputSource: Record<string, string>;
617
+ expectedOutput: string;
618
+ errorHandling: string;
619
+ constraints?: string[] | undefined;
620
+ };
621
+ result?: unknown;
622
+ toolName?: string | undefined;
623
+ }[];
624
+ complexity: "low" | "medium" | "high";
625
+ recommendedModel: string;
626
+ toolSequence: string[];
627
+ readOperations: string[];
628
+ writeOperations: string[];
629
+ pendingApprovals: number;
630
+ availableTools: string[];
631
+ };
632
+ createdAt: string;
633
+ conflicts?: {
634
+ message: string;
635
+ type: "conflicting_intent" | "impossible_task" | "missing_tool" | "missing_context" | "unsupported_operation";
636
+ suggestion?: string | undefined;
637
+ }[] | undefined;
638
+ replanContext?: {
639
+ previousPlanId: string;
640
+ replanReason: string;
641
+ preservedSteps: number[];
642
+ } | undefined;
643
+ }>;
644
+ /**
645
+ * Schema for planning configuration
646
+ */
647
+ export declare const AgentPlanningConfigSchema: z.ZodObject<{
648
+ enabled: z.ZodOptional<z.ZodBoolean>;
649
+ cacheEnabled: z.ZodOptional<z.ZodBoolean>;
650
+ cacheTTL: z.ZodOptional<z.ZodNumber>;
651
+ forceRefresh: z.ZodOptional<z.ZodBoolean>;
652
+ planningModel: z.ZodOptional<z.ZodString>;
653
+ }, "strict", z.ZodTypeAny, {
654
+ enabled?: boolean | undefined;
655
+ cacheEnabled?: boolean | undefined;
656
+ cacheTTL?: number | undefined;
657
+ forceRefresh?: boolean | undefined;
658
+ planningModel?: string | undefined;
659
+ }, {
660
+ enabled?: boolean | undefined;
661
+ cacheEnabled?: boolean | undefined;
662
+ cacheTTL?: number | undefined;
663
+ forceRefresh?: boolean | undefined;
664
+ planningModel?: string | undefined;
665
+ }>;
666
+ //# sourceMappingURL=planning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../src/schemas/planning.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,oBAAoB,uEAMvB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB,oCAAqC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,mBAAmB,4BAA6B,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,sBAAsB,gHAMzB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,yBAAyB,2CAA4C,CAAC;AAEnF;;GAEG;AACH,eAAO,MAAM,mCAAmC;;IAGxC,uGAAuG;;;;;;;;;;;;;;;;;EAMlG,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;IAQnB,sGAAsG;;;;;QAnBtG,uGAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBlG,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;EAOzB,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrB,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;QAlC/B,sGAAsG;;;;;YAnBtG,uGAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0DvG,yHAAyH;;IAEzH,4FAA4F;;IAE5F,8FAA8F;;;IAG9F,qGAAqG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhG,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAMlB,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAMnB,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA5ExB,sGAAsG;;;;;gBAnBtG,uGAAuG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA0DvG,yHAAyH;;QAEzH,4FAA4F;;QAE5F,8FAA8F;;;QAG9F,qGAAqG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0ChG,CAAC;AAEd;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;EAQzB,CAAC"}