mesurer-solid 0.2.0-beta.8 → 0.2.0

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Mesurer's agent integration is the rendered page itself. The coding agent reads `window.__MESURER__` through the browser control it already has, consumes human visual intent, edits normal application source, and verifies the real Live result.
4
4
 
5
- The normal agent workflow requires no Mesurer MCP server, localhost daemon, Send-to-agent callback, or browser-tool-specific transport. The optional `codex()` plugin is a separate human convenience path for explicitly sending Context feedback to Codex threads that a local Codex process or the user has registered with the loopback companion; it does not replace the browser-state contract described here.
5
+ The normal agent workflow requires no Mesurer MCP server, localhost daemon, Send-to-agent callback, or browser-tool-specific transport. The optional `codex()` plugin is a separate human convenience path for sending Context feedback through the native host's Codex transport; it does not replace the browser-state contract described here.
6
6
 
7
7
  ## Install the agent skill
8
8
 
@@ -17,10 +17,7 @@ The installer writes a self-contained skill and injection artifact:
17
17
  .agents/skills/mesurer-ui/
18
18
  ├── SKILL.md
19
19
  └── assets/
20
- ├── inject-script.js
21
- ├── codex-connect.mjs
22
- ├── codex-lifecycle.mjs
23
- └── codex-bridge.mjs
20
+ └── inject-script.js
24
21
  ```
25
22
 
26
23
  ## Know the available capabilities
@@ -248,19 +245,17 @@ The optional human `screenshot()` plugin from `mesurer-solid/plugins` is a separ
248
245
 
249
246
  ## Optional human-to-Codex delivery
250
247
 
251
- A page can mount `codex()` next to `context()` for explicit human-triggered delivery. This is optional and does not add a generic send method to `window.__MESURER__`.
248
+ The first-party `codex()` plugin is enabled by default and remains toggleable in Mesurer Settings. It is a human-triggered delivery path and does not add a generic send method to `window.__MESURER__`.
252
249
 
253
- For local Codex projects, the trusted `SessionStart` connector starts or reuses the packaged loopback companion and registers the current session with its project directory. Browser code cannot register arbitrary sessions or start the local process.
250
+ Native hosts expose `window.__MESURER_HOST__.codexBridge(request)`. The matching `codexBridge()` implementation is published from `mesurer-solid/plugins/codex/bridge` and runs in the host process. 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 lifecycle hook.
254
251
 
255
- Delivery uses Codex's native durable queue. Mesurer queues once and keeps the queued-submission id. Desktop delivery opens the existing `codex://threads/<threadId>` destination and lets Codex's queue watcher run the item when the thread can accept it. CLI/TUI sessions use the same queued item and may resume a cold `notLoaded` thread through the shared daemon. Mesurer never calls `turn/steer`, never deletes and resends an existing queue item during recovery, and does not use the Desktop app-tools pipe as a second delivery path.
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.
256
253
 
257
- The browser plugin connects lazily on the first Queue to Codex or thread-picker action. Page affinity and an explicit destination override persist per tab. If several registered threads are visible and the page has no saved destination, the user must choose one.
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.
258
255
 
259
- The typed `codex:v1` service exposes `health()`, `listThreads()`, `useThread(thread)`, `delivery(deliveryId)`, and canonical `queue(request?)`. `send(request?)` remains a compatibility alias. The generic plugin command is `codex.queue`; `codex.send` remains its compatibility alias. Queue submission is single-flight. A matched completed turn may remove only the annotation ids sent with that delivery; interrupted, failed, ambiguous, or unreadable work keeps them.
256
+ Queue submission is single-flight. 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.
260
257
 
261
- Mesurer does not create new Codex threads. Create or open the thread in Codex and let `SessionStart` register it. Turn completion is transport lifecycle, not proof that the requested UI result is correct.
262
-
263
- See [Queue Context feedback to Codex](../../docs/CODEX.md) for setup, routing, recovery, privacy, and failure behavior.
258
+ See [Queue Context feedback to Codex](../../docs/CODEX.md) for host wiring, routing, recovery, privacy, and failure behavior.
264
259
 
265
260
  ## Revalidate after source edits
266
261
 
package/README.md CHANGED
@@ -8,6 +8,11 @@ Mesurer Solid ships its own isolated Solid 2 renderer. Host applications can use
8
8
  <img src="https://raw.githubusercontent.com/jhomra21/mesurer-solid/main/docs/assets/readme/hero-multi-spacing.png" alt="Mesurer Solid measuring spacing between selected elements" width="100%">
9
9
  </p>
10
10
 
11
+ <p align="center">
12
+ <img src="https://raw.githubusercontent.com/jhomra21/mesurer-solid/main/docs/assets/readme/electron-typography.png" alt="Mesurer Solid inspecting typography inside an Electron application" width="49%">
13
+ <img src="https://raw.githubusercontent.com/jhomra21/mesurer-solid/main/docs/assets/readme/electron-rulers.png" alt="Mesurer Solid using rulers and guides inside an Electron application" width="49%">
14
+ </p>
15
+
11
16
  ## Installation
12
17
 
13
18
  ```bash
@@ -80,8 +85,7 @@ Advanced integrations may supply their own `pluginHost`. That host remains calle
80
85
  | `mesurer-solid/inject` | Programmatic browser injection |
81
86
  | `mesurer-solid/inject-script` | Built classic injection artifact |
82
87
  | `mesurer-skill` | Install the portable coding-agent skill |
83
- | `mesurer-codex` | Run the optional loopback Codex queue companion |
84
- | `mesurer-codex-connect` | Start or reuse the matching Codex companion and register the current Codex session |
88
+ | `mesurer-solid/plugins/codex/bridge` | Native-host Codex Bridge for the first-party Codex plugin |
85
89
 
86
90
  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.
87
91
 
@@ -100,7 +104,7 @@ Programmatic injection reuses an existing connected instance by default. Lifecyc
100
104
  - Compact the toolbar to active controls without changing tool state or order.
101
105
  - Choose System, Light, or Dark appearance while keeping the same theme across isolated and document-backed Mesurer UI.
102
106
 
103
- Arrange is not a toolbar mode. It can be activated before a selection exists and enables Select automatically. Turning Arrange off leaves Select active; turning Select off exits Arrange.
107
+ Arrange is not a toolbar mode. It can be activated before a selection exists and enables Select automatically. Turning Arrange off leaves Select active; turning Select off exits Arrange. Escape clears the current Select or Arrange selection first. A second Escape with nothing selected exits Select, or exits both Arrange and Select. Each moved Arrange target has a Reset position control, and the Arrange menu can reset all positions on the current page.
104
108
 
105
109
  Toolbar dragging starts after the pointer crosses the drag threshold. Dragging from Settings, Guide, or plugin triggers closes the open menu or panel. Pointer activity inside menus, dialogs, form controls, editable regions, and sliders does not drag the toolbar.
106
110
 
@@ -168,30 +172,18 @@ The skill preserves existing human state, reads Arrange/text/annotation intent b
168
172
 
169
173
  See [Agent integration](https://github.com/jhomra21/mesurer-solid/blob/main/packages/mesurer/AGENT_INTEGRATION.md).
170
174
 
171
- ### Optional Queue to Codex
175
+ ### Queue to Codex
172
176
 
173
- Mount `codex()` next to Context when a person should be able to queue the current review to Codex:
177
+ Codex is enabled by default and remains toggleable under **Settings -> Plugins**.
174
178
 
175
- ```ts
176
- import { mountMesurer } from "mesurer-solid"
177
- import { codex, context } from "mesurer-solid/plugins"
179
+ Native applications expose `window.__MESURER_HOST__.codexBridge` from preload/main and back it with `codexBridge()` from `mesurer-solid/plugins/codex/bridge`. The bridge runs in the native host process. Shared sessions use Codex's local app-server directly. If the host inherited an exact Codex Desktop thread, the bridge queues once to that thread through Codex's native queue command and wakes it with `codex://threads/<id>`. The Desktop app-tools pipe is never opened. There is no Mesurer localhost server, helper Electron process, marketplace plugin, SessionStart hook, or repeated trust step.
178
180
 
179
- mountMesurer({
180
- plugins: [context(), codex()],
181
- })
182
- ```
183
-
184
- The trusted Codex `SessionStart` integration normally starts or reuses the local companion and registers the current thread. It can also be run directly:
185
-
186
- ```bash
187
- bunx mesurer-codex-connect
188
- ```
181
+ **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 reports the durable queued submission and wake result without fabricating private Desktop lifecycle state. It does not create threads or invoke Steer.
189
182
 
190
- **Queue to Codex** writes one item to Codex's native durable queue and tracks that delivery through Queued, Working, Finished, or Interrupted. It does not create threads or invoke Steer. A Mesurer page keeps its selected destination across a same-tab reload.
183
+ 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.
191
184
 
192
- Saved annotations included in a delivery are removed only after the exact matched turn completes. Interrupted, failed, or uncertain deliveries keep them. Set `codex({ clearCompletedAnnotations: false })` to retain completed notes.
185
+ See [Queue Context feedback to Codex](https://github.com/jhomra21/mesurer-solid/blob/main/docs/CODEX.md) for host wiring, loaded-thread discovery, recovery, and the typed `codex:v1` service.
193
186
 
194
- See [Queue Context feedback to Codex](https://github.com/jhomra21/mesurer-solid/blob/main/docs/CODEX.md) for thread discovery, Desktop and CLI/TUI behavior, lifecycle recovery, permissions, and the typed `codex:v1` service.
195
187
  ## Documentation
196
188
 
197
189
  - [Capabilities](https://github.com/jhomra21/mesurer-solid/blob/main/docs/CAPABILITIES.md)
package/dist/arrange.d.ts CHANGED
@@ -85,6 +85,8 @@ export type MesurerArrangeService = {
85
85
  showCurrent(): void;
86
86
  capturePlan(id: string, state: ArrangePresentation): ArrangeCapturePlan;
87
87
  review(id: string, tolerance?: number): ArrangeReview;
88
+ resetSelection(): Promise<void>;
89
+ resetAll(): Promise<void>;
88
90
  clear(): Promise<void>;
89
91
  };
90
92
  export declare const arrange: () => MesurerPlugin;
package/dist/index.d.ts CHANGED
@@ -142,9 +142,9 @@ export type MesurerOptions = {
142
142
  selectionSpacingStyle?: Partial<SelectionSpacingStyle>;
143
143
  rulerSettings?: Partial<RulerSettings>;
144
144
  /**
145
- * Initial enabled plugin set. Omit this to enable every first-party Mesurer plugin.
146
- * Omitted first-party plugins remain toggleable in Settings from the same canonical
147
- * registry; callers never maintain a separate availability or Settings list.
145
+ * Initial enabled plugin set. Omit this to use the first-party catalog defaults.
146
+ * First-party plugins, including Codex, remain toggleable in Settings from the
147
+ * same canonical registry.
148
148
  */
149
149
  plugins?: readonly MesurerPlugin[];
150
150
  /** Built-in tools to omit from this mount. Names match the public plugin factories. */