agent-relay-server 0.68.1 → 0.69.1

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/docs/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Agent Relay API",
5
- "version": "0.68.1",
5
+ "version": "0.69.1",
6
6
  "description": "Real-time message bus for inter-agent communication. Agent-first: this spec is designed for machine consumption — agents can self-discover the full API surface via GET /api/spec.",
7
7
  "license": {
8
8
  "name": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-server",
3
- "version": "0.68.1",
3
+ "version": "0.69.1",
4
4
  "description": "Lightweight HTTP message relay for inter-agent communication across machines",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
@@ -49,7 +49,12 @@ const VALID_PERMISSION_MODES = ["open", "guarded", "read-only"] as const;
49
49
  const VALID_POLICY_MODES = ["always-on", "on-demand"] as const;
50
50
  const VALID_MANAGED_STATUSES = ["stopped", "starting", "running", "stopping", "backoff", "failed"] as const;
51
51
  const COORDINATION_CHARTER = "Coordination charter: stay at helicopter altitude; delegate implementation to spawned workers; write briefs, maintain the blackboard and plan DAG; coordinate, review, and release; do not drift into mechanical edits when a worker can do them; protect your context for coordination.";
52
- const BUILT_IN_AGENT_PROFILE_NAMES = new Set(["default-relay", "minimal", "isolated-research", "vanilla", "coordinator", "worker", "reviewer"]);
52
+ const OPS_ASSISTANT_BRIEF = [
53
+ "Ops-assistant standing brief: execute mechanical operations on your coordinator's behalf: test suites, release commands such as `bun run release`, smoke and verification probes, gates, and host/version/status checks.",
54
+ "Hold and apply session-local ops conventions the coordinator gives you. Report crisp outcomes only: command/gate, pass/fail, commit/version/host evidence, and the next blocker when one exists. Do not dump logs unless asked.",
55
+ "Do not make strategy, design, scope, or release-timing calls. Escalate those decisions to your spawn-parent. Report operational results to your spawn-parent by default and keep their context clean.",
56
+ ].join("\n");
57
+ const BUILT_IN_AGENT_PROFILE_NAMES = new Set(["default-relay", "minimal", "isolated-research", "vanilla", "coordinator", "ops-assistant", "worker", "reviewer"]);
53
58
 
54
59
  const BUILT_IN_AGENT_PROFILES: AgentProfile[] = [
55
60
  agentProfileDefaults({ name: "default-relay", description: "Relay-aware spawned agent with bundled Relay context, skills, plugins, and status integration.", base: "host" }),
@@ -57,6 +62,7 @@ const BUILT_IN_AGENT_PROFILES: AgentProfile[] = [
57
62
  agentProfileDefaults({ name: "isolated-research", description: "Strict profile for autonomous research runs: repo context only, no Relay prompt surface, no global extras where supported.", base: "isolated" }),
58
63
  agentProfileDefaults({ name: "vanilla", description: "Zero host bleed (#552): isolated provider home with host plugins, skills, hooks, MCP, and the CLAUDE.md/AGENTS.md cascade (repo + global) all suppressed at launch. Relay provisions any surface explicitly per profile.", base: "vanilla" }),
59
64
  agentProfileDefaults({ name: "coordinator", description: "Relay-aware coordination lead for spawning worker teams, maintaining shared state, and driving review and release.", base: "host", instructions: { append: [COORDINATION_CHARTER], repoInstructions: "allow", globalInstructions: "allow" }, maxSpawnedAgents: 8 }),
65
+ agentProfileDefaults({ name: "ops-assistant", description: "Relay-aware ops lieutenant for a coordinator: runs tests, releases, smoke probes, gates, and host checks, then reports crisp outcomes back up.", provider: "codex", base: "host", instructions: { append: [OPS_ASSISTANT_BRIEF], repoInstructions: "allow", globalInstructions: "allow" }, permissions: { mode: "open", filesystem: "host" } }),
60
66
  agentProfileDefaults({ name: "worker", description: "Relay-aware focused implementer with open approval posture and no delegated spawn capability.", base: "host", permissions: { mode: "open", filesystem: "host" } }),
61
67
  agentProfileDefaults({ name: "reviewer", description: "Relay-aware read-only reviewer for audit and review passes without file writes.", base: "host", permissions: { mode: "read-only", filesystem: "host" } }),
62
68
  ].map((profile) => ({ ...profile, builtIn: true }));
@@ -160,10 +160,12 @@ const REPLY_DUPLICATE_WINDOW_MS = 2 * 60 * 1000;
160
160
 
161
161
  function findRecentDuplicateReply(input: SendMessageInput, threadId: number | null, now: number, hasAttachments: boolean): Message | null {
162
162
  if (!input.replyTo || threadId === null || hasAttachments) return null;
163
+ const kind = inferMessageKind(input);
163
164
  const row = getDb().query(`
164
165
  ${MSG_SELECT}
165
166
  WHERE m.from_agent = ?
166
167
  AND m.to_target = ?
168
+ AND m.kind = ?
167
169
  AND m.thread_id = ?
168
170
  AND m.body = ?
169
171
  AND coalesce(m.subject, '') = coalesce(?, '')
@@ -174,6 +176,7 @@ function findRecentDuplicateReply(input: SendMessageInput, threadId: number | nu
174
176
  `).get(
175
177
  input.from,
176
178
  input.to,
179
+ kind,
177
180
  threadId,
178
181
  input.body,
179
182
  input.subject ?? null,