opentakeoff-mcp 0.3.0 → 0.4.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.
@@ -884,8 +884,8 @@ var SNAP_CELL = 24;
884
884
  var SNAP_TOL = 7;
885
885
  var PALETTE = ["#c96442", "#2f7d54", "#2563eb", "#9333ea", "#b8860b", "#0d9488", "#be185d", "#1f2937", "#dc2626", "#0891b2"];
886
886
  var HATCH_IDS = ["solid", "diag", "diag2", "cross", "diagdense", "horiz", "vert", "grid", "brick", "plank", "herring", "basket", "checker", "wave", "fleur", "speckle"];
887
- var _idn = 0;
888
- var uid = (p) => `${p}-${Date.now().toString(36)}-${(_idn++).toString(36)}`;
887
+ var mintUuid = () => globalThis.crypto && typeof globalThis.crypto.randomUUID === "function" ? globalThis.crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
888
+ var uid = (p) => `${p}-${mintUuid()}`;
889
889
  var ANN_SCHEMA = "opentakeoff.takeoff_canvas.v1";
890
890
  var IMAGE_MAX_EDGE = 1568;
891
891
  var sheetSummary = (s) => ({
@@ -1115,8 +1115,9 @@ var Session = class {
1115
1115
  if (opts.condition) {
1116
1116
  shape_id = this.commit(s, opts.condition, opts.role, ring, { area_sf, perimeter_lf }, {
1117
1117
  method: "one_click_v1",
1118
+ actor: "agent",
1118
1119
  seed_norm: [x / s.widthPx, y / s.heightPx],
1119
- reviewed: true,
1120
+ reviewed: false,
1120
1121
  ...f.hatchFiltered ? { hatch_filtered: true } : {}
1121
1122
  }).id;
1122
1123
  }
@@ -1129,7 +1130,7 @@ var Session = class {
1129
1130
  const area_sf = round2(met.area * s.upp * s.upp);
1130
1131
  const perimeter_lf = round2(met.perim * s.upp);
1131
1132
  let shape_id;
1132
- if (opts.condition) shape_id = this.commit(s, opts.condition, opts.role, verts, { area_sf, perimeter_lf }).id;
1133
+ if (opts.condition) shape_id = this.commit(s, opts.condition, opts.role, verts, { area_sf, perimeter_lf }, { method: "manual", actor: "agent" }).id;
1133
1134
  return { area_sf, perimeter_lf, nverts: verts.length, ...shape_id ? { shape_id } : {} };
1134
1135
  }
1135
1136
  measureLine(name, pts, opts) {
@@ -1137,7 +1138,7 @@ var Session = class {
1137
1138
  if (s.upp == null) throw new UserError(this.scaleGate(s));
1138
1139
  const length_lf = round2(openLen(pts) * s.upp);
1139
1140
  let shape_id;
1140
- if (opts.condition) shape_id = this.commit(s, opts.condition, "linear", pts, { area_sf: 0, perimeter_lf: length_lf }).id;
1141
+ if (opts.condition) shape_id = this.commit(s, opts.condition, "linear", pts, { area_sf: 0, perimeter_lf: length_lf }, { method: "manual", actor: "agent" }).id;
1141
1142
  return { length_lf, npts: pts.length, ...shape_id ? { shape_id } : {} };
1142
1143
  }
1143
1144
  summary() {
@@ -1306,7 +1307,7 @@ var exportTakeoffOutput = {
1306
1307
  measure_role: z.enum(["floor_area", "deduct", "linear"]),
1307
1308
  verts_norm: z.array(point).describe("Vertices normalized to sheet dims (0\u20131)"),
1308
1309
  computed: z.object({ area_sf: z.number(), perimeter_lf: z.number() }).passthrough(),
1309
- origin: z.object({}).passthrough().optional().describe("Provenance for one-click traces")
1310
+ origin: z.object({}).passthrough().optional().describe("Provenance: method (manual|one_click_v1), actor (omitted=human, 'agent'=MCP/automation), reviewed (human affirmed at an explicit gate), and correction fields (edited, edited_before_create, copied, proposed_verts_norm, edits)")
1310
1311
  }).passthrough()),
1311
1312
  markups: z.array(z.unknown()),
1312
1313
  sheet_group: z.array(z.unknown()),
@@ -1511,7 +1512,7 @@ function registerResources(server, session) {
1511
1512
  // package.json
1512
1513
  var package_default = {
1513
1514
  name: "opentakeoff-mcp",
1514
- version: "0.3.0",
1515
+ version: "0.4.0",
1515
1516
  mcpName: "io.github.Kentucky-ai/opentakeoff",
1516
1517
  type: "module",
1517
1518
  description: "OpenTakeoff MCP server \u2014 drive the takeoff engine from your MCP client over stdio.",
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "opentakeoff-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "mcpName": "io.github.Kentucky-ai/opentakeoff",
5
5
  "type": "module",
6
- "description": "OpenTakeoff MCP server \u2014 drive the takeoff engine from your MCP client over stdio.",
6
+ "description": "OpenTakeoff MCP server drive the takeoff engine from your MCP client over stdio.",
7
7
  "license": "Apache-2.0",
8
8
  "engines": {
9
9
  "node": ">=20"