mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-24 04:42:00 +00:00
普通用户建应用的契约骨架(docs/design/normal-user-apps.md 第五部分):蓝图、蓝图留痕、发布单、文件、记录表的模型和迁移,应用的 scope / owner / blueprint_id;运行来源加 trial、personal_app;应用描述的固定版本可以没有版本号(试运行派生的草稿)或改钉蓝图(个人应用),视图来源加 exploratory,组件加 hidden,表单加文件控件;agentlab.blueprint/1 与 bp_* 操作、agentlab.template/1 与关节类型的定义;实例化、试运行、发布单、个人应用、记录表、文件、白话层的接口签名;蓝图、模板、文件、个人应用、蓝图助手的路由桩(501);前端约定 typesBlueprint.ts、接口桩、新建应用与蓝图页的占位路由、termsBlueprint.ts
This commit is contained in:
@@ -67,6 +67,8 @@ export interface AuditRow {
|
||||
export type FormWidget =
|
||||
| 'text' | 'textarea' | 'number' | 'integer' | 'date' | 'datetime' | 'select' | 'radio' | 'multiselect'
|
||||
| 'checkbox' | 'principal' | 'note' | 'json'
|
||||
/** 文件(N9):字段 type 为 object,值是上传后拿回的引用 FileRef(typesBlueprint.ts) */
|
||||
| 'file'
|
||||
|
||||
export interface FormField {
|
||||
type: 'string' | 'number' | 'integer' | 'boolean' | 'array'
|
||||
@@ -111,11 +113,14 @@ export type Disposition = 'recompute' | 'dual' | 'incomparable'
|
||||
|
||||
export interface AppPin {
|
||||
alias: string
|
||||
workflow_id: string
|
||||
version: number
|
||||
/** 共享应用钉工作流版本;个人应用(docs/design/normal-user-apps.md N7)写 blueprint,workflow_id 为空 */
|
||||
workflow_id: string | null
|
||||
/** 还没发布(蓝图试运行时派生的草稿)、或个人应用时为空 */
|
||||
version: number | null
|
||||
graph_hash: string
|
||||
level?: string | null
|
||||
use: PinUse
|
||||
blueprint?: string | null
|
||||
}
|
||||
|
||||
export interface AppEntry {
|
||||
@@ -128,7 +133,8 @@ export interface AppEntry {
|
||||
}
|
||||
|
||||
export interface AppViewSource {
|
||||
kind: 'latest_sealed' | 'on_demand' | 'instance'
|
||||
/** exploratory 只在个人应用里合法:最近一次成功封存的探索运行(N7) */
|
||||
kind: 'latest_sealed' | 'on_demand' | 'instance' | 'exploratory'
|
||||
pin?: string | null
|
||||
from?: string | null
|
||||
params?: FormSchema | { $ref: string } | null
|
||||
@@ -146,6 +152,8 @@ export interface AppComponent {
|
||||
bind?: AppBinding | null
|
||||
visible?: string | null
|
||||
scope?: string | null
|
||||
/** 作者隐藏了它(N6):解析时跳过,编辑状态下画成半透明 */
|
||||
hidden?: boolean
|
||||
children?: AppComponent[]
|
||||
}
|
||||
|
||||
@@ -216,6 +224,10 @@ export interface AppSummary {
|
||||
/** 当前用户的授权(关登录时为 manage) */
|
||||
my_role: GrantRole | null
|
||||
updated_at: string
|
||||
/** 个人应用(N7):只有拥有者看得见、跑探索运行;老服务端不给时按 shared */
|
||||
scope?: 'shared' | 'personal'
|
||||
owner?: string | null
|
||||
blueprint_id?: string | null
|
||||
}
|
||||
|
||||
export interface AppDetail extends AppSummary {
|
||||
@@ -306,8 +318,8 @@ export interface Stamp {
|
||||
}
|
||||
|
||||
export interface ViewSourceState {
|
||||
/** 来源的种类:按需视图(on_demand)才有「刷新」 */
|
||||
kind?: 'latest_sealed' | 'on_demand' | 'instance'
|
||||
/** 来源的种类:按需视图(on_demand)才有「刷新」;试运行解析时为 trial,个人应用为 exploratory */
|
||||
kind?: 'latest_sealed' | 'on_demand' | 'instance' | 'exploratory' | 'trial'
|
||||
state: 'ok' | 'empty' | 'running' | 'stale' | 'error'
|
||||
run_id: string | null
|
||||
stamp: Stamp | null
|
||||
|
||||
Reference in New Issue
Block a user