Skip to content

Simplify Agent Relay core surfaces#1010

Merged
willwashburn merged 143 commits into
mainfrom
codex/core-simplification
Jun 1, 2026
Merged

Simplify Agent Relay core surfaces#1010
willwashburn merged 143 commits into
mainfrom
codex/core-simplification

Conversation

@willwashburn
Copy link
Copy Markdown
Member

@willwashburn willwashburn commented May 27, 2026

Summary

  • make workspace creation the default onboarding path: SDK, MCP, CLI/OpenClaw docs now prefer workspaceKey / RELAY_WORKSPACE_KEY and keep apiKey / RELAY_API_KEY only as compatibility aliases
  • rename the managed harness package from @agent-relay/driver to @agent-relay/runtime and add @agent-relay/harnesses as the CLI harness catalog
  • keep ACP Bridge and OpenClaw in the repo, with OpenClaw updated for workspace-first setup and runtime-backed spawning
  • update README, SDK docs, scope matrix, changelog, knip config, package-lock, and affected imports/tests

Verification

  • npm run build:core
  • npm --prefix packages/sdk test (35 tests)
  • focused CLI vitest suite (203 tests)
  • npm --prefix packages/openclaw test (83 tests, run with loopback access)
  • npm run knip
  • git diff --cached --check

Agent Relay Core Simplification Scope

This document defines the package boundary for the SemVer-major Agent Relay core simplification and records what remains in scope after the implementation cutover.

Product framing

Agent Relay is the public product. It provides real-time coordination between AI agents, tools, services, and humans through shared workspaces.

The backing message bus is an implementation detail. Public docs should lead with Agent Relay concepts: messaging, delivery, and actions. Transport-specific names should appear only in code internals, compatibility notes, or migration details that cannot be explained accurately otherwise.

Core SDK scope

@agent-relay/sdk is the core communication SDK. It should document and expose the primitives needed by any runtime that wants to participate in Agent Relay:

  • Workspace bootstrap and lookup.
  • Agent, human, and system identity registration.
  • Channel messages, direct messages, group DMs, thread replies, message history, reactions, and search.
  • WebSocket subscriptions for message, thread, DM, channel, presence, file, webhook, and command events.
  • Presence, inbox, read receipts, read status, and idempotent sends.
  • Command/action registration and invocation for typed handoffs between agents, services, and tools.
  • Agent token recovery helpers and transport-level types needed by SDK consumers.

The core SDK should remain useful in service agents, hosted agents, browser-compatible clients, tests, terminal harness integrations, and human-operated tooling.

Out of core SDK scope

The following capabilities are not core SDK responsibilities:

  • Starting or supervising a local broker process.
  • Owning PTY or headless app-server sessions.
  • Spawning Claude, Codex, Gemini, OpenCode, or arbitrary CLI harnesses.
  • Injecting messages into managed harness stdin/app-server APIs.
  • Tracking local harness idle state, lifecycle hooks, session IDs, release, or shutdown.
  • Workflow orchestration, consensus helpers, shadow agents, persona materialization, or multi-agent run supervision.
  • Bundling GitHub, Slack, browser, credential proxy, or other primitive adapters into the core package.

Those features can still exist in Agent Relay. They should be documented as optional layers rather than the core SDK contract.

Package split

Package Responsibility
@agent-relay/sdk Core Agent Relay communication: messaging, delivery, and actions.
@agent-relay/harness-driver Optional managed harness package for broker startup, PTY/headless transports, spawn/release, harness defaults, and supervised runs.
agent-relay CLI product entry point that can compose the SDK and driver for terminal users.
Primitive packages Domain-specific integrations that communicate through SDK messages/actions instead of living in the core SDK.

The dependency direction should stay simple: runtime depends on the SDK, not the other way around.

Documentation requirements

  • Describe Agent Relay as the public product. Keep the backing transport out of public examples.
  • Present @agent-relay/sdk as messaging, delivery/read state, presence, and action APIs.
  • Present @agent-relay/harness-driver as optional managed harness infrastructure.
  • Avoid putting spawn-first examples in the root README or SDK README.
  • Keep managed Claude/Codex/Gemini/OpenCode examples in driver or CLI documentation.
  • Keep changelog entries concise and impact-first under Keep a Changelog sections.

Migration guidance

  • Keep code that only registers identities, sends messages, reads inbox state, handles commands, or subscribes to events on @agent-relay/sdk.
  • Move code that starts brokers, spawns harnesses, injects into PTYs/headless sessions, waits for idle, or shuts down managed runs to @agent-relay/harness-driver.
  • Treat old all-in-one SDK examples as driver examples unless they only use communication primitives.
  • Preserve transport compatibility terms only where credentials, environment variables, or wire-level behavior require them.

Removed from this branch

  • The old all-in-one TypeScript SDK facade, broker client exports, communicate adapters, workflow/consensus/shadow helpers, GitHub/Slack SDK exports, browser/worker SDK exports, examples, and tests.
  • Spawn-first CLI commands and attach/cloud/onboarding command trees that are not part of messaging, MCP, diagnostics, or the optional driver command group.
  • CLI install hooks for bundled dashboard/acp/relayfile surfaces.

Kept as adapters

  • @agent-relay/openclaw remains as an OpenClaw adapter package and uses SDK messaging plus @agent-relay/harness-driver for managed spawn internals instead of spawn-first SDK APIs.

Moved out

  • @agent-relay/acp-bridge lives in AgentWorkforce/agent-relay-acp-bridge and is no longer a workspace package in this repository.

Non-goals

  • This branch does not define a new wire protocol.
  • This branch does not migrate Python/Swift SDKs.
  • This branch does not remove primitive packages that can still integrate through SDK messages/actions.

@willwashburn willwashburn requested a review from khaliqgant as a code owner May 27, 2026 17:33
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Important

Review skipped

Too many files!

This PR contains 298 files, which is 148 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 454e2ce5-343b-482e-878f-852d0cfa8d80

📥 Commits

Reviewing files that changed from the base of the PR and between 5fd7d4a and ab6dfed.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (298)
  • .agentworkforce/trajectories/completed/2026-05/traj_4mejgzhbabzm/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_4mejgzhbabzm/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_brxv912628sm/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_brxv912628sm/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_enlsfcs3euhc/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_enlsfcs3euhc/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_fot7xzqzwd5a/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_fot7xzqzwd5a/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_ina67s5sjids.trace.json
  • .agentworkforce/trajectories/completed/2026-05/traj_ina67s5sjids/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_ina67s5sjids/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_j2qa2s5hqvui/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_j2qa2s5hqvui/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_kgbehs5jrzxp/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_kgbehs5jrzxp/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_m9sgbxehh8my/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_m9sgbxehh8my/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_p2vqjz2scihm/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_p2vqjz2scihm/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_p561cnoi6gm5/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_p561cnoi6gm5/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_qb7dzhsipy3d/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_qb7dzhsipy3d/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_qi2yqsjp90y3/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_qi2yqsjp90y3/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_rzijuhsjdsae/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_rzijuhsjdsae/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_s5tuzcraukmz/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_s5tuzcraukmz/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_th776pehdm42/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_th776pehdm42/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_vi1ff3d098fr.trace.json
  • .agentworkforce/trajectories/completed/2026-05/traj_vi1ff3d098fr/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_vi1ff3d098fr/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_x5439bvwnurb/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_x5439bvwnurb/trajectory.json
  • .agentworkforce/trajectories/completed/2026-05/traj_ypjl6xx3fr12/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_ypjl6xx3fr12/trajectory.json
  • .agentworkforce/trajectories/completed/2026-06/traj_nytpeh19bz1n.trace.json
  • .agentworkforce/trajectories/completed/2026-06/traj_nytpeh19bz1n/summary.md
  • .agentworkforce/trajectories/completed/2026-06/traj_nytpeh19bz1n/trajectory.json
  • .agentworkforce/trajectories/completed/2026-06/traj_r7g2zyp4aidy/summary.md
  • .agentworkforce/trajectories/completed/2026-06/traj_r7g2zyp4aidy/trajectory.json
  • .agentworkforce/workforce/personas/persona-maker.json
  • .claude/rules/sdk.md
  • .github/workflows/e2e-tests.yml
  • .github/workflows/package-validation.yml
  • .github/workflows/preview-web.yml
  • .github/workflows/publish.yml
  • .github/workflows/pullfrog.yml
  • .github/workflows/sdk-workers-safe.yml
  • .gitignore
  • AGENTS.md
  • CHANGELOG.md
  • README.md
  • crates/broker/Cargo.toml
  • crates/broker/src/control.rs
  • crates/broker/src/relaycast/bridge.rs
  • crates/broker/src/relaycast/mod.rs
  • crates/broker/src/relaycast/ws.rs
  • crates/broker/src/runtime/mod.rs
  • crates/broker/src/runtime/util.rs
  • crates/broker/src/types.rs
  • crates/broker/src/wrap.rs
  • knip.json
  • package.json
  • packages/cli/README.md
  • packages/cli/package.json
  • packages/cli/scripts/audit-bundled-deps.mjs
  • packages/cli/scripts/build-cjs.mjs
  • packages/cli/scripts/postinstall.js
  • packages/cli/scripts/prepack-materialize-workspaces.mjs
  • packages/cli/scripts/validate-npm-tarball.mjs
  • packages/cli/scripts/verify-bundled-deps.mjs
  • packages/cli/src/cli/agent-relay-mcp.startup.test.ts
  • packages/cli/src/cli/agent-relay-mcp.test.ts
  • packages/cli/src/cli/agent-relay-mcp.ts
  • packages/cli/src/cli/bootstrap.test.ts
  • packages/cli/src/cli/bootstrap.ts
  • packages/cli/src/cli/commands/activity.test.ts
  • packages/cli/src/cli/commands/activity.ts
  • packages/cli/src/cli/commands/agent-management.test.ts
  • packages/cli/src/cli/commands/agent-management.ts
  • packages/cli/src/cli/commands/agent.ts
  • packages/cli/src/cli/commands/auth.test.ts
  • packages/cli/src/cli/commands/auth.ts
  • packages/cli/src/cli/commands/capabilities.ts
  • packages/cli/src/cli/commands/channel.ts
  • packages/cli/src/cli/commands/connect.ts
  • packages/cli/src/cli/commands/core.test.ts
  • packages/cli/src/cli/commands/core.ts
  • packages/cli/src/cli/commands/dlq.test.ts
  • packages/cli/src/cli/commands/dlq.ts
  • packages/cli/src/cli/commands/doctor.test.ts
  • packages/cli/src/cli/commands/integration.ts
  • packages/cli/src/cli/commands/local-agent.test.ts
  • packages/cli/src/cli/commands/local-agent.ts
  • packages/cli/src/cli/commands/log.ts
  • packages/cli/src/cli/commands/message.ts
  • packages/cli/src/cli/commands/messaging.test.ts
  • packages/cli/src/cli/commands/messaging.ts
  • packages/cli/src/cli/commands/monitoring.test.ts
  • packages/cli/src/cli/commands/monitoring.ts
  • packages/cli/src/cli/commands/new.test.ts
  • packages/cli/src/cli/commands/new.ts
  • packages/cli/src/cli/commands/on.test.ts
  • packages/cli/src/cli/commands/on.ts
  • packages/cli/src/cli/commands/on/dotfiles.test.ts
  • packages/cli/src/cli/commands/on/dotfiles.ts
  • packages/cli/src/cli/commands/on/prereqs.test.ts
  • packages/cli/src/cli/commands/on/prereqs.ts
  • packages/cli/src/cli/commands/on/provision.ts
  • packages/cli/src/cli/commands/on/relayfile-binary.ts
  • packages/cli/src/cli/commands/on/scan.test.ts
  • packages/cli/src/cli/commands/on/scan.ts
  • packages/cli/src/cli/commands/on/services.test.ts
  • packages/cli/src/cli/commands/on/services.ts
  • packages/cli/src/cli/commands/on/start.test.ts
  • packages/cli/src/cli/commands/on/start.ts
  • packages/cli/src/cli/commands/on/stop.test.ts
  • packages/cli/src/cli/commands/on/stop.ts
  • packages/cli/src/cli/commands/on/token.ts
  • packages/cli/src/cli/commands/on/workspace.test.ts
  • packages/cli/src/cli/commands/on/workspace.ts
  • packages/cli/src/cli/commands/proactive-bootstrap.test.ts
  • packages/cli/src/cli/commands/proactive-bootstrap.ts
  • packages/cli/src/cli/commands/relay-runtime.test.ts
  • packages/cli/src/cli/commands/relay-runtime.ts
  • packages/cli/src/cli/commands/relaycast-groups.test.ts
  • packages/cli/src/cli/commands/rm.test.ts
  • packages/cli/src/cli/commands/rm.ts
  • packages/cli/src/cli/commands/setup.ts
  • packages/cli/src/cli/commands/status.test.ts
  • packages/cli/src/cli/commands/status.ts
  • packages/cli/src/cli/commands/swarm.ts
  • packages/cli/src/cli/commands/workspace.ts
  • packages/cli/src/cli/lib/agent-management-listing.test.ts
  • packages/cli/src/cli/lib/agent-management-listing.ts
  • packages/cli/src/cli/lib/attach-broker.ts
  • packages/cli/src/cli/lib/attach-drive.test.ts
  • packages/cli/src/cli/lib/attach-drive.ts
  • packages/cli/src/cli/lib/attach-passthrough.test.ts
  • packages/cli/src/cli/lib/attach-passthrough.ts
  • packages/cli/src/cli/lib/attach-view.test.ts
  • packages/cli/src/cli/lib/attach-view.ts
  • packages/cli/src/cli/lib/attach.ts
  • packages/cli/src/cli/lib/auth-ssh.ts
  • packages/cli/src/cli/lib/bridge.ts
  • packages/cli/src/cli/lib/broker-lifecycle.ts
  • packages/cli/src/cli/lib/client-factory.test.ts
  • packages/cli/src/cli/lib/client-factory.ts
  • packages/cli/src/cli/lib/cloud-client.ts
  • packages/cli/src/cli/lib/connect-daytona.ts
  • packages/cli/src/cli/lib/doctor.ts
  • packages/cli/src/cli/lib/index.ts
  • packages/cli/src/cli/lib/paths.ts
  • packages/cli/src/cli/lib/project-broker-client.test.ts
  • packages/cli/src/cli/lib/project-broker-client.ts
  • packages/cli/src/cli/lib/sdk-client.test.ts
  • packages/cli/src/cli/lib/sdk-client.ts
  • packages/cli/src/cli/lib/sdk-command.ts
  • packages/cli/src/cli/lib/spawn-and-attach.ts
  • packages/cli/src/cli/lib/ssh-interactive.ts
  • packages/cli/src/cli/lib/workspace-store.test.ts
  • packages/cli/src/cli/lib/workspace-store.ts
  • packages/cli/src/health-worker-manager.ts
  • packages/cli/src/health-worker.ts
  • packages/cli/src/index.ts
  • packages/cli/tsconfig.json
  • packages/harness-driver/README.md
  • packages/harness-driver/package.json
  • packages/harness-driver/src/actions.ts
  • packages/harness-driver/src/broker-driver.ts
  • packages/harness-driver/src/broker-path.test.ts
  • packages/harness-driver/src/broker-path.ts
  • packages/harness-driver/src/client.ts
  • packages/harness-driver/src/driver-types.ts
  • packages/harness-driver/src/event-bus.ts
  • packages/harness-driver/src/harness.ts
  • packages/harness-driver/src/index.ts
  • packages/harness-driver/src/lifecycle-hooks.ts
  • packages/harness-driver/src/protocol.ts
  • packages/harness-driver/src/transport.ts
  • packages/harness-driver/src/types.ts
  • packages/harness-driver/tsconfig.json
  • packages/harnesses/README.md
  • packages/harnesses/package.json
  • packages/harnesses/src/broker-binding.ts
  • packages/harnesses/src/define-spawn.test.ts
  • packages/harnesses/src/define.test.ts
  • packages/harnesses/src/define.ts
  • packages/harnesses/src/index.ts
  • packages/harnesses/src/readme-quickstart.test.ts
  • packages/harnesses/tsconfig.json
  • packages/openclaw/README.md
  • packages/openclaw/bin/relay-openclaw.mjs
  • packages/openclaw/bridge/bridge.mjs
  • packages/openclaw/bridge/spawn-from-env.mjs
  • packages/openclaw/package.json
  • packages/openclaw/skill/SKILL.md
  • packages/openclaw/src/__tests__/SPEC-ws-client-testing.md
  • packages/openclaw/src/__tests__/gateway-control.test.ts
  • packages/openclaw/src/__tests__/gateway-poll-fallback.test.ts
  • packages/openclaw/src/__tests__/gateway-threads.test.ts
  • packages/openclaw/src/__tests__/naming.test.ts
  • packages/openclaw/src/__tests__/spawn-manager.test.ts
  • packages/openclaw/src/__tests__/ws-client.test.ts
  • packages/openclaw/src/auth/converter.ts
  • packages/openclaw/src/cli.ts
  • packages/openclaw/src/config.ts
  • packages/openclaw/src/control.ts
  • packages/openclaw/src/gateway.ts
  • packages/openclaw/src/identity/contract.ts
  • packages/openclaw/src/identity/files.ts
  • packages/openclaw/src/identity/model.ts
  • packages/openclaw/src/identity/naming.ts
  • packages/openclaw/src/index.ts
  • packages/openclaw/src/inject.ts
  • packages/openclaw/src/mcp/server.ts
  • packages/openclaw/src/mcp/tools.ts
  • packages/openclaw/src/runtime/openclaw-config.ts
  • packages/openclaw/src/runtime/patch.ts
  • packages/openclaw/src/runtime/setup.ts
  • packages/openclaw/src/setup.ts
  • packages/openclaw/src/spawn/docker.ts
  • packages/openclaw/src/spawn/manager.ts
  • packages/openclaw/src/spawn/process.ts
  • packages/openclaw/src/spawn/types.ts
  • packages/openclaw/src/types.ts
  • packages/openclaw/templates/SOUL.md.template
  • packages/openclaw/test/vitest.setup.ts
  • packages/openclaw/tsconfig.json
  • packages/sdk/.mcp.json
  • packages/sdk/ADAPTER_REVIEW.md
  • packages/sdk/README.md
  • packages/sdk/examples/communicate/claude_sdk_example.ts
  • packages/sdk/examples/communicate/pi_example.ts
  • packages/sdk/package.json
  • packages/sdk/scripts/bundle-agent-relay.mjs
  • packages/sdk/scripts/check-workers-safe.mjs
  • packages/sdk/src/__tests__/agent-activity.test.ts
  • packages/sdk/src/__tests__/agent-relay.test.ts
  • packages/sdk/src/__tests__/broker-logs.test.ts
  • packages/sdk/src/__tests__/broker-path.test.ts
  • packages/sdk/src/__tests__/builder-resume-persistence.test.ts
  • packages/sdk/src/__tests__/channel-management.test.ts
  • packages/sdk/src/__tests__/client-broker-exit.test.ts
  • packages/sdk/src/__tests__/client-stdout-drain.test.ts
  • packages/sdk/src/__tests__/communicate/a2a-bridge.test.ts
  • packages/sdk/src/__tests__/communicate/a2a-server.test.ts
  • packages/sdk/src/__tests__/communicate/a2a-transport.test.ts
  • packages/sdk/src/__tests__/communicate/a2a-types.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/ai-sdk.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/claude-sdk.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/codex-jsonrpc.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/codex.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/crewai.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/e2e-crewai.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/e2e-google-adk.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/e2e-langgraph.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/e2e-openai-agents.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/e2e-pi.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/google-adk.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/langgraph.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/openai-agents.test.ts
  • packages/sdk/src/__tests__/communicate/adapters/pi.test.ts
  • packages/sdk/src/__tests__/communicate/core.test.ts
  • packages/sdk/src/__tests__/communicate/integration/cross-framework.test.ts
  • packages/sdk/src/__tests__/communicate/transport.test.ts
  • packages/sdk/src/__tests__/contract-fixtures.test.ts
  • packages/sdk/src/__tests__/delivery-actions.test.ts
  • packages/sdk/src/__tests__/event-bus.test.ts
  • packages/sdk/src/__tests__/facade.test.ts
  • packages/sdk/src/__tests__/harness.test.ts
  • packages/sdk/src/__tests__/integration.test.ts
  • packages/sdk/src/__tests__/integrations.test.ts
  • packages/sdk/src/__tests__/lifecycle-hooks.test.ts
  • packages/sdk/src/__tests__/listeners.test.ts
  • packages/sdk/src/__tests__/messaging.test.ts
  • packages/sdk/src/__tests__/models.test.ts
  • packages/sdk/src/__tests__/orchestration-upgrades.test.ts
  • packages/sdk/src/__tests__/pty.test.ts
  • packages/sdk/src/__tests__/quickstart.test.ts
  • packages/sdk/src/__tests__/relay-channel-ops.test.ts
  • packages/sdk/src/__tests__/spawn-from-env.test.ts
  • packages/sdk/src/__tests__/spawn-token.test.ts
  • packages/sdk/src/__tests__/transport.test.ts
  • packages/sdk/src/__tests__/unit.test.ts
  • packages/sdk/src/actions/errors.ts
  • packages/sdk/src/actions/index.ts
  • packages/sdk/src/actions/json-schema-lite.ts
  • packages/sdk/src/actions/registry.ts
  • packages/sdk/src/actions/types.ts
  • packages/sdk/src/agent-relay.ts
  • packages/sdk/src/broker-logs.ts
  • packages/sdk/src/browser.ts
  • packages/sdk/src/capabilities.ts
  • packages/sdk/src/cli-registry.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/core-simplification

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86fe101dd6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/package.json Outdated
"@agent-relay/config": "7.1.1",
"@agent-relay/hooks": "7.1.1",
"@agent-relay/memory": "7.1.1",
"@agent-relay/driver": "7.1.1",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Publish the new driver package before the CLI

Adding @agent-relay/driver as a runtime dependency means the agent-relay npm package cannot be installed until that exact driver version exists on npm. I checked the publish workflow matrices (.github/workflows/publish.yml publish-sdk-internal-deps lines 801-807 and publish-packages lines 1017-1035), and none of them publish driver, so a release of the CLI will point at an unpublished @agent-relay/driver@7.1.1 and fresh installs fail with an npm not-found/dependency resolution error.

Useful? React with 👍 / 👎.

Comment thread packages/sdk/package.json
Comment on lines +28 to 32
"./capabilities": {
"types": "./dist/capabilities.d.ts",
"import": "./dist/capabilities.js",
"default": "./dist/capabilities.js"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep SDK release smoke imports in sync

This shortened SDK export map removes the broker-path/driver APIs, but the SDK release smoke still imports them: .github/workflows/publish.yml uses @agent-relay/sdk/broker-path at line 717 and AgentRelayClient from @agent-relay/sdk at line 737, and scripts/post-publish-verify/verify-install.sh does the same at line 232. Any SDK publish/smoke run will now fail before validating the package unless those checks are moved to @agent-relay/driver or the compatibility exports are kept.

Useful? React with 👍 / 👎.

Comment thread packages/acp-bridge/package.json Outdated
@@ -1,59 +0,0 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove deleted packages from the publish matrix

Deleting this package directory leaves the package=all release workflow pointing at paths that no longer exist: I checked .github/workflows/publish.yml and the publish-packages matrix still includes acp-bridge and openclaw at lines 1027-1028. Those matrix jobs run with working-directory: packages/${{ matrix.package }}, so the next all-package release will fail as soon as it tries to publish either deleted package.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 issues found across 269 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/sdk/src/delivery/runner.ts">

<violation number="1" location="packages/sdk/src/delivery/runner.ts:38">
P1: `stop()` does not cancel the inbox subscription, so the runner can hang indefinitely while waiting for the next message.</violation>

<violation number="2" location="packages/sdk/src/delivery/runner.ts:81">
P1: Exceptions from `onError` prevent `inbox.fail(...)` from running, which can leave errored items without delivery-state updates and terminate processing.</violation>
</file>

<file name="packages/driver/package.json">

<violation number="1" location="packages/driver/package.json:43">
P1: Add a `prepack` hook so this package builds before `npm pack`/`npm publish`; otherwise it can be published without the `dist` files that `main`/`exports` reference.</violation>
</file>

<file name="packages/driver/src/broker-driver.ts">

<violation number="1" location="packages/driver/src/broker-driver.ts:53">
P1: Don't auto-spawn a broker in the shared client initializer; status/release should require an existing client or separate initialization path.</violation>
</file>

Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.

Re-trigger cubic

private async run(): Promise<void> {
await this.options.delivery.connect?.();
try {
for await (const item of this.options.messaging.inbox.subscribe({
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: stop() does not cancel the inbox subscription, so the runner can hang indefinitely while waiting for the next message.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/sdk/src/delivery/runner.ts, line 38:

<comment>`stop()` does not cancel the inbox subscription, so the runner can hang indefinitely while waiting for the next message.</comment>

<file context>
@@ -0,0 +1,89 @@
+  private async run(): Promise<void> {
+    await this.options.delivery.connect?.();
+    try {
+      for await (const item of this.options.messaging.inbox.subscribe({
+        agentName: this.options.agentName,
+      })) {
</file context>

metadata: result.metadata,
});
} catch (error) {
await Promise.resolve(this.options.onError?.(item, error));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Exceptions from onError prevent inbox.fail(...) from running, which can leave errored items without delivery-state updates and terminate processing.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/sdk/src/delivery/runner.ts, line 81:

<comment>Exceptions from `onError` prevent `inbox.fail(...)` from running, which can leave errored items without delivery-state updates and terminate processing.</comment>

<file context>
@@ -0,0 +1,89 @@
+        metadata: result.metadata,
+      });
+    } catch (error) {
+      await Promise.resolve(this.options.onError?.(item, error));
+      await this.options.messaging.inbox.fail({
+        inboxItemId: item.id,
</file context>

"package.json"
],
"scripts": {
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Add a prepack hook so this package builds before npm pack/npm publish; otherwise it can be published without the dist files that main/exports reference.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/driver/package.json, line 43:

<comment>Add a `prepack` hook so this package builds before `npm pack`/`npm publish`; otherwise it can be published without the `dist` files that `main`/`exports` reference.</comment>

<file context>
@@ -0,0 +1,67 @@
+    "package.json"
+  ],
+  "scripts": {
+    "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
+    "check": "tsc -p tsconfig.json --noEmit"
+  },
</file context>

Comment thread packages/runtime/src/broker-driver.ts Outdated

private async ensureClient(): Promise<AgentRelayClient> {
if (!this.client) {
this.client = await AgentRelayClient.spawn(this.options);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Don't auto-spawn a broker in the shared client initializer; status/release should require an existing client or separate initialization path.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/driver/src/broker-driver.ts, line 53:

<comment>Don't auto-spawn a broker in the shared client initializer; status/release should require an existing client or separate initialization path.</comment>

<file context>
@@ -0,0 +1,79 @@
+
+  private async ensureClient(): Promise<AgentRelayClient> {
+    if (!this.client) {
+      this.client = await AgentRelayClient.spawn(this.options);
+    }
+    return this.client;
</file context>

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/sdk/src/delivery/runner.ts">

<violation number="1" location="packages/sdk/src/delivery/runner.ts:38">
P1: `stop()` does not cancel the inbox subscription, so the runner can hang indefinitely while waiting for the next message.</violation>

<violation number="2" location="packages/sdk/src/delivery/runner.ts:81">
P1: Exceptions from `onError` prevent `inbox.fail(...)` from running, which can leave errored items without delivery-state updates and terminate processing.</violation>
</file>

<file name="packages/driver/package.json">

<violation number="1" location="packages/driver/package.json:43">
P1: Add a `prepack` hook so this package builds before `npm pack`/`npm publish`; otherwise it can be published without the `dist` files that `main`/`exports` reference.</violation>
</file>

<file name="packages/driver/src/broker-driver.ts">

<violation number="1" location="packages/driver/src/broker-driver.ts:53">
P1: Don't auto-spawn a broker in the shared client initializer; status/release should require an existing client or separate initialization path.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread README.md Outdated
Comment thread README.md Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/sdk/src/delivery/runner.ts">

<violation number="1" location="packages/sdk/src/delivery/runner.ts:38">
P1: `stop()` does not cancel the inbox subscription, so the runner can hang indefinitely while waiting for the next message.</violation>

<violation number="2" location="packages/sdk/src/delivery/runner.ts:81">
P1: Exceptions from `onError` prevent `inbox.fail(...)` from running, which can leave errored items without delivery-state updates and terminate processing.</violation>
</file>

<file name="packages/driver/package.json">

<violation number="1" location="packages/driver/package.json:43">
P1: Add a `prepack` hook so this package builds before `npm pack`/`npm publish`; otherwise it can be published without the `dist` files that `main`/`exports` reference.</violation>
</file>

<file name="packages/driver/src/broker-driver.ts">

<violation number="1" location="packages/driver/src/broker-driver.ts:53">
P1: Don't auto-spawn a broker in the shared client initializer; status/release should require an existing client or separate initialization path.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/sdk/src/delivery/runner.ts">

<violation number="1" location="packages/sdk/src/delivery/runner.ts:38">
P1: `stop()` does not cancel the inbox subscription, so the runner can hang indefinitely while waiting for the next message.</violation>

<violation number="2" location="packages/sdk/src/delivery/runner.ts:81">
P1: Exceptions from `onError` prevent `inbox.fail(...)` from running, which can leave errored items without delivery-state updates and terminate processing.</violation>
</file>

<file name="packages/driver/package.json">

<violation number="1" location="packages/driver/package.json:43">
P1: Add a `prepack` hook so this package builds before `npm pack`/`npm publish`; otherwise it can be published without the `dist` files that `main`/`exports` reference.</violation>
</file>

<file name="packages/driver/src/broker-driver.ts">

<violation number="1" location="packages/driver/src/broker-driver.ts:53">
P1: Don't auto-spawn a broker in the shared client initializer; status/release should require an existing client or separate initialization path.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread README.md
Comment thread README.md
Rename @agent-relay/runtime to @agent-relay/harness-driver across the repo for a SemVer-major release. Update APIs and exports (RuntimeClient → HarnessDriverClient and companion types such as Options/Events/ProtocolError), move package sources (packages/runtime → packages/harness-driver), and adjust imports, tests, and docs (README, CHANGELOG, CORE_SIMPLIFICATION_SCOPE, SDK rules, web docs). Also add harness-driver to CI publish matrices, update .gitignore and workspace/package manifests, and refresh related tooling configs (knip, package.json, tsconfigs, etc.) to reflect the new package boundary.
Update README and harness-driver docs to reflect recent SDK API changes. README quickstart: createWorkspace now returns a relay/client (workspaceKey available), reflowed step numbering, switch realtime APIs to client.events.on(...) and client.events.connect()/subscribe(), replace send(...) with sendMessage({...}), and use client.events.disconnect() for cleanup. harness-driver docs: rename sample file, replace createRuntime/registerRuntimeActions with BrokerDriver and registerDriverActions, remove manual relay.actions.register examples and add a concise agent.create invocation example; document actionPrefix and that BrokerDriver is the built-in managed driver.
Introduce relay-bound BrokerDriver and live PTY spawning for harnesses. Added packages/harnesses/src/broker-binding.ts which caches one BrokerDriver per AgentRelay and requires a workspace key (sets RELAY_API_KEY) or throws a clear error. Modified definePtyHarness to accept create({ relay }) to spawn a live PTY via the driver (handle keyed by registered agent name) while preserving the descriptor-only create/new behavior when relay is omitted. Added tests (define-spawn.test.ts, readme-quickstart.test.ts) and updated SDK session helpers (defineHarness, nextHarnessName, harness agent shapes) plus README, CHANGELOG, and migration docs to document the new spawn/workspace model and example usage.
github-actions Bot and others added 2 commits June 1, 2026 17:30
Add a collection of new v8 documentation pages (actions-callbacks, channels, cli-agent-management, cli-broker-lifecycle, cli-messaging, dms, emoji-reactions, and related docs), update docs links and nav (docs-nav icons and docs-nav data), and add CLI/SDK framing and references to /docs/8.0.0. Adjust blog index to move the RSS icon into the section header and update CSS (.blogHeader removed, .sectionTitleRow added). Edit the blog post content and metadata (title, description, and copy refinements). Also append a decision entry to the active trajectory JSON.
Mark the trajectory as completed: remove the active .agentworkforce trajectory and add completed artifacts (trace.json, trajectory.json, summary.md) under .agentworkforce/trajectories/completed/2026-06/. Also update CHANGELOG.md and package metadata (packages/cli, packages/openclaw, packages/sdk) and refresh package-lock.json.
github-actions Bot and others added 2 commits June 1, 2026 19:00
Remove the separate actions-callbacks doc and merge its content into actions.mdx, updating examples, schema shapes, and API guidance (facade vs registry) accordingly. Adjust references across the site (quickstart, cli-overview, webhooks) to use the unified "Actions" page. Update docs navigation and grouping (rename sections, add Interfaces group, reorder items) and remove the now-unused actions-callbacks nav icon mapping.
@willwashburn willwashburn merged commit ab7f317 into main Jun 1, 2026
1 check passed
@willwashburn willwashburn deleted the codex/core-simplification branch June 1, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants