@townco/agent 0.1.118 → 0.1.119
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/runner/langchain/tools/artifacts.d.ts +68 -0
- package/dist/runner/langchain/tools/artifacts.js +474 -0
- package/dist/runner/langchain/tools/conversation_search.d.ts +22 -0
- package/dist/runner/langchain/tools/conversation_search.js +137 -0
- package/dist/runner/langchain/tools/generate_image.d.ts +47 -0
- package/dist/runner/langchain/tools/generate_image.js +175 -0
- package/dist/runner/langchain/tools/port-utils.d.ts +8 -0
- package/dist/runner/langchain/tools/port-utils.js +35 -0
- package/dist/templates/index.d.ts +5 -1
- package/dist/templates/index.js +6 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/templates/index.ts +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@townco/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.119",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"files": [
|
|
@@ -83,12 +83,12 @@
|
|
|
83
83
|
"@opentelemetry/sdk-trace-base": "^1.28.0",
|
|
84
84
|
"@opentelemetry/sdk-trace-node": "^1.28.0",
|
|
85
85
|
"@opentelemetry/semantic-conventions": "^1.28.0",
|
|
86
|
-
"@townco/apiclient": "0.0.
|
|
87
|
-
"@townco/core": "0.0.
|
|
88
|
-
"@townco/gui-template": "0.1.
|
|
89
|
-
"@townco/tsconfig": "0.1.
|
|
90
|
-
"@townco/tui-template": "0.1.
|
|
91
|
-
"@townco/ui": "0.1.
|
|
86
|
+
"@townco/apiclient": "0.0.31",
|
|
87
|
+
"@townco/core": "0.0.89",
|
|
88
|
+
"@townco/gui-template": "0.1.108",
|
|
89
|
+
"@townco/tsconfig": "0.1.108",
|
|
90
|
+
"@townco/tui-template": "0.1.108",
|
|
91
|
+
"@townco/ui": "0.1.111",
|
|
92
92
|
"exa-js": "^2.0.0",
|
|
93
93
|
"hono": "^4.10.4",
|
|
94
94
|
"langchain": "^1.0.3",
|
package/templates/index.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as prettier from "prettier";
|
|
2
|
-
import type {
|
|
2
|
+
import type { z } from "zod";
|
|
3
|
+
import type { AgentDefinition, McpConfigSchema } from "../definition";
|
|
4
|
+
|
|
5
|
+
type McpConfig = z.infer<typeof McpConfigSchema>;
|
|
3
6
|
|
|
4
7
|
export interface TemplateVars {
|
|
5
8
|
name: string;
|
|
@@ -20,6 +23,7 @@ export interface TemplateVars {
|
|
|
20
23
|
schema: unknown;
|
|
21
24
|
}
|
|
22
25
|
>;
|
|
26
|
+
mcps?: McpConfig[];
|
|
23
27
|
systemPrompt: string | null;
|
|
24
28
|
hasWebSearch: boolean;
|
|
25
29
|
hasGenerateImage: boolean;
|
|
@@ -75,6 +79,9 @@ export function getTemplateVars(
|
|
|
75
79
|
if (definition.suggestedPrompts) {
|
|
76
80
|
result.suggestedPrompts = definition.suggestedPrompts;
|
|
77
81
|
}
|
|
82
|
+
if (definition.mcps && definition.mcps.length > 0) {
|
|
83
|
+
result.mcps = definition.mcps;
|
|
84
|
+
}
|
|
78
85
|
|
|
79
86
|
return result;
|
|
80
87
|
}
|
|
@@ -134,6 +141,10 @@ export async function generateIndexTs(vars: TemplateVars): Promise<string> {
|
|
|
134
141
|
agentDef.systemPrompt = vars.systemPrompt;
|
|
135
142
|
agentDef.tools = vars.tools;
|
|
136
143
|
|
|
144
|
+
if (vars.mcps && vars.mcps.length > 0) {
|
|
145
|
+
agentDef.mcps = vars.mcps;
|
|
146
|
+
}
|
|
147
|
+
|
|
137
148
|
if (vars.hooks) {
|
|
138
149
|
agentDef.hooks = vars.hooks;
|
|
139
150
|
}
|