agent-relay 2.0.19 → 2.0.21

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 (142) hide show
  1. package/CHANGELOG.md +217 -24
  2. package/bin/relay-pty-darwin-arm64 +0 -0
  3. package/bin/relay-pty-darwin-x64 +0 -0
  4. package/bin/relay-pty-linux-x64 +0 -0
  5. package/dist/dashboard/out/404.html +1 -1
  6. package/dist/dashboard/out/app/onboarding.html +1 -1
  7. package/dist/dashboard/out/app/onboarding.txt +1 -1
  8. package/dist/dashboard/out/app.html +1 -1
  9. package/dist/dashboard/out/app.txt +1 -1
  10. package/dist/dashboard/out/cloud/link.html +1 -1
  11. package/dist/dashboard/out/cloud/link.txt +1 -1
  12. package/dist/dashboard/out/complete-profile.html +1 -1
  13. package/dist/dashboard/out/complete-profile.txt +1 -1
  14. package/dist/dashboard/out/connect-repos.html +1 -1
  15. package/dist/dashboard/out/connect-repos.txt +1 -1
  16. package/dist/dashboard/out/history.html +1 -1
  17. package/dist/dashboard/out/history.txt +1 -1
  18. package/dist/dashboard/out/index.html +1 -1
  19. package/dist/dashboard/out/index.txt +1 -1
  20. package/dist/dashboard/out/login.html +1 -1
  21. package/dist/dashboard/out/login.txt +1 -1
  22. package/dist/dashboard/out/metrics.html +1 -1
  23. package/dist/dashboard/out/metrics.txt +1 -1
  24. package/dist/dashboard/out/pricing.html +1 -1
  25. package/dist/dashboard/out/pricing.txt +1 -1
  26. package/dist/dashboard/out/providers/setup/claude.html +1 -1
  27. package/dist/dashboard/out/providers/setup/claude.txt +1 -1
  28. package/dist/dashboard/out/providers/setup/codex.html +1 -1
  29. package/dist/dashboard/out/providers/setup/codex.txt +1 -1
  30. package/dist/dashboard/out/providers/setup/cursor.html +1 -1
  31. package/dist/dashboard/out/providers/setup/cursor.txt +1 -1
  32. package/dist/dashboard/out/providers.html +1 -1
  33. package/dist/dashboard/out/providers.txt +1 -1
  34. package/dist/dashboard/out/signup.html +1 -1
  35. package/dist/dashboard/out/signup.txt +1 -1
  36. package/package.json +23 -17
  37. package/packages/api-types/package.json +2 -2
  38. package/packages/bridge/dist/spawner.d.ts +2 -0
  39. package/packages/bridge/dist/spawner.js +76 -24
  40. package/packages/bridge/package.json +8 -8
  41. package/packages/cli-tester/README.md +277 -0
  42. package/packages/cli-tester/dist/index.d.ts +21 -0
  43. package/packages/cli-tester/dist/index.js +21 -0
  44. package/packages/cli-tester/dist/utils/credential-check.d.ts +56 -0
  45. package/packages/cli-tester/dist/utils/credential-check.js +230 -0
  46. package/packages/cli-tester/dist/utils/socket-client.d.ts +76 -0
  47. package/packages/cli-tester/dist/utils/socket-client.js +153 -0
  48. package/packages/cli-tester/docker/entrypoint.sh +58 -0
  49. package/packages/cli-tester/package.json +32 -0
  50. package/packages/cli-tester/scripts/clear-auth.sh +101 -0
  51. package/packages/cli-tester/scripts/inject-message.sh +42 -0
  52. package/packages/cli-tester/scripts/start.sh +71 -0
  53. package/packages/cli-tester/scripts/test-cli.sh +56 -0
  54. package/packages/cli-tester/scripts/test-full-spawn.sh +238 -0
  55. package/packages/cli-tester/scripts/test-registration.sh +182 -0
  56. package/packages/cli-tester/scripts/test-setup-flow.sh +202 -0
  57. package/packages/cli-tester/scripts/test-spawn.sh +140 -0
  58. package/packages/cli-tester/scripts/test-with-daemon.sh +247 -0
  59. package/packages/cli-tester/scripts/verify-auth.sh +112 -0
  60. package/packages/cloud/package.json +6 -6
  61. package/packages/config/dist/cli-auth-config.js +65 -0
  62. package/packages/config/package.json +2 -2
  63. package/packages/continuity/package.json +1 -1
  64. package/packages/daemon/dist/router.js +4 -4
  65. package/packages/daemon/dist/server.js +38 -19
  66. package/packages/daemon/dist/spawn-manager.d.ts +4 -0
  67. package/packages/daemon/dist/spawn-manager.js +2 -0
  68. package/packages/daemon/package.json +12 -12
  69. package/packages/dashboard/dist/server.js +4 -0
  70. package/packages/dashboard/package.json +14 -14
  71. package/packages/dashboard/ui-dist/404.html +1 -1
  72. package/packages/dashboard/ui-dist/app/onboarding.html +1 -1
  73. package/packages/dashboard/ui-dist/app/onboarding.txt +1 -1
  74. package/packages/dashboard/ui-dist/app.html +1 -1
  75. package/packages/dashboard/ui-dist/app.txt +1 -1
  76. package/packages/dashboard/ui-dist/cloud/link.html +1 -1
  77. package/packages/dashboard/ui-dist/cloud/link.txt +1 -1
  78. package/packages/dashboard/ui-dist/complete-profile.html +1 -1
  79. package/packages/dashboard/ui-dist/complete-profile.txt +1 -1
  80. package/packages/dashboard/ui-dist/connect-repos.html +1 -1
  81. package/packages/dashboard/ui-dist/connect-repos.txt +1 -1
  82. package/packages/dashboard/ui-dist/history.html +1 -1
  83. package/packages/dashboard/ui-dist/history.txt +1 -1
  84. package/packages/dashboard/ui-dist/index.html +1 -1
  85. package/packages/dashboard/ui-dist/index.txt +1 -1
  86. package/packages/dashboard/ui-dist/login.html +1 -1
  87. package/packages/dashboard/ui-dist/login.txt +1 -1
  88. package/packages/dashboard/ui-dist/metrics.html +1 -1
  89. package/packages/dashboard/ui-dist/metrics.txt +1 -1
  90. package/packages/dashboard/ui-dist/pricing.html +1 -1
  91. package/packages/dashboard/ui-dist/pricing.txt +1 -1
  92. package/packages/dashboard/ui-dist/providers/setup/claude.html +1 -1
  93. package/packages/dashboard/ui-dist/providers/setup/claude.txt +1 -1
  94. package/packages/dashboard/ui-dist/providers/setup/codex.html +1 -1
  95. package/packages/dashboard/ui-dist/providers/setup/codex.txt +1 -1
  96. package/packages/dashboard/ui-dist/providers/setup/cursor.html +1 -1
  97. package/packages/dashboard/ui-dist/providers/setup/cursor.txt +1 -1
  98. package/packages/dashboard/ui-dist/providers.html +1 -1
  99. package/packages/dashboard/ui-dist/providers.txt +1 -1
  100. package/packages/dashboard/ui-dist/signup.html +1 -1
  101. package/packages/dashboard/ui-dist/signup.txt +1 -1
  102. package/packages/dashboard-server/dist/server.js +4 -0
  103. package/packages/dashboard-server/package.json +12 -12
  104. package/packages/hooks/package.json +4 -4
  105. package/packages/mcp/package.json +2 -2
  106. package/packages/memory/package.json +2 -2
  107. package/packages/policy/package.json +2 -2
  108. package/packages/protocol/package.json +1 -1
  109. package/packages/resiliency/package.json +1 -1
  110. package/packages/sdk/README.md +512 -58
  111. package/packages/sdk/dist/client.d.ts +135 -1
  112. package/packages/sdk/dist/client.js +338 -0
  113. package/packages/sdk/dist/index.d.ts +2 -1
  114. package/packages/sdk/dist/index.js +2 -0
  115. package/packages/sdk/dist/logs.d.ts +61 -0
  116. package/packages/sdk/dist/logs.js +95 -0
  117. package/packages/sdk/dist/protocol/index.d.ts +1 -1
  118. package/packages/sdk/dist/protocol/types.d.ts +186 -1
  119. package/packages/sdk/package.json +3 -3
  120. package/packages/spawner/package.json +2 -2
  121. package/packages/state/package.json +1 -1
  122. package/packages/storage/dist/sqlite-adapter.js +2 -0
  123. package/packages/storage/package.json +2 -2
  124. package/packages/telemetry/package.json +1 -1
  125. package/packages/trajectory/package.json +2 -2
  126. package/packages/user-directory/package.json +2 -2
  127. package/packages/utils/package.json +1 -1
  128. package/packages/wrapper/dist/base-wrapper.js +27 -10
  129. package/packages/wrapper/dist/relay-pty-orchestrator.js +16 -16
  130. package/packages/wrapper/dist/tmux-wrapper.js +16 -0
  131. package/packages/wrapper/package.json +7 -7
  132. package/scripts/hooks/install.sh +16 -0
  133. package/scripts/hooks/pre-commit +60 -0
  134. package/specs/PRIMITIVES_ROADMAP.md +2154 -0
  135. /package/dist/dashboard/out/_next/static/{cREcLZyPb-5NyVZje0Qfe → 7MZPqYkVGw3EGzVBkVmY9}/_buildManifest.js +0 -0
  136. /package/dist/dashboard/out/_next/static/{cREcLZyPb-5NyVZje0Qfe → 7MZPqYkVGw3EGzVBkVmY9}/_ssgManifest.js +0 -0
  137. /package/packages/dashboard/ui-dist/_next/static/{N3ajGnJqRESKyCjDvyU52 → 7MZPqYkVGw3EGzVBkVmY9}/_buildManifest.js +0 -0
  138. /package/packages/dashboard/ui-dist/_next/static/{N3ajGnJqRESKyCjDvyU52 → 7MZPqYkVGw3EGzVBkVmY9}/_ssgManifest.js +0 -0
  139. /package/packages/dashboard/ui-dist/_next/static/{UQiyWwBxIP-9it3GYVBDL → iJ3Uiz3IrqUJL7IxKZHiV}/_buildManifest.js +0 -0
  140. /package/packages/dashboard/ui-dist/_next/static/{UQiyWwBxIP-9it3GYVBDL → iJ3Uiz3IrqUJL7IxKZHiV}/_ssgManifest.js +0 -0
  141. /package/packages/dashboard/ui-dist/_next/static/{cREcLZyPb-5NyVZje0Qfe → l-jd878zUJ_IlraqEWMZc}/_buildManifest.js +0 -0
  142. /package/packages/dashboard/ui-dist/_next/static/{cREcLZyPb-5NyVZje0Qfe → l-jd878zUJ_IlraqEWMZc}/_ssgManifest.js +0 -0
@@ -0,0 +1,60 @@
1
+ #!/bin/sh
2
+ # Pre-commit hook for agent-relay
3
+ # Handles Rust formatting and bd (beads) sync
4
+ #
5
+ # Install: cp scripts/hooks/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
6
+ # Or run: npm run hooks:install
7
+
8
+ # ============================================================
9
+ # Rust formatting (auto-format staged .rs files)
10
+ # ============================================================
11
+ RUST_STAGED=$(git diff --cached --name-only --diff-filter=ACM | grep '\.rs$' || true)
12
+ if [ -n "$RUST_STAGED" ]; then
13
+ if command -v rustfmt >/dev/null 2>&1; then
14
+ echo "Formatting Rust files..."
15
+ for file in $RUST_STAGED; do
16
+ if [ -f "$file" ]; then
17
+ rustfmt "$file" 2>/dev/null || true
18
+ git add "$file"
19
+ fi
20
+ done
21
+ else
22
+ echo "Warning: rustfmt not found, skipping Rust formatting" >&2
23
+ echo "Install with: rustup component add rustfmt" >&2
24
+ fi
25
+ fi
26
+
27
+ # ============================================================
28
+ # bd (beads) sync - flush pending changes before commit
29
+ # ============================================================
30
+ # Check if bd is available
31
+ if ! command -v bd >/dev/null 2>&1; then
32
+ exit 0
33
+ fi
34
+
35
+ # Check if we're in a bd workspace
36
+ if [ ! -d .beads ]; then
37
+ exit 0
38
+ fi
39
+
40
+ # Check if sync-branch is configured (if so, .beads goes to separate branch)
41
+ SYNC_BRANCH="${BEADS_SYNC_BRANCH:-}"
42
+ if [ -z "$SYNC_BRANCH" ] && [ -f .beads/config.yaml ]; then
43
+ SYNC_BRANCH=$(grep -E '^sync-branch:' .beads/config.yaml 2>/dev/null | head -1 | sed 's/^sync-branch:[[:space:]]*//' | sed 's/^["'"'"']//' | sed 's/["'"'"']$//')
44
+ fi
45
+ if [ -n "$SYNC_BRANCH" ]; then
46
+ exit 0
47
+ fi
48
+
49
+ # Flush pending changes
50
+ if ! bd sync --flush-only >/dev/null 2>&1; then
51
+ echo "Error: Failed to flush bd changes" >&2
52
+ exit 1
53
+ fi
54
+
55
+ # Stage JSONL files
56
+ for f in .beads/beads.jsonl .beads/issues.jsonl .beads/deletions.jsonl; do
57
+ [ -f "$f" ] && git add "$f" 2>/dev/null || true
58
+ done
59
+
60
+ exit 0