@townco/cli 0.1.63 → 0.1.71

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.
@@ -237,7 +237,7 @@ function CreateApp({ name: initialName, model: initialModel, tools: initialTools
237
237
  }
238
238
  if (scaffoldStatus === "done") {
239
239
  const modelLabel = agentDef.model?.replace("claude-", "") || "";
240
- return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Agent created successfully!" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: "green", children: "\u25CF" }), " ", _jsx(Text, { bold: true, children: agentDef.name })] }), _jsxs(Text, { dimColor: true, children: [" Model: ", modelLabel] }), agentDef.tools && agentDef.tools.length > 0 && (_jsxs(Text, { dimColor: true, children: [" Tools: ", agentDef.tools.join(", ")] })), _jsxs(Text, { dimColor: true, children: [" Path: ", agentPath] })] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["Run agent: bun agents/", agentDef.name, "/index.ts stdio"] }), _jsxs(Text, { dimColor: true, children: ["GUI: cd agents/", agentDef.name, "/gui && bun run dev"] }), _jsxs(Text, { dimColor: true, children: ["TUI: cd agents/", agentDef.name, "/tui && bun start"] })] })] }));
240
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Agent created successfully!" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: "green", children: "\u25CF" }), " ", _jsx(Text, { bold: true, children: agentDef.name })] }), _jsxs(Text, { dimColor: true, children: [" Model: ", modelLabel] }), agentDef.tools && agentDef.tools.length > 0 && (_jsxs(Text, { dimColor: true, children: [" Tools: ", agentDef.tools.join(", ")] })), _jsxs(Text, { dimColor: true, children: [" Path: ", agentPath] })] }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["Run agent: town run ", agentDef.name] }), _jsxs(Text, { dimColor: true, children: ["With GUI: town run ", agentDef.name, " --gui"] })] })] }));
241
241
  }
242
242
  }
243
243
  return null;
@@ -275,7 +275,7 @@ export async function runCommand(options) {
275
275
  },
276
276
  });
277
277
  // Start the GUI dev server (no package.json, run vite directly) with detached process group
278
- const guiProcess = spawn("bunx", ["vite"], {
278
+ const guiProcess = spawn("bunx", ["vite", ...(Bun.env.BIND_HOST ? ["--host", Bun.env.BIND_HOST] : [])], {
279
279
  cwd: guiPath,
280
280
  stdio: ["ignore", "pipe", "pipe"], // Pipe stdout/stderr for capture
281
281
  detached: true,
package/dist/index.js CHANGED
@@ -122,18 +122,24 @@ const main = async (parser, meta) => await match(run(parser, meta))
122
122
  ],
123
123
  });
124
124
  console.log("Creating archive...");
125
- const root = await findRoot();
125
+ const root = await findRoot({ rootMarker: "package.json" });
126
126
  const arc = archiver("tar", { gzip: true });
127
+ const chunks = [];
128
+ const done = new Promise((ok, err) => {
129
+ arc.on("data", (chunk) => chunks.push(chunk));
130
+ arc.on("end", () => ok(Buffer.concat(chunks)));
131
+ arc.on("error", err);
132
+ });
127
133
  (await walk({ path: root, ignoreFiles: [".gitignore"] }))
128
134
  .filter((path) => path.split("/")[0] !== ".git")
129
135
  .forEach((path) => {
130
136
  if (!fs.statSync(path).isFile())
131
137
  return;
132
- arc.append(path, { name: path });
138
+ arc.append(fs.createReadStream(path), { name: path });
133
139
  });
134
140
  arc.finalize();
135
141
  console.log("Uploading archive...");
136
- const { sha256, cached } = await client.uploadArchive.mutate(Buffer.from(await Array.fromAsync(arc)));
142
+ const { sha256, cached } = await client.uploadArchive.mutate(await done);
137
143
  console.log(`Archive uploaded: ${sha256} (${cached ? "cached" : "new"})`);
138
144
  console.log("Deploying...");
139
145
  client.deploy.subscribe({ sha256 }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@townco/cli",
3
- "version": "0.1.63",
3
+ "version": "0.1.71",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "town": "./dist/index.js"
@@ -15,7 +15,7 @@
15
15
  "build": "tsc"
16
16
  },
17
17
  "devDependencies": {
18
- "@townco/tsconfig": "0.1.55",
18
+ "@townco/tsconfig": "0.1.63",
19
19
  "@types/archiver": "^7.0.0",
20
20
  "@types/bun": "^1.3.1",
21
21
  "@types/ignore-walk": "^4.0.3",
@@ -25,12 +25,12 @@
25
25
  "dependencies": {
26
26
  "@optique/core": "^0.6.2",
27
27
  "@optique/run": "^0.6.2",
28
- "@townco/agent": "0.1.63",
29
- "@townco/core": "0.0.36",
30
- "@townco/debugger": "0.1.13",
31
- "@townco/env": "0.1.8",
32
- "@townco/secret": "0.1.58",
33
- "@townco/ui": "0.1.58",
28
+ "@townco/agent": "0.1.71",
29
+ "@townco/core": "0.0.44",
30
+ "@townco/debugger": "0.1.21",
31
+ "@townco/env": "0.1.16",
32
+ "@townco/secret": "0.1.66",
33
+ "@townco/ui": "0.1.66",
34
34
  "@trpc/client": "^11.7.2",
35
35
  "@types/inquirer": "^9.0.9",
36
36
  "@types/ws": "^8.5.13",