mustflow 2.75.1 → 2.84.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/README.md +31 -3
- package/dist/cli/commands/docs.js +86 -2
- package/dist/cli/commands/script-pack.js +5 -0
- package/dist/cli/i18n/en.js +101 -2
- package/dist/cli/i18n/es.js +101 -2
- package/dist/cli/i18n/fr.js +101 -2
- package/dist/cli/i18n/hi.js +101 -2
- package/dist/cli/i18n/ko.js +101 -2
- package/dist/cli/i18n/zh.js +101 -2
- package/dist/cli/lib/script-pack-registry.js +162 -7
- package/dist/cli/script-packs/code-export-diff.js +160 -0
- package/dist/cli/script-packs/code-outline.js +33 -5
- package/dist/cli/script-packs/code-route-outline.js +155 -0
- package/dist/cli/script-packs/docs-reference-drift.js +150 -0
- package/dist/cli/script-packs/repo-config-chain.js +163 -0
- package/dist/cli/script-packs/repo-related-files.js +161 -0
- package/dist/core/code-outline.js +527 -80
- package/dist/core/config-chain.js +595 -0
- package/dist/core/export-diff.js +359 -0
- package/dist/core/public-json-contracts.js +75 -0
- package/dist/core/reference-drift.js +388 -0
- package/dist/core/related-files.js +493 -0
- package/dist/core/route-outline.js +912 -0
- package/dist/core/script-pack-suggestions.js +111 -5
- package/dist/core/source-anchors.js +13 -1
- package/package.json +1 -1
- package/schemas/README.md +28 -5
- package/schemas/code-outline-report.schema.json +47 -1
- package/schemas/code-symbol-read-report.schema.json +64 -4
- package/schemas/config-chain-report.schema.json +187 -0
- package/schemas/export-diff-report.schema.json +220 -0
- package/schemas/reference-drift-report.schema.json +166 -0
- package/schemas/related-files-report.schema.json +145 -0
- package/schemas/route-outline-report.schema.json +200 -0
- package/templates/default/common/.mustflow/config/commands.toml +21 -0
- package/templates/default/i18n.toml +7 -1
- package/templates/default/locales/en/.mustflow/docs/agent-workflow.md +1 -1
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +2 -1
- package/templates/default/locales/en/.mustflow/skills/cross-agent-session-reference/SKILL.md +131 -0
- package/templates/default/locales/en/.mustflow/skills/routes.toml +6 -0
- package/templates/default/manifest.toml +8 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mustflow.github.io/schemas/export-diff-report.schema.json",
|
|
4
|
+
"title": "mustflow export-diff report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"command",
|
|
10
|
+
"pack_id",
|
|
11
|
+
"script_id",
|
|
12
|
+
"script_ref",
|
|
13
|
+
"action",
|
|
14
|
+
"status",
|
|
15
|
+
"ok",
|
|
16
|
+
"mustflow_root",
|
|
17
|
+
"policy",
|
|
18
|
+
"input_hash",
|
|
19
|
+
"package_surface",
|
|
20
|
+
"files",
|
|
21
|
+
"exports",
|
|
22
|
+
"summary",
|
|
23
|
+
"findings",
|
|
24
|
+
"issues"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"schema_version": { "const": "1" },
|
|
28
|
+
"command": { "const": "script-pack" },
|
|
29
|
+
"pack_id": { "const": "code" },
|
|
30
|
+
"script_id": { "const": "export-diff" },
|
|
31
|
+
"script_ref": { "const": "code/export-diff" },
|
|
32
|
+
"action": { "const": "compare" },
|
|
33
|
+
"status": { "enum": ["passed", "failed", "error"] },
|
|
34
|
+
"ok": { "type": "boolean" },
|
|
35
|
+
"mustflow_root": { "type": "string" },
|
|
36
|
+
"policy": { "$ref": "#/$defs/policy" },
|
|
37
|
+
"input_hash": { "$ref": "#/$defs/sha256" },
|
|
38
|
+
"package_surface": { "$ref": "#/$defs/packageSurface" },
|
|
39
|
+
"files": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": { "$ref": "#/$defs/file" }
|
|
42
|
+
},
|
|
43
|
+
"exports": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "$ref": "#/$defs/exportEntry" }
|
|
46
|
+
},
|
|
47
|
+
"summary": { "$ref": "#/$defs/summary" },
|
|
48
|
+
"findings": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": { "$ref": "#/$defs/finding" }
|
|
51
|
+
},
|
|
52
|
+
"issues": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": { "type": "string" }
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"$defs": {
|
|
58
|
+
"sha256": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
61
|
+
},
|
|
62
|
+
"sha256Nullable": {
|
|
63
|
+
"anyOf": [
|
|
64
|
+
{ "$ref": "#/$defs/sha256" },
|
|
65
|
+
{ "type": "null" }
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"language": {
|
|
69
|
+
"enum": ["typescript", "tsx", "javascript", "jsx", "javascript-module", "javascript-commonjs", "astro", "svelte", "go", "rust", "python"]
|
|
70
|
+
},
|
|
71
|
+
"symbolKind": {
|
|
72
|
+
"enum": ["function", "class", "interface", "type", "enum", "variable"]
|
|
73
|
+
},
|
|
74
|
+
"returnBehavior": {
|
|
75
|
+
"enum": ["value", "void", "implicit_undefined", "mixed", "throws_only", "unknown"]
|
|
76
|
+
},
|
|
77
|
+
"stringArray": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"items": { "type": "string" }
|
|
80
|
+
},
|
|
81
|
+
"policy": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": [
|
|
85
|
+
"base_ref",
|
|
86
|
+
"head_ref",
|
|
87
|
+
"compare_worktree",
|
|
88
|
+
"max_files",
|
|
89
|
+
"max_file_bytes",
|
|
90
|
+
"extensions",
|
|
91
|
+
"ignored_directories",
|
|
92
|
+
"path_filters"
|
|
93
|
+
],
|
|
94
|
+
"properties": {
|
|
95
|
+
"base_ref": { "type": "string" },
|
|
96
|
+
"head_ref": { "type": ["string", "null"] },
|
|
97
|
+
"compare_worktree": { "type": "boolean" },
|
|
98
|
+
"max_files": { "type": "integer", "minimum": 1 },
|
|
99
|
+
"max_file_bytes": { "type": "integer", "minimum": 1 },
|
|
100
|
+
"extensions": { "$ref": "#/$defs/stringArray" },
|
|
101
|
+
"ignored_directories": { "$ref": "#/$defs/stringArray" },
|
|
102
|
+
"path_filters": { "$ref": "#/$defs/stringArray" }
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"packageSurface": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"required": ["package_json_present", "type", "exports", "bin", "types"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"package_json_present": { "type": "boolean" },
|
|
111
|
+
"type": { "type": ["string", "null"] },
|
|
112
|
+
"exports": { "$ref": "#/$defs/stringArray" },
|
|
113
|
+
"bin": { "$ref": "#/$defs/stringArray" },
|
|
114
|
+
"types": { "type": ["string", "null"] }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"file": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"required": [
|
|
121
|
+
"kind",
|
|
122
|
+
"path",
|
|
123
|
+
"language",
|
|
124
|
+
"base_sha256",
|
|
125
|
+
"head_sha256",
|
|
126
|
+
"base_exists",
|
|
127
|
+
"head_exists",
|
|
128
|
+
"exported_count_before",
|
|
129
|
+
"exported_count_after"
|
|
130
|
+
],
|
|
131
|
+
"properties": {
|
|
132
|
+
"kind": { "const": "source_file" },
|
|
133
|
+
"path": { "type": "string" },
|
|
134
|
+
"language": { "$ref": "#/$defs/language" },
|
|
135
|
+
"base_sha256": { "$ref": "#/$defs/sha256Nullable" },
|
|
136
|
+
"head_sha256": { "$ref": "#/$defs/sha256Nullable" },
|
|
137
|
+
"base_exists": { "type": "boolean" },
|
|
138
|
+
"head_exists": { "type": "boolean" },
|
|
139
|
+
"exported_count_before": { "type": "integer", "minimum": 0 },
|
|
140
|
+
"exported_count_after": { "type": "integer", "minimum": 0 }
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"symbolSnapshot": {
|
|
144
|
+
"type": ["object", "null"],
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"required": [
|
|
147
|
+
"path",
|
|
148
|
+
"name",
|
|
149
|
+
"kind",
|
|
150
|
+
"language",
|
|
151
|
+
"signature",
|
|
152
|
+
"return_type",
|
|
153
|
+
"return_behavior",
|
|
154
|
+
"async",
|
|
155
|
+
"line"
|
|
156
|
+
],
|
|
157
|
+
"properties": {
|
|
158
|
+
"path": { "type": "string" },
|
|
159
|
+
"name": { "type": "string" },
|
|
160
|
+
"kind": { "$ref": "#/$defs/symbolKind" },
|
|
161
|
+
"language": { "$ref": "#/$defs/language" },
|
|
162
|
+
"signature": { "type": "string" },
|
|
163
|
+
"return_type": { "type": ["string", "null"] },
|
|
164
|
+
"return_behavior": { "$ref": "#/$defs/returnBehavior" },
|
|
165
|
+
"async": { "type": "boolean" },
|
|
166
|
+
"line": { "type": "integer", "minimum": 1 }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"exportEntry": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"required": ["id", "path", "name", "kind", "change", "before", "after", "compatibility"],
|
|
173
|
+
"properties": {
|
|
174
|
+
"id": { "type": "string" },
|
|
175
|
+
"path": { "type": "string" },
|
|
176
|
+
"name": { "type": "string" },
|
|
177
|
+
"kind": { "$ref": "#/$defs/symbolKind" },
|
|
178
|
+
"change": { "enum": ["added", "removed", "changed", "unchanged"] },
|
|
179
|
+
"before": { "$ref": "#/$defs/symbolSnapshot" },
|
|
180
|
+
"after": { "$ref": "#/$defs/symbolSnapshot" },
|
|
181
|
+
"compatibility": {
|
|
182
|
+
"enum": ["additive", "removed_export", "signature_changed", "return_changed", "unchanged", "unknown"]
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"summary": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"additionalProperties": false,
|
|
189
|
+
"required": ["files_changed", "added", "removed", "changed", "unchanged"],
|
|
190
|
+
"properties": {
|
|
191
|
+
"files_changed": { "type": "integer", "minimum": 0 },
|
|
192
|
+
"added": { "type": "integer", "minimum": 0 },
|
|
193
|
+
"removed": { "type": "integer", "minimum": 0 },
|
|
194
|
+
"changed": { "type": "integer", "minimum": 0 },
|
|
195
|
+
"unchanged": { "type": "integer", "minimum": 0 }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"finding": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"required": ["code", "severity", "message", "path"],
|
|
202
|
+
"properties": {
|
|
203
|
+
"code": {
|
|
204
|
+
"enum": [
|
|
205
|
+
"export_diff_git_unavailable",
|
|
206
|
+
"export_diff_invalid_ref",
|
|
207
|
+
"export_diff_unreadable_path",
|
|
208
|
+
"export_diff_file_too_large",
|
|
209
|
+
"export_diff_max_files_exceeded",
|
|
210
|
+
"export_diff_duplicate_export",
|
|
211
|
+
"export_diff_reexport_unresolved"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"severity": { "enum": ["low", "medium", "high", "critical"] },
|
|
215
|
+
"message": { "type": "string" },
|
|
216
|
+
"path": { "type": "string" }
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mustflow.github.io/schemas/reference-drift-report.schema.json",
|
|
4
|
+
"title": "mustflow reference-drift report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"command",
|
|
10
|
+
"pack_id",
|
|
11
|
+
"script_id",
|
|
12
|
+
"script_ref",
|
|
13
|
+
"action",
|
|
14
|
+
"status",
|
|
15
|
+
"ok",
|
|
16
|
+
"mustflow_root",
|
|
17
|
+
"policy",
|
|
18
|
+
"input_hash",
|
|
19
|
+
"files",
|
|
20
|
+
"references",
|
|
21
|
+
"summary",
|
|
22
|
+
"findings",
|
|
23
|
+
"issues"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schema_version": { "const": "1" },
|
|
27
|
+
"command": { "const": "script-pack" },
|
|
28
|
+
"pack_id": { "const": "docs" },
|
|
29
|
+
"script_id": { "const": "reference-drift" },
|
|
30
|
+
"script_ref": { "const": "docs/reference-drift" },
|
|
31
|
+
"action": { "const": "check" },
|
|
32
|
+
"status": { "enum": ["passed", "failed", "error"] },
|
|
33
|
+
"ok": { "type": "boolean" },
|
|
34
|
+
"mustflow_root": { "type": "string" },
|
|
35
|
+
"policy": { "$ref": "#/$defs/policy" },
|
|
36
|
+
"input_hash": { "$ref": "#/$defs/sha256" },
|
|
37
|
+
"files": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": { "$ref": "#/$defs/file" }
|
|
40
|
+
},
|
|
41
|
+
"references": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": { "$ref": "#/$defs/reference" }
|
|
44
|
+
},
|
|
45
|
+
"summary": { "$ref": "#/$defs/summary" },
|
|
46
|
+
"findings": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": { "$ref": "#/$defs/finding" }
|
|
49
|
+
},
|
|
50
|
+
"issues": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": { "type": "string" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"$defs": {
|
|
56
|
+
"sha256": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
59
|
+
},
|
|
60
|
+
"nullableSha256": {
|
|
61
|
+
"type": ["string", "null"],
|
|
62
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
63
|
+
},
|
|
64
|
+
"referenceKind": {
|
|
65
|
+
"enum": ["mf_command", "script_pack_ref", "schema_file", "repo_path"]
|
|
66
|
+
},
|
|
67
|
+
"referenceStatus": {
|
|
68
|
+
"enum": ["ok", "missing", "unknown", "skipped"]
|
|
69
|
+
},
|
|
70
|
+
"stringArray": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": { "type": "string" }
|
|
73
|
+
},
|
|
74
|
+
"policy": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": [
|
|
78
|
+
"max_files",
|
|
79
|
+
"max_file_bytes",
|
|
80
|
+
"default_paths",
|
|
81
|
+
"path_filters",
|
|
82
|
+
"checked_reference_kinds"
|
|
83
|
+
],
|
|
84
|
+
"properties": {
|
|
85
|
+
"max_files": { "type": "integer", "minimum": 1 },
|
|
86
|
+
"max_file_bytes": { "type": "integer", "minimum": 1 },
|
|
87
|
+
"default_paths": { "$ref": "#/$defs/stringArray" },
|
|
88
|
+
"path_filters": { "$ref": "#/$defs/stringArray" },
|
|
89
|
+
"checked_reference_kinds": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": { "$ref": "#/$defs/referenceKind" }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"file": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"required": [
|
|
99
|
+
"kind",
|
|
100
|
+
"path",
|
|
101
|
+
"sha256",
|
|
102
|
+
"size_bytes",
|
|
103
|
+
"line_count",
|
|
104
|
+
"reference_count"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"kind": { "const": "document" },
|
|
108
|
+
"path": { "type": "string" },
|
|
109
|
+
"sha256": { "$ref": "#/$defs/nullableSha256" },
|
|
110
|
+
"size_bytes": { "type": ["integer", "null"], "minimum": 0 },
|
|
111
|
+
"line_count": { "type": ["integer", "null"], "minimum": 0 },
|
|
112
|
+
"reference_count": { "type": "integer", "minimum": 0 }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"reference": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"required": ["kind", "path", "line", "value", "target", "status", "message"],
|
|
119
|
+
"properties": {
|
|
120
|
+
"kind": { "$ref": "#/$defs/referenceKind" },
|
|
121
|
+
"path": { "type": "string" },
|
|
122
|
+
"line": { "type": "integer", "minimum": 1 },
|
|
123
|
+
"value": { "type": "string" },
|
|
124
|
+
"target": { "type": "string" },
|
|
125
|
+
"status": { "$ref": "#/$defs/referenceStatus" },
|
|
126
|
+
"message": { "type": "string" }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"summary": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": ["files_checked", "references_checked", "ok", "missing", "unknown", "skipped"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"files_checked": { "type": "integer", "minimum": 0 },
|
|
135
|
+
"references_checked": { "type": "integer", "minimum": 0 },
|
|
136
|
+
"ok": { "type": "integer", "minimum": 0 },
|
|
137
|
+
"missing": { "type": "integer", "minimum": 0 },
|
|
138
|
+
"unknown": { "type": "integer", "minimum": 0 },
|
|
139
|
+
"skipped": { "type": "integer", "minimum": 0 }
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"finding": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"required": ["code", "severity", "message", "path"],
|
|
146
|
+
"properties": {
|
|
147
|
+
"code": {
|
|
148
|
+
"enum": [
|
|
149
|
+
"reference_drift_path_outside_root",
|
|
150
|
+
"reference_drift_unreadable_path",
|
|
151
|
+
"reference_drift_file_too_large",
|
|
152
|
+
"reference_drift_max_files_exceeded",
|
|
153
|
+
"reference_drift_unknown_command",
|
|
154
|
+
"reference_drift_unknown_script_pack",
|
|
155
|
+
"reference_drift_unknown_schema",
|
|
156
|
+
"reference_drift_missing_path"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"severity": { "enum": ["low", "medium", "high", "critical"] },
|
|
160
|
+
"message": { "type": "string" },
|
|
161
|
+
"path": { "type": "string" },
|
|
162
|
+
"line": { "type": "integer", "minimum": 1 }
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mustflow.github.io/schemas/related-files-report.schema.json",
|
|
4
|
+
"title": "mustflow related-files report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"command",
|
|
10
|
+
"pack_id",
|
|
11
|
+
"script_id",
|
|
12
|
+
"script_ref",
|
|
13
|
+
"action",
|
|
14
|
+
"status",
|
|
15
|
+
"ok",
|
|
16
|
+
"mustflow_root",
|
|
17
|
+
"policy",
|
|
18
|
+
"input_hash",
|
|
19
|
+
"targets",
|
|
20
|
+
"candidates",
|
|
21
|
+
"truncated",
|
|
22
|
+
"findings",
|
|
23
|
+
"issues"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schema_version": { "const": "1" },
|
|
27
|
+
"command": { "const": "script-pack" },
|
|
28
|
+
"pack_id": { "const": "repo" },
|
|
29
|
+
"script_id": { "const": "related-files" },
|
|
30
|
+
"script_ref": { "const": "repo/related-files" },
|
|
31
|
+
"action": { "const": "map" },
|
|
32
|
+
"status": { "enum": ["passed", "failed", "error"] },
|
|
33
|
+
"ok": { "type": "boolean" },
|
|
34
|
+
"mustflow_root": { "type": "string" },
|
|
35
|
+
"policy": { "$ref": "#/$defs/policy" },
|
|
36
|
+
"input_hash": { "$ref": "#/$defs/sha256" },
|
|
37
|
+
"targets": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": { "$ref": "#/$defs/target" }
|
|
40
|
+
},
|
|
41
|
+
"candidates": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": { "$ref": "#/$defs/candidate" }
|
|
44
|
+
},
|
|
45
|
+
"truncated": { "type": "boolean" },
|
|
46
|
+
"findings": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": { "$ref": "#/$defs/finding" }
|
|
49
|
+
},
|
|
50
|
+
"issues": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": { "type": "string" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"$defs": {
|
|
56
|
+
"sha256": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
59
|
+
},
|
|
60
|
+
"stringArray": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": { "type": "string" }
|
|
63
|
+
},
|
|
64
|
+
"language": {
|
|
65
|
+
"enum": [
|
|
66
|
+
"typescript",
|
|
67
|
+
"tsx",
|
|
68
|
+
"javascript",
|
|
69
|
+
"jsx",
|
|
70
|
+
"javascript-module",
|
|
71
|
+
"javascript-commonjs",
|
|
72
|
+
"json",
|
|
73
|
+
"other"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"relationship": {
|
|
77
|
+
"enum": [
|
|
78
|
+
"import",
|
|
79
|
+
"importer",
|
|
80
|
+
"sibling_test",
|
|
81
|
+
"sibling_docs",
|
|
82
|
+
"sibling_style",
|
|
83
|
+
"sibling_type",
|
|
84
|
+
"config_parent",
|
|
85
|
+
"package_boundary"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"policy": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"additionalProperties": false,
|
|
91
|
+
"required": ["max_file_bytes", "max_files", "max_candidates", "extensions", "ignored_directories"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"max_file_bytes": { "type": "integer", "minimum": 1 },
|
|
94
|
+
"max_files": { "type": "integer", "minimum": 1 },
|
|
95
|
+
"max_candidates": { "type": "integer", "minimum": 1 },
|
|
96
|
+
"extensions": { "$ref": "#/$defs/stringArray" },
|
|
97
|
+
"ignored_directories": { "$ref": "#/$defs/stringArray" }
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"target": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": ["input", "path", "exists", "kind", "language"],
|
|
104
|
+
"properties": {
|
|
105
|
+
"input": { "type": "string" },
|
|
106
|
+
"path": { "type": "string" },
|
|
107
|
+
"exists": { "type": ["boolean", "null"] },
|
|
108
|
+
"kind": { "enum": ["file", "directory", "missing", "other", "unknown"] },
|
|
109
|
+
"language": { "$ref": "#/$defs/language" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"candidate": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"required": ["path", "relationship", "confidence", "reason", "source_path", "target_path", "line"],
|
|
116
|
+
"properties": {
|
|
117
|
+
"path": { "type": "string" },
|
|
118
|
+
"relationship": { "$ref": "#/$defs/relationship" },
|
|
119
|
+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
120
|
+
"reason": { "type": "string" },
|
|
121
|
+
"source_path": { "type": "string" },
|
|
122
|
+
"target_path": { "type": "string" },
|
|
123
|
+
"line": { "type": ["integer", "null"], "minimum": 1 }
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"finding": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"required": ["code", "severity", "message", "path"],
|
|
130
|
+
"properties": {
|
|
131
|
+
"code": {
|
|
132
|
+
"enum": [
|
|
133
|
+
"related_files_path_outside_root",
|
|
134
|
+
"related_files_unreadable_path",
|
|
135
|
+
"related_files_max_files_exceeded",
|
|
136
|
+
"related_files_max_candidates_exceeded"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"severity": { "enum": ["low", "medium", "high", "critical"] },
|
|
140
|
+
"message": { "type": "string" },
|
|
141
|
+
"path": { "type": "string" }
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|