Skip to content

v1.4.3 — Bidirectional Bridge: OMG → OMC Push

Choose a tag to compare

@jmstar85 jmstar85 released this 11 May 07:50
· 26 commits to main since this release

Bidirectional Bridge: OMG → OMC Push

Closes the v1.4.0 bridge into a full OMG ↔ OMC round-trip. v1.4.0 shipped one-way omc → omg import; v1.4.3 adds the reverse omg → omc export so work done in GitHub Copilot can continue in Claude Code.

Highlights

  • New module mcp-server/src/bridge/omg-exporter.ts — composes (does not blindly copy): prd.json/project-memory.json are file-copies; active_modes[] from the OMG checkpoint is decomposed into per-mode .omc/state/{mode}-state.json files (the inverse of v1.4.0's omc-importer composition); .omc/state/session-checkpoint.json is composed with translated provenance.
  • New shared helper mcp-server/src/bridge/conflict-utils.ts — shouldSkipForConflict() uses embedded timestamp field as primary conflict primitive for session-checkpoint.json (mtime fallback elsewhere — addresses git-checkout-touches-mtime brittleness); rotateBackup() keeps last N=3 timestamped .previous.{ISO}.json snapshots, applied symmetrically on both import and export sides.
  • New MCP tool omg_export_external_session({target: "omc", force?}) with atomicity contract: .omg/state/last-export-token.json is the LAST side-effect — partial-write failures leave no token, so subsequent operations correctly treat the transaction as uncommitted.
  • Round-trip safety via dual-write loop guard — importer reads either .omg/state/last-export-token.json OR the destination checkpoint's source_origin === "bridged-from-omg". Guard survives wipe of either side. No time-based TTL; token invalidates only when destination's source_origin flips to "native" or source_session_id changes.
  • Provenance schema extended (backward-compatible): new source_origin field ("native" | "bridged-from-omc" | "bridged-from-claude-code" | "bridged-from-omg") is the authoritative provenance signal; legacy source_tool: "copilot" is retained. New workspace_root field powers a project-identity guard that aborts before any mutation when source checkpoint's workspace path doesn't match the current workspace.
  • /push-omc skill (6 steps) — detect → compare → confirm → export → summarize → continue. Trigger keywords: /push-omc, "push omc", "omc 푸시", "omc로 보내기", "sync to omc", "export to omc". Mirror at vscode-omg/resources/templates/skills/push-omc/SKILL.md.
  • VS Code command omg.pushExternal ("OMG: Push to External Session (OMC)") — user-initiated only; no activation-time push notification (push remains a deliberate user action).
  • omg_compare_checkpoints reports both directions — now returns omg_newer_than_external alongside newer_than_omg so /push-omc and /resume-claude share the same comparison surface.

Test coverage

  • 8 → 23 tests across 6 zones (Unit, Provenance, Round-trip guard, Composition, Conflict-path, Project-identity)
  • mcp-server tsc clean, vscode-omg esbuild clean
  • VSIX oh-my-githubcopilot-1.4.3.vsix (84 files, 24 skills bundled)
  • Manual round-trip smoke (7 steps) verified live: dual-write OK, decomposition OK, provenance OK, loop guard fires, token-only invalidation OK, workspace_mismatch guard OK

Deferred

  • omg → claude-code direction → v1.5.x. Would require synthesizing valid tool_use/tool_result UUID chains compatible with Claude Code's resume-by-id contract.

Install

VS Code Marketplace or code --install-extension oh-my-githubcopilot-1.4.3.vsix.