@agentshouse/mdmodel 0.1.0-cabd61587647f → 0.1.0-caefdbe3e3d42

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 (127) hide show
  1. package/API.md +161 -116
  2. package/README.md +6 -4
  3. package/dist/blocks.d.ts.map +1 -1
  4. package/dist/blocks.js +29 -7
  5. package/dist/condition.d.ts +43 -13
  6. package/dist/condition.d.ts.map +1 -1
  7. package/dist/condition.js +225 -127
  8. package/dist/definition.d.ts +3 -1
  9. package/dist/definition.d.ts.map +1 -1
  10. package/dist/definition.js +105 -21
  11. package/dist/divide.js +9 -9
  12. package/dist/document.d.ts +4 -4
  13. package/dist/document.d.ts.map +1 -1
  14. package/dist/document.js +41 -41
  15. package/dist/index.d.ts +20 -8
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +12 -6
  18. package/dist/kinds.d.ts +18 -0
  19. package/dist/kinds.d.ts.map +1 -0
  20. package/dist/kinds.js +141 -0
  21. package/dist/links.d.ts +1 -0
  22. package/dist/links.d.ts.map +1 -1
  23. package/dist/links.js +85 -39
  24. package/dist/paths.d.ts +9 -1
  25. package/dist/paths.d.ts.map +1 -1
  26. package/dist/paths.js +28 -2
  27. package/dist/pattern.d.ts +10 -0
  28. package/dist/pattern.d.ts.map +1 -0
  29. package/dist/pattern.js +355 -0
  30. package/dist/project.d.ts.map +1 -1
  31. package/dist/project.js +7 -7
  32. package/dist/query/language.d.ts +218 -0
  33. package/dist/query/language.d.ts.map +1 -0
  34. package/dist/query/language.js +526 -0
  35. package/dist/query/match.d.ts +12 -0
  36. package/dist/query/match.d.ts.map +1 -0
  37. package/dist/query/match.js +118 -0
  38. package/dist/query/rows.d.ts +32 -0
  39. package/dist/query/rows.d.ts.map +1 -0
  40. package/dist/query/rows.js +161 -0
  41. package/dist/query/sql.d.ts +39 -0
  42. package/dist/query/sql.d.ts.map +1 -0
  43. package/dist/query/sql.js +279 -0
  44. package/dist/references.d.ts.map +1 -1
  45. package/dist/references.js +6 -1
  46. package/dist/reserved.d.ts +5 -0
  47. package/dist/reserved.d.ts.map +1 -0
  48. package/dist/reserved.js +20 -0
  49. package/dist/schema.d.ts +1 -0
  50. package/dist/schema.d.ts.map +1 -1
  51. package/dist/schema.js +55 -4
  52. package/dist/types.d.ts +34 -4
  53. package/dist/types.d.ts.map +1 -1
  54. package/dist/validate.d.ts +28 -4
  55. package/dist/validate.d.ts.map +1 -1
  56. package/dist/validate.js +302 -75
  57. package/dist/yaml.d.ts.map +1 -1
  58. package/dist/yaml.js +36 -3
  59. package/fixtures/README.md +26 -6
  60. package/fixtures/cases/conditional-section/context.json +1 -0
  61. package/fixtures/cases/conditional-section/expected.json +6 -0
  62. package/fixtures/cases/conditional-section/library/questions/hosting.md +9 -0
  63. package/fixtures/cases/conditional-section/library/questions/payments.md +12 -0
  64. package/fixtures/cases/conditional-section/schema.yaml +14 -0
  65. package/fixtures/cases/cross-room-link/context.json +1 -0
  66. package/fixtures/cases/cross-room-link/expected.json +1 -0
  67. package/fixtures/cases/cross-room-link/library/clients/acme.md +6 -0
  68. package/fixtures/cases/cross-room-link/schema.yaml +3 -0
  69. package/fixtures/cases/cross-room-reference/context.json +1 -0
  70. package/fixtures/cases/cross-room-reference/expected.json +1 -0
  71. package/fixtures/cases/cross-room-reference/library/clients/acme.md +9 -0
  72. package/fixtures/cases/cross-room-reference/schema.yaml +9 -0
  73. package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
  74. package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
  75. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
  76. package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
  77. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/context.json +1 -0
  78. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/expected.json +5 -0
  79. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
  80. package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
  81. package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
  82. package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
  83. package/fixtures/cases/member-on-another-type/context.json +1 -0
  84. package/fixtures/cases/member-on-another-type/expected.json +6 -0
  85. package/fixtures/cases/member-on-another-type/library/note.md +4 -0
  86. package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
  87. package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
  88. package/fixtures/cases/reference-into-a-reserved-name/expected.json +6 -0
  89. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
  90. package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
  91. package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
  92. package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
  93. package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
  94. package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
  95. package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
  96. package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
  97. package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
  98. package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
  99. package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
  100. package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
  101. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
  102. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
  103. package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
  104. package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
  105. package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
  106. package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
  107. package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
  108. package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
  109. package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
  110. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +4 -0
  111. package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
  112. package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
  113. package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
  114. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +6 -0
  115. package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
  116. package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
  117. package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
  118. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
  119. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +5 -0
  120. package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
  121. package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
  122. package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
  123. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
  124. package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
  125. package/fixtures/division.json +26 -26
  126. package/fixtures/queries.json +913 -0
  127. package/package.json +7 -2
package/dist/yaml.js CHANGED
@@ -6,6 +6,18 @@ export class YamlError extends Error {
6
6
  this.name = 'YamlError';
7
7
  }
8
8
  }
9
+ const YAML_DEPTH_MAX = 64;
10
+ function nested(c, parse) {
11
+ if (c.depth >= YAML_DEPTH_MAX)
12
+ throw new YamlError(c.i);
13
+ c.depth += 1;
14
+ try {
15
+ return parse();
16
+ }
17
+ finally {
18
+ c.depth -= 1;
19
+ }
20
+ }
9
21
  function peek(c) {
10
22
  return c.i < c.end ? c.text[c.i] : '';
11
23
  }
@@ -70,7 +82,10 @@ function indentAt(c) {
70
82
  }
71
83
  return n;
72
84
  }
85
+ const UNHELD_TEXT = /[\0\ud800-\udfff]/u;
73
86
  function scalar(value, start, end) {
87
+ if (typeof value === 'string' && UNHELD_TEXT.test(value))
88
+ throw new YamlError(start);
74
89
  return { kind: 'scalar', value, start, end };
75
90
  }
76
91
  export function interpretPlain(text) {
@@ -202,6 +217,9 @@ function parseFlowValue(c) {
202
217
  return parseScalar(c, true);
203
218
  }
204
219
  function parseFlowMap(c) {
220
+ return nested(c, () => flowMap(c));
221
+ }
222
+ function flowMap(c) {
205
223
  const start = c.i;
206
224
  if (peek(c) !== '{')
207
225
  throw new YamlError(c.i);
@@ -240,6 +258,9 @@ function parseFlowMap(c) {
240
258
  throw new YamlError(c.i);
241
259
  }
242
260
  function parseFlowSeq(c) {
261
+ return nested(c, () => flowSeq(c));
262
+ }
263
+ function flowSeq(c) {
243
264
  const start = c.i;
244
265
  if (peek(c) !== '[')
245
266
  throw new YamlError(c.i);
@@ -336,6 +357,9 @@ function parseSeqItem(c, indent) {
336
357
  return parseValue(c, indent);
337
358
  }
338
359
  function parseBlockSeq(c, indent) {
360
+ return nested(c, () => blockSeq(c, indent));
361
+ }
362
+ function blockSeq(c, indent) {
339
363
  const start = c.i;
340
364
  const items = [];
341
365
  let end = start;
@@ -355,6 +379,9 @@ function parseBlockSeq(c, indent) {
355
379
  return { kind: 'seq', items, start, end };
356
380
  }
357
381
  function parseBlockMap(c, indent, inline = false) {
382
+ return nested(c, () => blockMap(c, indent, inline));
383
+ }
384
+ function blockMap(c, indent, inline) {
358
385
  const start = c.i;
359
386
  const entries = [];
360
387
  const seen = new Set();
@@ -387,7 +414,7 @@ function parseBlockMap(c, indent, inline = false) {
387
414
  return { kind: 'map', entries, start, end };
388
415
  }
389
416
  export function parseYamlMapping(text, start, end) {
390
- const c = { text, i: start, end };
417
+ const c = { text, i: start, end, depth: 0 };
391
418
  skipBlankAndComments(c);
392
419
  if (c.i >= end)
393
420
  return { kind: 'map', entries: [], start, end };
@@ -439,17 +466,23 @@ function listed(value) {
439
466
  return keys.length === value.length && keys.every((key, index) => key === String(index));
440
467
  }
441
468
  function heldWithin(value, within) {
442
- if (value === null || typeof value === 'string' || typeof value === 'boolean')
469
+ if (typeof value === 'string')
470
+ return !UNHELD_TEXT.test(value);
471
+ if (value === null || typeof value === 'boolean')
443
472
  return true;
444
473
  if (typeof value === 'number')
445
474
  return Number.isFinite(value);
446
475
  if (typeof value !== 'object' || within.includes(value))
447
476
  return false;
477
+ if (within.length + 1 >= YAML_DEPTH_MAX)
478
+ return false;
448
479
  const path = [...within, value];
449
480
  const held = (item) => heldWithin(item, path);
450
481
  if (Array.isArray(value))
451
482
  return listed(value) && value.every(held);
452
- return plain(value) && Object.values(value).every(held);
483
+ return (plain(value) &&
484
+ Object.keys(value).every((key) => !UNHELD_TEXT.test(key)) &&
485
+ Object.values(value).every(held));
453
486
  }
454
487
  export function frontmatterValue(value) {
455
488
  return heldWithin(value, []);
@@ -51,8 +51,8 @@ change to a value that is not prose leaves the projection alone.
51
51
 
52
52
  `division.json` exercises the public `divide` seam separately from the
53
53
  validation Libraries. It carries `schema` and `cases` like `projection.json`,
54
- and each case adds the `budget` the division runs under. Parse the source, call
55
- `divide(document, file, context)` with `{ documentTargets, definition, budget }`,
54
+ and each case adds the `bound` the division runs under. Parse the source, call
55
+ `divide(document, file, context)` with `{ documentTargets, definition, bound }`,
56
56
  and compare against `expected`: either `{ "ok": true, "spans": [...] }`, where
57
57
  each span carries the exact `text` to embed and the exact `source` the returned
58
58
  `start` and `end` address in that case's source, or `{ "ok": false, "refusal": ... }`. Then
@@ -65,6 +65,19 @@ value one span carries part of. `start` and `end` are UTF-8 byte offsets into th
65
65
  source; every source in this corpus is ASCII, so a consumer compares the
66
66
  addressed `source` with an ordinary string slice.
67
67
 
68
+ ## Queries
69
+
70
+ `queries.json` is the one table of cases both query evaluators answer. It carries `schema`,
71
+ one schema text; `documents`, each named and carrying its `path`, the `type` a collection
72
+ stores for it (`any` for an untyped Markdown Document, `null` for one that is not Markdown),
73
+ its `fileId`, the `text` the device holds or `null`, and its `fields`; and `cases`, each with a
74
+ `name`, a `query` of filter parts, the `document` it names and whether it `matches`. Verify
75
+ the schema and plan `{ ...query, select: {} }` with `planOf` against its types. Then
76
+ `matches(plan, candidate)` over the named Document, given its type's definition, and the
77
+ condition `sql.tests` writes over a collection holding every Document of the table with the
78
+ values `indexed` derives from it must both answer `matches`. A new operator adds its cases
79
+ here first.
80
+
68
81
  ## Verdict format
69
82
 
70
83
  Acceptance:
@@ -107,6 +120,7 @@ schema text. The model's own rules:
107
120
  | `frontmatter-fence` | A present frontmatter fence does not parse as the accepted YAML subset |
108
121
  | `schema-yaml` | A schema text is not a mapping in the accepted YAML subset |
109
122
  | `schema-type-name` | A type name is empty, starts with `$`, or is `any` or `attachment` |
123
+ | `provided-type` | A schema names a type its caller provides with a key but its two role keywords |
110
124
  | `schema` | A type or subschema is neither a mapping nor a boolean |
111
125
  | `schema-keyword` | A schema carries a key that is no JSON Schema 2020-12 keyword the model admits |
112
126
  | `$defs` | `$defs` is not a mapping |
@@ -114,17 +128,23 @@ schema text. The model's own rules:
114
128
  | `reference` | `reference` is not on a string or names something but a type, `any`, `attachment` |
115
129
  | `sections` | A section is not `{ kind: text }` or `{ kind: list, items }` over one scalar |
116
130
  | `member_document` | The mark is not a boolean, or a second type carries it |
117
- | `unknown-type` | A file declares a type absent from the governing schema |
131
+ | `unknown-type` | A file declares a type absent from the governing schema, or other than its typed path requires it to name |
118
132
  | `undeclared-field` | A closed object carries a key it does not declare |
119
133
  | `required-section` | A required section heading is missing |
134
+ | `conditional-section` | A section its type's `if` branch requires is absent or holds no text |
120
135
  | `unresolved-reference` | A reference at any depth or a section item reaches no member it admits |
121
- | `unresolved-link` | A body link is an absolute path or leaves the collection |
136
+ | `unresolved-link` | A body link is an absolute path, leaves the collection or, from a typed Document at a document path, reaches a reserved name |
137
+ | `room-md-type` | `ROOM.md` declares a type |
138
+ | `required-body` | A file at a typed path that requires a body has a body holding no text |
122
139
  | `structured-section` | A declared list section is not a list of values of its item schema |
123
140
  | `referenced-missing-file` | Remaining files still reference an absent path |
124
141
  | `unwritable-link` | No Markdown destination form can carry a new link destination |
125
- | `division-budget` | A division budget is not a whole number of at least 2 |
142
+ | `division-bound` | A division bound is not a whole number of at least 2 |
143
+
144
+ A `then` or `else` of an `if` on a type, in its `allOf` or in such a branch may hold
145
+ `sections`, naming sections the type declares as the type declares them, else `sections`.
126
146
 
127
- `unwritable-link` is refused by `apply` and `division-budget` by `divide`, not
147
+ `unwritable-link` is refused by `apply` and `division-bound` by `divide`, not
128
148
  by `validate`, so no case under `cases/` carries either.
129
149
 
130
150
  A reference that admits `attachment` reaches any path in the same Library, so
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "questions/payments.md",
4
+ "location": "Answer",
5
+ "rule": "conditional-section"
6
+ }
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: question
3
+ title: Where does it run
4
+ status: open
5
+ ---
6
+
7
+ ## Question
8
+
9
+ Which host runs the shop?
@@ -0,0 +1,12 @@
1
+ ---
2
+ type: question
3
+ title: Who takes payments
4
+ status: answered
5
+ ---
6
+
7
+ ## Question
8
+
9
+ Which provider takes card payments?
10
+
11
+ ## Answer
12
+
@@ -0,0 +1,14 @@
1
+ question:
2
+ properties:
3
+ title: { type: string }
4
+ status: { enum: [open, answered, withdrawn] }
5
+ required: [title, status]
6
+ sections:
7
+ Question: { kind: text, required: true }
8
+ Answer: { kind: text }
9
+ if:
10
+ properties:
11
+ status: { enum: [answered, withdrawn] }
12
+ then:
13
+ sections:
14
+ Answer: { kind: text, required: true }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: client
3
+ name: Acme
4
+ ---
5
+
6
+ Paid by [the March invoice](/rooms/finance/invoices/march.md#total).
@@ -0,0 +1,3 @@
1
+ client:
2
+ properties:
3
+ name: { type: string }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,9 @@
1
+ ---
2
+ type: client
3
+ name: Acme
4
+ finance: /rooms/finance/invoices/acme.md
5
+ ---
6
+
7
+ ## Invoices
8
+
9
+ - [March](/rooms/finance/invoices/march.md)
@@ -0,0 +1,9 @@
1
+ client:
2
+ properties:
3
+ name: { type: string }
4
+ finance: { type: string, reference: invoice, cross_room: true }
5
+ sections:
6
+ Invoices: { kind: list, items: { type: string, reference: invoice, cross_room: true } }
7
+ invoice:
8
+ properties:
9
+ name: { type: string }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/a.md",
4
+ "rule": "unresolved-link"
5
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: note
3
+ title: Plan
4
+ ---
5
+
6
+ See [the schema](../settings/schema.yaml).
@@ -0,0 +1,3 @@
1
+ note:
2
+ properties:
3
+ title: { type: string }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/b.md",
4
+ "rule": "unresolved-link"
5
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ type: any
3
+ ---
4
+
5
+ See [the Room](../Rooms/other/plan.md).
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "note.md",
4
+ "location": "/member",
5
+ "rule": "undeclared-field"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ member: ana@example.com
3
+ ---
4
+ # Ana
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "note.md",
4
+ "location": "/member",
5
+ "rule": "undeclared-field"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: note
3
+ member: ana@example.com
4
+ ---
@@ -0,0 +1,7 @@
1
+ contact:
2
+ member_document: true
3
+ properties:
4
+ name: { type: string }
5
+ note:
6
+ properties:
7
+ member: { type: string }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "notes/a.md",
4
+ "rule": "unresolved-reference",
5
+ "location": "/brief"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: task
3
+ brief: ../settings/brief.md
4
+ ---
@@ -0,0 +1,3 @@
1
+ task:
2
+ properties:
3
+ brief: { type: string, reference: any }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "ROOM.md",
4
+ "location": "/type",
5
+ "rule": "room-md-type"
6
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ type: any
3
+ ---
4
+
5
+ # Research
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "settings/prefs/*.md",
6
+ "type": "prefs",
7
+ "named": true,
8
+ "body": false
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "settings/prefs/one.md",
4
+ "rule": "unknown-type",
5
+ "location": "/type"
6
+ }
@@ -0,0 +1,6 @@
1
+ prefs:
2
+ properties:
3
+ theme: { type: string }
4
+ note:
5
+ properties:
6
+ title: { type: string }
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "settings/prefs/*.md",
6
+ "type": "prefs",
7
+ "named": true,
8
+ "body": false
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "verdict": "accept"
3
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: prefs
3
+ theme: dark
4
+ ---
@@ -0,0 +1,6 @@
1
+ prefs:
2
+ properties:
3
+ theme: { type: string }
4
+ note:
5
+ properties:
6
+ title: { type: string }
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "settings/prefs/*.md",
6
+ "type": "prefs",
7
+ "named": true,
8
+ "body": false
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "settings/prefs/one.md",
4
+ "rule": "unknown-type",
5
+ "location": "/type"
6
+ }
@@ -0,0 +1,6 @@
1
+ prefs:
2
+ properties:
3
+ theme: { type: string }
4
+ note:
5
+ properties:
6
+ title: { type: string }
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "rooms/*/tasks/*.md",
6
+ "type": "task",
7
+ "named": false,
8
+ "body": true
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "rooms/team/tasks/plan.md",
4
+ "rule": "required",
5
+ "location": "/owner"
6
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ title: Plan
3
+ ---
4
+ Write the plan.
@@ -0,0 +1,5 @@
1
+ task:
2
+ properties:
3
+ title: { type: string, maxLength: 20 }
4
+ owner: { type: string, format: uuid }
5
+ required: [title, owner]
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "rooms/*/tasks/*.md",
6
+ "type": "task",
7
+ "named": false,
8
+ "body": true
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "rooms/team/tasks/plan.md",
4
+ "rule": "unknown-type",
5
+ "location": "/type"
6
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: task
3
+ title: Plan
4
+ owner: 019a0000-0000-7000-8000-000000000001
5
+ ---
6
+ Write the plan.
@@ -0,0 +1,5 @@
1
+ task:
2
+ properties:
3
+ title: { type: string, maxLength: 20 }
4
+ owner: { type: string, format: uuid }
5
+ required: [title, owner]
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "rooms/*/tasks/*.md",
6
+ "type": "task",
7
+ "named": false,
8
+ "body": true
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "verdict": "accept"
3
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Plan
3
+ owner: 019a0000-0000-7000-8000-000000000001
4
+ ---
5
+ Write the plan.
@@ -0,0 +1,5 @@
1
+ task:
2
+ properties:
3
+ title: { type: string, maxLength: 20 }
4
+ owner: { type: string, format: uuid }
5
+ required: [title, owner]
@@ -0,0 +1,11 @@
1
+ {
2
+ "binaryTargets": [],
3
+ "typedPaths": [
4
+ {
5
+ "path": "rooms/*/tasks/*.md",
6
+ "type": "task",
7
+ "named": false,
8
+ "body": true
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "rooms/team/tasks/plan.md",
4
+ "rule": "required-body"
5
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Plan
3
+ owner: 019a0000-0000-7000-8000-000000000001
4
+ ---
5
+
@@ -0,0 +1,5 @@
1
+ task:
2
+ properties:
3
+ title: { type: string, maxLength: 20 }
4
+ owner: { type: string, format: uuid }
5
+ required: [title, owner]