feat: add selectable demo flow tasks

This commit is contained in:
2026-09-02 15:23:15 +08:00
parent f879328562
commit e3dc7ebe21
19 changed files with 871 additions and 110 deletions

View File

@@ -68,6 +68,22 @@ export interface PluginRuntimeMock {
export type PluginRuntime = PluginRuntimeProcess | PluginRuntimeMock;
export type DemoInspectionObject = 'head' | 'middle';
/** 插件可在“全流程任务选择”中暴露的正式检验任务。 */
export interface PluginDemoTask {
taskNo: number;
name: string;
category: string;
inspectionObjects?: DemoInspectionObject[];
}
/** 任务选择如何转换为插件参数。 */
export interface PluginDemoSelection {
kind: 'task-nos';
param: string;
}
/** 插件 manifest(写在 server/plugins/manifests/*.json) */
export interface PluginManifest {
/** 全局唯一 ID(kebab-case,例如 coupler-panel) */
@@ -89,6 +105,10 @@ export interface PluginManifest {
requiresCad?: boolean;
/** 是否需要点云(默认 true) */
requiresPointCloud?: boolean;
/** “选择任务运行”模式的权威任务目录。 */
demoTasks?: PluginDemoTask[];
/** 选中任务传给适配器的方式。 */
demoSelection?: PluginDemoSelection;
runtime: PluginRuntime;
}