@aman_asmuei/aman-agent 0.30.0 → 0.31.0-next.1

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 CHANGED
@@ -8,7 +8,8 @@
8
8
  <h1 align="center">aman-agent</h1>
9
9
 
10
10
  <p align="center">
11
- <strong>The AI companion that actually remembers you.</strong>
11
+ <strong>The AI companion that actually remembers you.</strong><br/>
12
+ <sub>Learns from every conversation. Recalls what matters. Runs locally. Works with any LLM.</sub>
12
13
  </p>
13
14
 
14
15
  <p align="center">
@@ -16,30 +17,41 @@
16
17
  &nbsp;
17
18
  <a href="https://github.com/amanasmuei/aman-agent/actions"><img src="https://img.shields.io/github/actions/workflow/status/amanasmuei/aman-agent/ci.yml?style=for-the-badge&logo=github&label=CI" alt="CI status" /></a>
18
19
  &nbsp;
20
+ <img src="https://img.shields.io/badge/tests-429_passing-brightgreen?style=for-the-badge&logo=vitest&logoColor=white" alt="429 tests passing" />
21
+ &nbsp;
19
22
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="MIT License" /></a>
23
+ </p>
24
+
25
+ <p align="center">
26
+ <img src="https://img.shields.io/badge/node-%E2%89%A520-brightgreen?style=flat-square&logo=node.js&logoColor=white" alt="Node.js 20+" />
27
+ &nbsp;
28
+ <img src="https://img.shields.io/badge/typescript-strict-3178c6?style=flat-square&logo=typescript&logoColor=white" alt="Strict TypeScript" />
20
29
  &nbsp;
21
- <img src="https://img.shields.io/badge/node-%E2%89%A520-brightgreen?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js 20+" />
30
+ <img src="https://img.shields.io/badge/bundle-340_KB-informational?style=flat-square" alt="Bundle size: 340 KB" />
22
31
  &nbsp;
23
- <a href="https://github.com/amanasmuei/aman"><img src="https://img.shields.io/badge/part_of-aman_ecosystem-ff6b35?style=for-the-badge" alt="aman ecosystem" /></a>
32
+ <img src="https://img.shields.io/badge/LLMs-6_providers-8a2be2?style=flat-square" alt="6 LLM providers" />
33
+ &nbsp;
34
+ <a href="https://github.com/amanasmuei/aman"><img src="https://img.shields.io/badge/part_of-aman_ecosystem-ff6b35?style=flat-square" alt="aman ecosystem" /></a>
24
35
  </p>
25
36
 
26
37
  <p align="center">
27
- An AI companion that learns from every conversation, recalls relevant memories per message,<br/>
28
- extracts knowledge silently, and adapts to your time of day — all running locally.
38
+ <img src="https://raw.githubusercontent.com/amanasmuei/aman-agent/main/docs/demo/demo.gif" alt="aman-agent demo" width="760" />
29
39
  </p>
30
40
 
31
41
  <p align="center">
32
- <img src="https://raw.githubusercontent.com/amanasmuei/aman-agent/main/docs/demo/demo.gif" alt="aman-agent demo" width="720" />
42
+ <a href="#quick-start"><kbd> Quick Start </kbd></a>
43
+ <a href="#architecture-at-a-glance"><kbd> Architecture </kbd></a>
44
+ <a href="#features"><kbd> Features </kbd></a>
45
+ <a href="#commands"><kbd> Commands </kbd></a>
46
+ <a href="#supported-llms"><kbd> LLMs </kbd></a>
47
+ <a href="#the-ecosystem"><kbd> Ecosystem </kbd></a>
48
+ <a href="#faq"><kbd> FAQ </kbd></a>
33
49
  </p>
34
50
 
35
51
  <p align="center">
36
- <a href="#quick-start">Quick Start</a> &bull;
37
- <a href="#features">Features</a> &bull;
38
- <a href="#how-it-works">How It Works</a> &bull;
39
- <a href="#commands">Commands</a> &bull;
40
- <a href="#supported-llms">LLMs</a> &bull;
41
- <a href="#the-ecosystem">Ecosystem</a> &bull;
42
- <a href="#faq">FAQ</a>
52
+ <sub>
53
+ <b>Try it in 10 seconds →</b>&nbsp;&nbsp;<code>npx @aman_asmuei/aman-agent</code>
54
+ </sub>
43
55
  </p>
44
56
 
45
57
  ---
@@ -50,6 +62,7 @@
50
62
  - [What's New](#whats-new-in-v0300)
51
63
  - [The Problem](#the-problem)
52
64
  - [The Solution](#the-solution)
65
+ - [Architecture at a Glance](#architecture-at-a-glance)
53
66
  - [Quick Start](#quick-start)
54
67
  - [Usage Guide](#usage-guide)
55
68
  - [Your First Conversation](#your-first-conversation)
@@ -64,6 +77,7 @@
64
77
  - [Profiles](#your-profile-vs-agent-profiles)
65
78
  - [Delegation](#agent-delegation)
66
79
  - [Teams](#agent-teams)
80
+ - [Multi-agent (A2A)](#multi-agent-a2a)
67
81
  - [Daily Workflow](#daily-workflow-summary)
68
82
  - [Features](#features)
69
83
  - [How It Works](#how-it-works)
@@ -82,15 +96,34 @@
82
96
 
83
97
  ## What's New in v0.30.0
84
98
 
85
- > **Agent hardening — trust, durability, and insight.**
99
+ > **Agent hardening — trust, durability, insight.**<br/>
100
+ > The agent now asks before delegating, persists background tasks across crashes, and ships a real analytics dashboard in `/eval report`.
86
101
 
87
- The agent now asks before delegating, persists background task state across crashes, and gives you a real analytics dashboard in `/eval report`.
102
+ <table>
103
+ <tr>
104
+ <td width="33%" valign="top">
88
105
 
89
- | Feature | What it does |
90
- |:---|:---|
91
- | **Delegation confirmation** | Agent prompts you before executing `delegate_task` or `team_run` no silent autonomous work |
92
- | **Persistent background tasks** | Background task state saved to `~/.aman-agent/bg-tasks.json` — survives crashes, visible in `/eval report` |
93
- | **Rich `/eval report`** | Shows trust score, sentiment trend, energy distribution, burnout risk, frustration correlations, and background task stats |
106
+ **Delegation confirmation**
107
+
108
+ The agent now prompts you before executing `delegate_task` or `team_run`. No more silent autonomous sub-agents — you stay in the loop on every hand-off.
109
+
110
+ </td>
111
+ <td width="33%" valign="top">
112
+
113
+ **Persistent background tasks**
114
+
115
+ Background task state is written to `~/.aman-agent/bg-tasks.json` on every transition — survives crashes, terminal closures, and reboots. Visible in `/eval report`.
116
+
117
+ </td>
118
+ <td width="33%" valign="top">
119
+
120
+ **Rich `/eval report`**
121
+
122
+ Trust score, sentiment trend, energy distribution, burnout risk, frustration correlations, and background-task stats — all in one dashboard.
123
+
124
+ </td>
125
+ </tr>
126
+ </table>
94
127
 
95
128
  <details>
96
129
  <summary><strong>Highlights from earlier releases</strong></summary>
@@ -162,6 +195,60 @@ npx @aman_asmuei/aman-agent
162
195
 
163
196
  ---
164
197
 
198
+ ## Architecture at a Glance
199
+
200
+ aman-agent is the **runtime** at the center of the aman ecosystem — 38 focused TypeScript modules that stitch together 7 portable memory/identity/skill layers with any LLM you want.
201
+
202
+ ```mermaid
203
+ flowchart LR
204
+ User([You]) <--> CLI[aman-agent CLI<br/>chat loop]
205
+
206
+ CLI --> Agent[agent.ts<br/>message orchestration]
207
+ Agent --> Hooks[hooks.ts<br/>lifecycle events]
208
+
209
+ Agent -->|recall &amp; extract| Memory[(amem-core<br/>SQLite + vectors)]
210
+ Agent -->|who &amp; prefs| Identity[(acore-core<br/>identity)]
211
+ Agent -->|boundaries| Rules[(arules-core<br/>guardrails)]
212
+ Agent -->|auto-trigger| Skills[skill-engine<br/>+ crystallization]
213
+ Agent -->|telemetry| Obs[observation<br/>+ postmortem]
214
+
215
+ Agent --> LLM{LLM Router}
216
+ LLM --> Claude[Anthropic]
217
+ LLM --> GPT[OpenAI]
218
+ LLM --> Copilot[GH Copilot]
219
+ LLM --> Ollama[Ollama local]
220
+
221
+ Agent <--> MCP[MCP tools<br/>aman-mcp · amem]
222
+
223
+ classDef core fill:#58a6ff22,stroke:#58a6ff,color:#e6edf3,stroke-width:2px;
224
+ classDef store fill:#3fb95022,stroke:#3fb950,color:#e6edf3,stroke-width:2px;
225
+ classDef llm fill:#d29f2222,stroke:#d29f22,color:#e6edf3,stroke-width:1px;
226
+ class CLI,Agent,Hooks,Skills,Obs core
227
+ class Memory,Identity,Rules store
228
+ class Claude,GPT,Copilot,Ollama,LLM llm
229
+ ```
230
+
231
+ <details>
232
+ <summary><strong>How the pieces work together</strong></summary>
233
+
234
+ | Piece | What it does | Where it lives |
235
+ |:---|:---|:---|
236
+ | `agent.ts` | The main event loop — reads your message, recalls memories, streams the LLM response, executes tools, extracts new memories | `src/agent.ts` (40 KB) |
237
+ | `commands.ts` | 58+ slash commands (`/memory`, `/skills`, `/plan`, `/delegate`, `/eval`, `/observe`, `/postmortem`, …) | `src/commands.ts` (98 KB) |
238
+ | `hooks.ts` | 5 lifecycle hooks that fire at startup, before/after tools, on workflow match, on session end | `src/hooks.ts` (26 KB) |
239
+ | `memory.ts` + `memory-extractor.ts` | Per-message recall and silent, non-blocking extraction of preferences, decisions, patterns, corrections | delegates to `@aman_asmuei/amem-core@0.5` |
240
+ | `skill-engine.ts` + `crystallization.ts` | Auto-triggers domain skills from context; promotes post-mortem lessons into reusable, versioned skills | `src/skill-engine.ts`, `src/crystallization.ts` |
241
+ | `user-model.ts` + `personality.ts` | Cross-session trust (EMA), sentiment baseline, burnout risk, time-of-day tone shifts, wellbeing nudges | `src/user-model.ts`, `src/personality.ts` |
242
+ | `observation.ts` + `postmortem.ts` | Passive session telemetry + LLM-generated structured post-mortems on session end | `src/observation.ts`, `src/postmortem.ts` |
243
+ | `llm/` | 6 pluggable providers — Anthropic, OpenAI, Ollama, GitHub Copilot, OpenAI-compatible, Claude Code CLI | `src/llm/` |
244
+ | `mcp/` | MCP v1.27 client with stdio transport and auto-reconnect | `src/mcp/` |
245
+
246
+ **Stateless by default.** All state lives in `~/.acore`, `~/.arules`, `~/.aflow`, `~/.askill`, `~/.aeval`, and `~/.amem` — portable, inspectable markdown + a local SQLite file. Nothing leaves your machine except what you send to your chosen LLM.
247
+
248
+ </details>
249
+
250
+ ---
251
+
165
252
  ## Quick Start
166
253
 
167
254
  ### 1. Run
@@ -691,6 +778,62 @@ The AI auto-suggests teams when appropriate — always asks permission first.
691
778
 
692
779
  </details>
693
780
 
781
+ <details>
782
+ <summary><strong>Multi-agent (A2A)</strong> (new in v0.31)</summary>
783
+
784
+ ### Multi-agent (A2A)
785
+
786
+ Run aman-agent as a local MCP server so other aman-agent instances — on the same machine — can delegate tasks to it via the `@name` syntax. No new protocol, no new daemon, no broker — just MCP over localhost using the existing `@modelcontextprotocol/sdk` bits.
787
+
788
+ **Start a specialist agent in server mode:**
789
+
790
+ ```bash
791
+ aman-agent serve --name coder --profile coder
792
+ ✓ Ecosystem loaded
793
+ ✓ registered as @coder
794
+ ✓ port 52341 (127.0.0.1) — token is in ~/.aman-agent/registry.json
795
+ ```
796
+
797
+ Leave it running. The process binds an ephemeral localhost port and writes its `{name, pid, port, token}` into `~/.aman-agent/registry.json` (mode `0600`). On `SIGINT`/`SIGTERM` it cleans up the registry entry.
798
+
799
+ **From another aman-agent instance, delegate to it:**
800
+
801
+ ```
802
+ You > /agents list
803
+
804
+ Running agents:
805
+ @coder coder pid=4512 port=52341 up 34s
806
+
807
+ You > /delegate @coder Refactor src/auth.ts to use async/await
808
+
809
+ [delegating to @coder...]
810
+ ✓ @coder completed in 12.4s
811
+ ...
812
+ ```
813
+
814
+ **Commands:**
815
+
816
+ | Command | What it does |
817
+ |:---|:---|
818
+ | `aman-agent serve --name X --profile Y` | Run as a local A2A server |
819
+ | `/agents list` | Show running agents on this machine |
820
+ | `/agents info <name>` | Call `agent.info` MCP tool on the named agent |
821
+ | `/agents ping <name>` | Bearer-authed `/health` latency check |
822
+ | `/delegate @<name> <task>` | Delegate via MCP to another running agent |
823
+
824
+ **How it works:** Each `serve` process binds an ephemeral localhost port, mounts an MCP `StreamableHTTPServerTransport`, and writes its `{name, profile, pid, port, token}` into `~/.aman-agent/registry.json` (mode `0600`). The calling agent looks up the target in the registry, dials via `StreamableHTTPClientTransport` with the bearer token, and invokes the `agent.delegate` MCP tool. Three tools are exposed on every `serve` instance: `agent.info`, `agent.delegate`, `agent.send`.
825
+
826
+ **Trust model:** Same-user, same-machine. OS file permissions on `~/.aman-agent/registry.json` are the trust boundary — if you can read the registry, you know the tokens. Cross-machine A2A is a future addition; it will need explicit auth and is out of scope for v0.31.
827
+
828
+ **Known limitations (v0.31):**
829
+
830
+ - **Event-loop leak on `delegateRemote`** — the MCP SDK's `StreamableHTTPClientTransport` keeps an internal resource alive after `close()` / `terminateSession()`, so a Node script that calls `delegateTask("@name", ...)` and expects clean exit must call `process.exit(0)` explicitly. The interactive REPL is unaffected (it exits via `/quit`). Follow-up investigation planned.
831
+ - **No cross-machine A2A** — registry is a local JSON file; LAN/remote agents not supported yet.
832
+ - **`agent.send` is in-memory only** — messages are lost if the target agent crashes before draining them.
833
+ - **No proactive push to humans** — delivering a message to Telegram/Discord/etc. is `achannel`'s job, not aman-agent's.
834
+
835
+ </details>
836
+
694
837
  <details>
695
838
  <summary><strong>Session Telemetry & Post-Mortems</strong> (new in v0.24)</summary>
696
839
 
@@ -987,59 +1130,92 @@ On session end, if any smart trigger fires (≥3 tool errors, ≥2 blockers, &gt
987
1130
 
988
1131
  ## How It Works
989
1132
 
1133
+ ### Per-message flow
1134
+
1135
+ ```mermaid
1136
+ sequenceDiagram
1137
+ autonumber
1138
+ participant U as You
1139
+ participant A as aman-agent
1140
+ participant M as amem (memory)
1141
+ participant L as LLM
1142
+ participant T as MCP tools
1143
+
1144
+ U->>A: your message
1145
+ A->>M: semantic recall (top 5)
1146
+ M-->>A: compact index (~50–100 tok)
1147
+ A->>A: build prompt: identity + rules + skills + memories
1148
+ A->>L: stream request
1149
+ L-->>A: response + tool calls
1150
+ par parallel execution
1151
+ A->>T: tool call 1 (guardrail-checked)
1152
+ and
1153
+ A->>T: tool call 2 (guardrail-checked)
1154
+ end
1155
+ T-->>A: results
1156
+ A-->>U: streamed response
1157
+ A->>M: extract memories (non-blocking)
1158
+ A->>A: update user model + sentiment + skills
1159
+ ```
1160
+
1161
+ <details>
1162
+ <summary><strong>ASCII version (for terminals / no-Mermaid viewers)</strong></summary>
1163
+
990
1164
  ```
991
1165
  ┌───────────────────────────────────────────────────────────┐
992
1166
  │ Your Terminal │
993
-
994
- │ You > tell me about our auth decisions
995
-
996
- │ [recalling memories...]
997
- │ Agent > Based on your previous decisions:
998
- │ - OAuth2 with PKCE (decided 2 weeks ago)
999
- │ - JWT for API tokens...
1000
-
1001
- │ [1 memory stored]
1167
+
1168
+ │ You > tell me about our auth decisions
1169
+
1170
+ │ [recalling memories...]
1171
+ │ Agent > Based on your previous decisions:
1172
+ │ - OAuth2 with PKCE (decided 2 weeks ago)
1173
+ │ - JWT for API tokens...
1174
+
1175
+ │ [1 memory stored]
1002
1176
  └──────────────────────┬────────────────────────────────────┘
1003
1177
 
1004
1178
  ┌──────────────────────▼────────────────────────────────────┐
1005
- │ aman-agent runtime
1006
-
1007
- │ On Startup
1008
- │ ┌────────────────────────────────────────────────┐
1009
- │ │ 1. Load ecosystem (identity, tools, rules...) │
1010
- │ │ 2. Connect MCP servers (aman-mcp + amem) │
1011
- │ │ 3. Consolidate memory (merge/prune/promote) │
1012
- │ │ 4. Check reminders (overdue/today/upcoming) │
1013
- │ │ 5. Inject time context (morning/evening/...) │
1014
- │ │ 6. Recall session context from memory │
1015
- │ └────────────────────────────────────────────────┘
1016
-
1017
- │ Per Message
1018
- │ ┌────────────────────────────────────────────────┐
1019
- │ │ 1. Semantic memory recall (top 5 relevant) │
1020
- │ │ 2. Augment system prompt with memories │
1021
- │ │ 3. Stream LLM response (with retry) │
1022
- │ │ 4. Execute tools in parallel (with guardrails) │
1023
- │ │ 5. Extract memories from response │
1024
- │ │ - Auto-store: preferences, facts, patterns │
1025
- │ │ - All types auto-stored silently
1026
- │ └────────────────────────────────────────────────┘
1027
-
1028
- │ Context Management
1029
- │ ┌────────────────────────────────────────────────┐
1030
- │ │ Auto-trim at 80K tokens │
1031
- │ │ LLM-powered summarization (not truncation) │
1032
- │ │ Fallback to text preview if LLM call fails │
1033
- │ └────────────────────────────────────────────────┘
1034
-
1035
- │ MCP Integration
1036
- │ ┌────────────────────────────────────────────────┐
1037
- │ │ aman-mcp → identity, tools, workflows, eval │
1038
- │ │ amem → memory, knowledge graph, reminders
1039
- │ └────────────────────────────────────────────────┘
1179
+ │ aman-agent runtime
1180
+
1181
+ │ On Startup
1182
+ │ ┌────────────────────────────────────────────────┐
1183
+ │ │ 1. Load ecosystem (identity, tools, rules...) │
1184
+ │ │ 2. Connect MCP servers (aman-mcp + amem) │
1185
+ │ │ 3. Consolidate memory (merge/prune/promote) │
1186
+ │ │ 4. Check reminders (overdue/today/upcoming) │
1187
+ │ │ 5. Inject time context (morning/evening/...) │
1188
+ │ │ 6. Recall session context from memory │
1189
+ │ └────────────────────────────────────────────────┘
1190
+
1191
+ │ Per Message
1192
+ │ ┌────────────────────────────────────────────────┐
1193
+ │ │ 1. Semantic memory recall (top 5 relevant) │
1194
+ │ │ 2. Augment system prompt with memories │
1195
+ │ │ 3. Stream LLM response (with retry) │
1196
+ │ │ 4. Execute tools in parallel (with guardrails) │
1197
+ │ │ 5. Extract memories from response │
1198
+ │ │ - Auto-store: preferences, facts, patterns │
1199
+ │ │ - All types auto-stored silently
1200
+ │ └────────────────────────────────────────────────┘
1201
+
1202
+ │ Context Management
1203
+ │ ┌────────────────────────────────────────────────┐
1204
+ │ │ Auto-trim at 80K tokens │
1205
+ │ │ LLM-powered summarization (not truncation) │
1206
+ │ │ Fallback to text preview if LLM call fails │
1207
+ │ └────────────────────────────────────────────────┘
1208
+
1209
+ │ MCP Integration
1210
+ │ ┌────────────────────────────────────────────────┐
1211
+ │ │ aman-mcp → identity, tools, workflows, eval │
1212
+ │ │ amem → memory, knowledge graph, reminders│
1213
+ │ └────────────────────────────────────────────────┘
1040
1214
  └───────────────────────────────────────────────────────────┘
1041
1215
  ```
1042
1216
 
1217
+ </details>
1218
+
1043
1219
  ### Session Lifecycle
1044
1220
 
1045
1221
  | Phase | What happens |
@@ -1060,6 +1236,7 @@ On session end, if any smart trigger fires (≥3 tool errors, ≥2 blockers, &gt
1060
1236
  | `/plan` | Show active plan `[create\|done\|undo\|list\|switch\|show]` |
1061
1237
  | `/profile` | Your profile + agent profiles `[me\|edit\|setup\|create\|list\|show\|delete]` |
1062
1238
  | `/delegate` | Delegate task to a profile `[<profile> <task>\|pipeline]` |
1239
+ | `/agents` | Multi-agent A2A `[list\|info <name>\|ping <name>]` |
1063
1240
  | `/team` | Manage agent teams `[create\|run\|list\|show\|delete]` |
1064
1241
  | `/identity` | View identity `[update <section>]` `[dynamics [--json\|--reset]]` |
1065
1242
  | `/rules` | View guardrails `[add\|remove\|toggle ...]` |
@@ -1339,16 +1516,47 @@ This usually means an MCP server crashed on startup. Run `npx @aman_asmuei/aman-
1339
1516
  ```bash
1340
1517
  git clone https://github.com/amanasmuei/aman-agent.git
1341
1518
  cd aman-agent && npm install
1342
- npm run build # zero errors
1343
- npm test # 304 tests pass
1519
+
1520
+ npm run lint # tsc --noEmit — strict TypeScript, zero errors
1521
+ npm run build # tsup → 340 KB ESM bundle
1522
+ npm test # vitest run — 429 tests across 21 files
1344
1523
  ```
1345
1524
 
1346
1525
  PRs welcome. See [Issues](https://github.com/amanasmuei/aman-agent/issues).
1347
1526
 
1348
1527
  **Project standards:**
1349
- - All new modules ship with tests (TDD encouraged)
1350
- - Type errors block merge — `npm run build` must be clean
1351
- - Commits follow conventional format (`feat:`, `fix:`, `chore:`, `docs:`)
1528
+
1529
+ | Standard | Enforced by |
1530
+ |:---|:---|
1531
+ | All new modules ship with tests (TDD encouraged) | code review |
1532
+ | Type errors block merge | `npm run lint` in CI |
1533
+ | Build must be clean | `npm run build` in CI |
1534
+ | Commits follow conventional format (`feat:`, `fix:`, `chore:`, `docs:`) | commit history |
1535
+ | No MCP round-trips for read paths — use `@aman_asmuei/*-core` libraries directly | Engine v1 convention |
1536
+
1537
+ <details>
1538
+ <summary><strong>Repo layout</strong></summary>
1539
+
1540
+ ```
1541
+ aman-agent/
1542
+ ├── src/
1543
+ │ ├── agent.ts main event loop (40 KB)
1544
+ │ ├── commands.ts 58+ slash commands (98 KB)
1545
+ │ ├── hooks.ts lifecycle hooks (26 KB)
1546
+ │ ├── memory.ts / memory-extractor.ts
1547
+ │ ├── skill-engine.ts / crystallization.ts
1548
+ │ ├── user-model.ts / personality.ts / postmortem.ts
1549
+ │ ├── observation.ts / onboarding.ts / background.ts
1550
+ │ ├── delegate.ts / teams.ts / plans.ts
1551
+ │ ├── llm/ 6 provider implementations
1552
+ │ ├── mcp/ MCP client (stdio + auto-reconnect)
1553
+ │ └── layers/ ecosystem parsers
1554
+ ├── test/ 21 test files, 429 tests
1555
+ ├── bin/aman-agent.js CLI entry point
1556
+ └── dist/ built bundle (tsup)
1557
+ ```
1558
+
1559
+ </details>
1352
1560
 
1353
1561
  ---
1354
1562
 
@@ -0,0 +1,18 @@
1
+ import { DelegationResult } from './delegate.js';
2
+
3
+ interface RemoteDelegateOptions {
4
+ context?: string;
5
+ timeoutMs?: number;
6
+ }
7
+ /**
8
+ * Dial another aman-agent running as an A2A server on the same machine
9
+ * and run a task through its `agent.delegate` MCP tool. Returns a
10
+ * DelegationResult matching the shape of the local `delegateTask` so
11
+ * callers can treat local and remote delegation uniformly.
12
+ *
13
+ * Trust model: same user, same machine — bearer comes from the local
14
+ * registry file (mode 0600). See plan docs for the broader discussion.
15
+ */
16
+ declare function delegateRemote(task: string, agentName: string, options?: RemoteDelegateOptions): Promise<DelegationResult>;
17
+
18
+ export { type RemoteDelegateOptions, delegateRemote };