@townco/cli 0.1.17 → 0.1.18
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/commands/run.js +9 -9
- package/package.json +5 -6
package/dist/commands/run.js
CHANGED
|
@@ -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
|
|
167
|
-
|
|
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 {
|
|
170
|
-
|
|
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
|
|
176
|
-
console.error(
|
|
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.
|
|
3
|
+
"version": "0.1.18",
|
|
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.
|
|
21
|
+
"@townco/tsconfig": "0.1.10",
|
|
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.
|
|
29
|
-
"@townco/secret": "0.1.
|
|
30
|
-
"@townco/
|
|
31
|
-
"@townco/ui": "0.1.12",
|
|
28
|
+
"@townco/agent": "0.1.18",
|
|
29
|
+
"@townco/secret": "0.1.13",
|
|
30
|
+
"@townco/ui": "0.1.13",
|
|
32
31
|
"@types/inquirer": "^9.0.9",
|
|
33
32
|
"ink": "^6.4.0",
|
|
34
33
|
"ink-text-input": "^6.0.0",
|