Skip to content

feat(cowork): add session bus and Codex handoff lane - #18

Open
nakhunkrit wants to merge 2 commits into
composio-community:masterfrom
nakhunkrit:master
Open

feat(cowork): add session bus and Codex handoff lane#18
nakhunkrit wants to merge 2 commits into
composio-community:masterfrom
nakhunkrit:master

Conversation

@nakhunkrit

Copy link
Copy Markdown

Summary

  • Add a local Cowork session bus with inbox/unread support
  • Add Codex handoff lane for task packages and completion reports back into Cowork
  • Add renderer inbox UI, link/auto-context toggles, and /codex ... command
  • Add smoke script: npm run smoke:cowork-lane

Validation

  • node --check passed for changed JS files
  • npm run smoke:cowork-lane passed
  • git diff --check passed before push

Caveat

  • Full Electron UI/manual smoke was not run yet in this session. The smoke script verifies backend/session-bus/handoff behavior, including prompt file generation and completion report routing.

Safety

  • No auto-run of Codex work from Cowork
  • Codex receives an explicit handoff package only
  • Completion reports route back to Cowork inbox
  • Runtime data under server/data/ is ignored

=== TEST CAVEAT (read first) ===

- node --check passed on all 5 JS files:
    preload.js, server/server.js, server/codex-handoff.js,
    server/session-bus.js, renderer/renderer.js
- HTML (renderer/index.html) and CSS (renderer/style.css) are not
  Node-executable — node --check does not apply, treated as inert markup.
- No runtime/integration tests run. There is no test suite in this repo
  yet. The 'TEST before deploy / before runtime change' rule still holds
  in spirit — this commit lives only in local master, NOT pushed.
- Manual smoke (electron start, IPC handshake, inbox toggle) NOT performed
  in this session. Must be done before push.

=== Changes ===

- server/session-bus.js (new, 168 lines):
  In-process pub/sub channel between Cowork main process and renderer.
  Backend for the inbox / lane updates.

- server/codex-handoff.js (new, 194 lines):
  Codex handoff lane — accepts task envelopes from the UI and routes them
  toward the Codex CLI agent (separate process). Pair with the /codex
  slash command template P'Ball defined earlier.

- server/server.js (+173 lines):
  Wire session-bus and codex-handoff routes into the Express layer.

- preload.js (+121 lines):
  Expose session-bus + handoff IPC channels to the renderer with a
  contextBridge-style allowlist.

- renderer/index.html (+15 / -2):
  Add inbox panel + toggle button mount points.

- renderer/renderer.js (+492 lines):
  Inbox panel rendering, toggle state, subscribe to session-bus events,
  send handoff envelopes through preload.

- renderer/style.css (+214 lines):
  Inbox + toggle styling (panel layout, badge counts, lane separators).

=== Not pushed ===

Committed locally on master only. Remote
origin/master is github.com/ComposioHQ/open-claude-cowork — awaiting
P'Ball diff approval before any push.

=== Scope clarity ===

This commit has NOTHING to do with App1-MindVerse, oracle-knowledge,
astrology, ธัมมวิโมกข์, or the Zoul work earlier in the session.
That work lives in /Users/nakhunkrit/Documents/New project on the
codex/kammatthana-trance-script branch and is also not pushed.
@nakhunkrit

Copy link
Copy Markdown
Author

Update: pushed follow-up fix commit 8d24625 to the PR branch.

Additional validation completed:

  • Backend starts without COMPOSIO_API_KEY; Composio MCP tools are optional/lazy now.
  • npm run smoke:cowork-lane passes.
  • Real backend API smoke passed: POST /api/codex/handoffs created a prompt file under server/data/codex-handoffs/.
  • Electron app launches successfully (npm startElectron app ready).
  • Runtime data is ignored via server/data/.

Remaining caveat: manual click-through of the rendered inbox/toggle UI still needs human visual confirmation.

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.

1 participant