@townco/agent 0.1.125 → 0.1.127

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@townco/agent",
3
- "version": "0.1.125",
3
+ "version": "0.1.127",
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.37",
87
- "@townco/core": "0.0.95",
88
- "@townco/gui-template": "0.1.114",
89
- "@townco/tsconfig": "0.1.114",
90
- "@townco/tui-template": "0.1.114",
91
- "@townco/ui": "0.1.117",
86
+ "@townco/apiclient": "0.0.39",
87
+ "@townco/core": "0.0.97",
88
+ "@townco/gui-template": "0.1.116",
89
+ "@townco/tsconfig": "0.1.116",
90
+ "@townco/tui-template": "0.1.116",
91
+ "@townco/ui": "0.1.119",
92
92
  "ai-tokenizer": "^1.0.6",
93
93
  "exa-js": "^2.0.0",
94
94
  "hono": "^4.10.4",
@@ -154,12 +154,13 @@ export async function generateIndexTs(vars: TemplateVars): Promise<string> {
154
154
  return JSON.stringify(vars.tools);
155
155
  }
156
156
  // makeSubagentsTool expects 'description' not 'toolDescription'
157
- const subagentConfigs = vars.subagents!.map((s) => ({
158
- agentName: s.agentName,
159
- description: s.toolDescription,
160
- ...(s.displayName && { displayName: s.displayName }),
161
- path: s.path,
162
- }));
157
+ const subagentConfigs =
158
+ vars.subagents?.map((s) => ({
159
+ agentName: s.agentName,
160
+ description: s.toolDescription,
161
+ ...(s.displayName && { displayName: s.displayName }),
162
+ path: s.path,
163
+ })) ?? [];
163
164
  const subagentToolCall = `makeSubagentsTool(${JSON.stringify(subagentConfigs, null, 2)})`;
164
165
  const toolItems = vars.tools.map((t) => JSON.stringify(t));
165
166
  toolItems.push(subagentToolCall);