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