mustflow 2.22.46 → 2.22.49
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 +8 -0
- package/dist/cli/commands/api.js +1110 -0
- package/dist/cli/commands/run.js +107 -9
- package/dist/cli/commands/verify.js +4 -43
- package/dist/cli/i18n/en.js +19 -0
- package/dist/cli/i18n/es.js +19 -0
- package/dist/cli/i18n/fr.js +19 -0
- package/dist/cli/i18n/hi.js +19 -0
- package/dist/cli/i18n/ko.js +19 -0
- package/dist/cli/i18n/zh.js +19 -0
- package/dist/cli/index.js +1 -0
- package/dist/cli/lib/command-registry.js +6 -0
- package/dist/core/active-run-locks.js +10 -0
- package/dist/core/public-json-contracts.js +56 -0
- package/dist/core/verification-plan-id.js +44 -0
- package/package.json +1 -1
- package/schemas/README.md +7 -0
- package/schemas/command-catalog.schema.json +158 -0
- package/schemas/diff-risk.schema.json +149 -0
- package/schemas/health.schema.json +45 -0
- package/schemas/latest-evidence.schema.json +95 -0
- package/schemas/locks.schema.json +102 -0
- package/schemas/verification-plan.schema.json +245 -0
- package/schemas/workspace-summary.schema.json +282 -0
- package/templates/default/manifest.toml +1 -1
|
@@ -23,6 +23,62 @@ const PUBLIC_JSON_SCHEMA_CONTRACTS = [
|
|
|
23
23
|
documented: true,
|
|
24
24
|
installedCommand: ['mf', 'context', '--json'],
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
id: 'workspace-summary',
|
|
28
|
+
schemaFile: 'workspace-summary.schema.json',
|
|
29
|
+
producer: 'mf api workspace-summary --json',
|
|
30
|
+
packaged: true,
|
|
31
|
+
documented: true,
|
|
32
|
+
installedCommand: ['mf', 'api', 'workspace-summary', '--json'],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'command-catalog',
|
|
36
|
+
schemaFile: 'command-catalog.schema.json',
|
|
37
|
+
producer: 'mf api command-catalog --json',
|
|
38
|
+
packaged: true,
|
|
39
|
+
documented: true,
|
|
40
|
+
installedCommand: ['mf', 'api', 'command-catalog', '--json'],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'verification-plan',
|
|
44
|
+
schemaFile: 'verification-plan.schema.json',
|
|
45
|
+
producer: 'mf api verification-plan --changed --json',
|
|
46
|
+
packaged: true,
|
|
47
|
+
documented: true,
|
|
48
|
+
installedCommand: ['mf', 'api', 'verification-plan', '--changed', '--json'],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'latest-evidence',
|
|
52
|
+
schemaFile: 'latest-evidence.schema.json',
|
|
53
|
+
producer: 'mf api latest-evidence --json',
|
|
54
|
+
packaged: true,
|
|
55
|
+
documented: true,
|
|
56
|
+
installedCommand: ['mf', 'api', 'latest-evidence', '--json'],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'diff-risk',
|
|
60
|
+
schemaFile: 'diff-risk.schema.json',
|
|
61
|
+
producer: 'mf api diff-risk --changed --json',
|
|
62
|
+
packaged: true,
|
|
63
|
+
documented: true,
|
|
64
|
+
installedCommand: ['mf', 'api', 'diff-risk', '--changed', '--json'],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'health',
|
|
68
|
+
schemaFile: 'health.schema.json',
|
|
69
|
+
producer: 'mf api health --json',
|
|
70
|
+
packaged: true,
|
|
71
|
+
documented: true,
|
|
72
|
+
installedCommand: ['mf', 'api', 'health', '--json'],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'locks',
|
|
76
|
+
schemaFile: 'locks.schema.json',
|
|
77
|
+
producer: 'mf api locks --json',
|
|
78
|
+
packaged: true,
|
|
79
|
+
documented: true,
|
|
80
|
+
installedCommand: ['mf', 'api', 'locks', '--json'],
|
|
81
|
+
},
|
|
26
82
|
{
|
|
27
83
|
id: 'run-receipt',
|
|
28
84
|
schemaFile: 'run-receipt.schema.json',
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
function hashTextSha256(content) {
|
|
3
|
+
return `sha256:${createHash('sha256').update(content).digest('hex')}`;
|
|
4
|
+
}
|
|
5
|
+
function stableJson(value) {
|
|
6
|
+
if (Array.isArray(value)) {
|
|
7
|
+
return `[${value.map((entry) => stableJson(entry)).join(',')}]`;
|
|
8
|
+
}
|
|
9
|
+
if (value && typeof value === 'object') {
|
|
10
|
+
const record = value;
|
|
11
|
+
return `{${Object.keys(record)
|
|
12
|
+
.sort((left, right) => left.localeCompare(right))
|
|
13
|
+
.map((key) => `${JSON.stringify(key)}:${stableJson(record[key])}`)
|
|
14
|
+
.join(',')}}`;
|
|
15
|
+
}
|
|
16
|
+
return JSON.stringify(value) ?? 'null';
|
|
17
|
+
}
|
|
18
|
+
function getCandidateIntentNames(report) {
|
|
19
|
+
return [...new Set(report.candidates.map((candidate) => candidate.intent).filter((intent) => Boolean(intent)))]
|
|
20
|
+
.sort((left, right) => left.localeCompare(right));
|
|
21
|
+
}
|
|
22
|
+
export function createVerificationPlanId(report, contract) {
|
|
23
|
+
const relatedIntents = Object.fromEntries(getCandidateIntentNames(report).map((intent) => [intent, contract.intents[intent] ?? null]));
|
|
24
|
+
const fingerprintSource = {
|
|
25
|
+
schema_version: '1',
|
|
26
|
+
algorithm: 'mustflow.verify_plan_id.v1',
|
|
27
|
+
report: {
|
|
28
|
+
source: report.source,
|
|
29
|
+
files: report.files,
|
|
30
|
+
classification_summary: report.classification_summary,
|
|
31
|
+
requirements: report.requirements,
|
|
32
|
+
candidates: report.candidates,
|
|
33
|
+
gaps: report.gaps,
|
|
34
|
+
schedule: report.schedule,
|
|
35
|
+
test_selection: report.test_selection,
|
|
36
|
+
},
|
|
37
|
+
command_contract: {
|
|
38
|
+
defaults: contract.defaults,
|
|
39
|
+
resources: contract.resources,
|
|
40
|
+
intents: relatedIntents,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
return hashTextSha256(stableJson(fingerprintSource));
|
|
44
|
+
}
|
package/package.json
CHANGED
package/schemas/README.md
CHANGED
|
@@ -8,6 +8,13 @@ Current schemas:
|
|
|
8
8
|
- `doctor-report.schema.json`: output of `mf doctor --json`
|
|
9
9
|
- `adapter-compatibility-report.schema.json`: output of `mf adapters status --json`
|
|
10
10
|
- `context-report.schema.json`: output of `mf context --json`
|
|
11
|
+
- `workspace-summary.schema.json`: output of `mf api workspace-summary --json`
|
|
12
|
+
- `command-catalog.schema.json`: output of `mf api command-catalog --json`
|
|
13
|
+
- `verification-plan.schema.json`: output of `mf api verification-plan --changed --json`
|
|
14
|
+
- `latest-evidence.schema.json`: output of `mf api latest-evidence --json`
|
|
15
|
+
- `diff-risk.schema.json`: output of `mf api diff-risk --changed --json`
|
|
16
|
+
- `health.schema.json`: output of `mf api health --json`
|
|
17
|
+
- `locks.schema.json`: output of `mf api locks --json`
|
|
11
18
|
- `run-receipt.schema.json`: output of `mf run <intent> --json` and `.mustflow/state/runs/latest.json`,
|
|
12
19
|
including bounded declared-write drift metadata, a safe latest-run performance summary, and optional
|
|
13
20
|
structured phase timings and selection summaries
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mustflow.github.io/schemas/command-catalog.schema.json",
|
|
4
|
+
"title": "mustflow command catalog API report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"command",
|
|
10
|
+
"mustflow_root",
|
|
11
|
+
"command_contract",
|
|
12
|
+
"execution_policy",
|
|
13
|
+
"intents",
|
|
14
|
+
"issues"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"schema_version": { "const": "1" },
|
|
18
|
+
"command": { "const": "api command-catalog" },
|
|
19
|
+
"mustflow_root": { "type": "string" },
|
|
20
|
+
"command_contract": { "$ref": "#/$defs/commandContract" },
|
|
21
|
+
"execution_policy": { "$ref": "#/$defs/executionPolicy" },
|
|
22
|
+
"intents": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": { "$ref": "#/$defs/intent" }
|
|
25
|
+
},
|
|
26
|
+
"issues": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": { "type": "string" }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"$defs": {
|
|
32
|
+
"commandContract": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["path", "exists", "parse_error", "total_intents", "runnable_count", "blocked_count"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"path": { "const": ".mustflow/config/commands.toml" },
|
|
38
|
+
"exists": { "type": "boolean" },
|
|
39
|
+
"parse_error": { "type": ["string", "null"] },
|
|
40
|
+
"total_intents": { "type": "integer", "minimum": 0 },
|
|
41
|
+
"runnable_count": { "type": "integer", "minimum": 0 },
|
|
42
|
+
"blocked_count": { "type": "integer", "minimum": 0 }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"executionPolicy": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": [
|
|
49
|
+
"command_authority",
|
|
50
|
+
"run_entrypoint",
|
|
51
|
+
"preview_entrypoint",
|
|
52
|
+
"direct_commands_allowed",
|
|
53
|
+
"requires_configured_oneshot_agent_allowed"
|
|
54
|
+
],
|
|
55
|
+
"properties": {
|
|
56
|
+
"command_authority": { "const": ".mustflow/config/commands.toml" },
|
|
57
|
+
"run_entrypoint": { "const": "mf run <intent>" },
|
|
58
|
+
"preview_entrypoint": { "const": "mf run <intent> --dry-run --json" },
|
|
59
|
+
"direct_commands_allowed": { "const": false },
|
|
60
|
+
"requires_configured_oneshot_agent_allowed": { "const": true }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"intent": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": [
|
|
67
|
+
"name",
|
|
68
|
+
"description",
|
|
69
|
+
"kind",
|
|
70
|
+
"status",
|
|
71
|
+
"lifecycle",
|
|
72
|
+
"run_policy",
|
|
73
|
+
"runnable",
|
|
74
|
+
"reason_code",
|
|
75
|
+
"detail",
|
|
76
|
+
"run_command",
|
|
77
|
+
"preview_command",
|
|
78
|
+
"mode",
|
|
79
|
+
"cwd",
|
|
80
|
+
"timeout_seconds",
|
|
81
|
+
"kill_after_seconds",
|
|
82
|
+
"max_output_bytes",
|
|
83
|
+
"success_exit_codes",
|
|
84
|
+
"required_after",
|
|
85
|
+
"writes",
|
|
86
|
+
"effect_count",
|
|
87
|
+
"network",
|
|
88
|
+
"destructive",
|
|
89
|
+
"accepts_test_targets",
|
|
90
|
+
"env_policy",
|
|
91
|
+
"env_allowlist",
|
|
92
|
+
"precondition_count",
|
|
93
|
+
"active_lock_conflict_count",
|
|
94
|
+
"stale_active_lock_count",
|
|
95
|
+
"agent_action",
|
|
96
|
+
"manual_start_hint",
|
|
97
|
+
"health_check_url",
|
|
98
|
+
"stop_instruction",
|
|
99
|
+
"related_oneshot_checks"
|
|
100
|
+
],
|
|
101
|
+
"properties": {
|
|
102
|
+
"name": { "type": "string" },
|
|
103
|
+
"description": { "type": ["string", "null"] },
|
|
104
|
+
"kind": { "type": ["string", "null"] },
|
|
105
|
+
"status": { "type": ["string", "null"] },
|
|
106
|
+
"lifecycle": { "type": ["string", "null"] },
|
|
107
|
+
"run_policy": { "type": ["string", "null"] },
|
|
108
|
+
"runnable": { "type": "boolean" },
|
|
109
|
+
"reason_code": { "type": ["string", "null"] },
|
|
110
|
+
"detail": { "type": ["string", "null"] },
|
|
111
|
+
"run_command": { "type": ["string", "null"] },
|
|
112
|
+
"preview_command": { "type": ["string", "null"] },
|
|
113
|
+
"mode": { "enum": ["argv", "shell", null] },
|
|
114
|
+
"cwd": { "type": ["string", "null"] },
|
|
115
|
+
"timeout_seconds": { "type": ["integer", "null"], "minimum": 1 },
|
|
116
|
+
"kill_after_seconds": { "type": ["integer", "null"], "minimum": 1 },
|
|
117
|
+
"max_output_bytes": { "type": ["integer", "null"], "minimum": 1 },
|
|
118
|
+
"success_exit_codes": {
|
|
119
|
+
"anyOf": [
|
|
120
|
+
{ "type": "null" },
|
|
121
|
+
{
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": { "type": "integer", "minimum": 0 }
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"required_after": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": { "type": "string" }
|
|
130
|
+
},
|
|
131
|
+
"writes": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": { "type": "string" }
|
|
134
|
+
},
|
|
135
|
+
"effect_count": { "type": "integer", "minimum": 0 },
|
|
136
|
+
"network": { "type": ["boolean", "null"] },
|
|
137
|
+
"destructive": { "type": ["boolean", "null"] },
|
|
138
|
+
"accepts_test_targets": { "type": "boolean" },
|
|
139
|
+
"env_policy": { "type": ["string", "null"] },
|
|
140
|
+
"env_allowlist": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": { "type": "string" }
|
|
143
|
+
},
|
|
144
|
+
"precondition_count": { "type": "integer", "minimum": 0 },
|
|
145
|
+
"active_lock_conflict_count": { "type": "integer", "minimum": 0 },
|
|
146
|
+
"stale_active_lock_count": { "type": "integer", "minimum": 0 },
|
|
147
|
+
"agent_action": { "type": ["string", "null"] },
|
|
148
|
+
"manual_start_hint": { "type": ["string", "null"] },
|
|
149
|
+
"health_check_url": { "type": ["string", "null"] },
|
|
150
|
+
"stop_instruction": { "type": ["string", "null"] },
|
|
151
|
+
"related_oneshot_checks": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": { "type": "string" }
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mustflow.github.io/schemas/diff-risk.schema.json",
|
|
4
|
+
"title": "mustflow diff risk API report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"command",
|
|
10
|
+
"mustflow_root",
|
|
11
|
+
"source",
|
|
12
|
+
"status",
|
|
13
|
+
"risk_level",
|
|
14
|
+
"changed_file_count",
|
|
15
|
+
"changed_files",
|
|
16
|
+
"public_surface_count",
|
|
17
|
+
"validation_reasons",
|
|
18
|
+
"update_policies",
|
|
19
|
+
"drift_checks",
|
|
20
|
+
"required_verification",
|
|
21
|
+
"gap_count",
|
|
22
|
+
"gaps",
|
|
23
|
+
"recommended_commands",
|
|
24
|
+
"issues"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"schema_version": { "const": "1" },
|
|
28
|
+
"command": { "const": "api diff-risk" },
|
|
29
|
+
"mustflow_root": { "type": "string" },
|
|
30
|
+
"source": { "$ref": "#/$defs/source" },
|
|
31
|
+
"status": { "enum": ["available", "unavailable"] },
|
|
32
|
+
"risk_level": { "enum": ["none", "low", "medium", "high", "unknown"] },
|
|
33
|
+
"changed_file_count": { "type": "integer", "minimum": 0 },
|
|
34
|
+
"changed_files": { "$ref": "#/$defs/stringArray" },
|
|
35
|
+
"public_surface_count": { "type": "integer", "minimum": 0 },
|
|
36
|
+
"validation_reasons": { "$ref": "#/$defs/stringArray" },
|
|
37
|
+
"update_policies": { "$ref": "#/$defs/stringArray" },
|
|
38
|
+
"drift_checks": { "$ref": "#/$defs/stringArray" },
|
|
39
|
+
"required_verification": { "$ref": "#/$defs/stringArray" },
|
|
40
|
+
"residual_corrections": { "$ref": "#/$defs/residualCorrections" },
|
|
41
|
+
"gap_count": { "type": "integer", "minimum": 0 },
|
|
42
|
+
"gaps": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": { "$ref": "#/$defs/gap" }
|
|
45
|
+
},
|
|
46
|
+
"recommended_commands": { "$ref": "#/$defs/stringArray" },
|
|
47
|
+
"issues": { "$ref": "#/$defs/stringArray" }
|
|
48
|
+
},
|
|
49
|
+
"$defs": {
|
|
50
|
+
"source": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["kind", "command"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"kind": { "const": "changed" },
|
|
56
|
+
"command": { "const": "mf verify --changed --plan-only --json" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"stringArray": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": { "type": "string" }
|
|
62
|
+
},
|
|
63
|
+
"gap": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": ["reason", "files", "surfaces", "detail"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"reason": { "type": "string" },
|
|
69
|
+
"files": { "$ref": "#/$defs/stringArray" },
|
|
70
|
+
"surfaces": { "$ref": "#/$defs/stringArray" },
|
|
71
|
+
"detail": { "type": "string" }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"residualCorrections": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": [
|
|
78
|
+
"status",
|
|
79
|
+
"mode",
|
|
80
|
+
"grants_command_authority",
|
|
81
|
+
"applies_to_current_plan",
|
|
82
|
+
"selected_intent_additions",
|
|
83
|
+
"suggested_intent_additions",
|
|
84
|
+
"recommended_commands",
|
|
85
|
+
"signals",
|
|
86
|
+
"policy",
|
|
87
|
+
"issues"
|
|
88
|
+
],
|
|
89
|
+
"properties": {
|
|
90
|
+
"status": { "enum": ["not_enough_evidence", "available", "unavailable"] },
|
|
91
|
+
"mode": { "const": "read_only" },
|
|
92
|
+
"grants_command_authority": { "const": false },
|
|
93
|
+
"applies_to_current_plan": { "type": "boolean" },
|
|
94
|
+
"selected_intent_additions": { "$ref": "#/$defs/stringArray" },
|
|
95
|
+
"suggested_intent_additions": { "$ref": "#/$defs/stringArray" },
|
|
96
|
+
"recommended_commands": { "$ref": "#/$defs/stringArray" },
|
|
97
|
+
"signals": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "$ref": "#/$defs/residualSignal" }
|
|
100
|
+
},
|
|
101
|
+
"policy": { "$ref": "#/$defs/residualPolicy" },
|
|
102
|
+
"issues": { "$ref": "#/$defs/stringArray" }
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"residualPolicy": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"required": [
|
|
109
|
+
"single_observation_changes_plan",
|
|
110
|
+
"minimum_repeated_samples_for_plan_change",
|
|
111
|
+
"automatic_intent_additions_enabled"
|
|
112
|
+
],
|
|
113
|
+
"properties": {
|
|
114
|
+
"single_observation_changes_plan": { "const": false },
|
|
115
|
+
"minimum_repeated_samples_for_plan_change": { "const": 2 },
|
|
116
|
+
"automatic_intent_additions_enabled": { "const": false }
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"residualSignal": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": [
|
|
123
|
+
"kind",
|
|
124
|
+
"confidence",
|
|
125
|
+
"evidence_count",
|
|
126
|
+
"source",
|
|
127
|
+
"verification_plan_id",
|
|
128
|
+
"affected_reasons",
|
|
129
|
+
"affected_intents",
|
|
130
|
+
"detail",
|
|
131
|
+
"recommendation"
|
|
132
|
+
],
|
|
133
|
+
"properties": {
|
|
134
|
+
"kind": { "enum": ["latest_unresolved_plan", "repeated_failure", "remaining_risk"] },
|
|
135
|
+
"confidence": { "enum": ["low", "medium", "high"] },
|
|
136
|
+
"evidence_count": { "type": "integer", "minimum": 1 },
|
|
137
|
+
"source": { "const": "latest-evidence" },
|
|
138
|
+
"verification_plan_id": {
|
|
139
|
+
"type": ["string", "null"],
|
|
140
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
141
|
+
},
|
|
142
|
+
"affected_reasons": { "$ref": "#/$defs/stringArray" },
|
|
143
|
+
"affected_intents": { "$ref": "#/$defs/stringArray" },
|
|
144
|
+
"detail": { "type": "string" },
|
|
145
|
+
"recommendation": { "enum": ["provide_new_evidence", "review_remaining_risk"] }
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mustflow.github.io/schemas/health.schema.json",
|
|
4
|
+
"title": "mustflow health API report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"command",
|
|
10
|
+
"mustflow_root",
|
|
11
|
+
"status",
|
|
12
|
+
"installed",
|
|
13
|
+
"check_ok",
|
|
14
|
+
"command_contract_ok",
|
|
15
|
+
"runnable_count",
|
|
16
|
+
"git_status",
|
|
17
|
+
"changed_file_count",
|
|
18
|
+
"latest_run_exists",
|
|
19
|
+
"blockers",
|
|
20
|
+
"warnings",
|
|
21
|
+
"recommended_next_commands"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"schema_version": { "const": "1" },
|
|
25
|
+
"command": { "const": "api health" },
|
|
26
|
+
"mustflow_root": { "type": "string" },
|
|
27
|
+
"status": { "enum": ["ok", "degraded", "blocked"] },
|
|
28
|
+
"installed": { "type": "boolean" },
|
|
29
|
+
"check_ok": { "type": "boolean" },
|
|
30
|
+
"command_contract_ok": { "type": "boolean" },
|
|
31
|
+
"runnable_count": { "type": "integer", "minimum": 0 },
|
|
32
|
+
"git_status": { "enum": ["available", "unavailable"] },
|
|
33
|
+
"changed_file_count": { "type": ["integer", "null"], "minimum": 0 },
|
|
34
|
+
"latest_run_exists": { "type": "boolean" },
|
|
35
|
+
"blockers": { "$ref": "#/$defs/stringArray" },
|
|
36
|
+
"warnings": { "$ref": "#/$defs/stringArray" },
|
|
37
|
+
"recommended_next_commands": { "$ref": "#/$defs/stringArray" }
|
|
38
|
+
},
|
|
39
|
+
"$defs": {
|
|
40
|
+
"stringArray": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": { "type": "string" }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://mustflow.github.io/schemas/latest-evidence.schema.json",
|
|
4
|
+
"title": "mustflow latest evidence API report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"command",
|
|
10
|
+
"mustflow_root",
|
|
11
|
+
"latest",
|
|
12
|
+
"manifest",
|
|
13
|
+
"policy",
|
|
14
|
+
"issues"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"schema_version": { "const": "1" },
|
|
18
|
+
"command": { "const": "api latest-evidence" },
|
|
19
|
+
"mustflow_root": { "type": "string" },
|
|
20
|
+
"latest": { "$ref": "#/$defs/latest" },
|
|
21
|
+
"manifest": { "$ref": "#/$defs/manifest" },
|
|
22
|
+
"policy": { "$ref": "#/$defs/policy" },
|
|
23
|
+
"issues": { "$ref": "#/$defs/stringArray" }
|
|
24
|
+
},
|
|
25
|
+
"$defs": {
|
|
26
|
+
"stringArray": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": { "type": "string" }
|
|
29
|
+
},
|
|
30
|
+
"latest": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"required": [
|
|
34
|
+
"exists",
|
|
35
|
+
"path",
|
|
36
|
+
"kind",
|
|
37
|
+
"status",
|
|
38
|
+
"intent",
|
|
39
|
+
"reason",
|
|
40
|
+
"verification_plan_id",
|
|
41
|
+
"completion_verdict_status",
|
|
42
|
+
"manifest_path",
|
|
43
|
+
"receipt_path",
|
|
44
|
+
"run_dir",
|
|
45
|
+
"exit_code",
|
|
46
|
+
"timed_out",
|
|
47
|
+
"duration_ms",
|
|
48
|
+
"summary"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"exists": { "type": "boolean" },
|
|
52
|
+
"path": { "const": ".mustflow/state/runs/latest.json" },
|
|
53
|
+
"kind": { "enum": ["run_receipt", "verify_run_summary", "unknown", null] },
|
|
54
|
+
"status": { "type": ["string", "null"] },
|
|
55
|
+
"intent": { "type": ["string", "null"] },
|
|
56
|
+
"reason": { "type": ["string", "null"] },
|
|
57
|
+
"verification_plan_id": { "type": ["string", "null"] },
|
|
58
|
+
"completion_verdict_status": { "type": ["string", "null"] },
|
|
59
|
+
"manifest_path": { "type": ["string", "null"] },
|
|
60
|
+
"receipt_path": { "type": ["string", "null"] },
|
|
61
|
+
"run_dir": { "type": ["string", "null"] },
|
|
62
|
+
"exit_code": { "type": ["integer", "null"] },
|
|
63
|
+
"timed_out": { "type": ["boolean", "null"] },
|
|
64
|
+
"duration_ms": { "type": ["integer", "null"], "minimum": 0 },
|
|
65
|
+
"summary": {
|
|
66
|
+
"anyOf": [
|
|
67
|
+
{ "type": "null" },
|
|
68
|
+
{ "type": "object" }
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"manifest": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["status", "path", "receipt_count", "error"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"status": { "enum": ["available", "missing", "unavailable", "not_applicable"] },
|
|
79
|
+
"path": { "type": ["string", "null"] },
|
|
80
|
+
"receipt_count": { "type": ["integer", "null"], "minimum": 0 },
|
|
81
|
+
"error": { "type": ["string", "null"] }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"policy": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": ["raw_output_included", "hidden_reasoning_included", "max_bytes"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"raw_output_included": { "const": false },
|
|
90
|
+
"hidden_reasoning_included": { "const": false },
|
|
91
|
+
"max_bytes": { "type": "integer", "minimum": 1 }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|