@agentshouse/mdmodel 0.1.0-alpha.15 → 0.1.0-alpha.17
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/API.md +296 -0
- package/README.md +25 -287
- package/dist/definition.d.ts +7 -3
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +83 -38
- package/dist/definition.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +0 -2
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +0 -7
- package/dist/paths.js.map +1 -1
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +3 -15
- package/dist/project.js.map +1 -1
- package/dist/types.d.ts +6 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/validate.d.ts +2 -3
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +42 -86
- package/dist/validate.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/yaml.js +1 -1
- package/dist/yaml.js.map +1 -1
- package/fixtures/README.md +46 -49
- package/fixtures/cases/binary-any-reference/schema.yaml +4 -0
- package/fixtures/cases/binary-document-collision/schema.yaml +2 -0
- package/fixtures/cases/binary-link-outside-collection/schema.yaml +2 -0
- package/fixtures/cases/binary-prototype-reference/schema.yaml +4 -0
- package/fixtures/cases/binary-typed-reference/schema.yaml +5 -0
- package/fixtures/cases/bracketed-link-definition/schema.yaml +6 -0
- package/fixtures/cases/declared-binary-links/schema.yaml +2 -0
- package/fixtures/cases/duplicate-link-definition/schema.yaml +6 -0
- package/fixtures/cases/fenced-link-definition/schema.yaml +6 -0
- package/fixtures/cases/field-enum/schema.yaml +7 -0
- package/fixtures/cases/frontmatter-schema/expected.json +6 -0
- package/fixtures/cases/frontmatter-schema/schema.yaml +6 -0
- package/fixtures/cases/interrupted-link-definition/schema.yaml +2 -0
- package/fixtures/cases/long-fence-link-definition/schema.yaml +2 -0
- package/fixtures/cases/malformed-definition/expected.json +1 -2
- package/fixtures/cases/malformed-definition/schema.yaml +4 -0
- package/fixtures/cases/member-document/context.json +1 -0
- package/fixtures/cases/member-document/library/people/ana.md +5 -0
- package/fixtures/cases/member-document/schema.yaml +5 -0
- package/fixtures/cases/missing-binary-image/schema.yaml +2 -0
- package/fixtures/cases/missing-binary-link/schema.yaml +2 -0
- package/fixtures/cases/missing-required-field/schema.yaml +7 -0
- package/fixtures/cases/missing-section-item-kind/expected.json +1 -2
- package/fixtures/cases/missing-section-item-kind/schema.yaml +6 -0
- package/fixtures/cases/paragraph-link-definition/schema.yaml +2 -0
- package/fixtures/cases/prototype-field/schema.yaml +6 -0
- package/fixtures/cases/quoted-link-definition/schema.yaml +2 -0
- package/fixtures/cases/referenced-missing-file/schema.yaml +10 -0
- package/fixtures/cases/second-member-document/context.json +1 -0
- package/fixtures/cases/second-member-document/expected.json +6 -0
- package/fixtures/cases/second-member-document/schema.yaml +5 -0
- package/fixtures/cases/structured-section/schema.yaml +7 -0
- package/fixtures/cases/submission-keys/schema.yaml +4 -0
- package/fixtures/cases/truncated-link-definition/schema.yaml +2 -0
- package/fixtures/cases/types-folder-content/schema.yaml +4 -0
- package/fixtures/cases/undeclared-field/schema.yaml +6 -0
- package/fixtures/cases/unknown-type/expected.json +7 -0
- package/fixtures/cases/unknown-type/schema.yaml +4 -0
- package/fixtures/cases/unlisted-reference-type/context.json +1 -0
- package/fixtures/cases/unlisted-reference-type/expected.json +6 -0
- package/fixtures/cases/unlisted-reference-type/schema.yaml +4 -0
- package/fixtures/cases/unresolved-link/schema.yaml +6 -0
- package/fixtures/cases/valid-typed-document/schema.yaml +15 -0
- package/fixtures/cases/wide-item-fence-link/schema.yaml +2 -0
- package/fixtures/division.json +1 -21
- package/fixtures/projection.json +1 -24
- package/package.json +3 -12
- package/fixtures/cases/binary-any-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-document-collision/library/types/note.md +0 -3
- package/fixtures/cases/binary-link-outside-collection/library/types/note.md +0 -3
- package/fixtures/cases/binary-prototype-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-typed-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-typed-reference/library/types/person.md +0 -3
- package/fixtures/cases/bracketed-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/declared-binary-links/library/types/note.md +0 -3
- package/fixtures/cases/duplicate-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/external-invalid-model/definitions/schema/task.md +0 -5
- package/fixtures/cases/external-invalid-model/expected.json +0 -1
- package/fixtures/cases/external-invalid-model/library/note.md +0 -1
- package/fixtures/cases/external-unknown-type/definitions/schema/task.md +0 -5
- package/fixtures/cases/external-unknown-type/expected.json +0 -1
- package/fixtures/cases/external-valid/context.json +0 -1
- package/fixtures/cases/external-valid/definitions/types/task.md +0 -5
- package/fixtures/cases/fenced-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/field-enum/library/types/task.md +0 -8
- package/fixtures/cases/interrupted-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/long-fence-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/malformed-definition/library/types/task.md +0 -5
- package/fixtures/cases/missing-binary-image/library/types/note.md +0 -3
- package/fixtures/cases/missing-binary-link/library/types/note.md +0 -3
- package/fixtures/cases/missing-required-field/library/types/task.md +0 -8
- package/fixtures/cases/missing-section-item-kind/library/types/task.md +0 -7
- package/fixtures/cases/paragraph-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/prd-definition/library/types/task.md +0 -16
- package/fixtures/cases/prototype-field/library/types/task.md +0 -7
- package/fixtures/cases/quoted-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/referenced-missing-file/library/types/person.md +0 -5
- package/fixtures/cases/referenced-missing-file/library/types/task.md +0 -8
- package/fixtures/cases/structured-section/library/types/task.md +0 -8
- package/fixtures/cases/submission-keys/library/types/note.md +0 -5
- package/fixtures/cases/truncated-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/undeclared-field/library/types/task.md +0 -7
- package/fixtures/cases/unresolved-link/library/types/task.md +0 -7
- package/fixtures/cases/valid-typed-document/library/types/person.md +0 -5
- package/fixtures/cases/valid-typed-document/library/types/task.md +0 -13
- package/fixtures/cases/wide-item-fence-link/library/types/note.md +0 -3
- package/markdown-syntax-profile.md +0 -9
- /package/fixtures/cases/{prd-definition → frontmatter-schema}/context.json +0 -0
- /package/fixtures/cases/{prd-definition → member-document}/expected.json +0 -0
- /package/fixtures/cases/{external-invalid-model → types-folder-content}/context.json +0 -0
- /package/fixtures/cases/{external-valid → types-folder-content}/expected.json +0 -0
- /package/fixtures/cases/{external-valid → types-folder-content}/library/types/task.md +0 -0
- /package/fixtures/cases/{external-unknown-type → unknown-type}/context.json +0 -0
- /package/fixtures/cases/{external-unknown-type → unknown-type}/library/item.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "binaryTargets": [] }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "binaryTargets": [] }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "binaryTargets": [] }
|
|
@@ -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 }
|
package/fixtures/division.json
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
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",
|
package/fixtures/projection.json
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
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",
|
|
@@ -144,26 +141,6 @@
|
|
|
144
141
|
}
|
|
145
142
|
}
|
|
146
143
|
},
|
|
147
|
-
{
|
|
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",
|
|
151
|
-
"documentTargets": [
|
|
152
|
-
"plans/q3.md",
|
|
153
|
-
"plans/2026-q3.md"
|
|
154
|
-
],
|
|
155
|
-
"definition": "unreadable-task",
|
|
156
|
-
"move": null,
|
|
157
|
-
"expected": {
|
|
158
|
-
"ok": false,
|
|
159
|
-
"refusal": {
|
|
160
|
-
"file": "types/task.md",
|
|
161
|
-
"rule": "definition-section-kind",
|
|
162
|
-
"version": "<package-version>",
|
|
163
|
-
"location": "Description"
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
144
|
{
|
|
168
145
|
"name": "an image at a supplied Markdown document target is projected like its link",
|
|
169
146
|
"file": "notes/four.md",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/mdmodel",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.17",
|
|
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",
|
|
@@ -21,19 +21,10 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
23
|
"fixtures",
|
|
24
|
+
"API.md",
|
|
24
25
|
"LICENSE",
|
|
25
|
-
"README.md"
|
|
26
|
-
"markdown-syntax-profile.md"
|
|
26
|
+
"README.md"
|
|
27
27
|
],
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "git+https://github.com/agentshouse/mdmodel.git",
|
|
31
|
-
"directory": "packages/mdmodel"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://github.com/agentshouse/mdmodel#readme",
|
|
34
|
-
"bugs": {
|
|
35
|
-
"url": "https://github.com/agentshouse/mdmodel/issues"
|
|
36
|
-
},
|
|
37
28
|
"dependencies": {
|
|
38
29
|
"@cfworker/json-schema": "4.1.1"
|
|
39
30
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"verdict":"refuse","source":"model","file":"schema/task.md","location":"title","rule":"definition-field-kind","version":"<package-version>"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Loose
|
|
@@ -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,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: definition
|
|
3
|
-
fields:
|
|
4
|
-
name: { kind: text }
|
|
5
|
-
title: { kind: string, required: true }
|
|
6
|
-
status: { kind: enum, values: [open, in-progress, done], required: true }
|
|
7
|
-
due: { kind: date }
|
|
8
|
-
owner: { kind: reference, to: person }
|
|
9
|
-
labels: { kind: list, of: string }
|
|
10
|
-
sections:
|
|
11
|
-
Description: { kind: text, required: true }
|
|
12
|
-
Acceptance: { kind: list, of: string }
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
Free text after the frontmatter is documentation for people and agents.
|
|
16
|
-
House validates nothing in it.
|