@anatomytool/validate 1.0.0
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/LICENSE +21 -0
- package/README.md +127 -0
- package/dist/canonical.d.ts +21 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +76 -0
- package/dist/canonical.js.map +1 -0
- package/dist/checks/commands-no-test-warn.d.ts +6 -0
- package/dist/checks/commands-no-test-warn.d.ts.map +1 -0
- package/dist/checks/commands-no-test-warn.js +35 -0
- package/dist/checks/commands-no-test-warn.js.map +1 -0
- package/dist/checks/description-warn.d.ts +6 -0
- package/dist/checks/description-warn.d.ts.map +1 -0
- package/dist/checks/description-warn.js +23 -0
- package/dist/checks/description-warn.js.map +1 -0
- package/dist/checks/entry-point-alias-warn.d.ts +6 -0
- package/dist/checks/entry-point-alias-warn.d.ts.map +1 -0
- package/dist/checks/entry-point-alias-warn.js +25 -0
- package/dist/checks/entry-point-alias-warn.js.map +1 -0
- package/dist/checks/fingerprint-check.d.ts +6 -0
- package/dist/checks/fingerprint-check.d.ts.map +1 -0
- package/dist/checks/fingerprint-check.js +59 -0
- package/dist/checks/fingerprint-check.js.map +1 -0
- package/dist/checks/hash-check.d.ts +6 -0
- package/dist/checks/hash-check.d.ts.map +1 -0
- package/dist/checks/hash-check.js +36 -0
- package/dist/checks/hash-check.js.map +1 -0
- package/dist/checks/interface-form-check.d.ts +6 -0
- package/dist/checks/interface-form-check.d.ts.map +1 -0
- package/dist/checks/interface-form-check.js +66 -0
- package/dist/checks/interface-form-check.js.map +1 -0
- package/dist/checks/memory-dangling-ref-check.d.ts +6 -0
- package/dist/checks/memory-dangling-ref-check.d.ts.map +1 -0
- package/dist/checks/memory-dangling-ref-check.js +34 -0
- package/dist/checks/memory-dangling-ref-check.js.map +1 -0
- package/dist/checks/memory-fingerprint-check.d.ts +6 -0
- package/dist/checks/memory-fingerprint-check.d.ts.map +1 -0
- package/dist/checks/memory-fingerprint-check.js +20 -0
- package/dist/checks/memory-fingerprint-check.js.map +1 -0
- package/dist/checks/memory-supersession-check.d.ts +6 -0
- package/dist/checks/memory-supersession-check.d.ts.map +1 -0
- package/dist/checks/memory-supersession-check.js +61 -0
- package/dist/checks/memory-supersession-check.js.map +1 -0
- package/dist/checks/memory-verification-check.d.ts +6 -0
- package/dist/checks/memory-verification-check.d.ts.map +1 -0
- package/dist/checks/memory-verification-check.js +61 -0
- package/dist/checks/memory-verification-check.js.map +1 -0
- package/dist/checks/nested-path-escape.d.ts +6 -0
- package/dist/checks/nested-path-escape.d.ts.map +1 -0
- package/dist/checks/nested-path-escape.js +76 -0
- package/dist/checks/nested-path-escape.js.map +1 -0
- package/dist/checks/schema-check.d.ts +6 -0
- package/dist/checks/schema-check.d.ts.map +1 -0
- package/dist/checks/schema-check.js +32 -0
- package/dist/checks/schema-check.js.map +1 -0
- package/dist/checks/source-cross-check.d.ts +52 -0
- package/dist/checks/source-cross-check.d.ts.map +1 -0
- package/dist/checks/source-cross-check.js +473 -0
- package/dist/checks/source-cross-check.js.map +1 -0
- package/dist/checks/source-path-check.d.ts +6 -0
- package/dist/checks/source-path-check.d.ts.map +1 -0
- package/dist/checks/source-path-check.js +62 -0
- package/dist/checks/source-path-check.js.map +1 -0
- package/dist/checks/structure-path-check.d.ts +6 -0
- package/dist/checks/structure-path-check.d.ts.map +1 -0
- package/dist/checks/structure-path-check.js +31 -0
- package/dist/checks/structure-path-check.js.map +1 -0
- package/dist/checks/verify/ast-grep-verifier.d.ts +4 -0
- package/dist/checks/verify/ast-grep-verifier.d.ts.map +1 -0
- package/dist/checks/verify/ast-grep-verifier.js +153 -0
- package/dist/checks/verify/ast-grep-verifier.js.map +1 -0
- package/dist/checks/verify/detect-ast-grep.d.ts +9 -0
- package/dist/checks/verify/detect-ast-grep.d.ts.map +1 -0
- package/dist/checks/verify/detect-ast-grep.js +26 -0
- package/dist/checks/verify/detect-ast-grep.js.map +1 -0
- package/dist/checks/verify/detect-semgrep.d.ts +8 -0
- package/dist/checks/verify/detect-semgrep.d.ts.map +1 -0
- package/dist/checks/verify/detect-semgrep.js +36 -0
- package/dist/checks/verify/detect-semgrep.js.map +1 -0
- package/dist/checks/verify/glob-verifier.d.ts +5 -0
- package/dist/checks/verify/glob-verifier.d.ts.map +1 -0
- package/dist/checks/verify/glob-verifier.js +58 -0
- package/dist/checks/verify/glob-verifier.js.map +1 -0
- package/dist/checks/verify/semgrep-pattern-verifier.d.ts +4 -0
- package/dist/checks/verify/semgrep-pattern-verifier.d.ts.map +1 -0
- package/dist/checks/verify/semgrep-pattern-verifier.js +121 -0
- package/dist/checks/verify/semgrep-pattern-verifier.js.map +1 -0
- package/dist/checks/verify/semgrep-rule-file-verifier.d.ts +9 -0
- package/dist/checks/verify/semgrep-rule-file-verifier.d.ts.map +1 -0
- package/dist/checks/verify/semgrep-rule-file-verifier.js +151 -0
- package/dist/checks/verify/semgrep-rule-file-verifier.js.map +1 -0
- package/dist/checks/verify/types.d.ts +44 -0
- package/dist/checks/verify/types.d.ts.map +1 -0
- package/dist/checks/verify/types.js +6 -0
- package/dist/checks/verify/types.js.map +1 -0
- package/dist/checks/verify-check.d.ts +9 -0
- package/dist/checks/verify-check.d.ts.map +1 -0
- package/dist/checks/verify-check.js +67 -0
- package/dist/checks/verify-check.js.map +1 -0
- package/dist/discovery.d.ts +13 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +82 -0
- package/dist/discovery.js.map +1 -0
- package/dist/errors.d.ts +38 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +5 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +81 -0
- package/dist/index.js.map +1 -0
- package/dist/memory.d.ts +19 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +80 -0
- package/dist/memory.js.map +1 -0
- package/dist/parse.d.ts +17 -0
- package/dist/parse.d.ts.map +1 -0
- package/dist/parse.js +47 -0
- package/dist/parse.js.map +1 -0
- package/dist/schema-0.10.json +194 -0
- package/dist/schema-0.11.json +203 -0
- package/dist/schema-0.12.json +243 -0
- package/dist/schema-0.13.json +267 -0
- package/dist/schema-0.14.json +288 -0
- package/dist/schema-0.15.json +347 -0
- package/dist/schema-0.2.json +283 -0
- package/dist/schema-0.4.json +280 -0
- package/dist/schema-0.5.json +300 -0
- package/dist/schema-0.6.json +328 -0
- package/dist/schema-0.7.json +311 -0
- package/dist/schema-0.8.json +245 -0
- package/dist/schema-0.9.json +172 -0
- package/dist/schema-1.0.json +347 -0
- package/dist/schema-memory-0.1.json +43 -0
- package/dist/schema-memory-0.2.json +49 -0
- package/dist/schema-memory.d.ts +5 -0
- package/dist/schema-memory.d.ts.map +1 -0
- package/dist/schema-memory.js +16 -0
- package/dist/schema-memory.js.map +1 -0
- package/dist/schema.d.ts +6 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +62 -0
- package/dist/schema.js.map +1 -0
- package/dist/schema.json +129 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.generated.d.ts +1103 -0
- package/dist/types.generated.d.ts.map +1 -0
- package/dist/types.generated.js +7 -0
- package/dist/types.generated.js.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/validate-tree.d.ts +20 -0
- package/dist/validate-tree.d.ts.map +1 -0
- package/dist/validate-tree.js +64 -0
- package/dist/validate-tree.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://anatomy.dev/spec/1.0/schema.json",
|
|
4
|
+
"title": "Anatomy",
|
|
5
|
+
"description": "Schema for .anatomy files (v1.0). Stabilization of the v0.15 format — structurally identical to v0.15; no field added, removed, renamed, or retyped. v0.15 files migrate to v1.0 with no data change. The 0->1 bump is a stability commitment, not a breaking change (see spec/CURRENT.md).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["anatomy_version", "tagline", "identity", "generated"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"anatomy_version": { "type": "string", "const": "1.0" },
|
|
11
|
+
"tagline": { "type": "string", "minLength": 1, "maxLength": 120, "pattern": "^[^\\n\\r]+$" },
|
|
12
|
+
"description": { "type": "string", "minLength": 1, "maxLength": 2000 },
|
|
13
|
+
"author": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[^\\n\\r]+$" },
|
|
14
|
+
"license": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[^\\n\\r]+$" },
|
|
15
|
+
"docs_url": { "type": "string", "format": "uri", "minLength": 1, "maxLength": 300, "pattern": "^[^\\n\\r]+$" },
|
|
16
|
+
"repository_url": { "type": "string", "format": "uri", "minLength": 1, "maxLength": 300, "pattern": "^[^\\n\\r]+$" },
|
|
17
|
+
"identity": { "$ref": "#/$defs/identity" },
|
|
18
|
+
"generated": { "$ref": "#/$defs/generated" },
|
|
19
|
+
"generate": { "$ref": "#/$defs/generate" },
|
|
20
|
+
"operation": { "$ref": "#/$defs/operation" },
|
|
21
|
+
"structure": { "$ref": "#/$defs/structure" },
|
|
22
|
+
"environment": { "$ref": "#/$defs/environment" },
|
|
23
|
+
"substance": { "$ref": "#/$defs/substance" },
|
|
24
|
+
"rules": {
|
|
25
|
+
"type": "array", "minItems": 1, "maxItems": 20,
|
|
26
|
+
"items": { "$ref": "#/$defs/rule" }
|
|
27
|
+
},
|
|
28
|
+
"flows": {
|
|
29
|
+
"type": "array", "minItems": 1, "maxItems": 15,
|
|
30
|
+
"items": { "$ref": "#/$defs/flow" }
|
|
31
|
+
},
|
|
32
|
+
"decisions": {
|
|
33
|
+
"type": "array", "minItems": 1, "maxItems": 15,
|
|
34
|
+
"items": { "$ref": "#/$defs/decision" }
|
|
35
|
+
},
|
|
36
|
+
"vocabulary": {
|
|
37
|
+
"type": "array", "minItems": 1, "maxItems": 30,
|
|
38
|
+
"items": { "$ref": "#/$defs/vocabulary_entry" }
|
|
39
|
+
},
|
|
40
|
+
"invariants": {
|
|
41
|
+
"type": "array", "minItems": 1, "maxItems": 15,
|
|
42
|
+
"items": { "$ref": "#/$defs/invariant_entry" }
|
|
43
|
+
},
|
|
44
|
+
"anti_patterns": {
|
|
45
|
+
"type": "array", "minItems": 1, "maxItems": 12,
|
|
46
|
+
"items": { "$ref": "#/$defs/anti_pattern_entry" }
|
|
47
|
+
},
|
|
48
|
+
"prerequisites": {
|
|
49
|
+
"type": "array", "minItems": 1, "maxItems": 10,
|
|
50
|
+
"items": { "$ref": "#/$defs/prerequisite_entry" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"$defs": {
|
|
54
|
+
"identity": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["stack", "form", "domain", "function", "fingerprint"],
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"properties": {
|
|
59
|
+
"stack": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 40 },
|
|
60
|
+
"form": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 40 },
|
|
61
|
+
"domain": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 40 },
|
|
62
|
+
"function": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 40 },
|
|
63
|
+
"fingerprint": { "type": "string", "pattern": "^[a-z0-9]{20}$" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"rule": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["rule"],
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"properties": {
|
|
71
|
+
"rule": { "type": "string", "minLength": 1, "maxLength": 300 },
|
|
72
|
+
"why": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
73
|
+
"verify": { "$ref": "#/$defs/verify" }
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"verify": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["kind"],
|
|
79
|
+
"oneOf": [
|
|
80
|
+
{
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"properties": {
|
|
83
|
+
"kind": { "const": "glob_exists" },
|
|
84
|
+
"path": { "type": "string", "minLength": 1, "description": "Glob (repo-root-relative). With should_not=false: ≥1 file must match. With should_not=true: 0 files must match." },
|
|
85
|
+
"should_not": { "type": "boolean", "description": "Invert: assert NO files match the glob. Default false." }
|
|
86
|
+
},
|
|
87
|
+
"required": ["kind", "path"]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"properties": {
|
|
92
|
+
"kind": { "const": "glob_only" },
|
|
93
|
+
"match": { "type": "string", "minLength": 1, "description": "Glob of files to locate." },
|
|
94
|
+
"container": { "type": "string", "minLength": 1, "description": "Glob; every file from `match` must also match this." }
|
|
95
|
+
},
|
|
96
|
+
"required": ["kind", "match", "container"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"properties": {
|
|
101
|
+
"kind": { "const": "ast_pattern" },
|
|
102
|
+
"lang": { "enum": ["ts", "tsx", "js", "jsx", "py", "rs", "go", "java"], "description": "Language for ast-grep parser." },
|
|
103
|
+
"pattern": { "type": "string", "minLength": 1, "description": "ast-grep pattern (inline string)." },
|
|
104
|
+
"expect_in": { "type": "string", "minLength": 1, "description": "Glob: pattern must match in ≥1 file." },
|
|
105
|
+
"forbid_in": { "type": "string", "minLength": 1, "description": "Glob: pattern must match in 0 files." }
|
|
106
|
+
},
|
|
107
|
+
"required": ["kind", "lang", "pattern"],
|
|
108
|
+
"oneOf": [
|
|
109
|
+
{ "required": ["expect_in"], "not": { "required": ["forbid_in"] } },
|
|
110
|
+
{ "required": ["forbid_in"], "not": { "required": ["expect_in"] } }
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"properties": {
|
|
116
|
+
"kind": { "const": "semgrep" },
|
|
117
|
+
"lang": { "enum": ["py", "go", "java", "rb", "c", "cpp", "rs", "ts", "tsx", "js", "jsx"], "description": "Language for Semgrep parser. Required when using inline pattern; absent for rule_file (the YAML declares its own languages)." },
|
|
118
|
+
"pattern": { "type": "string", "minLength": 1, "description": "Inline Semgrep pattern. Mutually exclusive with rule_file." },
|
|
119
|
+
"rule_file": { "type": "string", "minLength": 1, "pattern": "\\.ya?ml$", "description": "Repo-root-relative path to a Semgrep YAML rule file. Mutually exclusive with pattern + lang. Path must resolve inside the repo." },
|
|
120
|
+
"expect_in": { "type": "string", "minLength": 1, "description": "Glob: pattern must match in >=1 file." },
|
|
121
|
+
"forbid_in": { "type": "string", "minLength": 1, "description": "Glob: pattern must match in 0 files." }
|
|
122
|
+
},
|
|
123
|
+
"required": ["kind"],
|
|
124
|
+
"oneOf": [
|
|
125
|
+
{ "required": ["pattern", "lang"], "not": { "anyOf": [{ "required": ["rule_file"] }] } },
|
|
126
|
+
{ "required": ["rule_file"], "not": { "anyOf": [{ "required": ["pattern"] }, { "required": ["lang"] }] } }
|
|
127
|
+
],
|
|
128
|
+
"allOf": [
|
|
129
|
+
{
|
|
130
|
+
"oneOf": [
|
|
131
|
+
{ "required": ["expect_in"], "not": { "required": ["forbid_in"] } },
|
|
132
|
+
{ "required": ["forbid_in"], "not": { "required": ["expect_in"] } }
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"flow": {
|
|
140
|
+
"type": "object",
|
|
141
|
+
"required": ["name", "summary"],
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"properties": {
|
|
144
|
+
"name": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 40 },
|
|
145
|
+
"summary": { "type": "string", "minLength": 1, "maxLength": 300, "pattern": "^[^\\n\\r]+$" }
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"decision": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"required": ["topic", "reason"],
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"properties": {
|
|
153
|
+
"topic": { "type": "string", "minLength": 1, "maxLength": 120, "pattern": "^[^\\n\\r]+$" },
|
|
154
|
+
"reason": { "type": "string", "minLength": 1, "maxLength": 400 }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"generated": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"required": ["at", "by", "model", "schema"],
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"properties": {
|
|
162
|
+
"at": { "type": "string", "format": "date-time" },
|
|
163
|
+
"commit": { "type": "string", "pattern": "^[0-9a-f]{7,12}$" },
|
|
164
|
+
"by": { "type": "string", "minLength": 1 },
|
|
165
|
+
"model": { "type": "string", "minLength": 1 },
|
|
166
|
+
"schema": { "type": "string", "format": "uri" }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"generate": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"description": "Per-repo render preferences. All fields optional with defaults. Holds human choice (uncapturable), not derivable content. v0.11 added per-tool emit flags (Cursor/Aider/Cline/Roo/Continue/Windsurf) plus a shared render_budget and render_memory_count for the new renderers.",
|
|
173
|
+
"properties": {
|
|
174
|
+
"agents_md": {
|
|
175
|
+
"type": "boolean",
|
|
176
|
+
"description": "Emit AGENTS.md on `anatomy render` (default true)."
|
|
177
|
+
},
|
|
178
|
+
"agents_md_budget": {
|
|
179
|
+
"type": "integer",
|
|
180
|
+
"minimum": 500,
|
|
181
|
+
"description": "Token cap for the emitted AGENTS.md (default 1500)."
|
|
182
|
+
},
|
|
183
|
+
"agents_md_memory_count": {
|
|
184
|
+
"type": "integer",
|
|
185
|
+
"minimum": 0,
|
|
186
|
+
"description": "Max recent-memory entries surfaced in AGENTS.md (default 10)."
|
|
187
|
+
},
|
|
188
|
+
"cursor_mdc": { "type": "boolean", "description": "Emit .cursor/rules/anatomy.mdc (default false)." },
|
|
189
|
+
"cursor_rules": { "type": "boolean", "description": "Emit .cursorrules (default false)." },
|
|
190
|
+
"aider_conventions": { "type": "boolean", "description": "Emit CONVENTIONS.md (default false)." },
|
|
191
|
+
"cline_rules": { "type": "boolean", "description": "Emit .clinerules (default false)." },
|
|
192
|
+
"roo_rules": { "type": "boolean", "description": "Emit .roorules (default false)." },
|
|
193
|
+
"continue_rules": { "type": "boolean", "description": "Emit .continuerules (default false)." },
|
|
194
|
+
"windsurf_rules": { "type": "boolean", "description": "Emit .windsurfrules (default false)." },
|
|
195
|
+
"render_budget": { "type": "integer", "minimum": 500, "description": "Token cap for all v0.11 renderers (default 1500)." },
|
|
196
|
+
"render_memory_count": { "type": "integer", "minimum": 0, "description": "Max memory entries for v0.11 renderers (default 10)." }
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"operation": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"additionalProperties": false,
|
|
202
|
+
"properties": {
|
|
203
|
+
"entry_points": {
|
|
204
|
+
"type": "array", "maxItems": 10,
|
|
205
|
+
"items": { "$ref": "#/$defs/entry_point" }
|
|
206
|
+
},
|
|
207
|
+
"commands": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"propertyNames": { "pattern": "^[a-z0-9]+(-[a-z0-9]+)*(\\.[a-z0-9]+(-[a-z0-9]+)*)?$" },
|
|
210
|
+
"additionalProperties": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
211
|
+
"maxProperties": 25
|
|
212
|
+
},
|
|
213
|
+
"conventions": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"propertyNames": { "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
216
|
+
"additionalProperties": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
217
|
+
"maxProperties": 15
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"entry_point": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"required": ["path", "role"],
|
|
224
|
+
"additionalProperties": false,
|
|
225
|
+
"not": { "required": ["description", "purpose"] },
|
|
226
|
+
"properties": {
|
|
227
|
+
"path": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
228
|
+
"role": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
229
|
+
"purpose": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[^\\n\\r]+$" },
|
|
230
|
+
"description": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[^\\n\\r]+$" }
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"structure": {
|
|
234
|
+
"type": "object", "additionalProperties": false, "required": ["entries"],
|
|
235
|
+
"properties": {
|
|
236
|
+
"entries": {
|
|
237
|
+
"type": "array", "minItems": 1, "maxItems": 25,
|
|
238
|
+
"items": {
|
|
239
|
+
"type": "object", "required": ["path", "purpose", "kind"], "additionalProperties": false,
|
|
240
|
+
"properties": {
|
|
241
|
+
"path": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
242
|
+
"purpose": { "type": "string", "minLength": 1, "maxLength": 120, "pattern": "^[^\\n\\r]+$" },
|
|
243
|
+
"kind": { "enum": ["source", "tests", "docs", "config", "build", "scripts", "examples", "generated", "other"] },
|
|
244
|
+
"convention": { "type": "string", "minLength": 1, "maxLength": 200, "pattern": "^[^\\n\\r]+$" }
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"environment": {
|
|
251
|
+
"type": "object", "additionalProperties": false,
|
|
252
|
+
"anyOf": [
|
|
253
|
+
{ "required": ["language_version"] }, { "required": ["runtime"] },
|
|
254
|
+
{ "required": ["os"] }, { "required": ["required_services"] }, { "required": ["required_env"] }
|
|
255
|
+
],
|
|
256
|
+
"properties": {
|
|
257
|
+
"language_version": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
258
|
+
"runtime": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$", "maxLength": 40 },
|
|
259
|
+
"os": {
|
|
260
|
+
"oneOf": [
|
|
261
|
+
{ "type": "array", "items": { "const": "any" }, "minItems": 1, "maxItems": 1 },
|
|
262
|
+
{ "type": "array", "minItems": 1, "maxItems": 5, "uniqueItems": true, "items": { "enum": ["linux", "macos", "windows", "freebsd"] } }
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
"required_services": {
|
|
266
|
+
"type": "array", "minItems": 1, "maxItems": 10,
|
|
267
|
+
"items": {
|
|
268
|
+
"type": "object", "required": ["name", "why"], "additionalProperties": false,
|
|
269
|
+
"properties": {
|
|
270
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
271
|
+
"why": { "type": "string", "minLength": 1, "maxLength": 80 }
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"required_env": {
|
|
276
|
+
"type": "array", "minItems": 1, "maxItems": 25,
|
|
277
|
+
"items": {
|
|
278
|
+
"type": "object", "required": ["name", "why"], "additionalProperties": false,
|
|
279
|
+
"properties": {
|
|
280
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
281
|
+
"why": { "type": "string", "minLength": 1, "maxLength": 80 }
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"substance": {
|
|
288
|
+
"type": "object", "additionalProperties": false,
|
|
289
|
+
"properties": {
|
|
290
|
+
"key_dependencies": {
|
|
291
|
+
"type": "array", "minItems": 1, "maxItems": 10,
|
|
292
|
+
"items": {
|
|
293
|
+
"type": "object", "required": ["name", "why"], "additionalProperties": false,
|
|
294
|
+
"properties": {
|
|
295
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[^\\n\\r]+$" },
|
|
296
|
+
"version": { "type": "string", "minLength": 1, "maxLength": 50, "pattern": "^[^\\n\\r]+$" },
|
|
297
|
+
"why": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[^\\n\\r]+$" }
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"vocabulary_entry": {
|
|
304
|
+
"type": "object",
|
|
305
|
+
"required": ["term", "meaning"],
|
|
306
|
+
"additionalProperties": false,
|
|
307
|
+
"properties": {
|
|
308
|
+
"term": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[^\\n\\r]+$" },
|
|
309
|
+
"meaning": { "type": "string", "minLength": 1, "maxLength": 300 },
|
|
310
|
+
"aliases": { "type": "array", "maxItems": 5, "items": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[^\\n\\r]+$" } },
|
|
311
|
+
"contrast": { "type": "array", "maxItems": 3, "items": { "type": "string", "minLength": 1, "maxLength": 120, "pattern": "^[^\\n\\r]+$" } }
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"invariant_entry": {
|
|
315
|
+
"type": "object",
|
|
316
|
+
"required": ["invariant"],
|
|
317
|
+
"additionalProperties": false,
|
|
318
|
+
"properties": {
|
|
319
|
+
"invariant": { "type": "string", "minLength": 1, "maxLength": 300 },
|
|
320
|
+
"triggered_by": { "type": "array", "maxItems": 5, "items": { "type": "string", "minLength": 1, "maxLength": 200 } },
|
|
321
|
+
"affected_paths": { "type": "array", "maxItems": 5, "items": { "type": "string", "minLength": 1, "maxLength": 200 } },
|
|
322
|
+
"why": { "type": "string", "minLength": 1, "maxLength": 200 }
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"anti_pattern_entry": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"required": ["pattern", "reason"],
|
|
328
|
+
"additionalProperties": false,
|
|
329
|
+
"properties": {
|
|
330
|
+
"pattern": { "type": "string", "minLength": 1, "maxLength": 300 },
|
|
331
|
+
"instead": { "type": "string", "minLength": 1, "maxLength": 300 },
|
|
332
|
+
"reason": { "type": "string", "minLength": 1, "maxLength": 400 },
|
|
333
|
+
"keywords": { "type": "array", "maxItems": 5, "items": { "type": "string", "minLength": 1, "maxLength": 60, "pattern": "^[^\\n\\r]+$" } }
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"prerequisite_entry": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"required": ["topic", "why"],
|
|
339
|
+
"additionalProperties": false,
|
|
340
|
+
"properties": {
|
|
341
|
+
"topic": { "type": "string", "minLength": 1, "maxLength": 120, "pattern": "^[^\\n\\r]+$" },
|
|
342
|
+
"why": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
343
|
+
"link": { "type": "string", "format": "uri", "minLength": 1, "maxLength": 300 }
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://anatomy.dev/spec/memory/0.1/schema.json",
|
|
4
|
+
"title": "Anatomy Memory",
|
|
5
|
+
"description": "Append-only lived-experience memory paired with an .anatomy file.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["anatomy_memory_version", "repo_fingerprint"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"anatomy_memory_version": { "type": "string", "const": "0.1" },
|
|
11
|
+
"repo_fingerprint": { "type": "string", "pattern": "^[a-z0-9]{20}$" },
|
|
12
|
+
"entries": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "$ref": "#/$defs/entry" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"$defs": {
|
|
18
|
+
"entry": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["id", "kind", "topic", "content", "at", "by"],
|
|
21
|
+
"additionalProperties": true,
|
|
22
|
+
"properties": {
|
|
23
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]{8}$" },
|
|
24
|
+
"kind": { "enum": ["gotcha", "decision", "convention", "attempt", "milestone"] },
|
|
25
|
+
"topic": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[^\\n\\r]+$" },
|
|
26
|
+
"content": { "type": "string", "minLength": 1, "maxLength": 1000 },
|
|
27
|
+
"at": { "type": "string", "format": "date-time" },
|
|
28
|
+
"by": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^(claude-session(:[a-z0-9-]+)?|human:[a-z0-9._-]+|unknown)$" },
|
|
29
|
+
"refs": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 256 } },
|
|
30
|
+
"tags": { "type": "array", "maxItems": 5, "items": { "type": "string", "minLength": 1, "maxLength": 40, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" } },
|
|
31
|
+
"superseded_by": { "type": "string", "pattern": "^[a-z0-9]{8}$" },
|
|
32
|
+
"deprecated_at": { "type": "string", "format": "date-time" },
|
|
33
|
+
"deprecated_reason": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
34
|
+
"helped_count": { "type": "integer", "minimum": 0 },
|
|
35
|
+
"helped_by": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"maxItems": 200,
|
|
38
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^(claude-session(:[a-z0-9-]+)?|human:[a-z0-9._-]+|@[a-z0-9._-]+)$" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://anatomy.dev/spec/memory/0.2/schema.json",
|
|
4
|
+
"title": "Anatomy Memory",
|
|
5
|
+
"description": "Append-only lived-experience memory paired with an .anatomy file (v0.2). Adds optional last_verified_at + verified_by entry fields for decay-tracking. v0.1 entries (which lack these fields) remain valid — a v0.2 consumer treats absence as 'untouched' and falls back to the entry's `at` timestamp as proxy for last verification.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["anatomy_memory_version", "repo_fingerprint"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"anatomy_memory_version": { "type": "string", "const": "0.2" },
|
|
11
|
+
"repo_fingerprint": { "type": "string", "pattern": "^[a-z0-9]{20}$" },
|
|
12
|
+
"entries": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": { "$ref": "#/$defs/entry" }
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"$defs": {
|
|
18
|
+
"entry": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["id", "kind", "topic", "content", "at", "by"],
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]{8}$" },
|
|
24
|
+
"kind": { "enum": ["gotcha", "decision", "convention", "attempt", "milestone"] },
|
|
25
|
+
"topic": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[^\\n\\r]+$" },
|
|
26
|
+
"content": { "type": "string", "minLength": 1, "maxLength": 1000 },
|
|
27
|
+
"at": { "type": "string", "format": "date-time" },
|
|
28
|
+
"by": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^(claude-session(:[a-z0-9-]+)?|human:[a-z0-9._-]+|unknown)$" },
|
|
29
|
+
"refs": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1, "maxLength": 256 } },
|
|
30
|
+
"tags": { "type": "array", "maxItems": 5, "items": { "type": "string", "minLength": 1, "maxLength": 40, "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" } },
|
|
31
|
+
"superseded_by": { "type": "string", "pattern": "^[a-z0-9]{8}$" },
|
|
32
|
+
"deprecated_at": { "type": "string", "format": "date-time" },
|
|
33
|
+
"deprecated_reason": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
34
|
+
"helped_count": { "type": "integer", "minimum": 0 },
|
|
35
|
+
"helped_by": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"maxItems": 200,
|
|
38
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^(claude-session(:[a-z0-9-]+)?|human:[a-z0-9._-]+|@[a-z0-9._-]+)$" }
|
|
39
|
+
},
|
|
40
|
+
"last_verified_at": { "type": "string", "format": "date-time" },
|
|
41
|
+
"verified_by": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"maxItems": 5,
|
|
44
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^(claude-session(:[a-z0-9-]+)?|human:[a-z0-9._-]+|@[a-z0-9._-]+)$" }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ValidateFunction } from "ajv/dist/2020.js";
|
|
2
|
+
export declare const supportedMemoryVersions: readonly ["0.1", "0.2"];
|
|
3
|
+
export type SupportedMemoryVersion = (typeof supportedMemoryVersions)[number];
|
|
4
|
+
export declare const compiledMemorySchemas: Map<string, ValidateFunction>;
|
|
5
|
+
//# sourceMappingURL=schema-memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-memory.d.ts","sourceRoot":"","sources":["../src/schema-memory.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AASzD,eAAO,MAAM,uBAAuB,yBAA0B,CAAC;AAC/D,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,eAAO,MAAM,qBAAqB,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAG9D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/schema-memory.ts
|
|
2
|
+
// AJV registration for the memory schema track. Separate from schema.ts so
|
|
3
|
+
// memory schema bumps don't churn the main .anatomy schema track.
|
|
4
|
+
import { Ajv2020 } from "ajv/dist/2020.js";
|
|
5
|
+
import addFormatsImport from "ajv-formats";
|
|
6
|
+
import schema_memory_0_1 from "./schema-memory-0.1.json" with { type: "json" };
|
|
7
|
+
import schema_memory_0_2 from "./schema-memory-0.2.json" with { type: "json" };
|
|
8
|
+
const addFormats = addFormatsImport;
|
|
9
|
+
const ajv = new Ajv2020({ strict: false, allErrors: true });
|
|
10
|
+
addFormats(ajv);
|
|
11
|
+
export const supportedMemoryVersions = ["0.1", "0.2"];
|
|
12
|
+
export const compiledMemorySchemas = new Map([
|
|
13
|
+
["0.1", ajv.compile(schema_memory_0_1)],
|
|
14
|
+
["0.2", ajv.compile(schema_memory_0_2)],
|
|
15
|
+
]);
|
|
16
|
+
//# sourceMappingURL=schema-memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-memory.js","sourceRoot":"","sources":["../src/schema-memory.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,2EAA2E;AAC3E,kEAAkE;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,gBAAgB,MAAM,aAAa,CAAC;AAC3C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/E,OAAO,iBAAiB,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE/E,MAAM,UAAU,GAAG,gBAAwD,CAAC;AAC5E,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5D,UAAU,CAAC,GAAG,CAAC,CAAC;AAEhB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAC;AAG/D,MAAM,CAAC,MAAM,qBAAqB,GAAkC,IAAI,GAAG,CAAC;IAC1E,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACxC,CAAC,CAAC"}
|
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ValidateFunction, ErrorObject } from "ajv/dist/2020.js";
|
|
2
|
+
export declare const supportedVersions: readonly ["0.1", "0.2", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "0.10", "0.11", "0.12", "0.13", "0.14", "0.15", "1.0"];
|
|
3
|
+
export type SupportedVersion = (typeof supportedVersions)[number];
|
|
4
|
+
export declare const compiledSchemas: Map<string, ValidateFunction>;
|
|
5
|
+
export type AjvError = ErrorObject;
|
|
6
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA0BtE,eAAO,MAAM,iBAAiB,0HAA2H,CAAC;AAC1J,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAgBxD,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC"}
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// src/schema.ts
|
|
2
|
+
// AJV configured for the Anatomy schema. strict:false rather than strict:true
|
|
3
|
+
// because the schema uses patterns AJV strict mode flags as false positives:
|
|
4
|
+
// - propertyNames.pattern + additionalProperties:<subschema> in [operation.commands]
|
|
5
|
+
// and [operation.conventions] (AJV can't statically prove key/value coverage)
|
|
6
|
+
// - anyOf/oneOf required clauses in [environment]/[interface] that reference
|
|
7
|
+
// properties defined on the parent schema (AJV's strictRequired flags these)
|
|
8
|
+
// strict:"log" would route these known-false-positive warnings to console.warn on
|
|
9
|
+
// every process startup; strict:false suppresses them without affecting validation.
|
|
10
|
+
//
|
|
11
|
+
// Schemas live at src/schema.json (v0.1), src/schema-0.2.json (v0.2),
|
|
12
|
+
// src/schema-0.4.json (v0.4), src/schema-0.5.json (v0.5), src/schema-0.6.json (v0.6),
|
|
13
|
+
// src/schema-0.7.json (v0.7), src/schema-0.8.json (v0.8), src/schema-0.9.json (v0.9),
|
|
14
|
+
// src/schema-0.10.json (v0.10), src/schema-0.11.json (v0.11),
|
|
15
|
+
// src/schema-0.12.json (v0.12), src/schema-0.13.json (v0.13),
|
|
16
|
+
// src/schema-0.14.json (v0.14), src/schema-0.15.json (v0.15), and
|
|
17
|
+
// src/schema-1.0.json (v1.0) — all
|
|
18
|
+
// gitignored except the v0.1 default, copied from the spec source by
|
|
19
|
+
// scripts/prebuild.mjs at build/test time.
|
|
20
|
+
// validate() routes by the parsed doc's anatomy_version.
|
|
21
|
+
import { Ajv2020 } from "ajv/dist/2020.js";
|
|
22
|
+
import addFormatsImport from "ajv-formats";
|
|
23
|
+
import schema_0_1 from "./schema.json" with { type: "json" };
|
|
24
|
+
import schema_0_2 from "./schema-0.2.json" with { type: "json" };
|
|
25
|
+
import schema_0_4 from "./schema-0.4.json" with { type: "json" };
|
|
26
|
+
import schema_0_5 from "./schema-0.5.json" with { type: "json" };
|
|
27
|
+
import schema_0_6 from "./schema-0.6.json" with { type: "json" };
|
|
28
|
+
import schema_0_7 from "./schema-0.7.json" with { type: "json" };
|
|
29
|
+
import schema_0_8 from "./schema-0.8.json" with { type: "json" };
|
|
30
|
+
import schema_0_9 from "./schema-0.9.json" with { type: "json" };
|
|
31
|
+
import schema_0_10 from "./schema-0.10.json" with { type: "json" };
|
|
32
|
+
import schema_0_11 from "./schema-0.11.json" with { type: "json" };
|
|
33
|
+
import schema_0_12 from "./schema-0.12.json" with { type: "json" };
|
|
34
|
+
import schema_0_13 from "./schema-0.13.json" with { type: "json" };
|
|
35
|
+
import schema_0_14 from "./schema-0.14.json" with { type: "json" };
|
|
36
|
+
import schema_0_15 from "./schema-0.15.json" with { type: "json" };
|
|
37
|
+
import schema_1_0 from "./schema-1.0.json" with { type: "json" };
|
|
38
|
+
// ajv-formats default-exports a callable plugin; TypeScript under NodeNext
|
|
39
|
+
// types CJS default imports as the module namespace, so we cast at the
|
|
40
|
+
// boundary. Runtime value IS the function.
|
|
41
|
+
const addFormats = addFormatsImport;
|
|
42
|
+
const ajv = new Ajv2020({ strict: false, allErrors: true });
|
|
43
|
+
addFormats(ajv);
|
|
44
|
+
export const supportedVersions = ["0.1", "0.2", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "0.10", "0.11", "0.12", "0.13", "0.14", "0.15", "1.0"];
|
|
45
|
+
export const compiledSchemas = new Map([
|
|
46
|
+
["0.1", ajv.compile(schema_0_1)],
|
|
47
|
+
["0.2", ajv.compile(schema_0_2)],
|
|
48
|
+
["0.4", ajv.compile(schema_0_4)],
|
|
49
|
+
["0.5", ajv.compile(schema_0_5)],
|
|
50
|
+
["0.6", ajv.compile(schema_0_6)],
|
|
51
|
+
["0.7", ajv.compile(schema_0_7)],
|
|
52
|
+
["0.8", ajv.compile(schema_0_8)],
|
|
53
|
+
["0.9", ajv.compile(schema_0_9)],
|
|
54
|
+
["0.10", ajv.compile(schema_0_10)],
|
|
55
|
+
["0.11", ajv.compile(schema_0_11)],
|
|
56
|
+
["0.12", ajv.compile(schema_0_12)],
|
|
57
|
+
["0.13", ajv.compile(schema_0_13)],
|
|
58
|
+
["0.14", ajv.compile(schema_0_14)],
|
|
59
|
+
["0.15", ajv.compile(schema_0_15)],
|
|
60
|
+
["1.0", ajv.compile(schema_1_0)],
|
|
61
|
+
]);
|
|
62
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"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"}
|