agent-relay 1.2.3 → 1.3.0

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 (200) hide show
  1. package/.trajectories/agent-relay-322-324.md +17 -0
  2. package/.trajectories/completed/2026-01/traj_03zupyv1s7b9.json +49 -0
  3. package/.trajectories/completed/2026-01/traj_03zupyv1s7b9.md +31 -0
  4. package/.trajectories/completed/2026-01/traj_0zacdjl1g4ht.json +125 -0
  5. package/.trajectories/completed/2026-01/traj_0zacdjl1g4ht.md +62 -0
  6. package/.trajectories/completed/2026-01/traj_33iuy72sezbk.json +49 -0
  7. package/.trajectories/completed/2026-01/traj_33iuy72sezbk.md +31 -0
  8. package/.trajectories/completed/2026-01/traj_5ammh5qtvklq.json +77 -0
  9. package/.trajectories/completed/2026-01/traj_5ammh5qtvklq.md +42 -0
  10. package/.trajectories/completed/2026-01/traj_6mieijqyvaag.json +77 -0
  11. package/.trajectories/completed/2026-01/traj_6mieijqyvaag.md +42 -0
  12. package/.trajectories/completed/2026-01/traj_78ffm31jn3uk.json +77 -0
  13. package/.trajectories/completed/2026-01/traj_78ffm31jn3uk.md +42 -0
  14. package/.trajectories/completed/2026-01/traj_94gnp3k30goq.json +66 -0
  15. package/.trajectories/completed/2026-01/traj_94gnp3k30goq.md +36 -0
  16. package/.trajectories/completed/2026-01/traj_avqeghu6pz5a.json +40 -0
  17. package/.trajectories/completed/2026-01/traj_avqeghu6pz5a.md +22 -0
  18. package/.trajectories/completed/2026-01/traj_dcsp9s8y01ra.json +121 -0
  19. package/.trajectories/completed/2026-01/traj_dcsp9s8y01ra.md +29 -0
  20. package/.trajectories/completed/2026-01/traj_fhx9irlckht6.json +53 -0
  21. package/.trajectories/completed/2026-01/traj_fhx9irlckht6.md +32 -0
  22. package/.trajectories/completed/2026-01/traj_fqduidx3xbtp.json +101 -0
  23. package/.trajectories/completed/2026-01/traj_fqduidx3xbtp.md +52 -0
  24. package/.trajectories/completed/2026-01/traj_hf81ey93uz6t.json +49 -0
  25. package/.trajectories/completed/2026-01/traj_hf81ey93uz6t.md +31 -0
  26. package/.trajectories/completed/2026-01/traj_hfmki2jr9d4r.json +65 -0
  27. package/.trajectories/completed/2026-01/traj_hfmki2jr9d4r.md +37 -0
  28. package/.trajectories/completed/2026-01/traj_lq450ly148uw.json +49 -0
  29. package/.trajectories/completed/2026-01/traj_lq450ly148uw.md +31 -0
  30. package/.trajectories/completed/2026-01/traj_multi_server_arch.md +101 -0
  31. package/.trajectories/completed/2026-01/traj_psd9ob0j2ru3.json +27 -0
  32. package/.trajectories/completed/2026-01/traj_psd9ob0j2ru3.md +14 -0
  33. package/.trajectories/completed/2026-01/traj_ub8csuv3lcv4.json +53 -0
  34. package/.trajectories/completed/2026-01/traj_ub8csuv3lcv4.md +32 -0
  35. package/.trajectories/completed/2026-01/traj_uc29tlso8i9s.json +186 -0
  36. package/.trajectories/completed/2026-01/traj_uc29tlso8i9s.md +86 -0
  37. package/.trajectories/completed/2026-01/traj_ui9b4tqxoa7j.json +77 -0
  38. package/.trajectories/completed/2026-01/traj_ui9b4tqxoa7j.md +42 -0
  39. package/.trajectories/completed/2026-01/traj_v9dkdoxylyid.json +89 -0
  40. package/.trajectories/completed/2026-01/traj_v9dkdoxylyid.md +47 -0
  41. package/.trajectories/completed/2026-01/traj_xy9vifpqet80.json +65 -0
  42. package/.trajectories/completed/2026-01/traj_xy9vifpqet80.md +37 -0
  43. package/.trajectories/completed/2026-01/traj_y7aiwijyfmmv.json +49 -0
  44. package/.trajectories/completed/2026-01/traj_y7aiwijyfmmv.md +31 -0
  45. package/.trajectories/consolidate-settings-panel.md +24 -0
  46. package/.trajectories/gh-cli-user-token.md +26 -0
  47. package/.trajectories/index.json +155 -1
  48. package/deploy/workspace/codex.config.toml +15 -0
  49. package/deploy/workspace/entrypoint.sh +167 -7
  50. package/deploy/workspace/git-credential-relay +17 -2
  51. package/dist/bridge/spawner.d.ts +7 -0
  52. package/dist/bridge/spawner.js +40 -9
  53. package/dist/bridge/types.d.ts +2 -0
  54. package/dist/cli/index.js +210 -168
  55. package/dist/cloud/api/admin.d.ts +8 -0
  56. package/dist/cloud/api/admin.js +212 -0
  57. package/dist/cloud/api/auth.js +8 -0
  58. package/dist/cloud/api/billing.d.ts +0 -10
  59. package/dist/cloud/api/billing.js +248 -58
  60. package/dist/cloud/api/codex-auth-helper.d.ts +10 -4
  61. package/dist/cloud/api/codex-auth-helper.js +215 -8
  62. package/dist/cloud/api/coordinators.js +402 -0
  63. package/dist/cloud/api/daemons.js +15 -11
  64. package/dist/cloud/api/git.js +104 -17
  65. package/dist/cloud/api/github-app.js +42 -8
  66. package/dist/cloud/api/nango-auth.js +297 -16
  67. package/dist/cloud/api/onboarding.js +97 -33
  68. package/dist/cloud/api/providers.js +12 -16
  69. package/dist/cloud/api/repos.js +200 -124
  70. package/dist/cloud/api/test-helpers.js +40 -0
  71. package/dist/cloud/api/usage.js +13 -0
  72. package/dist/cloud/api/webhooks.js +1 -1
  73. package/dist/cloud/api/workspaces.d.ts +18 -0
  74. package/dist/cloud/api/workspaces.js +945 -15
  75. package/dist/cloud/config.d.ts +8 -0
  76. package/dist/cloud/config.js +15 -0
  77. package/dist/cloud/db/drizzle.d.ts +5 -2
  78. package/dist/cloud/db/drizzle.js +27 -20
  79. package/dist/cloud/db/schema.d.ts +19 -51
  80. package/dist/cloud/db/schema.js +5 -4
  81. package/dist/cloud/index.d.ts +0 -1
  82. package/dist/cloud/index.js +0 -1
  83. package/dist/cloud/provisioner/index.d.ts +93 -1
  84. package/dist/cloud/provisioner/index.js +608 -63
  85. package/dist/cloud/server.js +156 -16
  86. package/dist/cloud/services/compute-enforcement.d.ts +57 -0
  87. package/dist/cloud/services/compute-enforcement.js +175 -0
  88. package/dist/cloud/services/index.d.ts +2 -0
  89. package/dist/cloud/services/index.js +4 -0
  90. package/dist/cloud/services/intro-expiration.d.ts +55 -0
  91. package/dist/cloud/services/intro-expiration.js +211 -0
  92. package/dist/cloud/services/nango.d.ts +14 -0
  93. package/dist/cloud/services/nango.js +74 -14
  94. package/dist/cloud/services/ssh-security.d.ts +31 -0
  95. package/dist/cloud/services/ssh-security.js +63 -0
  96. package/dist/continuity/manager.d.ts +5 -0
  97. package/dist/continuity/manager.js +56 -2
  98. package/dist/daemon/api.d.ts +2 -0
  99. package/dist/daemon/api.js +214 -5
  100. package/dist/daemon/cli-auth.d.ts +13 -1
  101. package/dist/daemon/cli-auth.js +166 -47
  102. package/dist/daemon/connection.d.ts +7 -1
  103. package/dist/daemon/connection.js +15 -0
  104. package/dist/daemon/orchestrator.d.ts +2 -0
  105. package/dist/daemon/orchestrator.js +26 -0
  106. package/dist/daemon/repo-manager.d.ts +116 -0
  107. package/dist/daemon/repo-manager.js +384 -0
  108. package/dist/daemon/router.d.ts +60 -1
  109. package/dist/daemon/router.js +281 -20
  110. package/dist/daemon/user-directory.d.ts +111 -0
  111. package/dist/daemon/user-directory.js +233 -0
  112. package/dist/dashboard/out/404.html +1 -1
  113. package/dist/dashboard/out/_next/static/T1tgCqVWHFIkV7ClEtzD7/_ssgManifest.js +1 -0
  114. package/dist/dashboard/out/_next/static/chunks/532-bace199897eeab37.js +9 -0
  115. package/dist/dashboard/out/_next/static/chunks/766-b54f0853794b78c3.js +1 -0
  116. package/dist/dashboard/out/_next/static/chunks/83-b51836037078006c.js +1 -0
  117. package/dist/dashboard/out/_next/static/chunks/891-6cd50de1224f70bb.js +1 -0
  118. package/dist/dashboard/out/_next/static/chunks/899-bb19a9b3d9b39ea6.js +1 -0
  119. package/dist/dashboard/out/_next/static/chunks/app/app/onboarding/page-8939b0fc700f7eca.js +1 -0
  120. package/dist/dashboard/out/_next/static/chunks/app/app/page-5af1b6b439858aa6.js +1 -0
  121. package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-f45ecbc3e06134fc.js +1 -0
  122. package/dist/dashboard/out/_next/static/chunks/app/history/{page-abb9ab2d329f56e9.js → page-8c8bed33beb2bf1c.js} +1 -1
  123. package/dist/dashboard/out/_next/static/chunks/app/layout-2433bb48965f4333.js +1 -0
  124. package/dist/dashboard/out/_next/static/chunks/app/login/{page-c22d080201cbd9fb.js → page-16f3b49e55b1e0ed.js} +1 -1
  125. package/dist/dashboard/out/_next/static/chunks/app/metrics/page-ac39dc0cc3c26fa7.js +1 -0
  126. package/dist/dashboard/out/_next/static/chunks/app/{page-77e9c65420a06cfb.js → page-4a5938c18a11a654.js} +1 -1
  127. package/dist/dashboard/out/_next/static/chunks/app/pricing/page-982a7000fee44014.js +1 -0
  128. package/dist/dashboard/out/_next/static/chunks/app/providers/page-ac3a6ac433fd6001.js +1 -0
  129. package/dist/dashboard/out/_next/static/chunks/app/providers/setup/[provider]/page-09f9caae98a18c09.js +1 -0
  130. package/dist/dashboard/out/_next/static/chunks/app/signup/{page-68d34f50baa8ab6b.js → page-547dd0ca55ecd0ba.js} +1 -1
  131. package/dist/dashboard/out/_next/static/chunks/{main-ed4e1fb6f29c34cf.js → main-2ee6beb2ae96d210.js} +1 -1
  132. package/dist/dashboard/out/_next/static/chunks/{main-app-6e8e8d3ef4e0192a.js → main-app-5d692157a8eb1fd9.js} +1 -1
  133. package/dist/dashboard/out/_next/static/css/85d2af9c7ac74d62.css +1 -0
  134. package/dist/dashboard/out/_next/static/css/fe4b28883eeff359.css +1 -0
  135. package/dist/dashboard/out/app/onboarding.html +1 -1
  136. package/dist/dashboard/out/app/onboarding.txt +3 -3
  137. package/dist/dashboard/out/app.html +1 -1
  138. package/dist/dashboard/out/app.txt +3 -3
  139. package/dist/dashboard/out/apple-icon.png +0 -0
  140. package/dist/dashboard/out/connect-repos.html +1 -1
  141. package/dist/dashboard/out/connect-repos.txt +3 -3
  142. package/dist/dashboard/out/history.html +1 -1
  143. package/dist/dashboard/out/history.txt +3 -3
  144. package/dist/dashboard/out/index.html +1 -1
  145. package/dist/dashboard/out/index.txt +3 -3
  146. package/dist/dashboard/out/login.html +2 -2
  147. package/dist/dashboard/out/login.txt +3 -3
  148. package/dist/dashboard/out/metrics.html +1 -1
  149. package/dist/dashboard/out/metrics.txt +3 -3
  150. package/dist/dashboard/out/pricing.html +2 -2
  151. package/dist/dashboard/out/pricing.txt +3 -3
  152. package/dist/dashboard/out/providers/setup/claude.html +1 -0
  153. package/dist/dashboard/out/providers/setup/claude.txt +8 -0
  154. package/dist/dashboard/out/providers/setup/codex.html +1 -0
  155. package/dist/dashboard/out/providers/setup/codex.txt +8 -0
  156. package/dist/dashboard/out/providers.html +1 -1
  157. package/dist/dashboard/out/providers.txt +3 -3
  158. package/dist/dashboard/out/signup.html +2 -2
  159. package/dist/dashboard/out/signup.txt +3 -3
  160. package/dist/dashboard-server/server.js +316 -12
  161. package/dist/dashboard-server/user-bridge.d.ts +103 -0
  162. package/dist/dashboard-server/user-bridge.js +189 -0
  163. package/dist/protocol/channels.d.ts +205 -0
  164. package/dist/protocol/channels.js +154 -0
  165. package/dist/protocol/types.d.ts +13 -1
  166. package/dist/resiliency/provider-context.js +2 -0
  167. package/dist/shared/cli-auth-config.d.ts +19 -0
  168. package/dist/shared/cli-auth-config.js +58 -2
  169. package/dist/utils/agent-config.js +1 -1
  170. package/dist/wrapper/auth-detection.d.ts +49 -0
  171. package/dist/wrapper/auth-detection.js +192 -0
  172. package/dist/wrapper/base-wrapper.d.ts +153 -0
  173. package/dist/wrapper/base-wrapper.js +393 -0
  174. package/dist/wrapper/client.d.ts +7 -1
  175. package/dist/wrapper/client.js +3 -0
  176. package/dist/wrapper/index.d.ts +1 -0
  177. package/dist/wrapper/index.js +4 -3
  178. package/dist/wrapper/pty-wrapper.d.ts +62 -84
  179. package/dist/wrapper/pty-wrapper.js +154 -180
  180. package/dist/wrapper/tmux-wrapper.d.ts +41 -66
  181. package/dist/wrapper/tmux-wrapper.js +90 -134
  182. package/package.json +4 -2
  183. package/scripts/postinstall.js +11 -155
  184. package/scripts/test-interactive-terminal.sh +248 -0
  185. package/dist/cloud/vault/index.d.ts +0 -76
  186. package/dist/cloud/vault/index.js +0 -219
  187. package/dist/dashboard/out/_next/static/chunks/699-3b1cd6618a45d259.js +0 -1
  188. package/dist/dashboard/out/_next/static/chunks/724-2dae7627550ab88f.js +0 -9
  189. package/dist/dashboard/out/_next/static/chunks/766-1f2dd8cb7f766b0b.js +0 -1
  190. package/dist/dashboard/out/_next/static/chunks/app/app/onboarding/page-3fdfa60e53f2810d.js +0 -1
  191. package/dist/dashboard/out/_next/static/chunks/app/app/page-e6381e5a6e1fbcfd.js +0 -1
  192. package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-3538dfe0ffe984b8.js +0 -1
  193. package/dist/dashboard/out/_next/static/chunks/app/layout-c0d118c0f92d969c.js +0 -1
  194. package/dist/dashboard/out/_next/static/chunks/app/metrics/page-67a3e98d9a43a6ed.js +0 -1
  195. package/dist/dashboard/out/_next/static/chunks/app/pricing/page-b08ed1c34d14434a.js +0 -1
  196. package/dist/dashboard/out/_next/static/chunks/app/providers/page-e88bc117ef7671c3.js +0 -1
  197. package/dist/dashboard/out/_next/static/css/29852f26181969a0.css +0 -1
  198. package/dist/dashboard/out/_next/static/css/7c3ae9e8617d42a5.css +0 -1
  199. package/dist/dashboard/out/_next/static/wPgKJtcOmTFLpUncDg16A/_ssgManifest.js +0 -1
  200. /package/dist/dashboard/out/_next/static/{wPgKJtcOmTFLpUncDg16A → T1tgCqVWHFIkV7ClEtzD7}/_buildManifest.js +0 -0
@@ -0,0 +1,49 @@
1
+ {
2
+ "id": "traj_hf81ey93uz6t",
3
+ "version": 1,
4
+ "task": {
5
+ "title": "Add sidebar section break between agents and human users"
6
+ },
7
+ "status": "completed",
8
+ "startedAt": "2026-01-07T14:18:40.736Z",
9
+ "agents": [
10
+ {
11
+ "name": "khaliqgant",
12
+ "role": "lead",
13
+ "joinedAt": "2026-01-07T14:18:40.736Z"
14
+ }
15
+ ],
16
+ "chapters": [
17
+ {
18
+ "id": "chap_haez0phsckvf",
19
+ "title": "Work",
20
+ "agentName": "default",
21
+ "startedAt": "2026-01-07T14:18:53.712Z",
22
+ "events": [
23
+ {
24
+ "ts": 1767795533713,
25
+ "type": "decision",
26
+ "content": "Added human users section divider in sidebar when viewing agents/projects: Added human users section divider in sidebar when viewing agents/projects",
27
+ "raw": {
28
+ "question": "Added human users section divider in sidebar when viewing agents/projects",
29
+ "chosen": "Added human users section divider in sidebar when viewing agents/projects",
30
+ "alternatives": [],
31
+ "reasoning": "Requested clear separation between agents and human users; border + heading makes the break obvious while keeping team tab intact"
32
+ },
33
+ "significance": "high"
34
+ }
35
+ ],
36
+ "endedAt": "2026-01-07T14:19:04.139Z"
37
+ }
38
+ ],
39
+ "commits": [],
40
+ "filesChanged": [],
41
+ "projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
42
+ "tags": [],
43
+ "completedAt": "2026-01-07T14:19:04.139Z",
44
+ "retrospective": {
45
+ "summary": "Added sidebar section break for human users below agents/projects",
46
+ "approach": "Standard approach",
47
+ "confidence": 0.74
48
+ }
49
+ }
@@ -0,0 +1,31 @@
1
+ # Trajectory: Add sidebar section break between agents and human users
2
+
3
+ > **Status:** ✅ Completed
4
+ > **Confidence:** 74%
5
+ > **Started:** January 7, 2026 at 03:18 PM
6
+ > **Completed:** January 7, 2026 at 03:19 PM
7
+
8
+ ---
9
+
10
+ ## Summary
11
+
12
+ Added sidebar section break for human users below agents/projects
13
+
14
+ **Approach:** Standard approach
15
+
16
+ ---
17
+
18
+ ## Key Decisions
19
+
20
+ ### Added human users section divider in sidebar when viewing agents/projects
21
+ - **Chose:** Added human users section divider in sidebar when viewing agents/projects
22
+ - **Reasoning:** Requested clear separation between agents and human users; border + heading makes the break obvious while keeping team tab intact
23
+
24
+ ---
25
+
26
+ ## Chapters
27
+
28
+ ### 1. Work
29
+ *Agent: default*
30
+
31
+ - Added human users section divider in sidebar when viewing agents/projects: Added human users section divider in sidebar when viewing agents/projects
@@ -0,0 +1,65 @@
1
+ {
2
+ "id": "traj_hfmki2jr9d4r",
3
+ "version": 1,
4
+ "task": {
5
+ "title": "Implement auto workspace access + mobile UI fixes",
6
+ "source": {
7
+ "system": "plain",
8
+ "id": "agent-relay-462"
9
+ }
10
+ },
11
+ "status": "completed",
12
+ "startedAt": "2026-01-05T23:45:03.470Z",
13
+ "agents": [
14
+ {
15
+ "name": "Lead",
16
+ "role": "lead",
17
+ "joinedAt": "2026-01-05T23:45:03.471Z"
18
+ }
19
+ ],
20
+ "chapters": [
21
+ {
22
+ "id": "chap_oltcv5luvqxx",
23
+ "title": "Initial work",
24
+ "agentName": "Lead",
25
+ "startedAt": "2026-01-05T23:45:03.471Z",
26
+ "events": [
27
+ {
28
+ "ts": 1767656918590,
29
+ "type": "decision",
30
+ "content": "Moved OnlineUsersIndicator outside fixed header wrapper: Moved OnlineUsersIndicator outside fixed header wrapper",
31
+ "raw": {
32
+ "question": "Moved OnlineUsersIndicator outside fixed header wrapper",
33
+ "chosen": "Moved OnlineUsersIndicator outside fixed header wrapper",
34
+ "alternatives": [],
35
+ "reasoning": "OnlineUsersIndicator was inside the fixed header on mobile, causing variable header height. The 52px spacer didn't account for it, cutting off content including LogViewer scroll and ThreadPanel close button. Moving it outside fixes both issues."
36
+ },
37
+ "significance": "high"
38
+ },
39
+ {
40
+ "ts": 1767657712589,
41
+ "type": "decision",
42
+ "content": "Implemented auto workspace access via GitHub repo permissions: Implemented auto workspace access via GitHub repo permissions",
43
+ "raw": {
44
+ "question": "Implemented auto workspace access via GitHub repo permissions",
45
+ "chosen": "Implemented auto workspace access via GitHub repo permissions",
46
+ "alternatives": [],
47
+ "reasoning": "Created checkWorkspaceAccess function and requireWorkspaceAccess middleware. Access checks: 1) Owner, 2) Member, 3) GitHub repo access via Nango. Added 5min in-memory cache for performance. Added GET /api/workspaces/accessible endpoint to list all accessible workspaces."
48
+ },
49
+ "significance": "high"
50
+ }
51
+ ],
52
+ "endedAt": "2026-01-06T00:03:49.311Z"
53
+ }
54
+ ],
55
+ "commits": [],
56
+ "filesChanged": [],
57
+ "projectId": "84085b56a3fa",
58
+ "tags": [],
59
+ "completedAt": "2026-01-06T00:03:49.311Z",
60
+ "retrospective": {
61
+ "summary": "Implemented auto workspace access from GitHub repo permissions. Added checkWorkspaceAccess, requireWorkspaceAccess middleware, GET /api/workspaces/accessible endpoint, and findByGithubFullName db query. Git push blocked by credential issue.",
62
+ "approach": "Standard approach",
63
+ "confidence": 0.8
64
+ }
65
+ }
@@ -0,0 +1,37 @@
1
+ # Trajectory: Implement auto workspace access + mobile UI fixes
2
+
3
+ > **Status:** ✅ Completed
4
+ > **Task:** agent-relay-462
5
+ > **Confidence:** 80%
6
+ > **Started:** January 5, 2026 at 11:45 PM
7
+ > **Completed:** January 6, 2026 at 12:03 AM
8
+
9
+ ---
10
+
11
+ ## Summary
12
+
13
+ Implemented auto workspace access from GitHub repo permissions. Added checkWorkspaceAccess, requireWorkspaceAccess middleware, GET /api/workspaces/accessible endpoint, and findByGithubFullName db query. Git push blocked by credential issue.
14
+
15
+ **Approach:** Standard approach
16
+
17
+ ---
18
+
19
+ ## Key Decisions
20
+
21
+ ### Moved OnlineUsersIndicator outside fixed header wrapper
22
+ - **Chose:** Moved OnlineUsersIndicator outside fixed header wrapper
23
+ - **Reasoning:** OnlineUsersIndicator was inside the fixed header on mobile, causing variable header height. The 52px spacer didn't account for it, cutting off content including LogViewer scroll and ThreadPanel close button. Moving it outside fixes both issues.
24
+
25
+ ### Implemented auto workspace access via GitHub repo permissions
26
+ - **Chose:** Implemented auto workspace access via GitHub repo permissions
27
+ - **Reasoning:** Created checkWorkspaceAccess function and requireWorkspaceAccess middleware. Access checks: 1) Owner, 2) Member, 3) GitHub repo access via Nango. Added 5min in-memory cache for performance. Added GET /api/workspaces/accessible endpoint to list all accessible workspaces.
28
+
29
+ ---
30
+
31
+ ## Chapters
32
+
33
+ ### 1. Initial work
34
+ *Agent: Lead*
35
+
36
+ - Moved OnlineUsersIndicator outside fixed header wrapper: Moved OnlineUsersIndicator outside fixed header wrapper
37
+ - Implemented auto workspace access via GitHub repo permissions: Implemented auto workspace access via GitHub repo permissions
@@ -0,0 +1,49 @@
1
+ {
2
+ "id": "traj_lq450ly148uw",
3
+ "version": 1,
4
+ "task": {
5
+ "title": "Dashboard UI fixes, billing improvements, and settings alignment"
6
+ },
7
+ "status": "completed",
8
+ "startedAt": "2026-01-07T10:07:46.226Z",
9
+ "agents": [
10
+ {
11
+ "name": "default",
12
+ "role": "lead",
13
+ "joinedAt": "2026-01-07T10:07:57.932Z"
14
+ }
15
+ ],
16
+ "chapters": [
17
+ {
18
+ "id": "chap_pfmti13b184h",
19
+ "title": "Work",
20
+ "agentName": "default",
21
+ "startedAt": "2026-01-07T10:07:57.932Z",
22
+ "events": [
23
+ {
24
+ "ts": 1767780477933,
25
+ "type": "decision",
26
+ "content": "Fixed Docker build - copy only specific docs snippet files: Fixed Docker build - copy only specific docs snippet files",
27
+ "raw": {
28
+ "question": "Fixed Docker build - copy only specific docs snippet files",
29
+ "chosen": "Fixed Docker build - copy only specific docs snippet files",
30
+ "alternatives": [],
31
+ "reasoning": ".dockerignore excluded docs/ but Dockerfile needed relay snippets. Selective copy cleaner than broad .dockerignore change"
32
+ },
33
+ "significance": "high"
34
+ }
35
+ ],
36
+ "endedAt": "2026-01-07T10:07:58.979Z"
37
+ }
38
+ ],
39
+ "commits": [],
40
+ "filesChanged": [],
41
+ "projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
42
+ "tags": [],
43
+ "completedAt": "2026-01-07T10:07:58.979Z",
44
+ "retrospective": {
45
+ "summary": "Previous session work",
46
+ "approach": "Standard approach",
47
+ "confidence": 0.5
48
+ }
49
+ }
@@ -0,0 +1,31 @@
1
+ # Trajectory: Dashboard UI fixes, billing improvements, and settings alignment
2
+
3
+ > **Status:** ✅ Completed
4
+ > **Confidence:** 50%
5
+ > **Started:** January 7, 2026 at 11:07 AM
6
+ > **Completed:** January 7, 2026 at 11:07 AM
7
+
8
+ ---
9
+
10
+ ## Summary
11
+
12
+ Previous session work
13
+
14
+ **Approach:** Standard approach
15
+
16
+ ---
17
+
18
+ ## Key Decisions
19
+
20
+ ### Fixed Docker build - copy only specific docs snippet files
21
+ - **Chose:** Fixed Docker build - copy only specific docs snippet files
22
+ - **Reasoning:** .dockerignore excluded docs/ but Dockerfile needed relay snippets. Selective copy cleaner than broad .dockerignore change
23
+
24
+ ---
25
+
26
+ ## Chapters
27
+
28
+ ### 1. Work
29
+ *Agent: default*
30
+
31
+ - Fixed Docker build - copy only specific docs snippet files: Fixed Docker build - copy only specific docs snippet files
@@ -0,0 +1,101 @@
1
+ # Trajectory: Multi-server architecture document
2
+
3
+ > **Status:** Completed
4
+ > **Task:** PR-8-update
5
+ > **Started:** January 7, 2026 at 06:00 AM
6
+ > **Completed:** January 7, 2026 at 06:30 AM
7
+ > **Confidence:** 0.9
8
+
9
+ ---
10
+
11
+ ## Summary
12
+
13
+ Created comprehensive multi-server architecture document that supersedes PR #8's federation proposal with realistic current state analysis, detailed implementation roadmap, and agent-actionable specifications.
14
+
15
+ ---
16
+
17
+ ## Key Decisions
18
+
19
+ ### 1. Cloud as authoritative registry vs quorum consensus
20
+ - **Reasoning:** Simpler than Lamport timestamps/quorum, leverages existing PostgreSQL with atomic INSERT ON CONFLICT
21
+
22
+ ### 2. API keys + TLS vs Ed25519 per-message signing
23
+ - **Reasoning:** Simpler to implement, adequate security for initial deployment, can add per-message signing in v2
24
+
25
+ ### 3. Hybrid topology (Hub discovery + P2P messaging)
26
+ - **Reasoning:** Best of both worlds - hub provides registry sync, P2P provides low latency, hub failure doesn't break existing P2P connections
27
+
28
+ ### 4. Organization-centric model vs user-centric
29
+ - **Reasoning:** Enables team billing ($49/user/month) while maintaining backwards compatibility
30
+
31
+ ---
32
+
33
+ ## Learnings
34
+
35
+ 1. **PR #8 over-engineered some aspects** - Cloud-mediated routing works fine for current scale, P2P is the real gap
36
+
37
+ 2. **Cloud as source of truth eliminates consensus complexity** - No need for Lamport timestamps when you have atomic DB operations
38
+
39
+ 3. **E2E delivery confirmation via capture-pane** is critical - Peer ACKs alone don't confirm agent received message
40
+
41
+ 4. **Bounded queues with drop policies** prevent OOM from slow peers
42
+
43
+ 5. **Hybrid topology is the sweet spot** - Hub for discovery, P2P for messaging, cloud as fallback
44
+
45
+ ---
46
+
47
+ ## Chapters
48
+
49
+ ### 1. Research
50
+ *Agent: default*
51
+
52
+ - Explored codebase to document what's actually built today
53
+ - Identified CloudSyncService, MultiProjectClient, project groups as existing cross-server capabilities
54
+ - Documented current limitations: cloud-mediated routing (~100-300ms), no P2P, user-centric billing
55
+
56
+ ### 2. Gap Analysis
57
+ *Agent: default*
58
+
59
+ - Compared PR #8's proposals vs current implementation
60
+ - Identified P2P as main real gap (other proposals over-engineered)
61
+ - Listed 6 gaps with effort estimates totaling 9 weeks
62
+
63
+ ### 3. PR #8 Integration
64
+ *Agent: default*
65
+
66
+ - Reviewed FEDERATION_PROPOSAL.md and FEDERATION_PROPOSAL_REVIEW.md from PR #8
67
+ - Adopted critical insights: E2E delivery confirmation, message deduplication, backpressure
68
+ - Preserved protocol specification (PEER_HELLO, PEER_ROUTE, etc.)
69
+
70
+ ### 4. Agent Implementation Guide
71
+ *Agent: default*
72
+
73
+ - Added Section 8 with directly actionable specifications
74
+ - Provided file paths to create/modify for each phase
75
+ - Included complete code examples (database migrations, service classes)
76
+ - Documented edge cases with resolution code
77
+
78
+ ---
79
+
80
+ ## Edge Cases Handled
81
+
82
+ | Edge Case | Resolution |
83
+ |-----------|------------|
84
+ | User leaves org | Workspaces suspended with 30-day grace period |
85
+ | Org owner tries to leave | Must promote admin first, auto-promote if available |
86
+ | Org deleted | Cascade: cancel Stripe, deregister agents, suspend workspaces, soft delete |
87
+ | Agent name collision | Return helpful error with suggested alternative name |
88
+ | Daemon disconnects | Mark all its agents offline |
89
+ | Cloud unavailable during P2P discovery | Fall back to cached peer list, then cloud-only routing |
90
+ | Both peers connect simultaneously | Deterministic winner by daemon ID comparison |
91
+ | Message in flight when connection drops | Re-queue for P2P retry or cloud fallback |
92
+
93
+ ---
94
+
95
+ ## Files Changed
96
+
97
+ - `docs/MULTI_SERVER_ARCHITECTURE.md` - Created (1200+ lines)
98
+
99
+ ---
100
+
101
+ *Trajectory completed 2026-01-07*
@@ -0,0 +1,27 @@
1
+ {
2
+ "id": "traj_psd9ob0j2ru3",
3
+ "version": 1,
4
+ "task": {
5
+ "title": "Clarify codex rule file location and spawn behavior"
6
+ },
7
+ "status": "completed",
8
+ "startedAt": "2026-01-07T12:37:16.374Z",
9
+ "agents": [
10
+ {
11
+ "name": "khaliqgant",
12
+ "role": "lead",
13
+ "joinedAt": "2026-01-07T12:37:16.389Z"
14
+ }
15
+ ],
16
+ "chapters": [],
17
+ "commits": [],
18
+ "filesChanged": [],
19
+ "projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
20
+ "tags": [],
21
+ "completedAt": "2026-01-07T12:40:48.197Z",
22
+ "retrospective": {
23
+ "summary": "Clarified codex config location and upgrade cause",
24
+ "approach": "Standard approach",
25
+ "confidence": 0.68
26
+ }
27
+ }
@@ -0,0 +1,14 @@
1
+ # Trajectory: Clarify codex rule file location and spawn behavior
2
+
3
+ > **Status:** ✅ Completed
4
+ > **Confidence:** 68%
5
+ > **Started:** January 7, 2026 at 01:37 PM
6
+ > **Completed:** January 7, 2026 at 01:40 PM
7
+
8
+ ---
9
+
10
+ ## Summary
11
+
12
+ Clarified codex config location and upgrade cause
13
+
14
+ **Approach:** Standard approach
@@ -0,0 +1,53 @@
1
+ {
2
+ "id": "traj_ub8csuv3lcv4",
3
+ "version": 1,
4
+ "task": {
5
+ "title": "Fix WebSocket disconnections for workspace instances",
6
+ "source": {
7
+ "system": "plain",
8
+ "id": "workspace-websocket-stability"
9
+ }
10
+ },
11
+ "status": "completed",
12
+ "startedAt": "2026-01-06T18:13:23.603Z",
13
+ "agents": [
14
+ {
15
+ "name": "default",
16
+ "role": "lead",
17
+ "joinedAt": "2026-01-06T18:13:35.723Z"
18
+ }
19
+ ],
20
+ "chapters": [
21
+ {
22
+ "id": "chap_e4vj0j8ig7ma",
23
+ "title": "Work",
24
+ "agentName": "default",
25
+ "startedAt": "2026-01-06T18:13:35.723Z",
26
+ "events": [
27
+ {
28
+ "ts": 1767723215725,
29
+ "type": "decision",
30
+ "content": "Add ping/pong keepalive to main and bridge WebSockets: Add ping/pong keepalive to main and bridge WebSockets",
31
+ "raw": {
32
+ "question": "Add ping/pong keepalive to main and bridge WebSockets",
33
+ "chosen": "Add ping/pong keepalive to main and bridge WebSockets",
34
+ "alternatives": [],
35
+ "reasoning": "Main dashboard and bridge WebSocket endpoints were missing ping/pong keepalive, while logs and presence endpoints had it. Without keepalive, TCP/proxy timeouts kill idle connections (typically 60-120s)."
36
+ },
37
+ "significance": "high"
38
+ }
39
+ ],
40
+ "endedAt": "2026-01-06T18:16:51.462Z"
41
+ }
42
+ ],
43
+ "commits": [],
44
+ "filesChanged": [],
45
+ "projectId": "/home/user/relay",
46
+ "tags": [],
47
+ "completedAt": "2026-01-06T18:16:51.462Z",
48
+ "retrospective": {
49
+ "summary": "Added ping/pong keepalive to main and bridge WebSockets to fix connection instability",
50
+ "approach": "Standard approach",
51
+ "confidence": 0.9
52
+ }
53
+ }
@@ -0,0 +1,32 @@
1
+ # Trajectory: Fix WebSocket disconnections for workspace instances
2
+
3
+ > **Status:** ✅ Completed
4
+ > **Task:** workspace-websocket-stability
5
+ > **Confidence:** 90%
6
+ > **Started:** January 6, 2026 at 06:13 PM
7
+ > **Completed:** January 6, 2026 at 06:16 PM
8
+
9
+ ---
10
+
11
+ ## Summary
12
+
13
+ Added ping/pong keepalive to main and bridge WebSockets to fix connection instability
14
+
15
+ **Approach:** Standard approach
16
+
17
+ ---
18
+
19
+ ## Key Decisions
20
+
21
+ ### Add ping/pong keepalive to main and bridge WebSockets
22
+ - **Chose:** Add ping/pong keepalive to main and bridge WebSockets
23
+ - **Reasoning:** Main dashboard and bridge WebSocket endpoints were missing ping/pong keepalive, while logs and presence endpoints had it. Without keepalive, TCP/proxy timeouts kill idle connections (typically 60-120s).
24
+
25
+ ---
26
+
27
+ ## Chapters
28
+
29
+ ### 1. Work
30
+ *Agent: default*
31
+
32
+ - Add ping/pong keepalive to main and bridge WebSockets: Add ping/pong keepalive to main and bridge WebSockets