@agentshouse/mdmodel 0.1.0-ccf1367190878 → 0.1.0-cdbd463e01dc2
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 +197 -178
- package/README.md +21 -22
- package/dist/blocks.d.ts.map +1 -1
- package/dist/blocks.js +35 -20
- package/dist/definition.d.ts +3 -1
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +112 -24
- package/dist/divide.d.ts.map +1 -1
- package/dist/divide.js +27 -17
- package/dist/document.d.ts +5 -5
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +304 -187
- package/dist/event.d.ts +78 -0
- package/dist/event.d.ts.map +1 -0
- package/dist/event.js +230 -0
- package/dist/facts.d.ts +15 -0
- package/dist/facts.d.ts.map +1 -0
- package/dist/facts.js +39 -0
- package/dist/index.d.ts +22 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -6
- package/dist/kinds.d.ts +19 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +161 -0
- package/dist/links.d.ts +2 -0
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +107 -50
- package/dist/paths.d.ts +9 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +28 -2
- package/dist/pattern.d.ts +10 -0
- package/dist/pattern.d.ts.map +1 -0
- package/dist/pattern.js +355 -0
- package/dist/project.d.ts +1 -0
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +38 -15
- package/dist/query/language.d.ts +223 -0
- package/dist/query/language.d.ts.map +1 -0
- package/dist/query/language.js +565 -0
- package/dist/query/match.d.ts +14 -0
- package/dist/query/match.d.ts.map +1 -0
- package/dist/query/match.js +121 -0
- package/dist/query/rows.d.ts +32 -0
- package/dist/query/rows.d.ts.map +1 -0
- package/dist/query/rows.js +161 -0
- package/dist/query/sql.d.ts +39 -0
- package/dist/query/sql.d.ts.map +1 -0
- package/dist/query/sql.js +279 -0
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +6 -1
- package/dist/reserved.d.ts +5 -0
- package/dist/reserved.d.ts.map +1 -0
- package/dist/reserved.js +20 -0
- package/dist/schema.d.ts +1 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +55 -4
- package/dist/types.d.ts +35 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +29 -4
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +301 -85
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +36 -3
- package/fixtures/README.md +26 -6
- package/fixtures/cases/conditional-section/context.json +1 -0
- package/fixtures/cases/conditional-section/expected.json +6 -0
- package/fixtures/cases/conditional-section/library/questions/hosting.md +9 -0
- package/fixtures/cases/conditional-section/library/questions/payments.md +12 -0
- package/fixtures/cases/conditional-section/schema.yaml +14 -0
- package/fixtures/cases/cross-room-link/context.json +1 -0
- package/fixtures/cases/cross-room-link/expected.json +1 -0
- package/fixtures/cases/cross-room-link/library/clients/acme.md +6 -0
- package/fixtures/cases/cross-room-link/schema.yaml +3 -0
- package/fixtures/cases/cross-room-reference/context.json +1 -0
- package/fixtures/cases/cross-room-reference/expected.json +1 -0
- package/fixtures/cases/cross-room-reference/library/clients/acme.md +9 -0
- package/fixtures/cases/cross-room-reference/schema.yaml +9 -0
- package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
- package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
- package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
- package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
- package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/context.json +1 -0
- package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/expected.json +5 -0
- package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
- package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
- package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
- package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
- package/fixtures/cases/member-on-another-type/context.json +1 -0
- package/fixtures/cases/member-on-another-type/expected.json +6 -0
- package/fixtures/cases/member-on-another-type/library/note.md +4 -0
- package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
- package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
- package/fixtures/cases/reference-into-a-reserved-name/expected.json +6 -0
- package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
- package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
- package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
- package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
- package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
- package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
- package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
- package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
- package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
- package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
- package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
- package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
- package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
- package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
- package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
- package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +4 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +6 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +5 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
- package/fixtures/division.json +26 -26
- package/fixtures/queries.json +913 -0
- package/package.json +7 -2
- package/dist/condition.d.ts +0 -149
- package/dist/condition.d.ts.map +0 -1
- package/dist/condition.js +0 -500
package/fixtures/division.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"schema": "task:\n type: object\n properties:\n name: { type: string }\n status: { enum: [open, done] }\n required: [status]\n sections:\n Description: { kind: text, required: true }\n Acceptance: { kind: list, items: { type: string, reference: person } }\nperson: {}\n",
|
|
3
3
|
"cases": [
|
|
4
4
|
{
|
|
5
|
-
"name": "a Document whose whole input fits the
|
|
5
|
+
"name": "a Document whose whole input fits the bound is one Span carrying its projection",
|
|
6
6
|
"file": "tasks/one.md",
|
|
7
7
|
"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",
|
|
8
8
|
"documentTargets": [],
|
|
9
9
|
"definition": "task",
|
|
10
|
-
"
|
|
10
|
+
"bound": 4096,
|
|
11
11
|
"expected": {
|
|
12
12
|
"ok": true,
|
|
13
13
|
"spans": [
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"name": "an input over the
|
|
22
|
+
"name": "an input over the bound descends to whole heading nodes and packs adjacent siblings",
|
|
23
23
|
"file": "tasks/one.md",
|
|
24
24
|
"source": "---\ntype: task\nname: Ship the release\nstatus: open\n---\n\nPreamble prose.\n\n## Description\n\nBody of the description.\n\n## Notes\n\nNotes prose.\n\n## Acceptance\n\n- people/ana.md\n",
|
|
25
25
|
"documentTargets": [],
|
|
26
26
|
"definition": "task",
|
|
27
|
-
"
|
|
27
|
+
"bound": 45,
|
|
28
28
|
"expected": {
|
|
29
29
|
"ok": true,
|
|
30
30
|
"spans": [
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
"name": "a heading node over the
|
|
47
|
+
"name": "a heading node over the bound divides into adjacent blocks carrying its own heading",
|
|
48
48
|
"file": "tasks/one.md",
|
|
49
49
|
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
|
|
50
50
|
"documentTargets": [],
|
|
51
51
|
"definition": "task",
|
|
52
|
-
"
|
|
52
|
+
"bound": 50,
|
|
53
53
|
"expected": {
|
|
54
54
|
"ok": true,
|
|
55
55
|
"spans": [
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nFirst paragraph of the overview.\n\nSecond paragraph of the overview.\n\n## Notes\n\nShort note.\n",
|
|
79
79
|
"documentTargets": [],
|
|
80
80
|
"definition": "task",
|
|
81
|
-
"
|
|
81
|
+
"bound": 75,
|
|
82
82
|
"expected": {
|
|
83
83
|
"ok": true,
|
|
84
84
|
"spans": [
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nIntro line.\n\n### Detail\n\nDetail paragraph one.\n\nDetail paragraph two.\n",
|
|
108
108
|
"documentTargets": [],
|
|
109
109
|
"definition": "task",
|
|
110
|
-
"
|
|
110
|
+
"bound": 40,
|
|
111
111
|
"expected": {
|
|
112
112
|
"ok": true,
|
|
113
113
|
"spans": [
|
|
@@ -131,12 +131,12 @@
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
"name": "a block over the
|
|
134
|
+
"name": "a block over the bound divides into sentences that repeat their predecessor",
|
|
135
135
|
"file": "tasks/one.md",
|
|
136
136
|
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\nOne. Two. Three. Four.\n",
|
|
137
137
|
"documentTargets": [],
|
|
138
138
|
"definition": "task",
|
|
139
|
-
"
|
|
139
|
+
"bound": 30,
|
|
140
140
|
"expected": {
|
|
141
141
|
"ok": true,
|
|
142
142
|
"spans": [
|
|
@@ -156,12 +156,12 @@
|
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
"name": "a single sentence over the
|
|
159
|
+
"name": "a single sentence over the bound divides at a bound cut inside it",
|
|
160
160
|
"file": "tasks/one.md",
|
|
161
161
|
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\n## Overview\n\naaaa bbbb cccc dddd eeee\n",
|
|
162
162
|
"documentTargets": [],
|
|
163
163
|
"definition": "task",
|
|
164
|
-
"
|
|
164
|
+
"bound": 20,
|
|
165
165
|
"expected": {
|
|
166
166
|
"ok": true,
|
|
167
167
|
"spans": [
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"source": "# Title\n\nIntro paragraph about the whole thing.\n\n## Alpha\n\nAlpha one. Alpha two.\n\n### Deep\n\nDeep prose here.\n\n## Beta\n\nBeta prose.\n",
|
|
199
199
|
"documentTargets": [],
|
|
200
200
|
"definition": null,
|
|
201
|
-
"
|
|
201
|
+
"bound": 60,
|
|
202
202
|
"expected": {
|
|
203
203
|
"ok": true,
|
|
204
204
|
"spans": [
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"source": "---\ntype: any\ntitle: Note\n---\n\n## Notes\n\nRead it.\n",
|
|
228
228
|
"documentTargets": [],
|
|
229
229
|
"definition": null,
|
|
230
|
-
"
|
|
230
|
+
"bound": 4096,
|
|
231
231
|
"expected": {
|
|
232
232
|
"ok": true,
|
|
233
233
|
"spans": [
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
"plans/q3.md"
|
|
247
247
|
],
|
|
248
248
|
"definition": "task",
|
|
249
|
-
"
|
|
249
|
+
"bound": 50,
|
|
250
250
|
"expected": {
|
|
251
251
|
"ok": true,
|
|
252
252
|
"spans": [
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
"source": "---\ntype: task\nname: Task\nstatus: open\n---\n\nPreamble prose.\n\n## Acceptance\n\n- people/ana.md\n\n## Notes\n\nShort note.\n",
|
|
272
272
|
"documentTargets": [],
|
|
273
273
|
"definition": "task",
|
|
274
|
-
"
|
|
274
|
+
"bound": 4096,
|
|
275
275
|
"expected": {
|
|
276
276
|
"ok": true,
|
|
277
277
|
"spans": [
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
"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",
|
|
289
289
|
"documentTargets": [],
|
|
290
290
|
"definition": null,
|
|
291
|
-
"
|
|
291
|
+
"bound": 4096,
|
|
292
292
|
"expected": {
|
|
293
293
|
"ok": false,
|
|
294
294
|
"refusal": {
|
|
@@ -299,17 +299,17 @@
|
|
|
299
299
|
}
|
|
300
300
|
},
|
|
301
301
|
{
|
|
302
|
-
"name": "a
|
|
302
|
+
"name": "a bound that cannot hold one whole character is refused before any division",
|
|
303
303
|
"file": "notes/one.md",
|
|
304
304
|
"source": "## Notes\n\nShort note.\n",
|
|
305
305
|
"documentTargets": [],
|
|
306
306
|
"definition": null,
|
|
307
|
-
"
|
|
307
|
+
"bound": 1,
|
|
308
308
|
"expected": {
|
|
309
309
|
"ok": false,
|
|
310
310
|
"refusal": {
|
|
311
311
|
"file": "notes/one.md",
|
|
312
|
-
"rule": "division-
|
|
312
|
+
"rule": "division-bound"
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
},
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
"source": "---\ntype: task\nname: \"Ship: the release\"\nstatus: open\n---\n\nBody prose.\n",
|
|
320
320
|
"documentTargets": [],
|
|
321
321
|
"definition": "task",
|
|
322
|
-
"
|
|
322
|
+
"bound": 4096,
|
|
323
323
|
"expected": {
|
|
324
324
|
"ok": true,
|
|
325
325
|
"spans": [
|
|
@@ -331,12 +331,12 @@
|
|
|
331
331
|
}
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
|
-
"name": "sentence division reads every terminator and closer and drops a carry the
|
|
334
|
+
"name": "sentence division reads every terminator and closer and drops a carry the bound cannot hold",
|
|
335
335
|
"file": "notes/three.md",
|
|
336
336
|
"source": "## Ask\n\nReady? Go! He said \"no.\" Then (silence.) Done.\n",
|
|
337
337
|
"documentTargets": [],
|
|
338
338
|
"definition": null,
|
|
339
|
-
"
|
|
339
|
+
"bound": 30,
|
|
340
340
|
"expected": {
|
|
341
341
|
"ok": true,
|
|
342
342
|
"spans": [
|
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
"source": "## Part\n\n### Alpha\n\nAlpha prose that is long enough to matter.\n\n### Beta\n\nBeta prose.\n",
|
|
362
362
|
"documentTargets": [],
|
|
363
363
|
"definition": null,
|
|
364
|
-
"
|
|
364
|
+
"bound": 70,
|
|
365
365
|
"expected": {
|
|
366
366
|
"ok": true,
|
|
367
367
|
"spans": [
|
|
@@ -377,12 +377,12 @@
|
|
|
377
377
|
}
|
|
378
378
|
},
|
|
379
379
|
{
|
|
380
|
-
"name": "a heading the
|
|
380
|
+
"name": "a heading the bound cannot hold beside any text is not repeated",
|
|
381
381
|
"file": "notes/five.md",
|
|
382
382
|
"source": "## An overview of the release\n\nFirst paragraph here.\n\nSecond paragraph here.\n",
|
|
383
383
|
"documentTargets": [],
|
|
384
384
|
"definition": null,
|
|
385
|
-
"
|
|
385
|
+
"bound": 25,
|
|
386
386
|
"expected": {
|
|
387
387
|
"ok": true,
|
|
388
388
|
"spans": [
|