a2acalling 0.6.60 → 0.6.62
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/.a2a-manifest.json +70 -0
- package/.claude/a2a-skill-reference.md +462 -0
- package/.claude/commands/a2a-app.md +42 -0
- package/.claude/commands/a2a-call.md +26 -0
- package/.claude/commands/a2a-contacts.md +31 -0
- package/.claude/commands/a2a-conversations.md +47 -0
- package/.claude/commands/a2a-gui.md +30 -0
- package/.claude/commands/a2a-invite.md +63 -0
- package/.claude/commands/a2a-setup.md +30 -0
- package/.claude/commands/a2a-skills.md +27 -0
- package/.claude/commands/a2a-status.md +46 -0
- package/.claude/commands/a2a-uninstall.md +36 -0
- package/.claude/commands/a2a-update.md +41 -0
- package/ARCHITECTURE.md +92 -0
- package/CONVENTIONS.md +78 -0
- package/docs/plans/2026-02-18-a2a-42-e2e-persistence.md +879 -0
- package/package.json +1 -1
- package/scripts/run-e2e.sh +44 -0
- package/src/dashboard/public/app.js +97 -0
- package/src/dashboard/public/index.html +22 -0
- package/src/routes/dashboard.js +42 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Open the A2A dashboard in browser or native app
|
|
3
|
+
allowed-tools: [Bash]
|
|
4
|
+
argument-hint: [--tab contacts|calls|logs|settings|invites]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Open the A2A Calling dashboard. Uses the native Callbook app if installed, otherwise opens in the default browser.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/a2a-gui # open dashboard
|
|
13
|
+
/a2a-gui --tab contacts # open specific tab
|
|
14
|
+
/a2a-gui --tab calls # open calls tab
|
|
15
|
+
/a2a-gui --tab logs # open logs tab
|
|
16
|
+
/a2a-gui --tab settings # open settings tab
|
|
17
|
+
/a2a-gui --tab invites # open invites tab
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Instructions
|
|
21
|
+
|
|
22
|
+
Run the dashboard command with any arguments:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
a2a gui $ARGUMENTS
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
If it fails because the server is not running, suggest `/a2a-setup` to start it.
|
|
29
|
+
|
|
30
|
+
Tell the user the dashboard URL (typically `http://127.0.0.1:<port>/dashboard/`) so they can also bookmark it.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create or revoke A2A invite tokens for sharing with other agents
|
|
3
|
+
allowed-tools: [Bash]
|
|
4
|
+
argument-hint: [name] [--tier public|friends|family] [--expires 7d] | revoke <id>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Create an A2A federation token and display the invite URL, or revoke an existing token.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
### Create invite
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/a2a-invite Alice --tier friends --expires 7d
|
|
15
|
+
/a2a-invite "Bob's Agent" --tier public
|
|
16
|
+
/a2a-invite # interactive — uses defaults
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Revoke invite
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/a2a-invite revoke <token_id> # revoke a specific token
|
|
23
|
+
/a2a-invite list # list active tokens to find IDs
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
### Create flow
|
|
29
|
+
|
|
30
|
+
Parse the user's arguments and run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
a2a create $ARGUMENTS
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If no arguments provided, run `a2a create` with no flags (interactive mode).
|
|
37
|
+
|
|
38
|
+
After success, display the invite URL prominently and explain:
|
|
39
|
+
1. The URL format: `a2a://<hostname>/<token>`
|
|
40
|
+
2. Share this URL with the other agent's owner
|
|
41
|
+
3. The token tier controls what the caller can access (public = read-only, friends = calendar/email/search read, family = full access)
|
|
42
|
+
4. The token expires per the `--expires` flag (default: never)
|
|
43
|
+
|
|
44
|
+
Also suggest: "Run `/a2a-contacts` to see who already has access."
|
|
45
|
+
|
|
46
|
+
### Revoke flow
|
|
47
|
+
|
|
48
|
+
If the first argument is `revoke`:
|
|
49
|
+
|
|
50
|
+
1. If a token ID is provided: `a2a revoke <id>`
|
|
51
|
+
2. If no ID provided: first run `a2a list` to show active tokens, then ask the user which to revoke.
|
|
52
|
+
|
|
53
|
+
**Always confirm before revoking:** "This will permanently invalidate token <id>. The holder will no longer be able to call you. Proceed?"
|
|
54
|
+
|
|
55
|
+
### List flow
|
|
56
|
+
|
|
57
|
+
If the first argument is `list`:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
a2a list
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Show active tokens with their IDs, names, tiers, and expiry dates.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Set up A2A Calling — onboard, start server, configure agent
|
|
3
|
+
allowed-tools: [Bash, Read, Write]
|
|
4
|
+
argument-hint: [--force]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Set up or reset your A2A Calling installation. Runs onboarding, starts the server, and configures your agent.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/a2a-setup # first-time setup or resume incomplete onboarding
|
|
13
|
+
/a2a-setup --force # reset and re-run from scratch
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
1. Check if already onboarded: `a2a config --show`
|
|
19
|
+
2. If not onboarded (or `--force`): run `a2a quickstart $ARGUMENTS`
|
|
20
|
+
3. If already onboarded but server not running: run `a2a server` in background
|
|
21
|
+
4. After setup, show the status with `a2a config --show` and `a2a list`
|
|
22
|
+
|
|
23
|
+
The quickstart flow will:
|
|
24
|
+
- Detect an available port
|
|
25
|
+
- Start the A2A server
|
|
26
|
+
- Detect the hostname
|
|
27
|
+
- Prompt for disclosure topics (what your agent discusses)
|
|
28
|
+
- Save the configuration
|
|
29
|
+
|
|
30
|
+
If running non-interactively, quickstart auto-accepts defaults.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Reinstall A2A skill files into current project
|
|
3
|
+
allowed-tools: [Bash]
|
|
4
|
+
argument-hint: [--check|--force]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Reinstall or check A2A slash-command skill files in the current project.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/a2a-skills # reinstall skill files (skips unchanged)
|
|
13
|
+
/a2a-skills --check # check which files are installed vs missing
|
|
14
|
+
/a2a-skills --force # force reinstall all files
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Instructions
|
|
18
|
+
|
|
19
|
+
Run the skills command with the user's arguments:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
a2a skills $ARGUMENTS
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Show the result: which files were installed, skipped (already up to date), or had errors.
|
|
26
|
+
|
|
27
|
+
If files were reinstalled, suggest reloading Claude Code to pick up the new slash commands.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Check A2A server status, active conversations, version, and agent health
|
|
3
|
+
allowed-tools: [Bash, Read]
|
|
4
|
+
argument-hint: [--version]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Check the health of your A2A installation — server running, conversations active, contacts online, version info.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/a2a-status # full status dashboard
|
|
13
|
+
/a2a-status --version # show version only
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
### Version only
|
|
19
|
+
|
|
20
|
+
If `--version` is specified:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
a2a version
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Show the version and exit.
|
|
27
|
+
|
|
28
|
+
### Full status (default)
|
|
29
|
+
|
|
30
|
+
Run these commands and compile a status report:
|
|
31
|
+
|
|
32
|
+
1. **Version:** `a2a version`
|
|
33
|
+
2. **Config:** `a2a config --show`
|
|
34
|
+
3. **Active tokens:** `a2a list`
|
|
35
|
+
4. **Contacts:** `a2a contacts`
|
|
36
|
+
5. **Recent conversations:** `a2a conversations --limit 5`
|
|
37
|
+
|
|
38
|
+
Present a clear status dashboard:
|
|
39
|
+
- Version: current version number
|
|
40
|
+
- Server: running/stopped (with port and hostname)
|
|
41
|
+
- Tokens: N active, N expired/revoked
|
|
42
|
+
- Contacts: N total
|
|
43
|
+
- Recent calls: last 5 conversations with status
|
|
44
|
+
|
|
45
|
+
If the server is not running, suggest `/a2a-setup` to start it.
|
|
46
|
+
If not onboarded, suggest `/a2a-setup` for first-time setup.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Uninstall A2A Calling — stop server and remove config
|
|
3
|
+
allowed-tools: [Bash, Read]
|
|
4
|
+
argument-hint: [--keep-config]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Uninstall A2A Calling. Stops the server, removes skill files, and optionally removes configuration.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/a2a-uninstall # uninstall with confirmation
|
|
13
|
+
/a2a-uninstall --keep-config # uninstall but preserve config files
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
**This is a destructive operation. Always confirm with the user before proceeding.**
|
|
19
|
+
|
|
20
|
+
1. Show the user what will be removed:
|
|
21
|
+
- Running A2A server (will be stopped)
|
|
22
|
+
- Skill files in `.claude/commands/a2a-*.md`
|
|
23
|
+
- CLAUDE.md A2A section
|
|
24
|
+
- `.codex/AGENTS.md`
|
|
25
|
+
- Config at `~/.config/openclaw/a2a-config.json` (unless `--keep-config`)
|
|
26
|
+
- Disclosure at `~/.config/openclaw/a2a-disclosure.json` (unless `--keep-config`)
|
|
27
|
+
|
|
28
|
+
2. Ask the user to confirm: "This will stop the A2A server and remove installed files. Proceed?"
|
|
29
|
+
|
|
30
|
+
3. If confirmed, run:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
a2a uninstall --force
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If `--keep-config` was specified, tell the user their config files were preserved and can be reused on reinstall.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Check for and install A2A updates
|
|
3
|
+
allowed-tools: [Bash]
|
|
4
|
+
argument-hint: [--check]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Check for available A2A updates and optionally install them.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/a2a-update # check for updates and install if available
|
|
13
|
+
/a2a-update --check # check only, don't install
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Instructions
|
|
17
|
+
|
|
18
|
+
1. First, check for updates:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
a2a update --check
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
2. Show the user the current version vs available version.
|
|
25
|
+
|
|
26
|
+
3. If an update is available and `--check` was NOT specified:
|
|
27
|
+
- Tell the user what version is available
|
|
28
|
+
- Ask for confirmation before updating
|
|
29
|
+
- If confirmed, run:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
a2a update
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
4. After updating, show the new version:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
a2a version
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If the user is already on the latest version, tell them so.
|
package/ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Architecture — A2A Calling
|
|
2
|
+
|
|
3
|
+
## System Overview
|
|
4
|
+
|
|
5
|
+
A2A Calling enables agent-to-agent communication across OpenClaw instances. Agents create tokens with scoped permissions, share invite URLs, and remote agents call in via HTTP.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
9
|
+
│ CLI (bin/cli.js) │
|
|
10
|
+
│ Commands: create, list, revoke, call, contacts, conversations │
|
|
11
|
+
└───────────┬──────────────────────────────────────────────────────┘
|
|
12
|
+
│
|
|
13
|
+
┌───────────▼──────────────────────────────────────────────────────┐
|
|
14
|
+
│ Express Server (src/server.js) │
|
|
15
|
+
│ ├─ /api/a2a/* → src/routes/a2a.js (inbound calls, tokens) │
|
|
16
|
+
│ ├─ /api/callbook/* → src/routes/callbook.js (callbook sync) │
|
|
17
|
+
│ └─ /dashboard/* → src/routes/dashboard.js (API + SPA) │
|
|
18
|
+
└───────────┬──────────────────────────────────────────────────────┘
|
|
19
|
+
│
|
|
20
|
+
┌───────────▼──────────────────────────────────────────────────────┐
|
|
21
|
+
│ Core Libraries (src/lib/) │
|
|
22
|
+
│ ├─ tokens.js Token CRUD, validation, tiers │
|
|
23
|
+
│ ├─ client.js A2AClient for outbound calls │
|
|
24
|
+
│ ├─ conversations.js ConversationStore (SQLite) │
|
|
25
|
+
│ ├─ conversation-driver.js Multi-turn call orchestration │
|
|
26
|
+
│ ├─ summarizer.js Call summary generation │
|
|
27
|
+
│ ├─ summary-prompt.js Unified summary prompt builder │
|
|
28
|
+
│ ├─ summary-formatter.js Format summaries for display │
|
|
29
|
+
│ ├─ disclosure.js Disclosure level enforcement │
|
|
30
|
+
│ ├─ config.js Config file management │
|
|
31
|
+
│ ├─ logger.js Structured logger (SQLite + stdout) │
|
|
32
|
+
│ ├─ call-monitor.js Active call monitoring │
|
|
33
|
+
│ ├─ callbook.js Contact/callbook management │
|
|
34
|
+
│ ├─ claude-subagent.js Claude API integration for summaries │
|
|
35
|
+
│ ├─ openclaw-integration.js OpenClaw runtime hooks │
|
|
36
|
+
│ ├─ prompt-template.js Prompt template utilities │
|
|
37
|
+
│ ├─ runtime-adapter.js Runtime mode detection (standalone/OCW) │
|
|
38
|
+
│ ├─ dashboard-events.js SSE event broadcasting │
|
|
39
|
+
│ ├─ external-ip.js External IP/hostname detection │
|
|
40
|
+
│ ├─ invite-host.js Invite URL construction │
|
|
41
|
+
│ ├─ port-scanner.js Available port detection │
|
|
42
|
+
│ ├─ pid-file.js PID file management │
|
|
43
|
+
│ ├─ turn-timeout.js Conversation turn timeout handling │
|
|
44
|
+
│ ├─ update-checker.js Version update detection │
|
|
45
|
+
│ └─ update-manager.js Self-update orchestration │
|
|
46
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Data Storage
|
|
50
|
+
|
|
51
|
+
- **Tokens**: JSON file at `~/.config/openclaw/a2a.json`
|
|
52
|
+
- **Conversations**: SQLite via `better-sqlite3` at `~/.config/openclaw/a2a-conversations.db`
|
|
53
|
+
- **Logs**: SQLite via `better-sqlite3` at `~/.config/openclaw/a2a-logs.db`
|
|
54
|
+
- **Config**: JSON at `~/.config/openclaw/a2a-config.json`
|
|
55
|
+
- **Disclosure**: JSON at `~/.config/openclaw/a2a-disclosure.json`
|
|
56
|
+
|
|
57
|
+
## Permission System
|
|
58
|
+
|
|
59
|
+
Three tiers with escalating capabilities:
|
|
60
|
+
- **public**: `context-read` only
|
|
61
|
+
- **friends**: `context-read`, `calendar.read`, `email.read`, `search`
|
|
62
|
+
- **family**: `context-read`, `calendar`, `email`, `search`, `tools`, `memory`
|
|
63
|
+
|
|
64
|
+
Three disclosure levels controlling information sharing:
|
|
65
|
+
- **public**: Shares freely within tier boundaries
|
|
66
|
+
- **minimal**: Direct answers only, no volunteered context
|
|
67
|
+
- **none**: Confirms capability, provides no information
|
|
68
|
+
|
|
69
|
+
## Dependencies
|
|
70
|
+
|
|
71
|
+
Only two runtime dependencies (intentionally minimal):
|
|
72
|
+
- `express` — HTTP server and routing
|
|
73
|
+
- `better-sqlite3` — SQLite for conversations and logs
|
|
74
|
+
|
|
75
|
+
## Dashboard
|
|
76
|
+
|
|
77
|
+
Single-page app served from `src/dashboard/public/`. Uses Shoelace web components. Communicates with the API via `/dashboard/api/*` routes. Includes tabs: Contacts, Calls, Logs, Settings, Invites, Permissions, and Health (E2E test results).
|
|
78
|
+
|
|
79
|
+
## Native macOS App
|
|
80
|
+
|
|
81
|
+
Tauri v2 app at `native/macos/` wrapping the dashboard SPA. Provides native menus, notifications, and server lifecycle management.
|
|
82
|
+
|
|
83
|
+
## Testing
|
|
84
|
+
|
|
85
|
+
Zero-dependency test runner at `test/run.js` with custom assert API. Three test tiers:
|
|
86
|
+
- `test/unit/` — Unit tests for individual modules
|
|
87
|
+
- `test/integration/` — Integration tests for multi-module flows
|
|
88
|
+
- `test/e2e/` — End-to-end tests for full system flows
|
|
89
|
+
|
|
90
|
+
Test profiles at `test/profiles/` represent real personas with distinct permission tiers.
|
|
91
|
+
|
|
92
|
+
E2E test results are persisted to `~/.config/openclaw/a2a-e2e-results.json` via `test/e2e/persist.js` and surfaced in the dashboard Health tab. The `scripts/run-e2e.sh` orchestrator runs E2E suites and stores results.
|
package/CONVENTIONS.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Conventions — A2A Calling
|
|
2
|
+
|
|
3
|
+
## Logging
|
|
4
|
+
|
|
5
|
+
Use the structured logger from `src/lib/logger.js`. Never use bare `console.log`.
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
const { createLogger } = require('./logger');
|
|
9
|
+
const logger = createLogger({ component: 'a2a.mymodule' });
|
|
10
|
+
logger.info('Something happened', { event: 'my_event', data: { key: 'val' } });
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Components follow dotted naming: `a2a.tokens`, `a2a.server`, `a2a.client`, etc.
|
|
14
|
+
|
|
15
|
+
## Error Handling
|
|
16
|
+
|
|
17
|
+
- Use the project's existing error patterns (e.g., `A2AError` from `src/lib/client.js`)
|
|
18
|
+
- Log errors with `logger.error()`, including error codes and hints
|
|
19
|
+
- HTTP responses use consistent JSON format: `{ success: false, error: { code, message } }`
|
|
20
|
+
- Do NOT create new error classes without strong justification
|
|
21
|
+
|
|
22
|
+
## Config Resolution
|
|
23
|
+
|
|
24
|
+
Config directory resolves via:
|
|
25
|
+
1. `process.env.A2A_CONFIG_DIR`
|
|
26
|
+
2. `process.env.OPENCLAW_CONFIG_DIR`
|
|
27
|
+
3. `~/.config/openclaw/`
|
|
28
|
+
|
|
29
|
+
Always use `src/lib/config.js` for config access. Do not hardcode paths.
|
|
30
|
+
|
|
31
|
+
## Testing
|
|
32
|
+
|
|
33
|
+
- Test runner: `node test/run.js` (zero-dependency, custom assert API)
|
|
34
|
+
- Test files: `*.test.js` in `test/unit/`, `test/integration/`, `test/e2e/`
|
|
35
|
+
- Test helpers: `test/helpers.js`
|
|
36
|
+
- Test profiles: `test/profiles/*.js` — real personas, not generic stubs
|
|
37
|
+
- Prefer testing through the public API of each module
|
|
38
|
+
|
|
39
|
+
## Dependencies
|
|
40
|
+
|
|
41
|
+
This project is intentionally minimal-dependency. Only two runtime deps:
|
|
42
|
+
- `express` — HTTP
|
|
43
|
+
- `better-sqlite3` — SQLite
|
|
44
|
+
|
|
45
|
+
Do NOT add new npm dependencies without explicit justification. Use Node.js built-ins.
|
|
46
|
+
|
|
47
|
+
## Module Pattern
|
|
48
|
+
|
|
49
|
+
All modules use CommonJS (`require`/`module.exports`). Each lib file exports a focused API. Large modules export a class (e.g., `TokenStore`, `ConversationStore`, `A2AClient`). Utility modules export functions.
|
|
50
|
+
|
|
51
|
+
## Naming
|
|
52
|
+
|
|
53
|
+
- Files: kebab-case (`call-monitor.js`, `dashboard-events.js`)
|
|
54
|
+
- Classes: PascalCase (`TokenStore`, `A2AClient`)
|
|
55
|
+
- Functions/variables: camelCase
|
|
56
|
+
- Constants: UPPER_SNAKE_CASE for true constants
|
|
57
|
+
- Token IDs: prefixed with `fed_` (federation tokens)
|
|
58
|
+
- Trace IDs: prefixed with `trace_`
|
|
59
|
+
|
|
60
|
+
## Dashboard
|
|
61
|
+
|
|
62
|
+
- Single-page app in `src/dashboard/public/`
|
|
63
|
+
- Uses Shoelace web components (`<sl-*>` elements)
|
|
64
|
+
- Communicates via fetch to `/dashboard/api/*` endpoints
|
|
65
|
+
- SSE for real-time updates via `src/lib/dashboard-events.js`
|
|
66
|
+
|
|
67
|
+
## Permission Tiers
|
|
68
|
+
|
|
69
|
+
Tokens have a tier (`public`, `friends`, `family`) and a disclosure level (`public`, `minimal`, `none`). These are enforced at the route level in `src/routes/a2a.js`.
|
|
70
|
+
|
|
71
|
+
## Anti-Patterns
|
|
72
|
+
|
|
73
|
+
- Do NOT use `console.log` — use the structured logger
|
|
74
|
+
- Do NOT add npm dependencies for things Node.js builtins handle
|
|
75
|
+
- Do NOT create new error classes — use existing patterns
|
|
76
|
+
- Do NOT hardcode config paths — use config resolution
|
|
77
|
+
- Do NOT use `var` — use `const` or `let`
|
|
78
|
+
- Do NOT use sync file I/O in request handlers (sync is OK in CLI and setup)
|