@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,343 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure functional A2A server integration with JAF
|
|
3
|
+
* Extends JAF server with A2A protocol support
|
|
4
|
+
*/
|
|
5
|
+
import { FastifyInstance } from 'fastify';
|
|
6
|
+
import type { A2AServerConfig, JSONRPCRequest, JSONRPCResponse, A2AAgent } from './types.js';
|
|
7
|
+
export declare const createA2AServerConfig: (config: A2AServerConfig) => Promise<{
|
|
8
|
+
host: string;
|
|
9
|
+
capabilities: Partial<{
|
|
10
|
+
readonly streaming?: boolean;
|
|
11
|
+
readonly pushNotifications?: boolean;
|
|
12
|
+
readonly stateTransitionHistory?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
agentCard: {
|
|
15
|
+
capabilities: Partial<{
|
|
16
|
+
readonly streaming?: boolean;
|
|
17
|
+
readonly pushNotifications?: boolean;
|
|
18
|
+
readonly stateTransitionHistory?: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
protocolVersion: string;
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
url: string;
|
|
24
|
+
preferredTransport?: string;
|
|
25
|
+
version: string;
|
|
26
|
+
provider?: {
|
|
27
|
+
readonly organization: string;
|
|
28
|
+
readonly url: string;
|
|
29
|
+
};
|
|
30
|
+
defaultInputModes: readonly string[];
|
|
31
|
+
defaultOutputModes: readonly string[];
|
|
32
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
33
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
34
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
35
|
+
};
|
|
36
|
+
taskProvider: import("./index.js").A2ATaskProvider;
|
|
37
|
+
protocolHandler: {
|
|
38
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
39
|
+
modelProvider: any;
|
|
40
|
+
agentCard: any;
|
|
41
|
+
taskProvider: import("./index.js").A2ATaskProvider | undefined;
|
|
42
|
+
handleRequest: (request: JSONRPCRequest, agentName?: string) => Promise<JSONRPCResponse> | AsyncGenerator<JSONRPCResponse, void, unknown>;
|
|
43
|
+
};
|
|
44
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
45
|
+
port: number;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const createA2AServer: (config: A2AServerConfig) => Promise<{
|
|
48
|
+
app: FastifyInstance<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault>;
|
|
49
|
+
config: {
|
|
50
|
+
host: string;
|
|
51
|
+
capabilities: Partial<{
|
|
52
|
+
readonly streaming?: boolean;
|
|
53
|
+
readonly pushNotifications?: boolean;
|
|
54
|
+
readonly stateTransitionHistory?: boolean;
|
|
55
|
+
}>;
|
|
56
|
+
agentCard: {
|
|
57
|
+
capabilities: Partial<{
|
|
58
|
+
readonly streaming?: boolean;
|
|
59
|
+
readonly pushNotifications?: boolean;
|
|
60
|
+
readonly stateTransitionHistory?: boolean;
|
|
61
|
+
}>;
|
|
62
|
+
protocolVersion: string;
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
url: string;
|
|
66
|
+
preferredTransport?: string;
|
|
67
|
+
version: string;
|
|
68
|
+
provider?: {
|
|
69
|
+
readonly organization: string;
|
|
70
|
+
readonly url: string;
|
|
71
|
+
};
|
|
72
|
+
defaultInputModes: readonly string[];
|
|
73
|
+
defaultOutputModes: readonly string[];
|
|
74
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
75
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
76
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
77
|
+
};
|
|
78
|
+
taskProvider: import("./index.js").A2ATaskProvider;
|
|
79
|
+
protocolHandler: {
|
|
80
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
81
|
+
modelProvider: any;
|
|
82
|
+
agentCard: any;
|
|
83
|
+
taskProvider: import("./index.js").A2ATaskProvider | undefined;
|
|
84
|
+
handleRequest: (request: JSONRPCRequest, agentName?: string) => Promise<JSONRPCResponse> | AsyncGenerator<JSONRPCResponse, void, unknown>;
|
|
85
|
+
};
|
|
86
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
87
|
+
port: number;
|
|
88
|
+
};
|
|
89
|
+
start: () => Promise<void>;
|
|
90
|
+
stop: () => Promise<void>;
|
|
91
|
+
addAgent: (name: string, agent: A2AAgent) => {
|
|
92
|
+
host: string;
|
|
93
|
+
capabilities: Partial<{
|
|
94
|
+
readonly streaming?: boolean;
|
|
95
|
+
readonly pushNotifications?: boolean;
|
|
96
|
+
readonly stateTransitionHistory?: boolean;
|
|
97
|
+
}>;
|
|
98
|
+
agentCard: {
|
|
99
|
+
capabilities: Partial<{
|
|
100
|
+
readonly streaming?: boolean;
|
|
101
|
+
readonly pushNotifications?: boolean;
|
|
102
|
+
readonly stateTransitionHistory?: boolean;
|
|
103
|
+
}>;
|
|
104
|
+
protocolVersion: string;
|
|
105
|
+
name: string;
|
|
106
|
+
description: string;
|
|
107
|
+
url: string;
|
|
108
|
+
preferredTransport?: string;
|
|
109
|
+
version: string;
|
|
110
|
+
provider?: {
|
|
111
|
+
readonly organization: string;
|
|
112
|
+
readonly url: string;
|
|
113
|
+
};
|
|
114
|
+
defaultInputModes: readonly string[];
|
|
115
|
+
defaultOutputModes: readonly string[];
|
|
116
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
117
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
118
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
119
|
+
};
|
|
120
|
+
taskProvider: import("./index.js").A2ATaskProvider;
|
|
121
|
+
protocolHandler: {
|
|
122
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
123
|
+
modelProvider: any;
|
|
124
|
+
agentCard: any;
|
|
125
|
+
taskProvider: import("./index.js").A2ATaskProvider | undefined;
|
|
126
|
+
handleRequest: (request: JSONRPCRequest, agentName?: string) => Promise<JSONRPCResponse> | AsyncGenerator<JSONRPCResponse, void, unknown>;
|
|
127
|
+
};
|
|
128
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
129
|
+
port: number;
|
|
130
|
+
};
|
|
131
|
+
removeAgent: (name: string) => {
|
|
132
|
+
host: string;
|
|
133
|
+
capabilities: Partial<{
|
|
134
|
+
readonly streaming?: boolean;
|
|
135
|
+
readonly pushNotifications?: boolean;
|
|
136
|
+
readonly stateTransitionHistory?: boolean;
|
|
137
|
+
}>;
|
|
138
|
+
agentCard: {
|
|
139
|
+
capabilities: Partial<{
|
|
140
|
+
readonly streaming?: boolean;
|
|
141
|
+
readonly pushNotifications?: boolean;
|
|
142
|
+
readonly stateTransitionHistory?: boolean;
|
|
143
|
+
}>;
|
|
144
|
+
protocolVersion: string;
|
|
145
|
+
name: string;
|
|
146
|
+
description: string;
|
|
147
|
+
url: string;
|
|
148
|
+
preferredTransport?: string;
|
|
149
|
+
version: string;
|
|
150
|
+
provider?: {
|
|
151
|
+
readonly organization: string;
|
|
152
|
+
readonly url: string;
|
|
153
|
+
};
|
|
154
|
+
defaultInputModes: readonly string[];
|
|
155
|
+
defaultOutputModes: readonly string[];
|
|
156
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
157
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
158
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
159
|
+
};
|
|
160
|
+
taskProvider: import("./index.js").A2ATaskProvider;
|
|
161
|
+
protocolHandler: {
|
|
162
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
163
|
+
modelProvider: any;
|
|
164
|
+
agentCard: any;
|
|
165
|
+
taskProvider: import("./index.js").A2ATaskProvider | undefined;
|
|
166
|
+
handleRequest: (request: JSONRPCRequest, agentName?: string) => Promise<JSONRPCResponse> | AsyncGenerator<JSONRPCResponse, void, unknown>;
|
|
167
|
+
};
|
|
168
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
169
|
+
port: number;
|
|
170
|
+
};
|
|
171
|
+
getAgentCard: () => {
|
|
172
|
+
capabilities: Partial<{
|
|
173
|
+
readonly streaming?: boolean;
|
|
174
|
+
readonly pushNotifications?: boolean;
|
|
175
|
+
readonly stateTransitionHistory?: boolean;
|
|
176
|
+
}>;
|
|
177
|
+
protocolVersion: string;
|
|
178
|
+
name: string;
|
|
179
|
+
description: string;
|
|
180
|
+
url: string;
|
|
181
|
+
preferredTransport?: string;
|
|
182
|
+
version: string;
|
|
183
|
+
provider?: {
|
|
184
|
+
readonly organization: string;
|
|
185
|
+
readonly url: string;
|
|
186
|
+
};
|
|
187
|
+
defaultInputModes: readonly string[];
|
|
188
|
+
defaultOutputModes: readonly string[];
|
|
189
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
190
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
191
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
192
|
+
};
|
|
193
|
+
handleRequest: (request: JSONRPCRequest) => Promise<JSONRPCResponse | AsyncIterable<JSONRPCResponse>>;
|
|
194
|
+
}>;
|
|
195
|
+
export declare const startA2AServer: (config: A2AServerConfig) => Promise<{
|
|
196
|
+
app: FastifyInstance<import("fastify").RawServerDefault, import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault>;
|
|
197
|
+
config: {
|
|
198
|
+
host: string;
|
|
199
|
+
capabilities: Partial<{
|
|
200
|
+
readonly streaming?: boolean;
|
|
201
|
+
readonly pushNotifications?: boolean;
|
|
202
|
+
readonly stateTransitionHistory?: boolean;
|
|
203
|
+
}>;
|
|
204
|
+
agentCard: {
|
|
205
|
+
capabilities: Partial<{
|
|
206
|
+
readonly streaming?: boolean;
|
|
207
|
+
readonly pushNotifications?: boolean;
|
|
208
|
+
readonly stateTransitionHistory?: boolean;
|
|
209
|
+
}>;
|
|
210
|
+
protocolVersion: string;
|
|
211
|
+
name: string;
|
|
212
|
+
description: string;
|
|
213
|
+
url: string;
|
|
214
|
+
preferredTransport?: string;
|
|
215
|
+
version: string;
|
|
216
|
+
provider?: {
|
|
217
|
+
readonly organization: string;
|
|
218
|
+
readonly url: string;
|
|
219
|
+
};
|
|
220
|
+
defaultInputModes: readonly string[];
|
|
221
|
+
defaultOutputModes: readonly string[];
|
|
222
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
223
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
224
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
225
|
+
};
|
|
226
|
+
taskProvider: import("./index.js").A2ATaskProvider;
|
|
227
|
+
protocolHandler: {
|
|
228
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
229
|
+
modelProvider: any;
|
|
230
|
+
agentCard: any;
|
|
231
|
+
taskProvider: import("./index.js").A2ATaskProvider | undefined;
|
|
232
|
+
handleRequest: (request: JSONRPCRequest, agentName?: string) => Promise<JSONRPCResponse> | AsyncGenerator<JSONRPCResponse, void, unknown>;
|
|
233
|
+
};
|
|
234
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
235
|
+
port: number;
|
|
236
|
+
};
|
|
237
|
+
start: () => Promise<void>;
|
|
238
|
+
stop: () => Promise<void>;
|
|
239
|
+
addAgent: (name: string, agent: A2AAgent) => {
|
|
240
|
+
host: string;
|
|
241
|
+
capabilities: Partial<{
|
|
242
|
+
readonly streaming?: boolean;
|
|
243
|
+
readonly pushNotifications?: boolean;
|
|
244
|
+
readonly stateTransitionHistory?: boolean;
|
|
245
|
+
}>;
|
|
246
|
+
agentCard: {
|
|
247
|
+
capabilities: Partial<{
|
|
248
|
+
readonly streaming?: boolean;
|
|
249
|
+
readonly pushNotifications?: boolean;
|
|
250
|
+
readonly stateTransitionHistory?: boolean;
|
|
251
|
+
}>;
|
|
252
|
+
protocolVersion: string;
|
|
253
|
+
name: string;
|
|
254
|
+
description: string;
|
|
255
|
+
url: string;
|
|
256
|
+
preferredTransport?: string;
|
|
257
|
+
version: string;
|
|
258
|
+
provider?: {
|
|
259
|
+
readonly organization: string;
|
|
260
|
+
readonly url: string;
|
|
261
|
+
};
|
|
262
|
+
defaultInputModes: readonly string[];
|
|
263
|
+
defaultOutputModes: readonly string[];
|
|
264
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
265
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
266
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
267
|
+
};
|
|
268
|
+
taskProvider: import("./index.js").A2ATaskProvider;
|
|
269
|
+
protocolHandler: {
|
|
270
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
271
|
+
modelProvider: any;
|
|
272
|
+
agentCard: any;
|
|
273
|
+
taskProvider: import("./index.js").A2ATaskProvider | undefined;
|
|
274
|
+
handleRequest: (request: JSONRPCRequest, agentName?: string) => Promise<JSONRPCResponse> | AsyncGenerator<JSONRPCResponse, void, unknown>;
|
|
275
|
+
};
|
|
276
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
277
|
+
port: number;
|
|
278
|
+
};
|
|
279
|
+
removeAgent: (name: string) => {
|
|
280
|
+
host: string;
|
|
281
|
+
capabilities: Partial<{
|
|
282
|
+
readonly streaming?: boolean;
|
|
283
|
+
readonly pushNotifications?: boolean;
|
|
284
|
+
readonly stateTransitionHistory?: boolean;
|
|
285
|
+
}>;
|
|
286
|
+
agentCard: {
|
|
287
|
+
capabilities: Partial<{
|
|
288
|
+
readonly streaming?: boolean;
|
|
289
|
+
readonly pushNotifications?: boolean;
|
|
290
|
+
readonly stateTransitionHistory?: boolean;
|
|
291
|
+
}>;
|
|
292
|
+
protocolVersion: string;
|
|
293
|
+
name: string;
|
|
294
|
+
description: string;
|
|
295
|
+
url: string;
|
|
296
|
+
preferredTransport?: string;
|
|
297
|
+
version: string;
|
|
298
|
+
provider?: {
|
|
299
|
+
readonly organization: string;
|
|
300
|
+
readonly url: string;
|
|
301
|
+
};
|
|
302
|
+
defaultInputModes: readonly string[];
|
|
303
|
+
defaultOutputModes: readonly string[];
|
|
304
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
305
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
306
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
307
|
+
};
|
|
308
|
+
taskProvider: import("./index.js").A2ATaskProvider;
|
|
309
|
+
protocolHandler: {
|
|
310
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
311
|
+
modelProvider: any;
|
|
312
|
+
agentCard: any;
|
|
313
|
+
taskProvider: import("./index.js").A2ATaskProvider | undefined;
|
|
314
|
+
handleRequest: (request: JSONRPCRequest, agentName?: string) => Promise<JSONRPCResponse> | AsyncGenerator<JSONRPCResponse, void, unknown>;
|
|
315
|
+
};
|
|
316
|
+
agents: ReadonlyMap<string, A2AAgent>;
|
|
317
|
+
port: number;
|
|
318
|
+
};
|
|
319
|
+
getAgentCard: () => {
|
|
320
|
+
capabilities: Partial<{
|
|
321
|
+
readonly streaming?: boolean;
|
|
322
|
+
readonly pushNotifications?: boolean;
|
|
323
|
+
readonly stateTransitionHistory?: boolean;
|
|
324
|
+
}>;
|
|
325
|
+
protocolVersion: string;
|
|
326
|
+
name: string;
|
|
327
|
+
description: string;
|
|
328
|
+
url: string;
|
|
329
|
+
preferredTransport?: string;
|
|
330
|
+
version: string;
|
|
331
|
+
provider?: {
|
|
332
|
+
readonly organization: string;
|
|
333
|
+
readonly url: string;
|
|
334
|
+
};
|
|
335
|
+
defaultInputModes: readonly string[];
|
|
336
|
+
defaultOutputModes: readonly string[];
|
|
337
|
+
skills: readonly import("./types.js").AgentSkill[];
|
|
338
|
+
securitySchemes?: Readonly<Record<string, any>>;
|
|
339
|
+
security?: readonly Record<string, readonly string[]>[];
|
|
340
|
+
};
|
|
341
|
+
handleRequest: (request: JSONRPCRequest) => Promise<JSONRPCResponse | AsyncIterable<JSONRPCResponse>>;
|
|
342
|
+
}>;
|
|
343
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/a2a/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAgB,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AAEjF,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,eAAe,EAEf,QAAQ,EAET,MAAM,YAAY,CAAC;AAMpB,eAAO,MAAM,qBAAqB,GAAU,QAAQ,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDlE,CAAC;AAGF,eAAO,MAAM,eAAe,GAAU,QAAQ,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAcxC,MAAM,SAAS,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBACpB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAED,cAAc;EAE1C,CAAC;AA2VF,eAAO,MAAM,cAAc,GAAU,QAAQ,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAhWvC,MAAM,SAAS,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBACpB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAED,cAAc;EAiW1C,CAAC"}
|