Skip to content

fix: support OpenHands and Factory Droid transcript bundles - #121

Open
volfiros wants to merge 3 commits into
Autoloops:mainfrom
volfiros:fix/transcript-bundle
Open

fix: support OpenHands and Factory Droid transcript bundles#121
volfiros wants to merge 3 commits into
Autoloops:mainfrom
volfiros:fix/transcript-bundle

Conversation

@volfiros

@volfiros volfiros commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

greplica transcript bundle already has platform transcript loaders for OpenHands and Factory Droid, but the CLI parser only accepts codex, claude, copilot, and opencode.

That means valid OpenHands and Factory Droid transcripts are rejected before the existing projection code can run. OpenHands has an additional usability gap: event directories do not provide a bundle-level session reference unless Greplica derives one from the conversation path or event metadata.

While verifying this change, npm run build was also blocked on current main by the existing OpenCode HookInput import break. I fixed that blocker in this PR so the transcript bundle change could be built and tested end-to-end.

Changes

  • Allow openhands and factory-droid in greplica transcript bundle --platform validation and help text.
  • Add a platform-level sessionIdFromTranscriptPath fallback for transcript formats that do not always include session metadata in the filtered transcript.
  • Use the fallback for OpenHands ~/.openhands/conversations/<conversationId>/events paths.
  • Add OpenHands bundle metadata extraction for session_id / conversation ID and cwd / working_dir when those fields are present in events.
  • Add transcript bundle checks for OpenHands event directories and Factory Droid Claude-style JSONL transcripts, including explicit OpenHands metadata winning over path fallback.
  • Update README and install prompt docs so recent-session transcript backfill includes these platforms.
  • Fix the existing OpenCode HookInput type import build blocker using the same minimal approach as fix: import HookInput type from types.ts in opencode installer #110 and fix: import HookInput from hooks/types after #95 refactor #112.

Verification

npm run build
npm run typecheck
node scripts/check-transcript-bundle.js
git diff --check

Additional focused repro checks were run against temporary fixtures:

openhands transcript bundle: ok
factory-droid transcript bundle: ok

The repro checks verified that:

  • --platform openhands accepts an OpenHands events directory.
  • OpenHands bundles derive session_ref: openhands-session:<conversationId> from the events path when event metadata is missing.
  • OpenHands event metadata wins over the path fallback when conversation_id is present.
  • OpenHands bundles preserve cwd from working_dir metadata.
  • --platform factory-droid accepts Claude-style JSONL transcripts.
  • Factory Droid bundles produce session_ref: factory-droid-session:<sessionId>.
  • Embedded historical instruction tags are stripped from both bundle outputs.

Resolves #120

@volfiros

volfiros commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@kushalpatil07 can you review this?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: transcript bundle rejects OpenHands and Factory Droid despite platform transcript support

1 participant