@agentshouse/mdmodel 0.1.0-alpha.16 → 0.1.0-alpha.18

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 (134) hide show
  1. package/API.md +52 -41
  2. package/README.md +2 -4
  3. package/dist/definition.d.ts +7 -3
  4. package/dist/definition.d.ts.map +1 -1
  5. package/dist/definition.js +83 -38
  6. package/dist/definition.js.map +1 -1
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/links.d.ts.map +1 -1
  12. package/dist/links.js +529 -148
  13. package/dist/links.js.map +1 -1
  14. package/dist/paths.d.ts +0 -2
  15. package/dist/paths.d.ts.map +1 -1
  16. package/dist/paths.js +0 -7
  17. package/dist/paths.js.map +1 -1
  18. package/dist/project.d.ts.map +1 -1
  19. package/dist/project.js +13 -17
  20. package/dist/project.js.map +1 -1
  21. package/dist/types.d.ts +6 -5
  22. package/dist/types.d.ts.map +1 -1
  23. package/dist/types.js.map +1 -1
  24. package/dist/validate.d.ts +2 -3
  25. package/dist/validate.d.ts.map +1 -1
  26. package/dist/validate.js +42 -86
  27. package/dist/validate.js.map +1 -1
  28. package/dist/version.d.ts +1 -1
  29. package/dist/version.js +1 -1
  30. package/dist/version.js.map +1 -1
  31. package/dist/yaml.js +1 -1
  32. package/dist/yaml.js.map +1 -1
  33. package/fixtures/README.md +53 -46
  34. package/fixtures/cases/binary-any-reference/schema.yaml +4 -0
  35. package/fixtures/cases/binary-document-collision/schema.yaml +2 -0
  36. package/fixtures/cases/binary-link-outside-collection/schema.yaml +2 -0
  37. package/fixtures/cases/binary-prototype-reference/schema.yaml +4 -0
  38. package/fixtures/cases/binary-typed-reference/schema.yaml +5 -0
  39. package/fixtures/cases/bracketed-link-definition/schema.yaml +6 -0
  40. package/fixtures/cases/declared-binary-links/schema.yaml +2 -0
  41. package/fixtures/cases/duplicate-link-definition/schema.yaml +6 -0
  42. package/fixtures/cases/fenced-link-definition/schema.yaml +6 -0
  43. package/fixtures/cases/field-enum/schema.yaml +7 -0
  44. package/fixtures/cases/frontmatter-schema/expected.json +6 -0
  45. package/fixtures/cases/frontmatter-schema/schema.yaml +6 -0
  46. package/fixtures/cases/interrupted-link-definition/schema.yaml +2 -0
  47. package/fixtures/cases/long-fence-link-definition/schema.yaml +2 -0
  48. package/fixtures/cases/malformed-definition/expected.json +1 -2
  49. package/fixtures/cases/malformed-definition/schema.yaml +4 -0
  50. package/fixtures/cases/member-document/context.json +1 -0
  51. package/fixtures/cases/member-document/library/people/ana.md +5 -0
  52. package/fixtures/cases/member-document/schema.yaml +5 -0
  53. package/fixtures/cases/missing-binary-image/schema.yaml +2 -0
  54. package/fixtures/cases/missing-binary-link/schema.yaml +2 -0
  55. package/fixtures/cases/missing-required-field/schema.yaml +7 -0
  56. package/fixtures/cases/missing-section-item-kind/expected.json +1 -2
  57. package/fixtures/cases/missing-section-item-kind/schema.yaml +6 -0
  58. package/fixtures/cases/paragraph-link-definition/schema.yaml +2 -0
  59. package/fixtures/cases/prototype-field/schema.yaml +6 -0
  60. package/fixtures/cases/quoted-link-definition/schema.yaml +2 -0
  61. package/fixtures/cases/referenced-missing-file/schema.yaml +10 -0
  62. package/fixtures/cases/second-member-document/context.json +1 -0
  63. package/fixtures/cases/second-member-document/expected.json +6 -0
  64. package/fixtures/cases/second-member-document/schema.yaml +5 -0
  65. package/fixtures/cases/shortcut-reference-link/context.json +1 -0
  66. package/fixtures/cases/shortcut-reference-link/expected.json +6 -0
  67. package/fixtures/cases/shortcut-reference-link/library/item.md +10 -0
  68. package/fixtures/cases/shortcut-reference-link/schema.yaml +6 -0
  69. package/fixtures/cases/structured-section/schema.yaml +7 -0
  70. package/fixtures/cases/submission-keys/schema.yaml +4 -0
  71. package/fixtures/cases/text-field-kind/context.json +1 -0
  72. package/fixtures/cases/text-field-kind/expected.json +7 -0
  73. package/fixtures/cases/text-field-kind/library/page.md +4 -0
  74. package/fixtures/cases/text-field-kind/schema.yaml +4 -0
  75. package/fixtures/cases/truncated-link-definition/schema.yaml +2 -0
  76. package/fixtures/cases/types-folder-content/schema.yaml +4 -0
  77. package/fixtures/cases/undeclared-field/schema.yaml +6 -0
  78. package/fixtures/cases/unknown-type/expected.json +7 -0
  79. package/fixtures/cases/unknown-type/schema.yaml +4 -0
  80. package/fixtures/cases/unlisted-reference-type/context.json +1 -0
  81. package/fixtures/cases/unlisted-reference-type/expected.json +6 -0
  82. package/fixtures/cases/unlisted-reference-type/schema.yaml +4 -0
  83. package/fixtures/cases/unresolved-link/schema.yaml +6 -0
  84. package/fixtures/cases/valid-typed-document/schema.yaml +15 -0
  85. package/fixtures/cases/wide-item-fence-link/schema.yaml +2 -0
  86. package/fixtures/division.json +1 -21
  87. package/fixtures/projection.json +58 -20
  88. package/package.json +1 -1
  89. package/fixtures/cases/binary-any-reference/library/types/note.md +0 -5
  90. package/fixtures/cases/binary-document-collision/library/types/note.md +0 -3
  91. package/fixtures/cases/binary-link-outside-collection/library/types/note.md +0 -3
  92. package/fixtures/cases/binary-prototype-reference/library/types/note.md +0 -5
  93. package/fixtures/cases/binary-typed-reference/library/types/note.md +0 -5
  94. package/fixtures/cases/binary-typed-reference/library/types/person.md +0 -3
  95. package/fixtures/cases/bracketed-link-definition/library/types/task.md +0 -7
  96. package/fixtures/cases/declared-binary-links/library/types/note.md +0 -3
  97. package/fixtures/cases/duplicate-link-definition/library/types/task.md +0 -7
  98. package/fixtures/cases/external-invalid-model/definitions/schema/task.md +0 -5
  99. package/fixtures/cases/external-invalid-model/expected.json +0 -1
  100. package/fixtures/cases/external-invalid-model/library/note.md +0 -1
  101. package/fixtures/cases/external-unknown-type/definitions/schema/task.md +0 -5
  102. package/fixtures/cases/external-unknown-type/expected.json +0 -1
  103. package/fixtures/cases/external-valid/context.json +0 -1
  104. package/fixtures/cases/external-valid/definitions/types/task.md +0 -5
  105. package/fixtures/cases/fenced-link-definition/library/types/task.md +0 -7
  106. package/fixtures/cases/field-enum/library/types/task.md +0 -8
  107. package/fixtures/cases/interrupted-link-definition/library/types/note.md +0 -3
  108. package/fixtures/cases/long-fence-link-definition/library/types/note.md +0 -3
  109. package/fixtures/cases/malformed-definition/library/types/task.md +0 -5
  110. package/fixtures/cases/missing-binary-image/library/types/note.md +0 -3
  111. package/fixtures/cases/missing-binary-link/library/types/note.md +0 -3
  112. package/fixtures/cases/missing-required-field/library/types/task.md +0 -8
  113. package/fixtures/cases/missing-section-item-kind/library/types/task.md +0 -7
  114. package/fixtures/cases/paragraph-link-definition/library/types/note.md +0 -3
  115. package/fixtures/cases/prd-definition/library/types/task.md +0 -16
  116. package/fixtures/cases/prototype-field/library/types/task.md +0 -7
  117. package/fixtures/cases/quoted-link-definition/library/types/note.md +0 -3
  118. package/fixtures/cases/referenced-missing-file/library/types/person.md +0 -5
  119. package/fixtures/cases/referenced-missing-file/library/types/task.md +0 -8
  120. package/fixtures/cases/structured-section/library/types/task.md +0 -8
  121. package/fixtures/cases/submission-keys/library/types/note.md +0 -5
  122. package/fixtures/cases/truncated-link-definition/library/types/note.md +0 -3
  123. package/fixtures/cases/undeclared-field/library/types/task.md +0 -7
  124. package/fixtures/cases/unresolved-link/library/types/task.md +0 -7
  125. package/fixtures/cases/valid-typed-document/library/types/person.md +0 -5
  126. package/fixtures/cases/valid-typed-document/library/types/task.md +0 -13
  127. package/fixtures/cases/wide-item-fence-link/library/types/note.md +0 -3
  128. /package/fixtures/cases/{prd-definition → frontmatter-schema}/context.json +0 -0
  129. /package/fixtures/cases/{prd-definition → member-document}/expected.json +0 -0
  130. /package/fixtures/cases/{external-invalid-model → types-folder-content}/context.json +0 -0
  131. /package/fixtures/cases/{external-valid → types-folder-content}/expected.json +0 -0
  132. /package/fixtures/cases/{external-valid → types-folder-content}/library/types/task.md +0 -0
  133. /package/fixtures/cases/{external-unknown-type → unknown-type}/context.json +0 -0
  134. /package/fixtures/cases/{external-unknown-type → unknown-type}/library/item.md +0 -0
@@ -0,0 +1,6 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -0,0 +1,6 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
@@ -0,0 +1,6 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
@@ -0,0 +1,7 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ status: { kind: enum, values: [open, in-progress, done], required: true }
6
+ sections:
7
+ Description: { kind: text, required: true }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "line 1",
4
+ "rule": "schema-yaml",
5
+ "version": "<package-version>"
6
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ types:
3
+ task:
4
+ fields:
5
+ title: { kind: string }
6
+ ---
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "verdict": "refuse",
3
- "file": "types/task.md",
4
- "location": "title",
3
+ "location": "types.task.fields.title",
5
4
  "rule": "definition-field-kind",
6
5
  "version": "<package-version>"
7
6
  }
@@ -0,0 +1,4 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: widget }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ ---
2
+ type: contact
3
+ name: Ana
4
+ member: ana@example.com
5
+ ---
@@ -0,0 +1,5 @@
1
+ types:
2
+ contact:
3
+ member_document: true
4
+ fields:
5
+ name: { kind: string, required: true }
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -0,0 +1,7 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ status: { kind: enum, values: [open, in-progress, done], required: true }
6
+ sections:
7
+ Description: { kind: text, required: true }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "verdict": "refuse",
3
- "file": "types/task.md",
4
- "location": "Acceptance",
3
+ "location": "types.task.sections.Acceptance",
5
4
  "rule": "definition-list-of",
6
5
  "version": "<package-version>"
7
6
  }
@@ -0,0 +1,6 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Acceptance: { kind: list }
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -0,0 +1,6 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -0,0 +1,10 @@
1
+ types:
2
+ person:
3
+ fields:
4
+ name: { kind: string, required: true }
5
+ task:
6
+ fields:
7
+ title: { kind: string, required: true }
8
+ owner: { kind: reference, to: person, required: true }
9
+ sections:
10
+ Description: { kind: text, required: true }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "types.person.member_document",
4
+ "rule": "schema-member-document",
5
+ "version": "<package-version>"
6
+ }
@@ -0,0 +1,5 @@
1
+ types:
2
+ contact:
3
+ member_document: true
4
+ person:
5
+ member_document: true
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "item.md",
4
+ "rule": "unresolved-link",
5
+ "version": "<package-version>"
6
+ }
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: task
3
+ title: Ship
4
+ ---
5
+
6
+ ## Description
7
+
8
+ See [Plan].
9
+
10
+ [plan]: missing.md
@@ -0,0 +1,6 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
@@ -0,0 +1,7 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
7
+ Acceptance: { kind: list, of: string }
@@ -0,0 +1,4 @@
1
+ types:
2
+ note:
3
+ fields:
4
+ title: { kind: string, required: true }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,7 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "page.md",
4
+ "location": "name",
5
+ "rule": "field-kind",
6
+ "version": "<package-version>"
7
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: page
3
+ name: 12
4
+ ---
@@ -0,0 +1,4 @@
1
+ types:
2
+ page:
3
+ fields:
4
+ name: { kind: text, required: true }
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -0,0 +1,4 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
@@ -0,0 +1,6 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
@@ -0,0 +1,7 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "item.md",
4
+ "location": "type",
5
+ "rule": "unknown-type",
6
+ "version": "<package-version>"
7
+ }
@@ -0,0 +1,4 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "types.task.fields.owner",
4
+ "rule": "definition-reference-to",
5
+ "version": "<package-version>"
6
+ }
@@ -0,0 +1,4 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ owner: { kind: reference, to: person }
@@ -0,0 +1,6 @@
1
+ types:
2
+ task:
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
@@ -0,0 +1,15 @@
1
+ types:
2
+ person:
3
+ fields:
4
+ name: { kind: string, required: true }
5
+ task:
6
+ fields:
7
+ name: { kind: text }
8
+ title: { kind: string, required: true }
9
+ status: { kind: enum, values: [open, in-progress, done], required: true }
10
+ due: { kind: date }
11
+ owner: { kind: reference, to: person }
12
+ labels: { kind: list, of: string }
13
+ sections:
14
+ Description: { kind: text, required: true }
15
+ Acceptance: { kind: list, of: string }
@@ -0,0 +1,2 @@
1
+ types:
2
+ note: {}
@@ -1,8 +1,5 @@
1
1
  {
2
- "definitions": {
3
- "task": "---\ntype: definition\nfields:\n name: { kind: text }\n status: { kind: enum, values: [open, done], required: true }\nsections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, of: reference, to: person }\n---\n",
4
- "unreadable-task": "---\ntype: definition\nsections:\n Description: { kind: prose }\n---\n"
5
- },
2
+ "schema": "types:\n task:\n fields:\n name: { kind: text }\n status: { kind: enum, values: [open, done], required: true }\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, of: reference, to: person }\n person: {}\n",
6
3
  "cases": [
7
4
  {
8
5
  "name": "a Document whose whole input fits the budget is one Span carrying its projection",
@@ -302,23 +299,6 @@
302
299
  }
303
300
  }
304
301
  },
305
- {
306
- "name": "a definition the model cannot read is refused at that definition",
307
- "file": "tasks/one.md",
308
- "source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Acceptance\n\n- people/ana.md\n",
309
- "documentTargets": [],
310
- "definition": "unreadable-task",
311
- "budget": 4096,
312
- "expected": {
313
- "ok": false,
314
- "refusal": {
315
- "file": "types/task.md",
316
- "rule": "definition-section-kind",
317
- "version": "<package-version>",
318
- "location": "Description"
319
- }
320
- }
321
- },
322
302
  {
323
303
  "name": "a budget that cannot hold one whole character is refused before any division",
324
304
  "file": "notes/one.md",
@@ -1,8 +1,5 @@
1
1
  {
2
- "definitions": {
3
- "task": "---\ntype: definition\nfields:\n name: { kind: text, required: true }\n aliases: { kind: list, of: text }\n title: { kind: string, required: true }\n status: { kind: enum, values: [open, done], required: true }\n owner: { kind: reference, to: person }\n due: { kind: date }\n estimate: { kind: number }\n labels: { kind: list, of: string }\nsections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, of: reference, to: person }\n Checklist: { kind: list, of: text }\n---\n",
4
- "unreadable-task": "---\ntype: definition\nsections:\n Description: { kind: prose }\n---\n"
5
- },
2
+ "schema": "types:\n task:\n fields:\n name: { kind: text, required: true }\n aliases: { kind: list, of: text }\n title: { kind: string, required: true }\n status: { kind: enum, values: [open, done], required: true }\n owner: { kind: reference, to: person }\n due: { kind: date }\n estimate: { kind: number }\n labels: { kind: list, of: string }\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, of: reference, to: person }\n Checklist: { kind: list, of: text }\n person: {}\n",
6
3
  "cases": [
7
4
  {
8
5
  "name": "any body keeps labels and leaves every unsupplied destination authored",
@@ -83,6 +80,14 @@
83
80
  "href": "../plans/q3.md",
84
81
  "to": "../plans/2026-q3.md"
85
82
  },
83
+ "relabel": {
84
+ "from": "[the plan][plan] and",
85
+ "to": "[the roadmap][plan] and",
86
+ "expected": {
87
+ "ok": true,
88
+ "text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the roadmap and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
89
+ }
90
+ },
86
91
  "expected": {
87
92
  "ok": true,
88
93
  "text": "Shipping the release\n\n\nPreamble prose that mentions the plan.\n\n## Description\n\nFollow the plan and the plan again, then read it.\n\n\n## Checklist\n\n- the plan is read\n\n## Notes\n\nUndeclared prose about the plan.\n"
@@ -145,29 +150,27 @@
145
150
  }
146
151
  },
147
152
  {
148
- "name": "a definition the model cannot read is refused at that definition",
149
- "file": "tasks/one.md",
150
- "source": "---\ntype: task\nname: Shipping the release\ntitle: Ship it\nstatus: open\nowner: ../people/ana.md\n---\n\nPreamble prose that mentions [the plan](../plans/q3.md).\n\n## Description\n\nFollow [the plan][plan] and [the plan][plan] again, then [read it][].\n\n[plan]: ../plans/q3.md \"Plan\"\n[read it]: ../plans/q3.md\n\n## Acceptance\n\n- [the plan](../plans/q3.md) is linked\n\n## Checklist\n\n- [the plan](../plans/q3.md) is read\n\n## Notes\n\nUndeclared prose about [the plan](../plans/q3.md).\n",
153
+ "name": "an image at a supplied Markdown document target is projected like its link",
154
+ "file": "notes/four.md",
155
+ "source": "Read [the plan](../plans/q3.md) and ![the chart](../plans/q3.md).\nAlso [the plan][plan] and ![the chart][plan].\n\n[plan]: ../plans/q3.md\n",
151
156
  "documentTargets": [
152
157
  "plans/q3.md",
153
158
  "plans/2026-q3.md"
154
159
  ],
155
- "definition": "unreadable-task",
156
- "move": null,
160
+ "definition": null,
161
+ "move": {
162
+ "href": "../plans/q3.md",
163
+ "to": "../plans/2026-q3.md"
164
+ },
157
165
  "expected": {
158
- "ok": false,
159
- "refusal": {
160
- "file": "types/task.md",
161
- "rule": "definition-section-kind",
162
- "version": "<package-version>",
163
- "location": "Description"
164
- }
166
+ "ok": true,
167
+ "text": "Read the plan and the chart.\nAlso the plan and the chart.\n\n"
165
168
  }
166
169
  },
167
170
  {
168
- "name": "an image at a supplied Markdown document target is projected like its link",
169
- "file": "notes/four.md",
170
- "source": "Read [the plan](../plans/q3.md) and ![the chart](../plans/q3.md).\nAlso [the plan][plan] and ![the chart][plan].\n\n[plan]: ../plans/q3.md\n",
171
+ "name": "a shortcut reference link projects its label and its definition leaves the projection",
172
+ "file": "notes/five.md",
173
+ "source": "Read [Plan] and [the draft], then [plan](not a link).\nAlso [[Plan]], [ plan ], \\[Plan] and [Release plan].\n\n[plan]: ../plans/q3.md\n[release plan]: ../plans/q3.md\n",
171
174
  "documentTargets": [
172
175
  "plans/q3.md",
173
176
  "plans/2026-q3.md"
@@ -177,9 +180,44 @@
177
180
  "href": "../plans/q3.md",
178
181
  "to": "../plans/2026-q3.md"
179
182
  },
183
+ "links": [
184
+ {
185
+ "href": "../plans/q3.md",
186
+ "target": "plans/q3.md"
187
+ }
188
+ ],
180
189
  "expected": {
181
190
  "ok": true,
182
- "text": "Read the plan and the chart.\nAlso the plan and the chart.\n\n"
191
+ "text": "Read Plan and [the draft], then plan(not a link).\nAlso [Plan], plan , \\[Plan] and Release plan.\n\n"
192
+ }
193
+ },
194
+ {
195
+ "name": "an image whose description holds a link projects both labels",
196
+ "file": "notes/six.md",
197
+ "source": "Read ![outer [Plan](../plans/q3.md)](../plans/q4.md).\n",
198
+ "documentTargets": [
199
+ "plans/q3.md",
200
+ "plans/2026-q3.md",
201
+ "plans/q4.md"
202
+ ],
203
+ "definition": null,
204
+ "move": {
205
+ "href": "../plans/q3.md",
206
+ "to": "../plans/2026-q3.md"
207
+ },
208
+ "links": [
209
+ {
210
+ "href": "../plans/q3.md",
211
+ "target": "plans/q3.md"
212
+ },
213
+ {
214
+ "href": "../plans/q4.md",
215
+ "target": "plans/q4.md"
216
+ }
217
+ ],
218
+ "expected": {
219
+ "ok": true,
220
+ "text": "Read outer Plan.\n"
183
221
  }
184
222
  }
185
223
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/mdmodel",
3
- "version": "0.1.0-alpha.16",
3
+ "version": "0.1.0-alpha.18",
4
4
  "description": "MD Type language, parser, validator, structured change application, Markdown syntax profile, and conformance fixtures",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,5 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- subject: { kind: reference, to: any, required: true }
5
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- type: definition
3
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- type: definition
3
- ---
@@ -1,5 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- subject: { kind: reference, to: any, required: true }
5
- ---
@@ -1,5 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- subject: { kind: reference, to: person, required: true }
5
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- type: definition
3
- ---
@@ -1,7 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- title: { kind: string, required: true }
5
- sections:
6
- Description: { kind: text, required: true }
7
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- type: definition
3
- ---
@@ -1,7 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- title: { kind: string, required: true }
5
- sections:
6
- Description: { kind: text, required: true }
7
- ---
@@ -1,5 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- title: { kind: widget }
5
- ---
@@ -1 +0,0 @@
1
- {"verdict":"refuse","source":"model","file":"schema/task.md","location":"title","rule":"definition-field-kind","version":"<package-version>"}
@@ -1,5 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- title: { kind: string }
5
- ---
@@ -1 +0,0 @@
1
- {"verdict":"refuse","source":"content","file":"item.md","location":"type","rule":"unknown-type","version":"<package-version>"}
@@ -1 +0,0 @@
1
- {"binaryTargets":[]}
@@ -1,5 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- title: { kind: string, required: true }
5
- ---
@@ -1,7 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- title: { kind: string, required: true }
5
- sections:
6
- Description: { kind: text, required: true }
7
- ---
@@ -1,8 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- title: { kind: string, required: true }
5
- status: { kind: enum, values: [open, in-progress, done], required: true }
6
- sections:
7
- Description: { kind: text, required: true }
8
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- type: definition
3
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- type: definition
3
- ---
@@ -1,5 +0,0 @@
1
- ---
2
- type: definition
3
- fields:
4
- title: { kind: widget }
5
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- type: definition
3
- ---
@@ -1,3 +0,0 @@
1
- ---
2
- type: definition
3
- ---