The app server's RPC contract, shared by the app server (apps/server) and the UI (apps/web). One file, src/contract.ts, exported as Contract: the schemas, errors and the Contract.Api RPC group.
- This is the desktop app's own protocol, not the harness protocol. The UI speaks only this; the app server translates to CodeWork RPC servers through their contract,
@codeworksh/schema/host. - It holds desktop-only shapes too, such as thread status and grouping for issue tracking, which never reach the harness.
- It depends only on
effect,@codeworksh/schemaand@codeworksh/widget, and builds on the widget SDK's event schemas and the host's contract rather than redefining them.
A change here is a change to both sides: update the handler in apps/server/src/handlers.ts and the callers in apps/web together.
src/contract.ts: every schema and theApigroup.
vp run typecheck here checks the contract alone. See desktop internals for how the app server and UI use it.