Skip to content

Add entire-agent-goose: Goose external agent#39

Open
blackgirlbytes wants to merge 5 commits into
mainfrom
goose-agent
Open

Add entire-agent-goose: Goose external agent#39
blackgirlbytes wants to merge 5 commits into
mainfrom
goose-agent

Conversation

@blackgirlbytes

@blackgirlbytes blackgirlbytes commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What

Adds entire-agent-goose, an external agent binary integrating Goose (open source coding agent under Agentic AI Foundation) with Entire — built via the repo's /entire-external-agent skill (research → write-tests → implement).

Capabilities: hooks, transcript_analyzer, transcript_preparer, token_calculator, compact_transcript

  • Hooksinstall-hooks writes a project-scope goose plugin (.agents/plugins/entire/hooks/hooks.json) forwarding goose's native SessionStart / UserPromptSubmit / Stop / SessionEnd lifecycle events to entire hooks goose <verb>. Goose discovers project plugins from its working directory; no global goose config is touched.
  • Transcripts — goose stores sessions in SQLite with no per-session file; prepare-transcript (and best-effort on stop/session-end) materializes one via goose session export --format json next to goose's sessions.db. Transcript positions are message indexes since every export rewrites the document.
  • Tokens — from the export's accumulated session totals (per-message counts are NULL in goose's DB; no cache split — documented in AGENT.md).
  • Compact transcripts — converts the export to Entire Transcript Format so conversations render in entire explain --full and the web UI.

All research is verified against real goose 1.37.0 hook captures and exports (see AGENT.md + scripts/verify-goose.sh, which probes via a throwaway workspace without touching global config).

Design note worth maintainer eyes 👀

The session dir is goose's data dir (~/.local/share/goose/sessions), deliberately outside the repo: Entire attributes a session to the first registered agent whose get-session-dir contains the transcript path, and a repo-local dir like .entire/tmp/goose nests inside amp's/kiro's .entire/tmp — with entire-agent-amp installed, Amp silently claimed every goose session and TurnEnd checkpoints were skipped. Since amp and kiro share .entire/tmp today, the same misattribution risk exists between them; the CLI may want longest-prefix matching in AgentForTranscriptPath.

Shared harness fixes (benefit all agents)

  • e2e/entire/entire.go: RewindList tolerates the deprecation banner newer entire versions print before the JSON
  • e2e/lifecycle_test.go: SessionPersistence resolves the session dir via the agent's get-session-dir instead of hardcoding .entire/tmp, and only counts files fresher than the test start

Testing

  • Protocol compliance (external-agents-tests verify): 29/29 pass
  • Lifecycle e2e (E2E_AGENT=goose, real goose + real provider): all 8 scenarios pass (enable, hooks install, single/multi prompt checkpoints, session persistence, rewind pre/post-commit, interactive tmux session)
  • Unit tests: hook parsing, install/uninstall round-trip, transcript analysis, token calc, compact conversion — all against payloads captured from real goose sessions

Companion PRs

  • entirehq/entire.io#2354 — web rendering + attribution for goose
  • entireio/cli (branch ready) — --full/--verbose external-agent transcript display fix

🤖 Generated with Claude Code

blackgirlbytes and others added 5 commits June 11, 2026 07:05
Phase 1 of the entire-external-agent pipeline. Verdict: COMPATIBLE.
All hook payloads, session storage, transcript export, and token data
verified against goose 1.37.0 with real captures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Entire-Checkpoint: 7dbce10631e8
Compilable protocol scaffold (valid info, exit 1 on unknown subcommand),
generic protocol package shared with the amp layout, and the goose e2e
adapter registered in the lifecycle harness. Compliance suite reaches the
binary; install-hooks, session round-trip, and chunk validation are the
known failures Phase 3 implements against.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Entire-Checkpoint: 2449af6d083e
…tion

Protocol compliance 29/29 and all 8 lifecycle e2e scenarios pass against
goose 1.37.0 with a real provider.

- install-hooks writes a project-scope goose plugin
  (.agents/plugins/entire/hooks/hooks.json) forwarding SessionStart,
  UserPromptSubmit, Stop, and SessionEnd to `entire hooks goose <verb>`
- parse-hook maps goose HookContext payloads to Entire events, exporting
  the session transcript (goose session export --format json) best-effort
  on session-start/stop/session-end
- transcripts materialize next to goose's sessions.db; the session dir
  must stay outside the repo because Entire attributes sessions to the
  first agent whose session dir contains the transcript path, and a
  repo-local dir nests inside amp's/kiro's .entire/tmp
- transcript positions are message indexes (exports rewrite the whole
  JSON document, so byte offsets aren't stable)
- token usage comes from the export's accumulated session totals

Harness fixes for all agents: RewindList tolerates the `rewind`
deprecation banner printed by newer entire versions, and
SessionPersistence resolves the session dir via get-session-dir instead
of hardcoding .entire/tmp (and only counts files fresher than the test).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Entire-Checkpoint: 3fea30f8c0ed
Without it Entire renders only user prompts (extract-prompts); assistant
responses and tool calls were stored in the raw export but invisible.
compact-transcript converts the goose export to Entire Transcript Format
JSONL, folding toolResponse blocks into their tool_use entries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Entire-Checkpoint: 1b255189c5c9
The transcript analyzers intentionally degrade unparseable content to
empty results; express that through tryParseGooseExport (no error
produced) instead of swallowing a captured error.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Entire-Checkpoint: aee73de4f170
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.

1 participant