@kensnzk/koyu 0.18.0 → 0.20.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.
Files changed (74) hide show
  1. package/README.ja.md +3 -1
  2. package/README.md +4 -2
  3. package/dist/analysis/contracts.d.ts +11 -1
  4. package/dist/analysis/contracts.d.ts.map +1 -1
  5. package/dist/analysis/contracts.js +11 -1
  6. package/dist/analysis/contracts.js.map +1 -1
  7. package/dist/cli.js +37 -2
  8. package/dist/cli.js.map +1 -1
  9. package/dist/core/diagnose.d.ts +2 -0
  10. package/dist/core/diagnose.d.ts.map +1 -1
  11. package/dist/core/diagnose.js +12 -1
  12. package/dist/core/diagnose.js.map +1 -1
  13. package/dist/core/diff.d.ts.map +1 -1
  14. package/dist/core/diff.js +4 -1
  15. package/dist/core/diff.js.map +1 -1
  16. package/dist/core/model.d.ts +206 -8
  17. package/dist/core/model.d.ts.map +1 -1
  18. package/dist/core/model.js +214 -10
  19. package/dist/core/model.js.map +1 -1
  20. package/dist/core/parse.d.ts.map +1 -1
  21. package/dist/core/parse.js +121 -11
  22. package/dist/core/parse.js.map +1 -1
  23. package/dist/core/vocabulary.d.ts.map +1 -1
  24. package/dist/core/vocabulary.js +11 -0
  25. package/dist/core/vocabulary.js.map +1 -1
  26. package/dist/draw/plan.d.ts.map +1 -1
  27. package/dist/draw/plan.js +24 -0
  28. package/dist/draw/plan.js.map +1 -1
  29. package/dist/form.d.ts +1 -0
  30. package/dist/form.d.ts.map +1 -1
  31. package/dist/form.js +5 -0
  32. package/dist/form.js.map +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +4 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/mcp.js +27 -2
  38. package/dist/mcp.js.map +1 -1
  39. package/dist/model.d.ts +2 -2
  40. package/dist/model.d.ts.map +1 -1
  41. package/dist/model.js +1 -1
  42. package/dist/model.js.map +1 -1
  43. package/dist/validate/contracts.d.ts +6 -1
  44. package/dist/validate/contracts.d.ts.map +1 -1
  45. package/dist/validate/contracts.js +6 -1
  46. package/dist/validate/contracts.js.map +1 -1
  47. package/editors/vscode/package.json +1 -1
  48. package/editors/vscode/syntaxes/koyu.tmLanguage.json +56 -56
  49. package/examples/basement/main.muro +1 -1
  50. package/examples/complex/main.muro +1 -1
  51. package/examples/house/main.muro +1 -1
  52. package/examples/house.muro +1 -1
  53. package/examples/mansion.muro +1 -1
  54. package/examples/office.muro +1 -1
  55. package/examples/steps/06-finished.muro +1 -1
  56. package/examples/tower/main.muro +1 -1
  57. package/examples/tower/site-geometry.muro +9 -0
  58. package/examples/twin/main.muro +1 -1
  59. package/examples/two-rooms.canonical.json +2 -2
  60. package/examples/two-rooms.muro +1 -1
  61. package/package.json +16 -2
  62. package/src/analysis/contracts.ts +11 -1
  63. package/src/cli.ts +40 -2
  64. package/src/core/diagnose.ts +12 -1
  65. package/src/core/diff.ts +4 -1
  66. package/src/core/model.ts +273 -9
  67. package/src/core/parse.ts +156 -9
  68. package/src/core/vocabulary.ts +12 -0
  69. package/src/draw/plan.ts +31 -0
  70. package/src/form.ts +13 -0
  71. package/src/index.ts +5 -0
  72. package/src/mcp.ts +33 -2
  73. package/src/model.ts +8 -0
  74. package/src/validate/contracts.ts +6 -1
package/src/core/parse.ts CHANGED
@@ -11,6 +11,11 @@ import {
11
11
  type Boundary,
12
12
  DEFAULT_LANGUAGE_VERSION,
13
13
  type Edge,
14
+ isNewerVersion,
15
+ KOYU_VERSION,
16
+ LAST_KOYU_SPELLED_VERSION,
17
+ MURO_KEYWORD,
18
+ NEWEST_LANGUAGE_VERSION,
14
19
  type Level,
15
20
  type Model,
16
21
  normalizeRegionOrder,
@@ -254,25 +259,68 @@ function ingest(
254
259
  currentSpaces = [];
255
260
  over = undefined;
256
261
  switch (head) {
257
- case "koyu": {
262
+ // **The version line is the only declaration that names the language, which is why it
263
+ // was the one that carried the wrong name.** `koyu` is the implementation; the language
264
+ // is muro. One spelling per version, never both: two ways to write the same declaration
265
+ // would end the uniqueness the canonical form rests on.
266
+ case "koyu":
267
+ case "muro": {
258
268
  const v = rest[0];
259
- if (!v) throw new SourceError(ln, `koyu takes a version: koyu ${DEFAULT_LANGUAGE_VERSION}`);
269
+ const spelling = head;
270
+ if (!v) {
271
+ throw new SourceError(ln, `${spelling} takes a version: ${MURO_KEYWORD} ${NEWEST_LANGUAGE_VERSION}`);
272
+ }
260
273
  if (rest.length > 1) {
261
- throw new SourceError(ln, `Extra tokens on the koyu version declaration: ${rest.slice(1).join(" ")}`);
274
+ throw new SourceError(ln, `Extra tokens on the ${spelling} version declaration: ${rest.slice(1).join(" ")}`);
275
+ }
276
+ // **A version nobody ever released has no keyword to enforce.** `muro 0.6` is not a
277
+ // file whose author picked the wrong word — 0.6 does not exist, and answering with
278
+ // "a 0.6 file declares itself koyu 0.6" would send them to write a second invalid
279
+ // thing. Unknown-and-not-plausibly-future is settled first, on its own terms.
280
+ const known = SUPPORTED_LANGUAGE_VERSIONS.includes(v);
281
+ const future = isNewerVersion(v, NEWEST_LANGUAGE_VERSION);
282
+ if (!known && !future) {
283
+ throw new SourceError(
284
+ ln,
285
+ `Unsupported ${spelling} version: ${v} (this tool supports ${SUPPORTED_LANGUAGE_VERSIONS.join(", ")})`,
286
+ );
287
+ }
288
+
289
+ // **The spelling belongs to the version, and that is true of every build.** Decided
290
+ // before anything about what this build supports: `koyu 9.9` is not a file from the
291
+ // future, it is a declaration no version ever accepts, and telling its author to
292
+ // upgrade would send them to fix the one thing that is not wrong.
293
+ const wants = isNewerVersion(v, LAST_KOYU_SPELLED_VERSION) ? "muro" : "koyu";
294
+ if (spelling !== wants) {
295
+ throw new SourceError(
296
+ ln,
297
+ wants === "muro"
298
+ ? `muro ${v} names itself muro: write "muro ${v}". The koyu spelling names the implementation and stops at ${LAST_KOYU_SPELLED_VERSION}`
299
+ : `The muro keyword arrives in 1.2, and a ${v} processor cannot read it — a ${v} file declares itself "koyu ${v}"`,
300
+ );
262
301
  }
263
- if (!SUPPORTED_LANGUAGE_VERSIONS.includes(v)) {
302
+
303
+ if (future) {
304
+ // **A file from the future is not a broken file.** It says the reader is behind, and
305
+ // the only useful advice is to upgrade — the opposite of the advice for a version
306
+ // that never existed. Both used to print the same sentence, so a viewer could not
307
+ // tell a stale build from a corrupt file, and one downstream rebuilt the
308
+ // distinction for itself out of the version list.
264
309
  throw new SourceError(
265
310
  ln,
266
- `Unsupported koyu version: ${v} (this tool supports ${SUPPORTED_LANGUAGE_VERSIONS.join(", ")})`,
311
+ `This file is written in muro ${v}, and this build of koyu (${KOYU_VERSION}) reads up to ${NEWEST_LANGUAGE_VERSION}. The file is not the problem — upgrade koyu`,
312
+ undefined,
313
+ "VER06",
267
314
  );
268
315
  }
316
+
269
317
  // 版はbase層 (entry) でのみ・一度だけ宣言する — 合成順による黙った上書きを禁じる (ADR-0017)。
270
318
  // gridの規律に合わせ、再宣言は同値でもエラー
271
319
  if (file !== undefined && model.layers[0] !== file) {
272
- throw new SourceError(ln, "The koyu version is declared only in the base layer (the entry)");
320
+ throw new SourceError(ln, "The version is declared only in the base layer (the entry)");
273
321
  }
274
322
  if (model.versionDeclared) {
275
- throw new SourceError(ln, `The koyu version is declared once (already ${model.version})`);
323
+ throw new SourceError(ln, `The version is declared once (already ${model.version})`);
276
324
  }
277
325
  model.version = v;
278
326
  model.versionDeclared = true;
@@ -385,6 +433,105 @@ function ingest(
385
433
  });
386
434
  break;
387
435
  }
436
+ case "origin": {
437
+ // 測地の枠 — 位置 (ADR-0057)。所与であって設計ではない。**core は持つだけで、投影も
438
+ // 子午線収差角も計算しない。**値はメートル — モデルの中の長さではなく外の枠の中の点だから
439
+ // origin epsg:6677 easting:-8000.123 northing:-34000.456 elevation:2.35 vertical:6695
440
+ if (model.origin) {
441
+ throw new SourceError(
442
+ ln,
443
+ `Duplicate origin: a model has one frame (first seen in ${model.origin.file ?? "the same file"} at line ${model.origin.line})`,
444
+ );
445
+ }
446
+ const attrs = parseAttrs(rest, ln);
447
+ const epsg = takeNumber(attrs, "epsg", ln, { positive: true });
448
+ const easting = takeNumber(attrs, "easting", ln);
449
+ const northing = takeNumber(attrs, "northing", ln);
450
+ const elevation = takeNumber(attrs, "elevation", ln);
451
+ const vertical = takeNumber(attrs, "vertical", ln, { positive: true });
452
+ // **origin は attrs を持たない。**残ったキーは正準JSONにも痕跡を残さず消えるので、
453
+ // ここで拒まないと `eastign:` が黙って原点の無いモデルになる (level と同じ理由 — ADR-0033)
454
+ for (const key of Object.keys(attrs)) {
455
+ throw new SourceError(
456
+ ln,
457
+ `origin carries ${key}:, which is not in the ledger (origin reads epsg / easting / northing / elevation / vertical)`,
458
+ );
459
+ }
460
+ if (epsg === undefined) {
461
+ throw new SourceError(ln, "origin requires epsg: (the EPSG code of a projected CRS)");
462
+ }
463
+ if (!Number.isInteger(epsg)) {
464
+ throw new SourceError(ln, `epsg is written as an EPSG code (a whole number): ${epsg}`);
465
+ }
466
+ // 東距と北距は対 — 片方だけの原点は点を指さない
467
+ if (easting === undefined || northing === undefined) {
468
+ throw new SourceError(
469
+ ln,
470
+ "origin requires easting: and northing: together (metres, in the CRS that epsg: names)",
471
+ );
472
+ }
473
+ // **高さは基準を言わずには受けない。**平面直角座標系の CRS は 2D で鉛直軸を持たないので、
474
+ // 高さだけを書けば何から測ったかが言われない。日本では T.P. / A.P. / O.P. / Y.P. が 1m 超違い、
475
+ // 楕円体高と正標高はジオイド高 (約30〜40m) だけ違う
476
+ if ((elevation === undefined) !== (vertical === undefined)) {
477
+ throw new SourceError(
478
+ ln,
479
+ "elevation: and vertical: are written together (a height needs the datum it is measured from)",
480
+ );
481
+ }
482
+ if (vertical !== undefined && !Number.isInteger(vertical)) {
483
+ throw new SourceError(ln, `vertical is written as an EPSG code (a whole number): ${vertical}`);
484
+ }
485
+ // 桁の上限は測地の規則ではなく書式の規則である — 正準JSONは指数表記を使わないと約束している
486
+ if (Math.abs(easting) > 1e7) {
487
+ throw new SourceError(ln, `easting is out of range for a coordinate in metres: ${easting}`);
488
+ }
489
+ if (Math.abs(northing) > 1e7) {
490
+ throw new SourceError(ln, `northing is out of range for a coordinate in metres: ${northing}`);
491
+ }
492
+ if (elevation !== undefined && Math.abs(elevation) > 1e4) {
493
+ throw new SourceError(ln, `elevation is out of range in metres: ${elevation}`);
494
+ }
495
+ model.origin = {
496
+ epsg,
497
+ easting,
498
+ northing,
499
+ ...(elevation !== undefined ? { elevation } : {}),
500
+ ...(vertical !== undefined ? { vertical } : {}),
501
+ line: ln,
502
+ ...(file ? { file } : {}),
503
+ };
504
+ break;
505
+ }
506
+ case "azimuth": {
507
+ // 測地の枠 — 真北 (ADR-0057)。**+Y 軸の真方位角**であって回転角ではない。
508
+ // 「+Y から北へ時計回り」と綴れば逆向きの方位角になり、読者の既定の読みが定義の逆になる
509
+ // azimuth Y 347.5
510
+ if (model.azimuth) {
511
+ throw new SourceError(
512
+ ln,
513
+ `Duplicate azimuth: a model has one frame (first seen in ${model.azimuth.file ?? "the same file"} at line ${model.azimuth.line})`,
514
+ );
515
+ }
516
+ if (rest[0] !== "Y") {
517
+ throw new SourceError(
518
+ ln,
519
+ `azimuth takes the form azimuth Y <degrees> (the bearing of the +Y axis): ${rest[0] ?? ""}`,
520
+ );
521
+ }
522
+ if (rest.length !== 2) throw new SourceError(ln, "azimuth takes one value, in degrees");
523
+ const deg = toNumber(rest[1]!, ln, "The azimuth");
524
+ // **畳まずに拒む。**370 を黙って 10 にすれば誤りが隠れる。360 も受けない (0 の二つ目の綴り)
525
+ if (!(deg >= 0 && deg < 360)) {
526
+ const hint = deg < 0 && deg > -360 ? ` (write ${deg + 360})` : "";
527
+ throw new SourceError(
528
+ ln,
529
+ `azimuth is a bearing clockwise from true north, 0 <= v < 360: ${deg}${hint}`,
530
+ );
531
+ }
532
+ model.azimuth = { deg, line: ln, ...(file ? { file } : {}) };
533
+ break;
534
+ }
388
535
  case "name": {
389
536
  const nm = rest.join(" ");
390
537
  if (!nm) throw new SourceError(ln, "name takes a value");
@@ -622,7 +769,7 @@ function ingest(
622
769
  } catch (e) {
623
770
  // 合成時はどのファイルのエラーかを言葉にする
624
771
  if (e instanceof SourceError && !e.file && file) {
625
- throw new SourceError(e.line, e.raw, file);
772
+ throw new SourceError(e.line, e.raw, file, e.code);
626
773
  }
627
774
  throw e;
628
775
  }
@@ -633,7 +780,7 @@ function ingest(
633
780
  expandBand(model, band, file);
634
781
  } catch (e) {
635
782
  if (e instanceof SourceError && !e.file && file) {
636
- throw new SourceError(e.line, e.raw, file);
783
+ throw new SourceError(e.line, e.raw, file, e.code);
637
784
  }
638
785
  throw e;
639
786
  }
@@ -191,6 +191,18 @@ export const ATTR_LEDGER: Record<string, Record<string, AttrSpec>> = {
191
191
  pitch: structure(),
192
192
  underground: structure(),
193
193
  },
194
+
195
+ /**
196
+ * 測地の枠の位置 (ADR-0057)。level と同じく attrs を持たない — 台帳外のキーは parse が拒む。
197
+ * **値はメートル**であって mm ではない。EPSG コードは解釈しない不透明な整数である
198
+ */
199
+ origin: {
200
+ epsg: structure(),
201
+ easting: structure(),
202
+ northing: structure(),
203
+ elevation: structure(),
204
+ vertical: structure(),
205
+ },
194
206
  };
195
207
 
196
208
  /** その要素で、名前空間なしに書いてよいキーか */
package/src/draw/plan.ts CHANGED
@@ -266,6 +266,37 @@ export function svgPlan(model: Model, opts: PlanOptions = {}): string {
266
266
  );
267
267
  }
268
268
 
269
+ // 北矢印 (ADR-0057) — azimuth が書かれているときだけ描く。**表現であって形ではない**ので
270
+ // Form には無く、紙の座標に直接置く。これがある理由は装飾ではない — 方位の 180度違い・
271
+ // 余角違い・磁北の書き写しは、どれも範囲内の整った数として通る。**絵だけが捕まえる。**
272
+ //
273
+ // 画面上の北: モデルの +Y は上、+X は右。真方位角は +Y から時計回りなので、画面でも時計回り
274
+ if (model.azimuth) {
275
+ const rad = (model.azimuth.deg * Math.PI) / 180;
276
+ const nx = Math.sin(rad);
277
+ const ny = -Math.cos(rad);
278
+ const cx = W - M / 2; // 右余白の中央 (通り芯記号と同じ帯に、離して置く)
279
+ const cy = M / 2;
280
+ const R = 21;
281
+ const px = -ny; // 軸に直交する向き (矢羽根の底辺)
282
+ const py = nx;
283
+ const r2 = (n: number): string => String(Math.round(n * 100) / 100);
284
+ const head = [
285
+ [cx + nx * R, cy + ny * R],
286
+ [cx + nx * R * 0.42 + px * 4.6, cy + ny * R * 0.42 + py * 4.6],
287
+ [cx + nx * R * 0.42 - px * 4.6, cy + ny * R * 0.42 - py * 4.6],
288
+ ]
289
+ .map(([x, y]) => `${r2(x!)},${r2(y!)}`)
290
+ .join(" ");
291
+ parts.push(
292
+ `<g class="north-arrow">`,
293
+ `<line x1="${r2(cx - nx * R * 0.8)}" y1="${r2(cy - ny * R * 0.8)}" x2="${r2(cx + nx * R)}" y2="${r2(cy + ny * R)}" stroke="${INK}" stroke-width="1"/>`,
294
+ `<polygon points="${head}" fill="${INK}"/>`,
295
+ `<text x="${r2(cx + nx * (R + 10))}" y="${r2(cy + ny * (R + 10) + 3.4)}" text-anchor="middle" font-size="9" fill="${INK}">N</text>`,
296
+ `</g>`,
297
+ );
298
+ }
299
+
269
300
  // 表題
270
301
  const title = `${model.name ?? "Untitled"} — ${level} plan`;
271
302
  parts.push(
package/src/form.ts CHANGED
@@ -1,5 +1,18 @@
1
1
  // Public Form surface. derive() is the only public operation that assembles shape.
2
2
 
3
+ // The constructors of matter. `Form` holds centre lines, thicknesses and z; raising matter from
4
+ // those is part of the derivation, so **there is exactly one implementation and it is this one.**
5
+ // A consumer that cannot import them has to rewrite them, and then the parts are shared while the
6
+ // rules of assembly are not — which is the door to "two shapes from one Form".
7
+ export {
8
+ band,
9
+ bandLine,
10
+ columnRect,
11
+ runPrism,
12
+ thicken,
13
+ type FormPrism,
14
+ } from "./core/derive.js";
15
+
3
16
  export {
4
17
  derive,
5
18
  DERIVATION_CONSTANTS,
package/src/index.ts CHANGED
@@ -46,8 +46,13 @@ export {
46
46
  } from "./core/diagnose.js";
47
47
 
48
48
  // ---- 機械形式と、版 ----
49
+ // `requireMuro` is the one thing a consumer *does* about versions: assert, at startup, that
50
+ // this build reads the language it writes. The ledger behind it lives on `/model` with the
51
+ // rest of the model surface — the root stays the smallest set that gets you to a decision.
49
52
  export {
50
53
  DEFAULT_LANGUAGE_VERSION,
54
+ NEWEST_LANGUAGE_VERSION,
55
+ requireMuro,
51
56
  SourceError,
52
57
  SUPPORTED_LANGUAGE_VERSIONS,
53
58
  toCanonical,
package/src/mcp.ts CHANGED
@@ -9,7 +9,13 @@
9
9
  import { mkdirSync, readFileSync, realpathSync, renameSync, writeFileSync } from "node:fs";
10
10
  import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
11
11
  import { daylightInputs } from "./core/light.js";
12
- import { polygonAreaM2 } from "./core/model.js";
12
+ import {
13
+ DEFAULT_LANGUAGE_VERSION,
14
+ KOYU_VERSION,
15
+ NEWEST_LANGUAGE_VERSION,
16
+ polygonAreaM2,
17
+ SUPPORTED_LANGUAGE_VERSIONS,
18
+ } from "./core/model.js";
13
19
  import { check } from "./core/diagnose.js";
14
20
  import { siteReport } from "./core/site.js";
15
21
  import { assess } from "./validate/assessment.js";
@@ -121,6 +127,21 @@ function summarize(model: Model, file: string): unknown {
121
127
  ...(model.polygons.size
122
128
  ? { sitePolygons: [...model.polygons.keys()] }
123
129
  : {}),
130
+ // 測地の枠 (ADR-0057) — 書かれていれば返す。**何も導出されていない。**
131
+ // origin の値はメートル、azimuth は +Y の真方位角 (真北から時計回り、0以上360未満)。
132
+ // 不在は 0 ではなく「未知」なので、鍵ごと出ない
133
+ ...(model.origin
134
+ ? {
135
+ origin: {
136
+ epsg: model.origin.epsg,
137
+ easting: model.origin.easting,
138
+ northing: model.origin.northing,
139
+ ...(model.origin.elevation !== undefined ? { elevation: model.origin.elevation } : {}),
140
+ ...(model.origin.vertical !== undefined ? { vertical: model.origin.vertical } : {}),
141
+ },
142
+ }
143
+ : {}),
144
+ ...(model.azimuth ? { azimuth: model.azimuth.deg } : {}),
124
145
  totalFloorM2: Math.round(indoor.reduce((a, s) => a + (areaM2(s) ?? 0), 0) * 100) / 100,
125
146
  semiOutdoorM2: Math.round(semi.reduce((a, s) => a + (areaM2(s) ?? 0), 0) * 100) / 100,
126
147
  floorsM2: byLevel,
@@ -415,7 +436,17 @@ function handle(msg: Json): void {
415
436
  result(id, {
416
437
  protocolVersion: (params.protocolVersion as string) ?? "2025-06-18",
417
438
  capabilities: { tools: {} },
418
- serverInfo: { name: "koyu", version: "0.18.0" },
439
+ serverInfo: {
440
+ name: "koyu",
441
+ version: KOYU_VERSION,
442
+ // Which muro this build speaks. An agent choosing how to spell a version line
443
+ // has nothing else to read it from.
444
+ muro: {
445
+ reads: SUPPORTED_LANGUAGE_VERSIONS,
446
+ newest: NEWEST_LANGUAGE_VERSION,
447
+ undeclared: DEFAULT_LANGUAGE_VERSION,
448
+ },
449
+ },
419
450
  instructions:
420
451
  "Server for koyu, a space-first architectural description. Grasp the building with model_summary, read the original layers with layers, and edit with write_layer. check is the gatekeeper of the build and returns errors tagged layer:line — it guarantees structural consistency only. validate delivers the architectural verdicts, which are a separate and unfrozen surface. doors/light/site/spaces are different questions put to the same description. Form (plan_svg) is generated, never written.",
421
452
  });
package/src/model.ts CHANGED
@@ -5,6 +5,7 @@ export type {
5
5
  Asset,
6
6
  Attrs,
7
7
  AttrValue,
8
+ Azimuth,
8
9
  Boundary,
9
10
  BoundaryKind,
10
11
  Column,
@@ -19,6 +20,7 @@ export type {
19
20
  Pt,
20
21
  Rect,
21
22
  Seg,
23
+ SiteOrigin,
22
24
  SitePolygon,
23
25
  Space,
24
26
  Zone,
@@ -35,9 +37,15 @@ export {
35
37
  isOutside,
36
38
  isSemiOutdoor,
37
39
  isVoid,
40
+ KOYU_VERSION,
41
+ koyuSince,
38
42
  levelsSorted,
43
+ MURO_SUPPORT,
44
+ NEWEST_LANGUAGE_VERSION,
39
45
  newUids,
46
+ speaksMuro,
40
47
  SUPPORTED_LANGUAGE_VERSIONS,
41
48
  toCanonical,
49
+ versionLine,
42
50
  zoneAreaM2,
43
51
  } from "./core/model.js";
@@ -144,7 +144,12 @@ export interface AssessmentSummary {
144
144
  };
145
145
  }
146
146
 
147
- export const ASSESSMENT_FORMAT = "koyu-assessment/1" as const;
147
+ /**
148
+ * The name of the shape an assessment returns. **It carries no version**, for the same reason
149
+ * as `ANALYSIS_FORMAT`: judgements are the face that grows by addition and freezes nothing,
150
+ * and nothing reads this string back.
151
+ */
152
+ export const ASSESSMENT_FORMAT = "koyu-assessment" as const;
148
153
 
149
154
  export interface AssessmentReport {
150
155
  readonly schema: typeof ASSESSMENT_FORMAT;