@agentspec/sdk 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.
@@ -0,0 +1,3257 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const MetadataSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ version: z.ZodString;
6
+ description: z.ZodString;
7
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
8
+ author: z.ZodOptional<z.ZodString>;
9
+ license: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ name: string;
12
+ version: string;
13
+ description: string;
14
+ tags?: string[] | undefined;
15
+ author?: string | undefined;
16
+ license?: string | undefined;
17
+ }, {
18
+ name: string;
19
+ version: string;
20
+ description: string;
21
+ tags?: string[] | undefined;
22
+ author?: string | undefined;
23
+ license?: string | undefined;
24
+ }>;
25
+ declare const ModelSchema: z.ZodObject<{
26
+ provider: z.ZodString;
27
+ id: z.ZodString;
28
+ apiKey: z.ZodString;
29
+ parameters: z.ZodOptional<z.ZodObject<{
30
+ temperature: z.ZodOptional<z.ZodNumber>;
31
+ maxTokens: z.ZodOptional<z.ZodNumber>;
32
+ topP: z.ZodOptional<z.ZodNumber>;
33
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
34
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ temperature?: number | undefined;
37
+ maxTokens?: number | undefined;
38
+ topP?: number | undefined;
39
+ frequencyPenalty?: number | undefined;
40
+ presencePenalty?: number | undefined;
41
+ }, {
42
+ temperature?: number | undefined;
43
+ maxTokens?: number | undefined;
44
+ topP?: number | undefined;
45
+ frequencyPenalty?: number | undefined;
46
+ presencePenalty?: number | undefined;
47
+ }>>;
48
+ fallback: z.ZodOptional<z.ZodObject<{
49
+ provider: z.ZodString;
50
+ id: z.ZodString;
51
+ apiKey: z.ZodString;
52
+ triggerOn: z.ZodOptional<z.ZodArray<z.ZodEnum<["rate_limit", "timeout", "error_5xx", "error_4xx"]>, "many">>;
53
+ maxRetries: z.ZodOptional<z.ZodNumber>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ provider: string;
56
+ id: string;
57
+ apiKey: string;
58
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
59
+ maxRetries?: number | undefined;
60
+ }, {
61
+ provider: string;
62
+ id: string;
63
+ apiKey: string;
64
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
65
+ maxRetries?: number | undefined;
66
+ }>>;
67
+ costControls: z.ZodOptional<z.ZodObject<{
68
+ maxMonthlyUSD: z.ZodOptional<z.ZodNumber>;
69
+ alertAtUSD: z.ZodOptional<z.ZodNumber>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ maxMonthlyUSD?: number | undefined;
72
+ alertAtUSD?: number | undefined;
73
+ }, {
74
+ maxMonthlyUSD?: number | undefined;
75
+ alertAtUSD?: number | undefined;
76
+ }>>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ provider: string;
79
+ id: string;
80
+ apiKey: string;
81
+ parameters?: {
82
+ temperature?: number | undefined;
83
+ maxTokens?: number | undefined;
84
+ topP?: number | undefined;
85
+ frequencyPenalty?: number | undefined;
86
+ presencePenalty?: number | undefined;
87
+ } | undefined;
88
+ fallback?: {
89
+ provider: string;
90
+ id: string;
91
+ apiKey: string;
92
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
93
+ maxRetries?: number | undefined;
94
+ } | undefined;
95
+ costControls?: {
96
+ maxMonthlyUSD?: number | undefined;
97
+ alertAtUSD?: number | undefined;
98
+ } | undefined;
99
+ }, {
100
+ provider: string;
101
+ id: string;
102
+ apiKey: string;
103
+ parameters?: {
104
+ temperature?: number | undefined;
105
+ maxTokens?: number | undefined;
106
+ topP?: number | undefined;
107
+ frequencyPenalty?: number | undefined;
108
+ presencePenalty?: number | undefined;
109
+ } | undefined;
110
+ fallback?: {
111
+ provider: string;
112
+ id: string;
113
+ apiKey: string;
114
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
115
+ maxRetries?: number | undefined;
116
+ } | undefined;
117
+ costControls?: {
118
+ maxMonthlyUSD?: number | undefined;
119
+ alertAtUSD?: number | undefined;
120
+ } | undefined;
121
+ }>;
122
+ declare const PromptsSchema: z.ZodObject<{
123
+ system: z.ZodString;
124
+ fallback: z.ZodOptional<z.ZodString>;
125
+ hotReload: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
126
+ variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
127
+ name: z.ZodString;
128
+ value: z.ZodString;
129
+ }, "strip", z.ZodTypeAny, {
130
+ name: string;
131
+ value: string;
132
+ }, {
133
+ name: string;
134
+ value: string;
135
+ }>, "many">>;
136
+ }, "strip", z.ZodTypeAny, {
137
+ system: string;
138
+ hotReload: boolean;
139
+ fallback?: string | undefined;
140
+ variables?: {
141
+ name: string;
142
+ value: string;
143
+ }[] | undefined;
144
+ }, {
145
+ system: string;
146
+ fallback?: string | undefined;
147
+ hotReload?: boolean | undefined;
148
+ variables?: {
149
+ name: string;
150
+ value: string;
151
+ }[] | undefined;
152
+ }>;
153
+ declare const ToolSchema: z.ZodObject<{
154
+ name: z.ZodString;
155
+ type: z.ZodEnum<["function", "mcp", "builtin"]>;
156
+ description: z.ZodString;
157
+ module: z.ZodOptional<z.ZodString>;
158
+ function: z.ZodOptional<z.ZodString>;
159
+ annotations: z.ZodOptional<z.ZodObject<{
160
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
161
+ destructiveHint: z.ZodOptional<z.ZodBoolean>;
162
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
163
+ openWorldHint: z.ZodOptional<z.ZodBoolean>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ readOnlyHint?: boolean | undefined;
166
+ destructiveHint?: boolean | undefined;
167
+ idempotentHint?: boolean | undefined;
168
+ openWorldHint?: boolean | undefined;
169
+ }, {
170
+ readOnlyHint?: boolean | undefined;
171
+ destructiveHint?: boolean | undefined;
172
+ idempotentHint?: boolean | undefined;
173
+ openWorldHint?: boolean | undefined;
174
+ }>>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ name: string;
177
+ description: string;
178
+ type: "function" | "mcp" | "builtin";
179
+ function?: string | undefined;
180
+ module?: string | undefined;
181
+ annotations?: {
182
+ readOnlyHint?: boolean | undefined;
183
+ destructiveHint?: boolean | undefined;
184
+ idempotentHint?: boolean | undefined;
185
+ openWorldHint?: boolean | undefined;
186
+ } | undefined;
187
+ }, {
188
+ name: string;
189
+ description: string;
190
+ type: "function" | "mcp" | "builtin";
191
+ function?: string | undefined;
192
+ module?: string | undefined;
193
+ annotations?: {
194
+ readOnlyHint?: boolean | undefined;
195
+ destructiveHint?: boolean | undefined;
196
+ idempotentHint?: boolean | undefined;
197
+ openWorldHint?: boolean | undefined;
198
+ } | undefined;
199
+ }>;
200
+ declare const McpServerSchema: z.ZodObject<{
201
+ name: z.ZodString;
202
+ transport: z.ZodEnum<["stdio", "sse", "http"]>;
203
+ command: z.ZodOptional<z.ZodString>;
204
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
205
+ url: z.ZodOptional<z.ZodString>;
206
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
207
+ healthCheck: z.ZodOptional<z.ZodObject<{
208
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ timeoutSeconds: number;
211
+ }, {
212
+ timeoutSeconds?: number | undefined;
213
+ }>>;
214
+ }, "strip", z.ZodTypeAny, {
215
+ name: string;
216
+ transport: "stdio" | "sse" | "http";
217
+ command?: string | undefined;
218
+ args?: string[] | undefined;
219
+ url?: string | undefined;
220
+ env?: Record<string, string> | undefined;
221
+ healthCheck?: {
222
+ timeoutSeconds: number;
223
+ } | undefined;
224
+ }, {
225
+ name: string;
226
+ transport: "stdio" | "sse" | "http";
227
+ command?: string | undefined;
228
+ args?: string[] | undefined;
229
+ url?: string | undefined;
230
+ env?: Record<string, string> | undefined;
231
+ healthCheck?: {
232
+ timeoutSeconds?: number | undefined;
233
+ } | undefined;
234
+ }>;
235
+ declare const MemorySchema: z.ZodObject<{
236
+ shortTerm: z.ZodOptional<z.ZodObject<{
237
+ backend: z.ZodEnum<["in-memory", "redis", "sqlite"]>;
238
+ maxTurns: z.ZodOptional<z.ZodNumber>;
239
+ maxTokens: z.ZodOptional<z.ZodNumber>;
240
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
241
+ connection: z.ZodOptional<z.ZodString>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ backend: "in-memory" | "redis" | "sqlite";
244
+ maxTokens?: number | undefined;
245
+ maxTurns?: number | undefined;
246
+ ttlSeconds?: number | undefined;
247
+ connection?: string | undefined;
248
+ }, {
249
+ backend: "in-memory" | "redis" | "sqlite";
250
+ maxTokens?: number | undefined;
251
+ maxTurns?: number | undefined;
252
+ ttlSeconds?: number | undefined;
253
+ connection?: string | undefined;
254
+ }>>;
255
+ longTerm: z.ZodOptional<z.ZodObject<{
256
+ backend: z.ZodEnum<["postgres", "sqlite", "mongodb"]>;
257
+ connectionString: z.ZodString;
258
+ table: z.ZodOptional<z.ZodString>;
259
+ ttlDays: z.ZodOptional<z.ZodNumber>;
260
+ }, "strip", z.ZodTypeAny, {
261
+ backend: "sqlite" | "postgres" | "mongodb";
262
+ connectionString: string;
263
+ table?: string | undefined;
264
+ ttlDays?: number | undefined;
265
+ }, {
266
+ backend: "sqlite" | "postgres" | "mongodb";
267
+ connectionString: string;
268
+ table?: string | undefined;
269
+ ttlDays?: number | undefined;
270
+ }>>;
271
+ vector: z.ZodOptional<z.ZodObject<{
272
+ backend: z.ZodEnum<["pgvector", "pinecone", "weaviate", "qdrant", "chroma"]>;
273
+ connectionString: z.ZodOptional<z.ZodString>;
274
+ apiKey: z.ZodOptional<z.ZodString>;
275
+ dimension: z.ZodNumber;
276
+ topK: z.ZodOptional<z.ZodNumber>;
277
+ namespace: z.ZodOptional<z.ZodString>;
278
+ }, "strip", z.ZodTypeAny, {
279
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
280
+ dimension: number;
281
+ apiKey?: string | undefined;
282
+ connectionString?: string | undefined;
283
+ topK?: number | undefined;
284
+ namespace?: string | undefined;
285
+ }, {
286
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
287
+ dimension: number;
288
+ apiKey?: string | undefined;
289
+ connectionString?: string | undefined;
290
+ topK?: number | undefined;
291
+ namespace?: string | undefined;
292
+ }>>;
293
+ hygiene: z.ZodOptional<z.ZodObject<{
294
+ piiScrubFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
295
+ auditLog: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
296
+ retentionPolicy: z.ZodOptional<z.ZodString>;
297
+ }, "strip", z.ZodTypeAny, {
298
+ auditLog: boolean;
299
+ piiScrubFields?: string[] | undefined;
300
+ retentionPolicy?: string | undefined;
301
+ }, {
302
+ piiScrubFields?: string[] | undefined;
303
+ auditLog?: boolean | undefined;
304
+ retentionPolicy?: string | undefined;
305
+ }>>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ shortTerm?: {
308
+ backend: "in-memory" | "redis" | "sqlite";
309
+ maxTokens?: number | undefined;
310
+ maxTurns?: number | undefined;
311
+ ttlSeconds?: number | undefined;
312
+ connection?: string | undefined;
313
+ } | undefined;
314
+ longTerm?: {
315
+ backend: "sqlite" | "postgres" | "mongodb";
316
+ connectionString: string;
317
+ table?: string | undefined;
318
+ ttlDays?: number | undefined;
319
+ } | undefined;
320
+ vector?: {
321
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
322
+ dimension: number;
323
+ apiKey?: string | undefined;
324
+ connectionString?: string | undefined;
325
+ topK?: number | undefined;
326
+ namespace?: string | undefined;
327
+ } | undefined;
328
+ hygiene?: {
329
+ auditLog: boolean;
330
+ piiScrubFields?: string[] | undefined;
331
+ retentionPolicy?: string | undefined;
332
+ } | undefined;
333
+ }, {
334
+ shortTerm?: {
335
+ backend: "in-memory" | "redis" | "sqlite";
336
+ maxTokens?: number | undefined;
337
+ maxTurns?: number | undefined;
338
+ ttlSeconds?: number | undefined;
339
+ connection?: string | undefined;
340
+ } | undefined;
341
+ longTerm?: {
342
+ backend: "sqlite" | "postgres" | "mongodb";
343
+ connectionString: string;
344
+ table?: string | undefined;
345
+ ttlDays?: number | undefined;
346
+ } | undefined;
347
+ vector?: {
348
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
349
+ dimension: number;
350
+ apiKey?: string | undefined;
351
+ connectionString?: string | undefined;
352
+ topK?: number | undefined;
353
+ namespace?: string | undefined;
354
+ } | undefined;
355
+ hygiene?: {
356
+ piiScrubFields?: string[] | undefined;
357
+ auditLog?: boolean | undefined;
358
+ retentionPolicy?: string | undefined;
359
+ } | undefined;
360
+ }>;
361
+ declare const ChatEndpointSchema: z.ZodObject<{
362
+ path: z.ZodDefault<z.ZodOptional<z.ZodString>>;
363
+ protocol: z.ZodDefault<z.ZodOptional<z.ZodEnum<["openai-compatible", "custom"]>>>;
364
+ streaming: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
365
+ sessionMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["stateful", "stateless"]>>>;
366
+ threadIdHeader: z.ZodDefault<z.ZodOptional<z.ZodString>>;
367
+ }, "strip", z.ZodTypeAny, {
368
+ path: string;
369
+ protocol: "custom" | "openai-compatible";
370
+ streaming: boolean;
371
+ sessionMode: "stateful" | "stateless";
372
+ threadIdHeader: string;
373
+ }, {
374
+ path?: string | undefined;
375
+ protocol?: "custom" | "openai-compatible" | undefined;
376
+ streaming?: boolean | undefined;
377
+ sessionMode?: "stateful" | "stateless" | undefined;
378
+ threadIdHeader?: string | undefined;
379
+ }>;
380
+ declare const GuardrailsSchema: z.ZodObject<{
381
+ input: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
382
+ type: z.ZodLiteral<"topic-filter">;
383
+ blockedTopics: z.ZodArray<z.ZodString, "many">;
384
+ action: z.ZodEnum<["reject", "warn", "log"]>;
385
+ message: z.ZodOptional<z.ZodString>;
386
+ }, "strip", z.ZodTypeAny, {
387
+ type: "topic-filter";
388
+ blockedTopics: string[];
389
+ action: "reject" | "warn" | "log";
390
+ message?: string | undefined;
391
+ }, {
392
+ type: "topic-filter";
393
+ blockedTopics: string[];
394
+ action: "reject" | "warn" | "log";
395
+ message?: string | undefined;
396
+ }>, z.ZodObject<{
397
+ type: z.ZodLiteral<"pii-detector">;
398
+ action: z.ZodEnum<["scrub", "reject", "warn"]>;
399
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
400
+ }, "strip", z.ZodTypeAny, {
401
+ type: "pii-detector";
402
+ action: "reject" | "warn" | "scrub";
403
+ fields?: string[] | undefined;
404
+ }, {
405
+ type: "pii-detector";
406
+ action: "reject" | "warn" | "scrub";
407
+ fields?: string[] | undefined;
408
+ }>, z.ZodObject<{
409
+ type: z.ZodLiteral<"prompt-injection">;
410
+ action: z.ZodEnum<["reject", "warn"]>;
411
+ sensitivity: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
412
+ }, "strip", z.ZodTypeAny, {
413
+ type: "prompt-injection";
414
+ action: "reject" | "warn";
415
+ sensitivity?: "low" | "medium" | "high" | undefined;
416
+ }, {
417
+ type: "prompt-injection";
418
+ action: "reject" | "warn";
419
+ sensitivity?: "low" | "medium" | "high" | undefined;
420
+ }>, z.ZodObject<{
421
+ type: z.ZodLiteral<"custom">;
422
+ module: z.ZodString;
423
+ function: z.ZodString;
424
+ action: z.ZodEnum<["reject", "warn", "log"]>;
425
+ }, "strip", z.ZodTypeAny, {
426
+ function: string;
427
+ type: "custom";
428
+ module: string;
429
+ action: "reject" | "warn" | "log";
430
+ }, {
431
+ function: string;
432
+ type: "custom";
433
+ module: string;
434
+ action: "reject" | "warn" | "log";
435
+ }>]>, "many">>;
436
+ output: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
437
+ type: z.ZodLiteral<"hallucination-detector">;
438
+ threshold: z.ZodNumber;
439
+ action: z.ZodEnum<["reject", "retry", "warn"]>;
440
+ maxRetries: z.ZodOptional<z.ZodNumber>;
441
+ }, "strip", z.ZodTypeAny, {
442
+ type: "hallucination-detector";
443
+ action: "reject" | "warn" | "retry";
444
+ threshold: number;
445
+ maxRetries?: number | undefined;
446
+ }, {
447
+ type: "hallucination-detector";
448
+ action: "reject" | "warn" | "retry";
449
+ threshold: number;
450
+ maxRetries?: number | undefined;
451
+ }>, z.ZodObject<{
452
+ type: z.ZodLiteral<"toxicity-filter">;
453
+ threshold: z.ZodNumber;
454
+ action: z.ZodEnum<["reject", "warn"]>;
455
+ }, "strip", z.ZodTypeAny, {
456
+ type: "toxicity-filter";
457
+ action: "reject" | "warn";
458
+ threshold: number;
459
+ }, {
460
+ type: "toxicity-filter";
461
+ action: "reject" | "warn";
462
+ threshold: number;
463
+ }>, z.ZodObject<{
464
+ type: z.ZodLiteral<"pii-detector">;
465
+ action: z.ZodEnum<["scrub", "reject", "warn"]>;
466
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
467
+ }, "strip", z.ZodTypeAny, {
468
+ type: "pii-detector";
469
+ action: "reject" | "warn" | "scrub";
470
+ fields?: string[] | undefined;
471
+ }, {
472
+ type: "pii-detector";
473
+ action: "reject" | "warn" | "scrub";
474
+ fields?: string[] | undefined;
475
+ }>, z.ZodObject<{
476
+ type: z.ZodLiteral<"custom">;
477
+ module: z.ZodString;
478
+ function: z.ZodString;
479
+ action: z.ZodEnum<["reject", "warn", "log"]>;
480
+ }, "strip", z.ZodTypeAny, {
481
+ function: string;
482
+ type: "custom";
483
+ module: string;
484
+ action: "reject" | "warn" | "log";
485
+ }, {
486
+ function: string;
487
+ type: "custom";
488
+ module: string;
489
+ action: "reject" | "warn" | "log";
490
+ }>]>, "many">>;
491
+ }, "strip", z.ZodTypeAny, {
492
+ input?: ({
493
+ type: "topic-filter";
494
+ blockedTopics: string[];
495
+ action: "reject" | "warn" | "log";
496
+ message?: string | undefined;
497
+ } | {
498
+ type: "pii-detector";
499
+ action: "reject" | "warn" | "scrub";
500
+ fields?: string[] | undefined;
501
+ } | {
502
+ type: "prompt-injection";
503
+ action: "reject" | "warn";
504
+ sensitivity?: "low" | "medium" | "high" | undefined;
505
+ } | {
506
+ function: string;
507
+ type: "custom";
508
+ module: string;
509
+ action: "reject" | "warn" | "log";
510
+ })[] | undefined;
511
+ output?: ({
512
+ type: "hallucination-detector";
513
+ action: "reject" | "warn" | "retry";
514
+ threshold: number;
515
+ maxRetries?: number | undefined;
516
+ } | {
517
+ type: "toxicity-filter";
518
+ action: "reject" | "warn";
519
+ threshold: number;
520
+ } | {
521
+ type: "pii-detector";
522
+ action: "reject" | "warn" | "scrub";
523
+ fields?: string[] | undefined;
524
+ } | {
525
+ function: string;
526
+ type: "custom";
527
+ module: string;
528
+ action: "reject" | "warn" | "log";
529
+ })[] | undefined;
530
+ }, {
531
+ input?: ({
532
+ type: "topic-filter";
533
+ blockedTopics: string[];
534
+ action: "reject" | "warn" | "log";
535
+ message?: string | undefined;
536
+ } | {
537
+ type: "pii-detector";
538
+ action: "reject" | "warn" | "scrub";
539
+ fields?: string[] | undefined;
540
+ } | {
541
+ type: "prompt-injection";
542
+ action: "reject" | "warn";
543
+ sensitivity?: "low" | "medium" | "high" | undefined;
544
+ } | {
545
+ function: string;
546
+ type: "custom";
547
+ module: string;
548
+ action: "reject" | "warn" | "log";
549
+ })[] | undefined;
550
+ output?: ({
551
+ type: "hallucination-detector";
552
+ action: "reject" | "warn" | "retry";
553
+ threshold: number;
554
+ maxRetries?: number | undefined;
555
+ } | {
556
+ type: "toxicity-filter";
557
+ action: "reject" | "warn";
558
+ threshold: number;
559
+ } | {
560
+ type: "pii-detector";
561
+ action: "reject" | "warn" | "scrub";
562
+ fields?: string[] | undefined;
563
+ } | {
564
+ function: string;
565
+ type: "custom";
566
+ module: string;
567
+ action: "reject" | "warn" | "log";
568
+ })[] | undefined;
569
+ }>;
570
+ declare const EvaluationSchema: z.ZodObject<{
571
+ framework: z.ZodEnum<["deepeval", "braintrust", "langsmith", "ragas", "custom"]>;
572
+ datasets: z.ZodOptional<z.ZodArray<z.ZodObject<{
573
+ name: z.ZodString;
574
+ path: z.ZodString;
575
+ metrics: z.ZodOptional<z.ZodArray<z.ZodEnum<["faithfulness", "answer_relevancy", "answer_similarity", "hallucination", "toxicity", "context_precision", "context_recall", "bias", "custom"]>, "many">>;
576
+ }, "strip", z.ZodTypeAny, {
577
+ name: string;
578
+ path: string;
579
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
580
+ }, {
581
+ name: string;
582
+ path: string;
583
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
584
+ }>, "many">>;
585
+ metrics: z.ZodOptional<z.ZodArray<z.ZodEnum<["faithfulness", "answer_relevancy", "answer_similarity", "hallucination", "toxicity", "context_precision", "context_recall", "bias", "custom"]>, "many">>;
586
+ thresholds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
587
+ ciGate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
588
+ }, "strip", z.ZodTypeAny, {
589
+ framework: "custom" | "deepeval" | "braintrust" | "langsmith" | "ragas";
590
+ ciGate: boolean;
591
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
592
+ datasets?: {
593
+ name: string;
594
+ path: string;
595
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
596
+ }[] | undefined;
597
+ thresholds?: Record<string, number> | undefined;
598
+ }, {
599
+ framework: "custom" | "deepeval" | "braintrust" | "langsmith" | "ragas";
600
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
601
+ datasets?: {
602
+ name: string;
603
+ path: string;
604
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
605
+ }[] | undefined;
606
+ thresholds?: Record<string, number> | undefined;
607
+ ciGate?: boolean | undefined;
608
+ }>;
609
+ declare const ObservabilitySchema: z.ZodObject<{
610
+ tracing: z.ZodOptional<z.ZodObject<{
611
+ backend: z.ZodEnum<["langfuse", "langsmith", "agentops", "otel", "honeycomb", "datadog"]>;
612
+ endpoint: z.ZodOptional<z.ZodString>;
613
+ publicKey: z.ZodOptional<z.ZodString>;
614
+ secretKey: z.ZodOptional<z.ZodString>;
615
+ sampleRate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
616
+ }, "strip", z.ZodTypeAny, {
617
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
618
+ sampleRate: number;
619
+ endpoint?: string | undefined;
620
+ publicKey?: string | undefined;
621
+ secretKey?: string | undefined;
622
+ }, {
623
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
624
+ endpoint?: string | undefined;
625
+ publicKey?: string | undefined;
626
+ secretKey?: string | undefined;
627
+ sampleRate?: number | undefined;
628
+ }>>;
629
+ metrics: z.ZodOptional<z.ZodObject<{
630
+ backend: z.ZodEnum<["opentelemetry", "prometheus", "datadog"]>;
631
+ endpoint: z.ZodOptional<z.ZodString>;
632
+ serviceName: z.ZodOptional<z.ZodString>;
633
+ }, "strip", z.ZodTypeAny, {
634
+ backend: "datadog" | "opentelemetry" | "prometheus";
635
+ endpoint?: string | undefined;
636
+ serviceName?: string | undefined;
637
+ }, {
638
+ backend: "datadog" | "opentelemetry" | "prometheus";
639
+ endpoint?: string | undefined;
640
+ serviceName?: string | undefined;
641
+ }>>;
642
+ logging: z.ZodOptional<z.ZodObject<{
643
+ level: z.ZodDefault<z.ZodOptional<z.ZodEnum<["debug", "info", "warn", "error"]>>>;
644
+ structured: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
645
+ redactFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
646
+ }, "strip", z.ZodTypeAny, {
647
+ level: "warn" | "debug" | "info" | "error";
648
+ structured: boolean;
649
+ redactFields?: string[] | undefined;
650
+ }, {
651
+ level?: "warn" | "debug" | "info" | "error" | undefined;
652
+ structured?: boolean | undefined;
653
+ redactFields?: string[] | undefined;
654
+ }>>;
655
+ }, "strip", z.ZodTypeAny, {
656
+ metrics?: {
657
+ backend: "datadog" | "opentelemetry" | "prometheus";
658
+ endpoint?: string | undefined;
659
+ serviceName?: string | undefined;
660
+ } | undefined;
661
+ tracing?: {
662
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
663
+ sampleRate: number;
664
+ endpoint?: string | undefined;
665
+ publicKey?: string | undefined;
666
+ secretKey?: string | undefined;
667
+ } | undefined;
668
+ logging?: {
669
+ level: "warn" | "debug" | "info" | "error";
670
+ structured: boolean;
671
+ redactFields?: string[] | undefined;
672
+ } | undefined;
673
+ }, {
674
+ metrics?: {
675
+ backend: "datadog" | "opentelemetry" | "prometheus";
676
+ endpoint?: string | undefined;
677
+ serviceName?: string | undefined;
678
+ } | undefined;
679
+ tracing?: {
680
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
681
+ endpoint?: string | undefined;
682
+ publicKey?: string | undefined;
683
+ secretKey?: string | undefined;
684
+ sampleRate?: number | undefined;
685
+ } | undefined;
686
+ logging?: {
687
+ level?: "warn" | "debug" | "info" | "error" | undefined;
688
+ structured?: boolean | undefined;
689
+ redactFields?: string[] | undefined;
690
+ } | undefined;
691
+ }>;
692
+ declare const ComplianceSchema: z.ZodObject<{
693
+ packs: z.ZodOptional<z.ZodArray<z.ZodEnum<["owasp-llm-top10", "memory-hygiene", "model-resilience", "evaluation-coverage", "observability"]>, "many">>;
694
+ suppressions: z.ZodOptional<z.ZodArray<z.ZodObject<{
695
+ rule: z.ZodString;
696
+ reason: z.ZodString;
697
+ approvedBy: z.ZodOptional<z.ZodString>;
698
+ expires: z.ZodOptional<z.ZodString>;
699
+ }, "strip", z.ZodTypeAny, {
700
+ rule: string;
701
+ reason: string;
702
+ approvedBy?: string | undefined;
703
+ expires?: string | undefined;
704
+ }, {
705
+ rule: string;
706
+ reason: string;
707
+ approvedBy?: string | undefined;
708
+ expires?: string | undefined;
709
+ }>, "many">>;
710
+ auditSchedule: z.ZodOptional<z.ZodEnum<["daily", "weekly", "monthly", "on-change"]>>;
711
+ }, "strip", z.ZodTypeAny, {
712
+ packs?: ("owasp-llm-top10" | "memory-hygiene" | "model-resilience" | "evaluation-coverage" | "observability")[] | undefined;
713
+ suppressions?: {
714
+ rule: string;
715
+ reason: string;
716
+ approvedBy?: string | undefined;
717
+ expires?: string | undefined;
718
+ }[] | undefined;
719
+ auditSchedule?: "daily" | "weekly" | "monthly" | "on-change" | undefined;
720
+ }, {
721
+ packs?: ("owasp-llm-top10" | "memory-hygiene" | "model-resilience" | "evaluation-coverage" | "observability")[] | undefined;
722
+ suppressions?: {
723
+ rule: string;
724
+ reason: string;
725
+ approvedBy?: string | undefined;
726
+ expires?: string | undefined;
727
+ }[] | undefined;
728
+ auditSchedule?: "daily" | "weekly" | "monthly" | "on-change" | undefined;
729
+ }>;
730
+ declare const RequiresSchema: z.ZodObject<{
731
+ envVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
732
+ services: z.ZodOptional<z.ZodArray<z.ZodObject<{
733
+ type: z.ZodEnum<["postgres", "redis", "mysql", "mongodb", "elasticsearch"]>;
734
+ connection: z.ZodString;
735
+ }, "strip", z.ZodTypeAny, {
736
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
737
+ connection: string;
738
+ }, {
739
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
740
+ connection: string;
741
+ }>, "many">>;
742
+ minimumMemoryMB: z.ZodOptional<z.ZodNumber>;
743
+ nodeVersion: z.ZodOptional<z.ZodString>;
744
+ pythonVersion: z.ZodOptional<z.ZodString>;
745
+ }, "strip", z.ZodTypeAny, {
746
+ envVars?: string[] | undefined;
747
+ services?: {
748
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
749
+ connection: string;
750
+ }[] | undefined;
751
+ minimumMemoryMB?: number | undefined;
752
+ nodeVersion?: string | undefined;
753
+ pythonVersion?: string | undefined;
754
+ }, {
755
+ envVars?: string[] | undefined;
756
+ services?: {
757
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
758
+ connection: string;
759
+ }[] | undefined;
760
+ minimumMemoryMB?: number | undefined;
761
+ nodeVersion?: string | undefined;
762
+ pythonVersion?: string | undefined;
763
+ }>;
764
+ declare const HumanInTheLoopSchema: z.ZodObject<{
765
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
766
+ approvalRequired: z.ZodOptional<z.ZodArray<z.ZodEnum<["before-destructive-tool", "before-external-call", "on-low-confidence", "on-high-cost", "always"]>, "many">>;
767
+ timeoutSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
768
+ timeoutAction: z.ZodDefault<z.ZodOptional<z.ZodEnum<["reject", "proceed", "escalate"]>>>;
769
+ notifyVia: z.ZodOptional<z.ZodArray<z.ZodEnum<["slack", "email", "webhook", "console"]>, "many">>;
770
+ webhookUrl: z.ZodOptional<z.ZodString>;
771
+ }, "strip", z.ZodTypeAny, {
772
+ timeoutSeconds: number;
773
+ enabled: boolean;
774
+ timeoutAction: "reject" | "proceed" | "escalate";
775
+ approvalRequired?: ("before-destructive-tool" | "before-external-call" | "on-low-confidence" | "on-high-cost" | "always")[] | undefined;
776
+ notifyVia?: ("email" | "slack" | "webhook" | "console")[] | undefined;
777
+ webhookUrl?: string | undefined;
778
+ }, {
779
+ timeoutSeconds?: number | undefined;
780
+ enabled?: boolean | undefined;
781
+ approvalRequired?: ("before-destructive-tool" | "before-external-call" | "on-low-confidence" | "on-high-cost" | "always")[] | undefined;
782
+ timeoutAction?: "reject" | "proceed" | "escalate" | undefined;
783
+ notifyVia?: ("email" | "slack" | "webhook" | "console")[] | undefined;
784
+ webhookUrl?: string | undefined;
785
+ }>;
786
+ declare const ManifestSchema: z.ZodObject<{
787
+ apiVersion: z.ZodLiteral<"agentspec.io/v1">;
788
+ kind: z.ZodLiteral<"AgentSpec">;
789
+ metadata: z.ZodObject<{
790
+ name: z.ZodString;
791
+ version: z.ZodString;
792
+ description: z.ZodString;
793
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
794
+ author: z.ZodOptional<z.ZodString>;
795
+ license: z.ZodOptional<z.ZodString>;
796
+ }, "strip", z.ZodTypeAny, {
797
+ name: string;
798
+ version: string;
799
+ description: string;
800
+ tags?: string[] | undefined;
801
+ author?: string | undefined;
802
+ license?: string | undefined;
803
+ }, {
804
+ name: string;
805
+ version: string;
806
+ description: string;
807
+ tags?: string[] | undefined;
808
+ author?: string | undefined;
809
+ license?: string | undefined;
810
+ }>;
811
+ spec: z.ZodObject<{
812
+ model: z.ZodObject<{
813
+ provider: z.ZodString;
814
+ id: z.ZodString;
815
+ apiKey: z.ZodString;
816
+ parameters: z.ZodOptional<z.ZodObject<{
817
+ temperature: z.ZodOptional<z.ZodNumber>;
818
+ maxTokens: z.ZodOptional<z.ZodNumber>;
819
+ topP: z.ZodOptional<z.ZodNumber>;
820
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
821
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
822
+ }, "strip", z.ZodTypeAny, {
823
+ temperature?: number | undefined;
824
+ maxTokens?: number | undefined;
825
+ topP?: number | undefined;
826
+ frequencyPenalty?: number | undefined;
827
+ presencePenalty?: number | undefined;
828
+ }, {
829
+ temperature?: number | undefined;
830
+ maxTokens?: number | undefined;
831
+ topP?: number | undefined;
832
+ frequencyPenalty?: number | undefined;
833
+ presencePenalty?: number | undefined;
834
+ }>>;
835
+ fallback: z.ZodOptional<z.ZodObject<{
836
+ provider: z.ZodString;
837
+ id: z.ZodString;
838
+ apiKey: z.ZodString;
839
+ triggerOn: z.ZodOptional<z.ZodArray<z.ZodEnum<["rate_limit", "timeout", "error_5xx", "error_4xx"]>, "many">>;
840
+ maxRetries: z.ZodOptional<z.ZodNumber>;
841
+ }, "strip", z.ZodTypeAny, {
842
+ provider: string;
843
+ id: string;
844
+ apiKey: string;
845
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
846
+ maxRetries?: number | undefined;
847
+ }, {
848
+ provider: string;
849
+ id: string;
850
+ apiKey: string;
851
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
852
+ maxRetries?: number | undefined;
853
+ }>>;
854
+ costControls: z.ZodOptional<z.ZodObject<{
855
+ maxMonthlyUSD: z.ZodOptional<z.ZodNumber>;
856
+ alertAtUSD: z.ZodOptional<z.ZodNumber>;
857
+ }, "strip", z.ZodTypeAny, {
858
+ maxMonthlyUSD?: number | undefined;
859
+ alertAtUSD?: number | undefined;
860
+ }, {
861
+ maxMonthlyUSD?: number | undefined;
862
+ alertAtUSD?: number | undefined;
863
+ }>>;
864
+ }, "strip", z.ZodTypeAny, {
865
+ provider: string;
866
+ id: string;
867
+ apiKey: string;
868
+ parameters?: {
869
+ temperature?: number | undefined;
870
+ maxTokens?: number | undefined;
871
+ topP?: number | undefined;
872
+ frequencyPenalty?: number | undefined;
873
+ presencePenalty?: number | undefined;
874
+ } | undefined;
875
+ fallback?: {
876
+ provider: string;
877
+ id: string;
878
+ apiKey: string;
879
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
880
+ maxRetries?: number | undefined;
881
+ } | undefined;
882
+ costControls?: {
883
+ maxMonthlyUSD?: number | undefined;
884
+ alertAtUSD?: number | undefined;
885
+ } | undefined;
886
+ }, {
887
+ provider: string;
888
+ id: string;
889
+ apiKey: string;
890
+ parameters?: {
891
+ temperature?: number | undefined;
892
+ maxTokens?: number | undefined;
893
+ topP?: number | undefined;
894
+ frequencyPenalty?: number | undefined;
895
+ presencePenalty?: number | undefined;
896
+ } | undefined;
897
+ fallback?: {
898
+ provider: string;
899
+ id: string;
900
+ apiKey: string;
901
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
902
+ maxRetries?: number | undefined;
903
+ } | undefined;
904
+ costControls?: {
905
+ maxMonthlyUSD?: number | undefined;
906
+ alertAtUSD?: number | undefined;
907
+ } | undefined;
908
+ }>;
909
+ prompts: z.ZodObject<{
910
+ system: z.ZodString;
911
+ fallback: z.ZodOptional<z.ZodString>;
912
+ hotReload: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
913
+ variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
914
+ name: z.ZodString;
915
+ value: z.ZodString;
916
+ }, "strip", z.ZodTypeAny, {
917
+ name: string;
918
+ value: string;
919
+ }, {
920
+ name: string;
921
+ value: string;
922
+ }>, "many">>;
923
+ }, "strip", z.ZodTypeAny, {
924
+ system: string;
925
+ hotReload: boolean;
926
+ fallback?: string | undefined;
927
+ variables?: {
928
+ name: string;
929
+ value: string;
930
+ }[] | undefined;
931
+ }, {
932
+ system: string;
933
+ fallback?: string | undefined;
934
+ hotReload?: boolean | undefined;
935
+ variables?: {
936
+ name: string;
937
+ value: string;
938
+ }[] | undefined;
939
+ }>;
940
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
941
+ name: z.ZodString;
942
+ type: z.ZodEnum<["function", "mcp", "builtin"]>;
943
+ description: z.ZodString;
944
+ module: z.ZodOptional<z.ZodString>;
945
+ function: z.ZodOptional<z.ZodString>;
946
+ annotations: z.ZodOptional<z.ZodObject<{
947
+ readOnlyHint: z.ZodOptional<z.ZodBoolean>;
948
+ destructiveHint: z.ZodOptional<z.ZodBoolean>;
949
+ idempotentHint: z.ZodOptional<z.ZodBoolean>;
950
+ openWorldHint: z.ZodOptional<z.ZodBoolean>;
951
+ }, "strip", z.ZodTypeAny, {
952
+ readOnlyHint?: boolean | undefined;
953
+ destructiveHint?: boolean | undefined;
954
+ idempotentHint?: boolean | undefined;
955
+ openWorldHint?: boolean | undefined;
956
+ }, {
957
+ readOnlyHint?: boolean | undefined;
958
+ destructiveHint?: boolean | undefined;
959
+ idempotentHint?: boolean | undefined;
960
+ openWorldHint?: boolean | undefined;
961
+ }>>;
962
+ }, "strip", z.ZodTypeAny, {
963
+ name: string;
964
+ description: string;
965
+ type: "function" | "mcp" | "builtin";
966
+ function?: string | undefined;
967
+ module?: string | undefined;
968
+ annotations?: {
969
+ readOnlyHint?: boolean | undefined;
970
+ destructiveHint?: boolean | undefined;
971
+ idempotentHint?: boolean | undefined;
972
+ openWorldHint?: boolean | undefined;
973
+ } | undefined;
974
+ }, {
975
+ name: string;
976
+ description: string;
977
+ type: "function" | "mcp" | "builtin";
978
+ function?: string | undefined;
979
+ module?: string | undefined;
980
+ annotations?: {
981
+ readOnlyHint?: boolean | undefined;
982
+ destructiveHint?: boolean | undefined;
983
+ idempotentHint?: boolean | undefined;
984
+ openWorldHint?: boolean | undefined;
985
+ } | undefined;
986
+ }>, "many">>;
987
+ mcp: z.ZodOptional<z.ZodObject<{
988
+ servers: z.ZodArray<z.ZodObject<{
989
+ name: z.ZodString;
990
+ transport: z.ZodEnum<["stdio", "sse", "http"]>;
991
+ command: z.ZodOptional<z.ZodString>;
992
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
993
+ url: z.ZodOptional<z.ZodString>;
994
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
995
+ healthCheck: z.ZodOptional<z.ZodObject<{
996
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
997
+ }, "strip", z.ZodTypeAny, {
998
+ timeoutSeconds: number;
999
+ }, {
1000
+ timeoutSeconds?: number | undefined;
1001
+ }>>;
1002
+ }, "strip", z.ZodTypeAny, {
1003
+ name: string;
1004
+ transport: "stdio" | "sse" | "http";
1005
+ command?: string | undefined;
1006
+ args?: string[] | undefined;
1007
+ url?: string | undefined;
1008
+ env?: Record<string, string> | undefined;
1009
+ healthCheck?: {
1010
+ timeoutSeconds: number;
1011
+ } | undefined;
1012
+ }, {
1013
+ name: string;
1014
+ transport: "stdio" | "sse" | "http";
1015
+ command?: string | undefined;
1016
+ args?: string[] | undefined;
1017
+ url?: string | undefined;
1018
+ env?: Record<string, string> | undefined;
1019
+ healthCheck?: {
1020
+ timeoutSeconds?: number | undefined;
1021
+ } | undefined;
1022
+ }>, "many">;
1023
+ }, "strip", z.ZodTypeAny, {
1024
+ servers: {
1025
+ name: string;
1026
+ transport: "stdio" | "sse" | "http";
1027
+ command?: string | undefined;
1028
+ args?: string[] | undefined;
1029
+ url?: string | undefined;
1030
+ env?: Record<string, string> | undefined;
1031
+ healthCheck?: {
1032
+ timeoutSeconds: number;
1033
+ } | undefined;
1034
+ }[];
1035
+ }, {
1036
+ servers: {
1037
+ name: string;
1038
+ transport: "stdio" | "sse" | "http";
1039
+ command?: string | undefined;
1040
+ args?: string[] | undefined;
1041
+ url?: string | undefined;
1042
+ env?: Record<string, string> | undefined;
1043
+ healthCheck?: {
1044
+ timeoutSeconds?: number | undefined;
1045
+ } | undefined;
1046
+ }[];
1047
+ }>>;
1048
+ memory: z.ZodOptional<z.ZodObject<{
1049
+ shortTerm: z.ZodOptional<z.ZodObject<{
1050
+ backend: z.ZodEnum<["in-memory", "redis", "sqlite"]>;
1051
+ maxTurns: z.ZodOptional<z.ZodNumber>;
1052
+ maxTokens: z.ZodOptional<z.ZodNumber>;
1053
+ ttlSeconds: z.ZodOptional<z.ZodNumber>;
1054
+ connection: z.ZodOptional<z.ZodString>;
1055
+ }, "strip", z.ZodTypeAny, {
1056
+ backend: "in-memory" | "redis" | "sqlite";
1057
+ maxTokens?: number | undefined;
1058
+ maxTurns?: number | undefined;
1059
+ ttlSeconds?: number | undefined;
1060
+ connection?: string | undefined;
1061
+ }, {
1062
+ backend: "in-memory" | "redis" | "sqlite";
1063
+ maxTokens?: number | undefined;
1064
+ maxTurns?: number | undefined;
1065
+ ttlSeconds?: number | undefined;
1066
+ connection?: string | undefined;
1067
+ }>>;
1068
+ longTerm: z.ZodOptional<z.ZodObject<{
1069
+ backend: z.ZodEnum<["postgres", "sqlite", "mongodb"]>;
1070
+ connectionString: z.ZodString;
1071
+ table: z.ZodOptional<z.ZodString>;
1072
+ ttlDays: z.ZodOptional<z.ZodNumber>;
1073
+ }, "strip", z.ZodTypeAny, {
1074
+ backend: "sqlite" | "postgres" | "mongodb";
1075
+ connectionString: string;
1076
+ table?: string | undefined;
1077
+ ttlDays?: number | undefined;
1078
+ }, {
1079
+ backend: "sqlite" | "postgres" | "mongodb";
1080
+ connectionString: string;
1081
+ table?: string | undefined;
1082
+ ttlDays?: number | undefined;
1083
+ }>>;
1084
+ vector: z.ZodOptional<z.ZodObject<{
1085
+ backend: z.ZodEnum<["pgvector", "pinecone", "weaviate", "qdrant", "chroma"]>;
1086
+ connectionString: z.ZodOptional<z.ZodString>;
1087
+ apiKey: z.ZodOptional<z.ZodString>;
1088
+ dimension: z.ZodNumber;
1089
+ topK: z.ZodOptional<z.ZodNumber>;
1090
+ namespace: z.ZodOptional<z.ZodString>;
1091
+ }, "strip", z.ZodTypeAny, {
1092
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
1093
+ dimension: number;
1094
+ apiKey?: string | undefined;
1095
+ connectionString?: string | undefined;
1096
+ topK?: number | undefined;
1097
+ namespace?: string | undefined;
1098
+ }, {
1099
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
1100
+ dimension: number;
1101
+ apiKey?: string | undefined;
1102
+ connectionString?: string | undefined;
1103
+ topK?: number | undefined;
1104
+ namespace?: string | undefined;
1105
+ }>>;
1106
+ hygiene: z.ZodOptional<z.ZodObject<{
1107
+ piiScrubFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1108
+ auditLog: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1109
+ retentionPolicy: z.ZodOptional<z.ZodString>;
1110
+ }, "strip", z.ZodTypeAny, {
1111
+ auditLog: boolean;
1112
+ piiScrubFields?: string[] | undefined;
1113
+ retentionPolicy?: string | undefined;
1114
+ }, {
1115
+ piiScrubFields?: string[] | undefined;
1116
+ auditLog?: boolean | undefined;
1117
+ retentionPolicy?: string | undefined;
1118
+ }>>;
1119
+ }, "strip", z.ZodTypeAny, {
1120
+ shortTerm?: {
1121
+ backend: "in-memory" | "redis" | "sqlite";
1122
+ maxTokens?: number | undefined;
1123
+ maxTurns?: number | undefined;
1124
+ ttlSeconds?: number | undefined;
1125
+ connection?: string | undefined;
1126
+ } | undefined;
1127
+ longTerm?: {
1128
+ backend: "sqlite" | "postgres" | "mongodb";
1129
+ connectionString: string;
1130
+ table?: string | undefined;
1131
+ ttlDays?: number | undefined;
1132
+ } | undefined;
1133
+ vector?: {
1134
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
1135
+ dimension: number;
1136
+ apiKey?: string | undefined;
1137
+ connectionString?: string | undefined;
1138
+ topK?: number | undefined;
1139
+ namespace?: string | undefined;
1140
+ } | undefined;
1141
+ hygiene?: {
1142
+ auditLog: boolean;
1143
+ piiScrubFields?: string[] | undefined;
1144
+ retentionPolicy?: string | undefined;
1145
+ } | undefined;
1146
+ }, {
1147
+ shortTerm?: {
1148
+ backend: "in-memory" | "redis" | "sqlite";
1149
+ maxTokens?: number | undefined;
1150
+ maxTurns?: number | undefined;
1151
+ ttlSeconds?: number | undefined;
1152
+ connection?: string | undefined;
1153
+ } | undefined;
1154
+ longTerm?: {
1155
+ backend: "sqlite" | "postgres" | "mongodb";
1156
+ connectionString: string;
1157
+ table?: string | undefined;
1158
+ ttlDays?: number | undefined;
1159
+ } | undefined;
1160
+ vector?: {
1161
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
1162
+ dimension: number;
1163
+ apiKey?: string | undefined;
1164
+ connectionString?: string | undefined;
1165
+ topK?: number | undefined;
1166
+ namespace?: string | undefined;
1167
+ } | undefined;
1168
+ hygiene?: {
1169
+ piiScrubFields?: string[] | undefined;
1170
+ auditLog?: boolean | undefined;
1171
+ retentionPolicy?: string | undefined;
1172
+ } | undefined;
1173
+ }>>;
1174
+ subagents: z.ZodOptional<z.ZodArray<z.ZodObject<{
1175
+ name: z.ZodString;
1176
+ ref: z.ZodUnion<[z.ZodObject<{
1177
+ agentspec: z.ZodString;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ agentspec: string;
1180
+ }, {
1181
+ agentspec: string;
1182
+ }>, z.ZodObject<{
1183
+ a2a: z.ZodObject<{
1184
+ url: z.ZodString;
1185
+ auth: z.ZodOptional<z.ZodObject<{
1186
+ type: z.ZodEnum<["bearer", "apikey", "none"]>;
1187
+ token: z.ZodOptional<z.ZodString>;
1188
+ header: z.ZodOptional<z.ZodString>;
1189
+ }, "strip", z.ZodTypeAny, {
1190
+ type: "bearer" | "apikey" | "none";
1191
+ token?: string | undefined;
1192
+ header?: string | undefined;
1193
+ }, {
1194
+ type: "bearer" | "apikey" | "none";
1195
+ token?: string | undefined;
1196
+ header?: string | undefined;
1197
+ }>>;
1198
+ }, "strip", z.ZodTypeAny, {
1199
+ url: string;
1200
+ auth?: {
1201
+ type: "bearer" | "apikey" | "none";
1202
+ token?: string | undefined;
1203
+ header?: string | undefined;
1204
+ } | undefined;
1205
+ }, {
1206
+ url: string;
1207
+ auth?: {
1208
+ type: "bearer" | "apikey" | "none";
1209
+ token?: string | undefined;
1210
+ header?: string | undefined;
1211
+ } | undefined;
1212
+ }>;
1213
+ }, "strip", z.ZodTypeAny, {
1214
+ a2a: {
1215
+ url: string;
1216
+ auth?: {
1217
+ type: "bearer" | "apikey" | "none";
1218
+ token?: string | undefined;
1219
+ header?: string | undefined;
1220
+ } | undefined;
1221
+ };
1222
+ }, {
1223
+ a2a: {
1224
+ url: string;
1225
+ auth?: {
1226
+ type: "bearer" | "apikey" | "none";
1227
+ token?: string | undefined;
1228
+ header?: string | undefined;
1229
+ } | undefined;
1230
+ };
1231
+ }>]>;
1232
+ invocation: z.ZodEnum<["parallel", "sequential", "on-demand"]>;
1233
+ passContext: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1234
+ triggerKeywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1235
+ }, "strip", z.ZodTypeAny, {
1236
+ name: string;
1237
+ ref: {
1238
+ agentspec: string;
1239
+ } | {
1240
+ a2a: {
1241
+ url: string;
1242
+ auth?: {
1243
+ type: "bearer" | "apikey" | "none";
1244
+ token?: string | undefined;
1245
+ header?: string | undefined;
1246
+ } | undefined;
1247
+ };
1248
+ };
1249
+ invocation: "parallel" | "sequential" | "on-demand";
1250
+ passContext: boolean;
1251
+ triggerKeywords?: string[] | undefined;
1252
+ }, {
1253
+ name: string;
1254
+ ref: {
1255
+ agentspec: string;
1256
+ } | {
1257
+ a2a: {
1258
+ url: string;
1259
+ auth?: {
1260
+ type: "bearer" | "apikey" | "none";
1261
+ token?: string | undefined;
1262
+ header?: string | undefined;
1263
+ } | undefined;
1264
+ };
1265
+ };
1266
+ invocation: "parallel" | "sequential" | "on-demand";
1267
+ passContext?: boolean | undefined;
1268
+ triggerKeywords?: string[] | undefined;
1269
+ }>, "many">>;
1270
+ api: z.ZodOptional<z.ZodObject<{
1271
+ type: z.ZodEnum<["rest", "mcp", "grpc", "websocket"]>;
1272
+ port: z.ZodOptional<z.ZodNumber>;
1273
+ pathPrefix: z.ZodOptional<z.ZodString>;
1274
+ auth: z.ZodOptional<z.ZodObject<{
1275
+ type: z.ZodEnum<["jwt", "apikey", "oauth2", "none"]>;
1276
+ jwksUri: z.ZodOptional<z.ZodString>;
1277
+ header: z.ZodOptional<z.ZodString>;
1278
+ }, "strip", z.ZodTypeAny, {
1279
+ type: "jwt" | "apikey" | "none" | "oauth2";
1280
+ header?: string | undefined;
1281
+ jwksUri?: string | undefined;
1282
+ }, {
1283
+ type: "jwt" | "apikey" | "none" | "oauth2";
1284
+ header?: string | undefined;
1285
+ jwksUri?: string | undefined;
1286
+ }>>;
1287
+ rateLimit: z.ZodOptional<z.ZodObject<{
1288
+ requestsPerMinute: z.ZodOptional<z.ZodNumber>;
1289
+ requestsPerHour: z.ZodOptional<z.ZodNumber>;
1290
+ }, "strip", z.ZodTypeAny, {
1291
+ requestsPerMinute?: number | undefined;
1292
+ requestsPerHour?: number | undefined;
1293
+ }, {
1294
+ requestsPerMinute?: number | undefined;
1295
+ requestsPerHour?: number | undefined;
1296
+ }>>;
1297
+ streaming: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1298
+ healthEndpoint: z.ZodOptional<z.ZodString>;
1299
+ metricsEndpoint: z.ZodOptional<z.ZodString>;
1300
+ corsOrigins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1301
+ /** Declares the conversational chat endpoint for this agent */
1302
+ chatEndpoint: z.ZodOptional<z.ZodObject<{
1303
+ path: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1304
+ protocol: z.ZodDefault<z.ZodOptional<z.ZodEnum<["openai-compatible", "custom"]>>>;
1305
+ streaming: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1306
+ sessionMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["stateful", "stateless"]>>>;
1307
+ threadIdHeader: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1308
+ }, "strip", z.ZodTypeAny, {
1309
+ path: string;
1310
+ protocol: "custom" | "openai-compatible";
1311
+ streaming: boolean;
1312
+ sessionMode: "stateful" | "stateless";
1313
+ threadIdHeader: string;
1314
+ }, {
1315
+ path?: string | undefined;
1316
+ protocol?: "custom" | "openai-compatible" | undefined;
1317
+ streaming?: boolean | undefined;
1318
+ sessionMode?: "stateful" | "stateless" | undefined;
1319
+ threadIdHeader?: string | undefined;
1320
+ }>>;
1321
+ }, "strip", z.ZodTypeAny, {
1322
+ type: "mcp" | "rest" | "grpc" | "websocket";
1323
+ streaming: boolean;
1324
+ auth?: {
1325
+ type: "jwt" | "apikey" | "none" | "oauth2";
1326
+ header?: string | undefined;
1327
+ jwksUri?: string | undefined;
1328
+ } | undefined;
1329
+ port?: number | undefined;
1330
+ pathPrefix?: string | undefined;
1331
+ rateLimit?: {
1332
+ requestsPerMinute?: number | undefined;
1333
+ requestsPerHour?: number | undefined;
1334
+ } | undefined;
1335
+ healthEndpoint?: string | undefined;
1336
+ metricsEndpoint?: string | undefined;
1337
+ corsOrigins?: string[] | undefined;
1338
+ chatEndpoint?: {
1339
+ path: string;
1340
+ protocol: "custom" | "openai-compatible";
1341
+ streaming: boolean;
1342
+ sessionMode: "stateful" | "stateless";
1343
+ threadIdHeader: string;
1344
+ } | undefined;
1345
+ }, {
1346
+ type: "mcp" | "rest" | "grpc" | "websocket";
1347
+ auth?: {
1348
+ type: "jwt" | "apikey" | "none" | "oauth2";
1349
+ header?: string | undefined;
1350
+ jwksUri?: string | undefined;
1351
+ } | undefined;
1352
+ streaming?: boolean | undefined;
1353
+ port?: number | undefined;
1354
+ pathPrefix?: string | undefined;
1355
+ rateLimit?: {
1356
+ requestsPerMinute?: number | undefined;
1357
+ requestsPerHour?: number | undefined;
1358
+ } | undefined;
1359
+ healthEndpoint?: string | undefined;
1360
+ metricsEndpoint?: string | undefined;
1361
+ corsOrigins?: string[] | undefined;
1362
+ chatEndpoint?: {
1363
+ path?: string | undefined;
1364
+ protocol?: "custom" | "openai-compatible" | undefined;
1365
+ streaming?: boolean | undefined;
1366
+ sessionMode?: "stateful" | "stateless" | undefined;
1367
+ threadIdHeader?: string | undefined;
1368
+ } | undefined;
1369
+ }>>;
1370
+ skills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1371
+ id: z.ZodString;
1372
+ version: z.ZodOptional<z.ZodString>;
1373
+ }, "strip", z.ZodTypeAny, {
1374
+ id: string;
1375
+ version?: string | undefined;
1376
+ }, {
1377
+ id: string;
1378
+ version?: string | undefined;
1379
+ }>, "many">>;
1380
+ guardrails: z.ZodOptional<z.ZodObject<{
1381
+ input: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1382
+ type: z.ZodLiteral<"topic-filter">;
1383
+ blockedTopics: z.ZodArray<z.ZodString, "many">;
1384
+ action: z.ZodEnum<["reject", "warn", "log"]>;
1385
+ message: z.ZodOptional<z.ZodString>;
1386
+ }, "strip", z.ZodTypeAny, {
1387
+ type: "topic-filter";
1388
+ blockedTopics: string[];
1389
+ action: "reject" | "warn" | "log";
1390
+ message?: string | undefined;
1391
+ }, {
1392
+ type: "topic-filter";
1393
+ blockedTopics: string[];
1394
+ action: "reject" | "warn" | "log";
1395
+ message?: string | undefined;
1396
+ }>, z.ZodObject<{
1397
+ type: z.ZodLiteral<"pii-detector">;
1398
+ action: z.ZodEnum<["scrub", "reject", "warn"]>;
1399
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1400
+ }, "strip", z.ZodTypeAny, {
1401
+ type: "pii-detector";
1402
+ action: "reject" | "warn" | "scrub";
1403
+ fields?: string[] | undefined;
1404
+ }, {
1405
+ type: "pii-detector";
1406
+ action: "reject" | "warn" | "scrub";
1407
+ fields?: string[] | undefined;
1408
+ }>, z.ZodObject<{
1409
+ type: z.ZodLiteral<"prompt-injection">;
1410
+ action: z.ZodEnum<["reject", "warn"]>;
1411
+ sensitivity: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1412
+ }, "strip", z.ZodTypeAny, {
1413
+ type: "prompt-injection";
1414
+ action: "reject" | "warn";
1415
+ sensitivity?: "low" | "medium" | "high" | undefined;
1416
+ }, {
1417
+ type: "prompt-injection";
1418
+ action: "reject" | "warn";
1419
+ sensitivity?: "low" | "medium" | "high" | undefined;
1420
+ }>, z.ZodObject<{
1421
+ type: z.ZodLiteral<"custom">;
1422
+ module: z.ZodString;
1423
+ function: z.ZodString;
1424
+ action: z.ZodEnum<["reject", "warn", "log"]>;
1425
+ }, "strip", z.ZodTypeAny, {
1426
+ function: string;
1427
+ type: "custom";
1428
+ module: string;
1429
+ action: "reject" | "warn" | "log";
1430
+ }, {
1431
+ function: string;
1432
+ type: "custom";
1433
+ module: string;
1434
+ action: "reject" | "warn" | "log";
1435
+ }>]>, "many">>;
1436
+ output: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1437
+ type: z.ZodLiteral<"hallucination-detector">;
1438
+ threshold: z.ZodNumber;
1439
+ action: z.ZodEnum<["reject", "retry", "warn"]>;
1440
+ maxRetries: z.ZodOptional<z.ZodNumber>;
1441
+ }, "strip", z.ZodTypeAny, {
1442
+ type: "hallucination-detector";
1443
+ action: "reject" | "warn" | "retry";
1444
+ threshold: number;
1445
+ maxRetries?: number | undefined;
1446
+ }, {
1447
+ type: "hallucination-detector";
1448
+ action: "reject" | "warn" | "retry";
1449
+ threshold: number;
1450
+ maxRetries?: number | undefined;
1451
+ }>, z.ZodObject<{
1452
+ type: z.ZodLiteral<"toxicity-filter">;
1453
+ threshold: z.ZodNumber;
1454
+ action: z.ZodEnum<["reject", "warn"]>;
1455
+ }, "strip", z.ZodTypeAny, {
1456
+ type: "toxicity-filter";
1457
+ action: "reject" | "warn";
1458
+ threshold: number;
1459
+ }, {
1460
+ type: "toxicity-filter";
1461
+ action: "reject" | "warn";
1462
+ threshold: number;
1463
+ }>, z.ZodObject<{
1464
+ type: z.ZodLiteral<"pii-detector">;
1465
+ action: z.ZodEnum<["scrub", "reject", "warn"]>;
1466
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1467
+ }, "strip", z.ZodTypeAny, {
1468
+ type: "pii-detector";
1469
+ action: "reject" | "warn" | "scrub";
1470
+ fields?: string[] | undefined;
1471
+ }, {
1472
+ type: "pii-detector";
1473
+ action: "reject" | "warn" | "scrub";
1474
+ fields?: string[] | undefined;
1475
+ }>, z.ZodObject<{
1476
+ type: z.ZodLiteral<"custom">;
1477
+ module: z.ZodString;
1478
+ function: z.ZodString;
1479
+ action: z.ZodEnum<["reject", "warn", "log"]>;
1480
+ }, "strip", z.ZodTypeAny, {
1481
+ function: string;
1482
+ type: "custom";
1483
+ module: string;
1484
+ action: "reject" | "warn" | "log";
1485
+ }, {
1486
+ function: string;
1487
+ type: "custom";
1488
+ module: string;
1489
+ action: "reject" | "warn" | "log";
1490
+ }>]>, "many">>;
1491
+ }, "strip", z.ZodTypeAny, {
1492
+ input?: ({
1493
+ type: "topic-filter";
1494
+ blockedTopics: string[];
1495
+ action: "reject" | "warn" | "log";
1496
+ message?: string | undefined;
1497
+ } | {
1498
+ type: "pii-detector";
1499
+ action: "reject" | "warn" | "scrub";
1500
+ fields?: string[] | undefined;
1501
+ } | {
1502
+ type: "prompt-injection";
1503
+ action: "reject" | "warn";
1504
+ sensitivity?: "low" | "medium" | "high" | undefined;
1505
+ } | {
1506
+ function: string;
1507
+ type: "custom";
1508
+ module: string;
1509
+ action: "reject" | "warn" | "log";
1510
+ })[] | undefined;
1511
+ output?: ({
1512
+ type: "hallucination-detector";
1513
+ action: "reject" | "warn" | "retry";
1514
+ threshold: number;
1515
+ maxRetries?: number | undefined;
1516
+ } | {
1517
+ type: "toxicity-filter";
1518
+ action: "reject" | "warn";
1519
+ threshold: number;
1520
+ } | {
1521
+ type: "pii-detector";
1522
+ action: "reject" | "warn" | "scrub";
1523
+ fields?: string[] | undefined;
1524
+ } | {
1525
+ function: string;
1526
+ type: "custom";
1527
+ module: string;
1528
+ action: "reject" | "warn" | "log";
1529
+ })[] | undefined;
1530
+ }, {
1531
+ input?: ({
1532
+ type: "topic-filter";
1533
+ blockedTopics: string[];
1534
+ action: "reject" | "warn" | "log";
1535
+ message?: string | undefined;
1536
+ } | {
1537
+ type: "pii-detector";
1538
+ action: "reject" | "warn" | "scrub";
1539
+ fields?: string[] | undefined;
1540
+ } | {
1541
+ type: "prompt-injection";
1542
+ action: "reject" | "warn";
1543
+ sensitivity?: "low" | "medium" | "high" | undefined;
1544
+ } | {
1545
+ function: string;
1546
+ type: "custom";
1547
+ module: string;
1548
+ action: "reject" | "warn" | "log";
1549
+ })[] | undefined;
1550
+ output?: ({
1551
+ type: "hallucination-detector";
1552
+ action: "reject" | "warn" | "retry";
1553
+ threshold: number;
1554
+ maxRetries?: number | undefined;
1555
+ } | {
1556
+ type: "toxicity-filter";
1557
+ action: "reject" | "warn";
1558
+ threshold: number;
1559
+ } | {
1560
+ type: "pii-detector";
1561
+ action: "reject" | "warn" | "scrub";
1562
+ fields?: string[] | undefined;
1563
+ } | {
1564
+ function: string;
1565
+ type: "custom";
1566
+ module: string;
1567
+ action: "reject" | "warn" | "log";
1568
+ })[] | undefined;
1569
+ }>>;
1570
+ humanInTheLoop: z.ZodOptional<z.ZodObject<{
1571
+ enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1572
+ approvalRequired: z.ZodOptional<z.ZodArray<z.ZodEnum<["before-destructive-tool", "before-external-call", "on-low-confidence", "on-high-cost", "always"]>, "many">>;
1573
+ timeoutSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1574
+ timeoutAction: z.ZodDefault<z.ZodOptional<z.ZodEnum<["reject", "proceed", "escalate"]>>>;
1575
+ notifyVia: z.ZodOptional<z.ZodArray<z.ZodEnum<["slack", "email", "webhook", "console"]>, "many">>;
1576
+ webhookUrl: z.ZodOptional<z.ZodString>;
1577
+ }, "strip", z.ZodTypeAny, {
1578
+ timeoutSeconds: number;
1579
+ enabled: boolean;
1580
+ timeoutAction: "reject" | "proceed" | "escalate";
1581
+ approvalRequired?: ("before-destructive-tool" | "before-external-call" | "on-low-confidence" | "on-high-cost" | "always")[] | undefined;
1582
+ notifyVia?: ("email" | "slack" | "webhook" | "console")[] | undefined;
1583
+ webhookUrl?: string | undefined;
1584
+ }, {
1585
+ timeoutSeconds?: number | undefined;
1586
+ enabled?: boolean | undefined;
1587
+ approvalRequired?: ("before-destructive-tool" | "before-external-call" | "on-low-confidence" | "on-high-cost" | "always")[] | undefined;
1588
+ timeoutAction?: "reject" | "proceed" | "escalate" | undefined;
1589
+ notifyVia?: ("email" | "slack" | "webhook" | "console")[] | undefined;
1590
+ webhookUrl?: string | undefined;
1591
+ }>>;
1592
+ evaluation: z.ZodOptional<z.ZodObject<{
1593
+ framework: z.ZodEnum<["deepeval", "braintrust", "langsmith", "ragas", "custom"]>;
1594
+ datasets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1595
+ name: z.ZodString;
1596
+ path: z.ZodString;
1597
+ metrics: z.ZodOptional<z.ZodArray<z.ZodEnum<["faithfulness", "answer_relevancy", "answer_similarity", "hallucination", "toxicity", "context_precision", "context_recall", "bias", "custom"]>, "many">>;
1598
+ }, "strip", z.ZodTypeAny, {
1599
+ name: string;
1600
+ path: string;
1601
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
1602
+ }, {
1603
+ name: string;
1604
+ path: string;
1605
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
1606
+ }>, "many">>;
1607
+ metrics: z.ZodOptional<z.ZodArray<z.ZodEnum<["faithfulness", "answer_relevancy", "answer_similarity", "hallucination", "toxicity", "context_precision", "context_recall", "bias", "custom"]>, "many">>;
1608
+ thresholds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1609
+ ciGate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1610
+ }, "strip", z.ZodTypeAny, {
1611
+ framework: "custom" | "deepeval" | "braintrust" | "langsmith" | "ragas";
1612
+ ciGate: boolean;
1613
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
1614
+ datasets?: {
1615
+ name: string;
1616
+ path: string;
1617
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
1618
+ }[] | undefined;
1619
+ thresholds?: Record<string, number> | undefined;
1620
+ }, {
1621
+ framework: "custom" | "deepeval" | "braintrust" | "langsmith" | "ragas";
1622
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
1623
+ datasets?: {
1624
+ name: string;
1625
+ path: string;
1626
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
1627
+ }[] | undefined;
1628
+ thresholds?: Record<string, number> | undefined;
1629
+ ciGate?: boolean | undefined;
1630
+ }>>;
1631
+ observability: z.ZodOptional<z.ZodObject<{
1632
+ tracing: z.ZodOptional<z.ZodObject<{
1633
+ backend: z.ZodEnum<["langfuse", "langsmith", "agentops", "otel", "honeycomb", "datadog"]>;
1634
+ endpoint: z.ZodOptional<z.ZodString>;
1635
+ publicKey: z.ZodOptional<z.ZodString>;
1636
+ secretKey: z.ZodOptional<z.ZodString>;
1637
+ sampleRate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1638
+ }, "strip", z.ZodTypeAny, {
1639
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
1640
+ sampleRate: number;
1641
+ endpoint?: string | undefined;
1642
+ publicKey?: string | undefined;
1643
+ secretKey?: string | undefined;
1644
+ }, {
1645
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
1646
+ endpoint?: string | undefined;
1647
+ publicKey?: string | undefined;
1648
+ secretKey?: string | undefined;
1649
+ sampleRate?: number | undefined;
1650
+ }>>;
1651
+ metrics: z.ZodOptional<z.ZodObject<{
1652
+ backend: z.ZodEnum<["opentelemetry", "prometheus", "datadog"]>;
1653
+ endpoint: z.ZodOptional<z.ZodString>;
1654
+ serviceName: z.ZodOptional<z.ZodString>;
1655
+ }, "strip", z.ZodTypeAny, {
1656
+ backend: "datadog" | "opentelemetry" | "prometheus";
1657
+ endpoint?: string | undefined;
1658
+ serviceName?: string | undefined;
1659
+ }, {
1660
+ backend: "datadog" | "opentelemetry" | "prometheus";
1661
+ endpoint?: string | undefined;
1662
+ serviceName?: string | undefined;
1663
+ }>>;
1664
+ logging: z.ZodOptional<z.ZodObject<{
1665
+ level: z.ZodDefault<z.ZodOptional<z.ZodEnum<["debug", "info", "warn", "error"]>>>;
1666
+ structured: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1667
+ redactFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1668
+ }, "strip", z.ZodTypeAny, {
1669
+ level: "warn" | "debug" | "info" | "error";
1670
+ structured: boolean;
1671
+ redactFields?: string[] | undefined;
1672
+ }, {
1673
+ level?: "warn" | "debug" | "info" | "error" | undefined;
1674
+ structured?: boolean | undefined;
1675
+ redactFields?: string[] | undefined;
1676
+ }>>;
1677
+ }, "strip", z.ZodTypeAny, {
1678
+ metrics?: {
1679
+ backend: "datadog" | "opentelemetry" | "prometheus";
1680
+ endpoint?: string | undefined;
1681
+ serviceName?: string | undefined;
1682
+ } | undefined;
1683
+ tracing?: {
1684
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
1685
+ sampleRate: number;
1686
+ endpoint?: string | undefined;
1687
+ publicKey?: string | undefined;
1688
+ secretKey?: string | undefined;
1689
+ } | undefined;
1690
+ logging?: {
1691
+ level: "warn" | "debug" | "info" | "error";
1692
+ structured: boolean;
1693
+ redactFields?: string[] | undefined;
1694
+ } | undefined;
1695
+ }, {
1696
+ metrics?: {
1697
+ backend: "datadog" | "opentelemetry" | "prometheus";
1698
+ endpoint?: string | undefined;
1699
+ serviceName?: string | undefined;
1700
+ } | undefined;
1701
+ tracing?: {
1702
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
1703
+ endpoint?: string | undefined;
1704
+ publicKey?: string | undefined;
1705
+ secretKey?: string | undefined;
1706
+ sampleRate?: number | undefined;
1707
+ } | undefined;
1708
+ logging?: {
1709
+ level?: "warn" | "debug" | "info" | "error" | undefined;
1710
+ structured?: boolean | undefined;
1711
+ redactFields?: string[] | undefined;
1712
+ } | undefined;
1713
+ }>>;
1714
+ compliance: z.ZodOptional<z.ZodObject<{
1715
+ packs: z.ZodOptional<z.ZodArray<z.ZodEnum<["owasp-llm-top10", "memory-hygiene", "model-resilience", "evaluation-coverage", "observability"]>, "many">>;
1716
+ suppressions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1717
+ rule: z.ZodString;
1718
+ reason: z.ZodString;
1719
+ approvedBy: z.ZodOptional<z.ZodString>;
1720
+ expires: z.ZodOptional<z.ZodString>;
1721
+ }, "strip", z.ZodTypeAny, {
1722
+ rule: string;
1723
+ reason: string;
1724
+ approvedBy?: string | undefined;
1725
+ expires?: string | undefined;
1726
+ }, {
1727
+ rule: string;
1728
+ reason: string;
1729
+ approvedBy?: string | undefined;
1730
+ expires?: string | undefined;
1731
+ }>, "many">>;
1732
+ auditSchedule: z.ZodOptional<z.ZodEnum<["daily", "weekly", "monthly", "on-change"]>>;
1733
+ }, "strip", z.ZodTypeAny, {
1734
+ packs?: ("owasp-llm-top10" | "memory-hygiene" | "model-resilience" | "evaluation-coverage" | "observability")[] | undefined;
1735
+ suppressions?: {
1736
+ rule: string;
1737
+ reason: string;
1738
+ approvedBy?: string | undefined;
1739
+ expires?: string | undefined;
1740
+ }[] | undefined;
1741
+ auditSchedule?: "daily" | "weekly" | "monthly" | "on-change" | undefined;
1742
+ }, {
1743
+ packs?: ("owasp-llm-top10" | "memory-hygiene" | "model-resilience" | "evaluation-coverage" | "observability")[] | undefined;
1744
+ suppressions?: {
1745
+ rule: string;
1746
+ reason: string;
1747
+ approvedBy?: string | undefined;
1748
+ expires?: string | undefined;
1749
+ }[] | undefined;
1750
+ auditSchedule?: "daily" | "weekly" | "monthly" | "on-change" | undefined;
1751
+ }>>;
1752
+ requires: z.ZodOptional<z.ZodObject<{
1753
+ envVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1754
+ services: z.ZodOptional<z.ZodArray<z.ZodObject<{
1755
+ type: z.ZodEnum<["postgres", "redis", "mysql", "mongodb", "elasticsearch"]>;
1756
+ connection: z.ZodString;
1757
+ }, "strip", z.ZodTypeAny, {
1758
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
1759
+ connection: string;
1760
+ }, {
1761
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
1762
+ connection: string;
1763
+ }>, "many">>;
1764
+ minimumMemoryMB: z.ZodOptional<z.ZodNumber>;
1765
+ nodeVersion: z.ZodOptional<z.ZodString>;
1766
+ pythonVersion: z.ZodOptional<z.ZodString>;
1767
+ }, "strip", z.ZodTypeAny, {
1768
+ envVars?: string[] | undefined;
1769
+ services?: {
1770
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
1771
+ connection: string;
1772
+ }[] | undefined;
1773
+ minimumMemoryMB?: number | undefined;
1774
+ nodeVersion?: string | undefined;
1775
+ pythonVersion?: string | undefined;
1776
+ }, {
1777
+ envVars?: string[] | undefined;
1778
+ services?: {
1779
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
1780
+ connection: string;
1781
+ }[] | undefined;
1782
+ minimumMemoryMB?: number | undefined;
1783
+ nodeVersion?: string | undefined;
1784
+ pythonVersion?: string | undefined;
1785
+ }>>;
1786
+ }, "strip", z.ZodTypeAny, {
1787
+ model: {
1788
+ provider: string;
1789
+ id: string;
1790
+ apiKey: string;
1791
+ parameters?: {
1792
+ temperature?: number | undefined;
1793
+ maxTokens?: number | undefined;
1794
+ topP?: number | undefined;
1795
+ frequencyPenalty?: number | undefined;
1796
+ presencePenalty?: number | undefined;
1797
+ } | undefined;
1798
+ fallback?: {
1799
+ provider: string;
1800
+ id: string;
1801
+ apiKey: string;
1802
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
1803
+ maxRetries?: number | undefined;
1804
+ } | undefined;
1805
+ costControls?: {
1806
+ maxMonthlyUSD?: number | undefined;
1807
+ alertAtUSD?: number | undefined;
1808
+ } | undefined;
1809
+ };
1810
+ prompts: {
1811
+ system: string;
1812
+ hotReload: boolean;
1813
+ fallback?: string | undefined;
1814
+ variables?: {
1815
+ name: string;
1816
+ value: string;
1817
+ }[] | undefined;
1818
+ };
1819
+ mcp?: {
1820
+ servers: {
1821
+ name: string;
1822
+ transport: "stdio" | "sse" | "http";
1823
+ command?: string | undefined;
1824
+ args?: string[] | undefined;
1825
+ url?: string | undefined;
1826
+ env?: Record<string, string> | undefined;
1827
+ healthCheck?: {
1828
+ timeoutSeconds: number;
1829
+ } | undefined;
1830
+ }[];
1831
+ } | undefined;
1832
+ observability?: {
1833
+ metrics?: {
1834
+ backend: "datadog" | "opentelemetry" | "prometheus";
1835
+ endpoint?: string | undefined;
1836
+ serviceName?: string | undefined;
1837
+ } | undefined;
1838
+ tracing?: {
1839
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
1840
+ sampleRate: number;
1841
+ endpoint?: string | undefined;
1842
+ publicKey?: string | undefined;
1843
+ secretKey?: string | undefined;
1844
+ } | undefined;
1845
+ logging?: {
1846
+ level: "warn" | "debug" | "info" | "error";
1847
+ structured: boolean;
1848
+ redactFields?: string[] | undefined;
1849
+ } | undefined;
1850
+ } | undefined;
1851
+ tools?: {
1852
+ name: string;
1853
+ description: string;
1854
+ type: "function" | "mcp" | "builtin";
1855
+ function?: string | undefined;
1856
+ module?: string | undefined;
1857
+ annotations?: {
1858
+ readOnlyHint?: boolean | undefined;
1859
+ destructiveHint?: boolean | undefined;
1860
+ idempotentHint?: boolean | undefined;
1861
+ openWorldHint?: boolean | undefined;
1862
+ } | undefined;
1863
+ }[] | undefined;
1864
+ memory?: {
1865
+ shortTerm?: {
1866
+ backend: "in-memory" | "redis" | "sqlite";
1867
+ maxTokens?: number | undefined;
1868
+ maxTurns?: number | undefined;
1869
+ ttlSeconds?: number | undefined;
1870
+ connection?: string | undefined;
1871
+ } | undefined;
1872
+ longTerm?: {
1873
+ backend: "sqlite" | "postgres" | "mongodb";
1874
+ connectionString: string;
1875
+ table?: string | undefined;
1876
+ ttlDays?: number | undefined;
1877
+ } | undefined;
1878
+ vector?: {
1879
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
1880
+ dimension: number;
1881
+ apiKey?: string | undefined;
1882
+ connectionString?: string | undefined;
1883
+ topK?: number | undefined;
1884
+ namespace?: string | undefined;
1885
+ } | undefined;
1886
+ hygiene?: {
1887
+ auditLog: boolean;
1888
+ piiScrubFields?: string[] | undefined;
1889
+ retentionPolicy?: string | undefined;
1890
+ } | undefined;
1891
+ } | undefined;
1892
+ subagents?: {
1893
+ name: string;
1894
+ ref: {
1895
+ agentspec: string;
1896
+ } | {
1897
+ a2a: {
1898
+ url: string;
1899
+ auth?: {
1900
+ type: "bearer" | "apikey" | "none";
1901
+ token?: string | undefined;
1902
+ header?: string | undefined;
1903
+ } | undefined;
1904
+ };
1905
+ };
1906
+ invocation: "parallel" | "sequential" | "on-demand";
1907
+ passContext: boolean;
1908
+ triggerKeywords?: string[] | undefined;
1909
+ }[] | undefined;
1910
+ api?: {
1911
+ type: "mcp" | "rest" | "grpc" | "websocket";
1912
+ streaming: boolean;
1913
+ auth?: {
1914
+ type: "jwt" | "apikey" | "none" | "oauth2";
1915
+ header?: string | undefined;
1916
+ jwksUri?: string | undefined;
1917
+ } | undefined;
1918
+ port?: number | undefined;
1919
+ pathPrefix?: string | undefined;
1920
+ rateLimit?: {
1921
+ requestsPerMinute?: number | undefined;
1922
+ requestsPerHour?: number | undefined;
1923
+ } | undefined;
1924
+ healthEndpoint?: string | undefined;
1925
+ metricsEndpoint?: string | undefined;
1926
+ corsOrigins?: string[] | undefined;
1927
+ chatEndpoint?: {
1928
+ path: string;
1929
+ protocol: "custom" | "openai-compatible";
1930
+ streaming: boolean;
1931
+ sessionMode: "stateful" | "stateless";
1932
+ threadIdHeader: string;
1933
+ } | undefined;
1934
+ } | undefined;
1935
+ skills?: {
1936
+ id: string;
1937
+ version?: string | undefined;
1938
+ }[] | undefined;
1939
+ guardrails?: {
1940
+ input?: ({
1941
+ type: "topic-filter";
1942
+ blockedTopics: string[];
1943
+ action: "reject" | "warn" | "log";
1944
+ message?: string | undefined;
1945
+ } | {
1946
+ type: "pii-detector";
1947
+ action: "reject" | "warn" | "scrub";
1948
+ fields?: string[] | undefined;
1949
+ } | {
1950
+ type: "prompt-injection";
1951
+ action: "reject" | "warn";
1952
+ sensitivity?: "low" | "medium" | "high" | undefined;
1953
+ } | {
1954
+ function: string;
1955
+ type: "custom";
1956
+ module: string;
1957
+ action: "reject" | "warn" | "log";
1958
+ })[] | undefined;
1959
+ output?: ({
1960
+ type: "hallucination-detector";
1961
+ action: "reject" | "warn" | "retry";
1962
+ threshold: number;
1963
+ maxRetries?: number | undefined;
1964
+ } | {
1965
+ type: "toxicity-filter";
1966
+ action: "reject" | "warn";
1967
+ threshold: number;
1968
+ } | {
1969
+ type: "pii-detector";
1970
+ action: "reject" | "warn" | "scrub";
1971
+ fields?: string[] | undefined;
1972
+ } | {
1973
+ function: string;
1974
+ type: "custom";
1975
+ module: string;
1976
+ action: "reject" | "warn" | "log";
1977
+ })[] | undefined;
1978
+ } | undefined;
1979
+ humanInTheLoop?: {
1980
+ timeoutSeconds: number;
1981
+ enabled: boolean;
1982
+ timeoutAction: "reject" | "proceed" | "escalate";
1983
+ approvalRequired?: ("before-destructive-tool" | "before-external-call" | "on-low-confidence" | "on-high-cost" | "always")[] | undefined;
1984
+ notifyVia?: ("email" | "slack" | "webhook" | "console")[] | undefined;
1985
+ webhookUrl?: string | undefined;
1986
+ } | undefined;
1987
+ evaluation?: {
1988
+ framework: "custom" | "deepeval" | "braintrust" | "langsmith" | "ragas";
1989
+ ciGate: boolean;
1990
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
1991
+ datasets?: {
1992
+ name: string;
1993
+ path: string;
1994
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
1995
+ }[] | undefined;
1996
+ thresholds?: Record<string, number> | undefined;
1997
+ } | undefined;
1998
+ compliance?: {
1999
+ packs?: ("owasp-llm-top10" | "memory-hygiene" | "model-resilience" | "evaluation-coverage" | "observability")[] | undefined;
2000
+ suppressions?: {
2001
+ rule: string;
2002
+ reason: string;
2003
+ approvedBy?: string | undefined;
2004
+ expires?: string | undefined;
2005
+ }[] | undefined;
2006
+ auditSchedule?: "daily" | "weekly" | "monthly" | "on-change" | undefined;
2007
+ } | undefined;
2008
+ requires?: {
2009
+ envVars?: string[] | undefined;
2010
+ services?: {
2011
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
2012
+ connection: string;
2013
+ }[] | undefined;
2014
+ minimumMemoryMB?: number | undefined;
2015
+ nodeVersion?: string | undefined;
2016
+ pythonVersion?: string | undefined;
2017
+ } | undefined;
2018
+ }, {
2019
+ model: {
2020
+ provider: string;
2021
+ id: string;
2022
+ apiKey: string;
2023
+ parameters?: {
2024
+ temperature?: number | undefined;
2025
+ maxTokens?: number | undefined;
2026
+ topP?: number | undefined;
2027
+ frequencyPenalty?: number | undefined;
2028
+ presencePenalty?: number | undefined;
2029
+ } | undefined;
2030
+ fallback?: {
2031
+ provider: string;
2032
+ id: string;
2033
+ apiKey: string;
2034
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
2035
+ maxRetries?: number | undefined;
2036
+ } | undefined;
2037
+ costControls?: {
2038
+ maxMonthlyUSD?: number | undefined;
2039
+ alertAtUSD?: number | undefined;
2040
+ } | undefined;
2041
+ };
2042
+ prompts: {
2043
+ system: string;
2044
+ fallback?: string | undefined;
2045
+ hotReload?: boolean | undefined;
2046
+ variables?: {
2047
+ name: string;
2048
+ value: string;
2049
+ }[] | undefined;
2050
+ };
2051
+ mcp?: {
2052
+ servers: {
2053
+ name: string;
2054
+ transport: "stdio" | "sse" | "http";
2055
+ command?: string | undefined;
2056
+ args?: string[] | undefined;
2057
+ url?: string | undefined;
2058
+ env?: Record<string, string> | undefined;
2059
+ healthCheck?: {
2060
+ timeoutSeconds?: number | undefined;
2061
+ } | undefined;
2062
+ }[];
2063
+ } | undefined;
2064
+ observability?: {
2065
+ metrics?: {
2066
+ backend: "datadog" | "opentelemetry" | "prometheus";
2067
+ endpoint?: string | undefined;
2068
+ serviceName?: string | undefined;
2069
+ } | undefined;
2070
+ tracing?: {
2071
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
2072
+ endpoint?: string | undefined;
2073
+ publicKey?: string | undefined;
2074
+ secretKey?: string | undefined;
2075
+ sampleRate?: number | undefined;
2076
+ } | undefined;
2077
+ logging?: {
2078
+ level?: "warn" | "debug" | "info" | "error" | undefined;
2079
+ structured?: boolean | undefined;
2080
+ redactFields?: string[] | undefined;
2081
+ } | undefined;
2082
+ } | undefined;
2083
+ tools?: {
2084
+ name: string;
2085
+ description: string;
2086
+ type: "function" | "mcp" | "builtin";
2087
+ function?: string | undefined;
2088
+ module?: string | undefined;
2089
+ annotations?: {
2090
+ readOnlyHint?: boolean | undefined;
2091
+ destructiveHint?: boolean | undefined;
2092
+ idempotentHint?: boolean | undefined;
2093
+ openWorldHint?: boolean | undefined;
2094
+ } | undefined;
2095
+ }[] | undefined;
2096
+ memory?: {
2097
+ shortTerm?: {
2098
+ backend: "in-memory" | "redis" | "sqlite";
2099
+ maxTokens?: number | undefined;
2100
+ maxTurns?: number | undefined;
2101
+ ttlSeconds?: number | undefined;
2102
+ connection?: string | undefined;
2103
+ } | undefined;
2104
+ longTerm?: {
2105
+ backend: "sqlite" | "postgres" | "mongodb";
2106
+ connectionString: string;
2107
+ table?: string | undefined;
2108
+ ttlDays?: number | undefined;
2109
+ } | undefined;
2110
+ vector?: {
2111
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
2112
+ dimension: number;
2113
+ apiKey?: string | undefined;
2114
+ connectionString?: string | undefined;
2115
+ topK?: number | undefined;
2116
+ namespace?: string | undefined;
2117
+ } | undefined;
2118
+ hygiene?: {
2119
+ piiScrubFields?: string[] | undefined;
2120
+ auditLog?: boolean | undefined;
2121
+ retentionPolicy?: string | undefined;
2122
+ } | undefined;
2123
+ } | undefined;
2124
+ subagents?: {
2125
+ name: string;
2126
+ ref: {
2127
+ agentspec: string;
2128
+ } | {
2129
+ a2a: {
2130
+ url: string;
2131
+ auth?: {
2132
+ type: "bearer" | "apikey" | "none";
2133
+ token?: string | undefined;
2134
+ header?: string | undefined;
2135
+ } | undefined;
2136
+ };
2137
+ };
2138
+ invocation: "parallel" | "sequential" | "on-demand";
2139
+ passContext?: boolean | undefined;
2140
+ triggerKeywords?: string[] | undefined;
2141
+ }[] | undefined;
2142
+ api?: {
2143
+ type: "mcp" | "rest" | "grpc" | "websocket";
2144
+ auth?: {
2145
+ type: "jwt" | "apikey" | "none" | "oauth2";
2146
+ header?: string | undefined;
2147
+ jwksUri?: string | undefined;
2148
+ } | undefined;
2149
+ streaming?: boolean | undefined;
2150
+ port?: number | undefined;
2151
+ pathPrefix?: string | undefined;
2152
+ rateLimit?: {
2153
+ requestsPerMinute?: number | undefined;
2154
+ requestsPerHour?: number | undefined;
2155
+ } | undefined;
2156
+ healthEndpoint?: string | undefined;
2157
+ metricsEndpoint?: string | undefined;
2158
+ corsOrigins?: string[] | undefined;
2159
+ chatEndpoint?: {
2160
+ path?: string | undefined;
2161
+ protocol?: "custom" | "openai-compatible" | undefined;
2162
+ streaming?: boolean | undefined;
2163
+ sessionMode?: "stateful" | "stateless" | undefined;
2164
+ threadIdHeader?: string | undefined;
2165
+ } | undefined;
2166
+ } | undefined;
2167
+ skills?: {
2168
+ id: string;
2169
+ version?: string | undefined;
2170
+ }[] | undefined;
2171
+ guardrails?: {
2172
+ input?: ({
2173
+ type: "topic-filter";
2174
+ blockedTopics: string[];
2175
+ action: "reject" | "warn" | "log";
2176
+ message?: string | undefined;
2177
+ } | {
2178
+ type: "pii-detector";
2179
+ action: "reject" | "warn" | "scrub";
2180
+ fields?: string[] | undefined;
2181
+ } | {
2182
+ type: "prompt-injection";
2183
+ action: "reject" | "warn";
2184
+ sensitivity?: "low" | "medium" | "high" | undefined;
2185
+ } | {
2186
+ function: string;
2187
+ type: "custom";
2188
+ module: string;
2189
+ action: "reject" | "warn" | "log";
2190
+ })[] | undefined;
2191
+ output?: ({
2192
+ type: "hallucination-detector";
2193
+ action: "reject" | "warn" | "retry";
2194
+ threshold: number;
2195
+ maxRetries?: number | undefined;
2196
+ } | {
2197
+ type: "toxicity-filter";
2198
+ action: "reject" | "warn";
2199
+ threshold: number;
2200
+ } | {
2201
+ type: "pii-detector";
2202
+ action: "reject" | "warn" | "scrub";
2203
+ fields?: string[] | undefined;
2204
+ } | {
2205
+ function: string;
2206
+ type: "custom";
2207
+ module: string;
2208
+ action: "reject" | "warn" | "log";
2209
+ })[] | undefined;
2210
+ } | undefined;
2211
+ humanInTheLoop?: {
2212
+ timeoutSeconds?: number | undefined;
2213
+ enabled?: boolean | undefined;
2214
+ approvalRequired?: ("before-destructive-tool" | "before-external-call" | "on-low-confidence" | "on-high-cost" | "always")[] | undefined;
2215
+ timeoutAction?: "reject" | "proceed" | "escalate" | undefined;
2216
+ notifyVia?: ("email" | "slack" | "webhook" | "console")[] | undefined;
2217
+ webhookUrl?: string | undefined;
2218
+ } | undefined;
2219
+ evaluation?: {
2220
+ framework: "custom" | "deepeval" | "braintrust" | "langsmith" | "ragas";
2221
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
2222
+ datasets?: {
2223
+ name: string;
2224
+ path: string;
2225
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
2226
+ }[] | undefined;
2227
+ thresholds?: Record<string, number> | undefined;
2228
+ ciGate?: boolean | undefined;
2229
+ } | undefined;
2230
+ compliance?: {
2231
+ packs?: ("owasp-llm-top10" | "memory-hygiene" | "model-resilience" | "evaluation-coverage" | "observability")[] | undefined;
2232
+ suppressions?: {
2233
+ rule: string;
2234
+ reason: string;
2235
+ approvedBy?: string | undefined;
2236
+ expires?: string | undefined;
2237
+ }[] | undefined;
2238
+ auditSchedule?: "daily" | "weekly" | "monthly" | "on-change" | undefined;
2239
+ } | undefined;
2240
+ requires?: {
2241
+ envVars?: string[] | undefined;
2242
+ services?: {
2243
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
2244
+ connection: string;
2245
+ }[] | undefined;
2246
+ minimumMemoryMB?: number | undefined;
2247
+ nodeVersion?: string | undefined;
2248
+ pythonVersion?: string | undefined;
2249
+ } | undefined;
2250
+ }>;
2251
+ }, "strip", z.ZodTypeAny, {
2252
+ apiVersion: "agentspec.io/v1";
2253
+ kind: "AgentSpec";
2254
+ metadata: {
2255
+ name: string;
2256
+ version: string;
2257
+ description: string;
2258
+ tags?: string[] | undefined;
2259
+ author?: string | undefined;
2260
+ license?: string | undefined;
2261
+ };
2262
+ spec: {
2263
+ model: {
2264
+ provider: string;
2265
+ id: string;
2266
+ apiKey: string;
2267
+ parameters?: {
2268
+ temperature?: number | undefined;
2269
+ maxTokens?: number | undefined;
2270
+ topP?: number | undefined;
2271
+ frequencyPenalty?: number | undefined;
2272
+ presencePenalty?: number | undefined;
2273
+ } | undefined;
2274
+ fallback?: {
2275
+ provider: string;
2276
+ id: string;
2277
+ apiKey: string;
2278
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
2279
+ maxRetries?: number | undefined;
2280
+ } | undefined;
2281
+ costControls?: {
2282
+ maxMonthlyUSD?: number | undefined;
2283
+ alertAtUSD?: number | undefined;
2284
+ } | undefined;
2285
+ };
2286
+ prompts: {
2287
+ system: string;
2288
+ hotReload: boolean;
2289
+ fallback?: string | undefined;
2290
+ variables?: {
2291
+ name: string;
2292
+ value: string;
2293
+ }[] | undefined;
2294
+ };
2295
+ mcp?: {
2296
+ servers: {
2297
+ name: string;
2298
+ transport: "stdio" | "sse" | "http";
2299
+ command?: string | undefined;
2300
+ args?: string[] | undefined;
2301
+ url?: string | undefined;
2302
+ env?: Record<string, string> | undefined;
2303
+ healthCheck?: {
2304
+ timeoutSeconds: number;
2305
+ } | undefined;
2306
+ }[];
2307
+ } | undefined;
2308
+ observability?: {
2309
+ metrics?: {
2310
+ backend: "datadog" | "opentelemetry" | "prometheus";
2311
+ endpoint?: string | undefined;
2312
+ serviceName?: string | undefined;
2313
+ } | undefined;
2314
+ tracing?: {
2315
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
2316
+ sampleRate: number;
2317
+ endpoint?: string | undefined;
2318
+ publicKey?: string | undefined;
2319
+ secretKey?: string | undefined;
2320
+ } | undefined;
2321
+ logging?: {
2322
+ level: "warn" | "debug" | "info" | "error";
2323
+ structured: boolean;
2324
+ redactFields?: string[] | undefined;
2325
+ } | undefined;
2326
+ } | undefined;
2327
+ tools?: {
2328
+ name: string;
2329
+ description: string;
2330
+ type: "function" | "mcp" | "builtin";
2331
+ function?: string | undefined;
2332
+ module?: string | undefined;
2333
+ annotations?: {
2334
+ readOnlyHint?: boolean | undefined;
2335
+ destructiveHint?: boolean | undefined;
2336
+ idempotentHint?: boolean | undefined;
2337
+ openWorldHint?: boolean | undefined;
2338
+ } | undefined;
2339
+ }[] | undefined;
2340
+ memory?: {
2341
+ shortTerm?: {
2342
+ backend: "in-memory" | "redis" | "sqlite";
2343
+ maxTokens?: number | undefined;
2344
+ maxTurns?: number | undefined;
2345
+ ttlSeconds?: number | undefined;
2346
+ connection?: string | undefined;
2347
+ } | undefined;
2348
+ longTerm?: {
2349
+ backend: "sqlite" | "postgres" | "mongodb";
2350
+ connectionString: string;
2351
+ table?: string | undefined;
2352
+ ttlDays?: number | undefined;
2353
+ } | undefined;
2354
+ vector?: {
2355
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
2356
+ dimension: number;
2357
+ apiKey?: string | undefined;
2358
+ connectionString?: string | undefined;
2359
+ topK?: number | undefined;
2360
+ namespace?: string | undefined;
2361
+ } | undefined;
2362
+ hygiene?: {
2363
+ auditLog: boolean;
2364
+ piiScrubFields?: string[] | undefined;
2365
+ retentionPolicy?: string | undefined;
2366
+ } | undefined;
2367
+ } | undefined;
2368
+ subagents?: {
2369
+ name: string;
2370
+ ref: {
2371
+ agentspec: string;
2372
+ } | {
2373
+ a2a: {
2374
+ url: string;
2375
+ auth?: {
2376
+ type: "bearer" | "apikey" | "none";
2377
+ token?: string | undefined;
2378
+ header?: string | undefined;
2379
+ } | undefined;
2380
+ };
2381
+ };
2382
+ invocation: "parallel" | "sequential" | "on-demand";
2383
+ passContext: boolean;
2384
+ triggerKeywords?: string[] | undefined;
2385
+ }[] | undefined;
2386
+ api?: {
2387
+ type: "mcp" | "rest" | "grpc" | "websocket";
2388
+ streaming: boolean;
2389
+ auth?: {
2390
+ type: "jwt" | "apikey" | "none" | "oauth2";
2391
+ header?: string | undefined;
2392
+ jwksUri?: string | undefined;
2393
+ } | undefined;
2394
+ port?: number | undefined;
2395
+ pathPrefix?: string | undefined;
2396
+ rateLimit?: {
2397
+ requestsPerMinute?: number | undefined;
2398
+ requestsPerHour?: number | undefined;
2399
+ } | undefined;
2400
+ healthEndpoint?: string | undefined;
2401
+ metricsEndpoint?: string | undefined;
2402
+ corsOrigins?: string[] | undefined;
2403
+ chatEndpoint?: {
2404
+ path: string;
2405
+ protocol: "custom" | "openai-compatible";
2406
+ streaming: boolean;
2407
+ sessionMode: "stateful" | "stateless";
2408
+ threadIdHeader: string;
2409
+ } | undefined;
2410
+ } | undefined;
2411
+ skills?: {
2412
+ id: string;
2413
+ version?: string | undefined;
2414
+ }[] | undefined;
2415
+ guardrails?: {
2416
+ input?: ({
2417
+ type: "topic-filter";
2418
+ blockedTopics: string[];
2419
+ action: "reject" | "warn" | "log";
2420
+ message?: string | undefined;
2421
+ } | {
2422
+ type: "pii-detector";
2423
+ action: "reject" | "warn" | "scrub";
2424
+ fields?: string[] | undefined;
2425
+ } | {
2426
+ type: "prompt-injection";
2427
+ action: "reject" | "warn";
2428
+ sensitivity?: "low" | "medium" | "high" | undefined;
2429
+ } | {
2430
+ function: string;
2431
+ type: "custom";
2432
+ module: string;
2433
+ action: "reject" | "warn" | "log";
2434
+ })[] | undefined;
2435
+ output?: ({
2436
+ type: "hallucination-detector";
2437
+ action: "reject" | "warn" | "retry";
2438
+ threshold: number;
2439
+ maxRetries?: number | undefined;
2440
+ } | {
2441
+ type: "toxicity-filter";
2442
+ action: "reject" | "warn";
2443
+ threshold: number;
2444
+ } | {
2445
+ type: "pii-detector";
2446
+ action: "reject" | "warn" | "scrub";
2447
+ fields?: string[] | undefined;
2448
+ } | {
2449
+ function: string;
2450
+ type: "custom";
2451
+ module: string;
2452
+ action: "reject" | "warn" | "log";
2453
+ })[] | undefined;
2454
+ } | undefined;
2455
+ humanInTheLoop?: {
2456
+ timeoutSeconds: number;
2457
+ enabled: boolean;
2458
+ timeoutAction: "reject" | "proceed" | "escalate";
2459
+ approvalRequired?: ("before-destructive-tool" | "before-external-call" | "on-low-confidence" | "on-high-cost" | "always")[] | undefined;
2460
+ notifyVia?: ("email" | "slack" | "webhook" | "console")[] | undefined;
2461
+ webhookUrl?: string | undefined;
2462
+ } | undefined;
2463
+ evaluation?: {
2464
+ framework: "custom" | "deepeval" | "braintrust" | "langsmith" | "ragas";
2465
+ ciGate: boolean;
2466
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
2467
+ datasets?: {
2468
+ name: string;
2469
+ path: string;
2470
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
2471
+ }[] | undefined;
2472
+ thresholds?: Record<string, number> | undefined;
2473
+ } | undefined;
2474
+ compliance?: {
2475
+ packs?: ("owasp-llm-top10" | "memory-hygiene" | "model-resilience" | "evaluation-coverage" | "observability")[] | undefined;
2476
+ suppressions?: {
2477
+ rule: string;
2478
+ reason: string;
2479
+ approvedBy?: string | undefined;
2480
+ expires?: string | undefined;
2481
+ }[] | undefined;
2482
+ auditSchedule?: "daily" | "weekly" | "monthly" | "on-change" | undefined;
2483
+ } | undefined;
2484
+ requires?: {
2485
+ envVars?: string[] | undefined;
2486
+ services?: {
2487
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
2488
+ connection: string;
2489
+ }[] | undefined;
2490
+ minimumMemoryMB?: number | undefined;
2491
+ nodeVersion?: string | undefined;
2492
+ pythonVersion?: string | undefined;
2493
+ } | undefined;
2494
+ };
2495
+ }, {
2496
+ apiVersion: "agentspec.io/v1";
2497
+ kind: "AgentSpec";
2498
+ metadata: {
2499
+ name: string;
2500
+ version: string;
2501
+ description: string;
2502
+ tags?: string[] | undefined;
2503
+ author?: string | undefined;
2504
+ license?: string | undefined;
2505
+ };
2506
+ spec: {
2507
+ model: {
2508
+ provider: string;
2509
+ id: string;
2510
+ apiKey: string;
2511
+ parameters?: {
2512
+ temperature?: number | undefined;
2513
+ maxTokens?: number | undefined;
2514
+ topP?: number | undefined;
2515
+ frequencyPenalty?: number | undefined;
2516
+ presencePenalty?: number | undefined;
2517
+ } | undefined;
2518
+ fallback?: {
2519
+ provider: string;
2520
+ id: string;
2521
+ apiKey: string;
2522
+ triggerOn?: ("rate_limit" | "timeout" | "error_5xx" | "error_4xx")[] | undefined;
2523
+ maxRetries?: number | undefined;
2524
+ } | undefined;
2525
+ costControls?: {
2526
+ maxMonthlyUSD?: number | undefined;
2527
+ alertAtUSD?: number | undefined;
2528
+ } | undefined;
2529
+ };
2530
+ prompts: {
2531
+ system: string;
2532
+ fallback?: string | undefined;
2533
+ hotReload?: boolean | undefined;
2534
+ variables?: {
2535
+ name: string;
2536
+ value: string;
2537
+ }[] | undefined;
2538
+ };
2539
+ mcp?: {
2540
+ servers: {
2541
+ name: string;
2542
+ transport: "stdio" | "sse" | "http";
2543
+ command?: string | undefined;
2544
+ args?: string[] | undefined;
2545
+ url?: string | undefined;
2546
+ env?: Record<string, string> | undefined;
2547
+ healthCheck?: {
2548
+ timeoutSeconds?: number | undefined;
2549
+ } | undefined;
2550
+ }[];
2551
+ } | undefined;
2552
+ observability?: {
2553
+ metrics?: {
2554
+ backend: "datadog" | "opentelemetry" | "prometheus";
2555
+ endpoint?: string | undefined;
2556
+ serviceName?: string | undefined;
2557
+ } | undefined;
2558
+ tracing?: {
2559
+ backend: "langsmith" | "langfuse" | "agentops" | "otel" | "honeycomb" | "datadog";
2560
+ endpoint?: string | undefined;
2561
+ publicKey?: string | undefined;
2562
+ secretKey?: string | undefined;
2563
+ sampleRate?: number | undefined;
2564
+ } | undefined;
2565
+ logging?: {
2566
+ level?: "warn" | "debug" | "info" | "error" | undefined;
2567
+ structured?: boolean | undefined;
2568
+ redactFields?: string[] | undefined;
2569
+ } | undefined;
2570
+ } | undefined;
2571
+ tools?: {
2572
+ name: string;
2573
+ description: string;
2574
+ type: "function" | "mcp" | "builtin";
2575
+ function?: string | undefined;
2576
+ module?: string | undefined;
2577
+ annotations?: {
2578
+ readOnlyHint?: boolean | undefined;
2579
+ destructiveHint?: boolean | undefined;
2580
+ idempotentHint?: boolean | undefined;
2581
+ openWorldHint?: boolean | undefined;
2582
+ } | undefined;
2583
+ }[] | undefined;
2584
+ memory?: {
2585
+ shortTerm?: {
2586
+ backend: "in-memory" | "redis" | "sqlite";
2587
+ maxTokens?: number | undefined;
2588
+ maxTurns?: number | undefined;
2589
+ ttlSeconds?: number | undefined;
2590
+ connection?: string | undefined;
2591
+ } | undefined;
2592
+ longTerm?: {
2593
+ backend: "sqlite" | "postgres" | "mongodb";
2594
+ connectionString: string;
2595
+ table?: string | undefined;
2596
+ ttlDays?: number | undefined;
2597
+ } | undefined;
2598
+ vector?: {
2599
+ backend: "pgvector" | "pinecone" | "weaviate" | "qdrant" | "chroma";
2600
+ dimension: number;
2601
+ apiKey?: string | undefined;
2602
+ connectionString?: string | undefined;
2603
+ topK?: number | undefined;
2604
+ namespace?: string | undefined;
2605
+ } | undefined;
2606
+ hygiene?: {
2607
+ piiScrubFields?: string[] | undefined;
2608
+ auditLog?: boolean | undefined;
2609
+ retentionPolicy?: string | undefined;
2610
+ } | undefined;
2611
+ } | undefined;
2612
+ subagents?: {
2613
+ name: string;
2614
+ ref: {
2615
+ agentspec: string;
2616
+ } | {
2617
+ a2a: {
2618
+ url: string;
2619
+ auth?: {
2620
+ type: "bearer" | "apikey" | "none";
2621
+ token?: string | undefined;
2622
+ header?: string | undefined;
2623
+ } | undefined;
2624
+ };
2625
+ };
2626
+ invocation: "parallel" | "sequential" | "on-demand";
2627
+ passContext?: boolean | undefined;
2628
+ triggerKeywords?: string[] | undefined;
2629
+ }[] | undefined;
2630
+ api?: {
2631
+ type: "mcp" | "rest" | "grpc" | "websocket";
2632
+ auth?: {
2633
+ type: "jwt" | "apikey" | "none" | "oauth2";
2634
+ header?: string | undefined;
2635
+ jwksUri?: string | undefined;
2636
+ } | undefined;
2637
+ streaming?: boolean | undefined;
2638
+ port?: number | undefined;
2639
+ pathPrefix?: string | undefined;
2640
+ rateLimit?: {
2641
+ requestsPerMinute?: number | undefined;
2642
+ requestsPerHour?: number | undefined;
2643
+ } | undefined;
2644
+ healthEndpoint?: string | undefined;
2645
+ metricsEndpoint?: string | undefined;
2646
+ corsOrigins?: string[] | undefined;
2647
+ chatEndpoint?: {
2648
+ path?: string | undefined;
2649
+ protocol?: "custom" | "openai-compatible" | undefined;
2650
+ streaming?: boolean | undefined;
2651
+ sessionMode?: "stateful" | "stateless" | undefined;
2652
+ threadIdHeader?: string | undefined;
2653
+ } | undefined;
2654
+ } | undefined;
2655
+ skills?: {
2656
+ id: string;
2657
+ version?: string | undefined;
2658
+ }[] | undefined;
2659
+ guardrails?: {
2660
+ input?: ({
2661
+ type: "topic-filter";
2662
+ blockedTopics: string[];
2663
+ action: "reject" | "warn" | "log";
2664
+ message?: string | undefined;
2665
+ } | {
2666
+ type: "pii-detector";
2667
+ action: "reject" | "warn" | "scrub";
2668
+ fields?: string[] | undefined;
2669
+ } | {
2670
+ type: "prompt-injection";
2671
+ action: "reject" | "warn";
2672
+ sensitivity?: "low" | "medium" | "high" | undefined;
2673
+ } | {
2674
+ function: string;
2675
+ type: "custom";
2676
+ module: string;
2677
+ action: "reject" | "warn" | "log";
2678
+ })[] | undefined;
2679
+ output?: ({
2680
+ type: "hallucination-detector";
2681
+ action: "reject" | "warn" | "retry";
2682
+ threshold: number;
2683
+ maxRetries?: number | undefined;
2684
+ } | {
2685
+ type: "toxicity-filter";
2686
+ action: "reject" | "warn";
2687
+ threshold: number;
2688
+ } | {
2689
+ type: "pii-detector";
2690
+ action: "reject" | "warn" | "scrub";
2691
+ fields?: string[] | undefined;
2692
+ } | {
2693
+ function: string;
2694
+ type: "custom";
2695
+ module: string;
2696
+ action: "reject" | "warn" | "log";
2697
+ })[] | undefined;
2698
+ } | undefined;
2699
+ humanInTheLoop?: {
2700
+ timeoutSeconds?: number | undefined;
2701
+ enabled?: boolean | undefined;
2702
+ approvalRequired?: ("before-destructive-tool" | "before-external-call" | "on-low-confidence" | "on-high-cost" | "always")[] | undefined;
2703
+ timeoutAction?: "reject" | "proceed" | "escalate" | undefined;
2704
+ notifyVia?: ("email" | "slack" | "webhook" | "console")[] | undefined;
2705
+ webhookUrl?: string | undefined;
2706
+ } | undefined;
2707
+ evaluation?: {
2708
+ framework: "custom" | "deepeval" | "braintrust" | "langsmith" | "ragas";
2709
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
2710
+ datasets?: {
2711
+ name: string;
2712
+ path: string;
2713
+ metrics?: ("custom" | "faithfulness" | "answer_relevancy" | "answer_similarity" | "hallucination" | "toxicity" | "context_precision" | "context_recall" | "bias")[] | undefined;
2714
+ }[] | undefined;
2715
+ thresholds?: Record<string, number> | undefined;
2716
+ ciGate?: boolean | undefined;
2717
+ } | undefined;
2718
+ compliance?: {
2719
+ packs?: ("owasp-llm-top10" | "memory-hygiene" | "model-resilience" | "evaluation-coverage" | "observability")[] | undefined;
2720
+ suppressions?: {
2721
+ rule: string;
2722
+ reason: string;
2723
+ approvedBy?: string | undefined;
2724
+ expires?: string | undefined;
2725
+ }[] | undefined;
2726
+ auditSchedule?: "daily" | "weekly" | "monthly" | "on-change" | undefined;
2727
+ } | undefined;
2728
+ requires?: {
2729
+ envVars?: string[] | undefined;
2730
+ services?: {
2731
+ type: "redis" | "postgres" | "mongodb" | "mysql" | "elasticsearch";
2732
+ connection: string;
2733
+ }[] | undefined;
2734
+ minimumMemoryMB?: number | undefined;
2735
+ nodeVersion?: string | undefined;
2736
+ pythonVersion?: string | undefined;
2737
+ } | undefined;
2738
+ };
2739
+ }>;
2740
+ type AgentSpecManifest = z.infer<typeof ManifestSchema>;
2741
+ type AgentSpecMetadata = z.infer<typeof MetadataSchema>;
2742
+ type AgentSpecModel = z.infer<typeof ModelSchema>;
2743
+ type AgentSpecPrompts = z.infer<typeof PromptsSchema>;
2744
+ type AgentSpecTool = z.infer<typeof ToolSchema>;
2745
+ type AgentSpecMcpServer = z.infer<typeof McpServerSchema>;
2746
+ type AgentSpecMemory = z.infer<typeof MemorySchema>;
2747
+ type AgentSpecGuardrails = z.infer<typeof GuardrailsSchema>;
2748
+ type AgentSpecHumanInTheLoop = z.infer<typeof HumanInTheLoopSchema>;
2749
+ type AgentSpecChatEndpoint = z.infer<typeof ChatEndpointSchema>;
2750
+ type AgentSpecEvaluation = z.infer<typeof EvaluationSchema>;
2751
+ type AgentSpecObservability = z.infer<typeof ObservabilitySchema>;
2752
+ type AgentSpecCompliance = z.infer<typeof ComplianceSchema>;
2753
+ type AgentSpecRequires = z.infer<typeof RequiresSchema>;
2754
+
2755
+ /**
2756
+ * Export the AgentSpec manifest as a JSON Schema.
2757
+ * Used for IDE autocompletion and editor validation.
2758
+ */
2759
+ declare function exportJsonSchema(): object;
2760
+
2761
+ type SecretBackend = 'env' | 'vault' | 'aws' | 'gcp' | 'azure';
2762
+ interface ResolverOptions {
2763
+ /** Directory where agent.yaml lives — used to resolve $file: paths */
2764
+ baseDir: string;
2765
+ /** Override the secret backend (default: AGENTSPEC_SECRET_BACKEND || 'env') */
2766
+ secretBackend?: SecretBackend;
2767
+ /** If true, throw on missing $env vars. Default: true */
2768
+ failOnMissingEnv?: boolean;
2769
+ }
2770
+ type RefType = 'env' | 'secret' | 'file' | 'func' | 'literal';
2771
+ declare function detectRefType(value: string): RefType;
2772
+ /**
2773
+ * Resolve a single reference value.
2774
+ * Returns the resolved string or null if optional and missing.
2775
+ */
2776
+ declare function resolveRef(value: string, opts: ResolverOptions, { optional }?: {
2777
+ optional?: boolean;
2778
+ }): string;
2779
+ /**
2780
+ * Deeply walk a parsed YAML object and resolve all reference strings.
2781
+ * Returns a new object with all $ref values replaced.
2782
+ */
2783
+ declare function resolveRefs(obj: unknown, opts: ResolverOptions): unknown;
2784
+ /**
2785
+ * Collect all $env: references from the raw manifest for health-check reporting.
2786
+ * Does NOT resolve them — just lists which env vars are referenced.
2787
+ */
2788
+ declare function collectEnvRefs(obj: unknown, refs?: Set<string>): Set<string>;
2789
+ /**
2790
+ * Collect all $file: references from the raw manifest.
2791
+ */
2792
+ declare function collectFileRefs(obj: unknown, refs?: Set<string>): Set<string>;
2793
+
2794
+ interface LoadOptions {
2795
+ /**
2796
+ * Whether to resolve $env:, $secret:, $file:, $func: references.
2797
+ * Default: false — validation only, no I/O side effects.
2798
+ */
2799
+ resolve?: boolean;
2800
+ /**
2801
+ * Override secret backend. Default: process.env.AGENTSPEC_SECRET_BACKEND || 'env'
2802
+ */
2803
+ secretBackend?: ResolverOptions['secretBackend'];
2804
+ /**
2805
+ * Fail on missing env vars during resolution. Default: true
2806
+ */
2807
+ failOnMissingEnv?: boolean;
2808
+ }
2809
+ interface ParsedManifest {
2810
+ /** The validated manifest (references NOT resolved unless opts.resolve=true) */
2811
+ manifest: AgentSpecManifest;
2812
+ /** Absolute path to the agent.yaml file */
2813
+ filePath: string;
2814
+ /** Directory containing agent.yaml — base for $file: resolution */
2815
+ baseDir: string;
2816
+ /** Raw YAML string */
2817
+ raw: string;
2818
+ }
2819
+ /**
2820
+ * Load and validate an agent.yaml manifest.
2821
+ *
2822
+ * @param filePath - absolute or relative path to agent.yaml
2823
+ * @param opts - loading options
2824
+ * @throws ZodError if the manifest fails validation
2825
+ * @throws Error if the file cannot be read or references cannot be resolved
2826
+ */
2827
+ declare function loadManifest(filePath: string, opts?: LoadOptions): ParsedManifest;
2828
+ /**
2829
+ * Same as loadManifest but returns a Result instead of throwing.
2830
+ */
2831
+ declare function tryLoadManifest(filePath: string, opts?: LoadOptions): {
2832
+ ok: true;
2833
+ data: ParsedManifest;
2834
+ } | {
2835
+ ok: false;
2836
+ error: Error;
2837
+ };
2838
+
2839
+ interface Migration {
2840
+ from: string;
2841
+ to: string;
2842
+ migrate(raw: Record<string, unknown>): Record<string, unknown>;
2843
+ }
2844
+ declare const LATEST_API_VERSION = "agentspec.io/v1";
2845
+ declare function migrateManifest(raw: Record<string, unknown>): {
2846
+ result: Record<string, unknown>;
2847
+ migrationsApplied: string[];
2848
+ };
2849
+ declare function detectVersion(raw: Record<string, unknown>): string;
2850
+ declare function isLatestVersion(raw: Record<string, unknown>): boolean;
2851
+
2852
+ type CheckStatus = 'pass' | 'fail' | 'warn' | 'skip';
2853
+ type CheckSeverity = 'error' | 'warning' | 'info';
2854
+ interface HealthCheck {
2855
+ id: string;
2856
+ category: 'env' | 'file' | 'model' | 'model-fallback' | 'mcp' | 'memory' | 'subagent' | 'eval' | 'service' | 'tool';
2857
+ status: CheckStatus;
2858
+ severity: CheckSeverity;
2859
+ latencyMs?: number;
2860
+ message?: string;
2861
+ remediation?: string;
2862
+ }
2863
+ type HealthStatus = 'healthy' | 'degraded' | 'unhealthy';
2864
+ interface HealthReport {
2865
+ agentName: string;
2866
+ timestamp: string;
2867
+ status: HealthStatus;
2868
+ summary: {
2869
+ passed: number;
2870
+ failed: number;
2871
+ warnings: number;
2872
+ skipped: number;
2873
+ };
2874
+ checks: HealthCheck[];
2875
+ }
2876
+ interface HealthCheckOptions {
2877
+ /** Run model API reachability checks (makes HTTP requests). Default: true */
2878
+ checkModel?: boolean;
2879
+ /** Run MCP server checks. Default: true */
2880
+ checkMcp?: boolean;
2881
+ /** Run memory backend checks. Default: true */
2882
+ checkMemory?: boolean;
2883
+ /** Run spec.requires.services TCP connectivity checks. Default: true */
2884
+ checkServices?: boolean;
2885
+ /** Override base directory for $file resolution */
2886
+ baseDir?: string;
2887
+ /** Raw parsed YAML object (for $env/$file ref collection) */
2888
+ rawManifest?: unknown;
2889
+ }
2890
+ declare function runHealthCheck(manifest: AgentSpecManifest, opts?: HealthCheckOptions): Promise<HealthReport>;
2891
+
2892
+ type RuleSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info';
2893
+ /** Canonical severity type shared across packages. Alias of RuleSeverity. */
2894
+ type Severity = RuleSeverity;
2895
+ type CompliancePack = 'owasp-llm-top10' | 'model-resilience' | 'memory-hygiene' | 'evaluation-coverage' | 'observability';
2896
+ type EvidenceLevel = 'declarative' | 'probed' | 'behavioral' | 'external';
2897
+ interface RuleResult {
2898
+ pass: boolean;
2899
+ message?: string;
2900
+ path?: string;
2901
+ recommendation?: string;
2902
+ references?: string[];
2903
+ }
2904
+ interface AuditRule {
2905
+ id: string;
2906
+ pack: CompliancePack;
2907
+ title: string;
2908
+ description: string;
2909
+ severity: RuleSeverity;
2910
+ /** What kind of evidence supports this rule's verdict */
2911
+ evidenceLevel: EvidenceLevel;
2912
+ /**
2913
+ * Human-readable name of the external tool that can prove this rule.
2914
+ * Defined for 'external' evidence level rules; optional on 'probed'.
2915
+ */
2916
+ proofTool?: string;
2917
+ /** URL to integration guide or documentation for the proof tool */
2918
+ proofToolUrl?: string;
2919
+ check(manifest: AgentSpecManifest): RuleResult;
2920
+ }
2921
+ interface AuditViolation {
2922
+ ruleId: string;
2923
+ severity: RuleSeverity;
2924
+ title: string;
2925
+ message: string;
2926
+ path?: string;
2927
+ recommendation?: string;
2928
+ references?: string[];
2929
+ /** What kind of evidence supports this violation */
2930
+ evidenceLevel: EvidenceLevel;
2931
+ /** Proof tool recommendation (for 'external' rules) */
2932
+ proofTool?: string;
2933
+ /** Proof tool URL (for 'external' rules) */
2934
+ proofToolUrl?: string;
2935
+ }
2936
+ interface EvidenceBreakdown {
2937
+ declarative: {
2938
+ passed: number;
2939
+ total: number;
2940
+ };
2941
+ probed: {
2942
+ passed: number;
2943
+ total: number;
2944
+ };
2945
+ behavioral: {
2946
+ passed: number;
2947
+ total: number;
2948
+ };
2949
+ external: {
2950
+ passed: number;
2951
+ total: number;
2952
+ };
2953
+ }
2954
+ /** A proof record submitted by an external tool to the sidecar's /proof endpoint */
2955
+ interface ProofRecord {
2956
+ ruleId: string;
2957
+ verifiedAt: string;
2958
+ verifiedBy: string;
2959
+ method: string;
2960
+ expiresAt?: string;
2961
+ }
2962
+ interface AuditReport {
2963
+ agentName: string;
2964
+ timestamp: string;
2965
+ overallScore: number;
2966
+ grade: 'A' | 'B' | 'C' | 'D' | 'F';
2967
+ categoryScores: Record<string, number>;
2968
+ violations: AuditViolation[];
2969
+ suppressions: SuppressionRecord[];
2970
+ passedRules: number;
2971
+ totalRules: number;
2972
+ packBreakdown: Record<CompliancePack, {
2973
+ passed: number;
2974
+ total: number;
2975
+ }>;
2976
+ evidenceBreakdown: EvidenceBreakdown;
2977
+ /**
2978
+ * Score based only on proved rules (probed + behavioral + external with proof records).
2979
+ * Only present when proofRecords are provided to runAudit (e.g. via --url flag).
2980
+ */
2981
+ provedScore?: number;
2982
+ /** Grade corresponding to provedScore */
2983
+ provedGrade?: 'A' | 'B' | 'C' | 'D' | 'F';
2984
+ /** Number of 'external' rules that pass declaratively but lack a proof record */
2985
+ pendingProofCount?: number;
2986
+ }
2987
+ interface SuppressionRecord {
2988
+ ruleId: string;
2989
+ reason: string;
2990
+ approvedBy?: string;
2991
+ expires?: string;
2992
+ }
2993
+ interface AuditOptions {
2994
+ /** Run only rules from these packs. Default: all */
2995
+ packs?: CompliancePack[];
2996
+ /** Include rules from the manifest's compliance.packs. Default: true */
2997
+ useManifestPacks?: boolean;
2998
+ /**
2999
+ * Proof records fetched from the sidecar's GET /proof endpoint.
3000
+ * When provided, provedScore and pendingProofCount are computed.
3001
+ */
3002
+ proofRecords?: ProofRecord[];
3003
+ }
3004
+ /** Set of all valid audit rule IDs — single source of truth for validation. */
3005
+ declare const AUDIT_RULE_IDS: ReadonlySet<string>;
3006
+ /** Type guard: returns true if `r` is a structurally valid ProofRecord. */
3007
+ declare function isProofRecord(r: unknown): r is ProofRecord;
3008
+ declare function scoreToGrade(score: number): 'A' | 'B' | 'C' | 'D' | 'F';
3009
+ declare function runAudit(manifest: AgentSpecManifest, opts?: AuditOptions): AuditReport;
3010
+
3011
+ interface GeneratedAgent {
3012
+ framework: string;
3013
+ files: Record<string, string>;
3014
+ installCommands: string[];
3015
+ envVars: string[];
3016
+ readme: string;
3017
+ }
3018
+ interface FrameworkAdapter<TOptions = unknown> {
3019
+ framework: string;
3020
+ version: string;
3021
+ generate(manifest: AgentSpecManifest, options?: TOptions): GeneratedAgent;
3022
+ }
3023
+ /**
3024
+ * Register a framework adapter.
3025
+ * Called by adapter packages (e.g. @agentspec/adapter-langgraph) via side-effect import.
3026
+ */
3027
+ declare function registerAdapter(adapter: FrameworkAdapter): void;
3028
+ /**
3029
+ * Get a registered adapter by framework name.
3030
+ */
3031
+ declare function getAdapter(framework: string): FrameworkAdapter | undefined;
3032
+ /**
3033
+ * List all registered frameworks.
3034
+ */
3035
+ declare function listAdapters(): string[];
3036
+ /**
3037
+ * Generate framework-specific agent code from a manifest.
3038
+ *
3039
+ * @throws Error if the framework adapter is not registered
3040
+ */
3041
+ declare function generateAdapter(manifest: AgentSpecManifest, framework: string, options?: unknown): GeneratedAgent;
3042
+
3043
+ /**
3044
+ * PushModeOptions — configuration for AgentSpecReporter.startPushMode().
3045
+ *
3046
+ * Two env vars are enough to activate push mode:
3047
+ * AGENTSPEC_URL=https://control-plane.agentspec.io
3048
+ * AGENTSPEC_KEY=<key from agentspec register>
3049
+ */
3050
+ interface PushModeOptions {
3051
+ /** Control plane base URL, e.g. https://control-plane.agentspec.io */
3052
+ controlPlaneUrl: string;
3053
+ /** Bearer token obtained from `agentspec register` or POST /api/v1/register */
3054
+ apiKey: string;
3055
+ /** Heartbeat interval in seconds. Default: 30 */
3056
+ intervalSeconds?: number;
3057
+ /** Called on HTTP errors or network failures. Push mode stays active. */
3058
+ onError?: (err: Error) => void;
3059
+ }
3060
+
3061
+ /**
3062
+ * AgentSpecReporter — agent-side SDK module.
3063
+ *
3064
+ * Runs live health checks (model, MCP, memory, services) inside the agent
3065
+ * process where full connectivity is available. Caches the result with a
3066
+ * configurable TTL and exposes it via a standard HTTP handler mounted at
3067
+ * GET /agentspec/health.
3068
+ *
3069
+ * Usage (Fastify):
3070
+ * const reporter = new AgentSpecReporter(manifest, { refreshIntervalMs: 30_000 })
3071
+ * reporter.start()
3072
+ * await app.register(agentSpecFastifyPlugin(reporter))
3073
+ *
3074
+ * Usage (Express):
3075
+ * const reporter = new AgentSpecReporter(manifest)
3076
+ * reporter.start()
3077
+ * app.use('/agentspec', agentSpecExpressRouter(reporter))
3078
+ */
3079
+
3080
+ interface ReporterOptions {
3081
+ /**
3082
+ * How often to refresh health checks in the background.
3083
+ * Default: 30_000 ms (30 seconds)
3084
+ */
3085
+ refreshIntervalMs?: number;
3086
+ /**
3087
+ * Maximum age before a cached result is considered stale and triggers a
3088
+ * synchronous refresh on the next getReport() call.
3089
+ * Default: 60_000 ms (60 seconds)
3090
+ */
3091
+ staleAfterMs?: number;
3092
+ }
3093
+ declare class AgentSpecReporter {
3094
+ private readonly manifest;
3095
+ private readonly opts;
3096
+ private cached;
3097
+ private timer;
3098
+ private _pushTimer;
3099
+ private readonly refreshIntervalMs;
3100
+ private readonly staleAfterMs;
3101
+ private refreshing;
3102
+ private stopped;
3103
+ private readonly registeredTools;
3104
+ constructor(manifest: AgentSpecManifest, opts?: ReporterOptions);
3105
+ /**
3106
+ * Register a tool handler by name.
3107
+ * Only registered tools report status: 'pass' in the live health check.
3108
+ * Declared tools that are not registered report status: 'fail'.
3109
+ *
3110
+ * Call this once per tool after wiring up your tool handlers:
3111
+ * reporter.registerTool('search-arxiv', handler)
3112
+ *
3113
+ * The handler argument is accepted but not called — it is retained solely so
3114
+ * callers can pass the real function object for documentation purposes.
3115
+ */
3116
+ registerTool(name: string, _handler?: unknown): void;
3117
+ /**
3118
+ * Start background refresh. Call once during app startup.
3119
+ * The first refresh runs immediately (non-blocking).
3120
+ */
3121
+ start(): void;
3122
+ /**
3123
+ * Stop background refresh. Call during graceful shutdown.
3124
+ * After stop(), getReport() will no longer trigger new checks.
3125
+ */
3126
+ stop(): void;
3127
+ /**
3128
+ * Returns the cached HealthReport.
3129
+ * If no cached result exists or the cache is stale, runs checks synchronously.
3130
+ * After stop() is called, returns the last cached result (no new checks run).
3131
+ */
3132
+ getReport(): Promise<HealthReport>;
3133
+ /**
3134
+ * Standard HTTP handler. Mount at GET /agentspec/health.
3135
+ * Returns 200 with the HealthReport as JSON.
3136
+ *
3137
+ * Compatible with any framework that accepts (req, res) handlers
3138
+ * with res.status() and res.json().
3139
+ */
3140
+ httpHandler(): (req: unknown, res: {
3141
+ json(body: unknown): void;
3142
+ status(code: number): {
3143
+ json(body: unknown): void;
3144
+ };
3145
+ }) => Promise<void>;
3146
+ /**
3147
+ * Start sending heartbeats to the control plane.
3148
+ * Fires immediately, then repeats every `intervalSeconds` (default 30).
3149
+ * Idempotent — calling twice does not create a second timer.
3150
+ */
3151
+ startPushMode(opts: PushModeOptions): void;
3152
+ private _pushHeartbeat;
3153
+ /** Stop sending heartbeats to the control plane. */
3154
+ stopPushMode(): void;
3155
+ /** Returns true if heartbeats are currently being sent. */
3156
+ isPushModeActive(): boolean;
3157
+ private refresh;
3158
+ }
3159
+
3160
+ /**
3161
+ * Fastify plugin adapter for AgentSpecReporter.
3162
+ *
3163
+ * Registers GET /agentspec/health on the Fastify instance.
3164
+ *
3165
+ * Usage:
3166
+ * import { AgentSpecReporter } from '@agentspec/sdk'
3167
+ * import { agentSpecFastifyPlugin } from '@agentspec/sdk/agent/adapters/fastify'
3168
+ *
3169
+ * const reporter = new AgentSpecReporter(manifest, { refreshIntervalMs: 30_000 })
3170
+ * reporter.start()
3171
+ * await app.register(agentSpecFastifyPlugin(reporter))
3172
+ */
3173
+
3174
+ type FastifyReply = {
3175
+ status(code: number): FastifyReply;
3176
+ send(body: unknown): void;
3177
+ };
3178
+ type FastifyRequest = unknown;
3179
+ type FastifyInstance = {
3180
+ get(path: string, handler: (req: FastifyRequest, reply: FastifyReply) => Promise<void>): void;
3181
+ };
3182
+ type FastifyPluginAsync = (app: FastifyInstance) => Promise<void>;
3183
+ /**
3184
+ * Returns a Fastify plugin that registers the AgentSpec health endpoint.
3185
+ *
3186
+ * @param reporter - An AgentSpecReporter instance (should be started before registering)
3187
+ */
3188
+ declare function agentSpecFastifyPlugin(reporter: AgentSpecReporter): FastifyPluginAsync;
3189
+
3190
+ /**
3191
+ * Express middleware adapter for AgentSpecReporter.
3192
+ *
3193
+ * Returns a plain Express middleware (req, res, next) that handles
3194
+ * GET /health relative to the mount point.
3195
+ *
3196
+ * Usage:
3197
+ * import { AgentSpecReporter } from '@agentspec/sdk'
3198
+ * import { agentSpecExpressRouter } from '@agentspec/sdk/agent/adapters/express'
3199
+ *
3200
+ * const reporter = new AgentSpecReporter(manifest)
3201
+ * reporter.start()
3202
+ * app.use('/agentspec', agentSpecExpressRouter(reporter))
3203
+ *
3204
+ * The middleware also exposes a ._routes array for introspection in tests.
3205
+ */
3206
+
3207
+ type ExpressRequest = {
3208
+ method?: string;
3209
+ path?: string;
3210
+ url?: string;
3211
+ };
3212
+ type ExpressResponse = {
3213
+ status(code: number): ExpressResponse;
3214
+ json(body: unknown): void;
3215
+ };
3216
+ type NextFunction = (err?: unknown) => void;
3217
+ type ExpressMiddleware = (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => void;
3218
+ /**
3219
+ * Creates an Express-compatible middleware that serves the AgentSpec health
3220
+ * endpoint at GET /health (relative to where it is mounted).
3221
+ *
3222
+ * Mount at /agentspec to expose GET /agentspec/health.
3223
+ *
3224
+ * @param reporter - An AgentSpecReporter instance (should be started before use)
3225
+ * @returns A plain Express middleware function (compatible with app.use())
3226
+ */
3227
+ declare function agentSpecExpressRouter(reporter: AgentSpecReporter): ExpressMiddleware & {
3228
+ _routes: Array<{
3229
+ path: string;
3230
+ }>;
3231
+ };
3232
+
3233
+ /**
3234
+ * service.check.ts — TCP port reachability checks for spec.requires.services.
3235
+ *
3236
+ * Uses raw TCP connections (node:net) — no Redis/Postgres drivers required.
3237
+ * Resolves connection strings from environment variables when necessary.
3238
+ *
3239
+ * Design: fail-safe. If a connection string references an unresolved $env: var,
3240
+ * the check returns 'skip' rather than 'fail' (the env check will surface the
3241
+ * underlying problem).
3242
+ *
3243
+ * Security: link-local (169.254.x.x) and loopback (127.x.x.x, ::1) addresses
3244
+ * are always rejected to prevent unintentional SSRF in container deployments.
3245
+ */
3246
+
3247
+ interface ServiceSpec {
3248
+ type: string;
3249
+ connection: string;
3250
+ }
3251
+ /**
3252
+ * Runs TCP connectivity checks for all declared services.
3253
+ * Returns one HealthCheck per service entry.
3254
+ */
3255
+ declare function runServiceChecks(services: ServiceSpec[]): Promise<HealthCheck[]>;
3256
+
3257
+ export { AUDIT_RULE_IDS, type AgentSpecChatEndpoint, type AgentSpecCompliance, type AgentSpecEvaluation, type AgentSpecGuardrails, type AgentSpecHumanInTheLoop, type AgentSpecManifest, type AgentSpecMcpServer, type AgentSpecMemory, type AgentSpecMetadata, type AgentSpecModel, type AgentSpecObservability, type AgentSpecPrompts, AgentSpecReporter, type AgentSpecRequires, type AgentSpecTool, type AuditOptions, type AuditReport, type AuditRule, type AuditViolation, type CheckSeverity, type CheckStatus, type CompliancePack, type EvidenceBreakdown, type EvidenceLevel, type FrameworkAdapter, type GeneratedAgent, type HealthCheck, type HealthCheckOptions, type HealthReport, type HealthStatus, LATEST_API_VERSION, type LoadOptions, ManifestSchema, type Migration, type ParsedManifest, type ProofRecord, type PushModeOptions, type RefType, type ReporterOptions, type ResolverOptions, type RuleResult, type RuleSeverity, type SecretBackend, type Severity, type SuppressionRecord, agentSpecExpressRouter, agentSpecFastifyPlugin, collectEnvRefs, collectFileRefs, detectRefType, detectVersion, exportJsonSchema, generateAdapter, getAdapter, isLatestVersion, isProofRecord, listAdapters, loadManifest, migrateManifest, registerAdapter, resolveRef, resolveRefs, runAudit, runHealthCheck, runServiceChecks, scoreToGrade, tryLoadManifest };