@hashgraphonline/conversational-agent 0.2.210 → 0.2.212
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/cli/dist/CLIApp.d.ts +11 -0
- package/cli/dist/CLIApp.d.ts.map +1 -0
- package/cli/dist/CLIApp.js +128 -0
- package/cli/dist/CLIApp.js.map +1 -0
- package/cli/dist/LocalConversationalAgent.d.ts +37 -0
- package/cli/dist/LocalConversationalAgent.js +58 -0
- package/cli/dist/app.d.ts +18 -0
- package/cli/dist/app.d.ts.map +1 -0
- package/cli/dist/app.js +14 -0
- package/cli/dist/app.js.map +1 -0
- package/cli/dist/cli.d.ts +3 -0
- package/cli/dist/cli.d.ts.map +1 -0
- package/cli/dist/cli.js +87 -0
- package/cli/dist/cli.js.map +1 -0
- package/cli/dist/components/AppContainer.d.ts +16 -0
- package/cli/dist/components/AppContainer.js +24 -0
- package/cli/dist/components/AppScreens.d.ts +2 -0
- package/cli/dist/components/AppScreens.js +259 -0
- package/cli/dist/components/ChatScreen.d.ts +21 -0
- package/cli/dist/components/ChatScreen.d.ts.map +1 -0
- package/cli/dist/components/ChatScreen.js +40 -0
- package/cli/dist/components/ChatScreen.js.map +1 -0
- package/cli/dist/components/DebugLoadingScreen.d.ts +5 -0
- package/cli/dist/components/DebugLoadingScreen.js +31 -0
- package/cli/dist/components/LoadingScreen.d.ts +3 -0
- package/cli/dist/components/LoadingScreen.d.ts.map +1 -0
- package/cli/dist/components/LoadingScreen.js +17 -0
- package/cli/dist/components/LoadingScreen.js.map +1 -0
- package/cli/dist/components/LoadingScreenDebug.d.ts +5 -0
- package/cli/dist/components/LoadingScreenDebug.js +27 -0
- package/cli/dist/components/MCPConfigScreen.d.ts +28 -0
- package/cli/dist/components/MCPConfigScreen.d.ts.map +1 -0
- package/cli/dist/components/MCPConfigScreen.js +186 -0
- package/cli/dist/components/MCPConfigScreen.js.map +1 -0
- package/cli/dist/components/ScreenRouter.d.ts +13 -0
- package/cli/dist/components/ScreenRouter.d.ts.map +1 -0
- package/cli/dist/components/ScreenRouter.js +23 -0
- package/cli/dist/components/ScreenRouter.js.map +1 -0
- package/cli/dist/components/SetupScreen.d.ts +16 -0
- package/cli/dist/components/SetupScreen.d.ts.map +1 -0
- package/cli/dist/components/SetupScreen.js +67 -0
- package/cli/dist/components/SetupScreen.js.map +1 -0
- package/cli/dist/components/SingleLoadingScreen.d.ts +5 -0
- package/cli/dist/components/SingleLoadingScreen.js +27 -0
- package/cli/dist/components/StatusBadge.d.ts +10 -0
- package/cli/dist/components/StatusBadge.d.ts.map +1 -0
- package/cli/dist/components/StatusBadge.js +24 -0
- package/cli/dist/components/StatusBadge.js.map +1 -0
- package/cli/dist/components/TerminalWindow.d.ts +9 -0
- package/cli/dist/components/TerminalWindow.d.ts.map +1 -0
- package/cli/dist/components/TerminalWindow.js +19 -0
- package/cli/dist/components/TerminalWindow.js.map +1 -0
- package/cli/dist/components/WelcomeScreen.d.ts +12 -0
- package/cli/dist/components/WelcomeScreen.d.ts.map +1 -0
- package/cli/dist/components/WelcomeScreen.js +47 -0
- package/cli/dist/components/WelcomeScreen.js.map +1 -0
- package/cli/dist/context/AppContext.d.ts +68 -0
- package/cli/dist/context/AppContext.js +363 -0
- package/cli/dist/headless-runner.d.ts +17 -0
- package/cli/dist/headless-runner.d.ts.map +1 -0
- package/cli/dist/headless-runner.js +128 -0
- package/cli/dist/headless-runner.js.map +1 -0
- package/cli/dist/hooks/useInitializeAgent.d.ts +19 -0
- package/cli/dist/hooks/useInitializeAgent.d.ts.map +1 -0
- package/cli/dist/hooks/useInitializeAgent.js +29 -0
- package/cli/dist/hooks/useInitializeAgent.js.map +1 -0
- package/cli/dist/hooks/useStableState.d.ts +38 -0
- package/cli/dist/hooks/useStableState.d.ts.map +1 -0
- package/cli/dist/hooks/useStableState.js +69 -0
- package/cli/dist/hooks/useStableState.js.map +1 -0
- package/cli/dist/managers/AgentManager.d.ts +58 -0
- package/cli/dist/managers/AgentManager.d.ts.map +1 -0
- package/cli/dist/managers/AgentManager.js +121 -0
- package/cli/dist/managers/AgentManager.js.map +1 -0
- package/cli/dist/managers/ConfigManager.d.ts +54 -0
- package/cli/dist/managers/ConfigManager.d.ts.map +1 -0
- package/cli/dist/managers/ConfigManager.js +188 -0
- package/cli/dist/managers/ConfigManager.js.map +1 -0
- package/cli/dist/types.d.ts +52 -0
- package/cli/dist/types.d.ts.map +1 -0
- package/cli/dist/types.js +34 -0
- package/cli/dist/types.js.map +1 -0
- package/package.json +25 -33
- package/cli/readme.md +0 -181
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashgraphonline/conversational-agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.212",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cjs/index.cjs",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -28,30 +28,6 @@
|
|
|
28
28
|
"LICENSE",
|
|
29
29
|
"README.md"
|
|
30
30
|
],
|
|
31
|
-
"scripts": {
|
|
32
|
-
"test": "jest --detectOpenHandles",
|
|
33
|
-
"test:integration": "jest tests/integration",
|
|
34
|
-
"clean": "rimraf dist",
|
|
35
|
-
"build:es": "BUILD_FORMAT=es vite build",
|
|
36
|
-
"build:cjs": "BUILD_FORMAT=cjs vite build",
|
|
37
|
-
"build:umd": "BUILD_FORMAT=umd vite build",
|
|
38
|
-
"build": "pnpm run clean && pnpm run build:es && pnpm run build:cjs",
|
|
39
|
-
"build:all": "pnpm run build && pnpm run cli:build",
|
|
40
|
-
"prepublishOnly": "pnpm run build",
|
|
41
|
-
"release": "pnpm publish --access public",
|
|
42
|
-
"release:canary": "pnpm run prepublishOnly && pnpm publish --tag canary --access public",
|
|
43
|
-
"version:canary": "pnpm version prerelease --preid canary --no-git-tag-version",
|
|
44
|
-
"publish:canary": "pnpm run version:canary && pnpm run release:canary",
|
|
45
|
-
"lint": "eslint .",
|
|
46
|
-
"lint:fix": "eslint . --fix",
|
|
47
|
-
"typecheck": "tsc --noEmit",
|
|
48
|
-
"cli:build": "cd cli && pnpm install && pnpm build",
|
|
49
|
-
"cli": "tsx cli/scripts/run-cli.ts",
|
|
50
|
-
"cli:dev": "cd cli && pnpm dev",
|
|
51
|
-
"example:mcp-filesystem": "tsx examples/mcp-filesystem-demo.ts",
|
|
52
|
-
"example:mcp-multi": "tsx examples/mcp-multi-server-demo.ts",
|
|
53
|
-
"postinstall": "cd cli && pnpm install --silent 2>/dev/null || true"
|
|
54
|
-
},
|
|
55
31
|
"keywords": [
|
|
56
32
|
"hedera",
|
|
57
33
|
"hashgraph",
|
|
@@ -100,7 +76,7 @@
|
|
|
100
76
|
"dependencies": {
|
|
101
77
|
"@hashgraph/sdk": "^2.72.0",
|
|
102
78
|
"@hashgraphonline/hashinal-wc": "^1.0.107",
|
|
103
|
-
"@hashgraphonline/standards-agent-kit": "^0.2.
|
|
79
|
+
"@hashgraphonline/standards-agent-kit": "^0.2.158",
|
|
104
80
|
"@hashgraphonline/standards-sdk": "0.1.110",
|
|
105
81
|
"@langchain/anthropic": "^0.3.28",
|
|
106
82
|
"@langchain/core": "^0.3.77",
|
|
@@ -127,11 +103,27 @@
|
|
|
127
103
|
"url": "https://github.com/hashgraph-online/conversational-agent/issues"
|
|
128
104
|
},
|
|
129
105
|
"homepage": "https://github.com/hashgraph-online/conversational-agent#readme",
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
"
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
106
|
+
"scripts": {
|
|
107
|
+
"test": "jest --detectOpenHandles",
|
|
108
|
+
"test:integration": "jest tests/integration",
|
|
109
|
+
"clean": "rimraf dist",
|
|
110
|
+
"build:es": "BUILD_FORMAT=es vite build",
|
|
111
|
+
"build:cjs": "BUILD_FORMAT=cjs vite build",
|
|
112
|
+
"build:umd": "BUILD_FORMAT=umd vite build",
|
|
113
|
+
"build": "pnpm run clean && pnpm run build:es && pnpm run build:cjs",
|
|
114
|
+
"build:all": "pnpm run build && pnpm run cli:build",
|
|
115
|
+
"release": "pnpm publish --access public",
|
|
116
|
+
"release:canary": "pnpm run prepublishOnly && pnpm publish --tag canary --access public",
|
|
117
|
+
"version:canary": "pnpm version prerelease --preid canary --no-git-tag-version",
|
|
118
|
+
"publish:canary": "pnpm run version:canary && pnpm run release:canary",
|
|
119
|
+
"lint": "eslint .",
|
|
120
|
+
"lint:fix": "eslint . --fix",
|
|
121
|
+
"typecheck": "tsc --noEmit",
|
|
122
|
+
"cli:build": "cd cli && pnpm install && pnpm build",
|
|
123
|
+
"cli": "tsx cli/scripts/run-cli.ts",
|
|
124
|
+
"cli:dev": "cd cli && pnpm dev",
|
|
125
|
+
"example:mcp-filesystem": "tsx examples/mcp-filesystem-demo.ts",
|
|
126
|
+
"example:mcp-multi": "tsx examples/mcp-multi-server-demo.ts",
|
|
127
|
+
"postinstall": "cd cli && pnpm install --silent 2>/dev/null || true"
|
|
136
128
|
}
|
|
137
|
-
}
|
|
129
|
+
}
|
package/cli/readme.md
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
# Hedera Conversational Agent CLI
|
|
2
|
-
|
|
3
|
-
A beautiful command-line interface for the Hedera Conversational Agent, built with [Ink](https://github.com/vadimdemedes/ink) and styled following Hashgraph Online design patterns.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- 🎨 **Beautiful Terminal UI** - Styled with HCS improvement proposals design patterns
|
|
8
|
-
- 💬 **Interactive Chat** - Chat with your Hedera agent in a clean terminal interface
|
|
9
|
-
- 🔐 **Secure Configuration** - Masked input for sensitive credentials
|
|
10
|
-
- 🌈 **Gradient Text & Colors** - Brand-consistent color scheme
|
|
11
|
-
- 🚀 **Fast & Responsive** - Built with React for smooth interactions
|
|
12
|
-
- 📊 **Transaction Details** - See transaction IDs and network responses
|
|
13
|
-
- 🎯 **HCS-10 Support** - Full support for agent connections and messaging
|
|
14
|
-
- 🔧 **MCP Integration** - Configure Model Context Protocol servers for extended capabilities
|
|
15
|
-
- 📁 **File Operations** - Built-in filesystem MCP server for file management
|
|
16
|
-
- ⚙️ **Custom MCP Servers** - Add your own MCP servers for specialized tools
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
For local development, the CLI uses the actual ConversationalAgent from the parent package:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# 1. Build the parent package first
|
|
24
|
-
cd /path/to/conversational-agent
|
|
25
|
-
pnpm install
|
|
26
|
-
pnpm build
|
|
27
|
-
|
|
28
|
-
# 2. The CLI will be built automatically via postinstall hook
|
|
29
|
-
# Or build manually:
|
|
30
|
-
cd cli
|
|
31
|
-
pnpm install
|
|
32
|
-
pnpm build
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Usage
|
|
36
|
-
|
|
37
|
-
### Interactive Mode (Recommended)
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# From the parent conversational-agent directory
|
|
41
|
-
pnpm cli
|
|
42
|
-
|
|
43
|
-
# This automatically builds if needed and runs the CLI
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### With Command Line Arguments
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
conversational-agent \
|
|
50
|
-
--account-id=0.0.12345 \
|
|
51
|
-
--private-key=your-private-key \
|
|
52
|
-
--network=testnet \
|
|
53
|
-
--openai-api-key=sk-...
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Using Environment Variables
|
|
57
|
-
|
|
58
|
-
The CLI automatically loads configuration from `.env` in the conversational-agent root:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
# .env file in conversational-agent directory
|
|
62
|
-
HEDERA_ACCOUNT_ID=0.0.12345
|
|
63
|
-
HEDERA_PRIVATE_KEY=your-private-key
|
|
64
|
-
HEDERA_NETWORK=testnet
|
|
65
|
-
OPENAI_API_KEY=sk-...
|
|
66
|
-
MCP_SERVERS=[{"name":"filesystem","command":"npx","args":["-y","@modelcontextprotocol/server-filesystem","/tmp"]}]
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Then simply run: `pnpm cli`
|
|
70
|
-
|
|
71
|
-
## Interface Overview
|
|
72
|
-
|
|
73
|
-
### Welcome Screen
|
|
74
|
-
- Beautiful ASCII art logo with gradient colors
|
|
75
|
-
- Simple menu navigation with arrow keys
|
|
76
|
-
- Options: Start Chat, Configure, MCP Servers, Exit
|
|
77
|
-
|
|
78
|
-
### Configuration Screen
|
|
79
|
-
- Terminal-style window with macOS-like controls
|
|
80
|
-
- Secure input masking for sensitive data
|
|
81
|
-
- Tab navigation between fields
|
|
82
|
-
- Real-time validation
|
|
83
|
-
|
|
84
|
-
### MCP Servers Screen
|
|
85
|
-
- Configure Model Context Protocol servers
|
|
86
|
-
- Enable/disable filesystem server with custom path
|
|
87
|
-
- Add custom MCP servers with command and arguments
|
|
88
|
-
- Live preview of available tools
|
|
89
|
-
- Save configuration to environment
|
|
90
|
-
|
|
91
|
-
### Chat Interface
|
|
92
|
-
- Clean terminal aesthetic with prompt symbols
|
|
93
|
-
- Color-coded messages (user, assistant, system)
|
|
94
|
-
- Loading indicators with spinners
|
|
95
|
-
- Transaction ID display
|
|
96
|
-
- MCP server status and available tools
|
|
97
|
-
- Escape key to return to menu
|
|
98
|
-
|
|
99
|
-
## Design Features
|
|
100
|
-
|
|
101
|
-
The CLI follows Hashgraph Online's design system:
|
|
102
|
-
|
|
103
|
-
- **Brand Colors**: Primary blue (#5599fe), Green (#48df7b), Purple (#b56cff)
|
|
104
|
-
- **Hedera Colors**: Purple (#8259ef), Blue (#2d84eb), Green (#3ec878)
|
|
105
|
-
- **Terminal Window**: Rounded borders with window control dots
|
|
106
|
-
- **Status Badges**: Color-coded status indicators
|
|
107
|
-
- **Typography**: Monospace throughout with clear hierarchy
|
|
108
|
-
|
|
109
|
-
## Keyboard Shortcuts
|
|
110
|
-
|
|
111
|
-
- `↑/↓` - Navigate menus
|
|
112
|
-
- `Enter` - Select/Submit
|
|
113
|
-
- `Tab` - Next field (in configuration)
|
|
114
|
-
- `Escape` - Return to main menu (from chat)
|
|
115
|
-
- `Ctrl+C` - Exit application
|
|
116
|
-
|
|
117
|
-
## Development
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
# Watch mode for development
|
|
121
|
-
pnpm dev
|
|
122
|
-
|
|
123
|
-
# Run tests
|
|
124
|
-
pnpm test
|
|
125
|
-
|
|
126
|
-
# Build for production
|
|
127
|
-
pnpm build
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Examples
|
|
131
|
-
|
|
132
|
-
### Basic Chat Interaction
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
$ Find all AI agents on the network
|
|
136
|
-
→ I'll search for AI agents registered on the Hedera network...
|
|
137
|
-
|
|
138
|
-
[INFO] Found 5 agents with AI capabilities
|
|
139
|
-
→ Here are the AI agents I found:
|
|
140
|
-
1. Agent: 0.0.12345 - "GPT Assistant"
|
|
141
|
-
2. Agent: 0.0.23456 - "Code Helper"
|
|
142
|
-
...
|
|
143
|
-
|
|
144
|
-
$ Connect to agent 0.0.12345
|
|
145
|
-
→ Initiating connection to agent 0.0.12345...
|
|
146
|
-
[INFO] Transaction ID: 0.0.98765@1234567890.123
|
|
147
|
-
→ Successfully connected! You can now send messages to this agent.
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### MCP File Operations
|
|
151
|
-
|
|
152
|
-
With filesystem MCP server enabled:
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
$ Create a new file called notes.txt with my meeting notes
|
|
156
|
-
→ I'll create a notes.txt file for you with meeting notes...
|
|
157
|
-
|
|
158
|
-
[INFO] MCP servers enabled: filesystem
|
|
159
|
-
→ I've created notes.txt in your configured directory with the meeting notes.
|
|
160
|
-
|
|
161
|
-
$ List all files in the current directory
|
|
162
|
-
→ Here are the files in /tmp:
|
|
163
|
-
- notes.txt (created just now)
|
|
164
|
-
- data.json
|
|
165
|
-
- config.yaml
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Custom MCP Server
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
$ Add GitHub repository operations
|
|
172
|
-
→ I can help you interact with GitHub repositories...
|
|
173
|
-
|
|
174
|
-
[INFO] MCP servers enabled: filesystem, github
|
|
175
|
-
→ I now have access to GitHub operations. I can help you create issues,
|
|
176
|
-
manage repositories, and work with pull requests.
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
## License
|
|
180
|
-
|
|
181
|
-
Apache-2.0
|