opentakeoff-mcp 0.9.100 → 0.9.105

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.
Files changed (3) hide show
  1. package/README.md +47 -4
  2. package/dist/server-core.js +1995 -454
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -44,9 +44,9 @@ what's missing where rendering isn't available.
44
44
  engine is re-validated against a wider plan corpus: `tools/list` never names them, the
45
45
  initialize `instructions` say so and point at `measure_polygon`, and no other tool's
46
46
  description sends an agent to a verb that is not there. A default build registers
47
- **<!--tool-count-->58<!--/tool-count--> tools**. Everything else — sweeps, counts, `derive_base`, `derive_transitions`, the
47
+ **<!--tool-count-->62<!--/tool-count--> tools**. Everything else — sweeps, counts, `derive_base`, `derive_transitions`, the
48
48
  exports — is unchanged. Set `OPENTAKEOFF_ONE_CLICK=1` in the server's environment to
49
- register both verbs (<!--tool-count-all-->60<!--/tool-count-all--> tools); the parity, conformance and e2e tests run that way, and
49
+ register both verbs (<!--tool-count-all-->64<!--/tool-count-all--> tools); the parity, conformance and e2e tests run that way, and
50
50
  `test/gate.test.ts` pins both surfaces. The rows and examples below that use `one_click`
51
51
  describe the lifted build. Design note: [`docs/design/ONE_CLICK_GATE.md`](../docs/design/ONE_CLICK_GATE.md).
52
52
 
@@ -123,7 +123,7 @@ includes document text, shape vertices, or result payload content.
123
123
 
124
124
  ### Staged tool exposure (opt-in)
125
125
 
126
- By default every client gets all <!--tool-count-->58<!--/tool-count--> tool schemas on `tools/list`—the flat
126
+ By default every client gets all <!--tool-count-->62<!--/tool-count--> tool schemas on `tools/list`—the flat
127
127
  contract every published client already expects. Fifty-two descriptions is real
128
128
  token weight for an agent session that may never touch half of them, so the
129
129
  server can instead stage the surface along the workflow it already teaches:
@@ -132,7 +132,7 @@ server can instead stage the surface along the workflow it already teaches:
132
132
  OPENTAKEOFF_MCP_STAGED_TOOLS=1 npx -y opentakeoff-mcp
133
133
  ```
134
134
 
135
- Staged, only the **setup** stage (load, scale, read the set—<!--tool-count-setup-->11<!--/tool-count-setup--> tools) starts
135
+ Staged, only the **setup** stage (load, scale, read the set—<!--tool-count-setup-->15<!--/tool-count-setup--> tools) starts
136
136
  enabled, plus one opener: `open_tool_stage`. Calling it with `"measure"`,
137
137
  `"revise"`, or `"handoff"` enables that stage's tools and fires
138
138
  `tools/list_changed`, so any client that supports dynamic tool lists (Claude
@@ -210,6 +210,49 @@ The [generated tool index](../docs/MCP_TOOL_INDEX.md) lists stages and required
210
210
  | `get_sheet_vectors` | The STROKES (#367): the sheet's vector layer exactly as the engine is fed it—flat `[x1, y1, x2, y2, …]` points in image px, one meta byte per segment (curve / clip / fill-only / polyline-arc flags, pen width in the high nibble), per-segment stroke luminance, the drawn figure each segment belongs to, the placed-image area, and the PDF layer table with a per-segment layer index. Nothing classified, decimated, or merged—so a reader can run its own room finder, symbol matcher, or wall classifier against the same array and commit through the existing verbs. Paged (default 20,000 segments, ceiling 100,000) with `offset + returned + dropped === total` on every page; `next_cursor` recovers exactly what `dropped` counts. Read-only and stateless. Refuses on a scan and names `view_sheet` as the path. |
211
211
  | `view_sheet` | The agent's eyes: render the sheet (or an image-px crop) to PNG. `overlay` burns committed shapes in (solid = human-affirmed, dashed = unreviewed) to verify geometry landed; `grid` burns in a calibrated 1-ft/5-ft measuring grid with foot labels (`"auto"` from the set scale, or the drawing scale like `"1/4"`) so dimensions are counted off cells, not guessed; `marks` (#297) burns disclosure layers in — `question` (withheld placements, orange ?-circle), `struck` (rejections, magenta struck ×), `ring` (the sweep's seed, violet double ring) — in colors off the common CAD pens, so what a reply names, the picture shows. |
212
212
 
213
+ ### The Assistant window — talk to your AI from inside the canvas
214
+
215
+ | Tool | What it does |
216
+ |---|---|
217
+ | `assistant_open` | Starts a private link on `127.0.0.1` (ports 47615–47619; only the OpenTakeoff app's origin may use it, and only after pairing) and returns a one-time `code` and a `link` that opens the canvas already paired. The canvas's Assistant window then shows which AI app is answering ("Powered by Claude Code", "Claude Desktop", "Codex", …) from the name the client announced at initialize. |
218
+ | `assistant_listen` | Waits (default 45 s, max 240 s, with progress pings) for what the person types in the window. `message` → do the work and answer with `assistant_say`; `timeout` → listen again; `sleep` after 10 idle minutes → stop and tell them to say "listen" when they want you back. Every other tool call is mirrored into the window live while you work. |
219
+ | `assistant_say` | Puts your Markdown reply in the window. |
220
+
221
+ ### Trade suites, opened one trade at a time
222
+
223
+ | Tool | What it does |
224
+ |---|---|
225
+ | `open_suite` | Opens a trade suite: enables that trade's tools and returns its method (the steps, in order, naming the tools) and the condition tags its tools default to. No arguments returns the catalog. `division: "07"` opens every suite of a CSI division. Idempotent; never closes anything. |
226
+
227
+ Each suite's tools are registered **disabled**, so they are not in `tools/list`
228
+ until `open_suite` enables them and fires `tools/list_changed`. An agent doing a
229
+ roof never carries the plumbing schemas, and a suite's method is handed over
230
+ once, at open time, instead of riding every turn. The long form is the
231
+ `takeoff://wiki/suites` resource.
232
+
233
+ | Suite | Divisions | Tool it adds |
234
+ |---|---|---|
235
+ | finishes | 09 | none: core tools (`measure_polygon`, `derive_base`, `derive_transitions`, `measure_surface`) |
236
+ | roofing | 07 | `roof_takeoff`: sloped SF and squares from plan-view planes and a stated pitch, true rake/hip/valley LF, drip edge, starter, ridge cap, underlayment, ice & water. Writes the slope factors onto the conditions so every total reads true. |
237
+ | siding | 07 | `siding_takeoff`: net wall SF and squares from elevation faces minus openings, opening trim (doors 3 sides), starter along wall bottoms, corner LF, lap pieces. |
238
+ | soffit_fascia | 07 | `soffit_takeoff`: soffit SF (eave/rake LF × depth from the wall section), fascia LF, wall receiver, attic intake vent area. |
239
+ | glazing | 08 | `glazing_takeoff`: per frame: lites, daylight opening size, glass SF, mullion LF (committed as lines), perimeter sealant. |
240
+ | doors | 08 | none: core tools (`find_schedule`, `sweep_schedule_row`, `count_marks`) |
241
+ | plumbing | 22 | `plumbing_rollup`: fixture counts checked against the schedule QTY, pipe LF with hangers, fittings allowance, insulation. |
242
+ | electrical | 26, 27, 28 | `electrical_rollup`: wire LF per run by conductors and sets, couplings, straps, a box and plate per device, fixture whips. |
243
+
244
+ The suite tools are derives: they read what is already committed and commit
245
+ what follows as unreviewed shapes or material rows, one `undo_last` step per
246
+ write (each reply says how many). They never measure the drawing themselves and
247
+ never invent a document value: pitch, soffit depth, grid and hanger spacing are
248
+ arguments, and every allowance is reported as an allowance.
249
+
250
+ A client that reads the tool list only once can pre-open suites:
251
+
252
+ ```bash
253
+ OPENTAKEOFF_MCP_SUITES=roofing,siding npx -y opentakeoff-mcp # or =all
254
+ ```
255
+
213
256
  ### The agent revises its own work
214
257
 
215
258
  `edit_shape` and `undo_last` exist because an agent that can only *append* has