@townco/agent 0.1.20 → 0.1.22
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 +77 -73
- package/dist/acp-server/http.js +233 -10
- package/dist/index.js +5 -11
- package/dist/runner/agent-runner.d.ts +16 -2
- package/dist/runner/agent-runner.js +4 -4
- package/dist/runner/langchain/index.d.ts +4 -4
- package/dist/runner/langchain/index.js +32 -10
- package/dist/runner/langchain/tools/todo.js +13 -16
- package/dist/runner/langchain/tools/web_search.js +18 -21
- package/dist/test-script.js +12 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/index.ts +7 -11
- package/package.json +5 -5
package/index.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
1
3
|
import { makeHttpTransport, makeStdioTransport } from "./acp-server";
|
|
2
4
|
import type { AgentDefinition } from "./definition";
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"get_weather",
|
|
10
|
-
"web_search",
|
|
11
|
-
{ type: "filesystem", working_directory: "/Users/michael/code/town" },
|
|
12
|
-
],
|
|
13
|
-
mcps: [],
|
|
14
|
-
};
|
|
6
|
+
// Load agent definition from shared JSON file at repo root
|
|
7
|
+
const configPath = join(import.meta.dir, "../../agent.json");
|
|
8
|
+
const exampleAgent: AgentDefinition = JSON.parse(
|
|
9
|
+
readFileSync(configPath, "utf-8"),
|
|
10
|
+
);
|
|
15
11
|
|
|
16
12
|
// Parse transport type from command line argument
|
|
17
13
|
const transport = process.argv[2] || "stdio";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@townco/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"files": [
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"@langchain/core": "^1.0.3",
|
|
58
58
|
"@langchain/exa": "^0.1.0",
|
|
59
59
|
"@langchain/mcp-adapters": "^1.0.0",
|
|
60
|
-
"@townco/gui-template": "0.1.
|
|
61
|
-
"@townco/tui-template": "0.1.
|
|
62
|
-
"@townco/tsconfig": "0.1.
|
|
63
|
-
"@townco/ui": "0.1.
|
|
60
|
+
"@townco/gui-template": "0.1.14",
|
|
61
|
+
"@townco/tui-template": "0.1.14",
|
|
62
|
+
"@townco/tsconfig": "0.1.14",
|
|
63
|
+
"@townco/ui": "0.1.17",
|
|
64
64
|
"exa-js": "^2.0.0",
|
|
65
65
|
"hono": "^4.10.4",
|
|
66
66
|
"langchain": "^1.0.3",
|