mesurer-solid 0.2.1-beta.1 → 0.2.1-beta.3
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/AGENT_INTEGRATION.md +3 -3
- package/README.md +6 -5
- package/dist/index.js +2805 -2642
- package/dist/inject-script.js +14 -14
- package/dist/inject.js +3668 -3505
- package/dist/plugin-catalog.d.ts +0 -7
- package/dist/plugins/codex/index.d.ts +1 -1
- package/dist/plugins.js +1360 -1244
- package/package.json +6 -1
- package/plugins/codex/bridge.d.ts +34 -0
- package/plugins/codex/bridge.mjs +158 -0
- package/plugins/codex/preload.cjs +25 -0
- package/plugins/codex/preload.d.ts +22 -0
- package/plugins/codex/preload.mjs +18 -0
- package/skills/mesurer-ui/SKILL.md +1 -1
package/AGENT_INTEGRATION.md
CHANGED
|
@@ -245,15 +245,15 @@ The optional human `screenshot()` plugin from `mesurer-solid/plugins` is a separ
|
|
|
245
245
|
|
|
246
246
|
## Optional human-to-Codex delivery
|
|
247
247
|
|
|
248
|
-
The first-party `codex()` plugin
|
|
248
|
+
The first-party `codex()` plugin starts enabled when the native host capability exists. Browser-only hosts list it in Settings but start with it off. It is a human-triggered delivery path and does not add a generic send method to `window.__MESURER__`.
|
|
249
249
|
|
|
250
|
-
Native hosts expose `window.__MESURER_HOST__.codexBridge(request)`.
|
|
250
|
+
Native hosts expose `window.__MESURER_HOST__.codexBridge(request)`. Electron main can install `installMesurerCodexHost()`, and a bundled preload can expose `createMesurerCodexPreloadBridge()`. Turning Codex on waits for a native lease and transport readiness. Turning it off waits for lease release before Mesurer removes the plugin. Shared sessions use Codex's existing local app-server. When the host inherits both `CODEX_THREAD_ID` and `CODEX_APP_TOOLS_PIPE_PATH` from Codex Desktop, Mesurer exposes only that exact Desktop thread, queues once through Codex's native queue command, and wakes the same thread with `codex://threads/<id>`. The app-tools pipe is an ownership signal only and is never opened. There is no Mesurer Codex daemon, localhost listener, marketplace plugin, or Codex SessionStart/SessionEnd hook.
|
|
251
251
|
|
|
252
252
|
Shared delivery exposes currently loaded Codex threads. Desktop fallback exposes only the exact inherited current thread and refuses any other destination. Page affinity and explicit destination overrides remain fail-closed.
|
|
253
253
|
|
|
254
254
|
Shared delivery calls `thread/queue/add` directly. Desktop current-thread delivery uses the native queue command only for that exact inherited thread. Mesurer never calls `turn/steer`, never creates a thread, and never reconstructs a second user-message queue. The typed `codex:v1` service exposes `health()`, `listThreads()`, `useThread(thread)`, `delivery(deliveryId)`, and canonical `queue(request?)`. `send(request?)` remains a compatibility alias.
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+
Shared queue submission is single-flight while Mesurer tracks lifecycle. Desktop current-thread delivery keeps its durable queued receipt visible without blocking a later explicit queue action. A matched completed turn may remove only the annotation ids sent with that delivery; interrupted, failed, ambiguous, or unreadable work keeps them. Turn completion is transport state, not proof that the requested UI result is correct.
|
|
257
257
|
|
|
258
258
|
See [Queue Context feedback to Codex](../../docs/CODEX.md) for host wiring, routing, recovery, privacy, and failure behavior.
|
|
259
259
|
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ if (import.meta.env.DEV) {
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
For Vite, put this in the existing browser entry such as `src/main.tsx`, `src/main.ts`, or `src/index.tsx`. In Electron, use the renderer entry and keep privileged Electron work in preload/main. If preload exposes `window.__MESURER_HOST__.captureScreenshot`, Screenshot uses native capture and Color Picker samples the current application window through that same capability.
|
|
45
|
+
For Vite, put this in the existing browser entry such as `src/main.tsx`, `src/main.ts`, or `src/index.tsx`. In Electron, use the renderer entry and keep privileged Electron work in preload/main. If preload exposes `window.__MESURER_HOST__.captureScreenshot`, Screenshot uses native capture and Color Picker samples the current application window through that same capability. If preload exposes `window.__MESURER_HOST__.codexBridge`, Codex starts enabled and waits for a native activation lease before it becomes available. Browser-only hosts list Codex in Settings but start with it off. Renderer configuration remains runtime-neutral. In SSR applications, mount from a client-only module or lifecycle.
|
|
46
46
|
|
|
47
47
|
`src/dev/mesurer.ts` is an optional organization pattern, not a required filename or directory. Do not mount Mesurer from `vite.config.ts`, server/API code, Node-only scripts, an Electron main process, or a module that also executes during SSR.
|
|
48
48
|
|
|
@@ -85,7 +85,8 @@ Advanced integrations may supply their own `pluginHost`. That host remains calle
|
|
|
85
85
|
| `mesurer-solid/inject` | Programmatic browser injection |
|
|
86
86
|
| `mesurer-solid/inject-script` | Built classic injection artifact |
|
|
87
87
|
| `mesurer-skill` | Install the portable coding-agent skill |
|
|
88
|
-
| `mesurer-solid/plugins/codex/bridge` | Native
|
|
88
|
+
| `mesurer-solid/plugins/codex/bridge` | Native Codex transport and Electron main-process host adapter |
|
|
89
|
+
| `mesurer-solid/plugins/codex/preload` | Bundle-friendly Electron preload adapter for the Codex host capability |
|
|
89
90
|
|
|
90
91
|
Programmatic injection reuses an existing connected instance by default. Lifecycle-owning integrations can set `recoverDisconnected: true` in `MesurerInjectConfig` to remount Mesurer when page DOM replacement disconnects its host. The option defaults to `false`, so ordinary one-shot injection does not silently reappear after disposal.
|
|
91
92
|
|
|
@@ -176,11 +177,11 @@ See [Agent integration](https://github.com/jhomra21/mesurer-solid/blob/main/pack
|
|
|
176
177
|
|
|
177
178
|
### Queue to Codex
|
|
178
179
|
|
|
179
|
-
Codex
|
|
180
|
+
Codex starts enabled when the native host capability exists and remains toggleable under **Settings -> Plugins**. Browser-only hosts list it but start with it off.
|
|
180
181
|
|
|
181
|
-
Native applications
|
|
182
|
+
Native applications install `installMesurerCodexHost()` in Electron main and expose `createMesurerCodexPreloadBridge()` from a bundled preload. The bridge runs in the native host process. Each enabled renderer owns a native lease. Settings waits for activation readiness before committing ON and waits for lease release before committing OFF. Shared sessions use Codex's local app-server directly. An inherited Codex Desktop thread uses one native queue operation and one `codex://threads/<id>` wake. Mesurer never opens the private Desktop app-tools pipe or starts a second Mesurer process.
|
|
182
183
|
|
|
183
|
-
**Queue to Codex** remains one runtime-neutral API. Shared delivery tracks Queued, Working, Finished, or Interrupted through the shared app-server. Desktop current-thread delivery
|
|
184
|
+
**Queue to Codex** remains one runtime-neutral API. Shared delivery tracks Queued, Working, Finished, or Interrupted through the shared app-server. Desktop current-thread delivery keeps the durable queued submission and wake result visible without fabricating private Desktop lifecycle state. It does not create threads or invoke Steer.
|
|
184
185
|
|
|
185
186
|
Saved annotations included in a delivery are removed only after the exact matched turn completes. Interrupted, failed, ambiguous, or unreadable deliveries keep them. Set `codex({ clearCompletedAnnotations: false })` to retain completed notes.
|
|
186
187
|
|