@agentshouse/mdmodel 0.1.0-alpha.1 → 0.1.0-alpha.10

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 (156) hide show
  1. package/README.md +220 -7
  2. package/dist/blocks.d.ts +11 -0
  3. package/dist/blocks.d.ts.map +1 -0
  4. package/dist/blocks.js +63 -0
  5. package/dist/blocks.js.map +1 -0
  6. package/dist/definition.d.ts +8 -6
  7. package/dist/definition.d.ts.map +1 -1
  8. package/dist/definition.js +44 -38
  9. package/dist/definition.js.map +1 -1
  10. package/dist/divide.d.ts +3 -0
  11. package/dist/divide.d.ts.map +1 -0
  12. package/dist/divide.js +363 -0
  13. package/dist/divide.js.map +1 -0
  14. package/dist/document.d.ts +4 -1
  15. package/dist/document.d.ts.map +1 -1
  16. package/dist/document.js +95 -4
  17. package/dist/document.js.map +1 -1
  18. package/dist/index.d.ts +4 -2
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +3 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/links.d.ts +25 -1
  23. package/dist/links.d.ts.map +1 -1
  24. package/dist/links.js +289 -48
  25. package/dist/links.js.map +1 -1
  26. package/dist/paths.d.ts +1 -0
  27. package/dist/paths.d.ts.map +1 -1
  28. package/dist/paths.js +5 -0
  29. package/dist/paths.js.map +1 -1
  30. package/dist/profile.js.map +1 -1
  31. package/dist/project.d.ts +21 -0
  32. package/dist/project.d.ts.map +1 -0
  33. package/dist/project.js +158 -0
  34. package/dist/project.js.map +1 -0
  35. package/dist/refuse.js.map +1 -1
  36. package/dist/schema.d.ts.map +1 -1
  37. package/dist/schema.js +16 -38
  38. package/dist/schema.js.map +1 -1
  39. package/dist/sections.d.ts.map +1 -1
  40. package/dist/sections.js +14 -47
  41. package/dist/sections.js.map +1 -1
  42. package/dist/types.d.ts +44 -0
  43. package/dist/types.d.ts.map +1 -1
  44. package/dist/types.js.map +1 -1
  45. package/dist/validate.d.ts +2 -2
  46. package/dist/validate.d.ts.map +1 -1
  47. package/dist/validate.js +17 -8
  48. package/dist/validate.js.map +1 -1
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.d.ts.map +1 -1
  51. package/dist/version.js +1 -1
  52. package/dist/version.js.map +1 -1
  53. package/dist/yaml.d.ts +1 -0
  54. package/dist/yaml.d.ts.map +1 -1
  55. package/dist/yaml.js +6 -4
  56. package/dist/yaml.js.map +1 -1
  57. package/fixtures/README.md +87 -27
  58. package/fixtures/cases/any-without-type/context.json +1 -0
  59. package/fixtures/cases/binary-any-reference/context.json +5 -0
  60. package/fixtures/cases/binary-any-reference/expected.json +7 -0
  61. package/fixtures/cases/binary-any-reference/library/notes/draft.md +6 -0
  62. package/fixtures/cases/binary-any-reference/library/types/note.md +5 -0
  63. package/fixtures/cases/binary-document-collision/context.json +5 -0
  64. package/fixtures/cases/binary-document-collision/expected.json +6 -0
  65. package/fixtures/cases/binary-document-collision/library/notes/draft.md +3 -0
  66. package/fixtures/cases/binary-document-collision/library/types/note.md +3 -0
  67. package/fixtures/cases/binary-link-outside-collection/context.json +6 -0
  68. package/fixtures/cases/binary-link-outside-collection/expected.json +6 -0
  69. package/fixtures/cases/binary-link-outside-collection/library/notes/draft.md +5 -0
  70. package/fixtures/cases/binary-link-outside-collection/library/types/note.md +3 -0
  71. package/fixtures/cases/binary-prototype-reference/context.json +1 -0
  72. package/fixtures/cases/binary-prototype-reference/expected.json +7 -0
  73. package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +6 -0
  74. package/fixtures/cases/binary-prototype-reference/library/types/note.md +5 -0
  75. package/fixtures/cases/binary-typed-reference/context.json +5 -0
  76. package/fixtures/cases/binary-typed-reference/expected.json +7 -0
  77. package/fixtures/cases/binary-typed-reference/library/notes/draft.md +6 -0
  78. package/fixtures/cases/binary-typed-reference/library/types/note.md +5 -0
  79. package/fixtures/cases/binary-typed-reference/library/types/person.md +3 -0
  80. package/fixtures/cases/bracketed-link-definition/context.json +1 -0
  81. package/fixtures/cases/bracketed-link-definition/expected.json +1 -0
  82. package/fixtures/cases/bracketed-link-definition/library/item.md +10 -0
  83. package/fixtures/cases/bracketed-link-definition/library/types/task.md +7 -0
  84. package/fixtures/cases/declared-binary-links/context.json +6 -0
  85. package/fixtures/cases/declared-binary-links/expected.json +1 -0
  86. package/fixtures/cases/declared-binary-links/library/notes/draft.md +7 -0
  87. package/fixtures/cases/declared-binary-links/library/types/note.md +3 -0
  88. package/fixtures/cases/duplicate-link-definition/context.json +1 -0
  89. package/fixtures/cases/duplicate-link-definition/expected.json +1 -0
  90. package/fixtures/cases/duplicate-link-definition/library/item.md +11 -0
  91. package/fixtures/cases/duplicate-link-definition/library/types/task.md +7 -0
  92. package/fixtures/cases/fenced-link-definition/context.json +1 -0
  93. package/fixtures/cases/fenced-link-definition/expected.json +1 -0
  94. package/fixtures/cases/fenced-link-definition/library/item.md +12 -0
  95. package/fixtures/cases/fenced-link-definition/library/types/task.md +7 -0
  96. package/fixtures/cases/field-enum/context.json +1 -0
  97. package/fixtures/cases/interrupted-link-definition/context.json +1 -0
  98. package/fixtures/cases/interrupted-link-definition/expected.json +1 -0
  99. package/fixtures/cases/interrupted-link-definition/library/notes/draft.md +8 -0
  100. package/fixtures/cases/interrupted-link-definition/library/types/note.md +3 -0
  101. package/fixtures/cases/long-fence-link-definition/context.json +1 -0
  102. package/fixtures/cases/long-fence-link-definition/expected.json +1 -0
  103. package/fixtures/cases/long-fence-link-definition/library/notes/draft.md +9 -0
  104. package/fixtures/cases/long-fence-link-definition/library/types/note.md +3 -0
  105. package/fixtures/cases/malformed-definition/context.json +1 -0
  106. package/fixtures/cases/missing-binary-image/context.json +6 -0
  107. package/fixtures/cases/missing-binary-image/expected.json +6 -0
  108. package/fixtures/cases/missing-binary-image/library/notes/draft.md +5 -0
  109. package/fixtures/cases/missing-binary-image/library/types/note.md +3 -0
  110. package/fixtures/cases/missing-binary-link/context.json +6 -0
  111. package/fixtures/cases/missing-binary-link/expected.json +6 -0
  112. package/fixtures/cases/missing-binary-link/library/notes/draft.md +5 -0
  113. package/fixtures/cases/missing-binary-link/library/types/note.md +3 -0
  114. package/fixtures/cases/missing-required-field/context.json +1 -0
  115. package/fixtures/cases/missing-section-item-kind/context.json +1 -0
  116. package/fixtures/cases/missing-section-item-kind/expected.json +7 -0
  117. package/fixtures/cases/missing-section-item-kind/library/types/task.md +7 -0
  118. package/fixtures/cases/paragraph-link-definition/context.json +5 -0
  119. package/fixtures/cases/paragraph-link-definition/expected.json +1 -0
  120. package/fixtures/cases/paragraph-link-definition/library/notes/draft.md +10 -0
  121. package/fixtures/cases/paragraph-link-definition/library/types/note.md +3 -0
  122. package/fixtures/cases/prd-definition/context.json +1 -0
  123. package/fixtures/cases/prd-definition/library/types/task.md +2 -1
  124. package/fixtures/cases/prototype-field/context.json +1 -0
  125. package/fixtures/cases/prototype-field/expected.json +7 -0
  126. package/fixtures/cases/prototype-field/library/item.md +9 -0
  127. package/fixtures/cases/prototype-field/library/types/task.md +7 -0
  128. package/fixtures/cases/quoted-link-definition/context.json +1 -0
  129. package/fixtures/cases/quoted-link-definition/expected.json +6 -0
  130. package/fixtures/cases/quoted-link-definition/library/notes/draft.md +7 -0
  131. package/fixtures/cases/quoted-link-definition/library/types/note.md +3 -0
  132. package/fixtures/cases/referenced-missing-file/context.json +1 -0
  133. package/fixtures/cases/structured-section/context.json +1 -0
  134. package/fixtures/cases/structured-section/library/types/task.md +1 -1
  135. package/fixtures/cases/truncated-link-definition/context.json +1 -0
  136. package/fixtures/cases/truncated-link-definition/expected.json +6 -0
  137. package/fixtures/cases/truncated-link-definition/library/notes/draft.md +7 -0
  138. package/fixtures/cases/truncated-link-definition/library/notes/other.md +5 -0
  139. package/fixtures/cases/truncated-link-definition/library/types/note.md +3 -0
  140. package/fixtures/cases/unclosed-frontmatter/context.json +1 -0
  141. package/fixtures/cases/undeclared-field/context.json +1 -0
  142. package/fixtures/cases/undeclared-field/expected.json +7 -0
  143. package/fixtures/cases/undeclared-field/library/item.md +9 -0
  144. package/fixtures/cases/undeclared-field/library/types/task.md +7 -0
  145. package/fixtures/cases/unresolved-link/context.json +1 -0
  146. package/fixtures/cases/valid-typed-document/context.json +1 -0
  147. package/fixtures/cases/valid-typed-document/library/tasks/one.md +1 -0
  148. package/fixtures/cases/valid-typed-document/library/types/task.md +2 -1
  149. package/fixtures/cases/wide-item-fence-link/context.json +1 -0
  150. package/fixtures/cases/wide-item-fence-link/expected.json +1 -0
  151. package/fixtures/cases/wide-item-fence-link/library/notes/draft.md +7 -0
  152. package/fixtures/cases/wide-item-fence-link/library/types/note.md +3 -0
  153. package/fixtures/division.json +415 -0
  154. package/fixtures/preamble.json +107 -0
  155. package/fixtures/projection.json +186 -0
  156. package/package.json +4 -5
@@ -0,0 +1 @@
1
+ { "binaryTargets": ["data/export.csv"] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: task
3
+ title: Ship
4
+ ---
5
+
6
+ ## Description
7
+
8
+ See [the export][ex].
9
+
10
+ [ex]: data/export.csv
11
+ [ex]: missing.csv
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: definition
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
7
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,12 @@
1
+ ---
2
+ type: task
3
+ title: Ship
4
+ ---
5
+
6
+ ## Description
7
+
8
+ See [the export][ex].
9
+
10
+ ```md
11
+ [ex]: missing.md
12
+ ```
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: definition
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
7
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,8 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ Some text
6
+ [ex]: ../data/missing.csv
7
+
8
+ See [the export][ex].
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: definition
3
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ ````md
6
+ ```
7
+ [the export](../data/export.csv)
8
+ ```
9
+ ````
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: definition
3
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "binaryTargets": [
3
+ "assets/existing.pdf",
4
+ "../outside.png"
5
+ ]
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/draft.md",
4
+ "rule": "unresolved-link",
5
+ "version": "<package-version>"
6
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ ![Missing](../assets/missing.png)
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: definition
3
+ ---
@@ -0,0 +1,6 @@
1
+ {
2
+ "binaryTargets": [
3
+ "assets/existing.pdf",
4
+ "../outside.png"
5
+ ]
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/draft.md",
4
+ "rule": "unresolved-link",
5
+ "version": "<package-version>"
6
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ [Missing](../assets/missing.pdf)
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: definition
3
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,7 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "types/task.md",
4
+ "location": "Acceptance",
5
+ "rule": "definition-list-of",
6
+ "version": "<package-version>"
7
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: definition
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Acceptance: { kind: list }
7
+ ---
@@ -0,0 +1,5 @@
1
+ {
2
+ "binaryTargets": [
3
+ "data/export.csv"
4
+ ]
5
+ }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ Some text
6
+ [ex]: ../data/missing.csv
7
+
8
+ [ex]: ../data/export.csv
9
+
10
+ See [the export][ex].
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: definition
3
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  type: definition
3
3
  fields:
4
+ name: { kind: text }
4
5
  title: { kind: string, required: true }
5
6
  status: { kind: enum, values: [open, in-progress, done], required: true }
6
7
  due: { kind: date }
@@ -8,7 +9,7 @@ fields:
8
9
  labels: { kind: list, of: string }
9
10
  sections:
10
11
  Description: { kind: text, required: true }
11
- Acceptance: { kind: list }
12
+ Acceptance: { kind: list, of: string }
12
13
  ---
13
14
 
14
15
  Free text after the frontmatter is documentation for people and agents.
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,7 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "item.md",
4
+ "location": "__proto__",
5
+ "rule": "undeclared-field",
6
+ "version": "<package-version>"
7
+ }
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: task
3
+ title: Ship
4
+ __proto__: Ada
5
+ ---
6
+
7
+ ## Description
8
+
9
+ Go.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: definition
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
7
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/draft.md",
4
+ "rule": "unresolved-link",
5
+ "version": "<package-version>"
6
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ See [the export][ex].
6
+
7
+ > [ex]: ../data/export.csv
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: definition
3
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -4,5 +4,5 @@ fields:
4
4
  title: { kind: string, required: true }
5
5
  sections:
6
6
  Description: { kind: text, required: true }
7
- Acceptance: { kind: list }
7
+ Acceptance: { kind: list, of: string }
8
8
  ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/draft.md",
4
+ "rule": "unresolved-link",
5
+ "version": "<package-version>"
6
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ See [the other note][ex].
6
+
7
+ [ex]: <../notes/other.md extra>
@@ -0,0 +1,5 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ Another note.
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: definition
3
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,7 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "item.md",
4
+ "location": "asignee",
5
+ "rule": "undeclared-field",
6
+ "version": "<package-version>"
7
+ }
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: task
3
+ title: Ship
4
+ asignee: Ada
5
+ ---
6
+
7
+ ## Description
8
+
9
+ Go.
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: definition
3
+ fields:
4
+ title: { kind: string, required: true }
5
+ sections:
6
+ Description: { kind: text, required: true }
7
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  type: task
3
+ name: Ship the first release
3
4
  title: Ship
4
5
  status: open
5
6
  due: 2026-09-06
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  type: definition
3
3
  fields:
4
+ name: { kind: text }
4
5
  title: { kind: string, required: true }
5
6
  status: { kind: enum, values: [open, in-progress, done], required: true }
6
7
  due: { kind: date }
@@ -8,5 +9,5 @@ fields:
8
9
  labels: { kind: list, of: string }
9
10
  sections:
10
11
  Description: { kind: text, required: true }
11
- Acceptance: { kind: list }
12
+ Acceptance: { kind: list, of: string }
12
13
  ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: note
3
+ ---
4
+
5
+ 10. ```sh
6
+ see [the other](../data/other.csv)
7
+ ```
@@ -0,0 +1,3 @@
1
+ ---
2
+ type: definition
3
+ ---