skill-family-studio 0.3.0 → 0.4.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.3.0",
4
+ "version": "0.4.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.3.0",
4
+ "version": "0.4.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.3.0",
3
+ "version": "0.4.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.3.0",
3
+ "version": "0.4.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.3.0",
3
+ "version": "0.4.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.3.0",
3
+ "version": "0.4.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.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0
4
+
5
+ - 新增 Web 化 Hub 模板建项向导与子路径导出 `./template-wizard`(`src/template-wizard.mjs`、`src/ui/template-wizard-ui.mjs`):100% 委托 `skill-family-engineering-kit@0.39.2` 官方脚手架(`describeSkeletonFiles` / `scaffoldTarget` / `runRelock` / `runCoreCheck`)与 `skill-family-hub` 起步编排蓝图,支持零落盘写集预演、`planDigest` 摘要确认、空目标路径守卫与一键挂载接入工作台。
6
+ - 新增受控隔离沙箱最小样例在线试跑台(`src/stb-bridge.mjs`、`src/ui/stb-ui.mjs`):在「⚡ 运行监控 → 🧪 最小样例试跑」支持选择内置预设或已发现仓库技能,在禁网临时沙箱调用 `skill-family-execution-driver` (ACP) 执行样例输入、采集文件写集差分与工具退出码,并自动封存绑定 `SessionTraceBundle` 对账记录。
7
+
3
8
  ## 0.3.0
4
9
 
5
10
  - 新增按需子路径 `./otel-compliance`(`src/otel-siem-exporter.mjs`):直接复用 `skill-family-harness-node@0.39.2` `state-store` 哈希链与快照锚点,在强监管模式下强制不少于 `180` 天防篡改留存下限,提供 `SessionTraceBundle` 密码学验封转换 OTLP JSON `resourceSpans`、SIEM NDJSON 审计导出、凭据与个人信息脱敏及等保三级五域控制项证据映射报告。
package/README.md CHANGED
@@ -29,6 +29,7 @@ npm install -g skill-family-studio
29
29
  3. **折叠目录树、现代长文排版与草稿不丢失**:逐篇审阅左侧提供「① 用户故事 → ② 生命周期讲解 → ③ 需求总纲 → ④ 场景剧本 → ⑤ 领域模型与架构设计 → 附:机器数据契约 (.json/.yaml · 自动跳过)」手风琴折叠目录树,支持关键词穿透搜索;正文顶部呈现 Hero 摘要卡、GitHub Callout 与用户故事卡片;Archify 业务逻辑图通过 `&embed=1` 纯净内嵌,未提交批注与备注草稿自动暂存(「📝 草稿」)并支持 5 秒撤销,零侵入保存在 `.skill-family-studio/reviews.json`。
30
30
  4. **双栏主从运行监控(活跃 + 历史计划树 & 多宿主编队)**:「🌳 任务推进树」左侧聚合活跃运行计划与近期进行中/已完成历史计划、右侧展开多级树与进度条;「🛰️ 智能体会话编队」左侧以宿主过滤芯片和摘要卡片直选 Antigravity / Claude / Codex / 沙箱编队,右侧联动渲染网络拓扑、协作泳道与 Markdown 事件简报;「🩺 异常排障」实时汇报运行时排他写锁、事件哈希链与子进程看门狗。
31
31
  5. **全周期协同矩阵与受限枚举编排蓝图画布(`./blueprint-canvas`)**:「🧭 全周期协同」视图基于 `artifact-graph@1.2.3`(支持细粒度提示词与非代码资产锁)与 `skill-family-execution-driver@0.2.1` 实时核验三环泳道与里程碑机器探针,并内置受限枚举多会话编排蓝图编辑器,实时执行图连通性、独立复核防自审与外部副作用人工门禁(HITL)支配检查,一键导出规范化 `blueprintRef` SHA-256 摘要。
32
+ 6. **Web 化 Hub 模板建项向导(`./template-wizard`)与受控最小样例在线试跑**:点击顶栏「✨ 模板新建」或进入全周期协同向导页,即可选择 Hub 起步编排蓝图与开源/商业许可画像,先零落盘预演写集与 `planDigest` 摘要,确认后直接调用 Foundation 官方脚手架在空目录原子生成合规新仓并挂载至工作台;在「⚡ 运行监控 → 🧪 最小样例试跑」可在无网临时沙箱运行最小任务样例,同屏检视文件写集差分、退出码及 `SessionTraceBundle` 反伪造对账结论。
32
33
 
33
34
  ## 环境要求
34
35
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-family-studio",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "private": false,
5
5
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
6
6
  "author": "广州市风荷科技有限公司",
@@ -18,6 +18,7 @@
18
18
  "./layout": "./src/graph-layout.mjs",
19
19
  "./review-state": "./src/review-state.mjs",
20
20
  "./blueprint-canvas": "./src/ui/blueprint-canvas.mjs",
21
+ "./template-wizard": "./src/template-wizard.mjs",
21
22
  "./otel-compliance": "./src/otel-siem-exporter.mjs",
22
23
  "./collector-server": "./src/studio-collector-server.mjs"
23
24
  },
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.3.0",
4
+ "version": "0.4.0",
5
5
  "description": "单端口统一承载 artifact-graph 宽屏制品图谱审阅与 Foundation 运行态监控的本地离线研发控制台。",
6
6
  "author": "广州市风荷科技有限公司",
7
7
  "repository": "https://github.com/ifoohoo/skill-family-studio"
package/src/index.mjs CHANGED
@@ -5,6 +5,7 @@
5
5
  // @feature STU005
6
6
  // @feature STU006
7
7
  // @feature STU007
8
+ // @feature STU008
8
9
 
9
10
  export {
10
11
  DEFAULT_STUDIO_REVIEWS_PATH,
@@ -122,3 +123,17 @@ export {
122
123
  inspectLifecycleCollaboration,
123
124
  loadLifecycleSummary,
124
125
  } from './lifecycle-inspector.mjs';
126
+
127
+ export {
128
+ HUB_STARTER_BLUEPRINT_TEMPLATES,
129
+ executeStudioTemplateScaffold,
130
+ listStudioWizardCatalog,
131
+ previewStudioTemplateScaffold,
132
+ resolveWizardTargetLocation,
133
+ } from './template-wizard.mjs';
134
+
135
+ export {
136
+ SAMPLE_TRIAL_PRESETS,
137
+ collectStudioTrialsView,
138
+ runSampleTrial,
139
+ } from './stb-bridge.mjs';
package/src/server.mjs CHANGED
@@ -3,6 +3,7 @@
3
3
  // @feature STU003
4
4
  // @feature STU005
5
5
  // @feature STU006
6
+ // @feature STU008
6
7
 
7
8
  import { existsSync, watch } from 'node:fs';
8
9
  import { createServer } from 'node:http';
@@ -45,12 +46,19 @@ import {
45
46
  import { collectSessionFleet } from './session-fleet.mjs';
46
47
  import {
47
48
  collectStudioStbView,
49
+ collectStudioTrialsView,
48
50
  consumeDriverCsrfToken,
49
51
  issueDriverCsrfToken,
50
52
  runLiveStbAuditDemo,
53
+ runSampleTrial,
51
54
  } from './stb-bridge.mjs';
52
55
  import { computePathDigest } from './setup-advisor.mjs';
53
56
  import { inspectLifecycleCollaboration, loadLifecycleSummary } from './lifecycle-inspector.mjs';
57
+ import {
58
+ executeStudioTemplateScaffold,
59
+ listStudioWizardCatalog,
60
+ previewStudioTemplateScaffold,
61
+ } from './template-wizard.mjs';
54
62
 
55
63
  const PKG_SRC_DIR = fileURLToPath(new URL('./', import.meta.url));
56
64
  const UI_DIR = join(PKG_SRC_DIR, 'ui');
@@ -580,6 +588,21 @@ export async function createStudioServer({
580
588
  return;
581
589
  }
582
590
 
591
+ if (pathname === '/api/studio/trials') {
592
+ if (req.method !== 'GET') { sendJson(res, 405, { ok: false, error: '仅支持 GET 请求。' }); return; }
593
+ const catalog = await getCatalog(false);
594
+ const trialsPayload = await collectStudioTrialsView({ root: resolvedRoot, catalog });
595
+ sendJson(res, 200, trialsPayload);
596
+ return;
597
+ }
598
+
599
+ if (pathname === '/api/studio/wizard/catalog') {
600
+ if (req.method !== 'GET') { sendJson(res, 405, { ok: false, error: '仅支持 GET 请求。' }); return; }
601
+ const wizCat = await listStudioWizardCatalog({ root: resolvedRoot, allowedRoots });
602
+ sendJson(res, 200, wizCat);
603
+ return;
604
+ }
605
+
583
606
  if (pathname === '/api/studio/driver/csrf') {
584
607
  if (req.method !== 'GET') { sendJson(res, 405, { ok: false, error: '仅支持 GET 请求。' }); return; }
585
608
  if (String(req.headers['x-studio-request'] ?? '').trim() !== '1') {
@@ -605,13 +628,31 @@ export async function createStudioServer({
605
628
  sendJson(res, 415, { ok: false, error: '写接口仅接受 Content-Type: application/json。' });
606
629
  return;
607
630
  }
631
+ const body = req.method === 'DELETE'
632
+ ? { id: url.searchParams.get('id') || '' }
633
+ : await readJsonBody(req);
634
+
635
+ if (pathname === '/api/studio/wizard/preview') {
636
+ const preview = await previewStudioTemplateScaffold({
637
+ workspaceRoot: resolvedRoot,
638
+ parentDir: body.parentDir,
639
+ projectId: body.projectId,
640
+ projectName: body.projectName,
641
+ templateId: body.templateId,
642
+ profileId: body.profileId,
643
+ licensingProfile: body.licensingProfile,
644
+ licensingVariant: body.licensingVariant,
645
+ seedArtifactGraph: body.seedArtifactGraph !== false,
646
+ allowedRoots,
647
+ });
648
+ sendJson(res, 200, preview);
649
+ return;
650
+ }
651
+
608
652
  if (!writable) {
609
653
  sendJson(res, 403, { ok: false, error: '当前控制台处于只读模式;请去掉 --readonly 参数以启用审阅落盘。' });
610
654
  return;
611
655
  }
612
- const body = req.method === 'DELETE'
613
- ? { id: url.searchParams.get('id') || '' }
614
- : await readJsonBody(req);
615
656
 
616
657
  if (pathname === '/api/studio/annotations' || pathname === '/api/studio/decisions') {
617
658
  const catalog = await getCatalog(false);
@@ -800,6 +841,87 @@ export async function createStudioServer({
800
841
  sendJson(res, 200, { ok: true, entry });
801
842
  return;
802
843
  }
844
+
845
+ if (pathname === '/api/studio/driver/run-trial') {
846
+ if (!consumeDriverCsrfToken(body.csrfToken)) {
847
+ sendJson(res, 403, { ok: false, error: '一次性 CSRF 令牌无效或已过期,请重新确认后发起。' });
848
+ return;
849
+ }
850
+ if (body.hitlConfirmed !== true) {
851
+ sendJson(res, 400, { ok: false, error: '缺少人工显式确认(hitlConfirmed: true),已拒绝启动最小样例试跑沙箱。' });
852
+ return;
853
+ }
854
+ const out = await enqueueWrite(async () => runSampleTrial({
855
+ root: resolvedRoot,
856
+ presetId: body.presetId,
857
+ subjectId: body.subjectId,
858
+ promptText: body.promptText,
859
+ hitlConfirmed: true,
860
+ }));
861
+ broadcast('runtime-change', { action: 'stb-trial', trialId: out.trial.trialId, bundleId: out.trial.bundleId, at: new Date().toISOString() });
862
+ sendJson(res, 200, { ok: true, ...out });
863
+ return;
864
+ }
865
+
866
+ if (pathname === '/api/studio/wizard/scaffold') {
867
+ if (!consumeDriverCsrfToken(body.csrfToken)) {
868
+ sendJson(res, 403, { ok: false, error: '一次性 CSRF 令牌无效或已过期,请重新预演并确认后发起。' });
869
+ return;
870
+ }
871
+ if (body.hitlConfirmed !== true) {
872
+ sendJson(res, 400, { ok: false, error: '缺少人工显式确认(hitlConfirmed: true),已拒绝创建项目骨架。' });
873
+ return;
874
+ }
875
+ const created = await enqueueWrite(async () => executeStudioTemplateScaffold({
876
+ workspaceRoot: resolvedRoot,
877
+ parentDir: body.parentDir,
878
+ projectId: body.projectId,
879
+ projectName: body.projectName,
880
+ templateId: body.templateId,
881
+ profileId: body.profileId,
882
+ licensingProfile: body.licensingProfile,
883
+ licensingVariant: body.licensingVariant,
884
+ seedArtifactGraph: body.seedArtifactGraph !== false,
885
+ expectedPlanDigest: body.expectedPlanDigest,
886
+ hitlConfirmed: true,
887
+ allowedRoots,
888
+ }));
889
+
890
+ let addedRepoId = null;
891
+ let ecosystemPayload = null;
892
+ if (body.registerInStudio !== false && created.seedArtifactGraph !== false) {
893
+ try {
894
+ const saved = await enqueueWrite(async () => registerStudioRepo(resolvedRoot, {
895
+ repoPath: created.targetReal,
896
+ title: created.project.projectName,
897
+ }));
898
+ cachedCatalog = null;
899
+ catalogAt = 0;
900
+ repoCache.clear();
901
+ lifecycleCache.clear();
902
+ const nextCatalog = await getCatalog(true);
903
+ const addedRec = [...nextCatalog.byId.values()].find(r => r.realPath === saved.realPath);
904
+ addedRepoId = addedRec?.id || null;
905
+ ecosystemPayload = {
906
+ available: nextCatalog.available,
907
+ count: nextCatalog.count,
908
+ primaryRepoId: nextCatalog.primaryRepoId,
909
+ repos: nextCatalog.repos,
910
+ };
911
+ broadcast('catalog-change', { action: 'wizard-scaffold', repoId: addedRepoId, at: new Date().toISOString() });
912
+ } catch {
913
+ // ignore optional auto-register failure if seedArtifactGraph was disabled
914
+ }
915
+ }
916
+
917
+ const { targetReal: _omitReal, ...publicCreated } = created;
918
+ sendJson(res, 200, {
919
+ ...publicCreated,
920
+ addedRepoId,
921
+ ...(ecosystemPayload ? { ecosystem: ecosystemPayload } : {}),
922
+ });
923
+ return;
924
+ }
803
925
  }
804
926
 
805
927
  if (!['GET', 'HEAD'].includes(req.method ?? 'GET')) {
@@ -818,6 +940,7 @@ export async function createStudioServer({
818
940
  '/assets/stb-ui.mjs': { file: join(UI_DIR, 'stb-ui.mjs'), type: MIME_TYPES['.mjs'] },
819
941
  '/assets/lifecycle-ui.mjs': { file: join(UI_DIR, 'lifecycle-ui.mjs'), type: MIME_TYPES['.mjs'] },
820
942
  '/assets/blueprint-canvas.mjs': { file: join(UI_DIR, 'blueprint-canvas.mjs'), type: MIME_TYPES['.mjs'] },
943
+ '/assets/template-wizard-ui.mjs': { file: join(UI_DIR, 'template-wizard-ui.mjs'), type: MIME_TYPES['.mjs'] },
821
944
  '/graph-layout.mjs': { file: join(PKG_SRC_DIR, 'graph-layout.mjs'), type: MIME_TYPES['.mjs'] },
822
945
  '/assets/graph-layout.mjs': { file: join(PKG_SRC_DIR, 'graph-layout.mjs'), type: MIME_TYPES['.mjs'] },
823
946
  };