@townco/cli 0.1.32 → 0.1.33

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.
@@ -3,5 +3,6 @@ export interface RunCommandOptions {
3
3
  http?: boolean;
4
4
  gui?: boolean;
5
5
  port?: number;
6
+ noSession?: boolean;
6
7
  }
7
8
  export declare function runCommand(options: RunCommandOptions): Promise<void>;
@@ -13,7 +13,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
13
13
  import { LogsPane } from "../components/LogsPane.js";
14
14
  import { TabbedOutput } from "../components/TabbedOutput.js";
15
15
  import { findAvailablePort } from "../lib/port-utils.js";
16
- function TuiRunner({ agentPath, workingDir, onExit }) {
16
+ function TuiRunner({ agentPath, workingDir, noSession, onExit, }) {
17
17
  const [client, setClient] = useState(null);
18
18
  const [error, setError] = useState(null);
19
19
  // Configure logs directory for UI package loggers BEFORE any loggers are created
@@ -38,6 +38,7 @@ function TuiRunner({ agentPath, workingDir, onExit }) {
38
38
  options: {
39
39
  agentPath,
40
40
  workingDirectory: workingDir,
41
+ environment: noSession ? { TOWN_NO_SESSION: "true" } : {},
41
42
  },
42
43
  });
43
44
  setClient(newClient);
@@ -54,7 +55,7 @@ function TuiRunner({ agentPath, workingDir, onExit }) {
54
55
  setError(errorMsg);
55
56
  return undefined;
56
57
  }
57
- }, [agentPath, workingDir, logger]);
58
+ }, [agentPath, workingDir, logger, noSession]);
58
59
  const customTabs = useMemo(() => [
59
60
  {
60
61
  name: "Chat",
@@ -143,7 +144,7 @@ async function loadEnvVars(projectRoot, logger) {
143
144
  return envVars;
144
145
  }
145
146
  export async function runCommand(options) {
146
- const { name, http = false, gui = false, port = 3100 } = options;
147
+ const { name, http = false, gui = false, port = 3100, noSession = false, } = options;
147
148
  // Check if we're inside a Town project
148
149
  const projectRoot = await isInsideTownProject();
149
150
  if (projectRoot === null) {
@@ -219,6 +220,7 @@ export async function runCommand(options) {
219
220
  ...configEnvVars,
220
221
  NODE_ENV: process.env.NODE_ENV || "production",
221
222
  PORT: availablePort.toString(),
223
+ ...(noSession ? { TOWN_NO_SESSION: "true" } : {}),
222
224
  },
223
225
  });
224
226
  // Start the GUI dev server (no package.json, run vite directly)
@@ -264,6 +266,7 @@ export async function runCommand(options) {
264
266
  ...configEnvVars,
265
267
  NODE_ENV: process.env.NODE_ENV || "production",
266
268
  PORT: availablePort.toString(),
269
+ ...(noSession ? { TOWN_NO_SESSION: "true" } : {}),
267
270
  },
268
271
  });
269
272
  agentProcess.on("error", (error) => {
@@ -291,7 +294,7 @@ export async function runCommand(options) {
291
294
  process.stdin.setRawMode(true);
292
295
  }
293
296
  // Render the tabbed UI with Chat and Logs
294
- const { waitUntilExit } = render(_jsx(TuiRunner, { agentPath: binPath, workingDir: agentPath, onExit: () => {
297
+ const { waitUntilExit } = render(_jsx(TuiRunner, { agentPath: binPath, workingDir: agentPath, noSession: noSession, onExit: () => {
295
298
  // Cleanup is handled by the ACP client disconnect
296
299
  } }));
297
300
  await waitUntilExit();
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ const parser = or(command("deploy", constant("deploy"), { brief: message `Deploy
45
45
  http: optional(flag("--http")),
46
46
  gui: optional(flag("--gui")),
47
47
  port: optional(option("-p", "--port", integer())),
48
+ noSession: optional(flag("--no-session")),
48
49
  }), { brief: message `Run an agent.` }), command("secret", object({
49
50
  command: constant("secret"),
50
51
  subcommand: or(command("list", constant("list"), { brief: message `List secrets.` }), command("add", object({
@@ -145,11 +146,12 @@ async function main(parser, meta) {
145
146
  }
146
147
  }
147
148
  })
148
- .with({ command: "run" }, async ({ name, http, gui, port }) => {
149
+ .with({ command: "run" }, async ({ name, http, gui, port, noSession }) => {
149
150
  const options = {
150
151
  name,
151
152
  http: http === true,
152
153
  gui: gui === true,
154
+ noSession: noSession === true,
153
155
  };
154
156
  if (port !== null && port !== undefined) {
155
157
  options.port = port;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@townco/cli",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "town": "./dist/index.js"
@@ -15,17 +15,17 @@
15
15
  "build": "tsc"
16
16
  },
17
17
  "devDependencies": {
18
- "@townco/tsconfig": "0.1.24",
18
+ "@townco/tsconfig": "0.1.25",
19
19
  "@types/bun": "^1.3.1",
20
20
  "@types/react": "^19.2.2"
21
21
  },
22
22
  "dependencies": {
23
23
  "@optique/core": "^0.6.2",
24
24
  "@optique/run": "^0.6.2",
25
- "@townco/agent": "0.1.32",
26
- "@townco/core": "0.0.5",
27
- "@townco/secret": "0.1.27",
28
- "@townco/ui": "0.1.27",
25
+ "@townco/agent": "0.1.33",
26
+ "@townco/core": "0.0.6",
27
+ "@townco/secret": "0.1.28",
28
+ "@townco/ui": "0.1.28",
29
29
  "@types/inquirer": "^9.0.9",
30
30
  "ink": "^6.4.0",
31
31
  "ink-text-input": "^6.0.0",