@emblemvault/agentwallet 1.0.1 → 1.1.0
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/README.md +29 -3
- package/hustle-chat.js +905 -0
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @emblemvault/agentwallet
|
|
2
2
|
|
|
3
|
-
CLI for EmblemVault's
|
|
3
|
+
CLI tools for **Agent Hustle** - EmblemVault's autonomous crypto AI with 256+ trading tools across 7 blockchains.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -10,8 +10,18 @@ npm install -g @emblemvault/agentwallet
|
|
|
10
10
|
|
|
11
11
|
## Commands
|
|
12
12
|
|
|
13
|
+
### Interactive Chat (Recommended for Humans)
|
|
13
14
|
```bash
|
|
14
|
-
#
|
|
15
|
+
# Full interactive CLI with streaming, tools, and auth menu
|
|
16
|
+
hustle-chat --password "your-password-16-chars-min"
|
|
17
|
+
|
|
18
|
+
# Or let it prompt for password
|
|
19
|
+
hustle-chat
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Single-Shot Commands (For AI Agents)
|
|
23
|
+
```bash
|
|
24
|
+
# Send a single message to Agent Hustle
|
|
15
25
|
emblem-hustle -p "your-password-16-chars-min" -m "What are my wallet addresses?"
|
|
16
26
|
|
|
17
27
|
# Resume with conversation context
|
|
@@ -21,6 +31,22 @@ emblem-resume -p "your-password" -m "Follow-up question"
|
|
|
21
31
|
emblem-reset
|
|
22
32
|
```
|
|
23
33
|
|
|
34
|
+
## Example Queries
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Check wallet addresses
|
|
38
|
+
emblem-hustle -p "$PASSWORD" -m "What are my wallet addresses?"
|
|
39
|
+
|
|
40
|
+
# Check balances
|
|
41
|
+
emblem-hustle -p "$PASSWORD" -m "Show all my balances across all chains"
|
|
42
|
+
|
|
43
|
+
# Swap tokens
|
|
44
|
+
emblem-hustle -p "$PASSWORD" -m "Swap $20 worth of SOL to USDC"
|
|
45
|
+
|
|
46
|
+
# Market trends
|
|
47
|
+
emblem-hustle -p "$PASSWORD" -m "What's trending on Solana right now?"
|
|
48
|
+
```
|
|
49
|
+
|
|
24
50
|
## Authentication
|
|
25
51
|
|
|
26
52
|
**Login and signup are the same action.**
|
|
@@ -40,6 +66,6 @@ Solana, Ethereum, Base, BSC, Polygon, Hedera, Bitcoin
|
|
|
40
66
|
|
|
41
67
|
## Links
|
|
42
68
|
|
|
43
|
-
- [EmblemVault](https://emblemvault.
|
|
69
|
+
- [EmblemVault](https://emblemvault.dev)
|
|
44
70
|
- [Hustle AI](https://agenthustle.ai)
|
|
45
71
|
- [OpenClaw Skill](https://github.com/EmblemCompany/EmblemAi-AgentWallet)
|
package/hustle-chat.js
ADDED
|
@@ -0,0 +1,905 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hustle Incognito CLI with Headless Password Authentication
|
|
5
|
+
*
|
|
6
|
+
* This CLI demonstrates using the SDK with password-based authentication,
|
|
7
|
+
* ideal for servers, CLI tools, and AI agents without browser access.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* node simple-cli-auth.js --password "your-password-min-16-chars"
|
|
11
|
+
* node simple-cli-auth.js # Will prompt for password interactively
|
|
12
|
+
*
|
|
13
|
+
* Environment variables:
|
|
14
|
+
* AGENT_PASSWORD - Password for authentication (min 16 chars)
|
|
15
|
+
* APP_ID - App ID (default: emblem-agent-wallet)
|
|
16
|
+
* AUTH_API_URL - Auth API URL (optional, uses SDK default)
|
|
17
|
+
* HUSTLE_API_URL - Hustle API URL (optional, uses SDK default)
|
|
18
|
+
* DEBUG - Enable debug logging (set to 'true')
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
async function main() {
|
|
22
|
+
try {
|
|
23
|
+
// Import dependencies
|
|
24
|
+
const { HustleIncognitoClient } = await import('hustle-incognito');
|
|
25
|
+
const { EmblemAuthSDK } = await import('@emblemvault/auth-sdk');
|
|
26
|
+
const dotenv = await import('dotenv');
|
|
27
|
+
const readline = await import('readline');
|
|
28
|
+
|
|
29
|
+
// Load environment variables
|
|
30
|
+
dotenv.config();
|
|
31
|
+
|
|
32
|
+
// Parse command line arguments
|
|
33
|
+
const args = process.argv.slice(2);
|
|
34
|
+
const getArg = (flag) => {
|
|
35
|
+
const index = args.indexOf(flag);
|
|
36
|
+
return index !== -1 && args[index + 1] ? args[index + 1] : null;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const initialDebugMode = args.includes('--debug');
|
|
40
|
+
const initialStreamMode = args.includes('--stream');
|
|
41
|
+
const passwordArg = getArg('--password');
|
|
42
|
+
|
|
43
|
+
// Environment configuration
|
|
44
|
+
const ENV_PASSWORD = passwordArg || process.env.AGENT_PASSWORD;
|
|
45
|
+
const ENV_APP_ID = process.env.APP_ID || 'emblem-agent-wallet';
|
|
46
|
+
const ENV_AUTH_API_URL = process.env.AUTH_API_URL; // Uses SDK default if not set
|
|
47
|
+
const ENV_HUSTLE_API_URL = process.env.HUSTLE_API_URL; // Uses SDK default if not set
|
|
48
|
+
const ENV_DEBUG = process.env.DEBUG === 'true';
|
|
49
|
+
|
|
50
|
+
// Create readline interface
|
|
51
|
+
const rl = readline.createInterface({
|
|
52
|
+
input: process.stdin,
|
|
53
|
+
output: process.stdout
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// Helper to prompt for input
|
|
57
|
+
const prompt = (question) => new Promise((resolve) => {
|
|
58
|
+
rl.question(question, resolve);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Helper to prompt for password (hidden input)
|
|
62
|
+
const promptPassword = async (question) => {
|
|
63
|
+
if (process.stdin.isTTY) {
|
|
64
|
+
process.stdout.write(question);
|
|
65
|
+
|
|
66
|
+
return new Promise((resolve) => {
|
|
67
|
+
let password = '';
|
|
68
|
+
|
|
69
|
+
const onData = (char) => {
|
|
70
|
+
char = char.toString();
|
|
71
|
+
|
|
72
|
+
switch (char) {
|
|
73
|
+
case '\n':
|
|
74
|
+
case '\r':
|
|
75
|
+
case '\u0004':
|
|
76
|
+
process.stdin.removeListener('data', onData);
|
|
77
|
+
process.stdin.setRawMode(false);
|
|
78
|
+
process.stdout.write('\n');
|
|
79
|
+
resolve(password);
|
|
80
|
+
break;
|
|
81
|
+
case '\u0003':
|
|
82
|
+
process.exit();
|
|
83
|
+
break;
|
|
84
|
+
case '\u007F':
|
|
85
|
+
if (password.length > 0) {
|
|
86
|
+
password = password.slice(0, -1);
|
|
87
|
+
process.stdout.write('\b \b');
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
default:
|
|
91
|
+
password += char;
|
|
92
|
+
process.stdout.write('*');
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
process.stdin.setRawMode(true);
|
|
97
|
+
process.stdin.resume();
|
|
98
|
+
process.stdin.on('data', onData);
|
|
99
|
+
});
|
|
100
|
+
} else {
|
|
101
|
+
return prompt(question);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
console.log('========================================');
|
|
106
|
+
console.log(' Hustle Incognito CLI (Auth Edition)');
|
|
107
|
+
console.log('========================================');
|
|
108
|
+
console.log('');
|
|
109
|
+
console.log('This CLI uses headless password authentication.');
|
|
110
|
+
console.log('No API key required - authentication is via password.');
|
|
111
|
+
console.log('');
|
|
112
|
+
|
|
113
|
+
// Get password
|
|
114
|
+
let password = ENV_PASSWORD;
|
|
115
|
+
|
|
116
|
+
if (!password) {
|
|
117
|
+
console.log('No password provided via --password flag or AGENT_PASSWORD env var.');
|
|
118
|
+
console.log('');
|
|
119
|
+
password = await promptPassword('Enter your password (min 16 chars): ');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Validate password
|
|
123
|
+
if (!password || password.length < 16) {
|
|
124
|
+
console.error('\nError: Password must be at least 16 characters.');
|
|
125
|
+
console.error('Use a long, random string like an API key for security.');
|
|
126
|
+
process.exit(1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
console.log('');
|
|
130
|
+
console.log('Authenticating...');
|
|
131
|
+
|
|
132
|
+
// Create auth SDK instance directly (so we can access all its methods)
|
|
133
|
+
let authSdk;
|
|
134
|
+
let client;
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
const sdkConfig = {
|
|
138
|
+
appId: ENV_APP_ID,
|
|
139
|
+
persistSession: false, // No localStorage in Node.js
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
if (ENV_AUTH_API_URL) {
|
|
143
|
+
sdkConfig.apiUrl = ENV_AUTH_API_URL;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
authSdk = new EmblemAuthSDK(sdkConfig);
|
|
147
|
+
|
|
148
|
+
// Authenticate with password
|
|
149
|
+
const session = await authSdk.authenticatePassword({ password });
|
|
150
|
+
|
|
151
|
+
if (!session) {
|
|
152
|
+
throw new Error('Authentication failed - no session returned');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Create Hustle client with the authenticated SDK
|
|
156
|
+
const clientConfig = {
|
|
157
|
+
sdk: authSdk,
|
|
158
|
+
debug: initialDebugMode || ENV_DEBUG,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
if (ENV_HUSTLE_API_URL) {
|
|
162
|
+
clientConfig.hustleApiUrl = ENV_HUSTLE_API_URL;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
client = new HustleIncognitoClient(clientConfig);
|
|
166
|
+
|
|
167
|
+
} catch (error) {
|
|
168
|
+
console.error('\nAuthentication failed:', error.message);
|
|
169
|
+
if (error.message.includes('@emblemvault/auth-sdk')) {
|
|
170
|
+
console.error('\nTo install the auth SDK:');
|
|
171
|
+
console.error(' npm install @emblemvault/auth-sdk');
|
|
172
|
+
}
|
|
173
|
+
process.exit(1);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
console.log('Authentication successful!');
|
|
177
|
+
console.log('');
|
|
178
|
+
|
|
179
|
+
// Settings
|
|
180
|
+
let settings = {
|
|
181
|
+
debug: initialDebugMode || ENV_DEBUG,
|
|
182
|
+
stream: initialStreamMode,
|
|
183
|
+
selectedTools: [],
|
|
184
|
+
retainHistory: true,
|
|
185
|
+
model: null,
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// Store conversation history
|
|
189
|
+
const messages = [];
|
|
190
|
+
|
|
191
|
+
// Store intent context for auto-tools mode
|
|
192
|
+
let lastIntentContext = null;
|
|
193
|
+
|
|
194
|
+
// Spinner for loading animation
|
|
195
|
+
const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
196
|
+
let spinnerInterval = null;
|
|
197
|
+
let spinnerIndex = 0;
|
|
198
|
+
const hideCursor = '\x1B[?25l';
|
|
199
|
+
const showCursor = '\x1B[?25h';
|
|
200
|
+
|
|
201
|
+
function startSpinner() {
|
|
202
|
+
spinnerIndex = 0;
|
|
203
|
+
process.stdout.write(hideCursor + spinnerFrames[0]);
|
|
204
|
+
spinnerInterval = setInterval(() => {
|
|
205
|
+
process.stdout.write('\b' + spinnerFrames[spinnerIndex]);
|
|
206
|
+
spinnerIndex = (spinnerIndex + 1) % spinnerFrames.length;
|
|
207
|
+
}, 80);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function stopSpinner() {
|
|
211
|
+
if (spinnerInterval) {
|
|
212
|
+
clearInterval(spinnerInterval);
|
|
213
|
+
spinnerInterval = null;
|
|
214
|
+
process.stdout.write('\b \b' + showCursor);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Stream response
|
|
219
|
+
async function streamResponse(msgs) {
|
|
220
|
+
let fullText = '';
|
|
221
|
+
let toolCalls = [];
|
|
222
|
+
let firstChunkReceived = false;
|
|
223
|
+
|
|
224
|
+
process.stdout.write('\nAgent: ');
|
|
225
|
+
startSpinner();
|
|
226
|
+
|
|
227
|
+
try {
|
|
228
|
+
const streamOptions = {
|
|
229
|
+
messages: msgs,
|
|
230
|
+
processChunks: true
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
if (settings.model) {
|
|
234
|
+
streamOptions.model = settings.model;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (settings.selectedTools.length > 0) {
|
|
238
|
+
streamOptions.selectedToolCategories = settings.selectedTools;
|
|
239
|
+
} else if (lastIntentContext) {
|
|
240
|
+
streamOptions.intentContext = lastIntentContext;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
const stream = client.chatStream(streamOptions);
|
|
244
|
+
|
|
245
|
+
for await (const chunk of stream) {
|
|
246
|
+
if ('type' in chunk) {
|
|
247
|
+
switch (chunk.type) {
|
|
248
|
+
case 'text':
|
|
249
|
+
if (!firstChunkReceived) {
|
|
250
|
+
stopSpinner();
|
|
251
|
+
firstChunkReceived = true;
|
|
252
|
+
}
|
|
253
|
+
process.stdout.write(chunk.value);
|
|
254
|
+
fullText += chunk.value;
|
|
255
|
+
break;
|
|
256
|
+
|
|
257
|
+
case 'intent_context':
|
|
258
|
+
if (chunk.value?.intentContext) {
|
|
259
|
+
lastIntentContext = chunk.value.intentContext;
|
|
260
|
+
if (settings.debug) {
|
|
261
|
+
console.log('[DEBUG] Captured intent context:',
|
|
262
|
+
`activeIntent="${lastIntentContext.activeIntent || 'general'}", ` +
|
|
263
|
+
`categories=[${lastIntentContext.categories?.join(', ') || 'none'}]`);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
break;
|
|
267
|
+
|
|
268
|
+
case 'tool_call':
|
|
269
|
+
if (!firstChunkReceived) {
|
|
270
|
+
stopSpinner();
|
|
271
|
+
firstChunkReceived = true;
|
|
272
|
+
}
|
|
273
|
+
toolCalls.push(chunk.value);
|
|
274
|
+
break;
|
|
275
|
+
|
|
276
|
+
case 'finish':
|
|
277
|
+
stopSpinner();
|
|
278
|
+
process.stdout.write('\n');
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
} catch (error) {
|
|
284
|
+
stopSpinner();
|
|
285
|
+
console.error(`\nError during streaming: ${error.message}`);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (toolCalls.length > 0) {
|
|
289
|
+
console.log('\nTools used:');
|
|
290
|
+
toolCalls.forEach((tool, i) => {
|
|
291
|
+
console.log(`${i+1}. ${tool.toolName || 'Unknown tool'} (ID: ${tool.toolCallId || 'unknown'})`);
|
|
292
|
+
if (tool.args) {
|
|
293
|
+
console.log(` Args: ${JSON.stringify(tool.args)}`);
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
return fullText;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Display help
|
|
302
|
+
function showHelp() {
|
|
303
|
+
console.log('\nAvailable commands:');
|
|
304
|
+
console.log(' /help - Show this help message');
|
|
305
|
+
console.log(' /settings - Show current settings');
|
|
306
|
+
console.log(' /auth - Open authentication menu (API key, vault info, etc.)');
|
|
307
|
+
console.log(' /stream on|off - Toggle streaming mode');
|
|
308
|
+
console.log(' /debug on|off - Toggle debug mode');
|
|
309
|
+
console.log(' /history on|off - Toggle message history retention');
|
|
310
|
+
console.log(' /clear - Clear conversation history');
|
|
311
|
+
console.log(' /models - List available models');
|
|
312
|
+
console.log(' /model <id> - Set the model to use');
|
|
313
|
+
console.log(' /model clear - Clear model selection');
|
|
314
|
+
console.log(' /tools - Manage tool categories');
|
|
315
|
+
console.log(' /tools add <id> - Add a tool category');
|
|
316
|
+
console.log(' /tools remove <id> - Remove a tool category');
|
|
317
|
+
console.log(' /tools clear - Enable auto-tools mode');
|
|
318
|
+
console.log(' /exit or /quit - Exit the application');
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Show settings
|
|
322
|
+
function showSettings() {
|
|
323
|
+
const session = authSdk.getSession();
|
|
324
|
+
console.log('\nCurrent settings:');
|
|
325
|
+
console.log(` App ID: ${ENV_APP_ID}`);
|
|
326
|
+
console.log(` Vault ID: ${session?.user?.vaultId || 'N/A'}`);
|
|
327
|
+
console.log(` Auth Mode: Password (headless)`);
|
|
328
|
+
console.log(` Model: ${settings.model || 'API default'}`);
|
|
329
|
+
console.log(` Streaming: ${settings.stream ? 'ON' : 'OFF'}`);
|
|
330
|
+
console.log(` Debug: ${settings.debug ? 'ON' : 'OFF'}`);
|
|
331
|
+
console.log(` History: ${settings.retainHistory ? 'ON' : 'OFF'}`);
|
|
332
|
+
console.log(` Messages: ${messages.length}`);
|
|
333
|
+
console.log(` Tools: ${
|
|
334
|
+
settings.selectedTools.length > 0
|
|
335
|
+
? settings.selectedTools.join(', ')
|
|
336
|
+
: 'Auto-tools mode'
|
|
337
|
+
}`);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Auth menu
|
|
341
|
+
async function showAuthMenu() {
|
|
342
|
+
console.log('\n========================================');
|
|
343
|
+
console.log(' Authentication Menu');
|
|
344
|
+
console.log('========================================');
|
|
345
|
+
console.log('');
|
|
346
|
+
console.log(' 1. Get API Key');
|
|
347
|
+
console.log(' 2. Get Vault Info');
|
|
348
|
+
console.log(' 3. Get Session Info');
|
|
349
|
+
console.log(' 4. Refresh Session');
|
|
350
|
+
console.log(' 5. Get EVM Address');
|
|
351
|
+
console.log(' 6. Get Solana Address');
|
|
352
|
+
console.log(' 7. Get BTC Addresses');
|
|
353
|
+
console.log(' 8. Logout');
|
|
354
|
+
console.log(' 9. Back to chat');
|
|
355
|
+
console.log('');
|
|
356
|
+
|
|
357
|
+
const choice = await prompt('Select option (1-9): ');
|
|
358
|
+
|
|
359
|
+
switch (choice.trim()) {
|
|
360
|
+
case '1':
|
|
361
|
+
await getApiKey();
|
|
362
|
+
break;
|
|
363
|
+
case '2':
|
|
364
|
+
await getVaultInfo();
|
|
365
|
+
break;
|
|
366
|
+
case '3':
|
|
367
|
+
showSessionInfo();
|
|
368
|
+
break;
|
|
369
|
+
case '4':
|
|
370
|
+
await refreshSession();
|
|
371
|
+
break;
|
|
372
|
+
case '5':
|
|
373
|
+
await getEvmAddress();
|
|
374
|
+
break;
|
|
375
|
+
case '6':
|
|
376
|
+
await getSolanaAddress();
|
|
377
|
+
break;
|
|
378
|
+
case '7':
|
|
379
|
+
await getBtcAddresses();
|
|
380
|
+
break;
|
|
381
|
+
case '8':
|
|
382
|
+
await doLogout();
|
|
383
|
+
break;
|
|
384
|
+
case '9':
|
|
385
|
+
return;
|
|
386
|
+
default:
|
|
387
|
+
console.log('Invalid option');
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// Show menu again after action
|
|
391
|
+
await showAuthMenu();
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
async function getApiKey() {
|
|
395
|
+
console.log('\nFetching API key...');
|
|
396
|
+
if (settings.debug) {
|
|
397
|
+
console.log('[DEBUG] Calling authSdk.getVaultApiKey()...');
|
|
398
|
+
}
|
|
399
|
+
try {
|
|
400
|
+
const apiKey = await authSdk.getVaultApiKey();
|
|
401
|
+
if (settings.debug) {
|
|
402
|
+
console.log('[DEBUG] Raw response:', JSON.stringify(apiKey, null, 2));
|
|
403
|
+
}
|
|
404
|
+
console.log('\n========================================');
|
|
405
|
+
console.log(' YOUR API KEY');
|
|
406
|
+
console.log('========================================');
|
|
407
|
+
console.log('');
|
|
408
|
+
console.log(` ${apiKey}`);
|
|
409
|
+
console.log('');
|
|
410
|
+
console.log('========================================');
|
|
411
|
+
console.log('');
|
|
412
|
+
console.log('IMPORTANT: Store this key securely!');
|
|
413
|
+
console.log('You can use this key with the regular CLI (simple-cli.js)');
|
|
414
|
+
console.log('Set it as HUSTLE_API_KEY in your environment.');
|
|
415
|
+
} catch (error) {
|
|
416
|
+
console.error('Error fetching API key:', error.message);
|
|
417
|
+
if (settings.debug && error.stack) {
|
|
418
|
+
console.error('[DEBUG] Stack:', error.stack);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
async function getVaultInfo() {
|
|
424
|
+
console.log('\nFetching vault info...');
|
|
425
|
+
if (settings.debug) {
|
|
426
|
+
console.log('[DEBUG] Calling authSdk.getVaultInfo()...');
|
|
427
|
+
}
|
|
428
|
+
try {
|
|
429
|
+
const vaultInfo = await authSdk.getVaultInfo();
|
|
430
|
+
if (settings.debug) {
|
|
431
|
+
console.log('[DEBUG] Raw response:');
|
|
432
|
+
console.log(JSON.stringify(vaultInfo, null, 2));
|
|
433
|
+
}
|
|
434
|
+
console.log('\n========================================');
|
|
435
|
+
console.log(' VAULT INFO');
|
|
436
|
+
console.log('========================================');
|
|
437
|
+
console.log('');
|
|
438
|
+
console.log(` Vault ID: ${vaultInfo.vaultId || 'N/A'}`);
|
|
439
|
+
console.log(` Token ID: ${vaultInfo.tokenId || vaultInfo.vaultId || 'N/A'}`);
|
|
440
|
+
console.log(` EVM Address: ${vaultInfo.evmAddress || 'N/A'}`);
|
|
441
|
+
console.log(` Solana Address: ${vaultInfo.solanaAddress || vaultInfo.address || 'N/A'}`);
|
|
442
|
+
console.log(` Hedera Account: ${vaultInfo.hederaAccountId || 'N/A'}`);
|
|
443
|
+
if (vaultInfo.btcPubkey) {
|
|
444
|
+
console.log(` BTC Pubkey: ${vaultInfo.btcPubkey.substring(0, 20)}...`);
|
|
445
|
+
}
|
|
446
|
+
if (vaultInfo.btcAddresses) {
|
|
447
|
+
console.log(' BTC Addresses:');
|
|
448
|
+
if (vaultInfo.btcAddresses.p2pkh) {
|
|
449
|
+
console.log(` P2PKH: ${vaultInfo.btcAddresses.p2pkh}`);
|
|
450
|
+
}
|
|
451
|
+
if (vaultInfo.btcAddresses.p2wpkh) {
|
|
452
|
+
console.log(` P2WPKH: ${vaultInfo.btcAddresses.p2wpkh}`);
|
|
453
|
+
}
|
|
454
|
+
if (vaultInfo.btcAddresses.p2tr) {
|
|
455
|
+
console.log(` P2TR: ${vaultInfo.btcAddresses.p2tr}`);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
if (vaultInfo.createdAt) {
|
|
459
|
+
console.log(` Created At: ${vaultInfo.createdAt}`);
|
|
460
|
+
}
|
|
461
|
+
if (vaultInfo.created_by) {
|
|
462
|
+
console.log(` Created By: ${vaultInfo.created_by}`);
|
|
463
|
+
}
|
|
464
|
+
console.log('');
|
|
465
|
+
console.log('========================================');
|
|
466
|
+
} catch (error) {
|
|
467
|
+
console.error('Error fetching vault info:', error.message);
|
|
468
|
+
if (settings.debug && error.stack) {
|
|
469
|
+
console.error('[DEBUG] Stack:', error.stack);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
function showSessionInfo() {
|
|
475
|
+
if (settings.debug) {
|
|
476
|
+
console.log('[DEBUG] Calling authSdk.getSession()...');
|
|
477
|
+
}
|
|
478
|
+
const session = authSdk.getSession();
|
|
479
|
+
if (settings.debug) {
|
|
480
|
+
console.log('[DEBUG] Raw response:');
|
|
481
|
+
console.log(JSON.stringify(session, null, 2));
|
|
482
|
+
}
|
|
483
|
+
console.log('\n========================================');
|
|
484
|
+
console.log(' SESSION INFO');
|
|
485
|
+
console.log('========================================');
|
|
486
|
+
console.log('');
|
|
487
|
+
if (session) {
|
|
488
|
+
console.log(` Identifier: ${session.user?.identifier || 'N/A'}`);
|
|
489
|
+
console.log(` Vault ID: ${session.user?.vaultId || 'N/A'}`);
|
|
490
|
+
console.log(` App ID: ${session.appId || 'N/A'}`);
|
|
491
|
+
console.log(` Auth Type: ${session.authType || 'N/A'}`);
|
|
492
|
+
console.log(` Expires At: ${session.expiresAt ? new Date(session.expiresAt).toISOString() : 'N/A'}`);
|
|
493
|
+
console.log(` Auth Token: ${session.authToken ? session.authToken.substring(0, 20) + '...' : 'N/A'}`);
|
|
494
|
+
} else {
|
|
495
|
+
console.log(' No active session');
|
|
496
|
+
}
|
|
497
|
+
console.log('');
|
|
498
|
+
console.log('========================================');
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
async function refreshSession() {
|
|
502
|
+
console.log('\nRefreshing session...');
|
|
503
|
+
if (settings.debug) {
|
|
504
|
+
console.log('[DEBUG] Calling authSdk.refreshSession()...');
|
|
505
|
+
}
|
|
506
|
+
try {
|
|
507
|
+
const newSession = await authSdk.refreshSession();
|
|
508
|
+
if (settings.debug) {
|
|
509
|
+
console.log('[DEBUG] Raw response:');
|
|
510
|
+
console.log(JSON.stringify(newSession, null, 2));
|
|
511
|
+
}
|
|
512
|
+
if (newSession) {
|
|
513
|
+
console.log('Session refreshed successfully!');
|
|
514
|
+
console.log(`New expiry: ${new Date(newSession.expiresAt).toISOString()}`);
|
|
515
|
+
} else {
|
|
516
|
+
console.log('Failed to refresh session.');
|
|
517
|
+
}
|
|
518
|
+
} catch (error) {
|
|
519
|
+
console.error('Error refreshing session:', error.message);
|
|
520
|
+
if (settings.debug && error.stack) {
|
|
521
|
+
console.error('[DEBUG] Stack:', error.stack);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
async function getEvmAddress() {
|
|
527
|
+
console.log('\nFetching EVM address...');
|
|
528
|
+
if (settings.debug) {
|
|
529
|
+
console.log('[DEBUG] Calling authSdk.getVaultInfo() for EVM address...');
|
|
530
|
+
}
|
|
531
|
+
try {
|
|
532
|
+
const vaultInfo = await authSdk.getVaultInfo();
|
|
533
|
+
if (settings.debug) {
|
|
534
|
+
console.log('[DEBUG] Raw response:');
|
|
535
|
+
console.log(JSON.stringify(vaultInfo, null, 2));
|
|
536
|
+
}
|
|
537
|
+
if (vaultInfo.evmAddress) {
|
|
538
|
+
console.log('\n========================================');
|
|
539
|
+
console.log(' EVM ADDRESS');
|
|
540
|
+
console.log('========================================');
|
|
541
|
+
console.log('');
|
|
542
|
+
console.log(` ${vaultInfo.evmAddress}`);
|
|
543
|
+
console.log('');
|
|
544
|
+
console.log('========================================');
|
|
545
|
+
} else {
|
|
546
|
+
console.log('No EVM address available for this vault.');
|
|
547
|
+
}
|
|
548
|
+
} catch (error) {
|
|
549
|
+
console.error('Error fetching EVM address:', error.message);
|
|
550
|
+
if (settings.debug && error.stack) {
|
|
551
|
+
console.error('[DEBUG] Stack:', error.stack);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
async function getSolanaAddress() {
|
|
557
|
+
console.log('\nFetching Solana address...');
|
|
558
|
+
if (settings.debug) {
|
|
559
|
+
console.log('[DEBUG] Calling authSdk.getVaultInfo() for Solana address...');
|
|
560
|
+
}
|
|
561
|
+
try {
|
|
562
|
+
const vaultInfo = await authSdk.getVaultInfo();
|
|
563
|
+
if (settings.debug) {
|
|
564
|
+
console.log('[DEBUG] Raw response:');
|
|
565
|
+
console.log(JSON.stringify(vaultInfo, null, 2));
|
|
566
|
+
}
|
|
567
|
+
const solanaAddr = vaultInfo.solanaAddress || vaultInfo.address;
|
|
568
|
+
if (solanaAddr) {
|
|
569
|
+
console.log('\n========================================');
|
|
570
|
+
console.log(' SOLANA ADDRESS');
|
|
571
|
+
console.log('========================================');
|
|
572
|
+
console.log('');
|
|
573
|
+
console.log(` ${solanaAddr}`);
|
|
574
|
+
console.log('');
|
|
575
|
+
console.log('========================================');
|
|
576
|
+
} else {
|
|
577
|
+
console.log('No Solana address available for this vault.');
|
|
578
|
+
}
|
|
579
|
+
} catch (error) {
|
|
580
|
+
console.error('Error fetching Solana address:', error.message);
|
|
581
|
+
if (settings.debug && error.stack) {
|
|
582
|
+
console.error('[DEBUG] Stack:', error.stack);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
async function doLogout() {
|
|
588
|
+
console.log('\nLogging out...');
|
|
589
|
+
if (settings.debug) {
|
|
590
|
+
console.log('[DEBUG] Calling authSdk.logout()...');
|
|
591
|
+
}
|
|
592
|
+
try {
|
|
593
|
+
authSdk.logout();
|
|
594
|
+
console.log('Logged out successfully.');
|
|
595
|
+
console.log('Session cleared. Exiting CLI...');
|
|
596
|
+
rl.close();
|
|
597
|
+
process.exit(0);
|
|
598
|
+
} catch (error) {
|
|
599
|
+
console.error('Error during logout:', error.message);
|
|
600
|
+
if (settings.debug && error.stack) {
|
|
601
|
+
console.error('[DEBUG] Stack:', error.stack);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
async function getBtcAddresses() {
|
|
607
|
+
console.log('\nFetching BTC addresses...');
|
|
608
|
+
if (settings.debug) {
|
|
609
|
+
console.log('[DEBUG] Calling authSdk.getVaultInfo() for BTC addresses...');
|
|
610
|
+
}
|
|
611
|
+
try {
|
|
612
|
+
const vaultInfo = await authSdk.getVaultInfo();
|
|
613
|
+
if (settings.debug) {
|
|
614
|
+
console.log('[DEBUG] Raw response:');
|
|
615
|
+
console.log(JSON.stringify(vaultInfo, null, 2));
|
|
616
|
+
}
|
|
617
|
+
if (vaultInfo.btcAddresses || vaultInfo.btcPubkey) {
|
|
618
|
+
console.log('\n========================================');
|
|
619
|
+
console.log(' BTC ADDRESSES');
|
|
620
|
+
console.log('========================================');
|
|
621
|
+
console.log('');
|
|
622
|
+
if (vaultInfo.btcPubkey) {
|
|
623
|
+
console.log(` Pubkey: ${vaultInfo.btcPubkey}`);
|
|
624
|
+
console.log('');
|
|
625
|
+
}
|
|
626
|
+
if (vaultInfo.btcAddresses) {
|
|
627
|
+
if (vaultInfo.btcAddresses.p2pkh) {
|
|
628
|
+
console.log(` P2PKH (Legacy): ${vaultInfo.btcAddresses.p2pkh}`);
|
|
629
|
+
}
|
|
630
|
+
if (vaultInfo.btcAddresses.p2wpkh) {
|
|
631
|
+
console.log(` P2WPKH (SegWit): ${vaultInfo.btcAddresses.p2wpkh}`);
|
|
632
|
+
}
|
|
633
|
+
if (vaultInfo.btcAddresses.p2tr) {
|
|
634
|
+
console.log(` P2TR (Taproot): ${vaultInfo.btcAddresses.p2tr}`);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
console.log('');
|
|
638
|
+
console.log('========================================');
|
|
639
|
+
} else {
|
|
640
|
+
console.log('No BTC addresses available for this vault.');
|
|
641
|
+
}
|
|
642
|
+
} catch (error) {
|
|
643
|
+
console.error('Error fetching BTC addresses:', error.message);
|
|
644
|
+
if (settings.debug && error.stack) {
|
|
645
|
+
console.error('[DEBUG] Stack:', error.stack);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
// Process commands
|
|
651
|
+
async function processCommand(command) {
|
|
652
|
+
if (command === '/help') {
|
|
653
|
+
showHelp();
|
|
654
|
+
return true;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
if (command === '/settings') {
|
|
658
|
+
showSettings();
|
|
659
|
+
return true;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
if (command === '/auth') {
|
|
663
|
+
await showAuthMenu();
|
|
664
|
+
return true;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
if (command === '/clear') {
|
|
668
|
+
messages.length = 0;
|
|
669
|
+
lastIntentContext = null;
|
|
670
|
+
console.log('Conversation history cleared.');
|
|
671
|
+
return true;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
if (command === '/exit' || command === '/quit') {
|
|
675
|
+
console.log('Goodbye!');
|
|
676
|
+
rl.close();
|
|
677
|
+
process.exit(0);
|
|
678
|
+
return true;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
if (command.startsWith('/stream')) {
|
|
682
|
+
const parts = command.split(' ');
|
|
683
|
+
if (parts.length === 2) {
|
|
684
|
+
if (parts[1] === 'on') {
|
|
685
|
+
settings.stream = true;
|
|
686
|
+
console.log('Streaming mode enabled');
|
|
687
|
+
} else if (parts[1] === 'off') {
|
|
688
|
+
settings.stream = false;
|
|
689
|
+
console.log('Streaming mode disabled');
|
|
690
|
+
}
|
|
691
|
+
} else {
|
|
692
|
+
console.log(`Streaming is currently ${settings.stream ? 'ON' : 'OFF'}`);
|
|
693
|
+
}
|
|
694
|
+
return true;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
if (command.startsWith('/debug')) {
|
|
698
|
+
const parts = command.split(' ');
|
|
699
|
+
if (parts.length === 2) {
|
|
700
|
+
if (parts[1] === 'on') {
|
|
701
|
+
settings.debug = true;
|
|
702
|
+
console.log('Debug mode enabled');
|
|
703
|
+
} else if (parts[1] === 'off') {
|
|
704
|
+
settings.debug = false;
|
|
705
|
+
console.log('Debug mode disabled');
|
|
706
|
+
}
|
|
707
|
+
} else {
|
|
708
|
+
console.log(`Debug is currently ${settings.debug ? 'ON' : 'OFF'}`);
|
|
709
|
+
}
|
|
710
|
+
return true;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
if (command.startsWith('/history')) {
|
|
714
|
+
const parts = command.split(' ');
|
|
715
|
+
if (parts.length === 2) {
|
|
716
|
+
if (parts[1] === 'on') {
|
|
717
|
+
settings.retainHistory = true;
|
|
718
|
+
console.log('History retention enabled');
|
|
719
|
+
} else if (parts[1] === 'off') {
|
|
720
|
+
settings.retainHistory = false;
|
|
721
|
+
console.log('History retention disabled');
|
|
722
|
+
}
|
|
723
|
+
} else {
|
|
724
|
+
console.log(`History is currently ${settings.retainHistory ? 'ON' : 'OFF'}`);
|
|
725
|
+
}
|
|
726
|
+
return true;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
if (command === '/models') {
|
|
730
|
+
try {
|
|
731
|
+
console.log('\nFetching available models...');
|
|
732
|
+
const models = await client.getModels();
|
|
733
|
+
console.log('\n=== Available Models ===\n');
|
|
734
|
+
models.forEach((model) => {
|
|
735
|
+
const isSelected = settings.model === model.id;
|
|
736
|
+
const status = isSelected ? '>' : ' ';
|
|
737
|
+
console.log(`${status} ${model.name}`);
|
|
738
|
+
console.log(` ID: ${model.id}`);
|
|
739
|
+
});
|
|
740
|
+
console.log('\nCurrent model:', settings.model || 'API default');
|
|
741
|
+
} catch (error) {
|
|
742
|
+
console.error('Error fetching models:', error.message);
|
|
743
|
+
}
|
|
744
|
+
return true;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
if (command.startsWith('/model')) {
|
|
748
|
+
const parts = command.split(' ');
|
|
749
|
+
if (parts.length === 1) {
|
|
750
|
+
console.log(`Current model: ${settings.model || 'API default'}`);
|
|
751
|
+
return true;
|
|
752
|
+
}
|
|
753
|
+
const modelArg = parts.slice(1).join(' ');
|
|
754
|
+
if (modelArg === 'clear') {
|
|
755
|
+
settings.model = null;
|
|
756
|
+
console.log('Model selection cleared.');
|
|
757
|
+
} else {
|
|
758
|
+
settings.model = modelArg;
|
|
759
|
+
console.log(`Model set to: ${settings.model}`);
|
|
760
|
+
}
|
|
761
|
+
return true;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
if (command.startsWith('/tools')) {
|
|
765
|
+
const parts = command.split(' ');
|
|
766
|
+
|
|
767
|
+
if (parts.length === 1) {
|
|
768
|
+
try {
|
|
769
|
+
console.log('\nFetching available tools...');
|
|
770
|
+
const tools = await client.getTools();
|
|
771
|
+
console.log('\n=== Tool Categories ===\n');
|
|
772
|
+
tools.forEach((tool) => {
|
|
773
|
+
const isSelected = settings.selectedTools.includes(tool.id);
|
|
774
|
+
const status = isSelected ? '✅' : '⬜';
|
|
775
|
+
console.log(`${status} ${tool.title} (${tool.id})`);
|
|
776
|
+
console.log(` ${tool.description}`);
|
|
777
|
+
});
|
|
778
|
+
console.log('\nCurrently selected:',
|
|
779
|
+
settings.selectedTools.length > 0
|
|
780
|
+
? settings.selectedTools.join(', ')
|
|
781
|
+
: 'Auto-tools mode');
|
|
782
|
+
} catch (error) {
|
|
783
|
+
console.error('Error fetching tools:', error.message);
|
|
784
|
+
}
|
|
785
|
+
return true;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
const subCommand = parts[1];
|
|
789
|
+
const toolId = parts[2];
|
|
790
|
+
|
|
791
|
+
if (subCommand === 'clear') {
|
|
792
|
+
settings.selectedTools = [];
|
|
793
|
+
console.log('Auto-tools mode enabled.');
|
|
794
|
+
return true;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
if (subCommand === 'add' && toolId) {
|
|
798
|
+
if (!settings.selectedTools.includes(toolId)) {
|
|
799
|
+
settings.selectedTools.push(toolId);
|
|
800
|
+
lastIntentContext = null;
|
|
801
|
+
console.log(`Added: ${toolId}`);
|
|
802
|
+
}
|
|
803
|
+
return true;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
if (subCommand === 'remove' && toolId) {
|
|
807
|
+
const index = settings.selectedTools.indexOf(toolId);
|
|
808
|
+
if (index > -1) {
|
|
809
|
+
settings.selectedTools.splice(index, 1);
|
|
810
|
+
console.log(`Removed: ${toolId}`);
|
|
811
|
+
}
|
|
812
|
+
return true;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
return true;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
return false;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// Main chat loop
|
|
822
|
+
async function chat() {
|
|
823
|
+
rl.question('\nYou: ', async (input) => {
|
|
824
|
+
if (input.startsWith('/')) {
|
|
825
|
+
const isCommand = await processCommand(input);
|
|
826
|
+
if (isCommand) {
|
|
827
|
+
chat();
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
if (input.toLowerCase() === 'exit' || input.toLowerCase() === 'quit') {
|
|
833
|
+
console.log('Goodbye!');
|
|
834
|
+
rl.close();
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
const currentMessages = settings.retainHistory ? [...messages] : [];
|
|
839
|
+
currentMessages.push({ role: 'user', content: input });
|
|
840
|
+
|
|
841
|
+
if (!settings.stream) {
|
|
842
|
+
console.log('\nAgent is thinking...');
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
try {
|
|
846
|
+
let assistantResponse = '';
|
|
847
|
+
|
|
848
|
+
if (settings.stream) {
|
|
849
|
+
assistantResponse = await streamResponse([...currentMessages]);
|
|
850
|
+
} else {
|
|
851
|
+
const chatOptions = {};
|
|
852
|
+
|
|
853
|
+
if (settings.model) {
|
|
854
|
+
chatOptions.model = settings.model;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
if (settings.selectedTools.length > 0) {
|
|
858
|
+
chatOptions.selectedToolCategories = settings.selectedTools;
|
|
859
|
+
} else if (lastIntentContext) {
|
|
860
|
+
chatOptions.intentContext = lastIntentContext;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
const response = await client.chat(currentMessages, chatOptions);
|
|
864
|
+
|
|
865
|
+
if (response.intentContext?.intentContext) {
|
|
866
|
+
lastIntentContext = response.intentContext.intentContext;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
console.log(`\nAgent: ${response.content}`);
|
|
870
|
+
|
|
871
|
+
if (response.toolCalls && response.toolCalls.length > 0) {
|
|
872
|
+
console.log('\nTools used:');
|
|
873
|
+
response.toolCalls.forEach((tool, i) => {
|
|
874
|
+
console.log(`${i+1}. ${tool.toolName || 'Unknown'}`);
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
assistantResponse = response.content;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
if (settings.retainHistory && assistantResponse) {
|
|
882
|
+
messages.push({ role: 'user', content: input });
|
|
883
|
+
messages.push({ role: 'assistant', content: assistantResponse });
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
chat();
|
|
887
|
+
} catch (error) {
|
|
888
|
+
console.error('Error:', error.message);
|
|
889
|
+
chat();
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
// Start
|
|
895
|
+
console.log('Type "/help" for commands, "/auth" for auth menu, or "/exit" to quit.\n');
|
|
896
|
+
showSettings();
|
|
897
|
+
chat();
|
|
898
|
+
|
|
899
|
+
} catch (error) {
|
|
900
|
+
console.error('Error initializing CLI:', error);
|
|
901
|
+
process.exit(1);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emblemvault/agentwallet",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI for EmblemVault Hustle AI - autonomous crypto wallet management",
|
|
5
5
|
"main": "enhanced-hustle.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"emblem-hustle": "
|
|
9
|
-
"emblem-resume": "
|
|
10
|
-
"emblem-reset": "
|
|
8
|
+
"emblem-hustle": "enhanced-hustle.js",
|
|
9
|
+
"emblem-resume": "resume-conversation.js",
|
|
10
|
+
"emblem-reset": "reset-conversation.js",
|
|
11
|
+
"hustle-chat": "hustle-chat.js"
|
|
11
12
|
},
|
|
12
13
|
"scripts": {
|
|
13
14
|
"start": "node enhanced-hustle.js",
|
|
@@ -16,7 +17,10 @@
|
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
19
|
"node-fetch": "^3.3.2",
|
|
19
|
-
"commander": "^11.1.0"
|
|
20
|
+
"commander": "^11.1.0",
|
|
21
|
+
"hustle-incognito": "^0.5.0",
|
|
22
|
+
"@emblemvault/auth-sdk": "^1.0.0",
|
|
23
|
+
"dotenv": "^16.3.1"
|
|
20
24
|
},
|
|
21
25
|
"keywords": [
|
|
22
26
|
"ai",
|
|
@@ -35,9 +39,9 @@
|
|
|
35
39
|
"license": "MIT",
|
|
36
40
|
"repository": {
|
|
37
41
|
"type": "git",
|
|
38
|
-
"url": "https://github.com/EmblemCompany/EmblemAi-AgentWallet.git"
|
|
42
|
+
"url": "git+https://github.com/EmblemCompany/EmblemAi-AgentWallet.git"
|
|
39
43
|
},
|
|
40
|
-
"homepage": "https://emblemvault.
|
|
44
|
+
"homepage": "https://emblemvault.dev",
|
|
41
45
|
"engines": {
|
|
42
46
|
"node": ">=18.0.0"
|
|
43
47
|
},
|
|
@@ -45,6 +49,7 @@
|
|
|
45
49
|
"enhanced-hustle.js",
|
|
46
50
|
"resume-conversation.js",
|
|
47
51
|
"reset-conversation.js",
|
|
52
|
+
"hustle-chat.js",
|
|
48
53
|
"auth.js",
|
|
49
54
|
"conversation.js",
|
|
50
55
|
"README.md"
|