跳到主要内容

CreateWorkflowProjectRequest

workflowIdstring<uuid>required

本地 package.json.id 中的必填 UUID,作为 server 项目主键。 / Required UUID from local package.json.id; used as the server project primary key.

namestringrequired
projectTypeWorkflowProjectTyperequired

Workflow/Conversation 由 executor.projectType 声明;Kanban 由 package.json.workflowCode.projectType 声明。宿主据此选择运行或静态预览界面。

Possible values: [workflow, conversation, kanban]

projectInfo objectrequired

项目元数据权威模型。读取旧项目时 dataStorage 可能为 null,其它创建或保存请求必须使用 DeclaredWorkflowProjectInfo 并提供有效 mode。当前界面识别 zh-CNenmultilingualmultiplatformmacoswindowsweb;符合格式的未来 locale 或 ID 原样保留。

Authoritative project metadata model. Legacy read responses may carry null dataStorage; create and save requests use DeclaredWorkflowProjectInfo with an explicit valid mode.

localizedNames objectrequired
property name*string
declarationsstring[]required

Possible values: Value must match regular expression ^[a-z][a-z0-9-]*$

platformSupport objectrequired
oneOf
modestringrequired
Constant value: agnostic
dataStorage objectrequired

严格限定项目可访问的数据位置;null 只表示尚未迁移的旧项目。 / Strictly limits accessible data locations; null represents an undeclared legacy project only.

oneOf
modestringrequired

local 仅本地,server 仅服务器,both 允许显式选择两端。 / local permits local storage only, server permits server storage only, and both permits an explicit choice.

Possible values: [both, local, server]

relatedProjects object[]required

Possible values: <= 32

  • Array [
  • aliasstringrequired

    Possible values: Value must match regular expression ^[a-z][a-z0-9_-]{0,63}$

    projectIdstring<uuid>required
    grantToRelatedProject objectrequired

    允许关联项目访问当前项目 KV 的规则;不是当前项目访问对方的权限。

    read objectrequired
    oneOf
    modestringrequired
    Constant value: none
    write objectrequired
    oneOf
    modestringrequired
    Constant value: none
  • ]
  • visibilityWorkflowVisibility

    Possible values: [private, public]

    projectCard object
    iconstringrequired

    Possible values: [workflow, message-circle, bot, sparkles, code, git-branch, boxes, zap, database, file-text, cpu, brain]

    iconUrlstring<uri>

    Optional image URL used instead of the icon token. New Desktop uploads use the Server-generated /project-card-images/... WebP URL; existing external http(s) values remain readable for backward compatibility.

    iconColorstring

    Optional built-in icon foreground color. Defaults to white for older metadata.

    Possible values: Value must match regular expression ^#[0-9a-fA-F]{6}$

    iconBackgroundColorstringrequired

    Possible values: Value must match regular expression ^#[0-9a-fA-F]{6}$

    CreateWorkflowProjectRequest
    {
    "workflowId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "projectType": "workflow",
    "projectInfo": {
    "localizedNames": {},
    "declarations": [
    "string"
    ],
    "platformSupport": {
    "mode": "agnostic"
    },
    "dataStorage": {
    "mode": "local"
    },
    "relatedProjects": [
    {
    "alias": "string",
    "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "grantToRelatedProject": {
    "read": {
    "mode": "none"
    },
    "write": {
    "mode": "none"
    }
    }
    }
    ]
    },
    "visibility": "private",
    "projectCard": {
    "icon": "workflow",
    "iconUrl": "string",
    "iconColor": "string",
    "iconBackgroundColor": "string"
    }
    }