@townco/agent 0.1.19 → 0.1.21

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.
@@ -1,188 +1,427 @@
1
1
  import { createHash } from "node:crypto";
2
+ import { gzipSync } from "node:zlib";
2
3
  import * as acp from "@agentclientprotocol/sdk";
3
4
  import { PGlite } from "@electric-sql/pglite";
4
5
  import { Hono } from "hono";
5
6
  import { cors } from "hono/cors";
6
7
  import { streamSSE } from "hono/streaming";
7
8
  import { makeRunnerFromDefinition } from "../runner";
9
+ import { createLogger } from "../utils/logger.js";
8
10
  import { AgentAcpAdapter } from "./adapter";
9
-
11
+ const logger = createLogger("agent");
12
+ /**
13
+ * Compress a payload using gzip if it's too large for PostgreSQL NOTIFY
14
+ * Returns an object with the payload and metadata about compression
15
+ */
16
+ function compressIfNeeded(rawMsg) {
17
+ const jsonStr = JSON.stringify(rawMsg);
18
+ const originalSize = jsonStr.length;
19
+ // If it fits without compression, send as-is
20
+ if (originalSize <= 7500) {
21
+ return {
22
+ payload: jsonStr,
23
+ isCompressed: false,
24
+ originalSize,
25
+ compressedSize: originalSize,
26
+ };
27
+ }
28
+ // Compress and encode as base64
29
+ const compressed = gzipSync(jsonStr);
30
+ const base64 = compressed.toString("base64");
31
+ // Wrap in a compression envelope
32
+ const envelope = JSON.stringify({
33
+ _compressed: true,
34
+ data: base64,
35
+ });
36
+ return {
37
+ payload: envelope,
38
+ isCompressed: true,
39
+ originalSize,
40
+ compressedSize: envelope.length,
41
+ };
42
+ }
10
43
  // Use PGlite in-memory database for LISTEN/NOTIFY
11
44
  const pg = new PGlite();
12
45
  // Helper to create safe channel names from untrusted IDs
13
46
  function safeChannelName(prefix, id) {
14
- const hash = createHash("sha256").update(id).digest("hex").slice(0, 16);
15
- return `${prefix}_${hash}`;
47
+ const hash = createHash("sha256").update(id).digest("hex").slice(0, 16);
48
+ return `${prefix}_${hash}`;
16
49
  }
17
50
  export function makeHttpTransport(agent) {
18
- const inbound = new TransformStream();
19
- const outbound = new TransformStream();
20
- const bridge = acp.ndJsonStream(outbound.writable, inbound.readable);
21
- const agentRunner =
22
- "definition" in agent ? agent : makeRunnerFromDefinition(agent);
23
- new acp.AgentSideConnection(
24
- (conn) => new AgentAcpAdapter(agentRunner, conn),
25
- bridge,
26
- );
27
- const app = new Hono();
28
- const decoder = new TextDecoder();
29
- const encoder = new TextEncoder();
30
- (async () => {
31
- const reader = outbound.readable.getReader();
32
- let buf = "";
33
- for (;;) {
34
- const { value, done } = await reader.read();
35
- if (done) break;
36
- buf += decoder.decode(value, { stream: true });
37
- for (let nl = buf.indexOf("\n"); nl !== -1; nl = buf.indexOf("\n")) {
38
- const line = buf.slice(0, nl).trim();
39
- buf = buf.slice(nl + 1);
40
- if (!line) continue;
41
- let rawMsg;
42
- try {
43
- rawMsg = JSON.parse(line);
44
- } catch {
45
- // ignore malformed lines
46
- continue;
47
- }
48
- // Validate the agent message with Zod schema
49
- const parseResult = acp.agentOutgoingMessageSchema.safeParse(rawMsg);
50
- if (!parseResult.success) {
51
- console.error("Invalid agent message:", parseResult.error.issues);
52
- continue;
53
- }
54
- //const msg = parseResult.data;
55
- if (rawMsg == null || typeof rawMsg !== "object") {
56
- console.warn("Malformed message, cannot route:", rawMsg);
57
- continue;
58
- }
59
- if (
60
- "id" in rawMsg &&
61
- typeof rawMsg.id === "string" &&
62
- rawMsg.id != null
63
- ) {
64
- // This is a response to a request - send to response-specific channel
65
- const channel = safeChannelName("response", rawMsg.id);
66
- const payload = JSON.stringify(rawMsg).replace(/'/g, "''");
67
- await pg.query(`NOTIFY ${channel}, '${payload}'`);
68
- } else if (
69
- "params" in rawMsg &&
70
- rawMsg.params != null &&
71
- typeof rawMsg.params === "object" &&
72
- "sessionId" in rawMsg.params &&
73
- typeof rawMsg.params.sessionId === "string"
74
- ) {
75
- // Other messages (notifications, requests from agent) go to
76
- // session-specific channel
77
- const sessionId = rawMsg.params.sessionId;
78
- const channel = safeChannelName("notifications", sessionId);
79
- const payload = JSON.stringify(rawMsg).replace(/'/g, "''");
80
- await pg.query(`NOTIFY ${channel}, '${payload}'`);
81
- } else {
82
- console.warn("Message without sessionId, cannot route:", rawMsg);
83
- }
84
- }
85
- }
86
- })();
87
- // TODO: fix this for production
88
- app.use(
89
- "*",
90
- cors({
91
- origin: "*",
92
- allowHeaders: ["content-type", "authorization", "x-session-id"],
93
- allowMethods: ["GET", "POST", "OPTIONS"],
94
- }),
95
- );
96
- app.get("/health", (c) => c.json({ ok: true }));
97
- app.get("/events", (c) => {
98
- const sessionId = c.req.header("X-Session-ID");
99
- if (!sessionId) {
100
- return c.json({ error: "X-Session-ID header required" }, 401);
101
- }
102
- return streamSSE(c, async (stream) => {
103
- await stream.writeSSE({ event: "ping", data: "{}" });
104
- const hb = setInterval(() => {
105
- // Heartbeat to keep proxies from terminating idle connections
106
- void stream.writeSSE({ event: "ping", data: "{}" });
107
- }, 1000);
108
- const channel = safeChannelName("notifications", sessionId);
109
- const unsub = await pg.listen(channel, async (payload) => {
110
- const json = JSON.parse(payload);
111
- await stream.writeSSE({
112
- event: "message",
113
- data: JSON.stringify(json),
114
- });
115
- });
116
- // Clean up when the client disconnects
117
- stream.onAbort(() => {
118
- console.log("/events connection closed");
119
- clearInterval(hb);
120
- unsub();
121
- });
122
- // Keep the connection open indefinitely
123
- await stream.sleep(1000 * 60 * 60 * 24);
124
- });
125
- });
126
- app.post("/rpc", async (c) => {
127
- // Get and validate the request body
128
- const rawBody = await c.req.json();
129
- // Validate using Zod schema
130
- const parseResult = acp.clientOutgoingMessageSchema.safeParse(rawBody);
131
- if (!parseResult.success) {
132
- return c.json(
133
- {
134
- error: "Invalid ACP message",
135
- details: parseResult.error.issues,
136
- },
137
- 400,
138
- );
139
- }
140
- const body = parseResult.data;
141
- // Ensure the request has an id
142
- const id = "id" in body ? body.id : null;
143
- const isRequest = id != null;
144
- if (isRequest) {
145
- // For requests, set up a listener before sending the request
146
- const responseChannel = safeChannelName("response", String(id));
147
- let responseResolver;
148
- const responsePromise = new Promise((resolve) => {
149
- responseResolver = resolve;
150
- });
151
- const unsub = await pg.listen(responseChannel, (payload) => {
152
- const rawResponse = JSON.parse(payload);
153
- responseResolver(rawResponse);
154
- });
155
- // Write NDJSON line into the ACP inbound stream
156
- const writer = inbound.writable.getWriter();
157
- await writer.write(encoder.encode(`${JSON.stringify(body)}\n`));
158
- writer.releaseLock();
159
- // Wait for response with 30 second timeout
160
- const timeoutPromise = new Promise((_, reject) =>
161
- setTimeout(() => reject(new Error("Request timeout")), 30000),
162
- );
163
- try {
164
- const response = await Promise.race([responsePromise, timeoutPromise]);
165
- return c.json(response);
166
- } finally {
167
- // Clean up the listener whether we got a response or timed out
168
- unsub();
169
- }
170
- } else {
171
- // For notifications, just send and return success
172
- const writer = inbound.writable.getWriter();
173
- await writer.write(encoder.encode(`${JSON.stringify(body)}\n`));
174
- writer.releaseLock();
175
- return c.json({
176
- success: true,
177
- message: "Notification sent to agent",
178
- });
179
- }
180
- });
181
- const port = Number.parseInt(process.env.PORT || "3100", 10);
182
- console.log(`Starting HTTP server on port ${port}...`);
183
- Bun.serve({
184
- fetch: app.fetch,
185
- port,
186
- });
187
- console.log(`HTTP server listening on http://localhost:${port}`);
51
+ const inbound = new TransformStream();
52
+ const outbound = new TransformStream();
53
+ const bridge = acp.ndJsonStream(outbound.writable, inbound.readable);
54
+ const agentRunner = "definition" in agent ? agent : makeRunnerFromDefinition(agent);
55
+ new acp.AgentSideConnection((conn) => new AgentAcpAdapter(agentRunner, conn), bridge);
56
+ const app = new Hono();
57
+ // Track active SSE streams by sessionId for direct output delivery
58
+ const sseStreams = new Map();
59
+ const decoder = new TextDecoder();
60
+ const encoder = new TextEncoder();
61
+ (async () => {
62
+ const reader = outbound.readable.getReader();
63
+ let buf = "";
64
+ for (;;) {
65
+ const { value, done } = await reader.read();
66
+ if (done)
67
+ break;
68
+ buf += decoder.decode(value, { stream: true });
69
+ for (let nl = buf.indexOf("\n"); nl !== -1; nl = buf.indexOf("\n")) {
70
+ const line = buf.slice(0, nl).trim();
71
+ buf = buf.slice(nl + 1);
72
+ if (!line)
73
+ continue;
74
+ let rawMsg;
75
+ try {
76
+ rawMsg = JSON.parse(line);
77
+ }
78
+ catch {
79
+ // ignore malformed lines
80
+ continue;
81
+ }
82
+ // Validate the agent message with Zod schema
83
+ const parseResult = acp.agentOutgoingMessageSchema.safeParse(rawMsg);
84
+ if (!parseResult.success) {
85
+ logger.error("Invalid agent message", {
86
+ issues: parseResult.error.issues,
87
+ });
88
+ continue;
89
+ }
90
+ //const msg = parseResult.data;
91
+ if (rawMsg == null || typeof rawMsg !== "object") {
92
+ logger.warn("Malformed message, cannot route", { message: rawMsg });
93
+ continue;
94
+ }
95
+ if ("id" in rawMsg &&
96
+ typeof rawMsg.id === "string" &&
97
+ rawMsg.id != null) {
98
+ // This is a response to a request - send to response-specific channel
99
+ const channel = safeChannelName("response", rawMsg.id);
100
+ const { payload, isCompressed, originalSize, compressedSize } = compressIfNeeded(rawMsg);
101
+ if (isCompressed) {
102
+ logger.info("Compressed response payload", {
103
+ requestId: rawMsg.id,
104
+ originalSize,
105
+ compressedSize,
106
+ compressionRatio: ((1 - compressedSize / originalSize) * 100).toFixed(1) + "%",
107
+ });
108
+ }
109
+ // Escape single quotes for PostgreSQL
110
+ const escapedPayload = payload.replace(/'/g, "''");
111
+ // Check if even compressed payload is too large
112
+ if (compressedSize > 7500) {
113
+ logger.error("Response payload too large even after compression", {
114
+ requestId: rawMsg.id,
115
+ originalSize,
116
+ compressedSize,
117
+ });
118
+ // Send error response
119
+ const errorResponse = {
120
+ jsonrpc: "2.0",
121
+ id: rawMsg.id,
122
+ error: {
123
+ code: -32603,
124
+ message: "Response payload too large even after compression",
125
+ data: {
126
+ originalSize,
127
+ compressedSize,
128
+ },
129
+ },
130
+ };
131
+ const errorPayload = JSON.stringify(errorResponse).replace(/'/g, "''");
132
+ await pg.query(`NOTIFY ${channel}, '${errorPayload}'`);
133
+ continue;
134
+ }
135
+ try {
136
+ await pg.query(`NOTIFY ${channel}, '${escapedPayload}'`);
137
+ }
138
+ catch (error) {
139
+ logger.error("Failed to send response", {
140
+ error,
141
+ requestId: rawMsg.id,
142
+ originalSize,
143
+ compressedSize,
144
+ });
145
+ // For responses, we still need to send something to unblock the client
146
+ const errorResponse = {
147
+ jsonrpc: "2.0",
148
+ id: rawMsg.id,
149
+ error: {
150
+ code: -32603,
151
+ message: "Failed to send response",
152
+ data: {
153
+ originalSize,
154
+ compressedSize,
155
+ error: error instanceof Error ? error.message : String(error),
156
+ },
157
+ },
158
+ };
159
+ const errorPayload = JSON.stringify(errorResponse).replace(/'/g, "''");
160
+ await pg.query(`NOTIFY ${channel}, '${errorPayload}'`);
161
+ }
162
+ }
163
+ else if ("params" in rawMsg &&
164
+ rawMsg.params != null &&
165
+ typeof rawMsg.params === "object" &&
166
+ "sessionId" in rawMsg.params &&
167
+ typeof rawMsg.params.sessionId === "string") {
168
+ const sessionId = rawMsg.params.sessionId;
169
+ const messageType = "method" in rawMsg && typeof rawMsg.method === "string"
170
+ ? rawMsg.method
171
+ : undefined;
172
+ // Check if this is a tool_output update - send directly via SSE
173
+ if (messageType === "session/update" &&
174
+ "params" in rawMsg &&
175
+ rawMsg.params != null &&
176
+ typeof rawMsg.params === "object" &&
177
+ "update" in rawMsg.params &&
178
+ rawMsg.params.update != null &&
179
+ typeof rawMsg.params.update === "object" &&
180
+ "sessionUpdate" in rawMsg.params.update &&
181
+ rawMsg.params.update.sessionUpdate === "tool_output") {
182
+ // Send tool output directly via SSE, bypassing PostgreSQL NOTIFY
183
+ const stream = sseStreams.get(sessionId);
184
+ if (stream) {
185
+ try {
186
+ await stream.writeSSE({
187
+ event: "message",
188
+ data: JSON.stringify(rawMsg),
189
+ });
190
+ logger.debug("Sent tool output", {
191
+ sessionId,
192
+ payloadSize: JSON.stringify(rawMsg).length,
193
+ });
194
+ }
195
+ catch (error) {
196
+ logger.error("Failed to send tool output", {
197
+ error,
198
+ sessionId,
199
+ });
200
+ }
201
+ }
202
+ else {
203
+ logger.warn("No SSE stream found for tool output", { sessionId });
204
+ }
205
+ continue;
206
+ }
207
+ // Other messages (notifications, requests from agent) go to
208
+ // session-specific channel via PostgreSQL NOTIFY
209
+ const channel = safeChannelName("notifications", sessionId);
210
+ const { payload, isCompressed, originalSize, compressedSize } = compressIfNeeded(rawMsg);
211
+ if (isCompressed) {
212
+ logger.info("Compressed notification payload", {
213
+ sessionId,
214
+ messageType,
215
+ originalSize,
216
+ compressedSize,
217
+ compressionRatio: ((1 - compressedSize / originalSize) * 100).toFixed(1) + "%",
218
+ });
219
+ }
220
+ // Escape single quotes for PostgreSQL
221
+ const escapedPayload = payload.replace(/'/g, "''");
222
+ // Check if even compressed payload is too large
223
+ if (compressedSize > 7500) {
224
+ logger.error("Notification payload too large even after compression, skipping", {
225
+ sessionId,
226
+ messageType,
227
+ originalSize,
228
+ compressedSize,
229
+ });
230
+ continue;
231
+ }
232
+ try {
233
+ await pg.query(`NOTIFY ${channel}, '${escapedPayload}'`);
234
+ }
235
+ catch (error) {
236
+ logger.error("Failed to send notification", {
237
+ error,
238
+ sessionId,
239
+ messageType,
240
+ originalSize,
241
+ compressedSize,
242
+ });
243
+ }
244
+ }
245
+ else {
246
+ logger.warn("Message without sessionId, cannot route", {
247
+ message: rawMsg,
248
+ });
249
+ }
250
+ }
251
+ }
252
+ })();
253
+ // TODO: fix this for production
254
+ app.use("*", cors({
255
+ origin: "*",
256
+ allowHeaders: ["content-type", "authorization", "x-session-id"],
257
+ allowMethods: ["GET", "POST", "OPTIONS"],
258
+ }));
259
+ app.get("/health", (c) => c.json({ ok: true }));
260
+ app.get("/events", (c) => {
261
+ const sessionId = c.req.header("X-Session-ID");
262
+ if (!sessionId) {
263
+ logger.warn("GET /events - Missing X-Session-ID header");
264
+ return c.json({ error: "X-Session-ID header required" }, 401);
265
+ }
266
+ logger.debug("GET /events - SSE connection opened", { sessionId });
267
+ return streamSSE(c, async (stream) => {
268
+ // Register this stream for direct tool output delivery
269
+ sseStreams.set(sessionId, stream);
270
+ await stream.writeSSE({ event: "ping", data: "{}" });
271
+ const hb = setInterval(() => {
272
+ // Heartbeat to keep proxies from terminating idle connections
273
+ void stream.writeSSE({ event: "ping", data: "{}" });
274
+ }, 1000);
275
+ const channel = safeChannelName("notifications", sessionId);
276
+ const unsub = await pg.listen(channel, async (payload) => {
277
+ let json = JSON.parse(payload);
278
+ // Check if the message is compressed
279
+ if (json &&
280
+ typeof json === "object" &&
281
+ "_compressed" in json &&
282
+ json._compressed === true &&
283
+ "data" in json &&
284
+ typeof json.data === "string") {
285
+ // This is a compressed message - decompress it
286
+ try {
287
+ const { gunzipSync } = await import("node:zlib");
288
+ const compressed = Buffer.from(json.data, "base64");
289
+ const decompressed = gunzipSync(compressed);
290
+ json = JSON.parse(decompressed.toString());
291
+ logger.trace("Decompressed SSE message", { sessionId, channel });
292
+ }
293
+ catch (error) {
294
+ logger.error("Failed to decompress message", {
295
+ error,
296
+ sessionId,
297
+ channel,
298
+ });
299
+ return;
300
+ }
301
+ }
302
+ logger.trace("Sending SSE message", { sessionId, channel });
303
+ await stream.writeSSE({
304
+ event: "message",
305
+ data: JSON.stringify(json),
306
+ });
307
+ });
308
+ // Clean up when the client disconnects
309
+ stream.onAbort(() => {
310
+ logger.debug("GET /events - SSE connection closed", { sessionId });
311
+ clearInterval(hb);
312
+ unsub();
313
+ sseStreams.delete(sessionId);
314
+ });
315
+ // Keep the connection open indefinitely
316
+ await stream.sleep(1000 * 60 * 60 * 24);
317
+ });
318
+ });
319
+ app.post("/rpc", async (c) => {
320
+ // Get and validate the request body
321
+ const rawBody = await c.req.json();
322
+ // Validate using Zod schema
323
+ const parseResult = acp.clientOutgoingMessageSchema.safeParse(rawBody);
324
+ if (!parseResult.success) {
325
+ logger.warn("POST /rpc - Invalid ACP message", {
326
+ issues: parseResult.error.issues,
327
+ });
328
+ return c.json({
329
+ error: "Invalid ACP message",
330
+ details: parseResult.error.issues,
331
+ }, 400);
332
+ }
333
+ const body = parseResult.data;
334
+ // Ensure the request has an id
335
+ const id = "id" in body ? body.id : null;
336
+ const isRequest = id != null;
337
+ const method = "method" in body ? body.method : "notification";
338
+ logger.debug("POST /rpc - Received request", { method, id, isRequest });
339
+ if (isRequest) {
340
+ // For requests, set up a listener before sending the request
341
+ const responseChannel = safeChannelName("response", String(id));
342
+ let responseResolver;
343
+ const responsePromise = new Promise((resolve) => {
344
+ responseResolver = resolve;
345
+ });
346
+ const unsub = await pg.listen(responseChannel, async (payload) => {
347
+ let rawResponse = JSON.parse(payload);
348
+ // Check if the response is compressed
349
+ if (rawResponse &&
350
+ typeof rawResponse === "object" &&
351
+ "_compressed" in rawResponse &&
352
+ rawResponse._compressed === true &&
353
+ "data" in rawResponse &&
354
+ typeof rawResponse.data === "string") {
355
+ // This is a compressed response - decompress it
356
+ try {
357
+ const { gunzipSync } = await import("node:zlib");
358
+ const compressed = Buffer.from(rawResponse.data, "base64");
359
+ const decompressed = gunzipSync(compressed);
360
+ rawResponse = JSON.parse(decompressed.toString());
361
+ logger.trace("Decompressed RPC response", { id });
362
+ }
363
+ catch (error) {
364
+ logger.error("Failed to decompress response", {
365
+ error,
366
+ requestId: id,
367
+ });
368
+ rawResponse = {
369
+ jsonrpc: "2.0",
370
+ id,
371
+ error: {
372
+ code: -32603,
373
+ message: "Failed to decompress response",
374
+ data: {
375
+ error: error instanceof Error ? error.message : String(error),
376
+ },
377
+ },
378
+ };
379
+ }
380
+ }
381
+ responseResolver(rawResponse);
382
+ });
383
+ // Write NDJSON line into the ACP inbound stream
384
+ const writer = inbound.writable.getWriter();
385
+ await writer.write(encoder.encode(`${JSON.stringify(body)}\n`));
386
+ writer.releaseLock();
387
+ // Wait for response with 30 second timeout
388
+ const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error("Request timeout")), 30000));
389
+ try {
390
+ const response = await Promise.race([responsePromise, timeoutPromise]);
391
+ logger.debug("POST /rpc - Response received", { id });
392
+ return c.json(response);
393
+ }
394
+ catch (error) {
395
+ logger.error("POST /rpc - Request timeout", {
396
+ id,
397
+ error: error instanceof Error ? error.message : String(error),
398
+ });
399
+ throw error;
400
+ }
401
+ finally {
402
+ // Clean up the listener whether we got a response or timed out
403
+ unsub();
404
+ }
405
+ }
406
+ else {
407
+ // For notifications, just send and return success
408
+ const writer = inbound.writable.getWriter();
409
+ await writer.write(encoder.encode(`${JSON.stringify(body)}\n`));
410
+ writer.releaseLock();
411
+ return c.json({
412
+ success: true,
413
+ message: "Notification sent to agent",
414
+ });
415
+ }
416
+ });
417
+ const port = Number.parseInt(process.env.PORT || "3100", 10);
418
+ logger.info("Starting HTTP server", { port });
419
+ Bun.serve({
420
+ fetch: app.fetch,
421
+ port,
422
+ });
423
+ logger.info("HTTP server listening", {
424
+ url: `http://localhost:${port}`,
425
+ port,
426
+ });
188
427
  }
@@ -19,6 +19,9 @@ export declare const AgentDefinitionSchema: z.ZodObject<{
19
19
  tools: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
20
20
  type: z.ZodLiteral<"custom">;
21
21
  modulePath: z.ZodString;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ type: z.ZodLiteral<"filesystem">;
24
+ working_directory: z.ZodOptional<z.ZodString>;
22
25
  }, z.core.$strip>]>>>;
23
26
  mcps: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
24
27
  name: z.ZodString;
@@ -29,8 +29,18 @@ const CustomToolSchema = z.object({
29
29
  type: z.literal("custom"),
30
30
  modulePath: z.string(),
31
31
  });
32
+ /** Filesystem tool configuration schema. */
33
+ const FilesystemToolSchema = z.object({
34
+ type: z.literal("filesystem"),
35
+ /** If omitted, defaults to process.cwd() at runtime */
36
+ working_directory: z.string().optional(),
37
+ });
32
38
  /** Tool schema - can be a string (built-in tool) or custom tool object. */
33
- const ToolSchema = z.union([z.string(), CustomToolSchema]);
39
+ const ToolSchema = z.union([
40
+ z.string(),
41
+ CustomToolSchema,
42
+ FilesystemToolSchema,
43
+ ]);
34
44
  /** Agent definition schema. */
35
45
  export const AgentDefinitionSchema = z.object({
36
46
  systemPrompt: z.string().nullable(),
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ export {};