@agentxjs/cli 0.0.2 → 0.0.3
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/CHANGELOG.md +11 -0
- package/package.json +6 -6
- package/src/app.tsx +8 -8
- package/src/component/dialog-new-session.tsx +2 -2
- package/src/component/dialog-session-list.tsx +3 -3
- package/src/context/agentx.tsx +4 -4
- package/src/context/dialog.tsx +2 -2
- package/src/context/exit.tsx +1 -1
- package/src/context/route.tsx +1 -1
- package/src/context/theme.tsx +1 -1
- package/src/context/toast.tsx +1 -1
- package/src/index.ts +6 -6
- package/src/routes/home.tsx +1 -1
- package/src/routes/session.tsx +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @agentxjs/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d63ad17]
|
|
8
|
+
- @agentxjs/mono-driver@2.0.1
|
|
9
|
+
- agentxjs@2.0.1
|
|
10
|
+
- @agentxjs/server@2.0.1
|
|
11
|
+
- @agentxjs/core@2.0.1
|
|
12
|
+
- @agentxjs/node-platform@2.0.1
|
|
13
|
+
|
|
3
14
|
## 0.0.2
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentxjs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "AgentX Terminal UI Client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"@opentui/core": "^0.1.77",
|
|
17
17
|
"@opentui/solid": "^0.1.77",
|
|
18
18
|
"solid-js": "^1.9.10",
|
|
19
|
-
"agentxjs": "^2.0.
|
|
20
|
-
"@agentxjs/server": "^2.0.
|
|
21
|
-
"@agentxjs/node-platform": "^2.0.
|
|
22
|
-
"@agentxjs/mono-driver": "^2.0.
|
|
23
|
-
"@agentxjs/core": "^2.0.
|
|
19
|
+
"agentxjs": "^2.0.1",
|
|
20
|
+
"@agentxjs/server": "^2.0.1",
|
|
21
|
+
"@agentxjs/node-platform": "^2.0.1",
|
|
22
|
+
"@agentxjs/mono-driver": "^2.0.1",
|
|
23
|
+
"@agentxjs/core": "^2.0.1",
|
|
24
24
|
"yargs": "^18.0.0",
|
|
25
25
|
"clipboardy": "^4.0.0",
|
|
26
26
|
"dotenv": "^16.6.1"
|
package/src/app.tsx
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
* Main entry point for the terminal UI.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { render,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { render, useKeyboard, useTerminalDimensions } from "@opentui/solid";
|
|
8
|
+
import { createLogger } from "commonxjs/logger";
|
|
9
|
+
import { createSignal, ErrorBoundary, Match, Switch } from "solid-js";
|
|
10
|
+
import { DialogNewSession } from "./component/dialog-new-session";
|
|
11
|
+
import { DialogSessionList } from "./component/dialog-session-list";
|
|
10
12
|
import { AgentXProvider, useAgentX } from "./context/agentx";
|
|
11
13
|
import { DialogProvider, useDialog } from "./context/dialog";
|
|
12
|
-
import { ToastProvider } from "./context/toast";
|
|
13
|
-
import { RouteProvider, useRoute } from "./context/route";
|
|
14
14
|
import { ExitProvider, useExit } from "./context/exit";
|
|
15
|
+
import { RouteProvider, useRoute } from "./context/route";
|
|
16
|
+
import { ThemeProvider, useTheme } from "./context/theme";
|
|
17
|
+
import { ToastProvider } from "./context/toast";
|
|
15
18
|
import { Home } from "./routes/home";
|
|
16
19
|
import { SessionView } from "./routes/session";
|
|
17
|
-
import { DialogNewSession } from "./component/dialog-new-session";
|
|
18
|
-
import { DialogSessionList } from "./component/dialog-session-list";
|
|
19
|
-
import { createLogger } from "commonxjs/logger";
|
|
20
20
|
|
|
21
21
|
const logger = createLogger("cli/app");
|
|
22
22
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { useKeyboard } from "@opentui/solid";
|
|
6
|
+
import { createLogger } from "commonxjs/logger";
|
|
6
7
|
import { createSignal } from "solid-js";
|
|
7
|
-
import { useTheme } from "../context/theme";
|
|
8
8
|
import { useAgentX } from "../context/agentx";
|
|
9
9
|
import { useDialog } from "../context/dialog";
|
|
10
10
|
import { useRoute } from "../context/route";
|
|
11
|
+
import { useTheme } from "../context/theme";
|
|
11
12
|
import { useToast } from "../context/toast";
|
|
12
|
-
import { createLogger } from "commonxjs/logger";
|
|
13
13
|
|
|
14
14
|
const logger = createLogger("cli/dialog-new-session");
|
|
15
15
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { useKeyboard, useTerminalDimensions } from "@opentui/solid";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import type { ImageRecord } from "agentxjs";
|
|
7
|
+
import { createSignal, For, onMount, Show } from "solid-js";
|
|
8
8
|
import { useAgentX } from "../context/agentx";
|
|
9
9
|
import { useDialog } from "../context/dialog";
|
|
10
10
|
import { useRoute } from "../context/route";
|
|
11
|
-
import
|
|
11
|
+
import { useTheme } from "../context/theme";
|
|
12
12
|
|
|
13
13
|
export function DialogSessionList() {
|
|
14
14
|
const { theme } = useTheme();
|
package/src/context/agentx.tsx
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* AgentX Provider - Connect to AgentX server
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { type AgentX, createAgentX } from "agentxjs";
|
|
5
6
|
import {
|
|
6
7
|
createContext,
|
|
7
|
-
useContext,
|
|
8
|
-
onMount,
|
|
9
|
-
onCleanup,
|
|
10
8
|
createSignal,
|
|
9
|
+
onCleanup,
|
|
10
|
+
onMount,
|
|
11
11
|
type ParentProps,
|
|
12
|
+
useContext,
|
|
12
13
|
} from "solid-js";
|
|
13
|
-
import { createAgentX, type AgentX } from "agentxjs";
|
|
14
14
|
|
|
15
15
|
interface AgentXContext {
|
|
16
16
|
client: AgentX | null;
|
package/src/context/dialog.tsx
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { useKeyboard, useTerminalDimensions } from "@opentui/solid";
|
|
6
|
-
import {
|
|
6
|
+
import { createLogger } from "commonxjs/logger";
|
|
7
|
+
import { createContext, type JSX, type ParentProps, Show, useContext } from "solid-js";
|
|
7
8
|
import { createStore } from "solid-js/store";
|
|
8
9
|
import { useTheme } from "./theme";
|
|
9
|
-
import { createLogger } from "commonxjs/logger";
|
|
10
10
|
|
|
11
11
|
const logger = createLogger("cli/dialog");
|
|
12
12
|
|
package/src/context/exit.tsx
CHANGED
package/src/context/route.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Route Provider - Simple screen navigation
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { createContext,
|
|
5
|
+
import { createContext, type ParentProps, useContext } from "solid-js";
|
|
6
6
|
import { createStore } from "solid-js/store";
|
|
7
7
|
|
|
8
8
|
export type RouteData = { type: "home" } | { type: "session"; sessionId: string };
|
package/src/context/theme.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Theme Provider - Terminal color theming
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { createContext,
|
|
5
|
+
import { createContext, createMemo, type ParentProps, useContext } from "solid-js";
|
|
6
6
|
import { createStore } from "solid-js/store";
|
|
7
7
|
|
|
8
8
|
/**
|
package/src/context/toast.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Toast Provider - Notification system
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { createContext,
|
|
5
|
+
import { createContext, type ParentProps, useContext } from "solid-js";
|
|
6
6
|
import { createStore } from "solid-js/store";
|
|
7
7
|
|
|
8
8
|
export type ToastVariant = "info" | "success" | "warning" | "error";
|
package/src/index.ts
CHANGED
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import "dotenv/config";
|
|
10
|
+
import { connect } from "node:net";
|
|
11
|
+
import type { CreateDriver } from "@agentxjs/core/driver";
|
|
12
|
+
import { createMonoDriver } from "@agentxjs/mono-driver";
|
|
13
|
+
import { FileLoggerFactory, nodePlatform } from "@agentxjs/node-platform";
|
|
14
|
+
import { createServer } from "@agentxjs/server";
|
|
15
|
+
import { createLogger, setLoggerFactory } from "commonxjs/logger";
|
|
10
16
|
import yargs from "yargs";
|
|
11
17
|
import { hideBin } from "yargs/helpers";
|
|
12
18
|
import { tui } from "./app";
|
|
13
|
-
import { createServer } from "@agentxjs/server";
|
|
14
|
-
import { nodePlatform, FileLoggerFactory } from "@agentxjs/node-platform";
|
|
15
|
-
import { createMonoDriver } from "@agentxjs/mono-driver";
|
|
16
|
-
import type { CreateDriver } from "@agentxjs/core/driver";
|
|
17
|
-
import { createLogger, setLoggerFactory } from "commonxjs/logger";
|
|
18
|
-
import { connect } from "net";
|
|
19
19
|
|
|
20
20
|
// Configure file logging early (before any logger is used)
|
|
21
21
|
const dataPath = process.env.DATA_PATH ?? "./.agentx";
|
package/src/routes/home.tsx
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { useTerminalDimensions } from "@opentui/solid";
|
|
6
6
|
import { Show } from "solid-js";
|
|
7
|
-
import { useTheme } from "../context/theme";
|
|
8
7
|
import { useAgentX } from "../context/agentx";
|
|
8
|
+
import { useTheme } from "../context/theme";
|
|
9
9
|
|
|
10
10
|
export function Home() {
|
|
11
11
|
const dimensions = useTerminalDimensions();
|
package/src/routes/session.tsx
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* Session View - Chat session interface
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useKeyboard, useTerminalDimensions } from "@opentui/solid";
|
|
6
|
+
import { createLogger } from "commonxjs/logger";
|
|
7
|
+
import { createSignal, For, onMount, Show } from "solid-js";
|
|
8
8
|
import { useAgentX } from "../context/agentx";
|
|
9
9
|
import { useRoute } from "../context/route";
|
|
10
|
+
import { useTheme } from "../context/theme";
|
|
10
11
|
import { useToast } from "../context/toast";
|
|
11
|
-
import { createLogger } from "commonxjs/logger";
|
|
12
12
|
|
|
13
13
|
const logger = createLogger("cli/session");
|
|
14
14
|
|
|
@@ -92,7 +92,7 @@ export function SessionView(props: SessionViewProps) {
|
|
|
92
92
|
setInput((s) => s + evt.name);
|
|
93
93
|
evt.preventDefault();
|
|
94
94
|
} else if (evt.name === "space") {
|
|
95
|
-
setInput((s) => s
|
|
95
|
+
setInput((s) => `${s} `);
|
|
96
96
|
evt.preventDefault();
|
|
97
97
|
}
|
|
98
98
|
});
|