opentakeoff-mcp 0.9.7 → 0.9.12
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 +14 -3
- package/dist/server-core.js +1982 -46
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -112,13 +112,17 @@ includes document text, shape vertices, or result payload content.
|
|
|
112
112
|
| `detect_rooms` | Batch One-Click: reads every room-number label off the sheet's text layer and floods each — one call instead of `read_sheet_text` + reasoning + N `one_click` calls. Only cleanly-traced rooms come back; everything skipped is counted and reasoned in `withheld` (degenerate / duplicate / implausible), never dropped silently. Pass `condition` to commit every detected room. |
|
|
113
113
|
| `measure_polygon` | Area + perimeter of a polygon you supply (min 3 verts). Requires scale. |
|
|
114
114
|
| `measure_line` | Length of an open polyline (min 2 points). Requires scale. |
|
|
115
|
+
| `measure_surface` | **Wall SF**: an open run traced along the wall, quantified as traced LF × the condition's height (the canvas's H knob — pass `height_ft` to set it, or set it once with `edit_condition`). Wall tile, wainscot, wall systems. Refuses without a height, minting nothing. |
|
|
116
|
+
| `place_count` | **EA markers**: one point, one each — thresholds, stair nosings, floor boxes. No scale required (EA is scale-free). One shape per point; the whole call is one undo step. |
|
|
115
117
|
| `takeoff_summary` | Per-condition totals + grand totals, computed by the Report's rules. |
|
|
116
118
|
| `export_takeoff` | The full `opentakeoff.takeoff_canvas.v1` payload — exactly what the app autosaves. Inline, and to disk with `path`. |
|
|
117
119
|
| `delete_shape` | Remove a committed shape by id. |
|
|
118
120
|
| `edit_shape` | **Revise** a committed shape instead of redoing it: new `verts`, a different `condition`, a different `role`, or any combination — quantities recomputed from the result. Refuses shapes a human affirmed. |
|
|
119
121
|
| `edit_materials` | Add/remove/patch supporting-materials rows on a condition — the coverage-rate lines (adhesive at N sf/gal, grout at N lf/bag, …) that turn a measured quantity into an order quantity, matching the canvas's Supporting Materials panel. `condition` mints on first touch, like `one_click`/`measure_polygon`. No review gate (materials rows are quantity config, not traced geometry) — edits directly, reversible with `undo_last`. |
|
|
120
|
-
| `edit_condition` | Set a condition's **waste
|
|
122
|
+
| `edit_condition` | Set a condition's **waste %**, **×N multiplier**, **height_ft** (the H knob `measure_surface` quantifies against), and **roll_setup** (the roll-goods opt-in: seams figured, cuts packed, the reply echoes the order — cuts, `order_lf`, rolls, `order_qty` — and `export_report`'s `roll_goods` block carries the same rows; `null` opts out) — the knobs that turn measured quantities into order quantities. Resolves an **existing** finish tag or errors — a typo must not mint an empty condition. No review gate; one `undo_last` step restores the knobs verbatim. |
|
|
121
123
|
| `export_report` | The **computed Report document** — `opentakeoff.report.v1`, the same JSON the canvas Report exports: gross + waste-adjusted quantities, the computed materials **buy list** per condition plus the project-wide roll-up, per-sheet base subtotals, and scale provenance. The contract for pricing consumers — `export_takeoff` carries materials as config rows, `takeoff_summary` strips them. Inline, and to disk with `path`. |
|
|
124
|
+
| `export_marked_pdf` | The **marked-up planset** — the deliverable. Writes a distribution-ready PDF: a legend cover (per-condition totals, swatches, by-sheet breakdown) plus every sheet that carries work, vector-copied from the source with shapes, hatches, per-shape quantity chips, and annotations burned in — built by the same module as the canvas's MARKED SET button. Machine-traced shapes are disclosed as pending human review on the document itself. Default path: `<plan> - marked set.pdf` next to the plan. Works without `@napi-rs/canvas`. |
|
|
125
|
+
| `list_shapes` | The **mid-session inventory**: every committed shape's id, sheet, condition, role, quantities, and review state in one compact read — the ids `edit_shape`/`delete_shape` assume you have, without pulling the whole `export_takeoff` payload. Filters by sheet/condition narrow; empty is a result, not an error. |
|
|
122
126
|
| `undo_last` | Step back over your own last `n` mutations, newest first. Exact inverses: a commit is removed, an edit restored verbatim, a delete re-inserted where it was, a materials edit's whole array restored, a condition edit's waste/multiplier pair restored. A whole `detect_rooms` sweep is **one** step. |
|
|
123
127
|
| `read_sheet_text` | Positioned page text (image px), optionally restricted to a region — title blocks, room labels, finish schedules. |
|
|
124
128
|
| `find_text` | **Locate** a known string — the complement to `read_sheet_text` (which returns what a region *says*; this finds *where* a string sits). Case-insensitive substring match per pdf.js text run; each hit's center feeds straight into `one_click`'s seed. |
|
|
@@ -217,8 +221,14 @@ one_click { "sheet": "sample-plan.pdf", "x": 600, "y": 464, "condition":
|
|
|
217
221
|
one_click { "sheet": "sample-plan.pdf", "x": 1600, "y": 464, "condition": "CPT-1" } → ~438 SF
|
|
218
222
|
takeoff_summary {} → CPT-1, 4 shapes, ~1752 SF
|
|
219
223
|
export_takeoff { "path": "/tmp/takeoff.json" } → the app's save payload
|
|
224
|
+
export_marked_pdf {} → the marked-up planset PDF,
|
|
225
|
+
written next to the plan
|
|
220
226
|
```
|
|
221
227
|
|
|
228
|
+
A takeoff finishes with **both** exports: `export_marked_pdf` is what a human
|
|
229
|
+
reviews (construction takeoffs are no good without markup), `export_report` is
|
|
230
|
+
what pricing consumes.
|
|
231
|
+
|
|
222
232
|
Sheet keys follow the app's codec: page 1 is the bare file name
|
|
223
233
|
(`plan.pdf`), pages 2+ are `plan.pdf#2`. Tools also accept the title-block
|
|
224
234
|
sheet number (`A-101`) wherever a sheet is named.
|
|
@@ -229,8 +239,9 @@ sheet number (`A-101`) wherever a sheet is named.
|
|
|
229
239
|
`one_click` reports it plainly; a raster fallback is a planned seam
|
|
230
240
|
(`src/session.ts`, `ensureMask`), not yet built.
|
|
231
241
|
- One document per session; `load_plan` replaces it.
|
|
232
|
-
- The takeoff lives in memory. `export_takeoff`
|
|
233
|
-
|
|
242
|
+
- The takeoff lives in memory. `export_takeoff` (the app's exact save payload,
|
|
243
|
+
nothing lost in translation) and `export_marked_pdf` (the reviewable marked
|
|
244
|
+
planset) are the ways out.
|
|
234
245
|
|
|
235
246
|
## Tests
|
|
236
247
|
|