@hashgraphonline/conversational-agent 0.2.104 → 0.2.105
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 +64 -27
- package/cli/dist/CLIApp.d.ts +3 -1
- package/cli/dist/CLIApp.d.ts.map +1 -0
- package/cli/dist/CLIApp.js +6 -5
- package/cli/dist/CLIApp.js.map +1 -0
- package/cli/dist/app.d.ts +3 -1
- package/cli/dist/app.d.ts.map +1 -0
- package/cli/dist/app.js +2 -1
- package/cli/dist/app.js.map +1 -0
- package/cli/dist/cli.d.ts +1 -0
- package/cli/dist/cli.d.ts.map +1 -0
- package/cli/dist/cli.js +39 -3
- package/cli/dist/cli.js.map +1 -0
- package/cli/dist/components/ChatScreen.d.ts +9 -3
- package/cli/dist/components/ChatScreen.d.ts.map +1 -0
- package/cli/dist/components/ChatScreen.js +4 -3
- package/cli/dist/components/ChatScreen.js.map +1 -0
- package/cli/dist/components/LoadingScreen.d.ts +1 -0
- package/cli/dist/components/LoadingScreen.d.ts.map +1 -0
- package/cli/dist/components/LoadingScreen.js +2 -1
- package/cli/dist/components/LoadingScreen.js.map +1 -0
- package/cli/dist/components/MCPConfigScreen.d.ts +2 -2
- package/cli/dist/components/MCPConfigScreen.d.ts.map +1 -0
- package/cli/dist/components/MCPConfigScreen.js +77 -59
- package/cli/dist/components/MCPConfigScreen.js.map +1 -0
- package/cli/dist/components/ScreenRouter.d.ts +1 -0
- package/cli/dist/components/ScreenRouter.d.ts.map +1 -0
- package/cli/dist/components/ScreenRouter.js +6 -5
- package/cli/dist/components/ScreenRouter.js.map +1 -0
- package/cli/dist/components/SetupScreen.d.ts +1 -0
- package/cli/dist/components/SetupScreen.d.ts.map +1 -0
- package/cli/dist/components/SetupScreen.js +28 -26
- package/cli/dist/components/SetupScreen.js.map +1 -0
- package/cli/dist/components/StatusBadge.d.ts +4 -1
- package/cli/dist/components/StatusBadge.d.ts.map +1 -0
- package/cli/dist/components/StatusBadge.js +18 -22
- package/cli/dist/components/StatusBadge.js.map +1 -0
- package/cli/dist/components/TerminalWindow.d.ts +1 -0
- package/cli/dist/components/TerminalWindow.d.ts.map +1 -0
- package/cli/dist/components/TerminalWindow.js +2 -7
- package/cli/dist/components/TerminalWindow.js.map +1 -0
- package/cli/dist/components/WelcomeScreen.d.ts +1 -0
- package/cli/dist/components/WelcomeScreen.d.ts.map +1 -0
- package/cli/dist/components/WelcomeScreen.js +15 -15
- package/cli/dist/components/WelcomeScreen.js.map +1 -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 +4 -4
- package/cli/dist/hooks/useInitializeAgent.d.ts.map +1 -0
- package/cli/dist/hooks/useInitializeAgent.js +1 -0
- package/cli/dist/hooks/useInitializeAgent.js.map +1 -0
- package/cli/dist/hooks/useStableState.d.ts +2 -2
- package/cli/dist/hooks/useStableState.d.ts.map +1 -0
- package/cli/dist/hooks/useStableState.js +1 -0
- package/cli/dist/hooks/useStableState.js.map +1 -0
- package/cli/dist/managers/AgentManager.d.ts +3 -2
- package/cli/dist/managers/AgentManager.d.ts.map +1 -0
- package/cli/dist/managers/AgentManager.js +8 -6
- package/cli/dist/managers/AgentManager.js.map +1 -0
- package/cli/dist/managers/ConfigManager.d.ts +3 -2
- package/cli/dist/managers/ConfigManager.d.ts.map +1 -0
- package/cli/dist/managers/ConfigManager.js +23 -8
- package/cli/dist/managers/ConfigManager.js.map +1 -0
- package/cli/dist/types.d.ts +22 -1
- package/cli/dist/types.d.ts.map +1 -0
- package/cli/dist/types.js +15 -0
- package/cli/dist/types.js.map +1 -0
- package/dist/cjs/config/system-message.d.ts +1 -1
- package/dist/cjs/conversational-agent.d.ts +30 -2
- package/dist/cjs/core/tool-registry.d.ts +29 -0
- package/dist/cjs/forms/field-guidance-registry.d.ts +33 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/mcp/types.d.ts +14 -3
- package/dist/cjs/plugins/index.d.ts +1 -0
- package/dist/cjs/plugins/inscribe/InscribePlugin.d.ts +1 -0
- package/dist/cjs/plugins/web-browser/WebBrowserPlugin.d.ts +14 -0
- package/dist/cjs/runtime/wallet-bridge.d.ts +26 -0
- package/dist/cjs/services/attachment-processor.d.ts +1 -2
- package/dist/cjs/services/content-store-manager.d.ts +1 -1
- package/dist/cjs/services/formatters/types.d.ts +3 -1
- package/dist/cjs/services/index.d.ts +1 -1
- package/dist/cjs/signers/browser-signer.d.ts +32 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index10.js +13 -5
- package/dist/esm/index10.js.map +1 -1
- package/dist/esm/index13.js +157 -179
- package/dist/esm/index13.js.map +1 -1
- package/dist/esm/index15.js +9 -4
- package/dist/esm/index15.js.map +1 -1
- package/dist/esm/index18.js.map +1 -1
- package/dist/esm/index2.js +25 -27
- package/dist/esm/index2.js.map +1 -1
- package/dist/esm/index21.js +1 -1
- package/dist/esm/index21.js.map +1 -1
- package/dist/esm/index23.js +3 -3
- package/dist/esm/index24.js.map +1 -1
- package/dist/esm/index26.js.map +1 -1
- package/dist/esm/index3.js.map +1 -1
- package/dist/esm/index30.js.map +1 -1
- package/dist/esm/index31.js +6 -3
- package/dist/esm/index31.js.map +1 -1
- package/dist/esm/index33.js +5 -5
- package/dist/esm/index33.js.map +1 -1
- package/dist/esm/index36.js +8 -45
- package/dist/esm/index36.js.map +1 -1
- package/dist/esm/index37.js +41 -102
- package/dist/esm/index37.js.map +1 -1
- package/dist/esm/index38.js +107 -21
- package/dist/esm/index38.js.map +1 -1
- package/dist/esm/index39.js +63 -24
- package/dist/esm/index39.js.map +1 -1
- package/dist/esm/index4.js +43 -0
- package/dist/esm/index4.js.map +1 -1
- package/dist/esm/index40.js +78 -11
- package/dist/esm/index40.js.map +1 -1
- package/dist/esm/index41.js +21 -5
- package/dist/esm/index41.js.map +1 -1
- package/dist/esm/index42.js +5 -255
- package/dist/esm/index42.js.map +1 -1
- package/dist/esm/index43.js +12 -184
- package/dist/esm/index43.js.map +1 -1
- package/dist/esm/index44.js +322 -7
- package/dist/esm/index44.js.map +1 -1
- package/dist/esm/index45.js +174 -82
- package/dist/esm/index45.js.map +1 -1
- package/dist/esm/index46.js +30 -0
- package/dist/esm/index46.js.map +1 -0
- package/dist/esm/index47.js +10 -0
- package/dist/esm/index47.js.map +1 -0
- package/dist/esm/index48.js +98 -0
- package/dist/esm/index48.js.map +1 -0
- package/dist/esm/index5.js +2 -2
- package/dist/esm/index6.js +189 -29
- package/dist/esm/index6.js.map +1 -1
- package/dist/types/config/system-message.d.ts +1 -1
- package/dist/types/conversational-agent.d.ts +30 -2
- package/dist/types/core/tool-registry.d.ts +29 -0
- package/dist/types/forms/field-guidance-registry.d.ts +33 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/mcp/types.d.ts +14 -3
- package/dist/types/plugins/index.d.ts +1 -0
- package/dist/types/plugins/inscribe/InscribePlugin.d.ts +1 -0
- package/dist/types/plugins/web-browser/WebBrowserPlugin.d.ts +14 -0
- package/dist/types/runtime/wallet-bridge.d.ts +26 -0
- package/dist/types/services/attachment-processor.d.ts +1 -2
- package/dist/types/services/content-store-manager.d.ts +1 -1
- package/dist/types/services/formatters/types.d.ts +3 -1
- package/dist/types/services/index.d.ts +1 -1
- package/dist/types/signers/browser-signer.d.ts +32 -0
- package/package.json +16 -11
- package/src/config/system-message.ts +3 -3
- package/src/conversational-agent.ts +318 -45
- package/src/core/tool-registry.ts +85 -0
- package/src/forms/field-guidance-registry.ts +213 -188
- package/src/forms/form-generator.ts +28 -12
- package/src/index.ts +1 -0
- package/src/langchain/form-aware-agent-executor.ts +6 -6
- package/src/langchain/langchain-agent.ts +1 -1
- package/src/mcp/mcp-client-manager.ts +12 -5
- package/src/mcp/types.ts +15 -3
- package/src/memory/content-storage.ts +19 -6
- package/src/memory/smart-memory-manager.ts +0 -1
- package/src/plugins/hbar/AccountBuilder.ts +16 -16
- package/src/plugins/hcs-10/HCS10Plugin.ts +38 -38
- package/src/plugins/hcs-2/HCS2Plugin.ts +2 -2
- package/src/plugins/index.ts +2 -1
- package/src/plugins/inscribe/InscribePlugin.ts +46 -2
- package/src/plugins/web-browser/WebBrowserPlugin.ts +128 -0
- package/src/runtime/wallet-bridge.ts +46 -0
- package/src/services/attachment-processor.ts +1 -1
- package/src/services/content-store-manager.ts +1 -1
- package/src/services/formatters/types.ts +3 -1
- package/src/services/index.ts +1 -1
- package/src/signers/browser-signer.ts +111 -0
package/README.md
CHANGED
|
@@ -133,7 +133,7 @@ When using `returnBytes` mode:
|
|
|
133
133
|
|
|
134
134
|
- **Automatic Key Detection**: Smart detection of ED25519 and ECDSA key types via mirror node
|
|
135
135
|
- **Multiple HCS Standards**: Built-in support for HCS-10, HCS-2, and inscription standards
|
|
136
|
-
- **
|
|
136
|
+
- **Core Plugin Suite**: HCS10Plugin, HCS2Plugin, InscribePlugin, and HbarPlugin
|
|
137
137
|
- **TypeScript Support**: Full type definitions for all components
|
|
138
138
|
- **State Management**: Integrated state management for agent operations
|
|
139
139
|
- **CLI Interface**: Beautiful terminal interface for interactive agent communication
|
|
@@ -188,16 +188,19 @@ The Conversational Agent includes all tools from the `hedera-agent-kit` v2 packa
|
|
|
188
188
|
This package includes a beautiful terminal interface built with [Ink](https://github.com/vadimdemedes/ink) that follows Hashgraph Consensus Standards design patterns.
|
|
189
189
|
|
|
190
190
|
```bash
|
|
191
|
-
# Run the interactive CLI
|
|
191
|
+
# Run the interactive CLI from the source workspace
|
|
192
192
|
pnpm cli
|
|
193
193
|
|
|
194
|
-
# Or with
|
|
194
|
+
# Or invoke the published binary with npx (no local build required)
|
|
195
|
+
npx @hashgraphonline/conversational-agent
|
|
196
|
+
|
|
197
|
+
# Provide credentials via environment variables (works for pnpm cli and npx)
|
|
195
198
|
export HEDERA_ACCOUNT_ID=0.0.12345
|
|
196
199
|
export HEDERA_PRIVATE_KEY=your-private-key
|
|
197
200
|
export OPENAI_API_KEY=sk-your-openai-key
|
|
198
201
|
pnpm cli
|
|
199
202
|
|
|
200
|
-
#
|
|
203
|
+
# Supply configuration through CLI flags
|
|
201
204
|
pnpm cli -- --account-id=0.0.12345 --private-key=... --openai-api-key=sk-...
|
|
202
205
|
```
|
|
203
206
|
|
|
@@ -210,13 +213,34 @@ pnpm cli -- --account-id=0.0.12345 --private-key=... --openai-api-key=sk-...
|
|
|
210
213
|
- 🚀 **Fast & Responsive** - Built with React for smooth interactions
|
|
211
214
|
- 📊 **Transaction Details** - See transaction IDs and network responses
|
|
212
215
|
|
|
216
|
+
### Headless Mode
|
|
217
|
+
|
|
218
|
+
Use the same executable to run a single command without the interactive UI. Headless mode activates automatically when you pass a command argument or when the CLI receives non-interactive input.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Pass the command immediately after the binary
|
|
222
|
+
npx @hashgraphonline/conversational-agent "Register me as an AI agent named TestBot"
|
|
223
|
+
|
|
224
|
+
# Or use the explicit flag (useful when the command contains leading dashes)
|
|
225
|
+
npx @hashgraphonline/conversational-agent \
|
|
226
|
+
--account-id=0.0.12345 \
|
|
227
|
+
--private-key=... \
|
|
228
|
+
--openai-api-key=sk-... \
|
|
229
|
+
--command "Transfer 1 HBAR to 0.0.800"
|
|
230
|
+
|
|
231
|
+
# From the workspace helper script
|
|
232
|
+
pnpm cli -- --command "Find my pending connection requests"
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Headless execution prints structured output prefixed with the speaker (for example `[assistant]`, `[error]`, `[transaction]`) and returns a non-zero exit code when an error occurs. This makes it suitable for automation, CI tasks, or scripting flows that need machine-readable responses.
|
|
236
|
+
|
|
213
237
|
## Creating Custom Plugins
|
|
214
238
|
|
|
215
239
|
You can extend the conversational agent with custom plugins. Here's how to create one:
|
|
216
240
|
|
|
217
241
|
### Plugin Structure
|
|
218
242
|
|
|
219
|
-
See
|
|
243
|
+
See the [Conversational Agent documentation](https://hashgraphonline.com/docs/libraries/conversational-agent/) for detailed plugin development guidance.
|
|
220
244
|
|
|
221
245
|
```typescript
|
|
222
246
|
import {
|
|
@@ -320,28 +344,39 @@ const response = await agent.processMessage(
|
|
|
320
344
|
4. **State Management**: If your plugin needs state, consider implementing a custom state manager
|
|
321
345
|
5. **Documentation**: Provide clear descriptions for your plugin and tools
|
|
322
346
|
|
|
323
|
-
For more details, see
|
|
347
|
+
For more details, see the [Conversational Agent documentation](https://hashgraphonline.com/docs/libraries/conversational-agent/).
|
|
324
348
|
|
|
325
349
|
## Configuration Options
|
|
326
350
|
|
|
327
|
-
| Option
|
|
328
|
-
|
|
|
329
|
-
| `accountId`
|
|
330
|
-
| `privateKey`
|
|
331
|
-
| `network`
|
|
332
|
-
| `openAIApiKey`
|
|
333
|
-
| `openAIModelName`
|
|
334
|
-
| `
|
|
335
|
-
| `
|
|
336
|
-
| `
|
|
337
|
-
| `
|
|
338
|
-
| `
|
|
339
|
-
| `
|
|
340
|
-
| `
|
|
341
|
-
| `
|
|
342
|
-
| `
|
|
343
|
-
| `
|
|
344
|
-
| `
|
|
351
|
+
| Option | Type | Default | Description |
|
|
352
|
+
| --- | --- | --- | --- |
|
|
353
|
+
| `accountId` | string | **required** | Hedera account ID (e.g., `0.0.12345`) |
|
|
354
|
+
| `privateKey` | string | **required** | Private key for the account |
|
|
355
|
+
| `network` | `NetworkType` | `'testnet'` | Network to connect to (`'mainnet'`, `'testnet'`, or `'previewnet'`) |
|
|
356
|
+
| `openAIApiKey` | string | **required** | API key used for the default LLM provider and entity memory |
|
|
357
|
+
| `openAIModelName` | string | `'gpt-4o'` | Preferred OpenAI model when `llmProvider` is `openai` |
|
|
358
|
+
| `llmProvider` | `'openai' \| 'anthropic' \| 'openrouter'` | `'openai'` | Primary LLM provider for conversational responses |
|
|
359
|
+
| `verbose` | boolean | false | Enable verbose logging |
|
|
360
|
+
| `operationalMode` | `AgentOperationalMode` | `'autonomous'` | `'autonomous'` or `'returnBytes'` |
|
|
361
|
+
| `userAccountId` | string | undefined | Account ID applied to scheduled transactions in returnBytes mode |
|
|
362
|
+
| `customSystemMessagePreamble` | string | Hashgraph Online system prompt | Custom system message prefix |
|
|
363
|
+
| `customSystemMessagePostamble` | string | undefined | Custom system message suffix |
|
|
364
|
+
| `additionalPlugins` | `BasePlugin[]` | [] | Additional plugins to load |
|
|
365
|
+
| `stateManager` | `IStateManager` | `OpenConvaiState` | Custom state manager |
|
|
366
|
+
| `scheduleUserTransactionsInBytesMode` | boolean | false | Schedule transactions automatically in returnBytes mode |
|
|
367
|
+
| `mirrorNodeConfig` | `MirrorNodeConfig` | undefined | Custom mirror node configuration |
|
|
368
|
+
| `disableLogging` | boolean | false | Disable all logging |
|
|
369
|
+
| `enabledPlugins` | string[] | undefined | Filter which plugins to enable by ID |
|
|
370
|
+
| `toolFilter` | `(tool: { name: string; namespace?: string }) => boolean` | undefined | Predicate to include or exclude tools dynamically |
|
|
371
|
+
| `mcpServers` | `MCPServerConfig[]` | undefined | Configure MCP servers for Model Context Protocol support |
|
|
372
|
+
| `walletExecutor` | `(base64, network) => Promise<{ transactionId: string }>` | undefined | Custom executor for wallet-driven transaction submission |
|
|
373
|
+
| `customSignerFactory` | `(args) => AbstractSigner` | undefined | Override signer selection when initializing the agent |
|
|
374
|
+
| `entityMemoryEnabled` | boolean | true | Enable automatic entity extraction and storage |
|
|
375
|
+
| `entityMemoryConfig` | `SmartMemoryConfig` | undefined | Custom configuration for entity memory |
|
|
376
|
+
| `entityMemoryProvider` | `'openai' \| 'anthropic' \| 'openrouter'` | Matches `llmProvider` | Provider used for entity extraction and resolution |
|
|
377
|
+
| `entityMemoryModelName` | string | Provider-specific default | Override model used for entity memory operations |
|
|
378
|
+
| `openRouterApiKey` | string | undefined | API key when using OpenRouter (falls back to `openAIApiKey`) |
|
|
379
|
+
| `openRouterBaseURL` | string | `'https://openrouter.ai/api/v1'` | Base URL for OpenRouter requests |
|
|
345
380
|
|
|
346
381
|
## Environment Variables
|
|
347
382
|
|
|
@@ -369,6 +404,7 @@ await agent.initialize();
|
|
|
369
404
|
const hcs10Plugin = agent.hcs10Plugin;
|
|
370
405
|
const hcs2Plugin = agent.hcs2Plugin;
|
|
371
406
|
const inscribePlugin = agent.inscribePlugin;
|
|
407
|
+
const hbarPlugin = agent.hbarPlugin;
|
|
372
408
|
|
|
373
409
|
// Access the underlying Hedera agent
|
|
374
410
|
const hederaAgent = agent.getConversationalAgent();
|
|
@@ -421,6 +457,7 @@ const hcs2Agent = ConversationalAgent.withHCS2({
|
|
|
421
457
|
// ConversationalAgent.withSmartContract() - Only smart contract tools
|
|
422
458
|
// ConversationalAgent.withAllStandards() - All HCS standards plugins (HCS-10, HCS-2, Inscribe)
|
|
423
459
|
// ConversationalAgent.minimal() - Only basic account tools
|
|
460
|
+
// ConversationalAgent.withMCP(options, mcpServers) - Configure Model Context Protocol servers
|
|
424
461
|
```
|
|
425
462
|
|
|
426
463
|
### Plugin Filtering
|
|
@@ -441,7 +478,7 @@ const agent = new ConversationalAgent({
|
|
|
441
478
|
Available plugin IDs:
|
|
442
479
|
|
|
443
480
|
- Standard plugins: `hcs-10`, `hcs-2`, `inscribe`
|
|
444
|
-
- Core Hedera plugins: `hts-token`, `account`, `file-service`, `consensus-service`, `smart-contract`, `network`
|
|
481
|
+
- Core Hedera plugins: `hts-token`, `account`, `file-service`, `consensus-service`, `smart-contract`, `network`, `hbar`
|
|
445
482
|
|
|
446
483
|
### Legacy Plugin Usage (hedera-agent-kit 2.0.3 only)
|
|
447
484
|
|
|
@@ -490,7 +527,7 @@ If you've created a plugin that extends the Conversational Agent's capabilities,
|
|
|
490
527
|
|
|
491
528
|
2. **Create Your Plugin**
|
|
492
529
|
- Place your plugin in `src/plugins/community/[your-plugin-name]/`
|
|
493
|
-
- Follow the plugin structure outlined in the [
|
|
530
|
+
- Follow the plugin structure outlined in the [Conversational Agent documentation](https://hashgraphonline.com/docs/libraries/conversational-agent/)
|
|
494
531
|
- Include comprehensive tests in `src/plugins/community/[your-plugin-name]/__tests__/`
|
|
495
532
|
- Add documentation in `src/plugins/community/[your-plugin-name]/README.md`
|
|
496
533
|
|
|
@@ -545,7 +582,7 @@ src/plugins/community/your-plugin/
|
|
|
545
582
|
|
|
546
583
|
### Getting Help
|
|
547
584
|
|
|
548
|
-
- Join our [
|
|
585
|
+
- Join our [Telegram community](https://t.me/hashinals) for discussions
|
|
549
586
|
- Check existing issues and PRs before starting work
|
|
550
587
|
- Ask questions in the #development channel
|
|
551
588
|
- Review the [HCS Standards](https://hashgraphonline.com/docs/standards) for protocol details
|
package/cli/dist/CLIApp.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type Network } from './types';
|
|
2
3
|
interface Props {
|
|
3
4
|
accountId?: string;
|
|
4
5
|
privateKey?: string;
|
|
5
|
-
network?:
|
|
6
|
+
network?: Network;
|
|
6
7
|
openAIApiKey?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const CLIApp: React.FC<Props>;
|
|
9
10
|
export {};
|
|
11
|
+
//# sourceMappingURL=CLIApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CLIApp.d.ts","sourceRoot":"","sources":["../src/CLIApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAO5D,OAAO,EAA4B,KAAK,OAAO,EAAC,MAAM,SAAS,CAAC;AAEhE,UAAU,KAAK;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiKlC,CAAC"}
|
package/cli/dist/CLIApp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState, useMemo, useCallback } from 'react';
|
|
2
2
|
import { useApp } from 'ink';
|
|
3
|
-
import { ScreenRouter } from './components/ScreenRouter
|
|
4
|
-
import { ConfigManager } from './managers/ConfigManager
|
|
5
|
-
import { AgentManager } from './managers/AgentManager
|
|
6
|
-
import { useStableState } from './hooks/useStableState
|
|
7
|
-
import { useInitializeAgent } from './hooks/useInitializeAgent
|
|
3
|
+
import { ScreenRouter } from './components/ScreenRouter';
|
|
4
|
+
import { ConfigManager } from './managers/ConfigManager';
|
|
5
|
+
import { AgentManager } from './managers/AgentManager';
|
|
6
|
+
import { useStableState } from './hooks/useStableState';
|
|
7
|
+
import { useInitializeAgent } from './hooks/useInitializeAgent';
|
|
8
8
|
export const CLIApp = props => {
|
|
9
9
|
const { exit } = useApp();
|
|
10
10
|
const configManager = useMemo(() => ConfigManager.getInstance(), []);
|
|
@@ -125,3 +125,4 @@ export const CLIApp = props => {
|
|
|
125
125
|
}), [handleInitializeAgent, sendMessage]);
|
|
126
126
|
return (React.createElement(ScreenRouter, { state: state, currentConfig: currentConfig, actions: actions, stableHandlers: stableHandlers, exit: exit }));
|
|
127
127
|
};
|
|
128
|
+
//# sourceMappingURL=CLIApp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CLIApp.js","sourceRoot":"","sources":["../src/CLIApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAC,MAAM,EAAC,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;A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AAC,OAAO,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,MAAM,aAAa,GAAG,GAAG,EAAE;QAC1B,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;YACtC,MAAM,gBAAgB,GAAG;gBACxB,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE;oBACL,IAAI;oBACJ,yCAAyC;oBACzC,KAAK,CAAC,SAAS,CAAC,cAAc;iBAC9B;gBACD,SAAS,EAAE,OAAgB;gBAC3B,WAAW,EAAE,IAAI;aACjB,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAC/C,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,OAAO,CAC7B,GAAG,EAAE,CAAC,CAAC;QACN,eAAe,EAAE,qBAAqB;QACtC,WAAW;QACX,YAAY;QACZ,aAAa;QACb,gBAAgB,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,0BAA0B,EAAE;KAClE,CAAC,EACF,CAAC,qBAAqB,EAAE,WAAW,CAAC,CACpC,CAAC;IAEF,OAAO,CACN,oBAAC,YAAY,IACZ,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,IAAI,GACT,CACF,CAAC;AACH,CAAC,CAAC"}
|
package/cli/dist/app.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type Network } from './types';
|
|
2
3
|
type Props = {
|
|
3
4
|
accountId?: string;
|
|
4
5
|
privateKey?: string;
|
|
5
|
-
network?:
|
|
6
|
+
network?: Network;
|
|
6
7
|
openAIApiKey?: string;
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
@@ -14,3 +15,4 @@ type Props = {
|
|
|
14
15
|
*/
|
|
15
16
|
export default function App({ accountId, privateKey, network, openAIApiKey, }: Props): React.JSX.Element;
|
|
16
17
|
export {};
|
|
18
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,SAAS,CAAC;AAErC,KAAK,KAAK,GAAG;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAIF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAC3B,SAAS,EACT,UAAU,EACV,OAAmB,EACnB,YAAY,GACZ,EAAE,KAAK,qBASP"}
|
package/cli/dist/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CLIApp } from './CLIApp
|
|
2
|
+
import { CLIApp } from './CLIApp';
|
|
3
3
|
process.setMaxListeners(20);
|
|
4
4
|
/**
|
|
5
5
|
* Main App component for the Hashgraph Online Conversational Agent CLI
|
|
@@ -11,3 +11,4 @@ process.setMaxListeners(20);
|
|
|
11
11
|
export default function App({ accountId, privateKey, network = 'testnet', openAIApiKey, }) {
|
|
12
12
|
return (React.createElement(CLIApp, { accountId: accountId, privateKey: privateKey, network: network, openAIApiKey: openAIApiKey }));
|
|
13
13
|
}
|
|
14
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAUhC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAC3B,SAAS,EACT,UAAU,EACV,OAAO,GAAG,SAAS,EACnB,YAAY,GACL;IACP,OAAO,CACN,oBAAC,MAAM,IACN,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,GACzB,CACF,CAAC;AACH,CAAC"}
|
package/cli/dist/cli.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":""}
|
package/cli/dist/cli.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { render } from 'ink';
|
|
4
4
|
import meow from 'meow';
|
|
5
|
-
import App from './app
|
|
5
|
+
import App from './app';
|
|
6
|
+
import { runHeadless } from './headless-runner';
|
|
6
7
|
const cli = meow(`
|
|
7
8
|
Usage
|
|
8
9
|
$ conversational-agent
|
|
@@ -12,6 +13,7 @@ const cli = meow(`
|
|
|
12
13
|
--private-key Private key for the account
|
|
13
14
|
--network Network to connect to (mainnet or testnet) [default: testnet]
|
|
14
15
|
--openai-api-key OpenAI API key for the LLM
|
|
16
|
+
--command Execute a single command in headless mode
|
|
15
17
|
|
|
16
18
|
Examples
|
|
17
19
|
$ conversational-agent
|
|
@@ -45,7 +47,41 @@ const cli = meow(`
|
|
|
45
47
|
type: 'string',
|
|
46
48
|
default: process.env['OPENAI_API_KEY'] || '',
|
|
47
49
|
},
|
|
50
|
+
command: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
default: '',
|
|
53
|
+
},
|
|
48
54
|
},
|
|
49
55
|
});
|
|
50
|
-
const
|
|
51
|
-
|
|
56
|
+
const commandInput = (cli.flags.command || cli.input.join(' ')).trim();
|
|
57
|
+
const shouldRunHeadless = commandInput.length > 0 || !process.stdin.isTTY;
|
|
58
|
+
const parseNetwork = (value) => value === 'mainnet' ? 'mainnet' : 'testnet';
|
|
59
|
+
const selectedNetwork = parseNetwork(cli.flags.network);
|
|
60
|
+
if (shouldRunHeadless) {
|
|
61
|
+
(async () => {
|
|
62
|
+
try {
|
|
63
|
+
const result = await runHeadless({
|
|
64
|
+
accountId: cli.flags.accountId,
|
|
65
|
+
privateKey: cli.flags.privateKey,
|
|
66
|
+
network: selectedNetwork,
|
|
67
|
+
openAIApiKey: cli.flags.openaiApiKey,
|
|
68
|
+
command: commandInput,
|
|
69
|
+
});
|
|
70
|
+
if (result.stdout) {
|
|
71
|
+
const output = result.stdout.endsWith('\n') ? result.stdout : `${result.stdout}\n`;
|
|
72
|
+
process.stdout.write(output);
|
|
73
|
+
}
|
|
74
|
+
process.exit(result.exitCode);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
78
|
+
process.stderr.write(`${message}\n`);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
})();
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
const { waitUntilExit } = render(React.createElement(App, { accountId: cli.flags.accountId, privateKey: cli.flags.privateKey, network: selectedNetwork, openAIApiKey: cli.flags.openaiApiKey }));
|
|
85
|
+
waitUntilExit().then(() => process.exit(0));
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,KAAK,CAAC;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AE,GAAG,CAAC,KAAK,CAAC,UAAU,EAChC,OAAO,EAAE,eAAe,EACxB,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,YAAY,GACnC,CACF,CAAC;IAEF,aAAa,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type Config, type Message } from '../types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Props for the ChatScreen component
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
interface ChatScreenProps {
|
|
7
7
|
config: Config;
|
|
8
8
|
messages: Message[];
|
|
9
9
|
input: string;
|
|
@@ -12,4 +12,10 @@ export declare const ChatScreen: React.FC<{
|
|
|
12
12
|
sendMessage: (message: string) => void;
|
|
13
13
|
showLogs: boolean;
|
|
14
14
|
logs: string[];
|
|
15
|
-
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Chat screen component
|
|
18
|
+
*/
|
|
19
|
+
export declare const ChatScreen: React.FC<ChatScreenProps>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=ChatScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatScreen.d.ts","sourceRoot":"","sources":["../../src/components/ChatScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAe,KAAK,MAAM,EAAE,KAAK,OAAO,EAAC,MAAM,UAAU,CAAC;AAEjE;;GAEG;AACH,UAAU,eAAe;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsHhD,CAAC"}
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
3
|
import TextInput from 'ink-text-input';
|
|
4
4
|
import Spinner from 'ink-spinner';
|
|
5
|
-
import { TerminalWindow } from './TerminalWindow
|
|
6
|
-
import { StatusBadge } from './StatusBadge
|
|
7
|
-
import { BRAND_COLORS } from '../types
|
|
5
|
+
import { TerminalWindow } from './TerminalWindow';
|
|
6
|
+
import { StatusBadge } from './StatusBadge';
|
|
7
|
+
import { BRAND_COLORS } from '../types';
|
|
8
8
|
/**
|
|
9
9
|
* Chat screen component
|
|
10
10
|
*/
|
|
@@ -37,3 +37,4 @@ export const ChatScreen = React.memo(({ config, messages, input, isLoading, setI
|
|
|
37
37
|
React.createElement(Box, { marginTop: 1, paddingX: 1 },
|
|
38
38
|
React.createElement(Text, { dimColor: true }, "Ctrl+C to exit, ESC to return to menu, L to toggle logs")))));
|
|
39
39
|
});
|
|
40
|
+
//# sourceMappingURL=ChatScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../src/components/ChatScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC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AAG;gBACH,oBAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG;gBACvB,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,qBAAuB,CACxD,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM;gBACpC,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,SAAW;gBAC1C,oBAAC,GAAG,IAAC,QAAQ,EAAE,CAAC;oBACf,oBAAC,SAAS,IACT,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,WAAW,EACrB,WAAW,EAAC,sBAAsB,GACjC,CACG,CACD,CACN,CACI;YACN,oBAAC,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;gBAC7B,oBAAC,IAAI,IAAC,QAAQ,oEAEP,CACF,CACD,CACU,CACjB,CAAC;AACH,CAAC,CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingScreen.d.ts","sourceRoot":"","sources":["../../src/components/LoadingScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAiBjC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { Box, Text, useStdout } from 'ink';
|
|
3
3
|
import Spinner from 'ink-spinner';
|
|
4
|
-
import { BRAND_COLORS } from '../types
|
|
4
|
+
import { BRAND_COLORS } from '../types';
|
|
5
5
|
export const LoadingScreen = () => {
|
|
6
6
|
const { write } = useStdout();
|
|
7
7
|
useEffect(() => {
|
|
@@ -14,3 +14,4 @@ export const LoadingScreen = () => {
|
|
|
14
14
|
React.createElement(Text, { color: BRAND_COLORS.green }, "Agent...")),
|
|
15
15
|
React.createElement(Spinner, { type: "dots" })));
|
|
16
16
|
};
|
|
17
|
+
//# sourceMappingURL=LoadingScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingScreen.js","sourceRoot":"","sources":["../../src/components/LoadingScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAC,MAAM,KAAK,CAAC;AACzC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAa,GAAG,EAAE;IAC3C,MAAM,EAAC,KAAK,EAAC,GAAG,SAAS,EAAE,CAAC;IAE5B,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,CAAC,CAAC;IAChB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACN,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC;QAC1D,oBAAC,GAAG,IAAC,YAAY,EAAE,CAAC;YACnB,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,IAAI,oBAAsB;YACpD,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,MAAM,sBAAwB;YACxD,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,eAAiB,CAC3C;QACN,oBAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG,CAClB,CACN,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type Screen } from '../types';
|
|
3
|
-
import { type MCPServerConfig } from '@hashgraphonline/conversational-agent';
|
|
2
|
+
import { type Screen, type MCPServerConfig } from '../types';
|
|
4
3
|
interface MCPConfig {
|
|
5
4
|
enableFilesystem: boolean;
|
|
6
5
|
filesystemPath: string;
|
|
@@ -26,3 +25,4 @@ interface Props {
|
|
|
26
25
|
*/
|
|
27
26
|
export declare const MCPConfigScreen: React.FC<Props>;
|
|
28
27
|
export {};
|
|
28
|
+
//# sourceMappingURL=MCPConfigScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MCPConfigScreen.d.ts","sourceRoot":"","sources":["../../src/components/MCPConfigScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,eAAe,EAErB,MAAM,UAAU,CAAC;AAElB,UAAU,SAAS;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAuCD,UAAU,KAAK;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,cAAc,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IACrD,0BAA0B,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gBAAgB,EAAE,MAAM,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAsO3C,CAAC"}
|