agent-def 0.0.1

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,1545 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Group definition
4
+ *
5
+ * Represents a flexible organizational unit that an agent can belong to.
6
+ * Groups can represent teams, projects, clusters, departments, or any arbitrary
7
+ * organizational structure.
8
+ *
9
+ * @example
10
+ * // Simple team group
11
+ * { id: "team:backend", properties: { role: "lead", tier: "senior" } }
12
+ *
13
+ * @example
14
+ * // Project group
15
+ * { id: "project:api-v2", properties: { status: "active", priority: 1 } }
16
+ *
17
+ * @example
18
+ * // Cluster group
19
+ * { id: "cluster:production-us-east", properties: { region: "us-east-1" } }
20
+ */
21
+ export declare const GroupSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ id: string;
26
+ properties?: Record<string, unknown> | undefined;
27
+ }, {
28
+ id: string;
29
+ properties?: Record<string, unknown> | undefined;
30
+ }>;
31
+ export type Group = z.infer<typeof GroupSchema>;
32
+ /**
33
+ * Agent definition schema
34
+ *
35
+ * The core specification for an Artinet agent, defining its identity, capabilities,
36
+ * organizational membership, and behavior. This schema is designed to be portable
37
+ * and can be serialized in agent.md files with YAML frontmatter.
38
+ *
39
+ * @example
40
+ * ```yaml
41
+ * ---
42
+ * id: backend-architect
43
+ * name: Backend System Architect
44
+ * description: Design RESTful APIs and microservice architectures
45
+ * model: openai/gpt-4
46
+ * version: "1.0.0"
47
+ * toolIds:
48
+ * - filesystem
49
+ * - database-analyzer
50
+ * groupIds:
51
+ * - team:backend
52
+ * - project:api-v2
53
+ * agentIds:
54
+ * - database-specialist
55
+ * - security-auditor
56
+ * instructions: |
57
+ * You are a backend system architect specializing in scalable API design...
58
+ * ---
59
+ * ```
60
+ */
61
+ export declare const AgentDefinitionSchema: z.ZodObject<{
62
+ name: z.ZodString;
63
+ url: z.ZodOptional<z.ZodString>;
64
+ description: z.ZodString;
65
+ version: z.ZodString;
66
+ security: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>, "many">>;
67
+ protocolVersion: z.ZodOptional<z.ZodDefault<z.ZodString>>;
68
+ preferredTransport: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["JSONRPC", "GRPC", "HTTP+JSON"]>, z.ZodString]>>;
69
+ additionalInterfaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
+ url: z.ZodString;
71
+ transport: z.ZodUnion<[z.ZodEnum<["JSONRPC", "GRPC", "HTTP+JSON"]>, z.ZodString]>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ url: string;
74
+ transport: string;
75
+ }, {
76
+ url: string;
77
+ transport: string;
78
+ }>, "many">>;
79
+ iconUrl: z.ZodOptional<z.ZodString>;
80
+ provider: z.ZodOptional<z.ZodObject<{
81
+ organization: z.ZodString;
82
+ url: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ url: string;
85
+ organization: string;
86
+ }, {
87
+ url: string;
88
+ organization: string;
89
+ }>>;
90
+ documentationUrl: z.ZodOptional<z.ZodString>;
91
+ capabilities: z.ZodOptional<z.ZodObject<{
92
+ streaming: z.ZodOptional<z.ZodBoolean>;
93
+ pushNotifications: z.ZodOptional<z.ZodBoolean>;
94
+ stateTransitionHistory: z.ZodOptional<z.ZodBoolean>;
95
+ extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
+ uri: z.ZodString;
97
+ description: z.ZodOptional<z.ZodString>;
98
+ required: z.ZodOptional<z.ZodBoolean>;
99
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
100
+ }, "strip", z.ZodTypeAny, {
101
+ uri: string;
102
+ required?: boolean | undefined;
103
+ description?: string | undefined;
104
+ params?: Record<string, unknown> | undefined;
105
+ }, {
106
+ uri: string;
107
+ required?: boolean | undefined;
108
+ description?: string | undefined;
109
+ params?: Record<string, unknown> | undefined;
110
+ }>, "many">>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ extensions?: {
113
+ uri: string;
114
+ required?: boolean | undefined;
115
+ description?: string | undefined;
116
+ params?: Record<string, unknown> | undefined;
117
+ }[] | undefined;
118
+ streaming?: boolean | undefined;
119
+ pushNotifications?: boolean | undefined;
120
+ stateTransitionHistory?: boolean | undefined;
121
+ }, {
122
+ extensions?: {
123
+ uri: string;
124
+ required?: boolean | undefined;
125
+ description?: string | undefined;
126
+ params?: Record<string, unknown> | undefined;
127
+ }[] | undefined;
128
+ streaming?: boolean | undefined;
129
+ pushNotifications?: boolean | undefined;
130
+ stateTransitionHistory?: boolean | undefined;
131
+ }>>;
132
+ securitySchemes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
133
+ description: z.ZodOptional<z.ZodString>;
134
+ } & {
135
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "apiKey", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
136
+ in: z.ZodEnum<["query", "header", "cookie"]>;
137
+ name: z.ZodString;
138
+ }, "strip", z.ZodTypeAny, {
139
+ name: string;
140
+ type: "apiKey";
141
+ in: "header" | "query" | "cookie";
142
+ description?: string | undefined;
143
+ }, {
144
+ name: string;
145
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
146
+ in: "header" | "query" | "cookie";
147
+ description?: string | undefined;
148
+ }>, z.ZodObject<{
149
+ description: z.ZodOptional<z.ZodString>;
150
+ } & {
151
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "http", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
152
+ scheme: z.ZodString;
153
+ bearerFormat: z.ZodOptional<z.ZodString>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ type: "http";
156
+ scheme: string;
157
+ description?: string | undefined;
158
+ bearerFormat?: string | undefined;
159
+ }, {
160
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
161
+ scheme: string;
162
+ description?: string | undefined;
163
+ bearerFormat?: string | undefined;
164
+ }>, z.ZodObject<{
165
+ description: z.ZodOptional<z.ZodString>;
166
+ } & {
167
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "oauth2", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
168
+ flows: z.ZodObject<{
169
+ authorizationCode: z.ZodOptional<z.ZodObject<{
170
+ authorizationUrl: z.ZodString;
171
+ tokenUrl: z.ZodString;
172
+ refreshUrl: z.ZodOptional<z.ZodString>;
173
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ authorizationUrl: string;
176
+ tokenUrl: string;
177
+ scopes: Record<string, string>;
178
+ refreshUrl?: string | undefined;
179
+ }, {
180
+ authorizationUrl: string;
181
+ tokenUrl: string;
182
+ scopes: Record<string, string>;
183
+ refreshUrl?: string | undefined;
184
+ }>>;
185
+ clientCredentials: z.ZodOptional<z.ZodObject<{
186
+ tokenUrl: z.ZodString;
187
+ refreshUrl: z.ZodOptional<z.ZodString>;
188
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ tokenUrl: string;
191
+ scopes: Record<string, string>;
192
+ refreshUrl?: string | undefined;
193
+ }, {
194
+ tokenUrl: string;
195
+ scopes: Record<string, string>;
196
+ refreshUrl?: string | undefined;
197
+ }>>;
198
+ implicit: z.ZodOptional<z.ZodObject<{
199
+ authorizationUrl: z.ZodString;
200
+ refreshUrl: z.ZodOptional<z.ZodString>;
201
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
202
+ }, "strip", z.ZodTypeAny, {
203
+ authorizationUrl: string;
204
+ scopes: Record<string, string>;
205
+ refreshUrl?: string | undefined;
206
+ }, {
207
+ authorizationUrl: string;
208
+ scopes: Record<string, string>;
209
+ refreshUrl?: string | undefined;
210
+ }>>;
211
+ password: z.ZodOptional<z.ZodObject<{
212
+ tokenUrl: z.ZodString;
213
+ refreshUrl: z.ZodOptional<z.ZodString>;
214
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ tokenUrl: string;
217
+ scopes: Record<string, string>;
218
+ refreshUrl?: string | undefined;
219
+ }, {
220
+ tokenUrl: string;
221
+ scopes: Record<string, string>;
222
+ refreshUrl?: string | undefined;
223
+ }>>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ authorizationCode?: {
226
+ authorizationUrl: string;
227
+ tokenUrl: string;
228
+ scopes: Record<string, string>;
229
+ refreshUrl?: string | undefined;
230
+ } | undefined;
231
+ clientCredentials?: {
232
+ tokenUrl: string;
233
+ scopes: Record<string, string>;
234
+ refreshUrl?: string | undefined;
235
+ } | undefined;
236
+ implicit?: {
237
+ authorizationUrl: string;
238
+ scopes: Record<string, string>;
239
+ refreshUrl?: string | undefined;
240
+ } | undefined;
241
+ password?: {
242
+ tokenUrl: string;
243
+ scopes: Record<string, string>;
244
+ refreshUrl?: string | undefined;
245
+ } | undefined;
246
+ }, {
247
+ authorizationCode?: {
248
+ authorizationUrl: string;
249
+ tokenUrl: string;
250
+ scopes: Record<string, string>;
251
+ refreshUrl?: string | undefined;
252
+ } | undefined;
253
+ clientCredentials?: {
254
+ tokenUrl: string;
255
+ scopes: Record<string, string>;
256
+ refreshUrl?: string | undefined;
257
+ } | undefined;
258
+ implicit?: {
259
+ authorizationUrl: string;
260
+ scopes: Record<string, string>;
261
+ refreshUrl?: string | undefined;
262
+ } | undefined;
263
+ password?: {
264
+ tokenUrl: string;
265
+ scopes: Record<string, string>;
266
+ refreshUrl?: string | undefined;
267
+ } | undefined;
268
+ }>;
269
+ oauth2MetadataUrl: z.ZodOptional<z.ZodString>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ type: "oauth2";
272
+ flows: {
273
+ authorizationCode?: {
274
+ authorizationUrl: string;
275
+ tokenUrl: string;
276
+ scopes: Record<string, string>;
277
+ refreshUrl?: string | undefined;
278
+ } | undefined;
279
+ clientCredentials?: {
280
+ tokenUrl: string;
281
+ scopes: Record<string, string>;
282
+ refreshUrl?: string | undefined;
283
+ } | undefined;
284
+ implicit?: {
285
+ authorizationUrl: string;
286
+ scopes: Record<string, string>;
287
+ refreshUrl?: string | undefined;
288
+ } | undefined;
289
+ password?: {
290
+ tokenUrl: string;
291
+ scopes: Record<string, string>;
292
+ refreshUrl?: string | undefined;
293
+ } | undefined;
294
+ };
295
+ description?: string | undefined;
296
+ oauth2MetadataUrl?: string | undefined;
297
+ }, {
298
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
299
+ flows: {
300
+ authorizationCode?: {
301
+ authorizationUrl: string;
302
+ tokenUrl: string;
303
+ scopes: Record<string, string>;
304
+ refreshUrl?: string | undefined;
305
+ } | undefined;
306
+ clientCredentials?: {
307
+ tokenUrl: string;
308
+ scopes: Record<string, string>;
309
+ refreshUrl?: string | undefined;
310
+ } | undefined;
311
+ implicit?: {
312
+ authorizationUrl: string;
313
+ scopes: Record<string, string>;
314
+ refreshUrl?: string | undefined;
315
+ } | undefined;
316
+ password?: {
317
+ tokenUrl: string;
318
+ scopes: Record<string, string>;
319
+ refreshUrl?: string | undefined;
320
+ } | undefined;
321
+ };
322
+ description?: string | undefined;
323
+ oauth2MetadataUrl?: string | undefined;
324
+ }>, z.ZodObject<{
325
+ description: z.ZodOptional<z.ZodString>;
326
+ } & {
327
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "openIdConnect", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
328
+ openIdConnectUrl: z.ZodString;
329
+ }, "strip", z.ZodTypeAny, {
330
+ type: "openIdConnect";
331
+ openIdConnectUrl: string;
332
+ description?: string | undefined;
333
+ }, {
334
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
335
+ openIdConnectUrl: string;
336
+ description?: string | undefined;
337
+ }>, z.ZodObject<{
338
+ description: z.ZodOptional<z.ZodString>;
339
+ } & {
340
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "mutualTLS", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
341
+ }, "strip", z.ZodTypeAny, {
342
+ type: "mutualTLS";
343
+ description?: string | undefined;
344
+ }, {
345
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
346
+ description?: string | undefined;
347
+ }>]>>>;
348
+ defaultInputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
349
+ defaultOutputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
350
+ skills: z.ZodArray<z.ZodObject<{
351
+ id: z.ZodString;
352
+ name: z.ZodString;
353
+ description: z.ZodString;
354
+ tags: z.ZodArray<z.ZodString, "many">;
355
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
356
+ inputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
357
+ outputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
358
+ security: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>, "many">>;
359
+ }, "strip", z.ZodTypeAny, {
360
+ name: string;
361
+ id: string;
362
+ description: string;
363
+ tags: string[];
364
+ examples?: string[] | undefined;
365
+ inputModes?: string[] | undefined;
366
+ outputModes?: string[] | undefined;
367
+ security?: Record<string, string[]>[] | undefined;
368
+ }, {
369
+ name: string;
370
+ id: string;
371
+ description: string;
372
+ tags: string[];
373
+ examples?: string[] | undefined;
374
+ inputModes?: string[] | undefined;
375
+ outputModes?: string[] | undefined;
376
+ security?: Record<string, string[]>[] | undefined;
377
+ }>, "many">;
378
+ supportsAuthenticatedExtendedCard: z.ZodOptional<z.ZodBoolean>;
379
+ signatures: z.ZodOptional<z.ZodArray<z.ZodObject<{
380
+ protected: z.ZodString;
381
+ signature: z.ZodString;
382
+ header: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
383
+ }, "strip", z.ZodTypeAny, {
384
+ protected: string;
385
+ signature: string;
386
+ header?: Record<string, unknown> | undefined;
387
+ }, {
388
+ protected: string;
389
+ signature: string;
390
+ header?: Record<string, unknown> | undefined;
391
+ }>, "many">>;
392
+ } & {
393
+ /**
394
+ * Optional agent ID - will be generated if not provided
395
+ *
396
+ * Use kebab-case for consistency (e.g., 'backend-architect', 'code-reviewer')
397
+ */
398
+ id: z.ZodOptional<z.ZodString>;
399
+ /**
400
+ * Optional model specification
401
+ *
402
+ * Specifies the LLM model to use for this agent.
403
+ *
404
+ * @example "openai/gpt-4o-mini"
405
+ * @example "anthropic/claude-3-opus-20241022"
406
+ * @example "deepseek-ai/DeepSeek-R1"
407
+ */
408
+ modelId: z.ZodOptional<z.ZodString>;
409
+ /**
410
+ * Tool IDs that this agent can use
411
+ *
412
+ * A flexible list of tool identifiers that reference MCP servers, in-memory
413
+ * functions, or any other tool providers available in the runtime environment.
414
+ * Tools are resolved by the agent runtime based on these IDs.
415
+ *
416
+ * @example ["filesystem", "web-search", "code-analyzer"]
417
+ * @example ["mcp-server-git", "mcp-server-postgres", "custom-api-client"]
418
+ */
419
+ toolIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
420
+ /**
421
+ * Agent IDs that this agent can call
422
+ *
423
+ * Explicitly defines which other agents this agent has permission to invoke.
424
+ * These could be local agent instances, remote agent servers, or any agent
425
+ * accessible in the runtime environment. This provides explicit access control
426
+ * separate from group membership.
427
+ *
428
+ * @example ["database-specialist", "security-auditor", "code-reviewer"]
429
+ * @example ["agent://team-lead", "https://agents.example.com/research"]
430
+ */
431
+ agentIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
432
+ /**
433
+ * Groups that this agent belongs to
434
+ *
435
+ * Defines organizational membership for discovery, coordination, and management.
436
+ * Groups can represent teams, projects, clusters, departments, or any arbitrary
437
+ * organizational structure. Supports both simple string IDs and rich objects
438
+ * with properties.
439
+ *
440
+ * @example
441
+ * // Simple string references
442
+ * ["team:backend", "project:api-v2", "cluster:production"]
443
+ *
444
+ * @example
445
+ * // Rich objects with properties
446
+ * [
447
+ * { id: "team:backend", properties: { role: "lead", tier: "senior" } },
448
+ * { id: "project:api-v2", properties: { status: "active", priority: 1 } }
449
+ * ]
450
+ */
451
+ groupIds: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
452
+ id: z.ZodString;
453
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
454
+ }, "strip", z.ZodTypeAny, {
455
+ id: string;
456
+ properties?: Record<string, unknown> | undefined;
457
+ }, {
458
+ id: string;
459
+ properties?: Record<string, unknown> | undefined;
460
+ }>]>, "many">>>;
461
+ /**
462
+ * System instructions for the agent
463
+ *
464
+ * The core prompt that defines the agent's behavior, expertise, methodology,
465
+ * and output format. This is typically provided in the markdown body of an
466
+ * agent.md file and defines the agent's persona and capabilities.
467
+ *
468
+ * @example
469
+ * ```
470
+ * You are a backend system architect specializing in scalable API design.
471
+ *
472
+ * ## Focus Areas
473
+ * - RESTful API design with proper versioning
474
+ * - Microservice boundaries and communication patterns
475
+ * - Database schema design and optimization
476
+ *
477
+ * ## Methodology
478
+ * 1. Analyze requirements and constraints
479
+ * 2. Design contract-first APIs
480
+ * 3. Consider scalability from day one
481
+ * ```
482
+ */
483
+ instructions: z.ZodString;
484
+ }, "strip", z.ZodTypeAny, {
485
+ name: string;
486
+ description: string;
487
+ version: string;
488
+ skills: {
489
+ name: string;
490
+ id: string;
491
+ description: string;
492
+ tags: string[];
493
+ examples?: string[] | undefined;
494
+ inputModes?: string[] | undefined;
495
+ outputModes?: string[] | undefined;
496
+ security?: Record<string, string[]>[] | undefined;
497
+ }[];
498
+ instructions: string;
499
+ toolIds: string[];
500
+ groupIds: (string | {
501
+ id: string;
502
+ properties?: Record<string, unknown> | undefined;
503
+ })[];
504
+ id?: string | undefined;
505
+ url?: string | undefined;
506
+ security?: Record<string, string[]>[] | undefined;
507
+ protocolVersion?: string | undefined;
508
+ preferredTransport?: string | undefined;
509
+ additionalInterfaces?: {
510
+ url: string;
511
+ transport: string;
512
+ }[] | undefined;
513
+ iconUrl?: string | undefined;
514
+ provider?: {
515
+ url: string;
516
+ organization: string;
517
+ } | undefined;
518
+ documentationUrl?: string | undefined;
519
+ capabilities?: {
520
+ extensions?: {
521
+ uri: string;
522
+ required?: boolean | undefined;
523
+ description?: string | undefined;
524
+ params?: Record<string, unknown> | undefined;
525
+ }[] | undefined;
526
+ streaming?: boolean | undefined;
527
+ pushNotifications?: boolean | undefined;
528
+ stateTransitionHistory?: boolean | undefined;
529
+ } | undefined;
530
+ securitySchemes?: Record<string, {
531
+ name: string;
532
+ type: "apiKey";
533
+ in: "header" | "query" | "cookie";
534
+ description?: string | undefined;
535
+ } | {
536
+ type: "http";
537
+ scheme: string;
538
+ description?: string | undefined;
539
+ bearerFormat?: string | undefined;
540
+ } | {
541
+ type: "oauth2";
542
+ flows: {
543
+ authorizationCode?: {
544
+ authorizationUrl: string;
545
+ tokenUrl: string;
546
+ scopes: Record<string, string>;
547
+ refreshUrl?: string | undefined;
548
+ } | undefined;
549
+ clientCredentials?: {
550
+ tokenUrl: string;
551
+ scopes: Record<string, string>;
552
+ refreshUrl?: string | undefined;
553
+ } | undefined;
554
+ implicit?: {
555
+ authorizationUrl: string;
556
+ scopes: Record<string, string>;
557
+ refreshUrl?: string | undefined;
558
+ } | undefined;
559
+ password?: {
560
+ tokenUrl: string;
561
+ scopes: Record<string, string>;
562
+ refreshUrl?: string | undefined;
563
+ } | undefined;
564
+ };
565
+ description?: string | undefined;
566
+ oauth2MetadataUrl?: string | undefined;
567
+ } | {
568
+ type: "openIdConnect";
569
+ openIdConnectUrl: string;
570
+ description?: string | undefined;
571
+ } | {
572
+ type: "mutualTLS";
573
+ description?: string | undefined;
574
+ }> | undefined;
575
+ defaultInputModes?: string[] | undefined;
576
+ defaultOutputModes?: string[] | undefined;
577
+ supportsAuthenticatedExtendedCard?: boolean | undefined;
578
+ signatures?: {
579
+ protected: string;
580
+ signature: string;
581
+ header?: Record<string, unknown> | undefined;
582
+ }[] | undefined;
583
+ modelId?: string | undefined;
584
+ agentIds?: string[] | undefined;
585
+ }, {
586
+ name: string;
587
+ description: string;
588
+ version: string;
589
+ skills: {
590
+ name: string;
591
+ id: string;
592
+ description: string;
593
+ tags: string[];
594
+ examples?: string[] | undefined;
595
+ inputModes?: string[] | undefined;
596
+ outputModes?: string[] | undefined;
597
+ security?: Record<string, string[]>[] | undefined;
598
+ }[];
599
+ instructions: string;
600
+ id?: string | undefined;
601
+ url?: string | undefined;
602
+ security?: Record<string, string[]>[] | undefined;
603
+ protocolVersion?: string | undefined;
604
+ preferredTransport?: string | undefined;
605
+ additionalInterfaces?: {
606
+ url: string;
607
+ transport: string;
608
+ }[] | undefined;
609
+ iconUrl?: string | undefined;
610
+ provider?: {
611
+ url: string;
612
+ organization: string;
613
+ } | undefined;
614
+ documentationUrl?: string | undefined;
615
+ capabilities?: {
616
+ extensions?: {
617
+ uri: string;
618
+ required?: boolean | undefined;
619
+ description?: string | undefined;
620
+ params?: Record<string, unknown> | undefined;
621
+ }[] | undefined;
622
+ streaming?: boolean | undefined;
623
+ pushNotifications?: boolean | undefined;
624
+ stateTransitionHistory?: boolean | undefined;
625
+ } | undefined;
626
+ securitySchemes?: Record<string, {
627
+ name: string;
628
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
629
+ in: "header" | "query" | "cookie";
630
+ description?: string | undefined;
631
+ } | {
632
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
633
+ scheme: string;
634
+ description?: string | undefined;
635
+ bearerFormat?: string | undefined;
636
+ } | {
637
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
638
+ flows: {
639
+ authorizationCode?: {
640
+ authorizationUrl: string;
641
+ tokenUrl: string;
642
+ scopes: Record<string, string>;
643
+ refreshUrl?: string | undefined;
644
+ } | undefined;
645
+ clientCredentials?: {
646
+ tokenUrl: string;
647
+ scopes: Record<string, string>;
648
+ refreshUrl?: string | undefined;
649
+ } | undefined;
650
+ implicit?: {
651
+ authorizationUrl: string;
652
+ scopes: Record<string, string>;
653
+ refreshUrl?: string | undefined;
654
+ } | undefined;
655
+ password?: {
656
+ tokenUrl: string;
657
+ scopes: Record<string, string>;
658
+ refreshUrl?: string | undefined;
659
+ } | undefined;
660
+ };
661
+ description?: string | undefined;
662
+ oauth2MetadataUrl?: string | undefined;
663
+ } | {
664
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
665
+ openIdConnectUrl: string;
666
+ description?: string | undefined;
667
+ } | {
668
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
669
+ description?: string | undefined;
670
+ }> | undefined;
671
+ defaultInputModes?: string[] | undefined;
672
+ defaultOutputModes?: string[] | undefined;
673
+ supportsAuthenticatedExtendedCard?: boolean | undefined;
674
+ signatures?: {
675
+ protected: string;
676
+ signature: string;
677
+ header?: Record<string, unknown> | undefined;
678
+ }[] | undefined;
679
+ modelId?: string | undefined;
680
+ toolIds?: string[] | undefined;
681
+ agentIds?: string[] | undefined;
682
+ groupIds?: (string | {
683
+ id: string;
684
+ properties?: Record<string, unknown> | undefined;
685
+ })[] | undefined;
686
+ }>;
687
+ export type AgentDefinition = z.infer<typeof AgentDefinitionSchema>;
688
+ /**
689
+ * Agent configuration schema
690
+ *
691
+ * Extends AgentDefinition with deployment-specific configuration including
692
+ * server connections and runtime metadata. This schema represents the full
693
+ * configuration needed to instantiate and run an agent in a specific environment.
694
+ *
695
+ * Use this when:
696
+ * - Deploying an agent to a runtime environment
697
+ * - Connecting to specific MCP or A2A servers
698
+ * - Adding environment-specific metadata
699
+ *
700
+ * @example
701
+ * ```typescript
702
+ * const config: AgentConfiguration = {
703
+ * // AgentDefinition fields
704
+ * id: "backend-architect",
705
+ * name: "Backend System Architect",
706
+ * description: "Design RESTful APIs and microservice architectures",
707
+ * model: "openai/gpt-4",
708
+ * toolIds: ["filesystem", "database-analyzer"],
709
+ * instructions: "You are a backend system architect...",
710
+ *
711
+ * // Configuration-specific fields
712
+ * servers: [
713
+ * {
714
+ * type: "mcp",
715
+ * id: "filesystem",
716
+ * url: "http://localhost:3000/mcp/filesystem"
717
+ * },
718
+ * {
719
+ * type: "a2a",
720
+ * id: "database-specialist",
721
+ * url: "https://agents.example.com/database-specialist"
722
+ * }
723
+ * ],
724
+ * metadata: {
725
+ * environment: "production",
726
+ * region: "us-east-1",
727
+ * version: "1.2.3"
728
+ * }
729
+ * }
730
+ * ```
731
+ */
732
+ export declare const AgentConfigurationSchema: z.ZodObject<{
733
+ name: z.ZodString;
734
+ url: z.ZodOptional<z.ZodString>;
735
+ description: z.ZodString;
736
+ version: z.ZodString;
737
+ security: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>, "many">>;
738
+ protocolVersion: z.ZodOptional<z.ZodDefault<z.ZodString>>;
739
+ preferredTransport: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["JSONRPC", "GRPC", "HTTP+JSON"]>, z.ZodString]>>;
740
+ additionalInterfaces: z.ZodOptional<z.ZodArray<z.ZodObject<{
741
+ url: z.ZodString;
742
+ transport: z.ZodUnion<[z.ZodEnum<["JSONRPC", "GRPC", "HTTP+JSON"]>, z.ZodString]>;
743
+ }, "strip", z.ZodTypeAny, {
744
+ url: string;
745
+ transport: string;
746
+ }, {
747
+ url: string;
748
+ transport: string;
749
+ }>, "many">>;
750
+ iconUrl: z.ZodOptional<z.ZodString>;
751
+ provider: z.ZodOptional<z.ZodObject<{
752
+ organization: z.ZodString;
753
+ url: z.ZodString;
754
+ }, "strip", z.ZodTypeAny, {
755
+ url: string;
756
+ organization: string;
757
+ }, {
758
+ url: string;
759
+ organization: string;
760
+ }>>;
761
+ documentationUrl: z.ZodOptional<z.ZodString>;
762
+ capabilities: z.ZodOptional<z.ZodObject<{
763
+ streaming: z.ZodOptional<z.ZodBoolean>;
764
+ pushNotifications: z.ZodOptional<z.ZodBoolean>;
765
+ stateTransitionHistory: z.ZodOptional<z.ZodBoolean>;
766
+ extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
767
+ uri: z.ZodString;
768
+ description: z.ZodOptional<z.ZodString>;
769
+ required: z.ZodOptional<z.ZodBoolean>;
770
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
771
+ }, "strip", z.ZodTypeAny, {
772
+ uri: string;
773
+ required?: boolean | undefined;
774
+ description?: string | undefined;
775
+ params?: Record<string, unknown> | undefined;
776
+ }, {
777
+ uri: string;
778
+ required?: boolean | undefined;
779
+ description?: string | undefined;
780
+ params?: Record<string, unknown> | undefined;
781
+ }>, "many">>;
782
+ }, "strip", z.ZodTypeAny, {
783
+ extensions?: {
784
+ uri: string;
785
+ required?: boolean | undefined;
786
+ description?: string | undefined;
787
+ params?: Record<string, unknown> | undefined;
788
+ }[] | undefined;
789
+ streaming?: boolean | undefined;
790
+ pushNotifications?: boolean | undefined;
791
+ stateTransitionHistory?: boolean | undefined;
792
+ }, {
793
+ extensions?: {
794
+ uri: string;
795
+ required?: boolean | undefined;
796
+ description?: string | undefined;
797
+ params?: Record<string, unknown> | undefined;
798
+ }[] | undefined;
799
+ streaming?: boolean | undefined;
800
+ pushNotifications?: boolean | undefined;
801
+ stateTransitionHistory?: boolean | undefined;
802
+ }>>;
803
+ securitySchemes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
804
+ description: z.ZodOptional<z.ZodString>;
805
+ } & {
806
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "apiKey", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
807
+ in: z.ZodEnum<["query", "header", "cookie"]>;
808
+ name: z.ZodString;
809
+ }, "strip", z.ZodTypeAny, {
810
+ name: string;
811
+ type: "apiKey";
812
+ in: "header" | "query" | "cookie";
813
+ description?: string | undefined;
814
+ }, {
815
+ name: string;
816
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
817
+ in: "header" | "query" | "cookie";
818
+ description?: string | undefined;
819
+ }>, z.ZodObject<{
820
+ description: z.ZodOptional<z.ZodString>;
821
+ } & {
822
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "http", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
823
+ scheme: z.ZodString;
824
+ bearerFormat: z.ZodOptional<z.ZodString>;
825
+ }, "strip", z.ZodTypeAny, {
826
+ type: "http";
827
+ scheme: string;
828
+ description?: string | undefined;
829
+ bearerFormat?: string | undefined;
830
+ }, {
831
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
832
+ scheme: string;
833
+ description?: string | undefined;
834
+ bearerFormat?: string | undefined;
835
+ }>, z.ZodObject<{
836
+ description: z.ZodOptional<z.ZodString>;
837
+ } & {
838
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "oauth2", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
839
+ flows: z.ZodObject<{
840
+ authorizationCode: z.ZodOptional<z.ZodObject<{
841
+ authorizationUrl: z.ZodString;
842
+ tokenUrl: z.ZodString;
843
+ refreshUrl: z.ZodOptional<z.ZodString>;
844
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
845
+ }, "strip", z.ZodTypeAny, {
846
+ authorizationUrl: string;
847
+ tokenUrl: string;
848
+ scopes: Record<string, string>;
849
+ refreshUrl?: string | undefined;
850
+ }, {
851
+ authorizationUrl: string;
852
+ tokenUrl: string;
853
+ scopes: Record<string, string>;
854
+ refreshUrl?: string | undefined;
855
+ }>>;
856
+ clientCredentials: z.ZodOptional<z.ZodObject<{
857
+ tokenUrl: z.ZodString;
858
+ refreshUrl: z.ZodOptional<z.ZodString>;
859
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
860
+ }, "strip", z.ZodTypeAny, {
861
+ tokenUrl: string;
862
+ scopes: Record<string, string>;
863
+ refreshUrl?: string | undefined;
864
+ }, {
865
+ tokenUrl: string;
866
+ scopes: Record<string, string>;
867
+ refreshUrl?: string | undefined;
868
+ }>>;
869
+ implicit: z.ZodOptional<z.ZodObject<{
870
+ authorizationUrl: z.ZodString;
871
+ refreshUrl: z.ZodOptional<z.ZodString>;
872
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
873
+ }, "strip", z.ZodTypeAny, {
874
+ authorizationUrl: string;
875
+ scopes: Record<string, string>;
876
+ refreshUrl?: string | undefined;
877
+ }, {
878
+ authorizationUrl: string;
879
+ scopes: Record<string, string>;
880
+ refreshUrl?: string | undefined;
881
+ }>>;
882
+ password: z.ZodOptional<z.ZodObject<{
883
+ tokenUrl: z.ZodString;
884
+ refreshUrl: z.ZodOptional<z.ZodString>;
885
+ scopes: z.ZodRecord<z.ZodString, z.ZodString>;
886
+ }, "strip", z.ZodTypeAny, {
887
+ tokenUrl: string;
888
+ scopes: Record<string, string>;
889
+ refreshUrl?: string | undefined;
890
+ }, {
891
+ tokenUrl: string;
892
+ scopes: Record<string, string>;
893
+ refreshUrl?: string | undefined;
894
+ }>>;
895
+ }, "strip", z.ZodTypeAny, {
896
+ authorizationCode?: {
897
+ authorizationUrl: string;
898
+ tokenUrl: string;
899
+ scopes: Record<string, string>;
900
+ refreshUrl?: string | undefined;
901
+ } | undefined;
902
+ clientCredentials?: {
903
+ tokenUrl: string;
904
+ scopes: Record<string, string>;
905
+ refreshUrl?: string | undefined;
906
+ } | undefined;
907
+ implicit?: {
908
+ authorizationUrl: string;
909
+ scopes: Record<string, string>;
910
+ refreshUrl?: string | undefined;
911
+ } | undefined;
912
+ password?: {
913
+ tokenUrl: string;
914
+ scopes: Record<string, string>;
915
+ refreshUrl?: string | undefined;
916
+ } | undefined;
917
+ }, {
918
+ authorizationCode?: {
919
+ authorizationUrl: string;
920
+ tokenUrl: string;
921
+ scopes: Record<string, string>;
922
+ refreshUrl?: string | undefined;
923
+ } | undefined;
924
+ clientCredentials?: {
925
+ tokenUrl: string;
926
+ scopes: Record<string, string>;
927
+ refreshUrl?: string | undefined;
928
+ } | undefined;
929
+ implicit?: {
930
+ authorizationUrl: string;
931
+ scopes: Record<string, string>;
932
+ refreshUrl?: string | undefined;
933
+ } | undefined;
934
+ password?: {
935
+ tokenUrl: string;
936
+ scopes: Record<string, string>;
937
+ refreshUrl?: string | undefined;
938
+ } | undefined;
939
+ }>;
940
+ oauth2MetadataUrl: z.ZodOptional<z.ZodString>;
941
+ }, "strip", z.ZodTypeAny, {
942
+ type: "oauth2";
943
+ flows: {
944
+ authorizationCode?: {
945
+ authorizationUrl: string;
946
+ tokenUrl: string;
947
+ scopes: Record<string, string>;
948
+ refreshUrl?: string | undefined;
949
+ } | undefined;
950
+ clientCredentials?: {
951
+ tokenUrl: string;
952
+ scopes: Record<string, string>;
953
+ refreshUrl?: string | undefined;
954
+ } | undefined;
955
+ implicit?: {
956
+ authorizationUrl: string;
957
+ scopes: Record<string, string>;
958
+ refreshUrl?: string | undefined;
959
+ } | undefined;
960
+ password?: {
961
+ tokenUrl: string;
962
+ scopes: Record<string, string>;
963
+ refreshUrl?: string | undefined;
964
+ } | undefined;
965
+ };
966
+ description?: string | undefined;
967
+ oauth2MetadataUrl?: string | undefined;
968
+ }, {
969
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
970
+ flows: {
971
+ authorizationCode?: {
972
+ authorizationUrl: string;
973
+ tokenUrl: string;
974
+ scopes: Record<string, string>;
975
+ refreshUrl?: string | undefined;
976
+ } | undefined;
977
+ clientCredentials?: {
978
+ tokenUrl: string;
979
+ scopes: Record<string, string>;
980
+ refreshUrl?: string | undefined;
981
+ } | undefined;
982
+ implicit?: {
983
+ authorizationUrl: string;
984
+ scopes: Record<string, string>;
985
+ refreshUrl?: string | undefined;
986
+ } | undefined;
987
+ password?: {
988
+ tokenUrl: string;
989
+ scopes: Record<string, string>;
990
+ refreshUrl?: string | undefined;
991
+ } | undefined;
992
+ };
993
+ description?: string | undefined;
994
+ oauth2MetadataUrl?: string | undefined;
995
+ }>, z.ZodObject<{
996
+ description: z.ZodOptional<z.ZodString>;
997
+ } & {
998
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "openIdConnect", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
999
+ openIdConnectUrl: z.ZodString;
1000
+ }, "strip", z.ZodTypeAny, {
1001
+ type: "openIdConnect";
1002
+ openIdConnectUrl: string;
1003
+ description?: string | undefined;
1004
+ }, {
1005
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
1006
+ openIdConnectUrl: string;
1007
+ description?: string | undefined;
1008
+ }>, z.ZodObject<{
1009
+ description: z.ZodOptional<z.ZodString>;
1010
+ } & {
1011
+ type: z.ZodEffects<z.ZodEnum<["apiKey", "http", "mutualTLS", "oauth2", "openIdConnect"]>, "mutualTLS", "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect">;
1012
+ }, "strip", z.ZodTypeAny, {
1013
+ type: "mutualTLS";
1014
+ description?: string | undefined;
1015
+ }, {
1016
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
1017
+ description?: string | undefined;
1018
+ }>]>>>;
1019
+ defaultInputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1020
+ defaultOutputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1021
+ skills: z.ZodArray<z.ZodObject<{
1022
+ id: z.ZodString;
1023
+ name: z.ZodString;
1024
+ description: z.ZodString;
1025
+ tags: z.ZodArray<z.ZodString, "many">;
1026
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1027
+ inputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1028
+ outputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1029
+ security: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>, "many">>;
1030
+ }, "strip", z.ZodTypeAny, {
1031
+ name: string;
1032
+ id: string;
1033
+ description: string;
1034
+ tags: string[];
1035
+ examples?: string[] | undefined;
1036
+ inputModes?: string[] | undefined;
1037
+ outputModes?: string[] | undefined;
1038
+ security?: Record<string, string[]>[] | undefined;
1039
+ }, {
1040
+ name: string;
1041
+ id: string;
1042
+ description: string;
1043
+ tags: string[];
1044
+ examples?: string[] | undefined;
1045
+ inputModes?: string[] | undefined;
1046
+ outputModes?: string[] | undefined;
1047
+ security?: Record<string, string[]>[] | undefined;
1048
+ }>, "many">;
1049
+ supportsAuthenticatedExtendedCard: z.ZodOptional<z.ZodBoolean>;
1050
+ signatures: z.ZodOptional<z.ZodArray<z.ZodObject<{
1051
+ protected: z.ZodString;
1052
+ signature: z.ZodString;
1053
+ header: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1054
+ }, "strip", z.ZodTypeAny, {
1055
+ protected: string;
1056
+ signature: string;
1057
+ header?: Record<string, unknown> | undefined;
1058
+ }, {
1059
+ protected: string;
1060
+ signature: string;
1061
+ header?: Record<string, unknown> | undefined;
1062
+ }>, "many">>;
1063
+ } & {
1064
+ /**
1065
+ * Optional agent ID - will be generated if not provided
1066
+ *
1067
+ * Use kebab-case for consistency (e.g., 'backend-architect', 'code-reviewer')
1068
+ */
1069
+ id: z.ZodOptional<z.ZodString>;
1070
+ /**
1071
+ * Optional model specification
1072
+ *
1073
+ * Specifies the LLM model to use for this agent.
1074
+ *
1075
+ * @example "openai/gpt-4o-mini"
1076
+ * @example "anthropic/claude-3-opus-20241022"
1077
+ * @example "deepseek-ai/DeepSeek-R1"
1078
+ */
1079
+ modelId: z.ZodOptional<z.ZodString>;
1080
+ /**
1081
+ * Tool IDs that this agent can use
1082
+ *
1083
+ * A flexible list of tool identifiers that reference MCP servers, in-memory
1084
+ * functions, or any other tool providers available in the runtime environment.
1085
+ * Tools are resolved by the agent runtime based on these IDs.
1086
+ *
1087
+ * @example ["filesystem", "web-search", "code-analyzer"]
1088
+ * @example ["mcp-server-git", "mcp-server-postgres", "custom-api-client"]
1089
+ */
1090
+ toolIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1091
+ /**
1092
+ * Agent IDs that this agent can call
1093
+ *
1094
+ * Explicitly defines which other agents this agent has permission to invoke.
1095
+ * These could be local agent instances, remote agent servers, or any agent
1096
+ * accessible in the runtime environment. This provides explicit access control
1097
+ * separate from group membership.
1098
+ *
1099
+ * @example ["database-specialist", "security-auditor", "code-reviewer"]
1100
+ * @example ["agent://team-lead", "https://agents.example.com/research"]
1101
+ */
1102
+ agentIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1103
+ /**
1104
+ * Groups that this agent belongs to
1105
+ *
1106
+ * Defines organizational membership for discovery, coordination, and management.
1107
+ * Groups can represent teams, projects, clusters, departments, or any arbitrary
1108
+ * organizational structure. Supports both simple string IDs and rich objects
1109
+ * with properties.
1110
+ *
1111
+ * @example
1112
+ * // Simple string references
1113
+ * ["team:backend", "project:api-v2", "cluster:production"]
1114
+ *
1115
+ * @example
1116
+ * // Rich objects with properties
1117
+ * [
1118
+ * { id: "team:backend", properties: { role: "lead", tier: "senior" } },
1119
+ * { id: "project:api-v2", properties: { status: "active", priority: 1 } }
1120
+ * ]
1121
+ */
1122
+ groupIds: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
1123
+ id: z.ZodString;
1124
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ id: string;
1127
+ properties?: Record<string, unknown> | undefined;
1128
+ }, {
1129
+ id: string;
1130
+ properties?: Record<string, unknown> | undefined;
1131
+ }>]>, "many">>>;
1132
+ /**
1133
+ * System instructions for the agent
1134
+ *
1135
+ * The core prompt that defines the agent's behavior, expertise, methodology,
1136
+ * and output format. This is typically provided in the markdown body of an
1137
+ * agent.md file and defines the agent's persona and capabilities.
1138
+ *
1139
+ * @example
1140
+ * ```
1141
+ * You are a backend system architect specializing in scalable API design.
1142
+ *
1143
+ * ## Focus Areas
1144
+ * - RESTful API design with proper versioning
1145
+ * - Microservice boundaries and communication patterns
1146
+ * - Database schema design and optimization
1147
+ *
1148
+ * ## Methodology
1149
+ * 1. Analyze requirements and constraints
1150
+ * 2. Design contract-first APIs
1151
+ * 3. Consider scalability from day one
1152
+ * ```
1153
+ */
1154
+ instructions: z.ZodString;
1155
+ } & {
1156
+ /**
1157
+ * Service connections for this agent
1158
+ *
1159
+ * Defines the actual service endpoints for MCP tool services and A2A agent services
1160
+ * that this agent will connect to at runtime. Each service must have a type,
1161
+ * unique ID, and connection URL.
1162
+ *
1163
+ * @example
1164
+ * [
1165
+ * { type: "mcp", id: "filesystem", url: "http://localhost:3000/mcp/fs" },
1166
+ * { type: "a2a", id: "researcher", url: "https://agents.example.com/research" }
1167
+ * { type: "a2a", uri: "local-agent-id", parameters: { name: "John Doe" } }
1168
+ * ]
1169
+ */
1170
+ services: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
1171
+ id: z.ZodString;
1172
+ url: z.ZodString;
1173
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1174
+ authToken: z.ZodOptional<z.ZodString>;
1175
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1176
+ } & {
1177
+ type: z.ZodDefault<z.ZodLiteral<"a2a">>;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ type: "a2a";
1180
+ id: string;
1181
+ url: string;
1182
+ headers?: Record<string, string> | undefined;
1183
+ authToken?: string | undefined;
1184
+ parameters?: Record<string, unknown> | undefined;
1185
+ }, {
1186
+ id: string;
1187
+ url: string;
1188
+ type?: "a2a" | undefined;
1189
+ headers?: Record<string, string> | undefined;
1190
+ authToken?: string | undefined;
1191
+ parameters?: Record<string, unknown> | undefined;
1192
+ }>, z.ZodObject<Omit<{
1193
+ id: z.ZodString;
1194
+ url: z.ZodString;
1195
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1196
+ authToken: z.ZodOptional<z.ZodString>;
1197
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1198
+ } & {
1199
+ type: z.ZodDefault<z.ZodLiteral<"a2a">>;
1200
+ }, "url" | "headers"> & {
1201
+ uri: z.ZodString;
1202
+ }, "strip", z.ZodTypeAny, {
1203
+ type: "a2a";
1204
+ id: string;
1205
+ uri: string;
1206
+ authToken?: string | undefined;
1207
+ parameters?: Record<string, unknown> | undefined;
1208
+ }, {
1209
+ id: string;
1210
+ uri: string;
1211
+ type?: "a2a" | undefined;
1212
+ authToken?: string | undefined;
1213
+ parameters?: Record<string, unknown> | undefined;
1214
+ }>]>, z.ZodUnion<[z.ZodObject<{
1215
+ id: z.ZodString;
1216
+ url: z.ZodString;
1217
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1218
+ authToken: z.ZodOptional<z.ZodString>;
1219
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1220
+ } & {
1221
+ type: z.ZodDefault<z.ZodLiteral<"mcp">>;
1222
+ }, "strip", z.ZodTypeAny, {
1223
+ type: "mcp";
1224
+ id: string;
1225
+ url: string;
1226
+ headers?: Record<string, string> | undefined;
1227
+ authToken?: string | undefined;
1228
+ parameters?: Record<string, unknown> | undefined;
1229
+ }, {
1230
+ id: string;
1231
+ url: string;
1232
+ type?: "mcp" | undefined;
1233
+ headers?: Record<string, string> | undefined;
1234
+ authToken?: string | undefined;
1235
+ parameters?: Record<string, unknown> | undefined;
1236
+ }>, z.ZodObject<Omit<{
1237
+ id: z.ZodString;
1238
+ url: z.ZodString;
1239
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1240
+ authToken: z.ZodOptional<z.ZodString>;
1241
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1242
+ } & {
1243
+ type: z.ZodDefault<z.ZodLiteral<"mcp">>;
1244
+ }, "url" | "headers"> & {
1245
+ uri: z.ZodString;
1246
+ command: z.ZodString;
1247
+ args: z.ZodArray<z.ZodString, "many">;
1248
+ }, "strip", z.ZodTypeAny, {
1249
+ type: "mcp";
1250
+ id: string;
1251
+ args: string[];
1252
+ uri: string;
1253
+ command: string;
1254
+ authToken?: string | undefined;
1255
+ parameters?: Record<string, unknown> | undefined;
1256
+ }, {
1257
+ id: string;
1258
+ args: string[];
1259
+ uri: string;
1260
+ command: string;
1261
+ type?: "mcp" | undefined;
1262
+ authToken?: string | undefined;
1263
+ parameters?: Record<string, unknown> | undefined;
1264
+ }>]>]>, "many">>;
1265
+ /**
1266
+ * Runtime metadata for the agent
1267
+ *
1268
+ * Arbitrary key-value pairs for environment-specific configuration, tracking,
1269
+ * or runtime behavior customization. Common uses include environment tags,
1270
+ * version tracking, deployment information, or feature flags.
1271
+ *
1272
+ * @example
1273
+ * {
1274
+ * environment: "production",
1275
+ * region: "us-east-1",
1276
+ * deployedBy: "ci-pipeline",
1277
+ * deployedAt: "2025-01-15T10:30:00Z",
1278
+ * version: "1.2.3"
1279
+ * }
1280
+ */
1281
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1282
+ }, "strip", z.ZodTypeAny, {
1283
+ name: string;
1284
+ description: string;
1285
+ version: string;
1286
+ skills: {
1287
+ name: string;
1288
+ id: string;
1289
+ description: string;
1290
+ tags: string[];
1291
+ examples?: string[] | undefined;
1292
+ inputModes?: string[] | undefined;
1293
+ outputModes?: string[] | undefined;
1294
+ security?: Record<string, string[]>[] | undefined;
1295
+ }[];
1296
+ instructions: string;
1297
+ toolIds: string[];
1298
+ groupIds: (string | {
1299
+ id: string;
1300
+ properties?: Record<string, unknown> | undefined;
1301
+ })[];
1302
+ services: ({
1303
+ type: "a2a";
1304
+ id: string;
1305
+ url: string;
1306
+ headers?: Record<string, string> | undefined;
1307
+ authToken?: string | undefined;
1308
+ parameters?: Record<string, unknown> | undefined;
1309
+ } | {
1310
+ type: "a2a";
1311
+ id: string;
1312
+ uri: string;
1313
+ authToken?: string | undefined;
1314
+ parameters?: Record<string, unknown> | undefined;
1315
+ } | {
1316
+ type: "mcp";
1317
+ id: string;
1318
+ url: string;
1319
+ headers?: Record<string, string> | undefined;
1320
+ authToken?: string | undefined;
1321
+ parameters?: Record<string, unknown> | undefined;
1322
+ } | {
1323
+ type: "mcp";
1324
+ id: string;
1325
+ args: string[];
1326
+ uri: string;
1327
+ command: string;
1328
+ authToken?: string | undefined;
1329
+ parameters?: Record<string, unknown> | undefined;
1330
+ })[];
1331
+ id?: string | undefined;
1332
+ url?: string | undefined;
1333
+ metadata?: Record<string, string> | undefined;
1334
+ security?: Record<string, string[]>[] | undefined;
1335
+ protocolVersion?: string | undefined;
1336
+ preferredTransport?: string | undefined;
1337
+ additionalInterfaces?: {
1338
+ url: string;
1339
+ transport: string;
1340
+ }[] | undefined;
1341
+ iconUrl?: string | undefined;
1342
+ provider?: {
1343
+ url: string;
1344
+ organization: string;
1345
+ } | undefined;
1346
+ documentationUrl?: string | undefined;
1347
+ capabilities?: {
1348
+ extensions?: {
1349
+ uri: string;
1350
+ required?: boolean | undefined;
1351
+ description?: string | undefined;
1352
+ params?: Record<string, unknown> | undefined;
1353
+ }[] | undefined;
1354
+ streaming?: boolean | undefined;
1355
+ pushNotifications?: boolean | undefined;
1356
+ stateTransitionHistory?: boolean | undefined;
1357
+ } | undefined;
1358
+ securitySchemes?: Record<string, {
1359
+ name: string;
1360
+ type: "apiKey";
1361
+ in: "header" | "query" | "cookie";
1362
+ description?: string | undefined;
1363
+ } | {
1364
+ type: "http";
1365
+ scheme: string;
1366
+ description?: string | undefined;
1367
+ bearerFormat?: string | undefined;
1368
+ } | {
1369
+ type: "oauth2";
1370
+ flows: {
1371
+ authorizationCode?: {
1372
+ authorizationUrl: string;
1373
+ tokenUrl: string;
1374
+ scopes: Record<string, string>;
1375
+ refreshUrl?: string | undefined;
1376
+ } | undefined;
1377
+ clientCredentials?: {
1378
+ tokenUrl: string;
1379
+ scopes: Record<string, string>;
1380
+ refreshUrl?: string | undefined;
1381
+ } | undefined;
1382
+ implicit?: {
1383
+ authorizationUrl: string;
1384
+ scopes: Record<string, string>;
1385
+ refreshUrl?: string | undefined;
1386
+ } | undefined;
1387
+ password?: {
1388
+ tokenUrl: string;
1389
+ scopes: Record<string, string>;
1390
+ refreshUrl?: string | undefined;
1391
+ } | undefined;
1392
+ };
1393
+ description?: string | undefined;
1394
+ oauth2MetadataUrl?: string | undefined;
1395
+ } | {
1396
+ type: "openIdConnect";
1397
+ openIdConnectUrl: string;
1398
+ description?: string | undefined;
1399
+ } | {
1400
+ type: "mutualTLS";
1401
+ description?: string | undefined;
1402
+ }> | undefined;
1403
+ defaultInputModes?: string[] | undefined;
1404
+ defaultOutputModes?: string[] | undefined;
1405
+ supportsAuthenticatedExtendedCard?: boolean | undefined;
1406
+ signatures?: {
1407
+ protected: string;
1408
+ signature: string;
1409
+ header?: Record<string, unknown> | undefined;
1410
+ }[] | undefined;
1411
+ modelId?: string | undefined;
1412
+ agentIds?: string[] | undefined;
1413
+ }, {
1414
+ name: string;
1415
+ description: string;
1416
+ version: string;
1417
+ skills: {
1418
+ name: string;
1419
+ id: string;
1420
+ description: string;
1421
+ tags: string[];
1422
+ examples?: string[] | undefined;
1423
+ inputModes?: string[] | undefined;
1424
+ outputModes?: string[] | undefined;
1425
+ security?: Record<string, string[]>[] | undefined;
1426
+ }[];
1427
+ instructions: string;
1428
+ id?: string | undefined;
1429
+ url?: string | undefined;
1430
+ metadata?: Record<string, string> | undefined;
1431
+ security?: Record<string, string[]>[] | undefined;
1432
+ protocolVersion?: string | undefined;
1433
+ preferredTransport?: string | undefined;
1434
+ additionalInterfaces?: {
1435
+ url: string;
1436
+ transport: string;
1437
+ }[] | undefined;
1438
+ iconUrl?: string | undefined;
1439
+ provider?: {
1440
+ url: string;
1441
+ organization: string;
1442
+ } | undefined;
1443
+ documentationUrl?: string | undefined;
1444
+ capabilities?: {
1445
+ extensions?: {
1446
+ uri: string;
1447
+ required?: boolean | undefined;
1448
+ description?: string | undefined;
1449
+ params?: Record<string, unknown> | undefined;
1450
+ }[] | undefined;
1451
+ streaming?: boolean | undefined;
1452
+ pushNotifications?: boolean | undefined;
1453
+ stateTransitionHistory?: boolean | undefined;
1454
+ } | undefined;
1455
+ securitySchemes?: Record<string, {
1456
+ name: string;
1457
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
1458
+ in: "header" | "query" | "cookie";
1459
+ description?: string | undefined;
1460
+ } | {
1461
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
1462
+ scheme: string;
1463
+ description?: string | undefined;
1464
+ bearerFormat?: string | undefined;
1465
+ } | {
1466
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
1467
+ flows: {
1468
+ authorizationCode?: {
1469
+ authorizationUrl: string;
1470
+ tokenUrl: string;
1471
+ scopes: Record<string, string>;
1472
+ refreshUrl?: string | undefined;
1473
+ } | undefined;
1474
+ clientCredentials?: {
1475
+ tokenUrl: string;
1476
+ scopes: Record<string, string>;
1477
+ refreshUrl?: string | undefined;
1478
+ } | undefined;
1479
+ implicit?: {
1480
+ authorizationUrl: string;
1481
+ scopes: Record<string, string>;
1482
+ refreshUrl?: string | undefined;
1483
+ } | undefined;
1484
+ password?: {
1485
+ tokenUrl: string;
1486
+ scopes: Record<string, string>;
1487
+ refreshUrl?: string | undefined;
1488
+ } | undefined;
1489
+ };
1490
+ description?: string | undefined;
1491
+ oauth2MetadataUrl?: string | undefined;
1492
+ } | {
1493
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
1494
+ openIdConnectUrl: string;
1495
+ description?: string | undefined;
1496
+ } | {
1497
+ type: "apiKey" | "http" | "mutualTLS" | "oauth2" | "openIdConnect";
1498
+ description?: string | undefined;
1499
+ }> | undefined;
1500
+ defaultInputModes?: string[] | undefined;
1501
+ defaultOutputModes?: string[] | undefined;
1502
+ supportsAuthenticatedExtendedCard?: boolean | undefined;
1503
+ signatures?: {
1504
+ protected: string;
1505
+ signature: string;
1506
+ header?: Record<string, unknown> | undefined;
1507
+ }[] | undefined;
1508
+ modelId?: string | undefined;
1509
+ toolIds?: string[] | undefined;
1510
+ agentIds?: string[] | undefined;
1511
+ groupIds?: (string | {
1512
+ id: string;
1513
+ properties?: Record<string, unknown> | undefined;
1514
+ })[] | undefined;
1515
+ services?: ({
1516
+ id: string;
1517
+ url: string;
1518
+ type?: "a2a" | undefined;
1519
+ headers?: Record<string, string> | undefined;
1520
+ authToken?: string | undefined;
1521
+ parameters?: Record<string, unknown> | undefined;
1522
+ } | {
1523
+ id: string;
1524
+ uri: string;
1525
+ type?: "a2a" | undefined;
1526
+ authToken?: string | undefined;
1527
+ parameters?: Record<string, unknown> | undefined;
1528
+ } | {
1529
+ id: string;
1530
+ url: string;
1531
+ type?: "mcp" | undefined;
1532
+ headers?: Record<string, string> | undefined;
1533
+ authToken?: string | undefined;
1534
+ parameters?: Record<string, unknown> | undefined;
1535
+ } | {
1536
+ id: string;
1537
+ args: string[];
1538
+ uri: string;
1539
+ command: string;
1540
+ type?: "mcp" | undefined;
1541
+ authToken?: string | undefined;
1542
+ parameters?: Record<string, unknown> | undefined;
1543
+ })[] | undefined;
1544
+ }>;
1545
+ export type AgentConfiguration = z.infer<typeof AgentConfigurationSchema>;