agent-relay 2.0.17 → 2.0.19
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/deploy/workspace/entrypoint.sh +35 -19
- package/deploy/workspace/git-credential-relay +82 -7
- package/dist/dashboard/out/404.html +1 -1
- package/dist/dashboard/out/_next/static/chunks/320-a6304232cd0ee2ce.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/631-16b905e5920f9b59.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-ecb16ffd3b36262b.js +1 -0
- package/dist/dashboard/out/_next/static/css/{45361ce86b2847c4.css → 6892f8422896ef7a.css} +1 -1
- package/dist/dashboard/out/app/onboarding.html +1 -1
- package/dist/dashboard/out/app/onboarding.txt +1 -1
- package/dist/dashboard/out/app.html +1 -1
- package/dist/dashboard/out/app.txt +2 -2
- package/dist/dashboard/out/cloud/link.html +1 -1
- package/dist/dashboard/out/cloud/link.txt +1 -1
- package/dist/dashboard/out/complete-profile.html +2 -2
- package/dist/dashboard/out/complete-profile.txt +1 -1
- package/dist/dashboard/out/connect-repos.html +1 -1
- package/dist/dashboard/out/connect-repos.txt +1 -1
- package/dist/dashboard/out/history.html +1 -1
- package/dist/dashboard/out/history.txt +1 -1
- package/dist/dashboard/out/index.html +1 -1
- package/dist/dashboard/out/index.txt +2 -2
- package/dist/dashboard/out/login.html +2 -2
- package/dist/dashboard/out/login.txt +1 -1
- package/dist/dashboard/out/metrics.html +1 -1
- package/dist/dashboard/out/metrics.txt +1 -1
- package/dist/dashboard/out/pricing.html +2 -2
- package/dist/dashboard/out/pricing.txt +1 -1
- package/dist/dashboard/out/providers/setup/claude.html +1 -1
- package/dist/dashboard/out/providers/setup/claude.txt +1 -1
- package/dist/dashboard/out/providers/setup/codex.html +1 -1
- package/dist/dashboard/out/providers/setup/codex.txt +1 -1
- package/dist/dashboard/out/providers/setup/cursor.html +1 -1
- package/dist/dashboard/out/providers/setup/cursor.txt +1 -1
- package/dist/dashboard/out/providers.html +1 -1
- package/dist/dashboard/out/providers.txt +2 -2
- package/dist/dashboard/out/signup.html +2 -2
- package/dist/dashboard/out/signup.txt +1 -1
- package/package.json +16 -16
- package/packages/api-types/package.json +1 -1
- package/packages/bridge/package.json +8 -8
- package/packages/cloud/dist/api/cli-pty-runner.js +9 -6
- package/packages/cloud/package.json +6 -6
- package/packages/config/dist/cli-auth-config.js +10 -0
- package/packages/config/package.json +2 -2
- package/packages/continuity/package.json +1 -1
- package/packages/daemon/dist/cli-auth.js +5 -1
- package/packages/daemon/package.json +12 -12
- package/packages/dashboard/package.json +13 -13
- package/packages/dashboard/ui/app/providers/page.tsx +2 -2
- package/packages/dashboard/ui/react-components/ProviderConnectionList.tsx +23 -8
- package/packages/dashboard/ui/react-components/SpawnModal.tsx +16 -6
- package/packages/dashboard/ui/react-components/settings/WorkspaceSettingsPanel.tsx +22 -6
- package/packages/dashboard/ui-dist/404.html +1 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/320-a6304232cd0ee2ce.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/631-16b905e5920f9b59.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/page-ecb16ffd3b36262b.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/css/{45361ce86b2847c4.css → 6892f8422896ef7a.css} +1 -1
- package/packages/dashboard/ui-dist/app/onboarding.html +1 -1
- package/packages/dashboard/ui-dist/app/onboarding.txt +1 -1
- package/packages/dashboard/ui-dist/app.html +1 -1
- package/packages/dashboard/ui-dist/app.txt +2 -2
- package/packages/dashboard/ui-dist/cloud/link.html +1 -1
- package/packages/dashboard/ui-dist/cloud/link.txt +1 -1
- package/packages/dashboard/ui-dist/complete-profile.html +2 -2
- package/packages/dashboard/ui-dist/complete-profile.txt +1 -1
- package/packages/dashboard/ui-dist/connect-repos.html +1 -1
- package/packages/dashboard/ui-dist/connect-repos.txt +1 -1
- package/packages/dashboard/ui-dist/history.html +1 -1
- package/packages/dashboard/ui-dist/history.txt +1 -1
- package/packages/dashboard/ui-dist/index.html +1 -1
- package/packages/dashboard/ui-dist/index.txt +2 -2
- package/packages/dashboard/ui-dist/login.html +2 -2
- package/packages/dashboard/ui-dist/login.txt +1 -1
- package/packages/dashboard/ui-dist/metrics.html +1 -1
- package/packages/dashboard/ui-dist/metrics.txt +1 -1
- package/packages/dashboard/ui-dist/pricing.html +2 -2
- package/packages/dashboard/ui-dist/pricing.txt +1 -1
- package/packages/dashboard/ui-dist/providers/setup/claude.html +1 -1
- package/packages/dashboard/ui-dist/providers/setup/claude.txt +1 -1
- package/packages/dashboard/ui-dist/providers/setup/codex.html +1 -1
- package/packages/dashboard/ui-dist/providers/setup/codex.txt +1 -1
- package/packages/dashboard/ui-dist/providers/setup/cursor.html +1 -1
- package/packages/dashboard/ui-dist/providers/setup/cursor.txt +1 -1
- package/packages/dashboard/ui-dist/providers.html +1 -1
- package/packages/dashboard/ui-dist/providers.txt +2 -2
- package/packages/dashboard/ui-dist/signup.html +2 -2
- package/packages/dashboard/ui-dist/signup.txt +1 -1
- package/packages/dashboard-server/package.json +12 -12
- package/packages/hooks/package.json +4 -4
- package/packages/mcp/package.json +2 -2
- package/packages/memory/package.json +2 -2
- package/packages/policy/package.json +2 -2
- package/packages/protocol/package.json +1 -1
- package/packages/resiliency/package.json +1 -1
- package/packages/sdk/package.json +2 -2
- package/packages/spawner/package.json +1 -1
- package/packages/state/package.json +1 -1
- package/packages/storage/package.json +2 -2
- package/packages/telemetry/package.json +1 -1
- package/packages/trajectory/package.json +2 -2
- package/packages/user-directory/package.json +2 -2
- package/packages/utils/package.json +1 -1
- package/packages/wrapper/dist/idle-detector.d.ts +4 -0
- package/packages/wrapper/dist/idle-detector.js +21 -8
- package/packages/wrapper/dist/relay-pty-orchestrator.d.ts +5 -0
- package/packages/wrapper/dist/relay-pty-orchestrator.js +53 -0
- package/packages/wrapper/package.json +6 -6
- package/relay-snippets/agent-policy-snippet.md +40 -0
- package/relay-snippets/agent-relay-protocol.md +101 -0
- package/relay-snippets/agent-relay-snippet.md +177 -0
- package/scripts/postinstall.js +41 -1
- package/SESSION_HANDOFF.md +0 -67
- package/dist/dashboard/out/_next/static/chunks/320-402ffc8646b31da1.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/631-af51bad94027527a.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-bcf46064ac4474ce.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/320-402ffc8646b31da1.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/631-af51bad94027527a.js +0 -1
- package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/page-bcf46064ac4474ce.js +0 -1
- package/test-push.txt +0 -1
- /package/dist/dashboard/out/_next/static/{cybSRcFA4OLNv-UWeCKig → cREcLZyPb-5NyVZje0Qfe}/_buildManifest.js +0 -0
- /package/dist/dashboard/out/_next/static/{cybSRcFA4OLNv-UWeCKig → cREcLZyPb-5NyVZje0Qfe}/_ssgManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{ABlyNUHvGKsFXjC8hEf8z → N3ajGnJqRESKyCjDvyU52}/_buildManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{ABlyNUHvGKsFXjC8hEf8z → N3ajGnJqRESKyCjDvyU52}/_ssgManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{EL9fLNWXZpOA3teDl6DXQ → UQiyWwBxIP-9it3GYVBDL}/_buildManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{EL9fLNWXZpOA3teDl6DXQ → UQiyWwBxIP-9it3GYVBDL}/_ssgManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{cybSRcFA4OLNv-UWeCKig → cREcLZyPb-5NyVZje0Qfe}/_buildManifest.js +0 -0
- /package/packages/dashboard/ui-dist/_next/static/{cybSRcFA4OLNv-UWeCKig → cREcLZyPb-5NyVZje0Qfe}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Agent Relay Protocol (Internal)
|
|
2
|
+
|
|
3
|
+
Advanced features for session continuity and trajectory tracking.
|
|
4
|
+
|
|
5
|
+
## Session Continuity
|
|
6
|
+
|
|
7
|
+
Save your state for session recovery using file-based format (same as messaging):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cat > $AGENT_RELAY_OUTBOX/continuity << 'EOF'
|
|
11
|
+
KIND: continuity
|
|
12
|
+
ACTION: save
|
|
13
|
+
|
|
14
|
+
Current task: Implementing user authentication
|
|
15
|
+
Completed: User model, JWT utils
|
|
16
|
+
In progress: Login endpoint
|
|
17
|
+
Key decisions: Using refresh tokens
|
|
18
|
+
Files: src/auth/*.ts
|
|
19
|
+
EOF
|
|
20
|
+
```
|
|
21
|
+
Then: `->relay-file:continuity`
|
|
22
|
+
|
|
23
|
+
### When to Save
|
|
24
|
+
|
|
25
|
+
- Before long-running operations (builds, tests)
|
|
26
|
+
- When switching task areas
|
|
27
|
+
- Every 15-20 minutes of active work
|
|
28
|
+
- Before ending session
|
|
29
|
+
|
|
30
|
+
### Load Previous Context
|
|
31
|
+
|
|
32
|
+
Context auto-loads on startup. To manually request:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cat > $AGENT_RELAY_OUTBOX/load << 'EOF'
|
|
36
|
+
KIND: continuity
|
|
37
|
+
ACTION: load
|
|
38
|
+
EOF
|
|
39
|
+
```
|
|
40
|
+
Then: `->relay-file:load`
|
|
41
|
+
|
|
42
|
+
### Mark Uncertainties
|
|
43
|
+
|
|
44
|
+
Flag items needing future verification:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cat > $AGENT_RELAY_OUTBOX/uncertain << 'EOF'
|
|
48
|
+
KIND: continuity
|
|
49
|
+
ACTION: uncertain
|
|
50
|
+
|
|
51
|
+
API rate limit handling unclear
|
|
52
|
+
EOF
|
|
53
|
+
```
|
|
54
|
+
Then: `->relay-file:uncertain`
|
|
55
|
+
|
|
56
|
+
## Work Trajectories
|
|
57
|
+
|
|
58
|
+
Record your work as a trajectory for future agents.
|
|
59
|
+
|
|
60
|
+
### Starting Work
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
trail start "Implement user authentication"
|
|
64
|
+
trail start "Fix login bug" --task "agent-relay-123"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Recording Decisions
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
trail decision "Chose JWT over sessions" --reasoning "Stateless scaling"
|
|
71
|
+
trail decision "Used existing auth middleware"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Completing Work
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
trail complete --summary "Added JWT auth" --confidence 0.85
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Confidence: 0.9+ (high), 0.7-0.9 (good), 0.5-0.7 (some uncertainty), <0.5 (needs review)
|
|
81
|
+
|
|
82
|
+
### Abandoning Work
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
trail abandon --reason "Blocked by missing credentials"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Cross-Project Messaging
|
|
89
|
+
|
|
90
|
+
In bridge mode, use `project:agent` format:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
TO: frontend:Designer
|
|
94
|
+
|
|
95
|
+
Please update the login UI.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Special targets:
|
|
99
|
+
- `project:lead` - Lead agent of that project
|
|
100
|
+
- `project:*` - Broadcast to project
|
|
101
|
+
- `*:*` - Broadcast to all projects
|
|
@@ -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 |
|
package/scripts/postinstall.js
CHANGED
|
@@ -73,6 +73,36 @@ function getRelayPtyBinaryName() {
|
|
|
73
73
|
return `relay-pty-${targetPlatform}-${targetArch}`;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Re-sign a binary with ad-hoc signature on macOS.
|
|
78
|
+
* This is required because macOS code signature validation can fail
|
|
79
|
+
* when binaries are copied/downloaded, causing SIGKILL on execution.
|
|
80
|
+
*
|
|
81
|
+
* The codesign tool is always available on macOS (part of the system).
|
|
82
|
+
* This is a common solution for npm packages distributing native binaries.
|
|
83
|
+
* Similar approach is used by esbuild, swc, and other Rust/Go tools.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} binaryPath - Path to the binary to sign
|
|
86
|
+
* @returns {boolean} - Whether signing succeeded
|
|
87
|
+
*/
|
|
88
|
+
function resignBinaryForMacOS(binaryPath) {
|
|
89
|
+
if (os.platform() !== 'darwin') {
|
|
90
|
+
return true; // Only needed on macOS
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
// codesign is always available on macOS as a system utility
|
|
95
|
+
execSync(`codesign --force --sign - "${binaryPath}"`, { stdio: 'pipe' });
|
|
96
|
+
return true;
|
|
97
|
+
} catch (err) {
|
|
98
|
+
// This shouldn't happen on a normal macOS system, but handle gracefully
|
|
99
|
+
warn(`Failed to re-sign binary: ${err.message}`);
|
|
100
|
+
warn('The binary may fail to execute due to code signature issues.');
|
|
101
|
+
warn('You can manually fix this by running: codesign --force --sign - ' + binaryPath);
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
76
106
|
/**
|
|
77
107
|
* Install the relay-pty binary for the current platform
|
|
78
108
|
*/
|
|
@@ -103,6 +133,9 @@ function installRelayPtyBinary() {
|
|
|
103
133
|
const sourceStats = fs.statSync(sourcePath);
|
|
104
134
|
const targetStats = fs.statSync(targetPath);
|
|
105
135
|
if (sourceStats.size === targetStats.size) {
|
|
136
|
+
// Re-sign even if already installed to ensure signature is valid
|
|
137
|
+
// This fixes issues where previous installs have invalid signatures
|
|
138
|
+
resignBinaryForMacOS(targetPath);
|
|
106
139
|
info('relay-pty binary already installed');
|
|
107
140
|
return true;
|
|
108
141
|
}
|
|
@@ -115,7 +148,14 @@ function installRelayPtyBinary() {
|
|
|
115
148
|
try {
|
|
116
149
|
fs.copyFileSync(sourcePath, targetPath);
|
|
117
150
|
fs.chmodSync(targetPath, 0o755);
|
|
118
|
-
|
|
151
|
+
|
|
152
|
+
// Re-sign the binary on macOS to prevent code signature validation failures
|
|
153
|
+
// Without this, macOS may SIGKILL the process immediately on execution
|
|
154
|
+
if (resignBinaryForMacOS(targetPath)) {
|
|
155
|
+
success(`Installed relay-pty binary for ${os.platform()}-${os.arch()}`);
|
|
156
|
+
} else {
|
|
157
|
+
warn(`Installed relay-pty binary but signing failed - may not work on macOS`);
|
|
158
|
+
}
|
|
119
159
|
return true;
|
|
120
160
|
} catch (err) {
|
|
121
161
|
warn(`Failed to install relay-pty binary: ${err.message}`);
|
package/SESSION_HANDOFF.md
DELETED
|
@@ -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)
|