@kuntur/a2a-carbon-chat-adapter 0.1.3 → 0.1.5
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.cjs +69 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +69 -48
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +9 -0
- package/package.json +1 -1
- package/dist/server.d.cts +0 -40
- package/dist/server.d.ts +0 -40
package/dist/styles/index.css
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* src/styles/index.css */
|
|
2
2
|
.a2a-chat {
|
|
3
3
|
position: relative;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
4
6
|
}
|
|
5
7
|
.a2a-chat--fullscreen {
|
|
6
8
|
height: 100vh;
|
|
@@ -17,6 +19,13 @@
|
|
|
17
19
|
right: 20px;
|
|
18
20
|
z-index: 1000;
|
|
19
21
|
}
|
|
22
|
+
.a2a-chat__element {
|
|
23
|
+
display: block;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
flex: 1;
|
|
27
|
+
min-height: 0;
|
|
28
|
+
}
|
|
20
29
|
.a2a-chat--loading {
|
|
21
30
|
display: flex;
|
|
22
31
|
align-items: center;
|
package/package.json
CHANGED
package/dist/server.d.cts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Factory for creating Next.js API route handlers for A2A proxy
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* // app/api/agent/chat/route.ts
|
|
6
|
-
* import { createA2AHandler } from '@kuntur/a2a-carbon-chat-adapter/server';
|
|
7
|
-
*
|
|
8
|
-
* export const POST = createA2AHandler({
|
|
9
|
-
* allowedAgentUrls: ['https://trusted-agents.example.com']
|
|
10
|
-
* });
|
|
11
|
-
*/
|
|
12
|
-
interface A2AHandlerOptions {
|
|
13
|
-
/**
|
|
14
|
-
* Called before forwarding request to agent
|
|
15
|
-
* Use for authentication, validation, rate limiting
|
|
16
|
-
*/
|
|
17
|
-
onRequest?: (request: {
|
|
18
|
-
agentUrl: string;
|
|
19
|
-
apiKey?: string;
|
|
20
|
-
message: string;
|
|
21
|
-
extensions?: Record<string, unknown>;
|
|
22
|
-
}) => Promise<typeof request> | typeof request;
|
|
23
|
-
/**
|
|
24
|
-
* Called on error
|
|
25
|
-
*/
|
|
26
|
-
onError?: (error: Error) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Request timeout in milliseconds
|
|
29
|
-
* @default 120000 (2 minutes)
|
|
30
|
-
*/
|
|
31
|
-
timeout?: number;
|
|
32
|
-
/**
|
|
33
|
-
* Allowed agent URL patterns (for security)
|
|
34
|
-
* If provided, requests to non-matching URLs will be rejected
|
|
35
|
-
*/
|
|
36
|
-
allowedAgentUrls?: (string | RegExp)[];
|
|
37
|
-
}
|
|
38
|
-
declare function createA2AHandler(options?: A2AHandlerOptions): (request: Request) => Promise<Response>;
|
|
39
|
-
|
|
40
|
-
export { type A2AHandlerOptions, createA2AHandler };
|
package/dist/server.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Factory for creating Next.js API route handlers for A2A proxy
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* // app/api/agent/chat/route.ts
|
|
6
|
-
* import { createA2AHandler } from '@kuntur/a2a-carbon-chat-adapter/server';
|
|
7
|
-
*
|
|
8
|
-
* export const POST = createA2AHandler({
|
|
9
|
-
* allowedAgentUrls: ['https://trusted-agents.example.com']
|
|
10
|
-
* });
|
|
11
|
-
*/
|
|
12
|
-
interface A2AHandlerOptions {
|
|
13
|
-
/**
|
|
14
|
-
* Called before forwarding request to agent
|
|
15
|
-
* Use for authentication, validation, rate limiting
|
|
16
|
-
*/
|
|
17
|
-
onRequest?: (request: {
|
|
18
|
-
agentUrl: string;
|
|
19
|
-
apiKey?: string;
|
|
20
|
-
message: string;
|
|
21
|
-
extensions?: Record<string, unknown>;
|
|
22
|
-
}) => Promise<typeof request> | typeof request;
|
|
23
|
-
/**
|
|
24
|
-
* Called on error
|
|
25
|
-
*/
|
|
26
|
-
onError?: (error: Error) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Request timeout in milliseconds
|
|
29
|
-
* @default 120000 (2 minutes)
|
|
30
|
-
*/
|
|
31
|
-
timeout?: number;
|
|
32
|
-
/**
|
|
33
|
-
* Allowed agent URL patterns (for security)
|
|
34
|
-
* If provided, requests to non-matching URLs will be rejected
|
|
35
|
-
*/
|
|
36
|
-
allowedAgentUrls?: (string | RegExp)[];
|
|
37
|
-
}
|
|
38
|
-
declare function createA2AHandler(options?: A2AHandlerOptions): (request: Request) => Promise<Response>;
|
|
39
|
-
|
|
40
|
-
export { type A2AHandlerOptions, createA2AHandler };
|