Skip to content

Commit bc3595b

Browse files
committed
Merge main and integrate Phase 3A storage package extraction
Includes: - Main branch integrations: git-credential-relay fixes, spawner improvements - Phase 3A (Staff): @relay/storage package scaffolding and extraction - Move storage adapters, SQLite, DLQ to packages/storage - Update imports in src/storage to re-export from @relay/storage - Scaffolding: package.json, tsconfig.json, vitest.config.ts - Tests: batched-sqlite, dlq adapter tests moved to package - Daemon/server updates from main (channels, delivery, sync-queue, cloud-sync) - Dashboard server and CLI improvements - Preserve all Phase 2B extraction work (wrapper, config, protocol) All 2200+ tests from Phases 1-2B remain intact. Phase 3A storage extraction ready for completion.
1 parent 666a736 commit bc3595b

36 files changed

+3211
-3094
lines changed

.trajectories/active/traj_ydfl1a3y9293.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@
7171
"reasoning": "Keep last N messages and output chunks to bound memory usage while preserving enough context for recovery. Prevents unbounded growth in long-running agents."
7272
},
7373
"significance": "high"
74+
},
75+
{
76+
"ts": 1769071751422,
77+
"type": "decision",
78+
"content": "Add protocol monitoring to orchestrator that watches outbox for common mistakes: Add protocol monitoring to orchestrator that watches outbox for common mistakes",
79+
"raw": {
80+
"question": "Add protocol monitoring to orchestrator that watches outbox for common mistakes",
81+
"chosen": "Add protocol monitoring to orchestrator that watches outbox for common mistakes",
82+
"alternatives": [],
83+
"reasoning": "Agents sometimes have empty AGENT_RELAY_NAME or write files to wrong paths. Orchestrator now watches /tmp/relay-outbox/ and injects helpful reminders when issues are detected. Uses fs.watch with cooldown to avoid spam."
84+
},
85+
"significance": "high"
7486
}
7587
]
7688
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
},
1717
"scripts": {
1818
"postinstall": "npm rebuild better-sqlite3 && node scripts/postinstall.js",
19-
"build": "npm run clean && npm run build:protocol && npm run build:config && npm run build:sdk && tsc && npm run build:dashboard",
19+
"build": "npm run clean && npm run build:protocol && npm run build:config && npm run build:storage && npm run build:sdk && tsc && npm run build:dashboard",
2020
"build:protocol": "cd packages/protocol && npm run build",
2121
"build:config": "cd packages/config && npm run build",
22+
"build:storage": "cd packages/storage && npm run build",
2223
"build:sdk": "cd packages/sdk && npm run build",
2324
"build:dashboard": "cd src/dashboard && npm run build",
2425
"postbuild": "chmod +x dist/cli/index.js && mkdir -p dist/dashboard && cp -r src/dashboard/out dist/dashboard/",
@@ -86,6 +87,7 @@
8687
"@agent-relay/sdk": "*",
8788
"@relay/config": "0.1.0",
8889
"@relay/protocol": "0.1.0",
90+
"@relay/storage": "0.1.0",
8991
"@nangohq/node": "^0.69.20",
9092
"@types/jsonwebtoken": "^9.0.10",
9193
"agent-trajectories": "^0.2.3",

packages/config/src/relay-config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ export const DEFAULT_TMUX_WRAPPER_CONFIG = {
2222

2323
export const DEFAULT_IDLE_BEFORE_INJECT_MS = 1500;
2424
export const DEFAULT_IDLE_CONFIDENCE_THRESHOLD = 0.7;
25+
26+
/** Default Unix socket path for daemon communication */
27+
export const DEFAULT_SOCKET_PATH = '/tmp/agent-relay.sock';

packages/storage/package.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "@relay/storage",
3+
"version": "0.1.0",
4+
"description": "Storage adapters and interfaces for Relay message/session persistence",
5+
"type": "module",
6+
"main": "dist/index.js",
7+
"types": "dist/index.d.ts",
8+
"exports": {
9+
".": {
10+
"types": "./dist/index.d.ts",
11+
"import": "./dist/index.js"
12+
}
13+
},
14+
"files": [
15+
"dist",
16+
"README.md"
17+
],
18+
"scripts": {
19+
"build": "tsc",
20+
"clean": "rm -rf dist",
21+
"test": "vitest run",
22+
"test:watch": "vitest"
23+
},
24+
"peerDependencies": {
25+
"better-sqlite3": "^12.6.2"
26+
},
27+
"peerDependenciesMeta": {
28+
"better-sqlite3": {
29+
"optional": true
30+
}
31+
},
32+
"dependencies": {
33+
"@relay/protocol": "0.1.0"
34+
},
35+
"devDependencies": {
36+
"@types/node": "^22.19.3",
37+
"typescript": "^5.9.3",
38+
"vitest": "^3.2.4"
39+
},
40+
"publishConfig": {
41+
"access": "public"
42+
}
43+
}

0 commit comments

Comments
 (0)