feat(grok): add Grok Build adapter (hooks, settings, session parse/tail, upstream pin) - #3
Merged
Conversation
Keep plans, drafts, evidence, and boulder.json in git so adapter work can be recovered. Leave senpi-task transcripts and local planning trees out of the public repo. Co-authored-by: Cursor <cursoragent@cursor.com>
Unlabeled chunks after rewind stay on the kept prompt. fromStart after a reset advances generation so the marker can commit. Unknown tags stay in the tail records, discovery returns the real IO error, and stale marker locks older than 30s are recovered once. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Archive the finished plan to .plans/01-grok-adapter.md. Drop boulder, drafts, and evidence from the public tree so a failed run can be reset without a 460MB rollback. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The old CLAUDE.md copy was a stale cache of package.json and docs. Claude Code still loads CLAUDE.md through a symlink. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Grok Build becomes a second supported agent harness, attach-only, next to Claude.
You get hook envelopes and settings validation, session discovery under
GROK_HOME, parsers forupdates.jsonlandevents.jsonl, and a checkpointed two-source tail with rewind. The public surface is@libar-dev/agent-harness-kit/grokand@libar-dev/agent-harness-kit/grok/processing. Claude exports stay byte-identical.It does not start or drive Grok. There is no Claude-to-Grok translator and no shared session-block model.
Use it
Cockpit currently pins
3c914e4for the adapter code. This branch tip also archives the finished plan to.plans/01-grok-adapter.md.Workspace state
.omo/is live-only. Finished plans go to.plans/NN-slug.md. Boulder, drafts, senpi-task, and evidence dumps stay out of the public tree. A fresh/start-workcopies the archived plan back to.omo/plans/with boxes unchecked and deletes runtime first.Follow-up after first review
These landed after Greptile last reviewed
4322a93:currentPromptIndex = targetPromptIndex).fromStartafter a reset advances generation so the marker can commit."Required".Verification
pnpm run test:run— 1730 tests / 56 filespnpm run type-check,pnpm run lint,pnpm run build— exit 0~/.groksession (11,682 records) is byte-identical across runs with 0 invalid lines;sync-upstream-grok.mjs --checkexit 06a08ff3Decisions to sanity-check
> target_prompt_index) per the approved plan; upstreamreplay.rsimplements rewind-before-N (>= N). Documented indocs/reference/grok-adapter.md.GrokHookEventName.length === 15, drift-test pinned).@noble/hashesfor >255-byte cwd slugs — recorded indocs/upstream/grok/pin.json.Greptile Summary
Adds the Grok Build adapter for hooks and persisted session processing, including discovery, JSONL tailing, normalized blocks, checkpoints, package exports, documentation, and examples.
The previously reported tool-status issue in
src/grok/processing/blocks.tsis resolved: an executed reducer check showed that a status-only completed update changes the existing tool-use block tocompletedand produces its completed result.Confidence Score: 5/5
No blocking failure remains.
No accepted blocking findings remain. The reducer correctly propagates terminal tool status, and checkpointed session tailing preserves accumulated assistant content without replaying unrelated changes.
What T-Rex did
Reviews (5): Last reviewed commit: "docs: make AGENTS.md the single agent fi..." | Re-trigger Greptile