Skip to content

feat(orchestration): recognize Cursor & Windsurf as first-class harnesses#4775

Open
CodeGhost21 wants to merge 8 commits into
tinyhumansai:mainfrom
CodeGhost21:feat/cursor-windsurf-harness
Open

feat(orchestration): recognize Cursor & Windsurf as first-class harnesses#4775
CodeGhost21 wants to merge 8 commits into
tinyhumansai:mainfrom
CodeGhost21:feat/cursor-windsurf-harness

Conversation

@CodeGhost21

@CodeGhost21 CodeGhost21 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Teaches OpenHuman's orchestration engine to recognize cursor and windsurf as harness providers, so their sessions render with a first-class roster group and brand glyph instead of falling into the generic "Other" catch-all.

This is the recognition slice of #4730 (renders the sessions once something emits them). The session-origination adapters that actually emit harness.provider = "cursor" | "windsurf" live in the tiny.place SDK and are a separate PR.

Changes

Backend (src/openhuman/orchestration/schemas.rs)

  • Widen the single recognition gate harness_type_for() to accept "cursor" and "windsurf" alongside claude | codex | gemini.
  • Refresh the two doc comments that enumerate the provider set.

Frontend (app/src/)

  • Widen the HarnessType union (orchestrationClient.ts) — the type-checker then forces the two exhaustive lookup tables to stay complete.
  • Add glyph entries (HarnessGlyph.tsx): Cursor Cu (slate), Windsurf Ws (teal).
  • Add roster groups (TinyPlaceRoster.tsx): Cursor, Windsurf.

Testing

  • Rust: harness_type_only_for_known_providers extended with cursor/windsurf assertions — TDD red→green (cargo test -p openhuman --lib harness_type_only_for_known_providers: ok).
  • Frontend: HarnessGlyph.test.tsx + TinyPlaceRoster.test.tsx extended (assert the sessions group under Cursor/Windsurf headers, not "Other") — 11 tests pass.
  • Type-check: tsc --noEmit clean — confirms the widened union left no exhaustive consumer incomplete.

Design + implementation-plan docs included under docs/superpowers/.

Note on cargo test: verified via --lib because main currently has an unrelated broken integration test (orchestration_effect_executor_e2e) that fails to compile independently of this change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added recognition for Cursor and Windsurf harness sessions in orchestration.
    • Updated harness badge glyphs to display Cu and Ws.
    • Sessions now show under dedicated Cursor and Windsurf roster headings instead of Other.
  • Tests
    • Expanded frontend tests to cover new glyph labels and correct roster grouping for both harness types.
  • Documentation
    • Added implementation plan and design specs for first-class Cursor and Windsurf harness support.

@CodeGhost21 CodeGhost21 requested a review from a team July 10, 2026 11:28
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6de9944e-3177-4d1d-89bf-c902934c9174

📥 Commits

Reviewing files that changed from the base of the PR and between f0dd17b and 78d5ff2.

📒 Files selected for processing (1)
  • docs/superpowers/specs/2026-07-11-cursor-observer-findings.md
✅ Files skipped from review due to trivial changes (1)
  • docs/superpowers/specs/2026-07-11-cursor-observer-findings.md

📝 Walkthrough

Walkthrough

Adds first-class cursor and windsurf harness recognition across Rust orchestration schemas and frontend presentation. The UI renders dedicated glyphs and roster groups, with Rust and frontend tests covering recognition, labels, and grouping.

Changes

Harness recognition and presentation

Layer / File(s) Summary
Rust harness recognition and validation
src/openhuman/orchestration/schemas.rs
The orchestration schema recognizes cursor and windsurf sources and tests their mappings.
Frontend harness presentation
app/src/lib/orchestration/orchestrationClient.ts, app/src/components/intelligence/*
Frontend types, glyph mappings, roster groups, and tests cover both harnesses.
Implementation plan and design record
docs/superpowers/...
Planning, design, and adapter-observer documents describe recognition, ordering, verification, scope, and feasibility findings.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HarnessSource
  participant orchestrationSchema
  participant HarnessGlyph
  participant TinyPlaceRoster
  HarnessSource->>orchestrationSchema: provide cursor or windsurf source
  orchestrationSchema-->>HarnessGlyph: expose recognized harness type
  orchestrationSchema-->>TinyPlaceRoster: expose recognized harness type
  HarnessGlyph-->>TinyPlaceRoster: render glyph and grouped session
Loading

Possibly related PRs

Suggested labels: feature, rust-core, agent

Poem

A rabbit hops through Cursor’s glow,
While Windsurf badges softly show.
“Cu” and “Ws” now lead the way,
In tidy groups where sessions stay.
Rust nods yes; the tests all cheer!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding first-class orchestration support for Cursor and Windsurf harnesses.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

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

@coderabbitai coderabbitai Bot added agent Built-in agents, prompts, orchestration, and agent runtime in src/openhuman/agent/. feature Net-new user-facing capability or product behavior. rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. labels Jul 10, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 10, 2026
cargo fmt --all --check wraps the matches! arm now that the pattern list
exceeds the line width; apply it so Rust Quality + Frontend format:check pass.
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 10, 2026
oxoxDev
oxoxDev previously approved these changes Jul 10, 2026

@oxoxDev oxoxDev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review — recognize Cursor & Windsurf ✅

Clean recognition slice. Approving.

  • harness_type_for() widened to cursor/windsurf; the HarnessType union widen forces the exhaustive GLYPH + HARNESS_GROUPS tables complete at compile time — no silent "Other" fallthrough for the new providers.
  • Rust and frontend agree on the same 5-provider set; unknown sources still fall to "Other" (match → None).
  • TDD on both sides: harness_type_only_for_known_providers extended + TinyPlaceRoster asserts the sessions group under their own headers, not "Other".
  • Recognition-only: inert until an emitter produces source = "cursor"|"windsurf" (the tiny.place adapters PR) — no runtime risk here.

No findings.

Findings from the Layer-2 adapter spike (companion to the recognition
design): both harnesses are buildable observe+respond adapters; Cursor
verified (cursor-agent -p), Windsurf/Devin build-from-docs. Records the
adapter-contract mapping, the GUI-IDE differences vs codex/claude, and
the Windsurf->Devin Desktop rebrand.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CodeGhost21 CodeGhost21 dismissed stale reviews from oxoxDev and coderabbitai[bot] via 3e41012 July 10, 2026 14:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/superpowers/specs/2026-07-10-cursor-windsurf-adapter-spike.md`:
- Around line 46-47: Resolve the canonical provider key before adapter
implementation: choose either “windsurf” or “devin,” or explicitly define alias
support, and apply that decision consistently across Rust recognition, frontend
grouping, and adapter provider values. Update the naming decision and
recognition slice documentation to remove the ambiguity.
- Line 12: The feasibility statement should remain conditional until the
required empirical spike tests pass. Update the opening claim to say both
adapters are likely feasible pending tests, remove the assertion that neither
has a hard blocker, and make any recommendation contingent on successful tests A
and B while preserving the inbound-delivery limitation.
- Line 20: Update the “MCP stdio hosting” row to state that Windsurf supports
both remote MCP field names, `serverUrl` and `url`, rather than claiming it uses
`serverUrl` instead of `url`; preserve the existing configuration details.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 60fb8f3e-9ca8-411d-847f-71ca9b3f9aa7

📥 Commits

Reviewing files that changed from the base of the PR and between e9331e2 and 3e41012.

📒 Files selected for processing (1)
  • docs/superpowers/specs/2026-07-10-cursor-windsurf-adapter-spike.md

Comment thread docs/superpowers/specs/2026-07-10-cursor-windsurf-adapter-spike.md Outdated
Comment thread docs/superpowers/specs/2026-07-10-cursor-windsurf-adapter-spike.md Outdated
Comment thread docs/superpowers/specs/2026-07-10-cursor-windsurf-adapter-spike.md Outdated
… windsurf mcp config, naming)

Address review feedback on the adapter feasibility spike:
- headline reframed as conditional on the two empirical spike-tests
- windsurf mcp_config remote key clarified (serverUrl/url; moot for our stdio adapter)
- naming decision resolved: keep harness key 'windsurf' (matches on-disk brand)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai coderabbitai Bot removed the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label Jul 10, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 10, 2026
Empirical results from a throwaway Cursor hooks observer run against staging:
- observe -> normalize -> render as a 'cursor' runtime session works live
  (real Cursor chat, conversation 4c17e405, both turns rendered)
- spike-test A: MCP/hook subprocess gets a sanitized env; adapter must bake
  every needed var into mcp.json's env block
- Gap 1: orchestrator reply fails 'No agent found' -- base58 agentId vs base64
  identityKey encoding mismatch at the reply boundary (next PR)
- Gap 2 / spike-test B: no supported way to inject into Cursor's live GUI chat;
  headless cursor-agent -p answers as a separate turn (open research)
- first-contact ratchet desync recoverable via reset_session(rehandshake:true)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai coderabbitai Bot added the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Built-in agents, prompts, orchestration, and agent runtime in src/openhuman/agent/. feature Net-new user-facing capability or product behavior. rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants