t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Add Hermes and Pi agent provider support

Open joeynyc opened this issue 6 months ago • 5 comments

Summary

  • add Hermes Agent and Pi Agent provider support through ACP
  • add provider settings setup, diagnostics, update actions, docs, and screenshots
  • harden Pi ACP spawning for packaged macOS PATH behavior
  • keep Pi CLI update notices out of chat output

Verification

  • bun run --cwd apps/server typecheck
  • bun run --cwd apps/web typecheck
  • bun test apps/server/src/provider/Layers/PiAdapter.test.ts apps/server/src/provider/Layers/PiProvider.test.ts apps/server/src/provider/acp/PiAcpSupport.test.ts
  • bun run --cwd apps/web test:browser SettingsPanels.browser.tsx
  • bun run --cwd apps/web build
  • bun run --cwd apps/server build
  • bun run --cwd apps/desktop build
  • bun run --cwd apps/desktop smoke-test
  • real local Pi chat E2E with GPT 5.5 returned PI_E2E_OK before this final filter patch; filter covered by focused unit test

[!NOTE] Medium Risk Adds two new provider drivers that spawn local CLIs via ACP and changes provider/model selection gating logic in the web UI, which could affect session startup and model-picker behavior. Risk is moderated by targeted unit/browser tests and largely additive integration paths.

Overview Adds Hermes and Pi as first-class providers, including new server ProviderDrivers plus ACP adapters that manage sessions/turns, permissions, attachments, and runtime event streaming.

Implements provider health/status layers for both (binary discovery, version/auth probing, default-model detection, suggested-path hints) and background snapshot enrichment for update advisories; Pi also hardens ACP spawning by injecting PI_ACP_PI_COMMAND and fixing PATH handling, and filters Pi CLI “new version” notices from assistant deltas.

Extends text-generation to use Hermes/Pi ACP runtimes for commit/PR/branch/thread-title generation, registers both drivers in the built-in driver list, and updates the web UI/model picker to only allow selection of selectable instances (enabled + available + ready + has models) while adding provider-specific chat surfaces (chat-surface-hermes / chat-surface-pi) and improved empty/setup messaging; README/docs are updated with setup guidance and screenshots.

Reviewed by Cursor Bugbot for commit 8eff67b250f8e41011b67fea52d2559c9ab7713b. Bugbot is set up for automated code reviews on this repo. Configure here.

[!NOTE]

Add Hermes and Pi as built-in agent provider types with ACP-backed text generation

  • Registers HermesDriver and PiDriver as built-in provider drivers, each backed by a new ACP runtime (makeHermesAcpRuntime / makePiAcpRuntime) that spawns the respective CLI tool and streams chunked responses with a 180s timeout.
  • Adds HermesSettings and PiSettings schemas to server and client settings, including binary path fields, custom models, and patch schemas for partial updates.
  • Implements config file parsing (parseHermesConfigModelDefaults, parsePiConfigModelDefaults) to detect the active model from each provider's YAML/JSON config on disk.
  • Extends the model picker and chat composer to use isSelectableProviderInstance (enabled + available + ready + has models), so Hermes/Pi instances that are installed but unauthenticated appear disabled rather than selectable.
  • Adds provider-specific UI: setup checklists, diagnostics rows, CLI-managed-auth messaging, and branded chat surface themes (chat-surface-hermes, chat-surface-pi).
  • Adds a custom dev-watch script (scripts/dev-watch.mjs) replacing node --watch with a debounced, SIGTERM-graceful file watcher.
  • Risk: resolveSelectableProviderInstance now requires status === 'ready' and at least one model — previously enabled+available was sufficient, which could silently change the auto-selected provider for existing users.

Macroscope summarized 8eff67b.

joeynyc avatar May 18 '26 13:05 joeynyc

[!IMPORTANT]

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6c659f03-31a7-496e-a345-04b1e94b499d

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

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.

coderabbitai[bot] avatar May 18 '26 13:05 coderabbitai[bot]

Approvability

Verdict: Needs human review

Diff is too large for automated approval analysis. A human reviewer should evaluate this PR.

You can customize Macroscope's approvability policy. Learn more.

macroscopeapp[bot] avatar May 18 '26 13:05 macroscopeapp[bot]

Release-readiness follow-up pushed in joeynyc/t3code@d439ab14.

Validated locally:

  • Pi focused tests: 13 passed across Pi ACP support, provider, and adapter tests.
  • Provider settings browser test: 19 passed.
  • Server typecheck: passed.
  • Web typecheck: passed.
  • Windows NSIS build: produced release/T3-Code-0.0.24-x64.exe.
  • macOS arm64 DMG build: produced release/T3-Code-0.0.24-arm64.dmg.
  • DMG mount sanity check: mounted read-only, verified checksum, found T3 Code (Alpha).app, detached cleanly.

Addressed review feedback:

  • Disabled Pi interaction mode toggle because Pi ACP does not currently honor mode switching.
  • Fixed Pi ACP Windows root path handling and avoided emitting an empty PATH for relative commands.
  • Trimmed PI_CODING_AGENT_DIR before use.
  • Hardened Hermes YAML-style inline comment stripping.
  • Fixed provider settings update running state for live update advisories without an outdated candidate, with browser coverage.

Remaining external check: Vercel marketing deploy still fails with Authorization required to deploy, which appears to be a Vercel/GitHub permission gate rather than a code failure. Windows installer was built on macOS but not executed on a Windows host in this environment.

joeynyc avatar May 18 '26 19:05 joeynyc

Polish follow-up pushed in joeynyc/t3code@8eff67b2.

Changes:

  • Added Hermes/Pi setup checklist rows in provider settings: enabled, CLI/adapter detected, Pi binary, auth, and model visibility.
  • Added Copy diagnostics for Hermes/Pi provider cards.
  • Cleaned copy-to-clipboard toast language for setup commands, diagnostics, and update commands.
  • Made model picker empty states actionable for favorites, search, disabled providers, setup-needed providers, and ready providers with no models.
  • Added browser coverage for the no-model Hermes empty state and unit coverage for the setup checklist logic.
  • Added docs/providers/release-readiness.md and linked it from the README for Mac/Windows packaging validation and screenshot expectations.

Validation:

  • apps/web ProviderInstanceCard unit test: passed.
  • ProviderModelPicker + SettingsPanels browser tests: 46 passed.
  • apps/web typecheck: passed.
  • apps/server typecheck: passed.
  • apps/web production build: passed.

Note: I verified the provider settings polish in the paired in-app browser. A separate headless screenshot pass hit the app's pairing-token gate, so I did not replace the existing README chat screenshots in this commit.

joeynyc avatar May 19 '26 04:05 joeynyc

Looking forward to seeing Hermes as a provider

icaroryan avatar Jul 11 '26 03:07 icaroryan