Skip to content

feat(labs): replace the PI host shim with embedded opencode#1307

Draft
benjaminshafii wants to merge 2 commits intotask/labs-simplify-single-workspacefrom
task/labs-simplify-single-workspace-opencode
Draft

feat(labs): replace the PI host shim with embedded opencode#1307
benjaminshafii wants to merge 2 commits intotask/labs-simplify-single-workspacefrom
task/labs-simplify-single-workspace-opencode

Conversation

@benjaminshafii
Copy link
Copy Markdown
Member

@benjaminshafii benjaminshafii commented Apr 3, 2026

Summary

  • keep apps/openwork-host as the OpenWork-owned backend adapter, and swap its PI runtime for embedded opencode started via createOpencode(...)
  • make apps/labs/electron/main.ts talk to openwork-host again over the local HTTP/SSE wrapper instead of owning the opencode SDK directly
  • preserve the single-workspace Labs flow while routing session/message updates through the host bridge and updating lockfile/package wiring for the restored package

Testing

  • pnpm --filter openwork-host typecheck
  • pnpm --filter @openwork/labs typecheck
  • pnpm --filter openwork-host build
  • pnpm --filter @openwork/labs build
  • OPENWORK_LABS_SMOKE_WORKSPACE_DIR=/Users/benjaminshafii/openwork-enterprise/_worktrees/openwork-labs-simplify-single-workspace-opencode OPENWORK_LABS_SMOKE_PROMPT=\"Say hello from openwork-host backed by embedded opencode in one sentence.\" pnpm --filter @openwork/labs start
    • runtime log showed openwork-host starting embedded opencode, Labs connecting to the local host URL, smoke session creation, prompt submission, assistant reply, and host shutdown
  • pnpm --filter openwork-host exec node --input-type=module -e "...createOpencode...client.session.list/messages..."
    • verified the persisted smoke session reply text: Hello from openwork-host, backed by embedded opencode.

Notes

  • This keeps the architecture split the branch asked for: frontend Labs/Electron -> backend openwork-host -> embedded opencode server/client.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment Apr 3, 2026 4:50pm
openwork-den Ready Ready Preview, Comment Apr 3, 2026 4:50pm
openwork-den-worker-proxy Ready Ready Preview, Comment Apr 3, 2026 4:50pm
openwork-landing Ready Ready Preview, Comment, Open in v0 Apr 3, 2026 4:50pm
openwork-share Ready Ready Preview, Comment Apr 3, 2026 4:50pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

The following comment was made by an LLM, it may be inaccurate:

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