@xynehq/jaf 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +596 -0
- package/dist/a2a/agent-card.d.ts +28 -0
- package/dist/a2a/agent-card.d.ts.map +1 -0
- package/dist/a2a/agent-card.js +250 -0
- package/dist/a2a/agent-card.js.map +1 -0
- package/dist/a2a/agent.d.ts +38 -0
- package/dist/a2a/agent.d.ts.map +1 -0
- package/dist/a2a/agent.js +223 -0
- package/dist/a2a/agent.js.map +1 -0
- package/dist/a2a/client.d.ts +35 -0
- package/dist/a2a/client.d.ts.map +1 -0
- package/dist/a2a/client.js +337 -0
- package/dist/a2a/client.js.map +1 -0
- package/dist/a2a/examples/client-example.d.ts +104 -0
- package/dist/a2a/examples/client-example.d.ts.map +1 -0
- package/dist/a2a/examples/client-example.js +232 -0
- package/dist/a2a/examples/client-example.js.map +1 -0
- package/dist/a2a/examples/server-example.d.ts +9 -0
- package/dist/a2a/examples/server-example.d.ts.map +1 -0
- package/dist/a2a/examples/server-example.js +209 -0
- package/dist/a2a/examples/server-example.js.map +1 -0
- package/dist/a2a/examples/weather-agent.d.ts +8 -0
- package/dist/a2a/examples/weather-agent.d.ts.map +1 -0
- package/dist/a2a/examples/weather-agent.js +232 -0
- package/dist/a2a/examples/weather-agent.js.map +1 -0
- package/dist/a2a/executor.d.ts +43 -0
- package/dist/a2a/executor.d.ts.map +1 -0
- package/dist/a2a/executor.js +507 -0
- package/dist/a2a/executor.js.map +1 -0
- package/dist/a2a/index.d.ts +378 -0
- package/dist/a2a/index.d.ts.map +1 -0
- package/dist/a2a/index.js +72 -0
- package/dist/a2a/index.js.map +1 -0
- package/dist/a2a/memory/cleanup.d.ts +58 -0
- package/dist/a2a/memory/cleanup.d.ts.map +1 -0
- package/dist/a2a/memory/cleanup.js +281 -0
- package/dist/a2a/memory/cleanup.js.map +1 -0
- package/dist/a2a/memory/factory.d.ts +38 -0
- package/dist/a2a/memory/factory.d.ts.map +1 -0
- package/dist/a2a/memory/factory.js +369 -0
- package/dist/a2a/memory/factory.js.map +1 -0
- package/dist/a2a/memory/index.d.ts +13 -0
- package/dist/a2a/memory/index.d.ts.map +1 -0
- package/dist/a2a/memory/index.js +16 -0
- package/dist/a2a/memory/index.js.map +1 -0
- package/dist/a2a/memory/providers/in-memory.d.ts +10 -0
- package/dist/a2a/memory/providers/in-memory.d.ts.map +1 -0
- package/dist/a2a/memory/providers/in-memory.js +539 -0
- package/dist/a2a/memory/providers/in-memory.js.map +1 -0
- package/dist/a2a/memory/providers/postgres.d.ts +10 -0
- package/dist/a2a/memory/providers/postgres.d.ts.map +1 -0
- package/dist/a2a/memory/providers/postgres.js +404 -0
- package/dist/a2a/memory/providers/postgres.js.map +1 -0
- package/dist/a2a/memory/providers/redis.d.ts +10 -0
- package/dist/a2a/memory/providers/redis.d.ts.map +1 -0
- package/dist/a2a/memory/providers/redis.js +435 -0
- package/dist/a2a/memory/providers/redis.js.map +1 -0
- package/dist/a2a/memory/serialization.d.ts +53 -0
- package/dist/a2a/memory/serialization.d.ts.map +1 -0
- package/dist/a2a/memory/serialization.js +233 -0
- package/dist/a2a/memory/serialization.js.map +1 -0
- package/dist/a2a/memory/types.d.ts +395 -0
- package/dist/a2a/memory/types.d.ts.map +1 -0
- package/dist/a2a/memory/types.js +85 -0
- package/dist/a2a/memory/types.js.map +1 -0
- package/dist/a2a/protocol.d.ts +38 -0
- package/dist/a2a/protocol.d.ts.map +1 -0
- package/dist/a2a/protocol.js +211 -0
- package/dist/a2a/protocol.js.map +1 -0
- package/dist/a2a/server.d.ts +343 -0
- package/dist/a2a/server.d.ts.map +1 -0
- package/dist/a2a/server.js +362 -0
- package/dist/a2a/server.js.map +1 -0
- package/dist/a2a/types.d.ts +730 -0
- package/dist/a2a/types.d.ts.map +1 -0
- package/dist/a2a/types.js +73 -0
- package/dist/a2a/types.js.map +1 -0
- package/dist/adk/agents/index.d.ts +48 -0
- package/dist/adk/agents/index.d.ts.map +1 -0
- package/dist/adk/agents/index.js +277 -0
- package/dist/adk/agents/index.js.map +1 -0
- package/dist/adk/artifacts/index.d.ts +62 -0
- package/dist/adk/artifacts/index.d.ts.map +1 -0
- package/dist/adk/artifacts/index.js +394 -0
- package/dist/adk/artifacts/index.js.map +1 -0
- package/dist/adk/config/llm-config.d.ts +75 -0
- package/dist/adk/config/llm-config.d.ts.map +1 -0
- package/dist/adk/config/llm-config.js +422 -0
- package/dist/adk/config/llm-config.js.map +1 -0
- package/dist/adk/content/index.d.ts +58 -0
- package/dist/adk/content/index.d.ts.map +1 -0
- package/dist/adk/content/index.js +220 -0
- package/dist/adk/content/index.js.map +1 -0
- package/dist/adk/examples/advanced-features.d.ts +22 -0
- package/dist/adk/examples/advanced-features.d.ts.map +1 -0
- package/dist/adk/examples/advanced-features.js +380 -0
- package/dist/adk/examples/advanced-features.js.map +1 -0
- package/dist/adk/examples/basic-agent.d.ts +28 -0
- package/dist/adk/examples/basic-agent.d.ts.map +1 -0
- package/dist/adk/examples/basic-agent.js +207 -0
- package/dist/adk/examples/basic-agent.js.map +1 -0
- package/dist/adk/examples/multi-agent.d.ts +24 -0
- package/dist/adk/examples/multi-agent.d.ts.map +1 -0
- package/dist/adk/examples/multi-agent.js +321 -0
- package/dist/adk/examples/multi-agent.js.map +1 -0
- package/dist/adk/examples/streaming-example.d.ts +9 -0
- package/dist/adk/examples/streaming-example.d.ts.map +1 -0
- package/dist/adk/examples/streaming-example.js +193 -0
- package/dist/adk/examples/streaming-example.js.map +1 -0
- package/dist/adk/index.d.ts +65 -0
- package/dist/adk/index.d.ts.map +1 -0
- package/dist/adk/index.js +251 -0
- package/dist/adk/index.js.map +1 -0
- package/dist/adk/models.d.ts +338 -0
- package/dist/adk/models.d.ts.map +1 -0
- package/dist/adk/models.js +466 -0
- package/dist/adk/models.js.map +1 -0
- package/dist/adk/providers/error-handler.d.ts +100 -0
- package/dist/adk/providers/error-handler.d.ts.map +1 -0
- package/dist/adk/providers/error-handler.js +289 -0
- package/dist/adk/providers/error-handler.js.map +1 -0
- package/dist/adk/providers/llm-service.d.ts +41 -0
- package/dist/adk/providers/llm-service.d.ts.map +1 -0
- package/dist/adk/providers/llm-service.js +520 -0
- package/dist/adk/providers/llm-service.js.map +1 -0
- package/dist/adk/providers/type-converters.d.ts +34 -0
- package/dist/adk/providers/type-converters.d.ts.map +1 -0
- package/dist/adk/providers/type-converters.js +436 -0
- package/dist/adk/providers/type-converters.js.map +1 -0
- package/dist/adk/runners/index.d.ts +33 -0
- package/dist/adk/runners/index.d.ts.map +1 -0
- package/dist/adk/runners/index.js +466 -0
- package/dist/adk/runners/index.js.map +1 -0
- package/dist/adk/schemas/index.d.ts +85 -0
- package/dist/adk/schemas/index.d.ts.map +1 -0
- package/dist/adk/schemas/index.js +363 -0
- package/dist/adk/schemas/index.js.map +1 -0
- package/dist/adk/sessions/examples/session-provider-usage.d.ts +10 -0
- package/dist/adk/sessions/examples/session-provider-usage.d.ts.map +1 -0
- package/dist/adk/sessions/examples/session-provider-usage.js +145 -0
- package/dist/adk/sessions/examples/session-provider-usage.js.map +1 -0
- package/dist/adk/sessions/index.d.ts +53 -0
- package/dist/adk/sessions/index.d.ts.map +1 -0
- package/dist/adk/sessions/index.js +451 -0
- package/dist/adk/sessions/index.js.map +1 -0
- package/dist/adk/sessions/postgres-provider.d.ts +22 -0
- package/dist/adk/sessions/postgres-provider.d.ts.map +1 -0
- package/dist/adk/sessions/postgres-provider.js +293 -0
- package/dist/adk/sessions/postgres-provider.js.map +1 -0
- package/dist/adk/sessions/redis-provider.d.ts +19 -0
- package/dist/adk/sessions/redis-provider.d.ts.map +1 -0
- package/dist/adk/sessions/redis-provider.js +237 -0
- package/dist/adk/sessions/redis-provider.js.map +1 -0
- package/dist/adk/streaming/index.d.ts +76 -0
- package/dist/adk/streaming/index.d.ts.map +1 -0
- package/dist/adk/streaming/index.js +419 -0
- package/dist/adk/streaming/index.js.map +1 -0
- package/dist/adk/tools/index.d.ts +27 -0
- package/dist/adk/tools/index.d.ts.map +1 -0
- package/dist/adk/tools/index.js +506 -0
- package/dist/adk/tools/index.js.map +1 -0
- package/dist/adk/types.d.ts +351 -0
- package/dist/adk/types.d.ts.map +1 -0
- package/dist/adk/types.js +107 -0
- package/dist/adk/types.js.map +1 -0
- package/dist/core/engine.d.ts +3 -0
- package/dist/core/engine.d.ts.map +1 -0
- package/dist/core/engine.js +438 -0
- package/dist/core/engine.js.map +1 -0
- package/dist/core/errors.d.ts +8 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +84 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/tool-results.d.ts +57 -0
- package/dist/core/tool-results.d.ts.map +1 -0
- package/dist/core/tool-results.js +133 -0
- package/dist/core/tool-results.js.map +1 -0
- package/dist/core/tracing.d.ts +32 -0
- package/dist/core/tracing.d.ts.map +1 -0
- package/dist/core/tracing.js +132 -0
- package/dist/core/tracing.js.map +1 -0
- package/dist/core/types.d.ts +165 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +3 -0
- package/dist/core/types.js.map +1 -0
- package/dist/demo/agents.d.ts +23 -0
- package/dist/demo/agents.d.ts.map +1 -0
- package/dist/demo/agents.js +69 -0
- package/dist/demo/agents.js.map +1 -0
- package/dist/demo/index.d.ts +2 -0
- package/dist/demo/index.d.ts.map +1 -0
- package/dist/demo/index.js +250 -0
- package/dist/demo/index.js.map +1 -0
- package/dist/demo/mock-provider.d.ts +22 -0
- package/dist/demo/mock-provider.d.ts.map +1 -0
- package/dist/demo/mock-provider.js +138 -0
- package/dist/demo/mock-provider.js.map +1 -0
- package/dist/demo/tools.d.ts +14 -0
- package/dist/demo/tools.d.ts.map +1 -0
- package/dist/demo/tools.js +115 -0
- package/dist/demo/tools.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/memory/factory.d.ts +22 -0
- package/dist/memory/factory.d.ts.map +1 -0
- package/dist/memory/factory.js +88 -0
- package/dist/memory/factory.js.map +1 -0
- package/dist/memory/providers/in-memory.d.ts +7 -0
- package/dist/memory/providers/in-memory.d.ts.map +1 -0
- package/dist/memory/providers/in-memory.js +287 -0
- package/dist/memory/providers/in-memory.js.map +1 -0
- package/dist/memory/providers/postgres.d.ts +15 -0
- package/dist/memory/providers/postgres.d.ts.map +1 -0
- package/dist/memory/providers/postgres.js +495 -0
- package/dist/memory/providers/postgres.js.map +1 -0
- package/dist/memory/providers/redis.d.ts +18 -0
- package/dist/memory/providers/redis.d.ts.map +1 -0
- package/dist/memory/providers/redis.js +354 -0
- package/dist/memory/providers/redis.js.map +1 -0
- package/dist/memory/types.d.ts +296 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +93 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/policies/handoff.d.ts +16 -0
- package/dist/policies/handoff.d.ts.map +1 -0
- package/dist/policies/handoff.js +20 -0
- package/dist/policies/handoff.js.map +1 -0
- package/dist/policies/validation.d.ts +14 -0
- package/dist/policies/validation.d.ts.map +1 -0
- package/dist/policies/validation.js +92 -0
- package/dist/policies/validation.js.map +1 -0
- package/dist/providers/mcp.d.ts +17 -0
- package/dist/providers/mcp.d.ts.map +1 -0
- package/dist/providers/mcp.js +111 -0
- package/dist/providers/mcp.js.map +1 -0
- package/dist/providers/model.d.ts +3 -0
- package/dist/providers/model.d.ts.map +1 -0
- package/dist/providers/model.js +113 -0
- package/dist/providers/model.js.map +1 -0
- package/dist/server/index.d.ts +35 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +66 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/server.d.ts +12 -0
- package/dist/server/server.d.ts.map +1 -0
- package/dist/server/server.js +394 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/types.d.ts +456 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/types.js +75 -0
- package/dist/server/types.js.map +1 -0
- package/dist/test-utils/db-setup.d.ts +34 -0
- package/dist/test-utils/db-setup.d.ts.map +1 -0
- package/dist/test-utils/db-setup.js +149 -0
- package/dist/test-utils/db-setup.js.map +1 -0
- package/dist/utils/logger.d.ts +63 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +199 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/safe-math.d.ts +31 -0
- package/dist/utils/safe-math.d.ts.map +1 -0
- package/dist/utils/safe-math.js +86 -0
- package/dist/utils/safe-math.js.map +1 -0
- package/dist/visualization/example.d.ts +9 -0
- package/dist/visualization/example.d.ts.map +1 -0
- package/dist/visualization/example.js +236 -0
- package/dist/visualization/example.js.map +1 -0
- package/dist/visualization/graphviz.d.ts +42 -0
- package/dist/visualization/graphviz.d.ts.map +1 -0
- package/dist/visualization/graphviz.js +403 -0
- package/dist/visualization/graphviz.js.map +1 -0
- package/dist/visualization/index.d.ts +10 -0
- package/dist/visualization/index.d.ts.map +1 -0
- package/dist/visualization/index.js +12 -0
- package/dist/visualization/index.js.map +1 -0
- package/package.json +99 -0
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure functional A2A types for JAF
|
|
3
|
+
* Maintains immutability and type safety
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export type A2AMessage = {
|
|
7
|
+
readonly role: 'user' | 'agent';
|
|
8
|
+
readonly parts: readonly A2APart[];
|
|
9
|
+
readonly messageId: string;
|
|
10
|
+
readonly contextId?: string;
|
|
11
|
+
readonly taskId?: string;
|
|
12
|
+
readonly kind: 'message';
|
|
13
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
14
|
+
readonly extensions?: readonly string[];
|
|
15
|
+
readonly referenceTaskIds?: readonly string[];
|
|
16
|
+
};
|
|
17
|
+
export type A2APart = {
|
|
18
|
+
readonly kind: 'text';
|
|
19
|
+
readonly text: string;
|
|
20
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: 'data';
|
|
23
|
+
readonly data: Readonly<Record<string, any>>;
|
|
24
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
25
|
+
} | {
|
|
26
|
+
readonly kind: 'file';
|
|
27
|
+
readonly file: A2AFile;
|
|
28
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
29
|
+
};
|
|
30
|
+
export type A2AFile = {
|
|
31
|
+
readonly bytes: string;
|
|
32
|
+
readonly name?: string;
|
|
33
|
+
readonly mimeType?: string;
|
|
34
|
+
} | {
|
|
35
|
+
readonly uri: string;
|
|
36
|
+
readonly name?: string;
|
|
37
|
+
readonly mimeType?: string;
|
|
38
|
+
};
|
|
39
|
+
export type TaskState = 'submitted' | 'working' | 'input-required' | 'completed' | 'canceled' | 'failed' | 'rejected' | 'auth-required' | 'unknown';
|
|
40
|
+
export type A2ATask = {
|
|
41
|
+
readonly id: string;
|
|
42
|
+
readonly contextId: string;
|
|
43
|
+
readonly status: {
|
|
44
|
+
readonly state: TaskState;
|
|
45
|
+
readonly message?: A2AMessage;
|
|
46
|
+
readonly timestamp?: string;
|
|
47
|
+
};
|
|
48
|
+
readonly history?: readonly A2AMessage[];
|
|
49
|
+
readonly artifacts?: readonly A2AArtifact[];
|
|
50
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
51
|
+
readonly kind: 'task';
|
|
52
|
+
};
|
|
53
|
+
export type A2AArtifact = {
|
|
54
|
+
readonly artifactId: string;
|
|
55
|
+
readonly name?: string;
|
|
56
|
+
readonly description?: string;
|
|
57
|
+
readonly parts: readonly A2APart[];
|
|
58
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
59
|
+
readonly extensions?: readonly string[];
|
|
60
|
+
};
|
|
61
|
+
export type AgentCard = {
|
|
62
|
+
readonly protocolVersion: string;
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly description: string;
|
|
65
|
+
readonly url: string;
|
|
66
|
+
readonly preferredTransport?: string;
|
|
67
|
+
readonly version: string;
|
|
68
|
+
readonly provider?: {
|
|
69
|
+
readonly organization: string;
|
|
70
|
+
readonly url: string;
|
|
71
|
+
};
|
|
72
|
+
readonly capabilities: {
|
|
73
|
+
readonly streaming?: boolean;
|
|
74
|
+
readonly pushNotifications?: boolean;
|
|
75
|
+
readonly stateTransitionHistory?: boolean;
|
|
76
|
+
};
|
|
77
|
+
readonly defaultInputModes: readonly string[];
|
|
78
|
+
readonly defaultOutputModes: readonly string[];
|
|
79
|
+
readonly skills: readonly AgentSkill[];
|
|
80
|
+
readonly securitySchemes?: Readonly<Record<string, any>>;
|
|
81
|
+
readonly security?: readonly Record<string, readonly string[]>[];
|
|
82
|
+
};
|
|
83
|
+
export type AgentSkill = {
|
|
84
|
+
readonly id: string;
|
|
85
|
+
readonly name: string;
|
|
86
|
+
readonly description: string;
|
|
87
|
+
readonly tags: readonly string[];
|
|
88
|
+
readonly examples?: readonly string[];
|
|
89
|
+
readonly inputModes?: readonly string[];
|
|
90
|
+
readonly outputModes?: readonly string[];
|
|
91
|
+
};
|
|
92
|
+
export type JSONRPCRequest = {
|
|
93
|
+
readonly jsonrpc: '2.0';
|
|
94
|
+
readonly id: string | number;
|
|
95
|
+
readonly method: string;
|
|
96
|
+
readonly params?: Readonly<Record<string, any>>;
|
|
97
|
+
};
|
|
98
|
+
export type JSONRPCResponse = {
|
|
99
|
+
readonly jsonrpc: '2.0';
|
|
100
|
+
readonly id: string | number | null;
|
|
101
|
+
} & ({
|
|
102
|
+
readonly result: any;
|
|
103
|
+
readonly error?: never;
|
|
104
|
+
} | {
|
|
105
|
+
readonly result?: never;
|
|
106
|
+
readonly error: JSONRPCError;
|
|
107
|
+
});
|
|
108
|
+
export type JSONRPCError = {
|
|
109
|
+
readonly code: number;
|
|
110
|
+
readonly message: string;
|
|
111
|
+
readonly data?: any;
|
|
112
|
+
};
|
|
113
|
+
export type SendMessageRequest = JSONRPCRequest & {
|
|
114
|
+
readonly method: 'message/send';
|
|
115
|
+
readonly params: {
|
|
116
|
+
readonly message: A2AMessage;
|
|
117
|
+
readonly configuration?: MessageSendConfiguration;
|
|
118
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export type SendStreamingMessageRequest = JSONRPCRequest & {
|
|
122
|
+
readonly method: 'message/stream';
|
|
123
|
+
readonly params: {
|
|
124
|
+
readonly message: A2AMessage;
|
|
125
|
+
readonly configuration?: MessageSendConfiguration;
|
|
126
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
export type MessageSendConfiguration = {
|
|
130
|
+
readonly acceptedOutputModes?: readonly string[];
|
|
131
|
+
readonly historyLength?: number;
|
|
132
|
+
readonly blocking?: boolean;
|
|
133
|
+
};
|
|
134
|
+
export type SendMessageResponse = JSONRPCResponse & {
|
|
135
|
+
readonly result: A2AMessage | A2ATask;
|
|
136
|
+
};
|
|
137
|
+
export type GetTaskRequest = JSONRPCRequest & {
|
|
138
|
+
readonly method: 'tasks/get';
|
|
139
|
+
readonly params: {
|
|
140
|
+
readonly id: string;
|
|
141
|
+
readonly historyLength?: number;
|
|
142
|
+
readonly metadata?: Readonly<Record<string, any>>;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export type GetTaskResponse = JSONRPCResponse & {
|
|
146
|
+
readonly result: A2ATask;
|
|
147
|
+
};
|
|
148
|
+
export type StreamEvent = {
|
|
149
|
+
readonly isTaskComplete: boolean;
|
|
150
|
+
readonly content?: any;
|
|
151
|
+
readonly updates?: string;
|
|
152
|
+
readonly newState?: AgentState;
|
|
153
|
+
readonly timestamp: string;
|
|
154
|
+
};
|
|
155
|
+
export type A2AStreamEvent = {
|
|
156
|
+
readonly kind: 'status-update';
|
|
157
|
+
readonly taskId: string;
|
|
158
|
+
readonly contextId: string;
|
|
159
|
+
readonly status: A2ATask['status'];
|
|
160
|
+
readonly final: boolean;
|
|
161
|
+
} | {
|
|
162
|
+
readonly kind: 'artifact-update';
|
|
163
|
+
readonly taskId: string;
|
|
164
|
+
readonly contextId: string;
|
|
165
|
+
readonly artifact: A2AArtifact;
|
|
166
|
+
readonly append?: boolean;
|
|
167
|
+
readonly lastChunk?: boolean;
|
|
168
|
+
} | {
|
|
169
|
+
readonly kind: 'message';
|
|
170
|
+
readonly message: A2AMessage;
|
|
171
|
+
};
|
|
172
|
+
export type AgentState = {
|
|
173
|
+
readonly sessionId: string;
|
|
174
|
+
readonly messages: readonly any[];
|
|
175
|
+
readonly context: Readonly<Record<string, any>>;
|
|
176
|
+
readonly artifacts: readonly any[];
|
|
177
|
+
readonly timestamp: string;
|
|
178
|
+
};
|
|
179
|
+
export type ToolContext = {
|
|
180
|
+
readonly actions: {
|
|
181
|
+
readonly requiresInput: boolean;
|
|
182
|
+
readonly skipSummarization: boolean;
|
|
183
|
+
readonly escalate: boolean;
|
|
184
|
+
};
|
|
185
|
+
readonly metadata: Readonly<Record<string, any>>;
|
|
186
|
+
};
|
|
187
|
+
export type A2AToolResult = {
|
|
188
|
+
readonly result: any;
|
|
189
|
+
readonly context?: ToolContext;
|
|
190
|
+
};
|
|
191
|
+
export type A2AAgentTool = {
|
|
192
|
+
readonly name: string;
|
|
193
|
+
readonly description: string;
|
|
194
|
+
readonly parameters: z.ZodType<any>;
|
|
195
|
+
readonly execute: (args: any, context?: ToolContext) => Promise<any | A2AToolResult>;
|
|
196
|
+
};
|
|
197
|
+
export type A2AAgent = {
|
|
198
|
+
readonly name: string;
|
|
199
|
+
readonly description: string;
|
|
200
|
+
readonly supportedContentTypes: readonly string[];
|
|
201
|
+
readonly instruction: string;
|
|
202
|
+
readonly tools: readonly A2AAgentTool[];
|
|
203
|
+
};
|
|
204
|
+
export type A2AServerConfig = {
|
|
205
|
+
readonly agents: ReadonlyMap<string, A2AAgent>;
|
|
206
|
+
readonly agentCard: {
|
|
207
|
+
readonly name: string;
|
|
208
|
+
readonly description: string;
|
|
209
|
+
readonly version: string;
|
|
210
|
+
readonly provider: {
|
|
211
|
+
readonly organization: string;
|
|
212
|
+
readonly url: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
readonly port: number;
|
|
216
|
+
readonly host?: string;
|
|
217
|
+
readonly capabilities?: Partial<AgentCard['capabilities']>;
|
|
218
|
+
readonly taskProvider?: {
|
|
219
|
+
readonly type: 'memory' | 'redis' | 'postgres';
|
|
220
|
+
readonly config?: any;
|
|
221
|
+
readonly externalClients?: {
|
|
222
|
+
readonly redis?: any;
|
|
223
|
+
readonly postgres?: any;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
export type A2AClientConfig = {
|
|
228
|
+
readonly baseUrl: string;
|
|
229
|
+
readonly timeout?: number;
|
|
230
|
+
};
|
|
231
|
+
export type A2AClientState = {
|
|
232
|
+
readonly config: A2AClientConfig;
|
|
233
|
+
readonly sessionId: string;
|
|
234
|
+
};
|
|
235
|
+
export declare const A2AErrorCodes: {
|
|
236
|
+
readonly PARSE_ERROR: -32700;
|
|
237
|
+
readonly INVALID_REQUEST: -32600;
|
|
238
|
+
readonly METHOD_NOT_FOUND: -32601;
|
|
239
|
+
readonly INVALID_PARAMS: -32602;
|
|
240
|
+
readonly INTERNAL_ERROR: -32603;
|
|
241
|
+
readonly TASK_NOT_FOUND: -32001;
|
|
242
|
+
readonly TASK_NOT_CANCELABLE: -32002;
|
|
243
|
+
readonly PUSH_NOTIFICATION_NOT_SUPPORTED: -32003;
|
|
244
|
+
readonly UNSUPPORTED_OPERATION: -32004;
|
|
245
|
+
readonly CONTENT_TYPE_NOT_SUPPORTED: -32005;
|
|
246
|
+
readonly INVALID_AGENT_RESPONSE: -32006;
|
|
247
|
+
};
|
|
248
|
+
export type A2AError = {
|
|
249
|
+
readonly code: typeof A2AErrorCodes[keyof typeof A2AErrorCodes];
|
|
250
|
+
readonly message: string;
|
|
251
|
+
readonly data?: any;
|
|
252
|
+
};
|
|
253
|
+
export declare const a2aMessageSchema: z.ZodObject<{
|
|
254
|
+
role: z.ZodEnum<["user", "agent"]>;
|
|
255
|
+
parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
256
|
+
kind: z.ZodLiteral<"text">;
|
|
257
|
+
text: z.ZodString;
|
|
258
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
259
|
+
}, "strip", z.ZodTypeAny, {
|
|
260
|
+
text: string;
|
|
261
|
+
kind: "text";
|
|
262
|
+
metadata?: Record<string, any> | undefined;
|
|
263
|
+
}, {
|
|
264
|
+
text: string;
|
|
265
|
+
kind: "text";
|
|
266
|
+
metadata?: Record<string, any> | undefined;
|
|
267
|
+
}>, z.ZodObject<{
|
|
268
|
+
kind: z.ZodLiteral<"data">;
|
|
269
|
+
data: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
270
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
271
|
+
}, "strip", z.ZodTypeAny, {
|
|
272
|
+
data: Record<string, any>;
|
|
273
|
+
kind: "data";
|
|
274
|
+
metadata?: Record<string, any> | undefined;
|
|
275
|
+
}, {
|
|
276
|
+
data: Record<string, any>;
|
|
277
|
+
kind: "data";
|
|
278
|
+
metadata?: Record<string, any> | undefined;
|
|
279
|
+
}>, z.ZodObject<{
|
|
280
|
+
kind: z.ZodLiteral<"file">;
|
|
281
|
+
file: z.ZodUnion<[z.ZodObject<{
|
|
282
|
+
bytes: z.ZodString;
|
|
283
|
+
name: z.ZodOptional<z.ZodString>;
|
|
284
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
|
286
|
+
bytes: string;
|
|
287
|
+
name?: string | undefined;
|
|
288
|
+
mimeType?: string | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
bytes: string;
|
|
291
|
+
name?: string | undefined;
|
|
292
|
+
mimeType?: string | undefined;
|
|
293
|
+
}>, z.ZodObject<{
|
|
294
|
+
uri: z.ZodString;
|
|
295
|
+
name: z.ZodOptional<z.ZodString>;
|
|
296
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
297
|
+
}, "strip", z.ZodTypeAny, {
|
|
298
|
+
uri: string;
|
|
299
|
+
name?: string | undefined;
|
|
300
|
+
mimeType?: string | undefined;
|
|
301
|
+
}, {
|
|
302
|
+
uri: string;
|
|
303
|
+
name?: string | undefined;
|
|
304
|
+
mimeType?: string | undefined;
|
|
305
|
+
}>]>;
|
|
306
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
|
308
|
+
file: {
|
|
309
|
+
bytes: string;
|
|
310
|
+
name?: string | undefined;
|
|
311
|
+
mimeType?: string | undefined;
|
|
312
|
+
} | {
|
|
313
|
+
uri: string;
|
|
314
|
+
name?: string | undefined;
|
|
315
|
+
mimeType?: string | undefined;
|
|
316
|
+
};
|
|
317
|
+
kind: "file";
|
|
318
|
+
metadata?: Record<string, any> | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
file: {
|
|
321
|
+
bytes: string;
|
|
322
|
+
name?: string | undefined;
|
|
323
|
+
mimeType?: string | undefined;
|
|
324
|
+
} | {
|
|
325
|
+
uri: string;
|
|
326
|
+
name?: string | undefined;
|
|
327
|
+
mimeType?: string | undefined;
|
|
328
|
+
};
|
|
329
|
+
kind: "file";
|
|
330
|
+
metadata?: Record<string, any> | undefined;
|
|
331
|
+
}>]>, "many">;
|
|
332
|
+
messageId: z.ZodString;
|
|
333
|
+
contextId: z.ZodOptional<z.ZodString>;
|
|
334
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
335
|
+
kind: z.ZodLiteral<"message">;
|
|
336
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
337
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
338
|
+
referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
339
|
+
}, "strip", z.ZodTypeAny, {
|
|
340
|
+
role: "user" | "agent";
|
|
341
|
+
parts: ({
|
|
342
|
+
text: string;
|
|
343
|
+
kind: "text";
|
|
344
|
+
metadata?: Record<string, any> | undefined;
|
|
345
|
+
} | {
|
|
346
|
+
data: Record<string, any>;
|
|
347
|
+
kind: "data";
|
|
348
|
+
metadata?: Record<string, any> | undefined;
|
|
349
|
+
} | {
|
|
350
|
+
file: {
|
|
351
|
+
bytes: string;
|
|
352
|
+
name?: string | undefined;
|
|
353
|
+
mimeType?: string | undefined;
|
|
354
|
+
} | {
|
|
355
|
+
uri: string;
|
|
356
|
+
name?: string | undefined;
|
|
357
|
+
mimeType?: string | undefined;
|
|
358
|
+
};
|
|
359
|
+
kind: "file";
|
|
360
|
+
metadata?: Record<string, any> | undefined;
|
|
361
|
+
})[];
|
|
362
|
+
kind: "message";
|
|
363
|
+
messageId: string;
|
|
364
|
+
metadata?: Record<string, any> | undefined;
|
|
365
|
+
contextId?: string | undefined;
|
|
366
|
+
taskId?: string | undefined;
|
|
367
|
+
extensions?: string[] | undefined;
|
|
368
|
+
referenceTaskIds?: string[] | undefined;
|
|
369
|
+
}, {
|
|
370
|
+
role: "user" | "agent";
|
|
371
|
+
parts: ({
|
|
372
|
+
text: string;
|
|
373
|
+
kind: "text";
|
|
374
|
+
metadata?: Record<string, any> | undefined;
|
|
375
|
+
} | {
|
|
376
|
+
data: Record<string, any>;
|
|
377
|
+
kind: "data";
|
|
378
|
+
metadata?: Record<string, any> | undefined;
|
|
379
|
+
} | {
|
|
380
|
+
file: {
|
|
381
|
+
bytes: string;
|
|
382
|
+
name?: string | undefined;
|
|
383
|
+
mimeType?: string | undefined;
|
|
384
|
+
} | {
|
|
385
|
+
uri: string;
|
|
386
|
+
name?: string | undefined;
|
|
387
|
+
mimeType?: string | undefined;
|
|
388
|
+
};
|
|
389
|
+
kind: "file";
|
|
390
|
+
metadata?: Record<string, any> | undefined;
|
|
391
|
+
})[];
|
|
392
|
+
kind: "message";
|
|
393
|
+
messageId: string;
|
|
394
|
+
metadata?: Record<string, any> | undefined;
|
|
395
|
+
contextId?: string | undefined;
|
|
396
|
+
taskId?: string | undefined;
|
|
397
|
+
extensions?: string[] | undefined;
|
|
398
|
+
referenceTaskIds?: string[] | undefined;
|
|
399
|
+
}>;
|
|
400
|
+
export declare const sendMessageRequestSchema: z.ZodObject<{
|
|
401
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
402
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
403
|
+
method: z.ZodLiteral<"message/send">;
|
|
404
|
+
params: z.ZodObject<{
|
|
405
|
+
message: z.ZodObject<{
|
|
406
|
+
role: z.ZodEnum<["user", "agent"]>;
|
|
407
|
+
parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
408
|
+
kind: z.ZodLiteral<"text">;
|
|
409
|
+
text: z.ZodString;
|
|
410
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
411
|
+
}, "strip", z.ZodTypeAny, {
|
|
412
|
+
text: string;
|
|
413
|
+
kind: "text";
|
|
414
|
+
metadata?: Record<string, any> | undefined;
|
|
415
|
+
}, {
|
|
416
|
+
text: string;
|
|
417
|
+
kind: "text";
|
|
418
|
+
metadata?: Record<string, any> | undefined;
|
|
419
|
+
}>, z.ZodObject<{
|
|
420
|
+
kind: z.ZodLiteral<"data">;
|
|
421
|
+
data: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
422
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
423
|
+
}, "strip", z.ZodTypeAny, {
|
|
424
|
+
data: Record<string, any>;
|
|
425
|
+
kind: "data";
|
|
426
|
+
metadata?: Record<string, any> | undefined;
|
|
427
|
+
}, {
|
|
428
|
+
data: Record<string, any>;
|
|
429
|
+
kind: "data";
|
|
430
|
+
metadata?: Record<string, any> | undefined;
|
|
431
|
+
}>, z.ZodObject<{
|
|
432
|
+
kind: z.ZodLiteral<"file">;
|
|
433
|
+
file: z.ZodUnion<[z.ZodObject<{
|
|
434
|
+
bytes: z.ZodString;
|
|
435
|
+
name: z.ZodOptional<z.ZodString>;
|
|
436
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
bytes: string;
|
|
439
|
+
name?: string | undefined;
|
|
440
|
+
mimeType?: string | undefined;
|
|
441
|
+
}, {
|
|
442
|
+
bytes: string;
|
|
443
|
+
name?: string | undefined;
|
|
444
|
+
mimeType?: string | undefined;
|
|
445
|
+
}>, z.ZodObject<{
|
|
446
|
+
uri: z.ZodString;
|
|
447
|
+
name: z.ZodOptional<z.ZodString>;
|
|
448
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
449
|
+
}, "strip", z.ZodTypeAny, {
|
|
450
|
+
uri: string;
|
|
451
|
+
name?: string | undefined;
|
|
452
|
+
mimeType?: string | undefined;
|
|
453
|
+
}, {
|
|
454
|
+
uri: string;
|
|
455
|
+
name?: string | undefined;
|
|
456
|
+
mimeType?: string | undefined;
|
|
457
|
+
}>]>;
|
|
458
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
459
|
+
}, "strip", z.ZodTypeAny, {
|
|
460
|
+
file: {
|
|
461
|
+
bytes: string;
|
|
462
|
+
name?: string | undefined;
|
|
463
|
+
mimeType?: string | undefined;
|
|
464
|
+
} | {
|
|
465
|
+
uri: string;
|
|
466
|
+
name?: string | undefined;
|
|
467
|
+
mimeType?: string | undefined;
|
|
468
|
+
};
|
|
469
|
+
kind: "file";
|
|
470
|
+
metadata?: Record<string, any> | undefined;
|
|
471
|
+
}, {
|
|
472
|
+
file: {
|
|
473
|
+
bytes: string;
|
|
474
|
+
name?: string | undefined;
|
|
475
|
+
mimeType?: string | undefined;
|
|
476
|
+
} | {
|
|
477
|
+
uri: string;
|
|
478
|
+
name?: string | undefined;
|
|
479
|
+
mimeType?: string | undefined;
|
|
480
|
+
};
|
|
481
|
+
kind: "file";
|
|
482
|
+
metadata?: Record<string, any> | undefined;
|
|
483
|
+
}>]>, "many">;
|
|
484
|
+
messageId: z.ZodString;
|
|
485
|
+
contextId: z.ZodOptional<z.ZodString>;
|
|
486
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
487
|
+
kind: z.ZodLiteral<"message">;
|
|
488
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
489
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
490
|
+
referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
491
|
+
}, "strip", z.ZodTypeAny, {
|
|
492
|
+
role: "user" | "agent";
|
|
493
|
+
parts: ({
|
|
494
|
+
text: string;
|
|
495
|
+
kind: "text";
|
|
496
|
+
metadata?: Record<string, any> | undefined;
|
|
497
|
+
} | {
|
|
498
|
+
data: Record<string, any>;
|
|
499
|
+
kind: "data";
|
|
500
|
+
metadata?: Record<string, any> | undefined;
|
|
501
|
+
} | {
|
|
502
|
+
file: {
|
|
503
|
+
bytes: string;
|
|
504
|
+
name?: string | undefined;
|
|
505
|
+
mimeType?: string | undefined;
|
|
506
|
+
} | {
|
|
507
|
+
uri: string;
|
|
508
|
+
name?: string | undefined;
|
|
509
|
+
mimeType?: string | undefined;
|
|
510
|
+
};
|
|
511
|
+
kind: "file";
|
|
512
|
+
metadata?: Record<string, any> | undefined;
|
|
513
|
+
})[];
|
|
514
|
+
kind: "message";
|
|
515
|
+
messageId: string;
|
|
516
|
+
metadata?: Record<string, any> | undefined;
|
|
517
|
+
contextId?: string | undefined;
|
|
518
|
+
taskId?: string | undefined;
|
|
519
|
+
extensions?: string[] | undefined;
|
|
520
|
+
referenceTaskIds?: string[] | undefined;
|
|
521
|
+
}, {
|
|
522
|
+
role: "user" | "agent";
|
|
523
|
+
parts: ({
|
|
524
|
+
text: string;
|
|
525
|
+
kind: "text";
|
|
526
|
+
metadata?: Record<string, any> | undefined;
|
|
527
|
+
} | {
|
|
528
|
+
data: Record<string, any>;
|
|
529
|
+
kind: "data";
|
|
530
|
+
metadata?: Record<string, any> | undefined;
|
|
531
|
+
} | {
|
|
532
|
+
file: {
|
|
533
|
+
bytes: string;
|
|
534
|
+
name?: string | undefined;
|
|
535
|
+
mimeType?: string | undefined;
|
|
536
|
+
} | {
|
|
537
|
+
uri: string;
|
|
538
|
+
name?: string | undefined;
|
|
539
|
+
mimeType?: string | undefined;
|
|
540
|
+
};
|
|
541
|
+
kind: "file";
|
|
542
|
+
metadata?: Record<string, any> | undefined;
|
|
543
|
+
})[];
|
|
544
|
+
kind: "message";
|
|
545
|
+
messageId: string;
|
|
546
|
+
metadata?: Record<string, any> | undefined;
|
|
547
|
+
contextId?: string | undefined;
|
|
548
|
+
taskId?: string | undefined;
|
|
549
|
+
extensions?: string[] | undefined;
|
|
550
|
+
referenceTaskIds?: string[] | undefined;
|
|
551
|
+
}>;
|
|
552
|
+
configuration: z.ZodOptional<z.ZodObject<{
|
|
553
|
+
acceptedOutputModes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
554
|
+
historyLength: z.ZodOptional<z.ZodNumber>;
|
|
555
|
+
blocking: z.ZodOptional<z.ZodBoolean>;
|
|
556
|
+
}, "strip", z.ZodTypeAny, {
|
|
557
|
+
acceptedOutputModes?: string[] | undefined;
|
|
558
|
+
historyLength?: number | undefined;
|
|
559
|
+
blocking?: boolean | undefined;
|
|
560
|
+
}, {
|
|
561
|
+
acceptedOutputModes?: string[] | undefined;
|
|
562
|
+
historyLength?: number | undefined;
|
|
563
|
+
blocking?: boolean | undefined;
|
|
564
|
+
}>>;
|
|
565
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
566
|
+
}, "strip", z.ZodTypeAny, {
|
|
567
|
+
message: {
|
|
568
|
+
role: "user" | "agent";
|
|
569
|
+
parts: ({
|
|
570
|
+
text: string;
|
|
571
|
+
kind: "text";
|
|
572
|
+
metadata?: Record<string, any> | undefined;
|
|
573
|
+
} | {
|
|
574
|
+
data: Record<string, any>;
|
|
575
|
+
kind: "data";
|
|
576
|
+
metadata?: Record<string, any> | undefined;
|
|
577
|
+
} | {
|
|
578
|
+
file: {
|
|
579
|
+
bytes: string;
|
|
580
|
+
name?: string | undefined;
|
|
581
|
+
mimeType?: string | undefined;
|
|
582
|
+
} | {
|
|
583
|
+
uri: string;
|
|
584
|
+
name?: string | undefined;
|
|
585
|
+
mimeType?: string | undefined;
|
|
586
|
+
};
|
|
587
|
+
kind: "file";
|
|
588
|
+
metadata?: Record<string, any> | undefined;
|
|
589
|
+
})[];
|
|
590
|
+
kind: "message";
|
|
591
|
+
messageId: string;
|
|
592
|
+
metadata?: Record<string, any> | undefined;
|
|
593
|
+
contextId?: string | undefined;
|
|
594
|
+
taskId?: string | undefined;
|
|
595
|
+
extensions?: string[] | undefined;
|
|
596
|
+
referenceTaskIds?: string[] | undefined;
|
|
597
|
+
};
|
|
598
|
+
metadata?: Record<string, any> | undefined;
|
|
599
|
+
configuration?: {
|
|
600
|
+
acceptedOutputModes?: string[] | undefined;
|
|
601
|
+
historyLength?: number | undefined;
|
|
602
|
+
blocking?: boolean | undefined;
|
|
603
|
+
} | undefined;
|
|
604
|
+
}, {
|
|
605
|
+
message: {
|
|
606
|
+
role: "user" | "agent";
|
|
607
|
+
parts: ({
|
|
608
|
+
text: string;
|
|
609
|
+
kind: "text";
|
|
610
|
+
metadata?: Record<string, any> | undefined;
|
|
611
|
+
} | {
|
|
612
|
+
data: Record<string, any>;
|
|
613
|
+
kind: "data";
|
|
614
|
+
metadata?: Record<string, any> | undefined;
|
|
615
|
+
} | {
|
|
616
|
+
file: {
|
|
617
|
+
bytes: string;
|
|
618
|
+
name?: string | undefined;
|
|
619
|
+
mimeType?: string | undefined;
|
|
620
|
+
} | {
|
|
621
|
+
uri: string;
|
|
622
|
+
name?: string | undefined;
|
|
623
|
+
mimeType?: string | undefined;
|
|
624
|
+
};
|
|
625
|
+
kind: "file";
|
|
626
|
+
metadata?: Record<string, any> | undefined;
|
|
627
|
+
})[];
|
|
628
|
+
kind: "message";
|
|
629
|
+
messageId: string;
|
|
630
|
+
metadata?: Record<string, any> | undefined;
|
|
631
|
+
contextId?: string | undefined;
|
|
632
|
+
taskId?: string | undefined;
|
|
633
|
+
extensions?: string[] | undefined;
|
|
634
|
+
referenceTaskIds?: string[] | undefined;
|
|
635
|
+
};
|
|
636
|
+
metadata?: Record<string, any> | undefined;
|
|
637
|
+
configuration?: {
|
|
638
|
+
acceptedOutputModes?: string[] | undefined;
|
|
639
|
+
historyLength?: number | undefined;
|
|
640
|
+
blocking?: boolean | undefined;
|
|
641
|
+
} | undefined;
|
|
642
|
+
}>;
|
|
643
|
+
}, "strip", z.ZodTypeAny, {
|
|
644
|
+
params: {
|
|
645
|
+
message: {
|
|
646
|
+
role: "user" | "agent";
|
|
647
|
+
parts: ({
|
|
648
|
+
text: string;
|
|
649
|
+
kind: "text";
|
|
650
|
+
metadata?: Record<string, any> | undefined;
|
|
651
|
+
} | {
|
|
652
|
+
data: Record<string, any>;
|
|
653
|
+
kind: "data";
|
|
654
|
+
metadata?: Record<string, any> | undefined;
|
|
655
|
+
} | {
|
|
656
|
+
file: {
|
|
657
|
+
bytes: string;
|
|
658
|
+
name?: string | undefined;
|
|
659
|
+
mimeType?: string | undefined;
|
|
660
|
+
} | {
|
|
661
|
+
uri: string;
|
|
662
|
+
name?: string | undefined;
|
|
663
|
+
mimeType?: string | undefined;
|
|
664
|
+
};
|
|
665
|
+
kind: "file";
|
|
666
|
+
metadata?: Record<string, any> | undefined;
|
|
667
|
+
})[];
|
|
668
|
+
kind: "message";
|
|
669
|
+
messageId: string;
|
|
670
|
+
metadata?: Record<string, any> | undefined;
|
|
671
|
+
contextId?: string | undefined;
|
|
672
|
+
taskId?: string | undefined;
|
|
673
|
+
extensions?: string[] | undefined;
|
|
674
|
+
referenceTaskIds?: string[] | undefined;
|
|
675
|
+
};
|
|
676
|
+
metadata?: Record<string, any> | undefined;
|
|
677
|
+
configuration?: {
|
|
678
|
+
acceptedOutputModes?: string[] | undefined;
|
|
679
|
+
historyLength?: number | undefined;
|
|
680
|
+
blocking?: boolean | undefined;
|
|
681
|
+
} | undefined;
|
|
682
|
+
};
|
|
683
|
+
id: string | number;
|
|
684
|
+
method: "message/send";
|
|
685
|
+
jsonrpc: "2.0";
|
|
686
|
+
}, {
|
|
687
|
+
params: {
|
|
688
|
+
message: {
|
|
689
|
+
role: "user" | "agent";
|
|
690
|
+
parts: ({
|
|
691
|
+
text: string;
|
|
692
|
+
kind: "text";
|
|
693
|
+
metadata?: Record<string, any> | undefined;
|
|
694
|
+
} | {
|
|
695
|
+
data: Record<string, any>;
|
|
696
|
+
kind: "data";
|
|
697
|
+
metadata?: Record<string, any> | undefined;
|
|
698
|
+
} | {
|
|
699
|
+
file: {
|
|
700
|
+
bytes: string;
|
|
701
|
+
name?: string | undefined;
|
|
702
|
+
mimeType?: string | undefined;
|
|
703
|
+
} | {
|
|
704
|
+
uri: string;
|
|
705
|
+
name?: string | undefined;
|
|
706
|
+
mimeType?: string | undefined;
|
|
707
|
+
};
|
|
708
|
+
kind: "file";
|
|
709
|
+
metadata?: Record<string, any> | undefined;
|
|
710
|
+
})[];
|
|
711
|
+
kind: "message";
|
|
712
|
+
messageId: string;
|
|
713
|
+
metadata?: Record<string, any> | undefined;
|
|
714
|
+
contextId?: string | undefined;
|
|
715
|
+
taskId?: string | undefined;
|
|
716
|
+
extensions?: string[] | undefined;
|
|
717
|
+
referenceTaskIds?: string[] | undefined;
|
|
718
|
+
};
|
|
719
|
+
metadata?: Record<string, any> | undefined;
|
|
720
|
+
configuration?: {
|
|
721
|
+
acceptedOutputModes?: string[] | undefined;
|
|
722
|
+
historyLength?: number | undefined;
|
|
723
|
+
blocking?: boolean | undefined;
|
|
724
|
+
} | undefined;
|
|
725
|
+
};
|
|
726
|
+
id: string | number;
|
|
727
|
+
method: "message/send";
|
|
728
|
+
jsonrpc: "2.0";
|
|
729
|
+
}>;
|
|
730
|
+
//# sourceMappingURL=types.d.ts.map
|