zizi 00327749a2 test(p1r): 收口 Market 第一批 completed approval 门禁
只推进 Market 4 个 operation-level completed approval,保持 market domain-level allowlist 关闭,并保留剩余 28 个 Market operation 为 needs_verification。
2026-06-11 18:56:54 +08:00

2862 lines
94 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

openapi: 3.0.3
info:
title: Muse Market API
version: 1.0.0
license:
name: Proprietary
description: |
Muse 市场模块全量 API 契约,覆盖用户端市场发现、购买/授权、安装绑定、
Handoff 跳转、发布提交、治理结果与申诉,以及管理端资产审核、下架召回、
申诉处置和治理影响预览。
设计依据:产品-02F(市场功能规格)、产品-02B(管理员控制台·市场治理)、前端-04(市场与个人中心交互)。
servers:
- url: /
description: 同源 API 网关
paths:
# ================================================================
# 用户端: 市场发现与分类推荐
# ================================================================
/app-api/muse/marketplace/assets:
get:
tags: [MarketDiscovery]
summary: 市场资产列表
description: |
搜索和筛选市场资产。支持按资产类型、分类、关键词和排序方式查询。
未登录用户只能浏览公开摘要;登录后按账户授权、地区和合规状态展示可见资产。
operationId: listMarketplaceAssets
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '../openapi-base.yaml#/components/parameters/pageNo'
- $ref: '../openapi-base.yaml#/components/parameters/pageSize'
- name: sortBy
in: query
description: 排序方式
schema:
type: string
enum: [popular, newest, rating, relevance]
default: popular
- name: assetType
in: query
description: 资产类型筛选
schema:
type: string
enum: [work, agent, knowledge_base]
- name: category
in: query
description: 分类 ID 筛选
schema:
type: integer
format: int64
- name: keyword
in: query
description: 搜索关键词
schema:
type: string
maxLength: 200
- name: licenseType
in: query
description: 许可类型筛选
schema:
type: string
- name: status
in: query
description: 可用状态筛选(如 listed / delisted / recalled)
schema:
type: string
responses:
'200':
description: 资产分页列表
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/PaginatedResult'
- type: object
properties:
list:
type: array
items:
$ref: '#/components/schemas/MarketAssetCard'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
/app-api/muse/marketplace/categories:
get:
tags: [MarketDiscovery]
summary: 分类曝光、推荐位、排序和可见性摘要
description: |
获取市场分类树、专题、推荐位和发布者可见曝光摘要。
发布者只能查看自己资产的脱敏曝光聚合,不看全站策略或其他资产精确数据。
operationId: listMarketplaceCategories
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: includeExposureSummary
in: query
description: 是否包含发布者曝光摘要(仅发布者角色有效)
schema:
type: boolean
default: false
responses:
'200':
description: 分类与推荐位信息
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/MarketplaceCategoriesResponse'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
/app-api/muse/marketplace/recommendations:
get:
tags: [MarketDiscovery]
summary: 个性化推荐资产列表
description: |
基于用户上下文返回个性化推荐资产。支持指定推荐场景、参考资产和关联作品。
推荐加载失败时不阻断主列表渲染。
operationId: listMarketplaceRecommendations
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: recommendationContext
in: query
description: 推荐场景上下文(如首页、详情页相关、跨空间选择)
schema:
type: string
enum: [home, detail_related, cross_space_select]
default: home
- name: referenceAssetId
in: query
description: 参考资产 ID(用于"相似资产"推荐)
schema:
type: integer
format: int64
- name: workId
in: query
description: 关联作品 ID(用于跨空间场景下按作品槽位推荐)
schema:
type: integer
format: int64
- name: limit
in: query
description: 返回数量上限
schema:
type: integer
minimum: 1
maximum: 50
default: 10
responses:
'200':
description: 推荐资产列表
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/MarketAssetCard'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
# ================================================================
# 用户端: 资产详情与可信信息
# ================================================================
/app-api/muse/marketplace/assets/{assetId}:
get:
tags: [MarketAsset]
summary: 资产详情
description: |
获取单个市场资产的能力、来源、版本、许可、限制、治理状态和当前用户可用动作。
按资产类型(作品/智能体/知识库)展示不同可信信息面板。
operationId: getMarketplaceAsset
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
responses:
'200':
description: 资产详情
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/MarketAssetDetail'
'404':
$ref: '../openapi-base.yaml#/components/responses/NotFound'
# ================================================================
# 用户端: 收藏
# ================================================================
/app-api/muse/marketplace/assets/{assetId}/favorite:
post:
tags: [MarketFavorite]
summary: 收藏资产
description: 收藏市场资产,需登录。收藏不影响授权或安装状态。
operationId: favoriteAsset
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
- name: X-Command-Id
in: header
required: true
schema:
type: string
description: 幂等命令 ID,收藏资产必须传入。
responses:
'200':
description: 收藏成功
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
delete:
tags: [MarketFavorite]
summary: 取消收藏
description: 取消已收藏的市场资产。
operationId: unfavoriteAsset
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
- name: X-Command-Id
in: header
required: true
schema:
type: string
description: 幂等命令 ID,取消收藏必须传入。
responses:
'200':
description: 取消收藏成功
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
# ================================================================
# 用户端: 授权获取
# ================================================================
/app-api/muse/marketplace/assets/{assetId}/purchase:
post:
tags: [MarketLicense]
summary: 购买或获取授权
description: |
在确认许可、权益和限制后获取资产使用权。获取只产生授权记录,
不等于安装、绑定或写作品事实。需携带幂等键防止重复提交。
operationId: purchaseAsset
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId]
properties:
commandId:
type: string
description: 幂等键,前端生成 UUID
licenseType:
type: string
description: 许可类型选择
externalOrderRef:
type: string
description: 外部订单或授权引用标识
responses:
'200':
description: 授权获取成功
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/MarketLicenseResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
# ================================================================
# 用户端: 安装
# ================================================================
/app-api/muse/marketplace/assets/{assetId}/install:
post:
tags: [MarketInstall]
summary: 安装智能体或知识库
description: |
把已授权的智能体或知识库安装到账户可用列表。安装只表示资产进入账户可用资产列表,
不等于作品关联或绑定。作品资产不走安装流程。需携带幂等键。
operationId: installMarketplaceAsset
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId]
properties:
commandId:
type: string
description: 幂等键,前端生成 UUID
versionId:
type: integer
format: int64
description: 指定安装的版本 ID(不指定则安装当前版本)
pinVersion:
type: boolean
default: false
description: 是否固定版本(固定后不随资产升级自动更新)
responses:
'200':
description: 安装成功
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/MarketInstallResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
# ================================================================
# 用户端: Handoff 跳转授权
# ================================================================
/app-api/muse/marketplace/assets/{assetId}/bind-precheck:
post:
tags: [MarketHandoff]
summary: 创建来源侧授权摘要和 handoff 准备
description: |
在安装后发起绑定预检,生成来源侧授权摘要(如智能体槽位兼容声明、知识库用途与外发范围、
作品资产许可快照)。结果只作为 source authorization summary 和 handoff 准备信息,
供目标 owner 后续自行创建自己的预检。市场不生成任何目标 owner 预检 ID,
也不写入目标 owner 空间。
operationId: createBindPrecheck
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [targetOwner, targetAction, commandId]
properties:
targetOwner:
type: string
enum: [agent, knowledge, content]
description: 目标 owner 空间
targetAction:
type: string
enum: [slot_bind, bind, asset_use]
description: 目标动作
targetWorkId:
type: integer
format: int64
description: 目标作品 ID
commandId:
type: string
description: 幂等键
responses:
'200':
description: 预检快照生成成功
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/BindPrecheckResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
/app-api/muse/marketplace/handoffs:
post:
tags: [MarketHandoff]
summary: 创建市场 handoff
description: |
创建跨空间 handoff token,携带来源授权摘要和授权快照跳转到目标 owner 空间。
目标空间必须基于 handoffToken、authorizationSummaryId 和授权快照自行执行 owner 预检和确认。
市场只生成跳转授权,不替换绑定、不解绑、不降权、不改作品事实。
operationId: createMarketplaceHandoff
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [assetId, targetOwner, targetAction, returnUrl, commandId]
properties:
assetId:
type: string
description: 来源资产 ID
targetOwner:
type: string
enum: [agent, knowledge, content]
description: 目标 owner 空间
targetAction:
type: string
enum: [slot_bind, bind, asset_use, governance_handle]
description: 目标动作
targetWorkId:
type: integer
format: int64
description: 目标作品 ID
authorizationSummaryId:
type: integer
format: int64
description: 来源侧授权摘要 ID(来自 bind-precheck),不是目标 owner 预检 ID
returnUrl:
type: string
format: uri
description: 完成后返回市场的 URL
commandId:
type: string
description: 幂等键
responses:
'200':
description: handoff 创建成功
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/HandoffCreateResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
/app-api/muse/marketplace/handoffs/{handoffToken}:
get:
tags: [MarketHandoff]
summary: 查询 handoff 状态
description: |
只读查询 handoff token 的当前状态,不消费 token、不创建 session、不改变 handoff 状态。
用于轮询确认目标 owner 是否已完成处理;目标 owner 的 token 消费和预检由目标 owner 接口完成。
operationId: getHandoffStatus
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: handoffToken
in: path
required: true
schema:
type: string
description: handoff token
responses:
'200':
description: handoff 状态
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/HandoffStatusResult'
'404':
$ref: '../openapi-base.yaml#/components/responses/NotFound'
/app-api/muse/marketplace/handoffs/{handoffToken}/cancel:
post:
tags: [MarketHandoff]
summary: 取消市场 handoff
description: |
取消未完成的 handoff。取消后 token 失效,目标空间无法继续消费。
已被目标 owner 确认的 handoff 不可取消。
operationId: cancelHandoff
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: handoffToken
in: path
required: true
schema:
type: string
description: handoff token
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId, expectedStatus, reason]
properties:
commandId:
type: string
description: 幂等键
expectedStatus:
type: string
enum: [pending]
description: 期望当前 handoff 状态,避免盲取消已处理 token
reason:
type: string
description: 取消原因
responses:
'200':
description: 取消成功
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'404':
$ref: '../openapi-base.yaml#/components/responses/NotFound'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
# ================================================================
# 用户端: 发布提交
# ================================================================
/app-api/muse/marketplace/publish-drafts:
post:
tags: [MarketPublish]
summary: 保存发布草稿
description: |
保存发布材料草稿。保存不提交审核、不上架。发布者可反复编辑保存。
作品资产 02C owner 未闭合前只能保存为"仅阅读/收藏/授权记录"草稿。
operationId: savePublishDraft
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PublishDraftRequest'
responses:
'200':
description: 草稿保存成功
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/PublishDraftResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
/app-api/muse/marketplace/publish-drafts/{draftId}/checks:
post:
tags: [MarketPublish]
summary: 发布检查
description: |
运行发布检查,验证权利、隐私、密钥、许可完整性和敏感内容。
检查通过只表示可提交审核,不直接上架。检查结果有有效期,
过期或草稿变化后需重新检查。提交发布申请必须消费未过期的检查结果。
operationId: runPublishCheck
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: draftId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: 发布检查完成
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/PublishCheckResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
/app-api/muse/marketplace/publish-requests:
post:
tags: [MarketPublish]
summary: 提交发布申请
description: |
将发布检查通过的草稿提交审核。必须原子消费未过期且匹配资产版本、草稿版本和材料
hash 的发布检查结果。提交后进入审核队列,审核结论由管理端产生。
operationId: submitPublishRequest
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [draftId, marketPublishCheckId, commandId]
properties:
draftId:
type: integer
format: int64
description: 发布草稿 ID
marketPublishCheckId:
type: integer
format: int64
description: 发布检查结果 ID(消费检查快照)
commandId:
type: string
description: 幂等键
responses:
'200':
description: 提交成功,进入审核中
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/PublishRequestResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
/app-api/muse/marketplace/publish-requests/{requestId}/withdraw:
post:
tags: [MarketPublish]
summary: 撤回发布申请
description: |
撤回未审核的发布申请。撤回后草稿保留,不影响已有上架版本。
已审核终态的申请不可撤回。
operationId: withdrawPublishRequest
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: requestId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId, expectedStatus, reason]
properties:
commandId:
type: string
description: 幂等键
expectedStatus:
type: string
enum: [submitted, reviewing, needs_supplement]
description: 期望当前发布申请状态,避免盲撤回终态申请
reason:
type: string
description: 撤回原因
responses:
'200':
description: 撤回成功
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
/app-api/muse/marketplace/my-publish-records:
get:
tags: [MarketPublish]
summary: 我的发布记录
description: |
查询当前用户作为发布者的所有发布记录,包括草稿、已提交、审核中、
已上架、已下架和召回中的资产及状态。
operationId: listMyPublishRecords
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '../openapi-base.yaml#/components/parameters/pageNo'
- $ref: '../openapi-base.yaml#/components/parameters/pageSize'
- name: assetType
in: query
description: 资产类型筛选
schema:
type: string
enum: [work, agent, knowledge_base]
- name: status
in: query
description: 发布状态筛选
schema:
type: string
enum: [draft, submitted, reviewing, needs_supplement, approved, rejected, listed, delisted, recalled]
responses:
'200':
description: 发布记录分页列表
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/PaginatedResult'
- type: object
properties:
list:
type: array
items:
$ref: '#/components/schemas/PublishRecordItem'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
# ================================================================
# 用户端: 治理结果与申诉
# ================================================================
/app-api/muse/marketplace/assets/{assetId}/governance-impact:
get:
tags: [MarketGovernance]
summary: 查看下架/召回影响
description: |
查看资产治理结果对当前用户授权、安装、绑定、运行中任务、Shadow 候选、
知识草稿和导出限制的影响范围。发布者看完整结果;使用者只看自身影响。
operationId: getGovernanceImpact
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
responses:
'200':
description: 治理影响范围
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/GovernanceImpactResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'404':
$ref: '../openapi-base.yaml#/components/responses/NotFound'
/app-api/muse/marketplace/appeals:
post:
tags: [MarketAppeal]
summary: 提交申诉
description: |
对审核驳回、下架、召回或撤权提出申诉。申诉只提交给管理员控制台处理。
需在申诉期限内提交,且申诉人须与治理结果有关联。
operationId: submitAppeal
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [assetId, appealType, reason, commandId]
properties:
assetId:
type: string
description: 申诉对象资产 ID
appealType:
type: string
enum: [review_rejection, delist, recall, license_revocation, usage_impact]
description: 申诉类型
reason:
type: string
maxLength: 5000
description: 申诉理由
evidenceMaterials:
type: array
items:
type: string
description: 证据材料标识列表
commandId:
type: string
description: 幂等键
responses:
'200':
description: 申诉提交成功
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/AppealSubmitResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
/app-api/muse/marketplace/appeals/{appealId}/supplements:
post:
tags: [MarketAppeal]
summary: 补充申诉材料
description: |
按管理员要求补充申诉证据。补充后申诉状态更新为"已补充"。
已关闭的申诉不可补充。材料脱敏后提交,禁止上传密钥和无关正文全文。
operationId: supplementAppeal
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: appealId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [description, commandId]
properties:
description:
type: string
maxLength: 5000
description: 补充说明
attachmentIds:
type: array
items:
type: string
description: 附件标识列表
privacyConfirmed:
type: boolean
description: 是否已确认隐私处理
commandId:
type: string
description: 幂等键
responses:
'200':
description: 补充材料提交成功
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
/app-api/muse/marketplace/appeals/{appealId}/withdraw:
post:
tags: [MarketAppeal]
summary: 撤回申诉
description: |
撤回未终态的申诉或影响反馈。撤回不改变已生效的治理结果,不删除已提交材料
(法律/合规/审计留存由 02B 决定)。
operationId: withdrawAppeal
security:
- appBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: appealId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [reason, commandId, expectedStatus]
properties:
reason:
type: string
description: 撤回原因
commandId:
type: string
description: 幂等键
expectedStatus:
type: string
enum: [pending, reviewing, supplementing]
description: 期望当前申诉状态,避免盲撤回已终态申诉
responses:
'200':
description: 撤回成功
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
# ================================================================
# 管理端: 市场资产管理
# ================================================================
/admin-api/muse/market/assets:
get:
tags: [AdminMarket]
summary: 市场资产列表
description: |
管理员查看所有市场资产和治理摘要。支持按资产类型、上架状态、发布者和治理状态筛选。
不展示用户私有副本正文。
operationId: adminListMarketAssets
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '../openapi-base.yaml#/components/parameters/pageNo'
- $ref: '../openapi-base.yaml#/components/parameters/pageSize'
- name: assetType
in: query
description: 资产类型筛选
schema:
type: string
enum: [work, agent, knowledge_base]
- name: listingStatus
in: query
description: 上架/治理状态筛选
schema:
type: string
enum: [not_listed, listed, delisted, recalled]
- name: actionPolicy
in: query
description: 动作策略筛选(治理限制,不等同于上架状态)
schema:
type: string
enum: [normal, stop_new_acquire, stop_new_install, stop_new_bind, stop_generation]
- name: publisherId
in: query
description: 发布者 ID
schema:
type: integer
format: int64
- name: keyword
in: query
description: 资产名称搜索
schema:
type: string
responses:
'200':
description: 管理端资产分页列表
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/PaginatedResult'
- type: object
properties:
list:
type: array
items:
$ref: '#/components/schemas/AdminMarketAssetSummary'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
/admin-api/muse/market/assets/{assetId}:
get:
tags: [AdminMarket]
summary: 市场资产详情、版本、授权、安装、治理和来源摘要
description: |
管理员查看单个资产的完整治理信息,包括版本历史、授权范围、安装绑定数量、
申诉记录、治理历史和来源引用摘要。不展示用户私有副本正文。
operationId: adminGetMarketAsset
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
responses:
'200':
description: 资产治理详情
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/AdminMarketAssetDetail'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
'404':
$ref: '../openapi-base.yaml#/components/responses/NotFound'
/admin-api/muse/market/assets/{assetId}/governance-impact:
post:
tags: [AdminMarket]
summary: 治理影响预览
description: |
管理员在下架、召回或撤权前预览影响范围,包括受影响的授权、安装、绑定、
运行中任务、Shadow 候选、知识草稿和导出限制。预览结果可关联到后续处置操作。
operationId: adminPreviewGovernanceImpact
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId, actionType]
properties:
commandId:
type: string
description: 幂等键
actionType:
type: string
enum: [delist, recall, review_rejection, revoke_license, stop_generation]
description: 拟执行的治理动作类型
scope:
type: string
enum: [stop_new_acquire, stop_new_install, stop_new_bind, stop_generation, full_recall]
description: 治理范围
responses:
'200':
description: 影响预览结果
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/AdminGovernanceImpactPreview'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
/admin-api/muse/market/assets/{assetId}/delist:
post:
tags: [AdminMarket]
summary: 下架
description: |
下架市场资产,停止新获取、新安装或新绑定。下架后已授权用户可按治理结果
保留旧授权或停用安装。需要市场治理权限和影响预览。
operationId: adminDelistAsset
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId, expectedStatus, impactPreviewId, reason, scope]
properties:
commandId:
type: string
description: 幂等键
expectedStatus:
type: string
enum: [listed]
description: 期望当前上架状态,避免盲下架
impactPreviewId:
type: string
description: 关联的治理影响预览 ID
reason:
type: string
maxLength: 5000
description: 下架原因
scope:
type: string
enum: [stop_new_acquire, stop_new_install, stop_new_bind, stop_generation, full_delist]
description: 下架范围
responses:
'200':
description: 下架成功
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
/admin-api/muse/market/assets/{assetId}/recall:
post:
tags: [AdminMarket]
summary: 召回
description: |
追溯召回市场资产,阻断后续生成使用、标记来源不可用。召回需要合规管理员权限和双人控制。
召回后运行中任务需重验或取消,Shadow 候选和知识草稿标记来源已失效。
已确认作品事实保留来源异常标记,不自动回滚。
operationId: adminRecallAsset
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '#/components/parameters/assetId'
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId, expectedStatus, impactPreviewId, reason, basis, scope]
properties:
commandId:
type: string
description: 幂等键
expectedStatus:
type: string
enum: [listed, delisted]
description: 期望当前治理状态,避免盲召回
impactPreviewId:
type: string
description: 关联的治理影响预览 ID
reason:
type: string
maxLength: 5000
description: 召回原因
basis:
type: string
maxLength: 5000
description: 召回依据(法律/合规/安全)
scope:
type: string
enum: [stop_generation, full_recall]
description: 召回范围
exportPreservation:
type: boolean
default: false
description: 是否启动法务保全限制(限制导出和复制)
responses:
'200':
description: 召回成功
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
# ================================================================
# 管理端: 发布申请审核
# ================================================================
/admin-api/muse/market/publish-requests:
get:
tags: [AdminMarketReview]
summary: 发布申请列表
description: |
管理员查看待审核的发布申请队列。支持按资产类型、审核状态、风险标签和发布者筛选。
市场审核是发布硬门槛,不能降级成简单开关。
operationId: adminListPublishRequests
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '../openapi-base.yaml#/components/parameters/pageNo'
- $ref: '../openapi-base.yaml#/components/parameters/pageSize'
- name: assetType
in: query
description: 资产类型筛选
schema:
type: string
enum: [work, agent, knowledge_base]
- name: status
in: query
description: 审核状态筛选
schema:
type: string
enum: [pending, reviewing, needs_supplement, approved, rejected, compliance_blocked]
- name: riskTag
in: query
description: 风险标签筛选
schema:
type: string
- name: publisherId
in: query
description: 发布者 ID
schema:
type: string
responses:
'200':
description: 发布申请分页列表
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/PaginatedResult'
- type: object
properties:
list:
type: array
items:
$ref: '#/components/schemas/AdminPublishRequestSummary'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
/admin-api/muse/market/publish-requests/{requestId}/approve:
post:
tags: [AdminMarketReview]
summary: 审核通过
description: |
审核通过发布申请,资产进入上架状态。通过需确认审核材料完整,
审核理由和证据将被记录。通知发布者审核通过。
operationId: adminApprovePublishRequest
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: requestId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId, expectedStatus, validationResultId, note]
properties:
commandId:
type: string
description: 幂等键
expectedStatus:
type: string
enum: [pending, reviewing, needs_supplement]
description: 期望当前审核状态,避免盲通过
validationResultId:
type: string
description: 审核校验结果引用 ID
note:
type: string
maxLength: 5000
description: 审核通过说明
evidenceTags:
type: array
items:
type: string
description: 审核证据标签
responses:
'200':
description: 审核通过,已上架
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
/admin-api/muse/market/publish-requests/{requestId}/reject:
post:
tags: [AdminMarketReview]
summary: 审核拒绝
description: |
驳回发布申请,资产不进入上架状态。必须提供驳回理由。
发布者可对驳回结果提出申诉。
operationId: adminRejectPublishRequest
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: requestId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId, expectedStatus, validationResultId, reason]
properties:
commandId:
type: string
description: 幂等键
expectedStatus:
type: string
enum: [pending, reviewing, needs_supplement]
description: 期望当前审核状态,避免盲驳回
validationResultId:
type: string
description: 审核校验结果引用 ID
reason:
type: string
maxLength: 5000
description: 驳回理由
evidenceTags:
type: array
items:
type: string
description: 审核证据标签
requireSupplement:
type: boolean
default: false
description: 是否要求发布者补充材料后可重新提交
supplementItems:
type: array
items:
type: string
description: 需要补充的项目列表
responses:
'200':
description: 审核驳回
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
# ================================================================
# 管理端: 申诉处理
# ================================================================
/admin-api/muse/market/appeals:
get:
tags: [AdminMarketAppeal]
summary: 申诉列表
description: |
管理员查看所有申诉列表。支持按申诉人、资产、申诉状态和处理人筛选。
operationId: adminListAppeals
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- $ref: '../openapi-base.yaml#/components/parameters/pageNo'
- $ref: '../openapi-base.yaml#/components/parameters/pageSize'
- name: appealType
in: query
description: 申诉类型筛选
schema:
type: string
enum: [review_rejection, delist, recall, license_revocation, usage_impact]
- name: status
in: query
description: 申诉状态筛选
schema:
type: string
enum: [pending, reviewing, supplementing, maintained, restored, closed]
- name: appellantId
in: query
description: 申诉人 ID
schema:
type: string
- name: assetId
in: query
description: 关联资产 ID
schema:
type: string
responses:
'200':
description: 申诉分页列表
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/PaginatedResult'
- type: object
properties:
list:
type: array
items:
$ref: '#/components/schemas/AdminAppealSummary'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
/admin-api/muse/market/appeals/{appealId}:
get:
tags: [AdminMarketAppeal]
summary: 申诉详情
description: |
管理员查看申诉详情,包括申诉材料、证据摘要、原治理结果、处理历史和补充材料记录。
只看申诉材料和发布资产,不读取用户私有副本。
operationId: adminGetAppeal
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: appealId
in: path
required: true
schema:
type: string
responses:
'200':
description: 申诉详情
content:
application/json:
schema:
allOf:
- $ref: '../openapi-base.yaml#/components/schemas/CommonResult'
- type: object
properties:
data:
$ref: '#/components/schemas/AdminAppealDetail'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
'404':
$ref: '../openapi-base.yaml#/components/responses/NotFound'
/admin-api/muse/market/appeals/{appealId}/resolve:
post:
tags: [AdminMarketAppeal]
summary: 处理申诉
description: |
处理申诉,给出维持、恢复或关闭结论。恢复上架需重新预览影响范围。
处理结论和证据将被记录。可能触发来源状态传播。
operationId: adminResolveAppeal
security:
- adminBearerAuth: []
parameters:
- $ref: '../openapi-base.yaml#/components/parameters/XApiVersion'
- name: appealId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [commandId, expectedStatus, impactPreviewId, resolution, reason]
properties:
commandId:
type: string
description: 幂等键
expectedStatus:
type: string
enum: [pending, reviewing, supplementing]
description: 期望当前申诉状态,避免盲处理
resolution:
type: string
enum: [maintained, restored, partially_restored, closed]
description: 处理结论
reason:
type: string
maxLength: 5000
description: 处理理由
evidenceTags:
type: array
items:
type: string
description: 处理证据标签
impactPreviewId:
type: string
description: 恢复时的关联影响预览 ID
requireSupplement:
type: boolean
default: false
description: 是否要求申诉人补充材料
supplementItems:
type: array
items:
type: string
description: 需要补充的项目列表
responses:
'200':
description: 申诉处理完成
content:
application/json:
schema:
$ref: '../openapi-base.yaml#/components/schemas/CommonResult'
'401':
$ref: '../openapi-base.yaml#/components/responses/Unauthorized'
'403':
$ref: '../openapi-base.yaml#/components/responses/Forbidden'
'409':
$ref: '../openapi-base.yaml#/components/responses/Conflict'
# ==================================================================
# Components
# ==================================================================
components:
securitySchemes:
adminBearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 管理后台认证 scheme,仅用于 /admin-api/** 接口,admin-api token 与 app-api token 不互通。
appBearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 用户端认证 scheme,仅用于 /app-api/** 接口,app-api token 与 admin-api token 不互通。
parameters:
assetId:
name: assetId
in: path
required: true
schema:
type: string
description: 市场资产 ID
schemas:
# ------------------------------------------------------------------
# 市场发现
# ------------------------------------------------------------------
MarketAssetCard:
type: object
description: 市场资产卡片(列表项)
required: [assetId, name, assetType, publisherName, version, listingStatus]
properties:
assetId:
type: string
name:
type: string
maxLength: 200
assetType:
type: string
enum: [work, agent, knowledge_base]
description: 资产类型
publisherName:
type: string
description: 发布者名称
version:
type: string
description: 当前版本号
summary:
type: string
maxLength: 500
description: 资产摘要
licenseSummary:
type: string
description: 许可摘要
listingStatus:
type: string
enum: [listed, delisted, recalled, not_listed]
description: 上架状态
isAcquired:
type: boolean
description: 当前用户是否已获取授权
isInstalled:
type: boolean
description: 当前用户是否已安装
isFavorite:
type: boolean
description: 当前用户是否已收藏
coverImageUrl:
type: string
format: uri
recommendationReason:
type: string
description: 推荐理由(仅推荐位返回)
governanceAlert:
type: string
description: 下架/召回提示文案
MarketplaceCategoriesResponse:
type: object
description: 分类、推荐位和曝光摘要
properties:
categories:
type: array
items:
$ref: '#/components/schemas/MarketplaceCategory'
topics:
type: array
items:
$ref: '#/components/schemas/MarketplaceTopic'
recommendationSlots:
type: array
items:
$ref: '#/components/schemas/RecommendationSlot'
exposureSummary:
$ref: '#/components/schemas/PublisherExposureSummary'
MarketplaceCategory:
type: object
description: 市场分类
required: [categoryId, name]
properties:
categoryId:
type: integer
format: int64
name:
type: string
description:
type: string
sortOrder:
type: integer
assetCount:
type: integer
description: 该分类下的资产数量
MarketplaceTopic:
type: object
description: 市场专题
required: [topicId, title]
properties:
topicId:
type: integer
format: int64
title:
type: string
description:
type: string
assetIds:
type: array
items:
type: integer
format: int64
RecommendationSlot:
type: object
description: 推荐位
required: [slotId, name]
properties:
slotId:
type: string
name:
type: string
description:
type: string
assetIds:
type: array
items:
type: integer
format: int64
PublisherExposureSummary:
type: object
description: 发布者曝光摘要(脱敏聚合)
properties:
totalExposureRange:
type: string
description: 总曝光次数区间(如 "1K-5K")
totalClickRange:
type: string
description: 总点击次数区间
totalAcquireRange:
type: string
description: 总获取次数区间
blockedReason:
type: string
description: 下架屏蔽原因(如有)
# ------------------------------------------------------------------
# 资产详情
# ------------------------------------------------------------------
MarketAssetDetail:
type: object
description: 市场资产详情
required: [assetId, name, assetType, publisherName, version, listingStatus, licenseInfo]
properties:
assetId:
type: string
name:
type: string
maxLength: 200
assetType:
type: string
enum: [work, agent, knowledge_base]
publisherName:
type: string
publisherId:
type: string
version:
type: string
versionId:
type: integer
format: int64
listingStatus:
type: string
enum: [listed, delisted, recalled, not_listed]
description: 上架生命周期状态
updatedAt:
type: string
format: date-time
summary:
type: string
maxLength: 500
description:
type: string
maxLength: 5000
licenseInfo:
$ref: '#/components/schemas/LicenseInfo'
coverImageUrl:
type: string
format: uri
tags:
type: array
items:
type: string
categoryId:
type: integer
format: int64
# 用户授权与可用动作
userActions:
$ref: '#/components/schemas/AssetUserActions'
# 治理状态
governanceStatus:
$ref: '#/components/schemas/GovernanceStatus'
# 分型可信信息(按资产类型不同)
typeSpecificInfo:
$ref: '#/components/schemas/TypeSpecificInfo'
LicenseInfo:
type: object
description: 许可信息
required: [licenseType, allowedUses, prohibitedUses]
properties:
licenseType:
type: string
description: 许可类型
allowedUses:
type: array
items:
type: string
description: 允许用途
prohibitedUses:
type: array
items:
type: string
description: 禁止用途(如禁止再分发、禁止训练复用)
validityPeriod:
type: string
description: 有效期说明
priceDisplay:
type: string
description: 价格或权益展示文案
externalOrderRef:
type: string
description: 外部订单或授权引用
AssetUserActions:
type: object
description: 当前用户对资产的可用动作
properties:
canAcquire:
type: boolean
description: 是否可获取授权
canInstall:
type: boolean
description: 是否可安装(仅智能体/知识库)
canBind:
type: boolean
description: 是否可绑定到作品
canFavorite:
type: boolean
description: 是否可收藏
actionPolicy:
$ref: '#/components/schemas/AssetActionPolicy'
isAcquired:
type: boolean
isInstalled:
type: boolean
isFavorite:
type: boolean
unavailableReason:
type: string
description: 不可用原因(如需登录、已下架、授权失效)
GovernanceStatus:
type: object
description: 治理状态。listingStatus 只表达上架生命周期,动作限制放入 actionPolicy。
properties:
listingStatus:
type: string
enum: [listed, delisted, recalled, not_listed]
sourceStatus:
$ref: '#/components/schemas/SourceStatus'
actionPolicy:
$ref: '#/components/schemas/AssetActionPolicy'
delistReason:
type: string
recallReason:
type: string
appealStatus:
type: string
enum: [none, pending, reviewing, maintained, restored, closed]
appealDeadline:
type: string
format: date-time
description: 申诉截止时间
SourceStatus:
type: string
enum: [available, authorization_expired, source_delisted, source_recalled, source_revoked, unavailable]
description: 来源状态,只描述来源可用性;重验要求不得写成状态,必须放入 actionPolicy.recheckReasons。
AssetActionPolicy:
type: object
description: 当前治理策略下的动作限制,不等同于 listingStatus、licenseStatus、installStatus 或 bindStatus。
properties:
acquirePolicy:
type: string
enum: [allowed, stop_new_acquire]
installPolicy:
type: string
enum: [allowed, stop_new_install]
bindPolicy:
type: string
enum: [allowed, stop_new_bind]
generationPolicy:
type: string
enum: [allowed, stop_generation]
recheckReasons:
type: array
items:
type: string
description: 需要目标 owner 重验的原因列表,例如 source_version_changed / authorization_snapshot_expired。
TypeSpecificInfo:
type: object
description: 分型可信信息(按资产类型展示不同面板)
properties:
# 作品资产
workInfo:
$ref: '#/components/schemas/WorkAssetInfo'
# 智能体资产
agentInfo:
$ref: '#/components/schemas/AgentAssetInfo'
# 知识库资产
knowledgeBaseInfo:
$ref: '#/components/schemas/KnowledgeBaseAssetInfo'
WorkAssetInfo:
type: object
description: 作品资产可信信息
properties:
readableScope:
type: string
description: 可阅读范围
canFavorite:
type: boolean
authorizationRecordAvailable:
type: boolean
publicBoundary:
type: string
description: 正文/设定/片段的公开边界说明
sourceTrackingSummary:
type: string
description: 来源追踪摘要
futureUseGateStatus:
type: string
description: 后续使用能力(模板化/参考写入/AI上下文)是否未开放及原因
AgentAssetInfo:
type: object
description: 智能体资产可信信息
properties:
capabilityCategory:
type: string
description: 能力类别
slotCompatibility:
type: string
description: 开放槽位兼容性
inputOutputContract:
type: string
description: 输入输出合同摘要
toolAuthorizations:
type: array
items:
type: string
description: 可使用工具列表
outboundScope:
type: string
description: 外发范围说明
containsPrivatePromptSummary:
type: boolean
description: 是否含私有 Prompt 摘要
trialLimitation:
type: string
description: 试用限制说明
cannotReplaceSystemProtection:
type: boolean
description: 不可替换系统保护节点说明
KnowledgeBaseAssetInfo:
type: object
description: 知识库资产可信信息
properties:
materialScopeSummary:
type: string
description: 资料范围摘要
processingStatus:
type: string
description: 处理状态
searchable:
type: boolean
description: 是否可检索
generatable:
type: boolean
description: 是否可生成
allowedInModelContext:
type: boolean
description: 是否允许进入模型上下文
outboundScope:
type: string
description: 外发范围
versionPinningAvailable:
type: boolean
description: 是否支持版本固定
sourceDelistedOrRevoked:
type: boolean
description: 来源是否下架/撤权
# ------------------------------------------------------------------
# 授权获取
# ------------------------------------------------------------------
MarketLicenseResult:
type: object
description: 授权获取结果
required: [licenseId, assetId, status]
properties:
licenseId:
type: integer
format: int64
description: 授权记录 ID
assetId:
type: string
status:
type: string
enum: [active, expired, revoked]
nextStep:
type: string
description: 下一步操作提示(如"可前往安装")
licenseSnapshot:
type: string
description: 授权快照摘要
# ------------------------------------------------------------------
# 安装
# ------------------------------------------------------------------
MarketInstallResult:
type: object
description: 安装结果
required: [installationId, assetId, status]
properties:
installationId:
type: integer
format: int64
description: 安装记录 ID
assetId:
type: string
versionId:
type: integer
format: int64
status:
type: string
enum: [installed, disabled, upgradable]
canUpgrade:
type: boolean
canBindTarget:
type: boolean
description: 是否有可绑定目标
bindTargetSummary:
type: string
description: 可绑定目标摘要
# ------------------------------------------------------------------
# Handoff
# ------------------------------------------------------------------
BindPrecheckResult:
type: object
description: 来源侧授权摘要和 handoff 准备结果,不包含目标 owner 预检 ID。
required: [authorizationSummaryId, authorizationSnapshotId, assetId, sourceVersion, sourceStatus, targetOwner, targetAction, handoffReady, expiresAt]
properties:
authorizationSummaryId:
type: integer
format: int64
description: 来源侧授权摘要 ID,供目标 owner 预检消费
authorizationSnapshotId:
type: integer
format: int64
description: 来源授权快照 ID
assetId:
type: string
sourceVersion:
type: integer
description: 来源资产版本
sourceStatus:
$ref: '#/components/schemas/SourceStatus'
targetOwner:
type: string
enum: [agent, knowledge, content]
targetAction:
type: string
enum: [slot_bind, bind, asset_use]
targetWorkId:
type: integer
format: int64
authorizationSnapshot:
type: string
description: 授权快照摘要
actionPolicy:
$ref: '#/components/schemas/AssetActionPolicy'
handoffReady:
type: boolean
description: 是否具备创建 handoff 的来源侧条件
compatibilityResult:
type: string
description: 来源侧兼容性摘要;目标 owner 仍必须自行执行目标预检
expiresAt:
type: string
format: date-time
description: 预检过期时间
HandoffCreateResult:
type: object
description: Handoff 创建结果
required: [handoffToken, targetPage, expiresAt]
properties:
handoffToken:
type: string
description: 一次性 handoff token
targetPage:
type: string
format: uri
description: 目标 owner 空间落地页 URL
authorizationSummaryId:
type: integer
format: int64
description: 关联的来源侧授权摘要 ID
authorizationSnapshotId:
type: integer
format: int64
description: 关联的来源授权快照 ID
expiresAt:
type: string
format: date-time
description: token 过期时间
HandoffStatusResult:
type: object
description: Handoff 状态
required: [handoffToken, status]
properties:
handoffToken:
type: string
status:
type: string
enum: [pending, owner_precheck_created, completed, expired, cancelled]
targetOwner:
type: string
targetAction:
type: string
assetId:
type: string
targetWorkId:
type: integer
format: int64
returnUrl:
type: string
format: uri
ownerConfirmResult:
type: string
description: 目标 owner 确认结果摘要
expiresAt:
type: string
format: date-time
# ------------------------------------------------------------------
# 发布提交
# ------------------------------------------------------------------
PublishDraftRequest:
type: object
description: 发布草稿请求
required: [assetType, sourceId, name]
properties:
assetType:
type: string
enum: [work, agent, knowledge_base]
description: 资产类型
sourceId:
type: integer
format: int64
description: 来源对象 ID(作品/智能体/知识库)
name:
type: string
maxLength: 200
description: 市场展示标题
summary:
type: string
maxLength: 500
description: 市场展示摘要
description:
type: string
maxLength: 5000
categoryId:
type: integer
format: int64
licenseType:
type: string
description: 许可类型
allowedUses:
type: array
items:
type: string
prohibitedUses:
type: array
items:
type: string
coverImageUrl:
type: string
format: uri
tags:
type: array
items:
type: string
rightsDeclaration:
type: string
description: 权利声明
externalOrderRef:
type: string
description: 外部订单引用规则
# 作品资产特有:02C owner 未闭合时只能标为仅阅读/收藏/授权记录
workAssetMode:
type: string
enum: [read_only_favorite_license, full, reference, context_use]
default: read_only_favorite_license
description: 作品资产发布模式。当前 gate 未完成,默认且唯一可直接开放的是 read_only_favorite_license;full/reference/context_use 必须经后续 owner gate 和市场审核显式放开。
PublishDraftResult:
type: object
description: 发布草稿保存结果
required: [draftId, status, missingItems]
properties:
draftId:
type: integer
format: int64
status:
type: string
enum: [draft, unchecked, check_failed, submittable]
missingItems:
type: array
items:
type: string
description: 缺失项列表
PublishCheckResult:
type: object
description: 发布检查结果
required: [marketPublishCheckId, status, canSubmit, expiresAt]
properties:
marketPublishCheckId:
type: integer
format: int64
description: 检查结果 ID(提交审核时消费)
status:
type: string
enum: [running, passed, failed, expired]
blockers:
type: array
items:
$ref: '#/components/schemas/PublishCheckItem'
description: 阻断项
warnings:
type: array
items:
$ref: '#/components/schemas/PublishCheckItem'
description: 警告项
canSubmit:
type: boolean
description: 检查通过是否可提交审核
expiresAt:
type: string
format: date-time
description: 检查结果过期时间
PublishCheckItem:
type: object
description: 发布检查条目
required: [category, message]
properties:
category:
type: string
enum: [rights, privacy, key_exposure, copyright, license_completeness, sensitive_content, owner_precheck_lineage, processing_status, outbound_scope, redistribution_restriction]
description: 检查类别
message:
type: string
description: 检查信息
severity:
type: string
enum: [blocker, warning]
description: 严重性
PublishRequestResult:
type: object
description: 发布申请提交结果
required: [requestId, status]
properties:
requestId:
type: string
description: 发布申请 ID
status:
type: string
enum: [submitted, reviewing]
description: 申请状态
PublishRecordItem:
type: object
description: 发布记录条目
required: [assetId, assetName, assetType, status]
properties:
assetId:
type: string
assetName:
type: string
assetType:
type: string
enum: [work, agent, knowledge_base]
version:
type: string
status:
type: string
enum: [draft, submitted, reviewing, needs_supplement, approved, rejected, listed, delisted, recalled]
nextAction:
type: string
description: 下一步操作提示
governanceStatus:
type: string
appealStatus:
type: string
exposureRange:
type: string
description: 曝光区间摘要
# ------------------------------------------------------------------
# 治理结果
# ------------------------------------------------------------------
GovernanceImpactResult:
type: object
description: 治理影响范围
properties:
assetId:
type: string
governanceResult:
$ref: '#/components/schemas/GovernanceResultSummary'
affectedAuthorizations:
type: array
items:
$ref: '#/components/schemas/AffectedAuthorization'
description: 受影响的授权记录
affectedInstallations:
type: array
items:
$ref: '#/components/schemas/AffectedInstallation'
description: 受影响的安装记录
affectedBindings:
type: array
items:
$ref: '#/components/schemas/AffectedBinding'
description: 受影响的作品绑定
affectedTasks:
type: array
items:
$ref: '#/components/schemas/AffectedTask'
description: 受影响的运行中任务
affectedCandidates:
type: array
items:
$ref: '#/components/schemas/AffectedCandidate'
description: 受影响的 Shadow 候选和知识草稿
exportRestrictions:
type: array
items:
type: string
description: 导出限制说明
suggestedActions:
type: array
items:
type: string
description: 建议动作
GovernanceResultSummary:
type: object
description: 治理结果摘要
properties:
resultType:
type: string
enum: [delist, recall, revoke, appeal]
description: 结果类型
reason:
type: string
description: 原因摘要
effectiveAt:
type: string
format: date-time
description: 生效时间
scope:
type: string
description: 影响范围说明
newAcquireStopped:
type: boolean
newInstallStopped:
type: boolean
newBindStopped:
type: boolean
generationUseStopped:
type: boolean
AffectedAuthorization:
type: object
properties:
licenseId:
type: integer
format: int64
status:
type: string
description: 当前授权状态
impact:
type: string
description: 影响说明
AffectedInstallation:
type: object
properties:
installationId:
type: integer
format: int64
status:
type: string
impact:
type: string
suggestedAction:
type: string
AffectedBinding:
type: object
properties:
bindingId:
type: integer
format: int64
workId:
type: integer
format: int64
workName:
type: string
description: 脱敏作品名
bindingType:
type: string
impact:
type: string
AffectedTask:
type: object
properties:
taskId:
type: integer
format: int64
taskType:
type: string
status:
type: string
impact:
type: string
AffectedCandidate:
type: object
properties:
candidateId:
type: integer
format: int64
candidateType:
type: string
enum: [shadow_candidate, knowledge_draft]
impact:
type: string
suggestedAction:
type: string
# ------------------------------------------------------------------
# 申诉
# ------------------------------------------------------------------
AppealSubmitResult:
type: object
description: 申诉提交结果
required: [appealId, status, processingDeadline]
properties:
appealId:
type: string
status:
type: string
enum: [pending, reviewing]
processingDeadline:
type: string
description: 预计处理周期
supplementEntryAvailable:
type: boolean
description: 是否可补充材料
# ------------------------------------------------------------------
# 管理端: 资产
# ------------------------------------------------------------------
AdminMarketAssetSummary:
type: object
description: 管理端资产列表摘要
required: [assetId, name, assetType, publisherName, listingStatus, reviewStatus]
properties:
assetId:
type: string
name:
type: string
assetType:
type: string
enum: [work, agent, knowledge_base]
publisherId:
type: string
publisherName:
type: string
version:
type: string
listingStatus:
type: string
enum: [not_listed, listed, delisted, recalled]
description: 上架生命周期状态;动作限制见 actionPolicy。
actionPolicy:
$ref: '#/components/schemas/AssetActionPolicy'
reviewStatus:
type: string
enum: [pending, reviewing, needs_supplement, approved, rejected, compliance_blocked]
installCount:
type: integer
description: 安装数量
bindCount:
type: integer
description: 绑定数量
appealCount:
type: integer
description: 申诉数量
sourceStatus:
$ref: '#/components/schemas/SourceStatus'
AdminMarketAssetDetail:
type: object
description: 管理端资产治理详情
required: [assetId, name, assetType, listingStatus, reviewStatus]
properties:
assetId:
type: string
name:
type: string
assetType:
type: string
enum: [work, agent, knowledge_base]
publisherId:
type: string
publisherName:
type: string
version:
type: string
listingStatus:
type: string
enum: [not_listed, listed, delisted, recalled]
description: 上架生命周期状态;动作限制见 actionPolicy。
actionPolicy:
$ref: '#/components/schemas/AssetActionPolicy'
reviewStatus:
type: string
enum: [pending, reviewing, needs_supplement, approved, rejected, compliance_blocked]
licenseInfo:
$ref: '#/components/schemas/LicenseInfo'
installCount:
type: integer
bindCount:
type: integer
affectedTaskCount:
type: integer
sourceReferenceSummary:
type: string
description: 来源引用摘要
sourceStatus:
$ref: '#/components/schemas/SourceStatus'
governanceHistory:
type: array
items:
$ref: '#/components/schemas/AdminGovernanceHistoryItem'
appeals:
type: array
items:
$ref: '#/components/schemas/AdminAppealSummary'
AdminGovernanceHistoryItem:
type: object
description: 治理历史条目
properties:
action:
type: string
description: 治理动作(如 delist / recall / restore)
reason:
type: string
operatorId:
type: string
operatedAt:
type: string
format: date-time
scope:
type: string
# ------------------------------------------------------------------
# 管理端: 治理影响预览
# ------------------------------------------------------------------
AdminGovernanceImpactPreview:
type: object
description: 管理端治理影响预览
required: [previewId, actionType, scope, affectedCounts]
properties:
previewId:
type: string
description: 预览 ID(关联到后续下架/召回操作)
actionType:
type: string
enum: [delist, recall, review_rejection, revoke_license, stop_generation]
scope:
type: string
affectedCounts:
$ref: '#/components/schemas/AffectedCounts'
sourceReferenceSummary:
type: string
description: 来源引用摘要
notificationScope:
type: string
description: 通知范围说明
alternativeAssets:
type: array
items:
type: string
description: 可替代资产建议
AffectedCounts:
type: object
description: 受影响数量聚合
properties:
authorizationCount:
type: integer
installationCount:
type: integer
bindingCount:
type: integer
runningTaskCount:
type: integer
shadowCandidateCount:
type: integer
knowledgeDraftCount:
type: integer
# ------------------------------------------------------------------
# 管理端: 发布审核
# ------------------------------------------------------------------
AdminPublishRequestSummary:
type: object
description: 管理端发布申请摘要
required: [requestId, assetId, assetName, assetType, status]
properties:
requestId:
type: string
assetId:
type: string
assetName:
type: string
assetType:
type: string
enum: [work, agent, knowledge_base]
publisherId:
type: string
publisherName:
type: string
version:
type: string
status:
type: string
enum: [pending, reviewing, needs_supplement, approved, rejected, compliance_blocked]
riskTags:
type: array
items:
type: string
submittedAt:
type: string
format: date-time
rightsDeclaration:
type: string
privacyCheckResult:
type: string
description: 隐私/密钥检查结果
# ------------------------------------------------------------------
# 管理端: 申诉
# ------------------------------------------------------------------
AdminAppealSummary:
type: object
description: 管理端申诉摘要
required: [appealId, appealType, status, assetId]
properties:
appealId:
type: string
appealType:
type: string
enum: [review_rejection, delist, recall, license_revocation, usage_impact]
status:
type: string
enum: [pending, reviewing, supplementing, maintained, restored, closed]
appellantId:
type: string
appellantName:
type: string
assetId:
type: string
assetName:
type: string
submittedAt:
type: string
format: date-time
processorId:
type: string
AdminAppealDetail:
type: object
description: 管理端申诉详情
required: [appealId, appealType, status, assetId, reason]
properties:
appealId:
type: string
appealType:
type: string
enum: [review_rejection, delist, recall, license_revocation, usage_impact]
status:
type: string
enum: [pending, reviewing, supplementing, maintained, restored, closed]
appellantId:
type: string
appellantName:
type: string
assetId:
type: string
assetName:
type: string
assetVersion:
type: string
reason:
type: string
description: 申诉理由
evidenceMaterials:
type: array
items:
type: string
description: 证据材料标识列表
currentGovernanceStatus:
type: string
description: 当前治理状态
originalResult:
type: string
description: 原审核/下架/召回结论
processingHistory:
type: array
items:
$ref: '#/components/schemas/AppealProcessingHistoryItem'
supplementRecords:
type: array
items:
$ref: '#/components/schemas/AppealSupplementRecord'
AppealProcessingHistoryItem:
type: object
description: 申诉处理历史条目
properties:
action:
type: string
processorId:
type: string
processedAt:
type: string
format: date-time
reason:
type: string
AppealSupplementRecord:
type: object
description: 申诉补充材料记录
properties:
supplementId:
type: integer
format: int64
submittedBy:
type: integer
format: int64
submittedAt:
type: string
format: date-time
description:
type: string
attachmentIds:
type: array
items:
type: string
tags:
- name: MarketDiscovery
description: 市场发现与分类推荐
- name: MarketAsset
description: 资产详情与可信信息
- name: MarketFavorite
description: 收藏
- name: MarketLicense
description: 授权获取
- name: MarketInstall
description: 安装
- name: MarketHandoff
description: 跨空间 Handoff 跳转授权
- name: MarketPublish
description: 发布提交
- name: MarketGovernance
description: 治理结果展示
- name: MarketAppeal
description: 申诉
- name: AdminMarket
description: 管理端市场资产管理
- name: AdminMarketReview
description: 管理端发布申请审核
- name: AdminMarketAppeal
description: 管理端申诉处理