mustflow 1.18.0 → 1.18.15
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 +35 -7
- package/dist/cli/commands/context.js +2 -2
- package/dist/cli/commands/dashboard.js +61 -7
- package/dist/cli/commands/explain.js +47 -7
- package/dist/cli/commands/index.js +9 -2
- package/dist/cli/commands/run.js +7 -15
- package/dist/cli/commands/verify.js +44 -9
- package/dist/cli/i18n/en.js +3 -0
- package/dist/cli/i18n/es.js +3 -0
- package/dist/cli/i18n/fr.js +3 -0
- package/dist/cli/i18n/hi.js +3 -0
- package/dist/cli/i18n/ko.js +3 -0
- package/dist/cli/i18n/zh.js +3 -0
- package/dist/cli/lib/agent-context.js +19 -4
- package/dist/cli/lib/dashboard-html.js +41 -0
- package/dist/cli/lib/dashboard-locale.js +2 -0
- package/dist/cli/lib/local-index.js +910 -32
- package/dist/core/change-classification.js +33 -60
- package/dist/core/command-classification.js +0 -2
- package/dist/core/source-anchor-status.js +4 -4
- package/dist/core/source-anchor-validation.js +2 -6
- package/dist/core/source-anchors.js +81 -3
- package/package.json +1 -1
- package/schemas/change-verification-report.schema.json +194 -0
- package/schemas/context-report.schema.json +30 -2
- package/schemas/explain-report.schema.json +191 -0
- package/templates/default/i18n.toml +26 -6
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +3 -1
- package/templates/default/locales/en/.mustflow/skills/database-change-safety/SKILL.md +155 -0
- package/templates/default/locales/en/.mustflow/skills/test-design-guard/SKILL.md +162 -0
- package/templates/default/locales/en/AGENTS.md +5 -5
- package/templates/default/locales/es/.mustflow/skills/INDEX.md +3 -1
- package/templates/default/locales/es/.mustflow/skills/database-change-safety/SKILL.md +155 -0
- package/templates/default/locales/es/.mustflow/skills/test-design-guard/SKILL.md +162 -0
- package/templates/default/locales/fr/.mustflow/skills/INDEX.md +3 -1
- package/templates/default/locales/fr/.mustflow/skills/database-change-safety/SKILL.md +155 -0
- package/templates/default/locales/fr/.mustflow/skills/test-design-guard/SKILL.md +162 -0
- package/templates/default/locales/hi/.mustflow/skills/INDEX.md +3 -1
- package/templates/default/locales/hi/.mustflow/skills/database-change-safety/SKILL.md +155 -0
- package/templates/default/locales/hi/.mustflow/skills/test-design-guard/SKILL.md +162 -0
- package/templates/default/locales/ko/.mustflow/skills/INDEX.md +4 -2
- package/templates/default/locales/ko/.mustflow/skills/database-change-safety/SKILL.md +155 -0
- package/templates/default/locales/ko/.mustflow/skills/test-design-guard/SKILL.md +162 -0
- package/templates/default/locales/zh/.mustflow/skills/INDEX.md +3 -1
- package/templates/default/locales/zh/.mustflow/skills/database-change-safety/SKILL.md +155 -0
- package/templates/default/locales/zh/.mustflow/skills/test-design-guard/SKILL.md +162 -0
- package/templates/default/manifest.toml +13 -1
package/dist/cli/i18n/fr.js
CHANGED
|
@@ -179,6 +179,8 @@ export const frMessages = {
|
|
|
179
179
|
"dashboard.commands.writes": "chemins écrits",
|
|
180
180
|
"dashboard.commands.reason": "raison",
|
|
181
181
|
"dashboard.commands.agentAction": "action agent",
|
|
182
|
+
"dashboard.commands.effectGraph": "effets de commande",
|
|
183
|
+
"dashboard.commands.effectGraphUnavailable": "Effets de commande indisponibles",
|
|
182
184
|
"dashboard.release.reloaded": "État de publication rechargé",
|
|
183
185
|
"dashboard.release.copied": "Commande copiée",
|
|
184
186
|
"dashboard.release.overview": "Aperçu",
|
|
@@ -459,6 +461,7 @@ export const frMessages = {
|
|
|
459
461
|
"index.help.summary": "Construit un index SQLite régénérable pour le flux de travail mustflow.",
|
|
460
462
|
"index.help.option.dryRun": "Calcule les cibles d'index sans écrire de fichiers",
|
|
461
463
|
"index.help.option.source": "Inclure les ancres structurées du code source sans stocker le contenu source",
|
|
464
|
+
"index.help.option.incremental": "Réutilise un index local récent et compatible au lieu de le réécrire",
|
|
462
465
|
"index.help.exit.ok": "Les cibles d'index ont été calculées et éventuellement écrites",
|
|
463
466
|
"index.title": "index mustflow",
|
|
464
467
|
"index.dryRunNoFiles": "Simulation : aucun fichier n'a été écrit.",
|
package/dist/cli/i18n/hi.js
CHANGED
|
@@ -179,6 +179,8 @@ export const hiMessages = {
|
|
|
179
179
|
"dashboard.commands.writes": "लिखे जाने वाले पथ",
|
|
180
180
|
"dashboard.commands.reason": "कारण",
|
|
181
181
|
"dashboard.commands.agentAction": "एजेंट कार्रवाई",
|
|
182
|
+
"dashboard.commands.effectGraph": "कमांड प्रभाव",
|
|
183
|
+
"dashboard.commands.effectGraphUnavailable": "कमांड प्रभाव उपलब्ध नहीं हैं",
|
|
182
184
|
"dashboard.release.reloaded": "रिलीज़ स्थिति फिर से लोड हुई",
|
|
183
185
|
"dashboard.release.copied": "कमांड कॉपी हुआ",
|
|
184
186
|
"dashboard.release.overview": "सारांश",
|
|
@@ -459,6 +461,7 @@ export const hiMessages = {
|
|
|
459
461
|
"index.help.summary": "mustflow वर्कफ़्लो के लिए फिर से बनाया जा सकने वाला SQLite इंडेक्स बनाएँ।",
|
|
460
462
|
"index.help.option.dryRun": "फ़ाइलें लिखे बिना इंडेक्स लक्ष्य गणना करें",
|
|
461
463
|
"index.help.option.source": "Source content store किए बिना structured source-code anchors शामिल करें",
|
|
464
|
+
"index.help.option.incremental": "ताज़ा और compatible local index को rewrite करने के बजाय reuse करें",
|
|
462
465
|
"index.help.exit.ok": "इंडेक्स लक्ष्य गणना किए गए और वैकल्पिक रूप से लिखे गए",
|
|
463
466
|
"index.title": "mustflow इंडेक्स",
|
|
464
467
|
"index.dryRunNoFiles": "ड्राई रन: कोई फ़ाइल नहीं लिखी गई।",
|
package/dist/cli/i18n/ko.js
CHANGED
|
@@ -179,6 +179,8 @@ export const koMessages = {
|
|
|
179
179
|
"dashboard.commands.writes": "쓰기 경로",
|
|
180
180
|
"dashboard.commands.reason": "이유",
|
|
181
181
|
"dashboard.commands.agentAction": "에이전트 조치",
|
|
182
|
+
"dashboard.commands.effectGraph": "명령 효과",
|
|
183
|
+
"dashboard.commands.effectGraphUnavailable": "명령 효과 정보를 사용할 수 없습니다",
|
|
182
184
|
"dashboard.release.reloaded": "릴리스 상태를 다시 불러왔습니다",
|
|
183
185
|
"dashboard.release.copied": "명령을 복사했습니다",
|
|
184
186
|
"dashboard.release.overview": "개요",
|
|
@@ -459,6 +461,7 @@ export const koMessages = {
|
|
|
459
461
|
"index.help.summary": "mustflow 워크플로우를 SQLite 색인으로 생성합니다.",
|
|
460
462
|
"index.help.option.dryRun": "색인 대상만 계산하고 파일을 쓰지 않습니다",
|
|
461
463
|
"index.help.option.source": "소스 본문을 저장하지 않고 구조화된 소스 코드 앵커를 포함합니다",
|
|
464
|
+
"index.help.option.incremental": "호환되는 최신 로컬 색인이 있으면 다시 쓰지 않고 재사용합니다",
|
|
462
465
|
"index.help.exit.ok": "색인 대상을 계산했고 선택적으로 SQLite 파일을 저장했습니다",
|
|
463
466
|
"index.title": "mustflow 색인",
|
|
464
467
|
"index.dryRunNoFiles": "드라이런: 파일을 쓰지 않았습니다.",
|
package/dist/cli/i18n/zh.js
CHANGED
|
@@ -179,6 +179,8 @@ export const zhMessages = {
|
|
|
179
179
|
"dashboard.commands.writes": "写入路径",
|
|
180
180
|
"dashboard.commands.reason": "原因",
|
|
181
181
|
"dashboard.commands.agentAction": "代理操作",
|
|
182
|
+
"dashboard.commands.effectGraph": "命令效果",
|
|
183
|
+
"dashboard.commands.effectGraphUnavailable": "命令效果图不可用",
|
|
182
184
|
"dashboard.release.reloaded": "发布状态已重新加载",
|
|
183
185
|
"dashboard.release.copied": "命令已复制",
|
|
184
186
|
"dashboard.release.overview": "概览",
|
|
@@ -459,6 +461,7 @@ export const zhMessages = {
|
|
|
459
461
|
"index.help.summary": "为 mustflow 工作流构建可重新生成的 SQLite 索引。",
|
|
460
462
|
"index.help.option.dryRun": "计算索引目标但不写入文件",
|
|
461
463
|
"index.help.option.source": "包含结构化源码锚点但不存储源码内容",
|
|
464
|
+
"index.help.option.incremental": "如果本地索引新鲜且兼容,则复用而不重写",
|
|
462
465
|
"index.help.exit.ok": "已计算索引目标,并可选写入",
|
|
463
466
|
"index.title": "mustflow 索引",
|
|
464
467
|
"index.dryRunNoFiles": "试运行:未写入文件。",
|
|
@@ -4,6 +4,7 @@ import path from 'node:path';
|
|
|
4
4
|
import { isRecord, readPositiveInteger, readString, readStringArray, } from './command-contract.js';
|
|
5
5
|
import { readRetentionStore } from '../../core/retention-policy.js';
|
|
6
6
|
import { toPosixPath } from './filesystem.js';
|
|
7
|
+
import { readLocalIndexPromptContext } from './local-index.js';
|
|
7
8
|
import { inspectManifestLock } from './manifest-lock.js';
|
|
8
9
|
import { readTomlFile } from './toml.js';
|
|
9
10
|
const CONTEXT_SCHEMA_VERSION = '1';
|
|
@@ -261,12 +262,26 @@ function readStablePromptCacheLayer(projectRoot, mustflow) {
|
|
|
261
262
|
volatile_excluded: readOptionalStringArray(volatileLayer, 'sources') ?? [...DEFAULT_PROMPT_CACHE_VOLATILE_SOURCES],
|
|
262
263
|
};
|
|
263
264
|
}
|
|
264
|
-
function
|
|
265
|
+
function mapLocalIndexPromptContext(context) {
|
|
266
|
+
return {
|
|
267
|
+
source: context.source,
|
|
268
|
+
status: context.status,
|
|
269
|
+
database_path: context.databasePath,
|
|
270
|
+
index_fresh: context.indexFresh,
|
|
271
|
+
stale_paths: context.stalePaths,
|
|
272
|
+
search_backend: context.searchBackend,
|
|
273
|
+
search_fts5_available: context.searchFts5Available,
|
|
274
|
+
refresh_hint: context.refreshHint,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
async function readTaskPromptCacheLayer(projectRoot, mustflow) {
|
|
265
278
|
const layer = readPromptCacheLayer(mustflow, 'task');
|
|
279
|
+
const localIndex = await readLocalIndexPromptContext(projectRoot);
|
|
266
280
|
return {
|
|
267
281
|
cache_layer: 'task',
|
|
268
282
|
read_policy: readOptionalString(layer, 'read_policy'),
|
|
269
283
|
sources: readOptionalStringArray(layer, 'sources') ?? [...DEFAULT_PROMPT_CACHE_TASK_SOURCES],
|
|
284
|
+
local_index: mapLocalIndexPromptContext(localIndex),
|
|
270
285
|
};
|
|
271
286
|
}
|
|
272
287
|
function readVolatilePromptCacheLayer(mustflow) {
|
|
@@ -279,7 +294,7 @@ function readVolatilePromptCacheLayer(mustflow) {
|
|
|
279
294
|
include_latest_run: false,
|
|
280
295
|
};
|
|
281
296
|
}
|
|
282
|
-
export function getPromptCacheProfileContext(projectRoot, profile) {
|
|
297
|
+
export async function getPromptCacheProfileContext(projectRoot, profile) {
|
|
283
298
|
const mustflow = readTomlTableIfExists(projectRoot, MUSTFLOW_RELATIVE_PATH);
|
|
284
299
|
const lockInspection = inspectManifestLock(projectRoot);
|
|
285
300
|
const output = {
|
|
@@ -295,7 +310,7 @@ export function getPromptCacheProfileContext(projectRoot, profile) {
|
|
|
295
310
|
stable_prefix: readStablePromptCacheLayer(projectRoot, mustflow),
|
|
296
311
|
...(profile === 'all'
|
|
297
312
|
? {
|
|
298
|
-
task_context: readTaskPromptCacheLayer(mustflow),
|
|
313
|
+
task_context: await readTaskPromptCacheLayer(projectRoot, mustflow),
|
|
299
314
|
volatile_suffix: readVolatilePromptCacheLayer(mustflow),
|
|
300
315
|
}
|
|
301
316
|
: {}),
|
|
@@ -304,7 +319,7 @@ export function getPromptCacheProfileContext(projectRoot, profile) {
|
|
|
304
319
|
if (profile === 'task') {
|
|
305
320
|
return {
|
|
306
321
|
...output,
|
|
307
|
-
task_context: readTaskPromptCacheLayer(mustflow),
|
|
322
|
+
task_context: await readTaskPromptCacheLayer(projectRoot, mustflow),
|
|
308
323
|
};
|
|
309
324
|
}
|
|
310
325
|
return {
|
|
@@ -1140,6 +1140,35 @@ function formatList(values) {
|
|
|
1140
1140
|
return values.length === 0 ? message("value.none") : values.join(", ");
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
1143
|
+
function formatCommandWriteLock(writeLock) {
|
|
1144
|
+
const paths = writeLock.paths.length === 0 ? message("value.none") : writeLock.paths.join(", ");
|
|
1145
|
+
return writeLock.lock + ": " + paths;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
function formatCommandLockConflict(conflict) {
|
|
1149
|
+
const paths = conflict.conflicting_paths.length === 0 ? "" : " / " + conflict.conflicting_paths.join(", ");
|
|
1150
|
+
return conflict.intent + " (" + conflict.lock + ")" + paths;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
function appendCommandEffectGraph(root, intent) {
|
|
1154
|
+
const graph = intent.effect_graph;
|
|
1155
|
+
if (!graph || graph.status !== "fresh") return;
|
|
1156
|
+
|
|
1157
|
+
if (graph.write_locks.length > 0) {
|
|
1158
|
+
const locks = document.createElement("div");
|
|
1159
|
+
locks.className = "verification-files";
|
|
1160
|
+
locks.textContent = message("dashboard.commands.effectGraph") + ": " + graph.write_locks.map(formatCommandWriteLock).join(", ");
|
|
1161
|
+
root.appendChild(locks);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
if (graph.lock_conflicts.length > 0) {
|
|
1165
|
+
const conflicts = document.createElement("div");
|
|
1166
|
+
conflicts.className = "command-note";
|
|
1167
|
+
conflicts.textContent = message("dashboard.verification.conflicts") + ": " + graph.lock_conflicts.map(formatCommandLockConflict).join(", ");
|
|
1168
|
+
root.appendChild(conflicts);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1143
1172
|
function renderCommandPanel() {
|
|
1144
1173
|
const root = document.getElementById("dashboard-commands");
|
|
1145
1174
|
root.textContent = "";
|
|
@@ -1157,6 +1186,17 @@ function renderCommandPanel() {
|
|
|
1157
1186
|
return;
|
|
1158
1187
|
}
|
|
1159
1188
|
|
|
1189
|
+
const graphStatus = dashboardStatus.command_contract.effect_graph_status;
|
|
1190
|
+
if (graphStatus && graphStatus.status !== "fresh") {
|
|
1191
|
+
const note = document.createElement("div");
|
|
1192
|
+
note.className = "command-note";
|
|
1193
|
+
note.textContent =
|
|
1194
|
+
message("dashboard.commands.effectGraphUnavailable") +
|
|
1195
|
+
": " +
|
|
1196
|
+
(graphStatus.refresh_hint || graphStatus.status);
|
|
1197
|
+
section.appendChild(note);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1160
1200
|
for (const intent of dashboardStatus.command_contract.intents) {
|
|
1161
1201
|
const row = document.createElement("div");
|
|
1162
1202
|
row.className = "command-row";
|
|
@@ -1197,6 +1237,7 @@ function renderCommandPanel() {
|
|
|
1197
1237
|
action.textContent = message("dashboard.commands.agentAction") + ": " + intent.agent_action;
|
|
1198
1238
|
details.appendChild(action);
|
|
1199
1239
|
}
|
|
1240
|
+
appendCommandEffectGraph(details, intent);
|
|
1200
1241
|
|
|
1201
1242
|
row.appendChild(summary);
|
|
1202
1243
|
row.appendChild(details);
|
|
@@ -89,6 +89,8 @@ export const DASHBOARD_UI_MESSAGE_KEYS = [
|
|
|
89
89
|
'dashboard.commands.writes',
|
|
90
90
|
'dashboard.commands.reason',
|
|
91
91
|
'dashboard.commands.agentAction',
|
|
92
|
+
'dashboard.commands.effectGraph',
|
|
93
|
+
'dashboard.commands.effectGraphUnavailable',
|
|
92
94
|
'dashboard.release.reloaded',
|
|
93
95
|
'dashboard.release.copied',
|
|
94
96
|
'dashboard.release.overview',
|