@townco/tui-template 0.1.15 → 0.1.17

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/App.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import type { CliConfig } from "./cli.js";
2
2
  export interface AppProps {
3
- config: CliConfig;
3
+ config: CliConfig;
4
4
  }
5
- export declare function App({ config }: AppProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function App({
6
+ config,
7
+ }: AppProps): import("react/jsx-runtime").JSX.Element;
package/dist/cli.d.ts CHANGED
@@ -2,11 +2,24 @@ import type { InferValue } from "@optique/core/parser";
2
2
  /**
3
3
  * CLI configuration using Optique
4
4
  */
5
- export declare const cliParser: import("@optique/core/parser").Parser<{
6
- readonly agentPath: string;
7
- readonly workingDir: string | undefined;
8
- }, {
9
- readonly agentPath: import("@optique/core/valueparser").ValueParserResult<string> | undefined;
10
- readonly workingDir: [[import("@optique/core/valueparser").ValueParserResult<string> | undefined] | undefined] | undefined;
11
- }>;
5
+ export declare const cliParser: import("@optique/core/parser").Parser<
6
+ {
7
+ readonly agentPath: string;
8
+ readonly workingDir: string | undefined;
9
+ },
10
+ {
11
+ readonly agentPath:
12
+ | import("@optique/core/valueparser").ValueParserResult<string>
13
+ | undefined;
14
+ readonly workingDir:
15
+ | [
16
+ | [
17
+ | import("@optique/core/valueparser").ValueParserResult<string>
18
+ | undefined,
19
+ ]
20
+ | undefined,
21
+ ]
22
+ | undefined;
23
+ }
24
+ >;
12
25
  export type CliConfig = InferValue<typeof cliParser>;
package/dist/cli.js CHANGED
@@ -5,10 +5,15 @@ import { string } from "@optique/core/valueparser";
5
5
  * CLI configuration using Optique
6
6
  */
7
7
  export const cliParser = object({
8
- agentPath: option("-a", "--agent", string(), {
9
- description: [text("Path to the ACP agent executable")],
10
- }),
11
- workingDir: withDefault(optional(option("-d", "--dir", string(), {
12
- description: [text("Working directory for the agent")],
13
- })), process.cwd()),
8
+ agentPath: option("-a", "--agent", string(), {
9
+ description: [text("Path to the ACP agent executable")],
10
+ }),
11
+ workingDir: withDefault(
12
+ optional(
13
+ option("-d", "--dir", string(), {
14
+ description: [text("Working directory for the agent")],
15
+ }),
16
+ ),
17
+ process.cwd(),
18
+ ),
14
19
  });
package/dist/index.js CHANGED
@@ -1,30 +1,31 @@
1
1
  #!/usr/bin/env node
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
2
  import { run } from "@optique/run";
4
3
  import { render } from "ink";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  import { App } from "./App.js";
6
6
  import { cliParser } from "./cli.js";
7
+
7
8
  /**
8
9
  * Agent Hub TUI
9
10
  * Terminal chat interface for ACP agents
10
11
  */
11
12
  async function main() {
12
- // Parse CLI arguments
13
- const config = run(cliParser, {
14
- help: "both", // Show help for both commands and the program
15
- programName: "agent-tui",
16
- description: [
17
- {
18
- type: "text",
19
- text: "Terminal chat interface for Agent Client Protocol (ACP) agents",
20
- },
21
- ],
22
- version: "0.0.1",
23
- });
24
- // Render the app
25
- render(_jsx(App, { config: config }));
13
+ // Parse CLI arguments
14
+ const config = run(cliParser, {
15
+ help: "both", // Show help for both commands and the program
16
+ programName: "agent-tui",
17
+ description: [
18
+ {
19
+ type: "text",
20
+ text: "Terminal chat interface for Agent Client Protocol (ACP) agents",
21
+ },
22
+ ],
23
+ version: "0.0.1",
24
+ });
25
+ // Render the app
26
+ render(_jsx(App, { config: config }));
26
27
  }
27
28
  main().catch((error) => {
28
- console.error("Fatal error:", error);
29
- process.exit(1);
29
+ console.error("Fatal error:", error);
30
+ process.exit(1);
30
31
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@townco/tui-template",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "agent-tui": "./dist/index.js"
@@ -24,14 +24,14 @@
24
24
  "dependencies": {
25
25
  "@optique/core": "^0.6.2",
26
26
  "@optique/run": "^0.6.2",
27
- "@townco/ui": "0.1.18",
27
+ "@townco/ui": "0.1.20",
28
28
  "ink": "^6.4.0",
29
29
  "ink-text-input": "^6.0.0",
30
30
  "react": "^19.2.0",
31
31
  "zod": "^4.1.12"
32
32
  },
33
33
  "devDependencies": {
34
- "@townco/tsconfig": "0.1.15",
34
+ "@townco/tsconfig": "0.1.17",
35
35
  "@types/node": "^24.10.0",
36
36
  "@types/react": "^19.2.2",
37
37
  "tsx": "^4.20.6",