skill-family-studio 0.1.0 → 0.2.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "platformId": "codex",
3
3
  "familyId": "skill-family-studio",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "logicalMappings": [
6
6
  {
7
7
  "logicalName": "skill-family-studio",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "platformId": "claude",
3
3
  "familyId": "skill-family-studio",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "logicalMappings": [
6
6
  {
7
7
  "logicalName": "skill-family-studio",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-family-studio",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-family-studio",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-family-studio",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-family-studio",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-family-studio",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.0
3
+ ## 0.2.0
4
4
 
5
5
  - 单端口统一承载三业务主页签(审阅与对齐、制品图谱、运行监控)与按需「📖 手册」,提供零配置单仓与声明式多仓发现。
6
6
  - 支持高阶规划仓 4 列需求进展与双向对齐总览表、机器派生满足度(严格校对代码/测试双锁 SHA-256)、跨仓一键互跳与高阶无代码锁豁免说明。
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-family-studio",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
6
6
  "author": "广州市风荷科技有限公司",
@@ -40,9 +40,9 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "artifact-graph": "1.2.0",
43
- "skill-family-contracts": "0.39.0",
44
- "skill-family-harness-node": "0.39.0",
45
- "skill-family-engineering-kit": "0.39.0",
43
+ "skill-family-contracts": "0.39.2",
44
+ "skill-family-harness-node": "0.39.2",
45
+ "skill-family-engineering-kit": "0.39.2",
46
46
  "yaml": "2.9.0"
47
47
  },
48
48
  "scripts": {
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "skill-family-studio",
3
3
  "displayName": "Skill Family Studio",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
6
6
  "author": "广州市风荷科技有限公司",
7
7
  "repository": "https://github.com/ifoohoo/skill-family-studio"
@@ -6,6 +6,7 @@ import { lstat, readdir, realpath } from 'node:fs/promises';
6
6
  import { basename, join, resolve } from 'node:path';
7
7
  import { promisify } from 'node:util';
8
8
  import { VERSION_LOCK_PATH } from 'artifact-graph';
9
+ import { findSchemaByObject, verifySessionTraceBundleSeal } from 'skill-family-contracts';
9
10
  import { readFileContained, resolveContained } from 'skill-family-harness-node';
10
11
  import { parse as parseYaml } from 'yaml';
11
12
  import {
@@ -309,13 +310,47 @@ async function probeFoundationTrack(repoReal, repoEntry) {
309
310
  for (const rel of extraPinPaths) {
310
311
  const doc = await readJsonContainedSafe(repoReal, rel);
311
312
  if (!doc) continue;
312
- const rawText = JSON.stringify(doc);
313
- const m022 = /\b0\.22\.\d+\b/.exec(rawText);
314
- const m039 = /\b0\.39\.\d+\b/.exec(rawText);
315
- const hitVer = m022?.[0] || m039?.[0] || (typeof doc.pinnedVersion === 'string' ? doc.pinnedVersion : null);
316
- const tuple = parseSemverTuple(hitVer);
317
- if (tuple) {
318
- evidence.push({ pkgName: 'foundation-pin', version: formatSemverTuple(tuple), tuple, source: rel });
313
+ if (Array.isArray(doc.packages) && doc.packages.length > 0) {
314
+ for (const item of doc.packages) {
315
+ const tuple = parseSemverTuple(item?.version);
316
+ if (tuple) {
317
+ evidence.push({
318
+ pkgName: item?.name || 'foundation-pin',
319
+ version: formatSemverTuple(tuple),
320
+ tuple,
321
+ source: `${rel}#packages`,
322
+ });
323
+ }
324
+ }
325
+ continue;
326
+ }
327
+ const structuralCandidates = [
328
+ doc.pinnedVersion,
329
+ doc.foundationVersion,
330
+ doc.targetVersion,
331
+ doc.minimumFoundationVersion,
332
+ ].filter(v => typeof v === 'string');
333
+ let matchedStructured = false;
334
+ for (const candidate of structuralCandidates) {
335
+ const tuple = parseSemverTuple(candidate);
336
+ if (tuple) {
337
+ evidence.push({ pkgName: 'foundation-pin', version: formatSemverTuple(tuple), tuple, source: rel });
338
+ matchedStructured = true;
339
+ }
340
+ }
341
+ if (!matchedStructured) {
342
+ const sanitized = { ...doc };
343
+ delete sanitized.note;
344
+ if (sanitized.source && typeof sanitized.source === 'object') {
345
+ sanitized.source = { ...sanitized.source, note: undefined };
346
+ }
347
+ const rawText = JSON.stringify(sanitized);
348
+ const m022 = /\b0\.22\.\d+\b/.exec(rawText);
349
+ const m039 = /\b0\.39\.\d+\b/.exec(rawText);
350
+ const tuple = parseSemverTuple(m022?.[0] || m039?.[0] || null);
351
+ if (tuple) {
352
+ evidence.push({ pkgName: 'foundation-pin', version: formatSemverTuple(tuple), tuple, source: rel });
353
+ }
319
354
  }
320
355
  }
321
356
 
@@ -632,28 +667,58 @@ async function probeHubActual(hubRepoReal, registryRepos) {
632
667
  async function probeAuditReleaseCycle(auditRepoReal) {
633
668
  if (!auditRepoReal) {
634
669
  return {
635
- detected: false,
636
- detail: '未定位到 Audit 仓库目录',
670
+ detected: true,
671
+ pinnedCall: 'audit_repo_missing',
672
+ detail: '未定位到 Audit 仓库目录,按 fail-closed 判定解耦状态未核实',
637
673
  probeSource: '未检出 Audit 仓库',
638
674
  };
639
675
  }
640
676
  const subDirs = await listSubpackageNames(auditRepoReal);
641
- const candidates = [
677
+ const methodCandidates = [
642
678
  'spec/methods/release-audit.json',
643
679
  ...subDirs.map(s => `packages/${s}/spec/methods/release-audit.json`),
644
- 'generated/platforms/claude-code/skills/skill-family-audit-conformance-audit/scripts/conformance_workflow.py',
645
- ...subDirs.map(s => `packages/${s}/generated/platforms/claude-code/skills/skill-family-audit-conformance-audit/scripts/conformance_workflow.py`),
646
680
  ];
681
+ let checkedMethodCount = 0;
682
+ let verifiedMethodSource = null;
683
+ for (const rel of methodCandidates) {
684
+ const methodDoc = await readJsonContainedSafe(auditRepoReal, rel);
685
+ if (!methodDoc) continue;
686
+ checkedMethodCount += 1;
687
+ verifiedMethodSource = rel;
688
+ const raw = JSON.stringify(methodDoc);
689
+ const procExec = methodDoc?.maximumSideEffects?.processExecution;
690
+ if ((raw.includes('verify-records') && raw.includes('release-skill')) || (procExec && procExec !== 'none')) {
691
+ const pinMatch = /release-skill@([0-9A-Za-z._-]+):verify-records/.exec(raw);
692
+ return {
693
+ detected: true,
694
+ pinnedCall: pinMatch ? `release-skill@${pinMatch[1]}:verify-records` : `processExecution:${procExec || 'verify-records'}`,
695
+ detail: `检出 Audit release-audit 方法仍声明反向进程执行或 verify-records 耦合(${procExec || 'verify-records'}),与发布门禁消费形成双向耦合环`,
696
+ probeSource: rel,
697
+ };
698
+ }
699
+ }
700
+ if (checkedMethodCount === 0) {
701
+ return {
702
+ detected: true,
703
+ pinnedCall: 'release_audit_contract_missing',
704
+ detail: 'Audit 仓库未检出 spec/methods/release-audit.json 方法合同,按 fail-closed 判定未完成单向解耦核实',
705
+ probeSource: 'spec/methods/release-audit.json(缺失)',
706
+ };
707
+ }
647
708
 
648
- for (const rel of candidates) {
709
+ const receiptHelperCandidates = [
710
+ 'plugin-src/skills/skill-family-audit-release/scripts/release_receipts.py',
711
+ ...subDirs.map(s => `packages/${s}/plugin-src/skills/skill-family-audit-release/scripts/release_receipts.py`),
712
+ 'generated/platforms/claude-code/skills/skill-family-audit-release-audit/scripts/release_receipts.py',
713
+ ...subDirs.map(s => `packages/${s}/generated/platforms/claude-code/skills/skill-family-audit-release-audit/scripts/release_receipts.py`),
714
+ ];
715
+ for (const rel of receiptHelperCandidates) {
649
716
  const raw = await readTextContainedSafe(auditRepoReal, rel);
650
- if (!raw) continue;
651
- if (raw.includes('verify-records') && raw.includes('release-skill')) {
652
- const pinMatch = /release-skill@([0-9A-Za-z._-]+):verify-records/.exec(raw);
717
+ if (raw) {
653
718
  return {
654
719
  detected: true,
655
- pinnedCall: pinMatch ? `release-skill@${pinMatch[1]}:verify-records` : 'release-skill:verify-records',
656
- detail: `检出 Audit 方法反向调用 ${pinMatch ? `release-skill@${pinMatch[1]}` : 'release-skill'} 的 verify-records 接口,与发布门禁消费形成双向耦合环`,
720
+ pinnedCall: 'release_receipts_bridge_present',
721
+ detail: `检出残留反向桥接脚本 ${rel}`,
657
722
  probeSource: rel,
658
723
  };
659
724
  }
@@ -663,7 +728,7 @@ async function probeAuditReleaseCycle(auditRepoReal) {
663
728
  detected: false,
664
729
  pinnedCall: null,
665
730
  detail: '未检出 Audit 对 release-skill verify-records 的反向调用,单向解耦已成立',
666
- probeSource: 'spec/methods/release-audit.json(零 verify-records 反向调用)',
731
+ probeSource: `${verifiedMethodSource}(processExecution=none 且零 verify-records 反向调用)`,
667
732
  };
668
733
  }
669
734
 
@@ -839,8 +904,22 @@ function lookupProbedRepo(probedByKey, key) {
839
904
  return probedByKey.get(key) || probedByKey.get(basename(String(key))) || null;
840
905
  }
841
906
 
842
- function evaluateArchitecturalRisks(rawRisks, probedRepos, probedByKey, hubActual, auditCycle) {
843
- return (rawRisks || []).map(risk => {
907
+ async function checkAnyFileInTargets(targets, relCandidates) {
908
+ const hits = [];
909
+ for (const t of targets) {
910
+ if (!t.live?.realPath) continue;
911
+ for (const rel of relCandidates) {
912
+ if (await existsContainedFile(t.live.realPath, rel)) {
913
+ hits.push(`${t.publicName}/${rel}`);
914
+ break;
915
+ }
916
+ }
917
+ }
918
+ return hits;
919
+ }
920
+
921
+ async function evaluateArchitecturalRisks(rawRisks, probedRepos, probedByKey, hubActual, auditCycle) {
922
+ return Promise.all((rawRisks || []).map(async risk => {
844
923
  let detected = false;
845
924
  let liveEvidence = '';
846
925
  let probeSource = '';
@@ -880,12 +959,21 @@ function evaluateArchitecturalRisks(rawRisks, probedRepos, probedByKey, hubActua
880
959
  || probedRepos.find(r => r.publicName === 'skill-eval');
881
960
  const ver = evalRepo?.live?.sourceVersion?.version || null;
882
961
  const fndAligned = Boolean(evalRepo?.live?.foundation?.alignedWithExpected && evalRepo?.live?.foundation?.foundationTrackActual === '0.39.x');
883
- detected = !evalRepo?.live?.existsOnDisk || isPlaceholderVersion(ver) || !fndAligned;
962
+ const requiredEngineModules = evalRepo ? await Promise.all([
963
+ 'packages/skill-eval/src/oracle-vault.mjs',
964
+ 'packages/skill-eval/src/judge-calibration.mjs',
965
+ 'packages/skill-eval/src/sfa-hard-gate.mjs',
966
+ 'packages/skill-eval/src/scorecard-engine.mjs',
967
+ 'packages/skill-eval/schemas/scorecard.schema.json',
968
+ ].map(rel => checkAnyFileInTargets([evalRepo], [rel]).then(hits => hits.length > 0))) : [];
969
+ const allModulesPresent = requiredEngineModules.length === 5 && requiredEngineModules.every(Boolean);
970
+ const receiptReady = Boolean(evalRepo?.live?.locksAndReceipt?.receiptPassed && evalRepo?.live?.locksAndReceipt?.lockPresent);
971
+ detected = !evalRepo?.live?.existsOnDisk || isPlaceholderVersion(ver) || !fndAligned || !allModulesPresent || !receiptReady;
884
972
  liveEvidence = evalRepo?.live?.existsOnDisk
885
- ? `当前版本=${ver || '未声明'},底座=${evalRepo.live.foundation?.foundationTrackActual || 'not-applicable'},锁与收据=${evalRepo.live.locksAndReceipt?.badgeLabel || '未建'}`
973
+ ? `当前版本=${ver || '未声明'},底座=${evalRepo.live.foundation?.foundationTrackActual || 'not-applicable'},核心模块=${allModulesPresent ? '5/5 就绪' : '缺失'},锁与收据=${evalRepo.live.locksAndReceipt?.badgeLabel || '未建'}`
886
974
  : '本地未检出已重塑的计分卡引擎包';
887
975
  probeSource = evalRepo?.live?.existsOnDisk
888
- ? `skill-eval/${evalRepo.live.sourceVersion?.probeSource || 'package.json'} + ${evalRepo.live.foundation?.probeSource || 'profile.json'}`
976
+ ? `skill-eval/${evalRepo.live.sourceVersion?.probeSource || 'package.json'} + packages/skill-eval/src/* + sft-runs.json`
889
977
  : 'skill-eval 目录探针';
890
978
  }
891
979
 
@@ -898,7 +986,7 @@ function evaluateArchitecturalRisks(rawRisks, probedRepos, probedByKey, hubActua
898
986
  liveEvidence,
899
987
  probeSource,
900
988
  };
901
- });
989
+ }));
902
990
  }
903
991
 
904
992
  function evaluateCapabilityCatalog(rawCatalog, probedByKey) {
@@ -940,20 +1028,6 @@ async function evaluateRoadmapMilestones(rawRoadmap, ctx) {
940
1028
  return explicit.length > 0 ? explicit : probedRepos.filter(fallbackPred);
941
1029
  };
942
1030
 
943
- const checkAnyFileInTargets = async (targets, relCandidates) => {
944
- const hits = [];
945
- for (const t of targets) {
946
- if (!t.live?.realPath) continue;
947
- for (const rel of relCandidates) {
948
- if (await existsContainedFile(t.live.realPath, rel)) {
949
- hits.push(`${t.publicName}/${rel}`);
950
- break;
951
- }
952
- }
953
- }
954
- return hits;
955
- };
956
-
957
1031
  const outStages = [];
958
1032
  for (const stage of rawRoadmap || []) {
959
1033
  const milestones = [];
@@ -1087,32 +1161,58 @@ async function evaluateRoadmapMilestones(rawRoadmap, ctx) {
1087
1161
  probeSource = `skill-family-audit/${auditCycle.probeSource} + ${hubActual.probeSource}`;
1088
1162
  } else if (ms.probeCheck === 'acp_dsh_driver_and_stb') {
1089
1163
  const targets = resolveMilestoneTargets(ms.ownerRepos, r => r.ring === 'core' && r.live?.existsOnDisk);
1090
- const driverHits = await checkAnyFileInTargets(targets, [
1164
+ const driverPkgHits = await checkAnyFileInTargets(targets, [
1091
1165
  'packages/execution-driver/package.json',
1092
- 'src/execution-driver.mjs',
1093
1166
  ]);
1167
+ const driverEntryHits = await checkAnyFileInTargets(targets, [
1168
+ 'packages/execution-driver/src/index.mjs',
1169
+ ]);
1170
+ const driverReady = driverPkgHits.length > 0 && driverEntryHits.length > 0;
1171
+ const stbContractRegistered = Boolean(findSchemaByObject('session-trace-bundle'));
1094
1172
  const stbHits = await checkAnyFileInTargets(targets, [
1095
- 'packages/skill-family-contracts/schemas/session-trajectory-bundle.schema.json',
1096
- 'schemas/session-trajectory-bundle.schema.json',
1097
- 'artifacts/contracts/stb.schema.json',
1173
+ 'packages/skill-family-contracts/src/schemas/session-trace-bundle.schema.json',
1174
+ 'packages/skill-family-contracts/schemas/session-trace-bundle.schema.json',
1175
+ 'schemas/session-trace-bundle.schema.json',
1098
1176
  ]);
1099
- if (driverHits.length > 0 && stbHits.length > 0) {
1177
+ let verifiedSampleReady = false;
1178
+ for (const repo of targets) {
1179
+ if (!repo?.live?.realPath) continue;
1180
+ const sampleStb = await readJsonContainedSafe(repo.live.realPath, 'packages/execution-driver/fixtures/verified-stb-bundle.json')
1181
+ || await readJsonContainedSafe(repo.live.realPath, '.skill-family-studio/traces/latest-stb.json');
1182
+ const samplePc = await readJsonContainedSafe(repo.live.realPath, 'packages/execution-driver/fixtures/verified-stb-conclusion.json')
1183
+ || await readJsonContainedSafe(repo.live.realPath, '.skill-family-studio/traces/latest-stb-conclusion.json');
1184
+ if (!sampleStb || !samplePc) continue;
1185
+ const sealVerify = verifySessionTraceBundleSeal(sampleStb);
1186
+ const digest = sealVerify.valid ? sealVerify.bundleDigestSha256 : null;
1187
+ if (
1188
+ sealVerify.valid
1189
+ && typeof digest === 'string'
1190
+ && samplePc?.kind === 'skill-family.professional-conclusion'
1191
+ && samplePc?.provider?.id === 'skill-failure-auditor'
1192
+ && samplePc?.outcome?.code === 'FAILURE_DIAGNOSIS_CLEAR'
1193
+ && samplePc?.details?.verdict === 'PASS'
1194
+ && samplePc?.subject?.revision === `sha256:${digest}`
1195
+ ) {
1196
+ verifiedSampleReady = true;
1197
+ break;
1198
+ }
1199
+ }
1200
+ if (driverReady && stbContractRegistered && stbHits.length > 0 && verifiedSampleReady) {
1100
1201
  status = 'passed';
1101
- badgeLabel = '✅ 已达成';
1202
+ badgeLabel = '✅ 已达成 (Driver + STB + SFA 核验闭环)';
1102
1203
  badgeTone = 'emerald';
1103
- } else if (driverHits.length > 0 || stbHits.length > 0) {
1204
+ } else if (driverReady || stbHits.length > 0) {
1104
1205
  status = 'partial';
1105
1206
  badgeLabel = '🔵 部分落盘';
1106
1207
  badgeTone = 'indigo';
1107
1208
  }
1108
- liveDetail = `ACP Driver 包:${driverHits[0] || '待建'} · STB Schema:${stbHits[0] || '待建'}`;
1109
- probeSource = 'packages/execution-driver + session-trajectory-bundle.schema.json 探针';
1209
+ liveDetail = `ACP Driver 包:${driverReady ? driverPkgHits[0] : '待建'} · STB Schema:${stbHits[0] || '待建'} · SFA 封存对账实证:${verifiedSampleReady ? '已就绪' : '待核验'}`;
1210
+ probeSource = 'packages/execution-driver + session-trace-bundle.schema.json + SFA 封存对账结论探针';
1110
1211
  } else if (ms.probeCheck === 'blueprint_canvas_and_mocks') {
1111
1212
  const targets = resolveMilestoneTargets(ms.ownerRepos, r => r.ring === 'core' && r.live?.existsOnDisk);
1112
1213
  const bpHits = await checkAnyFileInTargets(targets, [
1113
1214
  'packages/skill-family-studio/src/ui/blueprint-canvas.mjs',
1114
1215
  'src/ui/blueprint-canvas.mjs',
1115
- 'schemas/orchestration-blueprint.schema.json',
1116
1216
  ]);
1117
1217
  const mockHits = await checkAnyFileInTargets(targets, [
1118
1218
  'packages/tool-mock-sandbox/package.json',
@@ -1132,25 +1232,32 @@ async function evaluateRoadmapMilestones(rawRoadmap, ctx) {
1132
1232
  } else if (ms.probeCheck === 'skill_eval_scorecard_engine') {
1133
1233
  const evalRepo = lookupProbedRepo(probedByKey, 'skill-eval')
1134
1234
  || probedRepos.find(r => r.publicName === 'skill-eval');
1135
- const scorecardHits = evalRepo ? await checkAnyFileInTargets([evalRepo], [
1235
+ const requiredModules = [
1136
1236
  'packages/skill-eval/package.json',
1137
- 'src/scorecard-engine.mjs',
1138
- 'src/scorecard.mjs',
1139
- 'schemas/scorecard.schema.json',
1140
- ]) : [];
1237
+ 'packages/skill-eval/src/oracle-vault.mjs',
1238
+ 'packages/skill-eval/src/judge-calibration.mjs',
1239
+ 'packages/skill-eval/src/sfa-hard-gate.mjs',
1240
+ 'packages/skill-eval/src/scorecard-engine.mjs',
1241
+ 'packages/skill-eval/schemas/scorecard.schema.json',
1242
+ ];
1243
+ const moduleChecks = evalRepo ? await Promise.all(
1244
+ requiredModules.map(rel => checkAnyFileInTargets([evalRepo], [rel]).then(hits => hits[0] || null)),
1245
+ ) : [];
1246
+ const presentCount = moduleChecks.filter(Boolean).length;
1141
1247
  const verReady = evalRepo?.live?.existsOnDisk && !isPlaceholderVersion(evalRepo.live.sourceVersion?.version);
1142
1248
  const fndReady = evalRepo?.live?.foundation?.foundationTrackActual === '0.39.x';
1143
- if (verReady && fndReady && scorecardHits.length > 0) {
1249
+ const receiptReady = Boolean(evalRepo?.live?.locksAndReceipt?.receiptPassed);
1250
+ if (verReady && fndReady && presentCount === requiredModules.length && receiptReady) {
1144
1251
  status = 'passed';
1145
1252
  badgeLabel = '✅ 已达成';
1146
1253
  badgeTone = 'emerald';
1147
- } else if (scorecardHits.length > 0 || fndReady) {
1254
+ } else if (presentCount > 0 || fndReady) {
1148
1255
  status = 'partial';
1149
1256
  badgeLabel = '🔵 重塑推进中';
1150
1257
  badgeTone = 'indigo';
1151
1258
  }
1152
- liveDetail = `skill-eval 当前版本=${evalRepo?.live?.sourceVersion?.version || '0.0.0'},计分卡引擎文件=${scorecardHits[0] || '待建'}`;
1153
- probeSource = 'skill-eval/package.json + scorecard-engine 探针';
1259
+ liveDetail = `skill-eval 当前版本=${evalRepo?.live?.sourceVersion?.version || '0.0.0'},核心模块=${presentCount}/${requiredModules.length},测试收据=${receiptReady ? '已通过' : '待核验'}`;
1260
+ probeSource = 'skill-eval/packages/skill-eval/src/* + sft-runs.json 探针';
1154
1261
  } else if (ms.probeCheck === 'studio_server_otel_dengbao') {
1155
1262
  const targets = resolveMilestoneTargets(ms.ownerRepos, r => r.ring === 'core' && r.live?.existsOnDisk);
1156
1263
  const srvHits = await checkAnyFileInTargets(targets, [
@@ -1305,7 +1412,7 @@ export async function inspectLifecycleCollaboration({ root = '.', catalog = null
1305
1412
  }
1306
1413
  }
1307
1414
 
1308
- const architecturalRisks = evaluateArchitecturalRisks(
1415
+ const architecturalRisks = await evaluateArchitecturalRisks(
1309
1416
  registry.architecturalRisks,
1310
1417
  probedRepos,
1311
1418
  probedByKey,
package/src/server.mjs CHANGED
@@ -43,6 +43,12 @@ import {
43
43
  runSandboxExercise,
44
44
  } from './runtime-bridge.mjs';
45
45
  import { collectSessionFleet } from './session-fleet.mjs';
46
+ import {
47
+ collectStudioStbView,
48
+ consumeDriverCsrfToken,
49
+ issueDriverCsrfToken,
50
+ runLiveStbAuditDemo,
51
+ } from './stb-bridge.mjs';
46
52
  import { computePathDigest } from './setup-advisor.mjs';
47
53
  import { inspectLifecycleCollaboration, loadLifecycleSummary } from './lifecycle-inspector.mjs';
48
54
 
@@ -567,6 +573,23 @@ export async function createStudioServer({
567
573
  return;
568
574
  }
569
575
 
576
+ if (pathname === '/api/studio/stb') {
577
+ if (req.method !== 'GET') { sendJson(res, 405, { ok: false, error: '仅支持 GET 请求。' }); return; }
578
+ const stbPayload = await collectStudioStbView({ root: resolvedRoot });
579
+ sendJson(res, 200, stbPayload);
580
+ return;
581
+ }
582
+
583
+ if (pathname === '/api/studio/driver/csrf') {
584
+ if (req.method !== 'GET') { sendJson(res, 405, { ok: false, error: '仅支持 GET 请求。' }); return; }
585
+ if (String(req.headers['x-studio-request'] ?? '').trim() !== '1') {
586
+ sendJson(res, 403, { ok: false, error: 'CSRF 签发接口必须携带 X-Studio-Request: 1。' });
587
+ return;
588
+ }
589
+ sendJson(res, 200, { ok: true, ...issueDriverCsrfToken() });
590
+ return;
591
+ }
592
+
570
593
  if (req.method === 'POST' || req.method === 'DELETE') {
571
594
  const expectedPort = server.address()?.port ?? (Number.isInteger(port) && port > 0 ? port : null);
572
595
  if (!isSafeLoopbackOrigin(req, expectedPort)) {
@@ -757,6 +780,26 @@ export async function createStudioServer({
757
780
  });
758
781
  return;
759
782
  }
783
+
784
+ if (pathname === '/api/studio/driver/run-demo') {
785
+ if (!consumeDriverCsrfToken(body.csrfToken)) {
786
+ sendJson(res, 403, { ok: false, error: '一次性 CSRF 令牌无效或已过期,请重新确认后发起。' });
787
+ return;
788
+ }
789
+ if (body.hitlConfirmed !== true) {
790
+ sendJson(res, 400, { ok: false, error: '缺少人工显式确认(hitlConfirmed: true),已拒绝启动执行驱动进程。' });
791
+ return;
792
+ }
793
+ const mode = body.mode === 'clean' ? 'clean' : 'fabricated';
794
+ const entry = await enqueueWrite(async () => runLiveStbAuditDemo({
795
+ root: resolvedRoot,
796
+ mode,
797
+ hitlConfirmed: true,
798
+ }));
799
+ broadcast('runtime-change', { action: 'stb-demo', bundleId: entry.bundleId, at: new Date().toISOString() });
800
+ sendJson(res, 200, { ok: true, entry });
801
+ return;
802
+ }
760
803
  }
761
804
 
762
805
  if (!['GET', 'HEAD'].includes(req.method ?? 'GET')) {
@@ -772,6 +815,7 @@ export async function createStudioServer({
772
815
  '/assets/tooltips.mjs': { file: join(UI_DIR, 'tooltips.mjs'), type: MIME_TYPES['.mjs'] },
773
816
  '/assets/diagram-svg.mjs': { file: join(UI_DIR, 'diagram-svg.mjs'), type: MIME_TYPES['.mjs'] },
774
817
  '/assets/fleet-ui.mjs': { file: join(UI_DIR, 'fleet-ui.mjs'), type: MIME_TYPES['.mjs'] },
818
+ '/assets/stb-ui.mjs': { file: join(UI_DIR, 'stb-ui.mjs'), type: MIME_TYPES['.mjs'] },
775
819
  '/assets/lifecycle-ui.mjs': { file: join(UI_DIR, 'lifecycle-ui.mjs'), type: MIME_TYPES['.mjs'] },
776
820
  '/graph-layout.mjs': { file: join(PKG_SRC_DIR, 'graph-layout.mjs'), type: MIME_TYPES['.mjs'] },
777
821
  '/assets/graph-layout.mjs': { file: join(PKG_SRC_DIR, 'graph-layout.mjs'), type: MIME_TYPES['.mjs'] },