Skip to content

Simplify Agent Relay core surfaces#1010

Open
willwashburn wants to merge 53 commits into
mainfrom
codex/core-simplification
Open

Simplify Agent Relay core surfaces#1010
willwashburn wants to merge 53 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

@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 299 files, which is 149 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: b39461ac-9de2-414f-8543-5cd70e39037c

📥 Commits

Reviewing files that changed from the base of the PR and between 94df613 and f918738.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (299)
  • .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_fot7xzqzwd5a/summary.md
  • .agentworkforce/trajectories/completed/2026-05/traj_fot7xzqzwd5a/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_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_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_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
  • CHANGELOG.md
  • CORE_SIMPLIFICATION_SCOPE.md
  • README.md
  • knip.json
  • package.json
  • packages/acp-bridge/README.md
  • packages/acp-bridge/package.json
  • packages/acp-bridge/src/acp-agent.ts
  • packages/acp-bridge/src/cli.ts
  • packages/acp-bridge/src/index.ts
  • packages/acp-bridge/src/types.ts
  • packages/acp-bridge/tsconfig.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/auth.test.ts
  • packages/cli/src/cli/commands/auth.ts
  • packages/cli/src/cli/commands/cloud.test.ts
  • packages/cli/src/cli/commands/cloud.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/drive.test.ts
  • packages/cli/src/cli/commands/drive.ts
  • packages/cli/src/cli/commands/log.ts
  • packages/cli/src/cli/commands/messaging.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/passthrough.test.ts
  • packages/cli/src/cli/commands/passthrough.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/rm.test.ts
  • packages/cli/src/cli/commands/rm.ts
  • packages/cli/src/cli/commands/setup.ts
  • packages/cli/src/cli/commands/swarm.ts
  • packages/cli/src/cli/commands/view.test.ts
  • packages/cli/src/cli/commands/view.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.test.ts
  • packages/cli/src/cli/lib/attach.ts
  • packages/cli/src/cli/lib/auth-ssh.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.ts
  • packages/cli/src/cli/lib/spawn-and-attach.ts
  • packages/cli/src/cli/lib/ssh-interactive.ts
  • packages/cli/src/health-worker-manager.ts
  • packages/cli/src/health-worker.ts
  • packages/cli/src/index.ts
  • packages/cli/tsconfig.json
  • packages/harnesses/README.md
  • packages/harnesses/package.json
  • packages/harnesses/src/index.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/runtime/README.md
  • packages/runtime/package.json
  • packages/runtime/src/actions.ts
  • packages/runtime/src/broker-driver.ts
  • packages/runtime/src/broker-path.ts
  • packages/runtime/src/client.ts
  • packages/runtime/src/driver-types.ts
  • packages/runtime/src/event-bus.ts
  • packages/runtime/src/harness.ts
  • packages/runtime/src/index.ts
  • packages/runtime/src/lifecycle-hooks.ts
  • packages/runtime/src/protocol.ts
  • packages/runtime/src/transport.ts
  • packages/runtime/src/types.ts
  • packages/runtime/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__/lifecycle-hooks.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
  • packages/sdk/src/cli-resolver.ts
  • packages/sdk/src/communicate/a2a-bridge.ts
  • packages/sdk/src/communicate/a2a-server.ts
  • packages/sdk/src/communicate/a2a-transport.ts
  • packages/sdk/src/communicate/a2a-types.ts
  • packages/sdk/src/communicate/adapters/ai-sdk.ts
  • packages/sdk/src/communicate/adapters/claude-sdk.ts
  • packages/sdk/src/communicate/adapters/codex-jsonrpc.ts
  • packages/sdk/src/communicate/adapters/codex.ts
  • packages/sdk/src/communicate/adapters/crewai.ts
  • packages/sdk/src/communicate/adapters/google-adk.ts
  • packages/sdk/src/communicate/adapters/index.ts
  • packages/sdk/src/communicate/adapters/langgraph.ts
  • packages/sdk/src/communicate/adapters/openai-agents.ts
  • packages/sdk/src/communicate/adapters/pi.ts
  • packages/sdk/src/communicate/core.ts
  • packages/sdk/src/communicate/index.ts
  • packages/sdk/src/communicate/transport.ts
  • packages/sdk/src/communicate/types.ts
  • packages/sdk/src/consensus-helpers.ts
  • packages/sdk/src/consensus.ts
  • packages/sdk/src/delivery/index.ts
  • packages/sdk/src/delivery/runner.ts
  • packages/sdk/src/delivery/types.ts
  • packages/sdk/src/examples/demo.ts
  • packages/sdk/src/examples/example.ts
  • packages/sdk/src/examples/quickstart.ts
  • packages/sdk/src/examples/ralph-loop.ts
  • packages/sdk/src/examples/sample-prd.json
  • packages/sdk/src/http.ts
  • packages/sdk/src/index.ts
  • packages/sdk/src/logs.ts
  • packages/sdk/src/messaging/index.ts
  • packages/sdk/src/messaging/normalize.ts
  • packages/sdk/src/messaging/relaycast.ts
  • packages/sdk/src/messaging/types.ts
  • packages/sdk/src/models.ts
  • packages/sdk/src/pty.ts
  • packages/sdk/src/relay-adapter.ts
  • packages/sdk/src/relay.ts
  • packages/sdk/src/session/index.ts
  • packages/sdk/src/session/types.ts
  • packages/sdk/src/shadow.ts
  • packages/sdk/src/spawn-from-env.ts
  • packages/sdk/src/workers.ts
  • packages/sdk/tsconfig.build.json
  • packages/sdk/tsconfig.json
  • packages/utils/package.json
  • tsconfig.json
  • vitest.cli-tokens.config.ts
  • vitest.config.ts
  • web/app/docs/7.1.1/[slug]/page.tsx

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>


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="README.md">

<violation number="1" location="README.md:67">
P2: Use the SDK handler signature here; the payload is passed directly as the first argument, not as `{ input }`.</violation>

<violation number="2" location="README.md:93">
P2: Use the action context here instead of destructuring a non-existent `agent` field.</violation>
</file>

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

Re-trigger cubic

Comment thread README.md
Comment on lines +93 to +94
handler: async ({ agent, input }) => {
await writeToDb(agent.name, input.vote);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Use the action context here instead of destructuring a non-existent agent field.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.md, line 93:

<comment>Use the action context here instead of destructuring a non-existent `agent` field.</comment>

<file context>
@@ -43,49 +43,60 @@ await relay.workspace.register([complaintTriager, engineer, taskManager]);
-  handler: async (input, ctx) => {
-    writeToDb(ctx.agent.name, input.vote);
-    if (allVotesAreIn() === true) {
+  handler: async ({ agent, input }) => {
+    await writeToDb(agent.name, input.vote);
+    if (await allVotesAreIn()) {
</file context>
Suggested change
handler: async ({ agent, input }) => {
await writeToDb(agent.name, input.vote);
handler: async (input, ctx) => {
await writeToDb(ctx.caller.name, input.vote);

Comment thread README.md
model: z.enum(['opus', 'sonnet']),
}),
availableTo: [taskManager, engineer], // leave this out if you want to make it available to all agents!
handler: async ({ input }) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Use the SDK handler signature here; the payload is passed directly as the first argument, not as { input }.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.md, line 67:

<comment>Use the SDK handler signature here; the payload is passed directly as the first argument, not as `{ input }`.</comment>

<file context>
@@ -43,49 +43,60 @@ await relay.workspace.register([complaintTriager, engineer, taskManager]);
-    await claude.new({ model: input.model });
-  },
   availableTo: [taskManager, engineer], // leave this out if you want to make it available to all agents!
+  handler: async ({ input }) => {
+    const agent = claude.new({ model: input.model });
+    await relay.workspace.register(agent);
</file context>
Suggested change
handler: async ({ input }) => {
handler: async (input) => {

github-actions Bot and others added 18 commits May 28, 2026 16:02
First we write a lot of words, then we remove them, then we add more
…odex/core-simplification

# Conflicts:
#	package-lock.json
#	package.json
#	packages/acp-bridge/README.md
#	packages/acp-bridge/src/acp-agent.ts
#	packages/acp-bridge/src/cli.ts
#	packages/acp-bridge/src/index.ts
#	packages/acp-bridge/src/types.ts
#	packages/cli/package.json
#	packages/cli/scripts/build-cjs.mjs
#	packages/gateway/package.json
#	packages/gateway/src/types.ts
#	packages/hooks/package.json
#	packages/hooks/src/types.ts
#	packages/openclaw/README.md
#	packages/openclaw/bridge/bridge.mjs
#	packages/openclaw/package.json
#	packages/openclaw/skill/SKILL.md
#	packages/openclaw/src/cli.ts
#	packages/openclaw/src/config.ts
#	packages/openclaw/src/gateway.ts
#	packages/openclaw/src/inject.ts
#	packages/openclaw/src/setup.ts
#	packages/openclaw/src/spawn/docker.ts
#	packages/openclaw/src/spawn/process.ts
#	packages/openclaw/src/spawn/types.ts
#	packages/openclaw/src/types.ts
#	packages/sdk/package.json
#	packages/sdk/src/index.ts
#	packages/sdk/src/models.ts
@github-actions
Copy link
Copy Markdown
Contributor

Preview deployed!

Environment URL
Web https://d2fotmci33gsjb.cloudfront.net

This preview will be cleaned up when the PR is merged or closed.

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.

1 participant