Skip to content

fix(harness-driver): export ./predictive-echo subpath#1048

Merged
willwashburn merged 1 commit into
mainfrom
chore/harness-driver-export-predictive-echo
Jun 4, 2026
Merged

fix(harness-driver): export ./predictive-echo subpath#1048
willwashburn merged 1 commit into
mainfrom
chore/harness-driver-export-predictive-echo

Conversation

@willwashburn

@willwashburn willwashburn commented Jun 4, 2026

Copy link
Copy Markdown
Member

User description

What

Adds a ./predictive-echo export subpath to @agent-relay/harness-driver:

"./predictive-echo": {
  "types": "./dist/predictive-echo.d.ts",
  "import": "./dist/predictive-echo.js",
  "default": "./dist/predictive-echo.js"
}

Why

The PredictiveEchoEngine added in #1045 is explicitly designed to be consumed by external hosts — its docstring names "an Electron host (e.g. Pear)" backing it with a live @xterm/xterm instance. But it was only reachable through the package root barrel (index.js), which re-exports the broker transport (transport.jsimport WebSocket from 'ws'). Pulling that into a browser/renderer bundle drags in node-only ws and breaks the build.

src/predictive-echo.ts has zero imports, so exposing it as a dedicated subpath (mirroring the existing ./client, ./protocol, ./broker-path, ./harnesses entries) lets renderer hosts import just the engine with no node-only code pulled in:

import { PredictiveEchoEngine } from '@agent-relay/harness-driver/predictive-echo'

Scope

  • No source changes — packaging only.
  • The built dist/predictive-echo.{js,d.ts} already ship in the published package (files: ["dist", ...]), so no build changes are needed; the export simply points at files that are already there.
  • Unblocks Pear from integrating predictive echo without a fragile deep-dist Vite alias.

🤖 Generated with Claude Code


CodeAnt-AI Description

Expose Predictive Echo as a direct import path

What Changed

  • Added a dedicated @agent-relay/harness-driver/predictive-echo entry so hosts can import the PredictiveEcho engine directly
  • This avoids loading the package root when only the PredictiveEcho engine is needed, which prevents browser or renderer builds from pulling in node-only code

Impact

✅ Browser-safe Predictive Echo imports
✅ Fewer build failures in renderer apps
✅ Easier host integration for predictive echo

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

The PredictiveEchoEngine (added in #1045) is meant to be consumed by
external hosts — its docstring explicitly names an Electron host (Pear)
backing it with a live @xterm/xterm instance. But it was only reachable
via the package root barrel, which re-exports the broker transport and
its `ws` import, so it can't be loaded in a browser/renderer bundle.

`predictive-echo.ts` has zero imports, so exposing it as a dedicated
subpath (mirroring ./client, ./protocol, etc.) lets renderer hosts import
just the engine with no node-only code pulled in. No source changes; the
built dist/predictive-echo.{js,d.ts} already ship in the published package.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@willwashburn willwashburn requested a review from khaliqgant as a code owner June 4, 2026 12:08
@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!

@codeant-ai

codeant-ai Bot commented Jun 4, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 64af09e8-cc87-4a91-aff9-5ac86f920509

📥 Commits

Reviewing files that changed from the base of the PR and between 7f2392d and db35bc7.

📒 Files selected for processing (1)
  • packages/harness-driver/package.json

📝 Walkthrough

Walkthrough

The harness-driver package.json is updated to expose a new public subpath export ./predictive-echo, with corresponding entry points for TypeScript types and JavaScript artifacts, enabling consumers to import the predictive-echo module directly from the package.

Changes

Package Export Configuration

Layer / File(s) Summary
Predictive Echo export mapping
packages/harness-driver/package.json
A new ./predictive-echo subpath export is added with types, import, and default entry points mapping to the ./dist/predictive-echo artifacts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

size:XS

Suggested reviewers

  • khaliqgant

Poem

🐰 A new path emerges bright,
Where predictive echoes take flight,
In exports we write,
The module shines right,
Harness-driver's reach burns ever light! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is comprehensive and includes context about the change (What, Why, Scope), but omits the required 'Summary' and 'Test Plan' sections from the repository template. Add a 'Summary' section at the top and a 'Test Plan' checklist to match the template structure; this helps maintain consistency across pull requests.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a new export subpath for predictive-echo to the harness-driver package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/harness-driver-export-predictive-echo

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.

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Jun 4, 2026
@codeant-ai

codeant-ai Bot commented Jun 4, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

@willwashburn willwashburn merged commit 58d7f72 into main Jun 4, 2026
40 checks passed
@willwashburn willwashburn deleted the chore/harness-driver-export-predictive-echo branch June 4, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant