mustflow 2.23.0 → 2.25.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 +12 -2
- package/dist/cli/commands/adapters.js +11 -9
- package/dist/cli/commands/api.js +263 -113
- package/dist/cli/commands/check.js +11 -7
- package/dist/cli/commands/classify.js +16 -42
- package/dist/cli/commands/context.js +18 -31
- package/dist/cli/commands/contract-lint.js +12 -7
- package/dist/cli/commands/dashboard.js +65 -114
- package/dist/cli/commands/docs.js +43 -26
- package/dist/cli/commands/doctor.js +11 -7
- package/dist/cli/commands/evidence.js +642 -0
- package/dist/cli/commands/explain-verify.js +1 -59
- package/dist/cli/commands/explain.js +84 -36
- package/dist/cli/commands/handoff.js +13 -17
- package/dist/cli/commands/impact.js +14 -20
- package/dist/cli/commands/index.js +15 -9
- package/dist/cli/commands/init.js +56 -70
- package/dist/cli/commands/line-endings.js +15 -9
- package/dist/cli/commands/map.js +30 -42
- package/dist/cli/commands/next.js +300 -0
- package/dist/cli/commands/onboard.js +136 -0
- package/dist/cli/commands/run.js +47 -42
- package/dist/cli/commands/search.js +43 -69
- package/dist/cli/commands/status.js +9 -6
- package/dist/cli/commands/update.js +16 -10
- package/dist/cli/commands/upgrade.js +9 -6
- package/dist/cli/commands/verify/args.js +55 -249
- package/dist/cli/commands/verify.js +2 -1
- package/dist/cli/commands/version-sources.js +9 -6
- package/dist/cli/commands/version.js +9 -6
- package/dist/cli/commands/workspace.js +564 -0
- package/dist/cli/i18n/en.js +60 -1
- package/dist/cli/i18n/es.js +60 -1
- package/dist/cli/i18n/fr.js +60 -1
- package/dist/cli/i18n/hi.js +60 -1
- package/dist/cli/i18n/ko.js +60 -1
- package/dist/cli/i18n/zh.js +60 -1
- package/dist/cli/index.js +28 -25
- package/dist/cli/lib/agent-context.js +8 -9
- package/dist/cli/lib/command-registry.js +24 -0
- package/dist/cli/lib/dashboard-html/client-script.js +1 -1
- package/dist/cli/lib/local-index/database-path.js +5 -0
- package/dist/cli/lib/local-index/database-read.js +88 -0
- package/dist/cli/lib/local-index/effect-graph-read-model.js +112 -0
- package/dist/cli/lib/local-index/freshness.js +60 -0
- package/dist/cli/lib/local-index/index.js +12 -1866
- package/dist/cli/lib/local-index/path-surface-read-model.js +134 -0
- package/dist/cli/lib/local-index/populate.js +474 -0
- package/dist/cli/lib/local-index/schema.js +413 -0
- package/dist/cli/lib/local-index/search-read-model.js +533 -0
- package/dist/cli/lib/local-index/search-text.js +79 -0
- package/dist/cli/lib/option-parser.js +93 -0
- package/dist/cli/lib/repo-map.js +2 -2
- package/dist/cli/lib/run-plan.js +5 -22
- package/dist/core/change-verification.js +11 -5
- package/dist/core/command-effects.js +1 -3
- package/dist/core/command-intent-eligibility.js +14 -0
- package/dist/core/command-preconditions.js +8 -4
- package/dist/core/command-run-constraints.js +43 -0
- package/dist/core/public-json-contracts.js +57 -0
- package/dist/core/test-selection.js +8 -2
- package/dist/core/verification-plan.js +32 -4
- package/package.json +1 -1
- package/schemas/README.md +16 -0
- package/schemas/api-serve-response.schema.json +89 -0
- package/schemas/change-verification-report.schema.json +4 -1
- package/schemas/contract-lint-report.schema.json +1 -0
- package/schemas/evidence-report.schema.json +287 -0
- package/schemas/explain-report.schema.json +4 -0
- package/schemas/next-report.schema.json +121 -0
- package/schemas/onboard-commands-report.schema.json +100 -0
- package/schemas/workspace-command-catalog.schema.json +172 -0
- package/schemas/workspace-status.schema.json +141 -0
- package/schemas/workspace-verification-plan.schema.json +195 -0
- package/templates/default/i18n.toml +1 -1
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +2 -1
- package/templates/default/locales/en/.mustflow/skills/clarifying-question-gate/SKILL.md +183 -0
- package/templates/default/locales/en/.mustflow/skills/routes.toml +7 -1
- package/templates/default/locales/en/.mustflow/skills/structure-discovery-gate/SKILL.md +63 -20
- package/templates/default/manifest.toml +8 -1
package/dist/cli/i18n/es.js
CHANGED
|
@@ -30,6 +30,10 @@ export const esMessages = {
|
|
|
30
30
|
"command.check.summary": "Valida los archivos mustflow",
|
|
31
31
|
"command.classify.summary": "Clasifica cambios y superficies publicas",
|
|
32
32
|
"command.contractLint.summary": "Revisa el contrato de comandos",
|
|
33
|
+
"command.onboard.summary": "Sugiere fragmentos de onboarding de comandos solo para revisión",
|
|
34
|
+
"command.next.summary": "Elige la siguiente acción segura de mustflow",
|
|
35
|
+
"command.evidence.summary": "Resume requisitos de verificación, evidencia y brechas",
|
|
36
|
+
"command.workspace.summary": "Inspecciona raíces workspace configuradas y contratos de repositorios anidados",
|
|
33
37
|
"command.status.summary": "Muestra el estado de la instalación local de mustflow",
|
|
34
38
|
"command.update.summary": "Previsualiza o aplica actualizaciones del flujo de trabajo mustflow",
|
|
35
39
|
"command.upgrade.summary": "Comprueba la versión del paquete y actualiza con seguridad los archivos de flujo instalados",
|
|
@@ -82,6 +86,58 @@ export const esMessages = {
|
|
|
82
86
|
"contractLint.label.coverageFindings": "Hallazgos de cobertura",
|
|
83
87
|
"contractLint.label.suggestions": "Sugerencias",
|
|
84
88
|
"contractLint.label.issues": "Problemas",
|
|
89
|
+
"onboard.help.summary": "Sugiere fragmentos command-intent solo para revisión desde archivos package, Make y just existentes.",
|
|
90
|
+
"onboard.help.exit.ok": "Se inspeccionaron las sugerencias de onboarding de comandos",
|
|
91
|
+
"onboard.help.exit.fail": "El comando onboard recibió una entrada no válida",
|
|
92
|
+
"onboard.title": "onboarding de comandos mustflow",
|
|
93
|
+
"onboard.label.suggestions": "Sugerencias",
|
|
94
|
+
"onboard.label.reviewOnly": "Solo revisión",
|
|
95
|
+
"onboard.label.writesFiles": "Escribe archivos",
|
|
96
|
+
"onboard.label.reviewSnippets": "Fragmentos solo para revisión",
|
|
97
|
+
"onboard.label.nextSteps": "Siguientes pasos",
|
|
98
|
+
"onboard.error.missingAction": "Especifica una acción onboard: commands",
|
|
99
|
+
"onboard.error.unknownAction": "Acción onboard desconocida: {action}",
|
|
100
|
+
"next.help.summary": "Inspecciona el root actual y los archivos cambiados, y muestra la siguiente acción segura de mustflow.",
|
|
101
|
+
"next.help.exit.ok": "Se inspeccionó la siguiente acción",
|
|
102
|
+
"next.help.exit.fail": "No se pudo inspeccionar la siguiente acción",
|
|
103
|
+
"next.title": "mustflow next",
|
|
104
|
+
"next.label.status": "Estado",
|
|
105
|
+
"next.label.nextAction": "Siguiente acción",
|
|
106
|
+
"next.label.reason": "Razón",
|
|
107
|
+
"next.label.selectedIntents": "Verificación seleccionada",
|
|
108
|
+
"next.label.gaps": "Brechas",
|
|
109
|
+
"next.section.gaps": "Brechas de verificación",
|
|
110
|
+
"next.section.blockers": "Bloqueos",
|
|
111
|
+
"next.section.warnings": "Advertencias",
|
|
112
|
+
"next.section.commands": "Comandos recomendados",
|
|
113
|
+
"evidence.help.summary": "Resume requisitos de verificación de cambios, evidencia reciente, recibos y brechas restantes sin ejecutar comandos.",
|
|
114
|
+
"evidence.help.option.changed": "Construye un reporte de evidencia desde el plan de verificación de cambios actual",
|
|
115
|
+
"evidence.help.option.latest": "Resume solo la evidencia guardada más reciente de run o verify",
|
|
116
|
+
"evidence.help.option.plan": "Construye un reporte de evidencia desde un archivo JSON de verification-plan guardado",
|
|
117
|
+
"evidence.help.option.export": "Escribe el JSON del reporte de evidencia en una ruta dentro de la raíz mustflow",
|
|
118
|
+
"evidence.help.exit.ok": "La evidencia fue inspeccionada",
|
|
119
|
+
"evidence.help.exit.fail": "La evidencia no pudo inspeccionarse",
|
|
120
|
+
"evidence.error.conflictingInputs": "Elige solo una fuente de evidencia: --changed, --latest o --plan",
|
|
121
|
+
"evidence.title": "mustflow evidence",
|
|
122
|
+
"evidence.label.status": "Estado",
|
|
123
|
+
"evidence.label.source": "Fuente",
|
|
124
|
+
"evidence.label.plan": "Plan de verificación",
|
|
125
|
+
"evidence.label.requirements": "Requisitos",
|
|
126
|
+
"evidence.label.selectedIntents": "Intents seleccionados",
|
|
127
|
+
"evidence.label.gaps": "Brechas",
|
|
128
|
+
"evidence.label.latest": "Evidencia reciente",
|
|
129
|
+
"evidence.section.requirements": "Requisitos",
|
|
130
|
+
"evidence.section.gaps": "Brechas",
|
|
131
|
+
"evidence.section.remainingRisks": "Riesgos restantes",
|
|
132
|
+
"workspace.help.summary": "Inspecciona raíces workspace configuradas y preparación de contratos anidados sin conceder autoridad de comandos.",
|
|
133
|
+
"workspace.help.action.status": "Imprime repositorios anidados descubiertos y su estado de contrato mustflow local",
|
|
134
|
+
"workspace.help.action.commandCatalog": "Imprime disponibilidad de intents por repositorio sin cadenas de comando sin procesar",
|
|
135
|
+
"workspace.help.action.verify": "Imprime planes de verificación de cambios por repositorio sin ejecutar comandos",
|
|
136
|
+
"workspace.help.exit.ok": "Se inspeccionó el estado del workspace",
|
|
137
|
+
"workspace.error.missingAction": "Especifica una acción workspace: status, command-catalog o verify",
|
|
138
|
+
"workspace.error.unknownAction": "Acción workspace desconocida: {action}",
|
|
139
|
+
"workspace.error.verifyRequiresChanged": "workspace verify requiere --changed",
|
|
140
|
+
"workspace.error.verifyRequiresPlanOnly": "workspace verify requiere --plan-only",
|
|
85
141
|
"context.help.summary": "Imprime el contexto de agente para la raíz mustflow actual.",
|
|
86
142
|
"context.help.option.json": "Imprime JSON de contexto legible por máquinas",
|
|
87
143
|
"context.help.option.cacheProfile": "Imprime un perfil de caché de prompt: stable, task, volatile o all",
|
|
@@ -95,11 +151,14 @@ export const esMessages = {
|
|
|
95
151
|
"api.help.action.diffRisk": "Imprime un resumen compacto de riesgo y verificación para archivos cambiados",
|
|
96
152
|
"api.help.action.health": "Imprime un resumen compacto de salud del workspace",
|
|
97
153
|
"api.help.action.locks": "Imprime bloqueos mf run activos para coordinar varias sesiones",
|
|
154
|
+
"api.help.action.serve": "Sirve informes API de solo lectura por stdio delimitado por líneas",
|
|
155
|
+
"api.help.option.stdio": "Lee solicitudes JSON delimitadas por líneas desde stdin e imprime respuestas JSON",
|
|
98
156
|
"api.help.exit.ok": "El informe API se inspeccionó e imprimió",
|
|
99
|
-
"api.error.missingAction": "Especifica una acción api: workspace-summary, command-catalog, verification-plan, latest-evidence, diff-risk, health o
|
|
157
|
+
"api.error.missingAction": "Especifica una acción api: workspace-summary, command-catalog, verification-plan, latest-evidence, diff-risk, health, locks o serve",
|
|
100
158
|
"api.error.unknownAction": "Acción api desconocida: {action}",
|
|
101
159
|
"api.error.actionRequiresJson": "{action} requiere --json",
|
|
102
160
|
"api.error.actionRequiresChanged": "{action} actualmente requiere --changed",
|
|
161
|
+
"api.error.serveRequiresStdio": "api serve requiere --stdio",
|
|
103
162
|
"label.installed": "Instalado",
|
|
104
163
|
"label.mustflowRoot": "raíz mustflow",
|
|
105
164
|
"label.commandContract": "Especificación de comandos",
|
package/dist/cli/i18n/fr.js
CHANGED
|
@@ -30,6 +30,10 @@ export const frMessages = {
|
|
|
30
30
|
"command.check.summary": "Valide les fichiers mustflow",
|
|
31
31
|
"command.classify.summary": "Classe les changements et surfaces publiques",
|
|
32
32
|
"command.contractLint.summary": "Vérifie le contrat de commandes",
|
|
33
|
+
"command.onboard.summary": "Suggère des fragments d'onboarding de commandes en lecture seule",
|
|
34
|
+
"command.next.summary": "Choisit la prochaine action mustflow sûre",
|
|
35
|
+
"command.evidence.summary": "Résume les exigences de vérification, les preuves et les écarts",
|
|
36
|
+
"command.workspace.summary": "Inspecte les racines workspace configurées et les contrats des dépôts imbriqués",
|
|
33
37
|
"command.status.summary": "Affiche l'état de l'installation locale de mustflow",
|
|
34
38
|
"command.update.summary": "Prévisualise ou applique les mises à jour du flux de travail mustflow",
|
|
35
39
|
"command.upgrade.summary": "Vérifie la version du paquet et met à jour en sécurité les fichiers de workflow installés",
|
|
@@ -82,6 +86,58 @@ export const frMessages = {
|
|
|
82
86
|
"contractLint.label.coverageFindings": "Constats de couverture",
|
|
83
87
|
"contractLint.label.suggestions": "Suggestions",
|
|
84
88
|
"contractLint.label.issues": "Problèmes",
|
|
89
|
+
"onboard.help.summary": "Suggère des fragments command-intent en lecture seule depuis les fichiers package, Make et just existants.",
|
|
90
|
+
"onboard.help.exit.ok": "Les suggestions d'onboarding de commandes ont été inspectées",
|
|
91
|
+
"onboard.help.exit.fail": "La commande onboard a reçu une entrée invalide",
|
|
92
|
+
"onboard.title": "onboarding de commandes mustflow",
|
|
93
|
+
"onboard.label.suggestions": "Suggestions",
|
|
94
|
+
"onboard.label.reviewOnly": "Lecture seule",
|
|
95
|
+
"onboard.label.writesFiles": "Écrit des fichiers",
|
|
96
|
+
"onboard.label.reviewSnippets": "Fragments en lecture seule",
|
|
97
|
+
"onboard.label.nextSteps": "Prochaines étapes",
|
|
98
|
+
"onboard.error.missingAction": "Indiquez une action onboard : commands",
|
|
99
|
+
"onboard.error.unknownAction": "Action onboard inconnue : {action}",
|
|
100
|
+
"next.help.summary": "Inspecte le root actuel et les fichiers modifiés, puis affiche la prochaine action mustflow sûre.",
|
|
101
|
+
"next.help.exit.ok": "La prochaine action a été inspectée",
|
|
102
|
+
"next.help.exit.fail": "La prochaine action n'a pas pu être inspectée",
|
|
103
|
+
"next.title": "mustflow next",
|
|
104
|
+
"next.label.status": "État",
|
|
105
|
+
"next.label.nextAction": "Prochaine action",
|
|
106
|
+
"next.label.reason": "Raison",
|
|
107
|
+
"next.label.selectedIntents": "Vérification sélectionnée",
|
|
108
|
+
"next.label.gaps": "Écarts",
|
|
109
|
+
"next.section.gaps": "Écarts de vérification",
|
|
110
|
+
"next.section.blockers": "Blocages",
|
|
111
|
+
"next.section.warnings": "Avertissements",
|
|
112
|
+
"next.section.commands": "Commandes recommandées",
|
|
113
|
+
"evidence.help.summary": "Résume les exigences de vérification des changements, les preuves récentes, les reçus et les écarts restants sans exécuter de commandes.",
|
|
114
|
+
"evidence.help.option.changed": "Construit un rapport de preuves depuis le plan de vérification des changements actuel",
|
|
115
|
+
"evidence.help.option.latest": "Résume uniquement les dernières preuves run ou verify enregistrées",
|
|
116
|
+
"evidence.help.option.plan": "Construit un rapport de preuves depuis un fichier JSON verification-plan enregistré",
|
|
117
|
+
"evidence.help.option.export": "Écrit le JSON du rapport de preuves dans un chemin sous la racine mustflow",
|
|
118
|
+
"evidence.help.exit.ok": "Les preuves ont été inspectées",
|
|
119
|
+
"evidence.help.exit.fail": "Les preuves n'ont pas pu être inspectées",
|
|
120
|
+
"evidence.error.conflictingInputs": "Choisissez une seule source de preuves : --changed, --latest ou --plan",
|
|
121
|
+
"evidence.title": "mustflow evidence",
|
|
122
|
+
"evidence.label.status": "Statut",
|
|
123
|
+
"evidence.label.source": "Source",
|
|
124
|
+
"evidence.label.plan": "Plan de vérification",
|
|
125
|
+
"evidence.label.requirements": "Exigences",
|
|
126
|
+
"evidence.label.selectedIntents": "Intents sélectionnés",
|
|
127
|
+
"evidence.label.gaps": "Écarts",
|
|
128
|
+
"evidence.label.latest": "Preuves récentes",
|
|
129
|
+
"evidence.section.requirements": "Exigences",
|
|
130
|
+
"evidence.section.gaps": "Écarts",
|
|
131
|
+
"evidence.section.remainingRisks": "Risques restants",
|
|
132
|
+
"workspace.help.summary": "Inspecte les racines workspace configurées et l'état des contrats imbriqués sans accorder d'autorité de commande.",
|
|
133
|
+
"workspace.help.action.status": "Affiche les dépôts imbriqués découverts et leur état de contrat mustflow local",
|
|
134
|
+
"workspace.help.action.commandCatalog": "Affiche la disponibilité des intents par dépôt sans chaînes de commande brutes",
|
|
135
|
+
"workspace.help.action.verify": "Affiche les plans de vérification des changements par dépôt sans exécuter de commandes",
|
|
136
|
+
"workspace.help.exit.ok": "L'état du workspace a été inspecté",
|
|
137
|
+
"workspace.error.missingAction": "Indiquez une action workspace : status, command-catalog ou verify",
|
|
138
|
+
"workspace.error.unknownAction": "Action workspace inconnue : {action}",
|
|
139
|
+
"workspace.error.verifyRequiresChanged": "workspace verify nécessite --changed",
|
|
140
|
+
"workspace.error.verifyRequiresPlanOnly": "workspace verify nécessite --plan-only",
|
|
85
141
|
"context.help.summary": "Imprime le contexte d'agent pour la racine mustflow actuelle.",
|
|
86
142
|
"context.help.option.json": "Imprime le JSON de contexte lisible par machine",
|
|
87
143
|
"context.help.option.cacheProfile": "Imprime un profil de cache de prompt : stable, task, volatile ou all",
|
|
@@ -95,11 +151,14 @@ export const frMessages = {
|
|
|
95
151
|
"api.help.action.diffRisk": "Affiche un résumé compact du risque et de la vérification des fichiers modifiés",
|
|
96
152
|
"api.help.action.health": "Affiche un résumé compact de santé du workspace",
|
|
97
153
|
"api.help.action.locks": "Affiche les verrous mf run actifs pour coordonner plusieurs sessions",
|
|
154
|
+
"api.help.action.serve": "Sert les rapports API en lecture seule sur stdio délimité par lignes",
|
|
155
|
+
"api.help.option.stdio": "Lit des requêtes JSON ligne par ligne depuis stdin et imprime des réponses JSON",
|
|
98
156
|
"api.help.exit.ok": "Le rapport API a été inspecté et imprimé",
|
|
99
|
-
"api.error.missingAction": "Indiquez une action api : workspace-summary, command-catalog, verification-plan, latest-evidence, diff-risk, health ou
|
|
157
|
+
"api.error.missingAction": "Indiquez une action api : workspace-summary, command-catalog, verification-plan, latest-evidence, diff-risk, health, locks ou serve",
|
|
100
158
|
"api.error.unknownAction": "Action api inconnue : {action}",
|
|
101
159
|
"api.error.actionRequiresJson": "{action} exige --json",
|
|
102
160
|
"api.error.actionRequiresChanged": "{action} exige actuellement --changed",
|
|
161
|
+
"api.error.serveRequiresStdio": "api serve exige --stdio",
|
|
103
162
|
"label.installed": "Installé",
|
|
104
163
|
"label.mustflowRoot": "racine mustflow",
|
|
105
164
|
"label.commandContract": "Spécification des commandes",
|
package/dist/cli/i18n/hi.js
CHANGED
|
@@ -30,6 +30,10 @@ export const hiMessages = {
|
|
|
30
30
|
"command.check.summary": "mustflow फ़ाइलों की जाँच करें",
|
|
31
31
|
"command.classify.summary": "बदली फ़ाइलों और सार्वजनिक सतहों को वर्गीकृत करें",
|
|
32
32
|
"command.contractLint.summary": "कमांड अनुबंध की जाँच करें",
|
|
33
|
+
"command.onboard.summary": "review-only command onboarding snippets सुझाएँ",
|
|
34
|
+
"command.next.summary": "अगला safe mustflow action चुनें",
|
|
35
|
+
"command.evidence.summary": "verification requirements, evidence और gaps summarize करें",
|
|
36
|
+
"command.workspace.summary": "configured workspace roots और nested repository contracts inspect करें",
|
|
33
37
|
"command.status.summary": "स्थानीय mustflow इंस्टॉल स्थिति दिखाएँ",
|
|
34
38
|
"command.update.summary": "mustflow वर्कफ़्लो अपडेट का पूर्वावलोकन करें या लागू करें",
|
|
35
39
|
"command.upgrade.summary": "Package version जाँचें और installed workflow files सुरक्षित रूप से update करें",
|
|
@@ -82,6 +86,58 @@ export const hiMessages = {
|
|
|
82
86
|
"contractLint.label.coverageFindings": "Coverage findings",
|
|
83
87
|
"contractLint.label.suggestions": "Suggestions",
|
|
84
88
|
"contractLint.label.issues": "Issues",
|
|
89
|
+
"onboard.help.summary": "existing package, Make, और just command files से review-only command-intent snippets सुझाएँ.",
|
|
90
|
+
"onboard.help.exit.ok": "Command onboarding suggestions जाँचे गए",
|
|
91
|
+
"onboard.help.exit.fail": "onboard command को invalid input मिला",
|
|
92
|
+
"onboard.title": "mustflow command onboarding",
|
|
93
|
+
"onboard.label.suggestions": "Suggestions",
|
|
94
|
+
"onboard.label.reviewOnly": "Review only",
|
|
95
|
+
"onboard.label.writesFiles": "Writes files",
|
|
96
|
+
"onboard.label.reviewSnippets": "Review-only snippets",
|
|
97
|
+
"onboard.label.nextSteps": "Next steps",
|
|
98
|
+
"onboard.error.missingAction": "onboard action बताएँ: commands",
|
|
99
|
+
"onboard.error.unknownAction": "अज्ञात onboard action: {action}",
|
|
100
|
+
"next.help.summary": "current root और changed files inspect करें, फिर अगला safe mustflow action print करें.",
|
|
101
|
+
"next.help.exit.ok": "Next action inspect हुआ",
|
|
102
|
+
"next.help.exit.fail": "Next action inspect नहीं हो सका",
|
|
103
|
+
"next.title": "mustflow next",
|
|
104
|
+
"next.label.status": "Status",
|
|
105
|
+
"next.label.nextAction": "Next action",
|
|
106
|
+
"next.label.reason": "Reason",
|
|
107
|
+
"next.label.selectedIntents": "Selected verification",
|
|
108
|
+
"next.label.gaps": "Gaps",
|
|
109
|
+
"next.section.gaps": "Verification gaps",
|
|
110
|
+
"next.section.blockers": "Blockers",
|
|
111
|
+
"next.section.warnings": "Warnings",
|
|
112
|
+
"next.section.commands": "Recommended commands",
|
|
113
|
+
"evidence.help.summary": "commands चलाए बिना changed-file verification requirements, latest evidence, receipts और remaining gaps summarize करें.",
|
|
114
|
+
"evidence.help.option.changed": "current changed-file verification plan से evidence report बनाएँ",
|
|
115
|
+
"evidence.help.option.latest": "सिर्फ latest stored run या verify evidence summarize करें",
|
|
116
|
+
"evidence.help.option.plan": "saved mustflow verification-plan JSON file से evidence report बनाएँ",
|
|
117
|
+
"evidence.help.option.export": "mustflow root के अंदर path पर evidence report JSON लिखें",
|
|
118
|
+
"evidence.help.exit.ok": "Evidence inspect हो गया",
|
|
119
|
+
"evidence.help.exit.fail": "Evidence inspect नहीं हो सका",
|
|
120
|
+
"evidence.error.conflictingInputs": "सिर्फ एक evidence source चुनें: --changed, --latest, या --plan",
|
|
121
|
+
"evidence.title": "mustflow evidence",
|
|
122
|
+
"evidence.label.status": "Status",
|
|
123
|
+
"evidence.label.source": "Source",
|
|
124
|
+
"evidence.label.plan": "Verification plan",
|
|
125
|
+
"evidence.label.requirements": "Requirements",
|
|
126
|
+
"evidence.label.selectedIntents": "Selected intents",
|
|
127
|
+
"evidence.label.gaps": "Gaps",
|
|
128
|
+
"evidence.label.latest": "Latest evidence",
|
|
129
|
+
"evidence.section.requirements": "Requirements",
|
|
130
|
+
"evidence.section.gaps": "Gaps",
|
|
131
|
+
"evidence.section.remainingRisks": "Remaining risks",
|
|
132
|
+
"workspace.help.summary": "command authority दिए बिना configured workspace roots और nested repository contract readiness inspect करें.",
|
|
133
|
+
"workspace.help.action.status": "discovered nested repositories और उनके local mustflow contract status प्रिंट करें",
|
|
134
|
+
"workspace.help.action.commandCatalog": "raw command strings के बिना per-repository command intent availability प्रिंट करें",
|
|
135
|
+
"workspace.help.action.verify": "commands चलाए बिना per-repository changed-file verification plans प्रिंट करें",
|
|
136
|
+
"workspace.help.exit.ok": "Workspace status inspect हुआ",
|
|
137
|
+
"workspace.error.missingAction": "workspace action बताएँ: status, command-catalog या verify",
|
|
138
|
+
"workspace.error.unknownAction": "अज्ञात workspace action: {action}",
|
|
139
|
+
"workspace.error.verifyRequiresChanged": "workspace verify के लिए --changed चाहिए",
|
|
140
|
+
"workspace.error.verifyRequiresPlanOnly": "workspace verify के लिए --plan-only चाहिए",
|
|
85
141
|
"context.help.summary": "वर्तमान mustflow रूट के लिए एजेंट संदर्भ प्रिंट करें।",
|
|
86
142
|
"context.help.option.json": "मशीन-पठनीय संदर्भ JSON प्रिंट करें",
|
|
87
143
|
"context.help.option.cacheProfile": "prompt cache profile प्रिंट करें: stable, task, volatile, या all",
|
|
@@ -95,11 +151,14 @@ export const hiMessages = {
|
|
|
95
151
|
"api.help.action.diffRisk": "बदली गई files के लिए compact risk और verification summary प्रिंट करें",
|
|
96
152
|
"api.help.action.health": "workspace health की compact summary प्रिंट करें",
|
|
97
153
|
"api.help.action.locks": "multi-session coordination के लिए active mf run locks प्रिंट करें",
|
|
154
|
+
"api.help.action.serve": "line-delimited stdio पर read-only API reports serve करें",
|
|
155
|
+
"api.help.option.stdio": "stdin से line-delimited JSON requests पढ़ें और JSON responses प्रिंट करें",
|
|
98
156
|
"api.help.exit.ok": "API रिपोर्ट जाँची और प्रिंट की गई",
|
|
99
|
-
"api.error.missingAction": "api action बताएँ: workspace-summary, command-catalog, verification-plan, latest-evidence, diff-risk, health, या
|
|
157
|
+
"api.error.missingAction": "api action बताएँ: workspace-summary, command-catalog, verification-plan, latest-evidence, diff-risk, health, locks, या serve",
|
|
100
158
|
"api.error.unknownAction": "अज्ञात api action: {action}",
|
|
101
159
|
"api.error.actionRequiresJson": "{action} के लिए --json चाहिए",
|
|
102
160
|
"api.error.actionRequiresChanged": "{action} को अभी --changed चाहिए",
|
|
161
|
+
"api.error.serveRequiresStdio": "api serve के लिए --stdio चाहिए",
|
|
103
162
|
"label.installed": "इंस्टॉल किया गया",
|
|
104
163
|
"label.mustflowRoot": "mustflow रूट",
|
|
105
164
|
"label.commandContract": "कमांड विनिर्देश",
|
package/dist/cli/i18n/ko.js
CHANGED
|
@@ -30,6 +30,10 @@ export const koMessages = {
|
|
|
30
30
|
"command.check.summary": "mustflow 파일을 검사합니다",
|
|
31
31
|
"command.classify.summary": "변경 파일과 공개 표면을 분류합니다",
|
|
32
32
|
"command.contractLint.summary": "명령 계약을 점검합니다",
|
|
33
|
+
"command.onboard.summary": "검토 전용 명령 온보딩 조각을 제안합니다",
|
|
34
|
+
"command.next.summary": "다음 안전한 mustflow 행동을 고릅니다",
|
|
35
|
+
"command.evidence.summary": "검증 요구사항, 증거, 구멍을 요약합니다",
|
|
36
|
+
"command.workspace.summary": "설정된 workspace root와 nested repository 계약을 확인합니다",
|
|
33
37
|
"command.status.summary": "로컬 mustflow 설치 상태를 출력합니다",
|
|
34
38
|
"command.update.summary": "mustflow 워크플로우 갱신을 미리 보거나 적용합니다",
|
|
35
39
|
"command.upgrade.summary": "패키지 버전을 확인하고 설치된 워크플로우 파일을 안전하게 갱신합니다",
|
|
@@ -82,6 +86,58 @@ export const koMessages = {
|
|
|
82
86
|
"contractLint.label.coverageFindings": "연결 상태 발견 항목",
|
|
83
87
|
"contractLint.label.suggestions": "제안",
|
|
84
88
|
"contractLint.label.issues": "문제",
|
|
89
|
+
"onboard.help.summary": "기존 package, Make, just 명령 파일에서 검토 전용 command-intent 조각을 제안합니다.",
|
|
90
|
+
"onboard.help.exit.ok": "명령 온보딩 제안을 확인했습니다",
|
|
91
|
+
"onboard.help.exit.fail": "onboard 명령 입력이 잘못되었습니다",
|
|
92
|
+
"onboard.title": "mustflow 명령 온보딩",
|
|
93
|
+
"onboard.label.suggestions": "제안",
|
|
94
|
+
"onboard.label.reviewOnly": "검토 전용",
|
|
95
|
+
"onboard.label.writesFiles": "파일 쓰기",
|
|
96
|
+
"onboard.label.reviewSnippets": "검토 전용 조각",
|
|
97
|
+
"onboard.label.nextSteps": "다음 단계",
|
|
98
|
+
"onboard.error.missingAction": "onboard 작업을 지정하세요: commands",
|
|
99
|
+
"onboard.error.unknownAction": "알 수 없는 onboard 작업: {action}",
|
|
100
|
+
"next.help.summary": "현재 루트와 변경 파일을 확인한 뒤 다음 안전한 mustflow 행동을 출력합니다.",
|
|
101
|
+
"next.help.exit.ok": "다음 행동을 확인했습니다",
|
|
102
|
+
"next.help.exit.fail": "다음 행동을 확인하지 못했습니다",
|
|
103
|
+
"next.title": "mustflow 다음 행동",
|
|
104
|
+
"next.label.status": "상태",
|
|
105
|
+
"next.label.nextAction": "다음 행동",
|
|
106
|
+
"next.label.reason": "이유",
|
|
107
|
+
"next.label.selectedIntents": "선택된 검증",
|
|
108
|
+
"next.label.gaps": "구멍",
|
|
109
|
+
"next.section.gaps": "검증 구멍",
|
|
110
|
+
"next.section.blockers": "차단 항목",
|
|
111
|
+
"next.section.warnings": "경고",
|
|
112
|
+
"next.section.commands": "추천 명령",
|
|
113
|
+
"evidence.help.summary": "명령을 실행하지 않고 changed-file 검증 요구사항, 최신 증거, receipt, 남은 구멍을 요약합니다.",
|
|
114
|
+
"evidence.help.option.changed": "현재 changed-file 검증 계획에서 evidence report를 만듭니다",
|
|
115
|
+
"evidence.help.option.latest": "최신 저장 run 또는 verify evidence만 요약합니다",
|
|
116
|
+
"evidence.help.option.plan": "저장된 mustflow verification-plan JSON 파일에서 evidence report를 만듭니다",
|
|
117
|
+
"evidence.help.option.export": "mustflow root 내부 경로에 evidence report JSON을 씁니다",
|
|
118
|
+
"evidence.help.exit.ok": "Evidence를 확인했습니다",
|
|
119
|
+
"evidence.help.exit.fail": "Evidence를 확인할 수 없습니다",
|
|
120
|
+
"evidence.error.conflictingInputs": "evidence source는 --changed, --latest, --plan 중 하나만 고르세요",
|
|
121
|
+
"evidence.title": "mustflow evidence",
|
|
122
|
+
"evidence.label.status": "상태",
|
|
123
|
+
"evidence.label.source": "소스",
|
|
124
|
+
"evidence.label.plan": "검증 계획",
|
|
125
|
+
"evidence.label.requirements": "요구사항",
|
|
126
|
+
"evidence.label.selectedIntents": "선택된 intent",
|
|
127
|
+
"evidence.label.gaps": "구멍",
|
|
128
|
+
"evidence.label.latest": "최신 evidence",
|
|
129
|
+
"evidence.section.requirements": "요구사항",
|
|
130
|
+
"evidence.section.gaps": "구멍",
|
|
131
|
+
"evidence.section.remainingRisks": "남은 리스크",
|
|
132
|
+
"workspace.help.summary": "명령 권한을 부여하지 않고 설정된 workspace root와 nested repository 계약 준비 상태를 확인합니다.",
|
|
133
|
+
"workspace.help.action.status": "발견된 nested repository와 각 로컬 mustflow 계약 상태를 출력합니다",
|
|
134
|
+
"workspace.help.action.commandCatalog": "raw command string 없이 repository별 command intent 사용 가능 상태를 출력합니다",
|
|
135
|
+
"workspace.help.action.verify": "명령을 실행하지 않고 repository별 changed-file verification plan을 출력합니다",
|
|
136
|
+
"workspace.help.exit.ok": "workspace 상태를 확인했습니다",
|
|
137
|
+
"workspace.error.missingAction": "workspace 작업을 지정하세요: status, command-catalog 또는 verify",
|
|
138
|
+
"workspace.error.unknownAction": "알 수 없는 workspace 작업: {action}",
|
|
139
|
+
"workspace.error.verifyRequiresChanged": "workspace verify에는 --changed가 필요합니다",
|
|
140
|
+
"workspace.error.verifyRequiresPlanOnly": "workspace verify에는 --plan-only가 필요합니다",
|
|
85
141
|
"context.help.summary": "현재 mustflow 루트의 에이전트 작업 맥락을 출력합니다.",
|
|
86
142
|
"context.help.option.json": "맥락을 JSON 형식으로 출력합니다",
|
|
87
143
|
"context.help.option.cacheProfile": "프롬프트 캐시 프로필을 출력합니다: stable, task, volatile, all",
|
|
@@ -95,11 +151,14 @@ export const koMessages = {
|
|
|
95
151
|
"api.help.action.diffRisk": "변경 파일 risk와 verification 요약을 작게 출력합니다",
|
|
96
152
|
"api.help.action.health": "workspace health 요약을 작게 출력합니다",
|
|
97
153
|
"api.help.action.locks": "여러 세션 조율용 활성 mf run 잠금을 출력합니다",
|
|
154
|
+
"api.help.action.serve": "줄 단위 stdio로 읽기 전용 API 보고서를 제공합니다",
|
|
155
|
+
"api.help.option.stdio": "stdin에서 줄 단위 JSON 요청을 읽고 JSON 응답을 출력합니다",
|
|
98
156
|
"api.help.exit.ok": "API 보고서를 확인하고 출력했습니다",
|
|
99
|
-
"api.error.missingAction": "api 작업을 지정하세요: workspace-summary, command-catalog, verification-plan, latest-evidence, diff-risk, health 또는
|
|
157
|
+
"api.error.missingAction": "api 작업을 지정하세요: workspace-summary, command-catalog, verification-plan, latest-evidence, diff-risk, health, locks 또는 serve",
|
|
100
158
|
"api.error.unknownAction": "알 수 없는 api 작업: {action}",
|
|
101
159
|
"api.error.actionRequiresJson": "{action}에는 --json이 필요합니다",
|
|
102
160
|
"api.error.actionRequiresChanged": "{action}은 현재 --changed가 필요합니다",
|
|
161
|
+
"api.error.serveRequiresStdio": "api serve에는 --stdio가 필요합니다",
|
|
103
162
|
"label.installed": "설치됨",
|
|
104
163
|
"label.mustflowRoot": "mustflow 루트",
|
|
105
164
|
"label.commandContract": "명령 계약",
|
package/dist/cli/i18n/zh.js
CHANGED
|
@@ -30,6 +30,10 @@ export const zhMessages = {
|
|
|
30
30
|
"command.check.summary": "验证 mustflow 文件",
|
|
31
31
|
"command.classify.summary": "分类变更文件和公开表面",
|
|
32
32
|
"command.contractLint.summary": "检查命令契约",
|
|
33
|
+
"command.onboard.summary": "建议仅供审阅的命令 onboarding 片段",
|
|
34
|
+
"command.next.summary": "选择下一步安全的 mustflow 操作",
|
|
35
|
+
"command.evidence.summary": "汇总验证需求、证据和缺口",
|
|
36
|
+
"command.workspace.summary": "检查已配置的 workspace 根目录和嵌套仓库合同",
|
|
33
37
|
"command.status.summary": "显示本地 mustflow 安装状态",
|
|
34
38
|
"command.update.summary": "预览或应用 mustflow 工作流更新",
|
|
35
39
|
"command.upgrade.summary": "检查包版本并安全更新已安装的工作流文件",
|
|
@@ -82,6 +86,58 @@ export const zhMessages = {
|
|
|
82
86
|
"contractLint.label.coverageFindings": "覆盖发现",
|
|
83
87
|
"contractLint.label.suggestions": "建议",
|
|
84
88
|
"contractLint.label.issues": "问题",
|
|
89
|
+
"onboard.help.summary": "从现有 package、Make 和 just 命令文件建议仅供审阅的 command-intent 片段。",
|
|
90
|
+
"onboard.help.exit.ok": "已检查命令 onboarding 建议",
|
|
91
|
+
"onboard.help.exit.fail": "onboard 命令收到无效输入",
|
|
92
|
+
"onboard.title": "mustflow 命令 onboarding",
|
|
93
|
+
"onboard.label.suggestions": "建议",
|
|
94
|
+
"onboard.label.reviewOnly": "仅供审阅",
|
|
95
|
+
"onboard.label.writesFiles": "写入文件",
|
|
96
|
+
"onboard.label.reviewSnippets": "仅供审阅的片段",
|
|
97
|
+
"onboard.label.nextSteps": "后续步骤",
|
|
98
|
+
"onboard.error.missingAction": "请指定 onboard 操作:commands",
|
|
99
|
+
"onboard.error.unknownAction": "未知 onboard 操作:{action}",
|
|
100
|
+
"next.help.summary": "检查当前 root 和已变更文件,然后输出下一步安全的 mustflow 操作。",
|
|
101
|
+
"next.help.exit.ok": "已检查下一步操作",
|
|
102
|
+
"next.help.exit.fail": "无法检查下一步操作",
|
|
103
|
+
"next.title": "mustflow next",
|
|
104
|
+
"next.label.status": "状态",
|
|
105
|
+
"next.label.nextAction": "下一步操作",
|
|
106
|
+
"next.label.reason": "原因",
|
|
107
|
+
"next.label.selectedIntents": "已选择的验证",
|
|
108
|
+
"next.label.gaps": "缺口",
|
|
109
|
+
"next.section.gaps": "验证缺口",
|
|
110
|
+
"next.section.blockers": "阻塞项",
|
|
111
|
+
"next.section.warnings": "警告",
|
|
112
|
+
"next.section.commands": "推荐命令",
|
|
113
|
+
"evidence.help.summary": "在不执行命令的情况下汇总 changed-file 验证需求、最新证据、receipt 和剩余缺口。",
|
|
114
|
+
"evidence.help.option.changed": "从当前 changed-file 验证计划生成 evidence report",
|
|
115
|
+
"evidence.help.option.latest": "仅汇总最新保存的 run 或 verify evidence",
|
|
116
|
+
"evidence.help.option.plan": "从已保存的 mustflow verification-plan JSON 文件生成 evidence report",
|
|
117
|
+
"evidence.help.option.export": "将 evidence report JSON 写入 mustflow root 内的路径",
|
|
118
|
+
"evidence.help.exit.ok": "Evidence 已检查",
|
|
119
|
+
"evidence.help.exit.fail": "无法检查 evidence",
|
|
120
|
+
"evidence.error.conflictingInputs": "只能选择一个 evidence 来源:--changed、--latest 或 --plan",
|
|
121
|
+
"evidence.title": "mustflow evidence",
|
|
122
|
+
"evidence.label.status": "状态",
|
|
123
|
+
"evidence.label.source": "来源",
|
|
124
|
+
"evidence.label.plan": "验证计划",
|
|
125
|
+
"evidence.label.requirements": "需求",
|
|
126
|
+
"evidence.label.selectedIntents": "已选择的 intent",
|
|
127
|
+
"evidence.label.gaps": "缺口",
|
|
128
|
+
"evidence.label.latest": "最新 evidence",
|
|
129
|
+
"evidence.section.requirements": "需求",
|
|
130
|
+
"evidence.section.gaps": "缺口",
|
|
131
|
+
"evidence.section.remainingRisks": "剩余风险",
|
|
132
|
+
"workspace.help.summary": "检查已配置的 workspace 根目录和嵌套仓库合同状态,但不授予命令权限。",
|
|
133
|
+
"workspace.help.action.status": "输出发现的嵌套仓库及其本地 mustflow 合同状态",
|
|
134
|
+
"workspace.help.action.commandCatalog": "输出各仓库的命令 intent 可用性,不包含原始命令字符串",
|
|
135
|
+
"workspace.help.action.verify": "输出各仓库的变更文件验证计划,但不运行命令",
|
|
136
|
+
"workspace.help.exit.ok": "已检查 workspace 状态",
|
|
137
|
+
"workspace.error.missingAction": "请指定 workspace 操作:status、command-catalog 或 verify",
|
|
138
|
+
"workspace.error.unknownAction": "未知 workspace 操作:{action}",
|
|
139
|
+
"workspace.error.verifyRequiresChanged": "workspace verify 需要 --changed",
|
|
140
|
+
"workspace.error.verifyRequiresPlanOnly": "workspace verify 需要 --plan-only",
|
|
85
141
|
"context.help.summary": "输出当前 mustflow 根目录的代理上下文。",
|
|
86
142
|
"context.help.option.json": "输出机器可读的上下文 JSON",
|
|
87
143
|
"context.help.option.cacheProfile": "输出提示缓存配置文件:stable、task、volatile 或 all",
|
|
@@ -95,11 +151,14 @@ export const zhMessages = {
|
|
|
95
151
|
"api.help.action.diffRisk": "为已变更文件输出紧凑 risk 和 verification 摘要",
|
|
96
152
|
"api.help.action.health": "输出紧凑 workspace health 摘要",
|
|
97
153
|
"api.help.action.locks": "输出用于多会话协调的活动 mf run 锁",
|
|
154
|
+
"api.help.action.serve": "通过按行分隔的 stdio 提供只读 API 报告",
|
|
155
|
+
"api.help.option.stdio": "从 stdin 读取按行分隔的 JSON 请求并输出 JSON 响应",
|
|
98
156
|
"api.help.exit.ok": "已检查并输出 API 报告",
|
|
99
|
-
"api.error.missingAction": "请指定 api 操作:workspace-summary、command-catalog、verification-plan、latest-evidence、diff-risk、health 或
|
|
157
|
+
"api.error.missingAction": "请指定 api 操作:workspace-summary、command-catalog、verification-plan、latest-evidence、diff-risk、health、locks 或 serve",
|
|
100
158
|
"api.error.unknownAction": "未知 api 操作:{action}",
|
|
101
159
|
"api.error.actionRequiresJson": "{action} 需要 --json",
|
|
102
160
|
"api.error.actionRequiresChanged": "{action} 当前需要 --changed",
|
|
161
|
+
"api.error.serveRequiresStdio": "api serve 需要 --stdio",
|
|
103
162
|
"label.installed": "已安装",
|
|
104
163
|
"label.mustflowRoot": "mustflow 根目录",
|
|
105
164
|
"label.commandContract": "命令规范",
|
package/dist/cli/index.js
CHANGED
|
@@ -5,7 +5,11 @@ import { fileURLToPath } from 'node:url';
|
|
|
5
5
|
import { COMMAND_DEFINITIONS, findCommandDefinition } from './lib/command-registry.js';
|
|
6
6
|
import { renderCliError, renderHelp } from './lib/cli-output.js';
|
|
7
7
|
import { DEFAULT_CLI_LANG, SUPPORTED_CLI_LANGS, isCliLang, t } from './lib/i18n.js';
|
|
8
|
+
import { parseCliOptions } from './lib/option-parser.js';
|
|
8
9
|
import { consoleReporter } from './lib/reporter.js';
|
|
10
|
+
const GLOBAL_OPTIONS = [
|
|
11
|
+
{ name: '--lang', kind: 'string' },
|
|
12
|
+
];
|
|
9
13
|
function getTopLevelHelp(lang) {
|
|
10
14
|
return renderHelp({
|
|
11
15
|
usage: 'mf [--lang <lang>] <command> [options]',
|
|
@@ -24,6 +28,7 @@ function getTopLevelHelp(lang) {
|
|
|
24
28
|
examples: [
|
|
25
29
|
'mf --lang ko help',
|
|
26
30
|
'mf api workspace-summary --json',
|
|
31
|
+
'mf api serve --stdio',
|
|
27
32
|
'mf adapters status --json',
|
|
28
33
|
'mf init --dry-run',
|
|
29
34
|
'mf doctor --json',
|
|
@@ -32,6 +37,11 @@ function getTopLevelHelp(lang) {
|
|
|
32
37
|
'mf check --json',
|
|
33
38
|
'mf classify --changed',
|
|
34
39
|
'mf contract-lint --json',
|
|
40
|
+
'mf onboard commands --json',
|
|
41
|
+
'mf next --json',
|
|
42
|
+
'mf evidence --changed --json',
|
|
43
|
+
'mf workspace status --json',
|
|
44
|
+
'mf workspace verify --changed --plan-only --json',
|
|
35
45
|
'mf context --json',
|
|
36
46
|
'mf map --write',
|
|
37
47
|
'mf search mustflow_check',
|
|
@@ -62,35 +72,28 @@ function getErrorMessage(error) {
|
|
|
62
72
|
}
|
|
63
73
|
function parseGlobalOptions(argv) {
|
|
64
74
|
let lang = DEFAULT_CLI_LANG;
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
if (!isCliLang(value)) {
|
|
77
|
-
return { lang, args, error: t(lang, 'cli.error.unsupportedLanguage', { language: value }) };
|
|
78
|
-
}
|
|
79
|
-
lang = value;
|
|
80
|
-
index += 1;
|
|
75
|
+
const parsed = parseCliOptions(argv, GLOBAL_OPTIONS, {
|
|
76
|
+
allowPositionals: true,
|
|
77
|
+
allowUnknownOptions: true,
|
|
78
|
+
allowEmptyStringValues: true,
|
|
79
|
+
});
|
|
80
|
+
if (parsed.error) {
|
|
81
|
+
return { lang, args: parsed.positionals, error: t(lang, 'cli.error.missingLangValue') };
|
|
82
|
+
}
|
|
83
|
+
for (const occurrence of parsed.occurrences) {
|
|
84
|
+
if (occurrence.name !== '--lang' || typeof occurrence.value !== 'string') {
|
|
81
85
|
continue;
|
|
82
86
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
continue;
|
|
87
|
+
if (!isCliLang(occurrence.value)) {
|
|
88
|
+
return {
|
|
89
|
+
lang,
|
|
90
|
+
args: parsed.positionals,
|
|
91
|
+
error: t(lang, 'cli.error.unsupportedLanguage', { language: occurrence.value }),
|
|
92
|
+
};
|
|
90
93
|
}
|
|
91
|
-
|
|
94
|
+
lang = occurrence.value;
|
|
92
95
|
}
|
|
93
|
-
return { lang, args };
|
|
96
|
+
return { lang, args: parsed.positionals };
|
|
94
97
|
}
|
|
95
98
|
export async function runCli(argv, reporter = consoleReporter) {
|
|
96
99
|
const parsed = parseGlobalOptions(argv);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { isRecord,
|
|
4
|
+
import { isRecord, readString, readStringArray, } from './command-contract.js';
|
|
5
5
|
import { readRetentionStore } from '../../core/retention-policy.js';
|
|
6
6
|
import { toPosixPath } from './filesystem.js';
|
|
7
7
|
import { readLocalIndexPromptContext } from './local-index.js';
|
|
8
8
|
import { inspectManifestLock } from './manifest-lock.js';
|
|
9
9
|
import { MUSTFLOW_JSON_MAX_BYTES, readMustflowTextFile, readMustflowTextFileIfExists, } from './mustflow-read.js';
|
|
10
|
+
import { createRunPlan } from './run-plan.js';
|
|
10
11
|
import { readMustflowTomlFile } from './toml.js';
|
|
11
12
|
const CONTEXT_SCHEMA_VERSION = '1';
|
|
12
13
|
const COMMANDS_RELATIVE_PATH = '.mustflow/config/commands.toml';
|
|
@@ -105,13 +106,6 @@ function readScalarObject(table) {
|
|
|
105
106
|
function sha256(content) {
|
|
106
107
|
return `sha256:${createHash('sha256').update(content).digest('hex')}`;
|
|
107
108
|
}
|
|
108
|
-
function isRunnableIntent(intent) {
|
|
109
|
-
return (readString(intent, 'status') === 'configured' &&
|
|
110
|
-
readString(intent, 'lifecycle') === 'oneshot' &&
|
|
111
|
-
readString(intent, 'run_policy') === 'agent_allowed' &&
|
|
112
|
-
intent.stdin === 'closed' &&
|
|
113
|
-
Boolean(readPositiveInteger(intent, 'timeout_seconds')));
|
|
114
|
-
}
|
|
115
109
|
function readCommandContractContext(projectRoot) {
|
|
116
110
|
const commands = readTomlTableIfExists(projectRoot, COMMANDS_RELATIVE_PATH);
|
|
117
111
|
if (!commands || !isRecord(commands.intents)) {
|
|
@@ -124,6 +118,11 @@ function readCommandContractContext(projectRoot) {
|
|
|
124
118
|
}
|
|
125
119
|
const intents = [];
|
|
126
120
|
const runnableIntents = [];
|
|
121
|
+
const contract = {
|
|
122
|
+
defaults: isRecord(commands.defaults) ? commands.defaults : {},
|
|
123
|
+
intents: commands.intents,
|
|
124
|
+
resources: isRecord(commands.resources) ? commands.resources : {},
|
|
125
|
+
};
|
|
127
126
|
for (const [name, intent] of Object.entries(commands.intents).sort(([left], [right]) => left.localeCompare(right))) {
|
|
128
127
|
if (!isRecord(intent)) {
|
|
129
128
|
continue;
|
|
@@ -138,7 +137,7 @@ function readCommandContractContext(projectRoot) {
|
|
|
138
137
|
run_policy: runPolicy,
|
|
139
138
|
description: readString(intent, 'description') ?? null,
|
|
140
139
|
});
|
|
141
|
-
if (
|
|
140
|
+
if (createRunPlan(projectRoot, contract, name).ok) {
|
|
142
141
|
runnableIntents.push(name);
|
|
143
142
|
}
|
|
144
143
|
}
|
|
@@ -35,6 +35,30 @@ export const COMMAND_DEFINITIONS = [
|
|
|
35
35
|
summaryKey: 'command.contractLint.summary',
|
|
36
36
|
loadRunner: async () => (await import('../commands/contract-lint.js')).runContractLint,
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
id: 'onboard',
|
|
40
|
+
usage: 'mf onboard',
|
|
41
|
+
summaryKey: 'command.onboard.summary',
|
|
42
|
+
loadRunner: async () => (await import('../commands/onboard.js')).runOnboard,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: 'next',
|
|
46
|
+
usage: 'mf next',
|
|
47
|
+
summaryKey: 'command.next.summary',
|
|
48
|
+
loadRunner: async () => (await import('../commands/next.js')).runNext,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'evidence',
|
|
52
|
+
usage: 'mf evidence',
|
|
53
|
+
summaryKey: 'command.evidence.summary',
|
|
54
|
+
loadRunner: async () => (await import('../commands/evidence.js')).runEvidence,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'workspace',
|
|
58
|
+
usage: 'mf workspace',
|
|
59
|
+
summaryKey: 'command.workspace.summary',
|
|
60
|
+
loadRunner: async () => (await import('../commands/workspace.js')).runWorkspace,
|
|
61
|
+
},
|
|
38
62
|
{
|
|
39
63
|
id: 'status',
|
|
40
64
|
usage: 'mf status',
|
|
@@ -1237,7 +1237,7 @@ function renderReleaseCommand(root, intentName, fallbackCommand, reasonKey) {
|
|
|
1237
1237
|
name.className = "command-name";
|
|
1238
1238
|
name.textContent = intentName;
|
|
1239
1239
|
const state = document.createElement("div");
|
|
1240
|
-
const runnable =
|
|
1240
|
+
const runnable = intent ? intent.runnable : false;
|
|
1241
1241
|
state.className = runnable ? "command-state ok" : "command-state warn";
|
|
1242
1242
|
state.textContent = runnable ? message("dashboard.commands.runnable") : message("dashboard.verification.unavailable");
|
|
1243
1243
|
summary.appendChild(name);
|