Skip to content

Add Windsurf Cascade external agent (preview)#28

Open
gabrielekarra wants to merge 1 commit into
entireio:mainfrom
gabrielekarra:add-windsurf-agent
Open

Add Windsurf Cascade external agent (preview)#28
gabrielekarra wants to merge 1 commit into
entireio:mainfrom
gabrielekarra:add-windsurf-agent

Conversation

@gabrielekarra
Copy link
Copy Markdown

Closes #17

Summary

  • Adds entire-agent-windsurf, a standalone Go binary implementing the Entire external agent protocol for Windsurf Cascade IDE sessions
  • Hook installation writes to .windsurf/hooks.json, preserving any existing user-defined hooks; uninstall removes only Entire entries and deletes the file only when it becomes empty
  • Lifecycle mapping: pre_user_prompt → TurnStart, post_write_code records file paths to transcript, post_cascade_response → TurnEnd
  • Incremental JSONL transcript appended across hook invocations (no external dependencies, no database)
  • Declares hooks, transcript_analyzer, and compact_transcript capabilities
  • Cross-platform: "command" field on Unix/macOS, "powershell" field on Windows
  • Scanner buffer raised to 16 MiB so large LLM responses don't cause token too long failures
  • 47 unit tests; all external-agents-tests verify compliance checks pass
  • E2E adapter registered only under E2E_AGENT=windsurf; adds IDEOnly optional interface so prompt-based lifecycle tests skip gracefully for IDE agents rather than failing

Test plan

  • go test ./... passes in agents/entire-agent-windsurf/
  • external-agents-tests verify ./entire-agent-windsurf passes all mandatory, hooks, and transcript suites
  • Install hooks in a real Windsurf project: ENTIRE_REPO_ROOT=$PWD entire-agent-windsurf install-hooks.windsurf/hooks.json created with three Entire entries, existing hooks preserved
  • Uninstall with mixed hooks: Entire entries removed, user hooks remain; file deleted when Entire-only
  • Smoke-test with a live Windsurf Cascade session: checkpoints created on commit, transcript captured

Implements the Entire external agent protocol for Windsurf Cascade IDE sessions:

- Hook installation/uninstall in .windsurf/hooks.json (preserves existing
  user-defined hooks; uninstall removes only Entire entries)
- Lifecycle mapping: pre_user_prompt → TurnStart, post_write_code records
  file paths, post_cascade_response → TurnEnd
- Incremental JSONL transcript written during the session
- transcript_analyzer: get-transcript-position, extract-modified-files,
  extract-prompts, extract-summary
- compact_transcript: base64-encoded user/assistant JSONL
- Cross-platform hook commands (command on Unix, powershell on Windows)
- Scanner buffer raised to 16 MiB to handle large LLM responses
- 47 unit tests; all external-agents-tests compliance checks pass
- E2E adapter registered only under E2E_AGENT=windsurf; IDEOnly interface
  added so prompt-based lifecycle tests skip gracefully for IDE agents

Entire-Checkpoint: a2bf39ddba1c
@alishakawaguchi alishakawaguchi self-assigned this May 15, 2026
@blackgirlbytes
Copy link
Copy Markdown
Contributor

hmm @gabrielekarra looks like you have a few failing lint checks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add Windsurf Cascade agent support (preview)

3 participants