agent-relay-server 0.105.0 → 0.105.2

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 (66) hide show
  1. package/docs/openapi.json +1 -1
  2. package/package.json +4 -2
  3. package/public/assets/{MessageBubble-CHor4Sxp.js → MessageBubble-CPYQQLDI.js} +2 -2
  4. package/public/assets/{MessageBubble-CHor4Sxp.js.map → MessageBubble-CPYQQLDI.js.map} +1 -1
  5. package/public/assets/{PlanGraphPanel-jHfkQBX6.js → PlanGraphPanel-B7xZt5DI.js} +2 -2
  6. package/public/assets/{PlanGraphPanel-jHfkQBX6.js.map → PlanGraphPanel-B7xZt5DI.js.map} +1 -1
  7. package/public/assets/{activity-DDXS6LsX.js → activity-UKQrQ8_0.js} +2 -2
  8. package/public/assets/{activity-DDXS6LsX.js.map → activity-UKQrQ8_0.js.map} +1 -1
  9. package/public/assets/{agent-profiles-Cn8lCTkg.js → agent-profiles-Zr_5nNEJ.js} +2 -2
  10. package/public/assets/{agent-profiles-Cn8lCTkg.js.map → agent-profiles-Zr_5nNEJ.js.map} +1 -1
  11. package/public/assets/{agents-DBTdcFFz.js → agents-FdrfmJsj.js} +2 -2
  12. package/public/assets/{agents-DBTdcFFz.js.map → agents-FdrfmJsj.js.map} +1 -1
  13. package/public/assets/{automation-L9wq4y5F.js → automation-DlEcJvgu.js} +2 -2
  14. package/public/assets/{automation-L9wq4y5F.js.map → automation-DlEcJvgu.js.map} +1 -1
  15. package/public/assets/{chat-BzMj_PO6.js → chat-D1bunuI-.js} +2 -2
  16. package/public/assets/{chat-BzMj_PO6.js.map → chat-D1bunuI-.js.map} +1 -1
  17. package/public/assets/{formatted-body-impl-CFWHLkCY.js → formatted-body-impl-4v9SkUD1.js} +2 -2
  18. package/public/assets/{formatted-body-impl-CFWHLkCY.js.map → formatted-body-impl-4v9SkUD1.js.map} +1 -1
  19. package/public/assets/{index-aCfZQ7LY.js → index-Vmhw442d.js} +5 -5
  20. package/public/assets/{index-aCfZQ7LY.js.map → index-Vmhw442d.js.map} +1 -1
  21. package/public/assets/{insights-BuPFE0tf.js → insights-CntgHcTp.js} +2 -2
  22. package/public/assets/{insights-BuPFE0tf.js.map → insights-CntgHcTp.js.map} +1 -1
  23. package/public/assets/{maintenance-wYwJ7w6h.js → maintenance-Dw7frQtu.js} +2 -2
  24. package/public/assets/{maintenance-wYwJ7w6h.js.map → maintenance-Dw7frQtu.js.map} +1 -1
  25. package/public/assets/{managed-agents-CKaYD93I.js → managed-agents-Bj--bFmZ.js} +2 -2
  26. package/public/assets/{managed-agents-CKaYD93I.js.map → managed-agents-Bj--bFmZ.js.map} +1 -1
  27. package/public/assets/{markdown-preview-impl-bf4eDQUM.js → markdown-preview-impl-DGLCocU8.js} +2 -2
  28. package/public/assets/{markdown-preview-impl-bf4eDQUM.js.map → markdown-preview-impl-DGLCocU8.js.map} +1 -1
  29. package/public/assets/{memory-DIneEza9.js → memory-yj2MIxUA.js} +2 -2
  30. package/public/assets/{memory-DIneEza9.js.map → memory-yj2MIxUA.js.map} +1 -1
  31. package/public/assets/{messages-DP9Vv_wh.js → messages-BT5mL7iz.js} +2 -2
  32. package/public/assets/{messages-DP9Vv_wh.js.map → messages-BT5mL7iz.js.map} +1 -1
  33. package/public/assets/{orchestrators-CAnKjxdO.js → orchestrators-BVDAhrPk.js} +2 -2
  34. package/public/assets/{orchestrators-CAnKjxdO.js.map → orchestrators-BVDAhrPk.js.map} +1 -1
  35. package/public/assets/{overview-B98U3C-y.js → overview-DlqJIqYK.js} +2 -2
  36. package/public/assets/{overview-B98U3C-y.js.map → overview-DlqJIqYK.js.map} +1 -1
  37. package/public/assets/{pairs-DVeeuxhY.js → pairs-DQ4tNCo3.js} +2 -2
  38. package/public/assets/{pairs-DVeeuxhY.js.map → pairs-DQ4tNCo3.js.map} +1 -1
  39. package/public/assets/prompt-settings-DlsqOP0C.js +2 -0
  40. package/public/assets/prompt-settings-DlsqOP0C.js.map +1 -0
  41. package/public/assets/{registry-DlLZyW7_.js → registry-Cw2fdWrn.js} +2 -2
  42. package/public/assets/{registry-DlLZyW7_.js.map → registry-Cw2fdWrn.js.map} +1 -1
  43. package/public/assets/{security-Bo4Ty3lz.js → security-ucr7IT1V.js} +2 -2
  44. package/public/assets/{security-Bo4Ty3lz.js.map → security-ucr7IT1V.js.map} +1 -1
  45. package/public/assets/{select-BguZ80M8.js → select-D8UWCtYZ.js} +2 -2
  46. package/public/assets/{select-BguZ80M8.js.map → select-D8UWCtYZ.js.map} +1 -1
  47. package/public/assets/{settings-CpX9Xw2j.js → settings-Dvf_ps1B.js} +2 -2
  48. package/public/assets/{settings-CpX9Xw2j.js.map → settings-Dvf_ps1B.js.map} +1 -1
  49. package/public/assets/{tasks-Cg1HXY9l.js → tasks-jRUvxUd5.js} +2 -2
  50. package/public/assets/{tasks-Cg1HXY9l.js.map → tasks-jRUvxUd5.js.map} +1 -1
  51. package/public/assets/{teams-BFcYunxB.js → teams-Dn0yggD-.js} +2 -2
  52. package/public/assets/{teams-BFcYunxB.js.map → teams-Dn0yggD-.js.map} +1 -1
  53. package/public/assets/{terminal-viewer-impl-CF2EBa2K.js → terminal-viewer-impl-fLly20IP.js} +2 -2
  54. package/public/assets/{terminal-viewer-impl-CF2EBa2K.js.map → terminal-viewer-impl-fLly20IP.js.map} +1 -1
  55. package/public/assets/{user-avatar-D1ffSClz.js → user-avatar-BWLUHt2e.js} +2 -2
  56. package/public/assets/{user-avatar-D1ffSClz.js.map → user-avatar-BWLUHt2e.js.map} +1 -1
  57. package/public/assets/{work-queue-DV36cxjp.js → work-queue-BAnNY0xE.js} +2 -2
  58. package/public/assets/{work-queue-DV36cxjp.js.map → work-queue-BAnNY0xE.js.map} +1 -1
  59. package/public/index.html +1 -1
  60. package/runner/plugins/claude/.claude-plugin/plugin.json +1 -1
  61. package/runner/plugins/claude/monitors/relay-monitor.provisioned.mjs +2 -2
  62. package/src/db/prompt-templates.ts +5 -10
  63. package/src/prompt-resolver.ts +24 -24
  64. package/public/assets/prompt-settings-Df-0ZMJ5.js +0 -2
  65. package/public/assets/prompt-settings-Df-0ZMJ5.js.map +0 -1
  66. package/src/prompt-template-defaults-runner.ts +0 -136
@@ -1,136 +0,0 @@
1
- import type { SeedTemplate } from "./db/prompt-templates";
2
-
3
- function lines(...parts: string[]): string {
4
- return parts.join("\n");
5
- }
6
-
7
- export const RUNNER_PROMPT_TEMPLATE_DEFAULTS = [
8
- {
9
- slug: "relay.manual.claude",
10
- category: "runner",
11
- title: "Claude Relay Manual",
12
- description: "Bundled CLAUDE.md relay manual written into provisioned Claude homes.",
13
- template: lines(
14
- "# Agent Relay",
15
- "",
16
- "- Agent Relay messages may come from humans, channels, or other agents.",
17
- "- Read the delivered message body and do the requested work.",
18
- "- Reply through Relay only when the sender still needs an answer.",
19
- "- Prefer the inline MCP tools `relay_reply` or `relay_send_message` for the actual answer to an incoming Relay message.",
20
- "- Do not send `/message` with the useful answer and then a separate `/reply` that only says it was sent.",
21
- "- If multiple Relay messages arrive together, answer once to the latest relevant message and cover the current request. Do not separately acknowledge stale greetings or context.",
22
- "- If the useful response was already delivered through Relay, do not send an extra \"sent\", \"done\", or \"drafts sent\" confirmation unless the user explicitly asked for one.",
23
- "- No reply is needed for pure info messages, passive acknowledgements, or reactions that do not ask for action.",
24
- "- NEVER reply to a notification-class message. The server marks these and renders a single `↪ Notification — no reply needed.` line instead of the reply reminder — it is a fire-and-forget signal (a merge notice, lifecycle event, or FYI). Act on the information if relevant, but do not send any reply, status confirmation, or reaction back.",
25
- "- Use `agent-relay /react <messageId> <emoji>` instead of a text reply for lightweight acknowledgement, approval, thanks, or \"good job\" after a completed work update.",
26
- "- Good reaction uses: acknowledge praise with 👍 or ❤️, mark a completed handoff as seen, approve a proposed next step, or acknowledge a passive FYI.",
27
- "- Do not use reactions when the user asked a question, gave a new task, reported a bug, or needs a textual result.",
28
- "- A thumbs-up reaction to your question means approval to proceed. A thumbs-up reaction to your completed status means no further action.",
29
- "- Use `agent-relay get-message <id>` when a delivered preview is truncated.",
30
- "- Use `agent-relay /status --json` to inspect your current Relay identity and `agent-relay /guide` for command details.",
31
- ),
32
- defaultTemplate: lines(
33
- "# Agent Relay",
34
- "",
35
- "- Agent Relay messages may come from humans, channels, or other agents.",
36
- "- Read the delivered message body and do the requested work.",
37
- "- Reply through Relay only when the sender still needs an answer.",
38
- "- Prefer the inline MCP tools `relay_reply` or `relay_send_message` for the actual answer to an incoming Relay message.",
39
- "- Do not send `/message` with the useful answer and then a separate `/reply` that only says it was sent.",
40
- "- If multiple Relay messages arrive together, answer once to the latest relevant message and cover the current request. Do not separately acknowledge stale greetings or context.",
41
- "- If the useful response was already delivered through Relay, do not send an extra \"sent\", \"done\", or \"drafts sent\" confirmation unless the user explicitly asked for one.",
42
- "- No reply is needed for pure info messages, passive acknowledgements, or reactions that do not ask for action.",
43
- "- NEVER reply to a notification-class message. The server marks these and renders a single `↪ Notification — no reply needed.` line instead of the reply reminder — it is a fire-and-forget signal (a merge notice, lifecycle event, or FYI). Act on the information if relevant, but do not send any reply, status confirmation, or reaction back.",
44
- "- Use `agent-relay /react <messageId> <emoji>` instead of a text reply for lightweight acknowledgement, approval, thanks, or \"good job\" after a completed work update.",
45
- "- Good reaction uses: acknowledge praise with 👍 or ❤️, mark a completed handoff as seen, approve a proposed next step, or acknowledge a passive FYI.",
46
- "- Do not use reactions when the user asked a question, gave a new task, reported a bug, or needs a textual result.",
47
- "- A thumbs-up reaction to your question means approval to proceed. A thumbs-up reaction to your completed status means no further action.",
48
- "- Use `agent-relay get-message <id>` when a delivered preview is truncated.",
49
- "- Use `agent-relay /status --json` to inspect your current Relay identity and `agent-relay /guide` for command details.",
50
- ),
51
- variables: [],
52
- },
53
- {
54
- slug: "relay.context.claude",
55
- category: "runner",
56
- title: "Claude Relay Context",
57
- description: "One-line relay context note for Claude sessions.",
58
- template: "[agent-relay] Relay is available. Follow the Agent Relay rules in CLAUDE.md when present, or run agent-relay /guide. Reply through Relay only when a response is needed; do not send status-only follow-ups after the useful Relay response was already delivered.",
59
- defaultTemplate: "[agent-relay] Relay is available. Follow the Agent Relay rules in CLAUDE.md when present, or run agent-relay /guide. Reply through Relay only when a response is needed; do not send status-only follow-ups after the useful Relay response was already delivered.",
60
- variables: [],
61
- },
62
- {
63
- slug: "relay.context.claude.readonly",
64
- category: "runner",
65
- title: "Claude Relay Context (Read Only)",
66
- description: "Read-only relay context note for Claude sessions.",
67
- template: lines(
68
- "[agent-relay] Relay is available. Follow the Agent Relay rules in CLAUDE.md when present, or run agent-relay /guide. Reply through Relay only when a response is needed; do not send status-only follow-ups after the useful Relay response was already delivered.",
69
- "",
70
- "This Claude session is running with restricted read-only Relay permissions. Do not invoke Agent Relay skills. If you need to reply, use this Bash command shape:",
71
- "",
72
- "agent-relay /reply <messageId> \"<your reply>\"",
73
- ),
74
- defaultTemplate: lines(
75
- "[agent-relay] Relay is available. Follow the Agent Relay rules in CLAUDE.md when present, or run agent-relay /guide. Reply through Relay only when a response is needed; do not send status-only follow-ups after the useful Relay response was already delivered.",
76
- "",
77
- "This Claude session is running with restricted read-only Relay permissions. Do not invoke Agent Relay skills. If you need to reply, use this Bash command shape:",
78
- "",
79
- "agent-relay /reply <messageId> \"<your reply>\"",
80
- ),
81
- variables: [],
82
- },
83
- {
84
- slug: "relay.context.codex",
85
- category: "runner",
86
- title: "Codex Relay Context",
87
- description: "Relay context note injected into Codex sessions.",
88
- template: "[agent-relay] You are connected to Agent Relay, a real-time message bus between agents and users. When you receive a relay message: read it, do what it asks, and reply through the relay when a text response is needed. Use agent-relay /react <messageId> <emoji> for lightweight acknowledgement or approval. If Relay MCP tools are available, prefer relay_reply, relay_get_message, relay_get_thread, relay_send_message, relay_upload_artifact, relay_attach_artifact, relay_agent_status, relay_find_agents, relay_compact_and_resume, relay_recall, relay_spawn_agent, and relay_shutdown_agent. You never need to know or pass your own agent id — relay fills it from your token; use relay_whoami only if you need to reason about yourself. relay_compact_and_resume is for clean-seam self-resume after a context advisory: pass workingState and optional ruledOut; Relay owns the objective envelope. relay_recall searches your own archived pre-compaction segments by keyword when a discarded detail is needed. relay_spawn_targets / relay_spawn_agent / relay_shutdown_agent only appear if your profile grants spawning (a live-children quota); when present, call relay_spawn_targets FIRST for the live host/provider/model matrix + your quota, then stand up long-living child agents and shut down your own — find them later with relay_find_agents spawnedBy:me. For replies, prefer relay_reply or relay_send_message; CLI fallback: agent-relay /reply <messageId> \"<your reply>\". If a delivered message says it was truncated, fetch the full body with: agent-relay get-message <messageId>. For command details, run: agent-relay /guide",
89
- defaultTemplate: "[agent-relay] You are connected to Agent Relay, a real-time message bus between agents and users. When you receive a relay message: read it, do what it asks, and reply through the relay when a text response is needed. Use agent-relay /react <messageId> <emoji> for lightweight acknowledgement or approval. If Relay MCP tools are available, prefer relay_reply, relay_get_message, relay_get_thread, relay_send_message, relay_upload_artifact, relay_attach_artifact, relay_agent_status, relay_find_agents, relay_compact_and_resume, relay_recall, relay_spawn_agent, and relay_shutdown_agent. You never need to know or pass your own agent id — relay fills it from your token; use relay_whoami only if you need to reason about yourself. relay_compact_and_resume is for clean-seam self-resume after a context advisory: pass workingState and optional ruledOut; Relay owns the objective envelope. relay_recall searches your own archived pre-compaction segments by keyword when a discarded detail is needed. relay_spawn_targets / relay_spawn_agent / relay_shutdown_agent only appear if your profile grants spawning (a live-children quota); when present, call relay_spawn_targets FIRST for the live host/provider/model matrix + your quota, then stand up long-living child agents and shut down your own — find them later with relay_find_agents spawnedBy:me. For replies, prefer relay_reply or relay_send_message; CLI fallback: agent-relay /reply <messageId> \"<your reply>\". If a delivered message says it was truncated, fetch the full body with: agent-relay get-message <messageId>. For command details, run: agent-relay /guide",
90
- variables: [],
91
- },
92
- {
93
- slug: "workspace.lifecycle",
94
- category: "runner",
95
- title: "Runner Workspace Lifecycle Note",
96
- description: "Lifecycle note injected by the runner for isolated workspaces.",
97
- template: lines(
98
- "[agent-relay] Isolated workspace: you are in a git worktree on branch {{branch}}, based on {{baseRef}} — NOT the main checkout. Other agents may work in parallel and land to {{baseRef}}, so {{baseRef}} will move under you. That is expected; don't fight it.",
99
- "Do NOT push this branch yourself — not with `git push`, not with `tl push` or any other push wrapper, and do not manually rebase or merge. A steward may be auto-rebasing this branch in the background; pushing concurrently races it and can leave the worktree mid-rebase. Just commit your work here. When the task is done, run `agent-relay workspace ready` — Relay rebases onto the latest {{baseRef}}, lands your work, and pushes for you. If the installed `agent-relay` binary is stale and says the workspace command is unknown, run the repo-local fallback: `bun src/index.ts workspace ready`.",
100
- "After `ready`, the status becomes `review_requested` — this is the NORMAL, healthy hand-off state, NOT an escalation or a stall. Relay auto-merges clean rebases roughly every 2 minutes; a steward agent is spawned (after a short delay) ONLY if it can't land deterministically, so seeing no steward means it's working, not stuck. Stop your turn after `ready` and go idle; do NOT wait or poll the steward queue. Relay wakes you with `landed-success` when your branch lands and refreshes, or `landed-failure` if landing fatally fails. On success you'll be on a fresh rebased branch whose name gains a `--N` suffix — expected, keep working there. Never `cd` into the main checkout, and never merge/push/resolve conflicts yourself — Relay and the steward own all of that. `agent-relay workspace status` anytime shows your current state and the exact next step.",
101
- ),
102
- defaultTemplate: lines(
103
- "[agent-relay] Isolated workspace: you are in a git worktree on branch {{branch}}, based on {{baseRef}} — NOT the main checkout. Other agents may work in parallel and land to {{baseRef}}, so {{baseRef}} will move under you. That is expected; don't fight it.",
104
- "Do NOT push this branch yourself — not with `git push`, not with `tl push` or any other push wrapper, and do not manually rebase or merge. A steward may be auto-rebasing this branch in the background; pushing concurrently races it and can leave the worktree mid-rebase. Just commit your work here. When the task is done, run `agent-relay workspace ready` — Relay rebases onto the latest {{baseRef}}, lands your work, and pushes for you. If the installed `agent-relay` binary is stale and says the workspace command is unknown, run the repo-local fallback: `bun src/index.ts workspace ready`.",
105
- "After `ready`, the status becomes `review_requested` — this is the NORMAL, healthy hand-off state, NOT an escalation or a stall. Relay auto-merges clean rebases roughly every 2 minutes; a steward agent is spawned (after a short delay) ONLY if it can't land deterministically, so seeing no steward means it's working, not stuck. Stop your turn after `ready` and go idle; do NOT wait or poll the steward queue. Relay wakes you with `landed-success` when your branch lands and refreshes, or `landed-failure` if landing fatally fails. On success you'll be on a fresh rebased branch whose name gains a `--N` suffix — expected, keep working there. Never `cd` into the main checkout, and never merge/push/resolve conflicts yourself — Relay and the steward own all of that. `agent-relay workspace status` anytime shows your current state and the exact next step.",
106
- ),
107
- variables: ["branch", "baseRef"],
108
- },
109
- {
110
- slug: "workspace.deps.symlink",
111
- category: "runner",
112
- title: "Runner Workspace Deps Symlink Note",
113
- description: "Symlinked node_modules caveat injected by the runner.",
114
- template: "[agent-relay] Isolated workspace: this is a git worktree, and its node_modules are SYMLINKED from the main checkout — dependencies are already installed and ready to use. Do NOT run a clean dependency install (`bun install` / `npm install` / `pnpm install`): it writes through the symlink and mutates the main checkout's shared node_modules. Build caches written under node_modules are shared too. If typecheck/build fails on a missing module (a dependency added to the base AFTER this worktree was created), run `agent-relay workspace deps` — it re-provisions only the stale dirs with a real isolated install, safely, without touching the shared node_modules. If you genuinely need to change dependencies in isolation, ask the host to spawn with AGENT_RELAY_WORKSPACE_DEPS=install.",
115
- defaultTemplate: "[agent-relay] Isolated workspace: this is a git worktree, and its node_modules are SYMLINKED from the main checkout — dependencies are already installed and ready to use. Do NOT run a clean dependency install (`bun install` / `npm install` / `pnpm install`): it writes through the symlink and mutates the main checkout's shared node_modules. Build caches written under node_modules are shared too. If typecheck/build fails on a missing module (a dependency added to the base AFTER this worktree was created), run `agent-relay workspace deps` — it re-provisions only the stale dirs with a real isolated install, safely, without touching the shared node_modules. If you genuinely need to change dependencies in isolation, ask the host to spawn with AGENT_RELAY_WORKSPACE_DEPS=install.",
116
- variables: [],
117
- },
118
- {
119
- slug: "workspace.deps.none",
120
- category: "runner",
121
- title: "Runner Workspace Deps None Note",
122
- description: "Missing dependency provisioning caveat injected by the runner.",
123
- template: "[agent-relay] Isolated workspace: dependencies were not provisioned (AGENT_RELAY_WORKSPACE_DEPS=none). You may need to install node_modules before typecheck/test/build work.",
124
- defaultTemplate: "[agent-relay] Isolated workspace: dependencies were not provisioned (AGENT_RELAY_WORKSPACE_DEPS=none). You may need to install node_modules before typecheck/test/build work.",
125
- variables: [],
126
- },
127
- {
128
- slug: "workspace.symlinks",
129
- category: "runner",
130
- title: "Runner Workspace Symlink Note",
131
- description: "Write-through symlink caveat injected by the runner.",
132
- template: "[agent-relay] Isolated workspace: these untracked paths are SYMLINKED from the main checkout: {{linked}}. They resolve to the real files in main, so editing or deleting them writes THROUGH to main — treat them as read-only unless you intend to change main.",
133
- defaultTemplate: "[agent-relay] Isolated workspace: these untracked paths are SYMLINKED from the main checkout: {{linked}}. They resolve to the real files in main, so editing or deleting them writes THROUGH to main — treat them as read-only unless you intend to change main.",
134
- variables: ["linked"],
135
- },
136
- ] as const satisfies readonly SeedTemplate[];