feat: vibe-registry M1 — 万物皆注册框架骨架

- core: registerLayout/Widget/Action(泛型)/Schema + 校验闸门
- definePage: 页面只管业务,结构来自注册表
- presets: admin / app-shell 预设布局(vr add 物化)
- cli: vr list/add/update 防覆盖
- examples/qa-orchestrator: 实战编排验证(workspace:* 依赖)
This commit is contained in:
hellow-da-sb
2026-09-03 00:48:10 +08:00
commit 8c93bde5f6
30 changed files with 1289 additions and 0 deletions
@@ -0,0 +1,15 @@
/**
* run-suite —— 重跑测试套件 action
* 行为注册:页面的"重跑"按钮只声明引用该 action,不内联逻辑
*/
import { registerAction } from 'vibe-registry'
export const runSuiteAction = registerAction({
kind: 'action',
id: 'run-suite',
description: '重跑指定测试套件(全量)',
handler: async (payload: { suiteId: string }, _ctx) => {
// M1:真实执行器后续接入;这里返回执行意图供编排层消费
return { started: true, suiteId: payload.suiteId, at: Date.now() }
},
})
@@ -0,0 +1,13 @@
/**
* stop-run —— 停止运行中的套件 action
*/
import { registerAction } from 'vibe-registry'
export const stopRunAction = registerAction({
kind: 'action',
id: 'stop-run',
description: '停止正在运行的测试套件',
handler: async (payload: { runId: string }, _ctx) => {
return { stopped: true, runId: payload.runId, at: Date.now() }
},
})