@hamak/ai-agent-backend 0.7.2 → 0.8.0
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/agent-channel-plugin.d.ts +27 -0
- package/dist/agent-channel-plugin.d.ts.map +1 -0
- package/dist/agent-channel-plugin.js +31 -0
- package/dist/agent-channel-routes.d.ts +52 -0
- package/dist/agent-channel-routes.d.ts.map +1 -0
- package/dist/agent-channel-routes.js +60 -0
- package/dist/agent-routes.d.ts +9 -1
- package/dist/agent-routes.d.ts.map +1 -1
- package/dist/agent-routes.js +19 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@hamak/server-kernel` binding for the agent command channel (ticket 009 §6).
|
|
3
|
+
*
|
|
4
|
+
* A server-kernel plugin that, in `initialize()`, resolves the shared
|
|
5
|
+
* RouteRegistry and mounts the channel routes under `basePath` (default
|
|
6
|
+
* `/agent`). The kernel's HTTP terminal plugin drains the registry and starts
|
|
7
|
+
* Express in `activate()`.
|
|
8
|
+
*
|
|
9
|
+
* The RouteRegistry is resolved by its global symbol so this module needs no
|
|
10
|
+
* hard dependency on `@hamak/server-kernel` (mirrors how the frontend resolves
|
|
11
|
+
* the store manager). Types are structural for the same reason.
|
|
12
|
+
*/
|
|
13
|
+
import { type AgentChannelRoutesConfig } from './agent-channel-routes.js';
|
|
14
|
+
interface InitCtx {
|
|
15
|
+
resolve<T = unknown>(token: unknown): T | undefined;
|
|
16
|
+
}
|
|
17
|
+
interface PluginLike {
|
|
18
|
+
initialize(ctx: InitCtx): void;
|
|
19
|
+
activate(): void;
|
|
20
|
+
}
|
|
21
|
+
export interface AgentChannelServerPluginConfig extends AgentChannelRoutesConfig {
|
|
22
|
+
/** Mount path for the channel routes (default `/agent`). */
|
|
23
|
+
basePath?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function createAgentChannelServerPlugin(config: AgentChannelServerPluginConfig): PluginLike;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=agent-channel-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-channel-plugin.d.ts","sourceRoot":"","sources":["../src/agent-channel-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAA4B,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAQjG,UAAU,OAAO;IACf,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS,CAAC;CACrD;AACD,UAAU,UAAU;IAClB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/B,QAAQ,IAAI,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,8BAA+B,SAAQ,wBAAwB;IAC9E,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,8BAA8B,GAAG,UAAU,CAejG"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@hamak/server-kernel` binding for the agent command channel (ticket 009 §6).
|
|
3
|
+
*
|
|
4
|
+
* A server-kernel plugin that, in `initialize()`, resolves the shared
|
|
5
|
+
* RouteRegistry and mounts the channel routes under `basePath` (default
|
|
6
|
+
* `/agent`). The kernel's HTTP terminal plugin drains the registry and starts
|
|
7
|
+
* Express in `activate()`.
|
|
8
|
+
*
|
|
9
|
+
* The RouteRegistry is resolved by its global symbol so this module needs no
|
|
10
|
+
* hard dependency on `@hamak/server-kernel` (mirrors how the frontend resolves
|
|
11
|
+
* the store manager). Types are structural for the same reason.
|
|
12
|
+
*/
|
|
13
|
+
import { createAgentChannelRoutes } from './agent-channel-routes.js';
|
|
14
|
+
/** Global DI key exposed by `@hamak/server-kernel`. */
|
|
15
|
+
const ROUTE_REGISTRY_TOKEN = Symbol.for('@hamak/server-kernel:RouteRegistry');
|
|
16
|
+
export function createAgentChannelServerPlugin(config) {
|
|
17
|
+
return {
|
|
18
|
+
initialize(ctx) {
|
|
19
|
+
const routes = ctx.resolve(ROUTE_REGISTRY_TOKEN);
|
|
20
|
+
if (!routes) {
|
|
21
|
+
throw new Error('[ai-agent] RouteRegistry not available (is @hamak/server-kernel active?)');
|
|
22
|
+
}
|
|
23
|
+
routes.register({
|
|
24
|
+
path: config.basePath ?? '/agent',
|
|
25
|
+
router: createAgentChannelRoutes(config),
|
|
26
|
+
plugin: 'ai-agent-channel',
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
activate() { },
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP surface for the decoupled agent command channel (ticket 009 §6). The
|
|
3
|
+
* server-side half of `RemoteAgentChannel` / `HttpAgentTransport`:
|
|
4
|
+
*
|
|
5
|
+
* POST {base}/commands → AgentAck (runs an AgentCommand)
|
|
6
|
+
* GET {base}/stream → SSE: `event: update` per ConversationUpdate
|
|
7
|
+
* GET {base}/conversations/:agentId/:sessionId → Conversation | null (snapshot)
|
|
8
|
+
*
|
|
9
|
+
* Wiring (host): build the backend AgentService with a broadcaster so its
|
|
10
|
+
* conversation-update stream fans out to SSE clients —
|
|
11
|
+
*
|
|
12
|
+
* const bc = createUpdateBroadcaster();
|
|
13
|
+
* const memory = new ObservableMemory(new FileAgentMemory(root), bc.emit);
|
|
14
|
+
* const service = new AgentService({ ...deps, memory, emitUpdate: bc.emit });
|
|
15
|
+
* const channel = new InProcessAgentChannel(service);
|
|
16
|
+
* createAgentChannelRoutes({ channel, subscribe: bc.subscribe,
|
|
17
|
+
* snapshot: (a, s) => memory.get(a, s), router });
|
|
18
|
+
*
|
|
19
|
+
* `express` is an optional peer; types here are structural so it isn't imported.
|
|
20
|
+
*/
|
|
21
|
+
import type { AgentChannel, Conversation, ConversationUpdate } from '@hamak/ai-agent';
|
|
22
|
+
interface Req {
|
|
23
|
+
body: any;
|
|
24
|
+
params: Record<string, string>;
|
|
25
|
+
query: Record<string, unknown>;
|
|
26
|
+
on(event: 'close', cb: () => void): void;
|
|
27
|
+
}
|
|
28
|
+
interface Res {
|
|
29
|
+
setHeader(name: string, value: string): void;
|
|
30
|
+
write(chunk: string): void;
|
|
31
|
+
end(): void;
|
|
32
|
+
status(code: number): Res;
|
|
33
|
+
json(body: unknown): void;
|
|
34
|
+
flushHeaders?(): void;
|
|
35
|
+
}
|
|
36
|
+
interface RouterLike {
|
|
37
|
+
post(path: string, handler: (req: Req, res: Res) => void): void;
|
|
38
|
+
get(path: string, handler: (req: Req, res: Res) => void): void;
|
|
39
|
+
}
|
|
40
|
+
export interface AgentChannelRoutesConfig {
|
|
41
|
+
/** The backend command channel (e.g. `InProcessAgentChannel` over the service). */
|
|
42
|
+
channel: AgentChannel;
|
|
43
|
+
/** Subscribe an SSE connection to the conversation-update stream. */
|
|
44
|
+
subscribe: (listener: (update: ConversationUpdate) => void) => () => void;
|
|
45
|
+
/** Optional snapshot read for reconnecting clients to rehydrate. */
|
|
46
|
+
snapshot?: (agentId: string, sessionId: string) => Promise<Conversation | null>;
|
|
47
|
+
/** Factory for a fresh router, e.g. `() => express.Router()`. */
|
|
48
|
+
router: () => RouterLike;
|
|
49
|
+
}
|
|
50
|
+
export declare function createAgentChannelRoutes(config: AgentChannelRoutesConfig): RouterLike;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=agent-channel-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-channel-routes.d.ts","sourceRoot":"","sources":["../src/agent-channel-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAgB,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEpG,UAAU,GAAG;IACX,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CAC1C;AACD,UAAU,GAAG;IACX,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,IAAI,IAAI,CAAC;IACZ,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;IAC1B,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,IAAI,IAAI,CAAC;CACvB;AACD,UAAU,UAAU;IAClB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IAChE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;CAChE;AAED,MAAM,WAAW,wBAAwB;IACvC,mFAAmF;IACnF,OAAO,EAAE,YAAY,CAAC;IACtB,qEAAqE;IACrE,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAC1E,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAChF,iEAAiE;IACjE,MAAM,EAAE,MAAM,UAAU,CAAC;CAC1B;AAMD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,wBAAwB,GAAG,UAAU,CAuCrF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP surface for the decoupled agent command channel (ticket 009 §6). The
|
|
3
|
+
* server-side half of `RemoteAgentChannel` / `HttpAgentTransport`:
|
|
4
|
+
*
|
|
5
|
+
* POST {base}/commands → AgentAck (runs an AgentCommand)
|
|
6
|
+
* GET {base}/stream → SSE: `event: update` per ConversationUpdate
|
|
7
|
+
* GET {base}/conversations/:agentId/:sessionId → Conversation | null (snapshot)
|
|
8
|
+
*
|
|
9
|
+
* Wiring (host): build the backend AgentService with a broadcaster so its
|
|
10
|
+
* conversation-update stream fans out to SSE clients —
|
|
11
|
+
*
|
|
12
|
+
* const bc = createUpdateBroadcaster();
|
|
13
|
+
* const memory = new ObservableMemory(new FileAgentMemory(root), bc.emit);
|
|
14
|
+
* const service = new AgentService({ ...deps, memory, emitUpdate: bc.emit });
|
|
15
|
+
* const channel = new InProcessAgentChannel(service);
|
|
16
|
+
* createAgentChannelRoutes({ channel, subscribe: bc.subscribe,
|
|
17
|
+
* snapshot: (a, s) => memory.get(a, s), router });
|
|
18
|
+
*
|
|
19
|
+
* `express` is an optional peer; types here are structural so it isn't imported.
|
|
20
|
+
*/
|
|
21
|
+
function sse(res, event, data) {
|
|
22
|
+
res.write(`event: ${event}\ndata: ${JSON.stringify(data)}\n\n`);
|
|
23
|
+
}
|
|
24
|
+
export function createAgentChannelRoutes(config) {
|
|
25
|
+
const router = config.router();
|
|
26
|
+
router.post('/commands', (req, res) => {
|
|
27
|
+
config.channel
|
|
28
|
+
.send(req.body)
|
|
29
|
+
.then((ack) => res.json(ack))
|
|
30
|
+
.catch((err) => res.status(500).json({ error: String(err) }));
|
|
31
|
+
});
|
|
32
|
+
router.get('/stream', (req, res) => {
|
|
33
|
+
// Optional scoping: `?agent=<id>` delivers only that agent's updates, so a
|
|
34
|
+
// connection isn't fed unrelated (or other tenants') conversations. Apps
|
|
35
|
+
// layer auth on top (gate which agentIds a request may stream).
|
|
36
|
+
const agentFilter = typeof req.query.agent === 'string' ? req.query.agent : undefined;
|
|
37
|
+
res.setHeader('content-type', 'text/event-stream');
|
|
38
|
+
res.setHeader('cache-control', 'no-cache');
|
|
39
|
+
res.setHeader('connection', 'keep-alive');
|
|
40
|
+
res.flushHeaders?.();
|
|
41
|
+
sse(res, 'ready', {}); // flush an initial frame so the client knows it's connected
|
|
42
|
+
const off = config.subscribe((update) => {
|
|
43
|
+
if (agentFilter && update.agentId !== agentFilter)
|
|
44
|
+
return;
|
|
45
|
+
sse(res, 'update', update);
|
|
46
|
+
});
|
|
47
|
+
req.on('close', off);
|
|
48
|
+
});
|
|
49
|
+
router.get('/conversations/:agentId/:sessionId', (req, res) => {
|
|
50
|
+
if (!config.snapshot) {
|
|
51
|
+
res.status(404).json({ error: 'snapshot not available' });
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
config
|
|
55
|
+
.snapshot(req.params.agentId, req.params.sessionId)
|
|
56
|
+
.then((conv) => res.json(conv))
|
|
57
|
+
.catch((err) => res.status(500).json({ error: String(err) }));
|
|
58
|
+
});
|
|
59
|
+
return router;
|
|
60
|
+
}
|
package/dist/agent-routes.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `express` is an optional peer; this module is only imported by hosts that
|
|
11
11
|
* have it. Types are structural so it doesn't hard-import express.
|
|
12
12
|
*/
|
|
13
|
-
import type { AgentService } from '@hamak/ai-agent';
|
|
13
|
+
import type { AgentService, Conversation } from '@hamak/ai-agent';
|
|
14
14
|
import type { HooksBus } from './hooks-bus.js';
|
|
15
15
|
import type { HttpServerChannel } from './http-server-channel.js';
|
|
16
16
|
interface Req {
|
|
@@ -40,6 +40,14 @@ export interface AgentRoutesConfig {
|
|
|
40
40
|
router: () => RouterLike;
|
|
41
41
|
/** Split-loop channel (§4): mounts GET/POST `/channel` when provided. */
|
|
42
42
|
channel?: HttpServerChannel;
|
|
43
|
+
/**
|
|
44
|
+
* Conversation store, used to read the final assistant message for `turn-end`
|
|
45
|
+
* (the turn call returns an ack only — ticket 009 §1). Falls back to the
|
|
46
|
+
* streamed token buffer when absent.
|
|
47
|
+
*/
|
|
48
|
+
memory?: {
|
|
49
|
+
get(agentId: string, sessionId: string): Promise<Conversation | null>;
|
|
50
|
+
};
|
|
43
51
|
}
|
|
44
52
|
export declare function createAgentRoutes(config: AgentRoutesConfig): RouterLike;
|
|
45
53
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-routes.d.ts","sourceRoot":"","sources":["../src/agent-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-routes.d.ts","sourceRoot":"","sources":["../src/agent-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,UAAU,GAAG;IACX,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CAC1C;AACD,UAAU,GAAG;IACX,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,IAAI,IAAI,CAAC;IACZ,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;IAC1B,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,IAAI,IAAI,CAAC;CACvB;AACD,UAAU,UAAU;IAClB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IAChE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IAC/D,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;CACnE;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,YAAY,CAAC;IACtB,4EAA4E;IAC5E,KAAK,EAAE,QAAQ,CAAC;IAChB,iEAAiE;IACjE,MAAM,EAAE,MAAM,UAAU,CAAC;IACzB,yEAAyE;IACzE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAA;KAAE,CAAC;CACpF;AAWD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAkGvE"}
|
package/dist/agent-routes.js
CHANGED
|
@@ -34,8 +34,15 @@ export function createAgentRoutes(config) {
|
|
|
34
34
|
res.setHeader('connection', 'keep-alive');
|
|
35
35
|
res.flushHeaders?.();
|
|
36
36
|
sse(res, 'session', { sessionId: sid });
|
|
37
|
+
// Accumulate the streamed deltas so `turn-end` can still carry the final
|
|
38
|
+
// assistant text. The turn call itself now returns an ack only (ticket 009
|
|
39
|
+
// §1) — content is observed from the stream, not the return value.
|
|
40
|
+
let buffer = '';
|
|
37
41
|
const onToken = (payload) => {
|
|
38
|
-
|
|
42
|
+
const p = payload;
|
|
43
|
+
if (p?.sessionId === sid) {
|
|
44
|
+
if (typeof p.delta === 'string')
|
|
45
|
+
buffer += p.delta;
|
|
39
46
|
sse(res, 'token', payload);
|
|
40
47
|
}
|
|
41
48
|
};
|
|
@@ -50,8 +57,17 @@ export function createAgentRoutes(config) {
|
|
|
50
57
|
req.on('close', cleanup);
|
|
51
58
|
service
|
|
52
59
|
.askStream(agent, input, { sessionId: sid })
|
|
53
|
-
.then((
|
|
54
|
-
|
|
60
|
+
.then(async (ack) => {
|
|
61
|
+
// Prefer the persisted final assistant message (truth); fall back to the
|
|
62
|
+
// streamed buffer for providers that don't expose `get`.
|
|
63
|
+
let content = buffer;
|
|
64
|
+
if (config.memory) {
|
|
65
|
+
const conv = await config.memory.get(ack.agentId, ack.sessionId);
|
|
66
|
+
const last = conv?.messages.filter((m) => m.role === 'assistant').at(-1);
|
|
67
|
+
if (last)
|
|
68
|
+
content = last.content;
|
|
69
|
+
}
|
|
70
|
+
sse(res, 'turn-end', { ...ack, message: { role: 'assistant', content } });
|
|
55
71
|
cleanup();
|
|
56
72
|
res.end();
|
|
57
73
|
})
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ export { createHooksBus } from './hooks-bus.js';
|
|
|
11
11
|
export type { HooksBus } from './hooks-bus.js';
|
|
12
12
|
export { createAgentRoutes } from './agent-routes.js';
|
|
13
13
|
export type { AgentRoutesConfig } from './agent-routes.js';
|
|
14
|
+
export { createAgentChannelRoutes } from './agent-channel-routes.js';
|
|
15
|
+
export type { AgentChannelRoutesConfig } from './agent-channel-routes.js';
|
|
16
|
+
export { createAgentChannelServerPlugin } from './agent-channel-plugin.js';
|
|
17
|
+
export type { AgentChannelServerPluginConfig } from './agent-channel-plugin.js';
|
|
14
18
|
export { createAgentBackend } from './create-agent-backend.js';
|
|
15
19
|
export type { AgentBackend, AgentBackendConfig } from './create-agent-backend.js';
|
|
16
20
|
export { HttpServerChannel } from './http-server-channel.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,8 @@ export { AnthropicProvider } from './anthropic-provider.js';
|
|
|
8
8
|
export { FileAgentMemory } from './file-agent-memory.js';
|
|
9
9
|
export { createHooksBus } from './hooks-bus.js';
|
|
10
10
|
export { createAgentRoutes } from './agent-routes.js';
|
|
11
|
+
export { createAgentChannelRoutes } from './agent-channel-routes.js';
|
|
12
|
+
export { createAgentChannelServerPlugin } from './agent-channel-plugin.js';
|
|
11
13
|
export { createAgentBackend } from './create-agent-backend.js';
|
|
12
14
|
export { HttpServerChannel } from './http-server-channel.js';
|
|
13
15
|
export { StdioMcpConnector, StdioMcpClient } from './stdio-mcp.js';
|
package/package.json
CHANGED