@townco/cli 0.1.17 → 0.1.19

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.
@@ -163,17 +163,17 @@ export async function runCommand(options) {
163
163
  }
164
164
  // Default: Start TUI interface with the agent
165
165
  console.log(`Starting interactive terminal for agent "${name}"...\n`);
166
- // Get path to TUI from @townco/tui-template npm package
167
- let tuiPath;
166
+ // Get path to TUI from agent's tui directory
167
+ const tuiPath = join(agentPath, "tui", "dist", "index.js");
168
+ // Check if TUI exists
168
169
  try {
169
- const { createRequire } = await import("node:module");
170
- const require = createRequire(import.meta.url);
171
- const tuiPackagePath = require.resolve("@townco/tui-template/package.json");
172
- const tuiPackageDir = join(tuiPackagePath, "..");
173
- tuiPath = join(tuiPackageDir, "dist", "index.js");
170
+ const { stat } = await import("node:fs/promises");
171
+ await stat(tuiPath);
174
172
  }
175
- catch (error) {
176
- console.error("Error: Could not find @townco/tui-template. Please ensure it is installed.");
173
+ catch {
174
+ console.error(`Error: TUI not found for agent "${name}".`);
175
+ console.log(`\nThe TUI was not bundled with this agent.`);
176
+ console.log(`Recreate the agent with "town create" to include the TUI.`);
177
177
  process.exit(1);
178
178
  }
179
179
  // Run TUI with the agent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@townco/cli",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "town": "./dist/index.js"
@@ -18,17 +18,16 @@
18
18
  "build": "tsc"
19
19
  },
20
20
  "devDependencies": {
21
- "@townco/tsconfig": "0.1.9",
21
+ "@townco/tsconfig": "0.1.11",
22
22
  "@types/bun": "^1.3.1",
23
23
  "@types/react": "^19.2.2"
24
24
  },
25
25
  "dependencies": {
26
26
  "@optique/core": "^0.6.2",
27
27
  "@optique/run": "^0.6.2",
28
- "@townco/agent": "0.1.17",
29
- "@townco/secret": "0.1.12",
30
- "@townco/tui-template": "0.1.9",
31
- "@townco/ui": "0.1.12",
28
+ "@townco/agent": "0.1.19",
29
+ "@townco/secret": "0.1.14",
30
+ "@townco/ui": "0.1.14",
32
31
  "@types/inquirer": "^9.0.9",
33
32
  "ink": "^6.4.0",
34
33
  "ink-text-input": "^6.0.0",