Repository navigation
feat: add multi-agent infrastructure support - #2
Closed
zachshallbetter wants to merge 2 commits into
Closed
zachshallbetter wants to merge 2 commits into
zachshallbetter wants to merge 2 commits into
Conversation
- Add source field to type definitions (ParsedFilePath, WatcherSessionEvent, WatcherLineEvent) - Update watcher to detect and pass source through events - Update index to route events by source parameter - Foundation for extensible agent adapters (Cursor, Antigravity, etc.) - Backward compatible with existing Claude Code functionality
omoyx
pushed a commit
to omoyx/PixelHQ-bridge
that referenced
this pull request
Feb 7, 2026
Add full support for OpenAI Codex CLI as a second agent source alongside Claude Code. The bridge now watches both ~/.claude/projects/ and ~/.codex/sessions/ for JSONL activity and routes events through source-specific adapters. Infrastructure (builds on PR waynedev9598#2 multi-agent pattern): - Thread `source` field through watcher → parser → adapter pipeline - Add `source` to ParsedFilePath, WatcherSessionEvent, WatcherLineEvent - Route events to correct adapter based on source in parser Codex adapter (src/adapters/codex.ts): - Parse Codex rollout JSONL format (session_meta, response_item, etc.) - Map all Codex tools (shell, apply_patch, read_file, grep_files, list_dir, plan, spawn_agent, web_search, etc.) to PixelEvent categories - Privacy-safe: strips commands, file contents, paths, reasoning, prompts, and tool outputs — same guarantees as Claude Code adapter Config & watcher: - Auto-detect ~/.codex via CODEX_HOME env or --codex-dir flag - Watch ~/.codex/sessions/**/*.jsonl with UUID extraction from rollout filenames - Codex is optional — bridge works with Claude Code only, Codex only, or both Tests: 55 new tests (199 total) covering all Codex response_item types, tool mappings, privacy audit, edge cases, and parser integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
omoyx
added a commit
to omoyx/PixelHQ-bridge
that referenced
this pull request
Feb 7, 2026
Add full support for OpenAI Codex CLI as a second agent source alongside Claude Code. The bridge now watches both ~/.claude/projects/ and ~/.codex/sessions/ for JSONL activity and routes events through source-specific adapters. Infrastructure (builds on PR waynedev9598#2 multi-agent pattern): - Thread `source` field through watcher → parser → adapter pipeline - Add `source` to ParsedFilePath, WatcherSessionEvent, WatcherLineEvent - Route events to correct adapter based on source in parser Codex adapter (src/adapters/codex.ts): - Parse Codex rollout JSONL format (session_meta, response_item, etc.) - Map all Codex tools (shell, apply_patch, read_file, grep_files, list_dir, plan, spawn_agent, web_search, etc.) to PixelEvent categories - Privacy-safe: strips commands, file contents, paths, reasoning, prompts, and tool outputs — same guarantees as Claude Code adapter Config & watcher: - Auto-detect ~/.codex via CODEX_HOME env or --codex-dir flag - Watch ~/.codex/sessions/**/*.jsonl with UUID extraction from rollout filenames - Codex is optional — bridge works with Claude Code only, Codex only, or both Tests: 55 new tests (199 total) covering all Codex response_item types, tool mappings, privacy audit, edge cases, and parser integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
omoyx
added a commit
to omoyx/PixelHQ-bridge
that referenced
this pull request
Feb 7, 2026
Add full support for OpenAI Codex CLI as a second agent source alongside Claude Code. The bridge now watches both ~/.claude/projects/ and ~/.codex/sessions/ for JSONL activity and routes events through source-specific adapters. Infrastructure (builds on PR waynedev9598#2 multi-agent pattern): - Thread `source` field through watcher → parser → adapter pipeline - Add `source` to ParsedFilePath, WatcherSessionEvent, WatcherLineEvent - Route events to correct adapter based on source in parser Codex adapter (src/adapters/codex.ts): - Parse Codex rollout JSONL format (session_meta, response_item, etc.) - Map all Codex tools (shell, apply_patch, read_file, grep_files, list_dir, plan, spawn_agent, web_search, etc.) to PixelEvent categories - Privacy-safe: strips commands, file contents, paths, reasoning, prompts, and tool outputs — same guarantees as Claude Code adapter Config & watcher: - Auto-detect ~/.codex via CODEX_HOME env or --codex-dir flag - Watch ~/.codex/sessions/**/*.jsonl with UUID extraction from rollout filenames - Codex is optional — bridge works with Claude Code only, Codex only, or both Tests: 55 new tests (199 total) covering all Codex response_item types, tool mappings, privacy audit, edge cases, and parser integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add .antigravityignore so Antigravity skips build/deps/media noise, and ensure matching heavy paths are covered in .gitignore. Co-Authored-By: Warp <agent@warp.dev>
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.
Add multi-agent infrastructure support to enable extensible agent adapters. I integrated the editors initially and then circled back to the system changes to reduce friction. If accepted, this this one of three PRs. The other two contain the Antigravity and Cursor implementation. (found on you Reddit, and have been testing Pixel Office, btw)
Infrastructure Changes
Type System: Added
sourcefield to core type definitions:ParsedFilePathinterface now includessource: stringto identify the agentWatcherSessionEventincludes optionalsourcefield for session discovery eventsWatcherLineEventincludes optionalsourcefield for line eventsSessionInfoandSessionStateEntryalready tracksourcefor session managementParser Architecture: Enhanced
src/parser.tsto support source-based routing:transformToPixelEvents()acceptssourceparameter to route to correct adapterWatcher Refactoring: Updated
src/watcher.ts:parseFilePath()now returnssourcefield (defaults to'claude-code')session,line) includesourcefor proper routingEvent Handling: Updated
src/index.ts:handleNewLine()acceptssourceparameter and passes it to parsersourceparameterBenefits
Follow-up Pull Requests
This PR establishes the foundation for multi-agent support. Two follow-up PRs will add specific agent implementations:
Cursor Integration (PR #2)
src/adapters/cursor.ts)--cursor-dirflag)~/.cursor,~/.config/cursor, and macOS Application SupportAntigravity Integration (PR #3)
src/adapters/antigravity.ts)--antigravity-dirflag)~/.antigravityor~/.config/antigravityVerification
npm testpassed (144 tests).pnpm tsc --noEmitpasses with no type errors.