@radaros/transport 0.3.8 → 0.3.10
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/dist/index.d.ts +52 -52
- package/dist/index.js +1170 -1190
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,38 @@
|
|
|
1
|
-
import { Agent, Team, Workflow,
|
|
1
|
+
import { Agent, A2AAgentCard, Team, Workflow, EventBus, VoiceAgent } from '@radaros/core';
|
|
2
|
+
|
|
3
|
+
interface A2AServerOptions {
|
|
4
|
+
agents: Record<string, Agent>;
|
|
5
|
+
basePath?: string;
|
|
6
|
+
provider?: {
|
|
7
|
+
organization: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
};
|
|
10
|
+
version?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Mount an A2A-compliant server on an Express app.
|
|
15
|
+
*
|
|
16
|
+
* - Serves `/.well-known/agent.json` with the Agent Card
|
|
17
|
+
* - Handles JSON-RPC 2.0 requests at the basePath for message/send, message/stream, tasks/get, tasks/cancel
|
|
18
|
+
*/
|
|
19
|
+
declare function createA2AServer(app: any, opts: A2AServerOptions): void;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Generate an A2A Agent Card from a RadarOS Agent.
|
|
23
|
+
* The card is served at /.well-known/agent.json per the A2A spec.
|
|
24
|
+
*/
|
|
25
|
+
declare function generateAgentCard(agent: Agent, serverUrl: string, provider?: {
|
|
26
|
+
organization: string;
|
|
27
|
+
url?: string;
|
|
28
|
+
}, version?: string): A2AAgentCard;
|
|
29
|
+
/**
|
|
30
|
+
* Generate a combined Agent Card that lists multiple agents as skills.
|
|
31
|
+
*/
|
|
32
|
+
declare function generateMultiAgentCard(agents: Record<string, Agent>, serverUrl: string, provider?: {
|
|
33
|
+
organization: string;
|
|
34
|
+
url?: string;
|
|
35
|
+
}, version?: string): A2AAgentCard;
|
|
2
36
|
|
|
3
37
|
interface FileUploadOptions {
|
|
4
38
|
maxFileSize?: number;
|
|
@@ -8,6 +42,9 @@ interface FileUploadOptions {
|
|
|
8
42
|
declare function createFileUploadMiddleware(opts?: FileUploadOptions): any;
|
|
9
43
|
declare function buildMultiModalInput(body: any, files?: any[]): string | any[];
|
|
10
44
|
|
|
45
|
+
declare function errorHandler(): (err: any, _req: any, res: any, _next: any) => void;
|
|
46
|
+
declare function requestLogger(): (req: any, _res: any, next: any) => void;
|
|
47
|
+
|
|
11
48
|
interface SwaggerOptions {
|
|
12
49
|
/** Enable Swagger UI at /docs. Default: false */
|
|
13
50
|
enabled?: boolean;
|
|
@@ -42,9 +79,6 @@ interface RouterOptions {
|
|
|
42
79
|
|
|
43
80
|
declare function createAgentRouter(opts: RouterOptions): any;
|
|
44
81
|
|
|
45
|
-
declare function errorHandler(): (err: any, _req: any, res: any, _next: any) => void;
|
|
46
|
-
declare function requestLogger(): (req: any, _res: any, next: any) => void;
|
|
47
|
-
|
|
48
82
|
interface OpenAPISpec {
|
|
49
83
|
openapi: string;
|
|
50
84
|
info: {
|
|
@@ -69,24 +103,6 @@ interface OpenAPISpec {
|
|
|
69
103
|
}
|
|
70
104
|
declare function generateOpenAPISpec(routerOpts: RouterOptions, swaggerOpts?: SwaggerOptions): OpenAPISpec;
|
|
71
105
|
|
|
72
|
-
interface GatewayOptions {
|
|
73
|
-
agents?: Record<string, Agent>;
|
|
74
|
-
teams?: Record<string, Team>;
|
|
75
|
-
io: any;
|
|
76
|
-
namespace?: string;
|
|
77
|
-
authMiddleware?: (socket: any, next: (err?: Error) => void) => void;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
declare function createAgentGateway(opts: GatewayOptions): void;
|
|
81
|
-
|
|
82
|
-
interface VoiceGatewayOptions {
|
|
83
|
-
agents: Record<string, VoiceAgent>;
|
|
84
|
-
io: any;
|
|
85
|
-
namespace?: string;
|
|
86
|
-
authMiddleware?: (socket: any, next: (err?: Error) => void) => void;
|
|
87
|
-
}
|
|
88
|
-
declare function createVoiceGateway(opts: VoiceGatewayOptions): void;
|
|
89
|
-
|
|
90
106
|
/**
|
|
91
107
|
* Minimal interface for a BrowserAgent — avoids a hard dependency on @radaros/browser.
|
|
92
108
|
* Any object that matches this shape (e.g. a real BrowserAgent) works.
|
|
@@ -147,38 +163,22 @@ interface BrowserGatewayOptions {
|
|
|
147
163
|
*/
|
|
148
164
|
declare function createBrowserGateway(opts: BrowserGatewayOptions): void;
|
|
149
165
|
|
|
150
|
-
interface
|
|
151
|
-
agents
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
};
|
|
157
|
-
version?: string;
|
|
166
|
+
interface GatewayOptions {
|
|
167
|
+
agents?: Record<string, Agent>;
|
|
168
|
+
teams?: Record<string, Team>;
|
|
169
|
+
io: any;
|
|
170
|
+
namespace?: string;
|
|
171
|
+
authMiddleware?: (socket: any, next: (err?: Error) => void) => void;
|
|
158
172
|
}
|
|
159
173
|
|
|
160
|
-
|
|
161
|
-
* Mount an A2A-compliant server on an Express app.
|
|
162
|
-
*
|
|
163
|
-
* - Serves `/.well-known/agent.json` with the Agent Card
|
|
164
|
-
* - Handles JSON-RPC 2.0 requests at the basePath for message/send, message/stream, tasks/get, tasks/cancel
|
|
165
|
-
*/
|
|
166
|
-
declare function createA2AServer(app: any, opts: A2AServerOptions): void;
|
|
174
|
+
declare function createAgentGateway(opts: GatewayOptions): void;
|
|
167
175
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}, version?: string): A2AAgentCard;
|
|
176
|
-
/**
|
|
177
|
-
* Generate a combined Agent Card that lists multiple agents as skills.
|
|
178
|
-
*/
|
|
179
|
-
declare function generateMultiAgentCard(agents: Record<string, Agent>, serverUrl: string, provider?: {
|
|
180
|
-
organization: string;
|
|
181
|
-
url?: string;
|
|
182
|
-
}, version?: string): A2AAgentCard;
|
|
176
|
+
interface VoiceGatewayOptions {
|
|
177
|
+
agents: Record<string, VoiceAgent>;
|
|
178
|
+
io: any;
|
|
179
|
+
namespace?: string;
|
|
180
|
+
authMiddleware?: (socket: any, next: (err?: Error) => void) => void;
|
|
181
|
+
}
|
|
182
|
+
declare function createVoiceGateway(opts: VoiceGatewayOptions): void;
|
|
183
183
|
|
|
184
184
|
export { type A2AServerOptions, type BrowserGatewayOptions, type FileUploadOptions, type GatewayOptions, type RouterOptions, type SwaggerOptions, type VoiceGatewayOptions, buildMultiModalInput, createA2AServer, createAgentGateway, createAgentRouter, createBrowserGateway, createFileUploadMiddleware, createVoiceGateway, errorHandler, generateAgentCard, generateMultiAgentCard, generateOpenAPISpec, requestLogger };
|