@townco/agent 0.1.82 → 0.1.83
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/acp-server/adapter.js +10 -6
- package/dist/acp-server/http.js +1 -1
- package/dist/acp-server/session-storage.d.ts +13 -6
- package/dist/acp-server/session-storage.js +94 -59
- package/dist/runner/agent-runner.d.ts +3 -1
- package/dist/runner/hooks/executor.js +1 -1
- package/dist/runner/hooks/predefined/compaction-tool.js +3 -2
- package/dist/runner/hooks/predefined/tool-response-compactor.js +2 -2
- package/dist/runner/langchain/index.d.ts +1 -0
- package/dist/runner/langchain/index.js +94 -22
- package/dist/runner/langchain/tools/artifacts.d.ts +68 -0
- package/dist/runner/langchain/tools/artifacts.js +469 -0
- package/dist/runner/langchain/tools/browser.js +15 -3
- package/dist/runner/langchain/tools/filesystem.d.ts +8 -4
- package/dist/runner/langchain/tools/filesystem.js +118 -82
- package/dist/runner/langchain/tools/generate_image.d.ts +19 -0
- package/dist/runner/langchain/tools/generate_image.js +54 -14
- package/dist/runner/langchain/tools/subagent.js +2 -2
- package/dist/runner/langchain/tools/todo.js +3 -0
- package/dist/runner/langchain/tools/web_search.js +6 -0
- package/dist/runner/session-context.d.ts +40 -0
- package/dist/runner/session-context.js +69 -0
- package/dist/runner/tools.d.ts +2 -2
- package/dist/runner/tools.js +2 -0
- package/dist/scaffold/project-scaffold.js +7 -3
- package/dist/telemetry/setup.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/token-counter.js +2 -2
- package/package.json +10 -10
package/dist/runner/tools.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/** Built-in tool types. */
|
|
3
|
-
export declare const zBuiltInToolType: z.ZodUnion<readonly [z.ZodLiteral<"todo_write">, z.ZodLiteral<"get_weather">, z.ZodLiteral<"web_search">, z.ZodLiteral<"town_web_search">, z.ZodLiteral<"filesystem">, z.ZodLiteral<"generate_image">, z.ZodLiteral<"browser">]>;
|
|
3
|
+
export declare const zBuiltInToolType: z.ZodUnion<readonly [z.ZodLiteral<"artifacts">, z.ZodLiteral<"todo_write">, z.ZodLiteral<"get_weather">, z.ZodLiteral<"web_search">, z.ZodLiteral<"town_web_search">, z.ZodLiteral<"filesystem">, z.ZodLiteral<"generate_image">, z.ZodLiteral<"town_generate_image">, z.ZodLiteral<"browser">]>;
|
|
4
4
|
/** Subagent configuration schema for Task tools. */
|
|
5
5
|
export declare const zSubagentConfig: z.ZodObject<{
|
|
6
6
|
agentName: z.ZodString;
|
|
@@ -23,7 +23,7 @@ declare const zDirectTool: z.ZodObject<{
|
|
|
23
23
|
}, z.core.$strip>>>;
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
/** Tool type - can be a built-in tool string or custom tool object. */
|
|
26
|
-
export declare const zToolType: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"todo_write">, z.ZodLiteral<"get_weather">, z.ZodLiteral<"web_search">, z.ZodLiteral<"town_web_search">, z.ZodLiteral<"filesystem">, z.ZodLiteral<"generate_image">, z.ZodLiteral<"browser">]>, z.ZodObject<{
|
|
26
|
+
export declare const zToolType: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"artifacts">, z.ZodLiteral<"todo_write">, z.ZodLiteral<"get_weather">, z.ZodLiteral<"web_search">, z.ZodLiteral<"town_web_search">, z.ZodLiteral<"filesystem">, z.ZodLiteral<"generate_image">, z.ZodLiteral<"town_generate_image">, z.ZodLiteral<"browser">]>, z.ZodObject<{
|
|
27
27
|
type: z.ZodLiteral<"custom">;
|
|
28
28
|
modulePath: z.ZodString;
|
|
29
29
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/runner/tools.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/** Built-in tool types. */
|
|
3
3
|
export const zBuiltInToolType = z.union([
|
|
4
|
+
z.literal("artifacts"),
|
|
4
5
|
z.literal("todo_write"),
|
|
5
6
|
z.literal("get_weather"),
|
|
6
7
|
z.literal("web_search"),
|
|
7
8
|
z.literal("town_web_search"),
|
|
8
9
|
z.literal("filesystem"),
|
|
9
10
|
z.literal("generate_image"),
|
|
11
|
+
z.literal("town_generate_image"),
|
|
10
12
|
z.literal("browser"),
|
|
11
13
|
]);
|
|
12
14
|
/** Custom tool schema (loaded from module path). */
|
|
@@ -205,9 +205,13 @@ const agent: AgentDefinition = {
|
|
|
205
205
|
* Generate .gitignore
|
|
206
206
|
*/
|
|
207
207
|
function generateProjectGitignore() {
|
|
208
|
-
return
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
return `**/node_modules
|
|
209
|
+
**/.env
|
|
210
|
+
**/.logs
|
|
211
|
+
**/.sessions
|
|
212
|
+
**/dist
|
|
213
|
+
*.db
|
|
214
|
+
*.lancedb
|
|
211
215
|
*.log
|
|
212
216
|
`;
|
|
213
217
|
}
|
package/dist/telemetry/setup.js
CHANGED
|
@@ -32,7 +32,7 @@ export function initializeOpenTelemetry(options = {}) {
|
|
|
32
32
|
console.log(`OTLP base endpoint: ${otlpEndpoint}`);
|
|
33
33
|
console.log(`OTLP trace URL: ${traceUrl}`);
|
|
34
34
|
// Quick connectivity test
|
|
35
|
-
fetch(otlpEndpoint.replace(/\/$/, "")
|
|
35
|
+
fetch(`${otlpEndpoint.replace(/\/$/, "")}/health`)
|
|
36
36
|
.then((r) => r.json())
|
|
37
37
|
.then((d) => console.log(`✓ OTLP server reachable:`, d))
|
|
38
38
|
.catch((e) => console.error(`✗ OTLP server NOT reachable:`, e.message));
|