agent-relay 2.0.17 → 2.0.18

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.
Files changed (101) hide show
  1. package/deploy/workspace/entrypoint.sh +35 -19
  2. package/deploy/workspace/git-credential-relay +82 -7
  3. package/dist/dashboard/out/404.html +1 -1
  4. package/dist/dashboard/out/app/onboarding.html +1 -1
  5. package/dist/dashboard/out/app/onboarding.txt +1 -1
  6. package/dist/dashboard/out/app.html +1 -1
  7. package/dist/dashboard/out/app.txt +1 -1
  8. package/dist/dashboard/out/cloud/link.html +1 -1
  9. package/dist/dashboard/out/cloud/link.txt +1 -1
  10. package/dist/dashboard/out/complete-profile.html +1 -1
  11. package/dist/dashboard/out/complete-profile.txt +1 -1
  12. package/dist/dashboard/out/connect-repos.html +1 -1
  13. package/dist/dashboard/out/connect-repos.txt +1 -1
  14. package/dist/dashboard/out/history.html +1 -1
  15. package/dist/dashboard/out/history.txt +1 -1
  16. package/dist/dashboard/out/index.html +1 -1
  17. package/dist/dashboard/out/index.txt +1 -1
  18. package/dist/dashboard/out/login.html +1 -1
  19. package/dist/dashboard/out/login.txt +1 -1
  20. package/dist/dashboard/out/metrics.html +1 -1
  21. package/dist/dashboard/out/metrics.txt +1 -1
  22. package/dist/dashboard/out/pricing.html +1 -1
  23. package/dist/dashboard/out/pricing.txt +1 -1
  24. package/dist/dashboard/out/providers/setup/claude.html +1 -1
  25. package/dist/dashboard/out/providers/setup/claude.txt +1 -1
  26. package/dist/dashboard/out/providers/setup/codex.html +1 -1
  27. package/dist/dashboard/out/providers/setup/codex.txt +1 -1
  28. package/dist/dashboard/out/providers/setup/cursor.html +1 -1
  29. package/dist/dashboard/out/providers/setup/cursor.txt +1 -1
  30. package/dist/dashboard/out/providers.html +1 -1
  31. package/dist/dashboard/out/providers.txt +1 -1
  32. package/dist/dashboard/out/signup.html +1 -1
  33. package/dist/dashboard/out/signup.txt +1 -1
  34. package/package.json +16 -16
  35. package/packages/api-types/package.json +1 -1
  36. package/packages/bridge/package.json +8 -8
  37. package/packages/cloud/package.json +6 -6
  38. package/packages/config/package.json +2 -2
  39. package/packages/continuity/package.json +1 -1
  40. package/packages/daemon/package.json +12 -12
  41. package/packages/dashboard/package.json +13 -13
  42. package/packages/dashboard/ui-dist/404.html +1 -1
  43. package/packages/dashboard/ui-dist/app/onboarding.html +1 -1
  44. package/packages/dashboard/ui-dist/app/onboarding.txt +1 -1
  45. package/packages/dashboard/ui-dist/app.html +1 -1
  46. package/packages/dashboard/ui-dist/app.txt +1 -1
  47. package/packages/dashboard/ui-dist/cloud/link.html +1 -1
  48. package/packages/dashboard/ui-dist/cloud/link.txt +1 -1
  49. package/packages/dashboard/ui-dist/complete-profile.html +1 -1
  50. package/packages/dashboard/ui-dist/complete-profile.txt +1 -1
  51. package/packages/dashboard/ui-dist/connect-repos.html +1 -1
  52. package/packages/dashboard/ui-dist/connect-repos.txt +1 -1
  53. package/packages/dashboard/ui-dist/history.html +1 -1
  54. package/packages/dashboard/ui-dist/history.txt +1 -1
  55. package/packages/dashboard/ui-dist/index.html +1 -1
  56. package/packages/dashboard/ui-dist/index.txt +1 -1
  57. package/packages/dashboard/ui-dist/login.html +1 -1
  58. package/packages/dashboard/ui-dist/login.txt +1 -1
  59. package/packages/dashboard/ui-dist/metrics.html +1 -1
  60. package/packages/dashboard/ui-dist/metrics.txt +1 -1
  61. package/packages/dashboard/ui-dist/pricing.html +1 -1
  62. package/packages/dashboard/ui-dist/pricing.txt +1 -1
  63. package/packages/dashboard/ui-dist/providers/setup/claude.html +1 -1
  64. package/packages/dashboard/ui-dist/providers/setup/claude.txt +1 -1
  65. package/packages/dashboard/ui-dist/providers/setup/codex.html +1 -1
  66. package/packages/dashboard/ui-dist/providers/setup/codex.txt +1 -1
  67. package/packages/dashboard/ui-dist/providers/setup/cursor.html +1 -1
  68. package/packages/dashboard/ui-dist/providers/setup/cursor.txt +1 -1
  69. package/packages/dashboard/ui-dist/providers.html +1 -1
  70. package/packages/dashboard/ui-dist/providers.txt +1 -1
  71. package/packages/dashboard/ui-dist/signup.html +1 -1
  72. package/packages/dashboard/ui-dist/signup.txt +1 -1
  73. package/packages/dashboard-server/package.json +12 -12
  74. package/packages/hooks/package.json +4 -4
  75. package/packages/mcp/package.json +2 -2
  76. package/packages/memory/package.json +2 -2
  77. package/packages/policy/package.json +2 -2
  78. package/packages/protocol/package.json +1 -1
  79. package/packages/resiliency/package.json +1 -1
  80. package/packages/sdk/package.json +2 -2
  81. package/packages/spawner/package.json +1 -1
  82. package/packages/state/package.json +1 -1
  83. package/packages/storage/package.json +2 -2
  84. package/packages/telemetry/package.json +1 -1
  85. package/packages/trajectory/package.json +2 -2
  86. package/packages/user-directory/package.json +2 -2
  87. package/packages/utils/package.json +1 -1
  88. package/packages/wrapper/package.json +6 -6
  89. package/relay-snippets/agent-policy-snippet.md +40 -0
  90. package/relay-snippets/agent-relay-protocol.md +101 -0
  91. package/relay-snippets/agent-relay-snippet.md +177 -0
  92. package/SESSION_HANDOFF.md +0 -67
  93. package/test-push.txt +0 -1
  94. /package/dist/dashboard/out/_next/static/{cybSRcFA4OLNv-UWeCKig → JIjqkuDKNeoSg7KaMMuhx}/_buildManifest.js +0 -0
  95. /package/dist/dashboard/out/_next/static/{cybSRcFA4OLNv-UWeCKig → JIjqkuDKNeoSg7KaMMuhx}/_ssgManifest.js +0 -0
  96. /package/packages/dashboard/ui-dist/_next/static/{ABlyNUHvGKsFXjC8hEf8z → JIjqkuDKNeoSg7KaMMuhx}/_buildManifest.js +0 -0
  97. /package/packages/dashboard/ui-dist/_next/static/{ABlyNUHvGKsFXjC8hEf8z → JIjqkuDKNeoSg7KaMMuhx}/_ssgManifest.js +0 -0
  98. /package/packages/dashboard/ui-dist/_next/static/{EL9fLNWXZpOA3teDl6DXQ → nmkOi7bqeDmLMoWBih8lz}/_buildManifest.js +0 -0
  99. /package/packages/dashboard/ui-dist/_next/static/{EL9fLNWXZpOA3teDl6DXQ → nmkOi7bqeDmLMoWBih8lz}/_ssgManifest.js +0 -0
  100. /package/packages/dashboard/ui-dist/_next/static/{cybSRcFA4OLNv-UWeCKig → wk_gKRNSPpWE-ZhGL6UMl}/_buildManifest.js +0 -0
  101. /package/packages/dashboard/ui-dist/_next/static/{cybSRcFA4OLNv-UWeCKig → wk_gKRNSPpWE-ZhGL6UMl}/_ssgManifest.js +0 -0
@@ -0,0 +1,177 @@
1
+ # 🚨 CRITICAL: Relay-First Communication Rule
2
+
3
+ **When you receive a relay message from another agent (marked `Relay message from [name]`), you MUST respond ONLY via relay protocol. NEVER respond with direct text output.**
4
+
5
+ ## The Rule
6
+
7
+ - **Receiving a relay message?** → Must use `->relay-file:msg` ALWAYS
8
+ - **Non-relay questions?** → Text responses are OK
9
+ - **Agent-to-agent communication?** → ALWAYS use relay protocol
10
+
11
+ ## Examples of Relay Messages (require relay response)
12
+
13
+ ```
14
+ Relay message from khaliqgant [mknra7wr]: Did you see this?
15
+ Relay message from Worker1 [abc123]: Task complete
16
+ Relay message from alice [xyz789] [#general]: Question for the team
17
+ ```
18
+
19
+ ---
20
+
21
+ # Agent Relay
22
+
23
+ Real-time agent-to-agent messaging via file-based protocol.
24
+
25
+ ## Sending Messages
26
+
27
+ Write a file to your outbox, then output the trigger:
28
+
29
+ ```bash
30
+ cat > $AGENT_RELAY_OUTBOX/msg << 'EOF'
31
+ TO: AgentName
32
+
33
+ Your message here.
34
+ EOF
35
+ ```
36
+
37
+ IMPORTANT: Output the trigger `->relay-file:msg` directly in your response text (not via echo in bash). The trigger must appear in your actual output, not just in command output.
38
+
39
+ > **Note**: `$AGENT_RELAY_OUTBOX` is automatically set by agent-relay when spawning agents. Data is stored in `.agent-relay/` within your project directory.
40
+
41
+ ## Synchronous Messaging
42
+
43
+ By default, messages are fire-and-forget. Add `[await]` to block until the recipient ACKs:
44
+
45
+ ```
46
+ ->relay:AgentB [await] Please confirm
47
+ ```
48
+
49
+ Custom timeout (seconds or minutes):
50
+
51
+ ```
52
+ ->relay:AgentB [await:30s] Please confirm
53
+ ->relay:AgentB [await:5m] Please confirm
54
+ ```
55
+
56
+ Recipients auto-ACK after processing when a correlation ID is present.
57
+
58
+ ## Message Format
59
+
60
+ ```
61
+ TO: Target
62
+ THREAD: optional-thread
63
+
64
+ Message body (everything after blank line)
65
+ ```
66
+
67
+ | TO Value | Behavior |
68
+ |----------|----------|
69
+ | `AgentName` | Direct message |
70
+ | `*` | Broadcast to all |
71
+ | `#channel` | Channel message |
72
+
73
+ ## Agent Naming (Local vs Bridge)
74
+
75
+ **Local communication** uses plain agent names. The `project:` prefix is **ONLY** for cross-project bridge mode.
76
+
77
+ | Context | Correct | Incorrect |
78
+ |---------|---------|-----------|
79
+ | Local (same project) | `TO: Lead` | `TO: project:lead` |
80
+ | Local (same project) | `TO: Worker1` | `TO: myproject:Worker1` |
81
+ | Bridge (cross-project) | `TO: frontend:Designer` | N/A |
82
+ | Bridge (to another lead) | `TO: otherproject:lead` | N/A |
83
+
84
+ **Common mistake**: Using `project:lead` when communicating locally. This will fail because the relay looks for an agent literally named "project:lead".
85
+
86
+ ```bash
87
+ # CORRECT - local communication to Lead agent
88
+ cat > $AGENT_RELAY_OUTBOX/msg << 'EOF'
89
+ TO: Lead
90
+
91
+ Status update here.
92
+ EOF
93
+ ```
94
+
95
+ ```bash
96
+ # WRONG - project: prefix is only for bridge mode
97
+ cat > $AGENT_RELAY_OUTBOX/msg << 'EOF'
98
+ TO: project:lead
99
+
100
+ This will fail locally!
101
+ EOF
102
+ ```
103
+
104
+ ## Spawning & Releasing
105
+
106
+ **IMPORTANT**: The filename is always `spawn` (not `spawn-agentname`) and the trigger is always `->relay-file:spawn`. Spawn agents one at a time sequentially.
107
+
108
+ ```bash
109
+ # Spawn
110
+ cat > $AGENT_RELAY_OUTBOX/spawn << 'EOF'
111
+ KIND: spawn
112
+ NAME: WorkerName
113
+ CLI: claude
114
+
115
+ Task description here.
116
+ EOF
117
+ ```
118
+ Then: `->relay-file:spawn`
119
+
120
+ ```bash
121
+ # Release
122
+ cat > $AGENT_RELAY_OUTBOX/release << 'EOF'
123
+ KIND: release
124
+ NAME: WorkerName
125
+ EOF
126
+ ```
127
+ Then: `->relay-file:release`
128
+
129
+ ## When You Are Spawned
130
+
131
+ If you were spawned by another agent:
132
+
133
+ 1. **Check who spawned you**: `echo $AGENT_RELAY_SPAWNER`
134
+ 2. **Your first message** is your task from your spawner - reply to THEM, not "spawner"
135
+ 3. **Report status** to your spawner (your lead), not broadcast
136
+
137
+ ```bash
138
+ # Check your spawner
139
+ echo "I was spawned by: $AGENT_RELAY_SPAWNER"
140
+
141
+ # Reply to your spawner
142
+ cat > $AGENT_RELAY_OUTBOX/msg << 'EOF'
143
+ TO: $AGENT_RELAY_SPAWNER
144
+
145
+ ACK: Starting on the task.
146
+ EOF
147
+ ```
148
+ Then: `->relay-file:msg`
149
+
150
+ ## Receiving Messages
151
+
152
+ Messages appear as:
153
+ ```
154
+ Relay message from Alice [abc123]: Content here
155
+ ```
156
+
157
+ Channel messages include `[#channel]`:
158
+ ```
159
+ Relay message from Alice [abc123] [#general]: Hello!
160
+ ```
161
+ Reply to the channel shown, not the sender.
162
+
163
+ ## Protocol
164
+
165
+ - **ACK** when you receive a task: `ACK: Brief description`
166
+ - **DONE** when complete: `DONE: What was accomplished`
167
+ - Send status to your **lead** (the agent in `$AGENT_RELAY_SPAWNER`), not broadcast
168
+
169
+ ## Headers Reference
170
+
171
+ | Header | Required | Description |
172
+ |--------|----------|-------------|
173
+ | TO | Yes (messages) | Target agent/channel |
174
+ | KIND | No | `message` (default), `spawn`, `release` |
175
+ | NAME | Yes (spawn/release) | Agent name |
176
+ | CLI | Yes (spawn) | CLI to use |
177
+ | THREAD | No | Thread identifier |
@@ -1,67 +0,0 @@
1
- # Session Handoff - NPM Package Extraction Project
2
-
3
- **Last Updated**: Session end (Jan 22, 2026 ~12:45 UTC)
4
-
5
- ## Current State Summary
6
-
7
- ### Completed
8
- - **Phases 1-4**: 14 packages extracted (protocol, config, storage, state, policy, memory, utils, hooks)
9
- - **Phase 6A**: User-directory extracted (broke circular deps)
10
- - **Phase 5A**: Cloud extraction complete, build GREEN
11
-
12
- ### In Progress - NEEDS ATTENTION
13
- - **Phase 5B** (Staff): Dashboard-server extraction
14
- - Last confirmed: 12:37 UTC
15
- - ETA: 45-60 minutes to build green
16
- - Status: APPEARS IDLE - no updates for 15+ minutes
17
-
18
- - **Phase 6B** (FullStack): Daemon extraction
19
- - Last confirmed: 12:21 UTC
20
- - ETA: 60 minutes
21
- - Status: UNRESPONSIVE - no updates for 40+ minutes
22
-
23
- ### Queued
24
- - Phase 6C: CLI extraction (FullStack, after 6B)
25
- - Phase 6D: Final integrations (15-30 min)
26
-
27
- ## Test Baseline
28
- Maintain 2468 passing tests throughout
29
-
30
- ## Critical Reminders
31
-
32
- ### Build Order
33
- Trajectory and Hooks MUST build BEFORE Memory
34
-
35
- ### Relay Protocol
36
- Write to ~/.agent-relay/outbox/[Agent]/msg with TO: Lead header
37
-
38
- ### Package Paths
39
- - Config: @agent-relay/config/*
40
- - Daemon: @agent-relay/daemon/*
41
- - Wrapper: @agent-relay/wrapper/*
42
- - Cloud: @agent-relay/cloud/*
43
-
44
- ## Immediate Next Steps
45
-
46
- 1. Ping Staff: Phase 5B dashboard-server status?
47
- 2. Ping FullStack: What is blocking Phase 6B daemon extraction?
48
- 3. Unblock both agents
49
- 4. Resume parallel execution
50
- 5. Monitor to completion
51
-
52
- ## Key Files
53
-
54
- - Handoff notes: ~/.agent-relay/outbox/Lead/session-handoff
55
- - Phase 6 plan: .beads/phase6-execution-plan.md
56
- - Cloud package: packages/cloud/ (COMPLETE)
57
- - Dashboard-server: packages/dashboard-server/ (IN PROGRESS)
58
- - Daemon: packages/daemon/ (IN PROGRESS)
59
-
60
- ## Timeline to Completion
61
- - Phase 5B: 50-60 min remaining
62
- - Phase 6B: 60 min (parallel)
63
- - Phase 6C: 30-45 min
64
- - Final integration: 15-30 min
65
- - TOTAL: 2-2.5 hours
66
-
67
- Risk Level: MODERATE (both agents appear stuck, need immediate wake-up)
package/test-push.txt DELETED
@@ -1 +0,0 @@
1
- # Test file for push verification