openwork-server 0.18.45 → 0.18.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -61,6 +61,58 @@ Desktop Automation and remote-command requests opt out with
61
61
  Runtime journey verification for actual Electron restarts on both engines remains
62
62
  separate from the focused coordinator and mocked-proxy tests.
63
63
 
64
+ ## MCP App launch ownership
65
+
66
+ An interactive host sends `context: { sessionId, readOnly, engine? }` with
67
+ `POST /workspace/:id/mcp-apps/resolve`. `sessionId` is the originating conversation
68
+ or `null` for a dashboard; `engine` is `v1` (default) or `v2`, never a provider URL.
69
+ An actionable response includes an opaque `app.launchId`. The host keeps the
70
+ server endpoint and workspace that resolved it, rather than the currently
71
+ selected workspace. No credential, configuration, or fingerprint is returned.
72
+
73
+ `POST /workspace/:id/mcp-apps/call` requires that `launchId`, the same `sessionId`
74
+ and `engine`, and the existing `serverName`, `resourceUri`, `name`, `arguments`,
75
+ and optional `approved` fields. The server binds the lease to its own instance,
76
+ workspace path, conversation, original native launch tool, resource URI, and
77
+ private configuration fingerprint. It rechecks the original tool's App visibility,
78
+ resource binding and availability, original and requested tool policy, current
79
+ session ownership/archive state, and configuration before dispatch. Existing
80
+ helper audience and approval rules are unchanged.
81
+
82
+ Leases are process-local, expire after 30 minutes, and are capped at 256 per
83
+ server (oldest first eviction). `POST /workspace/:id/mcp-apps/release` with
84
+ `{ launchId }` closes one workspace-owned lease. Closing/replacing a conversation
85
+ view releases it; the renderer also invalidates its bridge synchronously and
86
+ checks liveness before and after approval. A release failure is bounded by lease
87
+ expiry. Already-dispatched provider operations cannot be recalled.
88
+
89
+ The private fingerprint includes effective configuration (including headers),
90
+ workspace/global runtime generations of the relevant MCP entry, private Connect authorization
91
+ generation, and local managed gateway connection/credential/registration
92
+ revisions. Named-entry generations are process-local, like the leases, and track
93
+ host runtime writes including removal/restoration. Unrelated provider, plugin,
94
+ and other MCP edits do not invalidate a lease. Private Connect hosts track the
95
+ `openwork-cloud` runtime entry as well as their private authorization generation.
96
+ File-backed configuration is compared by its
97
+ observed values; edits restored between observations are not observable history.
98
+ Provider-side account changes that leave all host-visible credentials and
99
+ configuration unchanged are not detectable by this contract.
100
+
101
+ Compatibility is intentionally fail-closed: older clients may still resolve HTML,
102
+ but calls without a lease return `missing_launch_context`; stale leases return
103
+ `stale_launch_context` with reopening guidance. New clients on old servers do not
104
+ dispatch unbound calls. Generated read-only previews and archived result views
105
+ still render and support local interactions without acquiring a lease. Dashboard
106
+ HTML/result caches never persist a launch ID and remain read-only until refreshed.
107
+
108
+ The renderer contract is `McpAppOrigin` and `createMcpAppActions` in
109
+ `apps/app/src/components/chat/mcp-app-origin.ts`; `MessageListProvider` receives
110
+ it from the owning `SessionSurface`. `McpAppLaunchContext`, resolution, validation,
111
+ and release are owned by `src/mcp-app-host.ts`, with HTTP/session checks in
112
+ `src/server.ts`.
113
+ Internal callers of `callMcpAppTool` must supply `assertSessionActive` for a
114
+ conversation lease; omitting the guard fails closed.
115
+
64
116
  ## Config file
65
117
 
66
118
  Defaults to `~/.config/openwork/server.json` (override with `OPENWORK_SERVER_CONFIG` or `--config`).
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openwork-server",
3
- "version": "0.18.45",
3
+ "version": "0.18.47",
4
4
  "description": "Filesystem-backed API for OpenWork remote clients",
5
5
  "type": "module",
6
6
  "bin": {