普通用户建应用集成收尾:

- 问数据和个人应用的图放行绑定只读查询等合规工具的调用工具节点,只读和遮罩在这条路径上生效;被治理成写入的工具在只读运行里直接拒;知识库范围在工具层固定(图级默认值、参数名纠错、Agent 都改不了)
- 个人应用的刷新和个人蓝图的试运行只有拥有者能读:运行、事件、证据、工件、文件、运行与审批列表、对比、可验证报告、质询、假设分析、提取工作流一并收紧;个人蓝图的试运行不论谁发起都按个人应用约束
- 共享蓝图只给拥有者、对应应用的管理者、管理员,看不到的一律 404;审核副本归审核人;管理员看别人的个人应用只有元数据、可以归档
- 记录表跨版本汇总(只读挂载旧版本、按当前列 UNION ALL、各版本各自固定高水位,缺的版本照实写进印章);停用前发起的运行可以继续写旧版本;更正沿用原提交人、更正人记审计
- 约定收口:待办种类 review、事件 file.extracted、表单错误 file、模板定义带示例与预置;前端类型一次补齐、去掉临时的局部类型;审核待办卡不再给打不开的链接;读附件事件有中文说法;检查脚本补断言
This commit is contained in:
ThearchyHelios
2026-10-15 13:55:19 +08:00
parent a702a5c14b
commit 7739340607
95 changed files with 3107 additions and 611 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
* 入口提交校验失败回 422,ApiError 的 body 里带 {errors: FormError[]}。
*/
import type {
AppBindings, AppDetail, AppGrant, AppHookRow, AppSpec, AppSummary, AppVersionRow, BackfillPlan, BackfillResult,
AppBindings, AppDetail, AppGrant, AppHookRow, AppList, AppSpec, AppSummary, AppVersionRow, BackfillPlan, BackfillResult,
ComponentCatalog, Disposition, InstanceRow, LintIssue, PublishResult, ViewModel,
} from '../typesApp'
import type { ConversationDetail, EvidenceSegmentDetail } from '../types'
@@ -16,7 +16,7 @@ const hookAt = (id: string, name: string) => `${at(id)}/hooks/${encodeURICompone
export const apps = {
catalog: (opts?: RequestOptions) => get<ComponentCatalog>('/apps/catalog', opts),
list: (opts?: RequestOptions) => get<{ items: AppSummary[] }>('/apps', opts),
list: (opts?: RequestOptions) => get<AppList>('/apps', opts),
get: (id: string, opts?: RequestOptions) => get<AppDetail>(at(id), opts),
create: (body: { name: string; description?: string; spec?: AppSpec }) => post<AppDetail>('/apps', body),
/** 从工作流版本确定性派生一份应用草稿(不落库),编辑器拿去预览 / 新建 */
+5 -4
View File
@@ -14,6 +14,7 @@
* 开流之前就被拒(4xx/5xx)时 onEnd 带服务端那句话、状态码和机读码;流到一半断了和一开始就连不上一样,说无法连接服务。
* 请求函数从 ./http 导入,不要从 ./client 导入(循环导入,见 http.ts 开头)。
*/
import type { BlueprintStreamEvent, FillJointsEvent } from '../typesBlueprint'
import { ApiError, BASE, NETWORK_MESSAGE, actorHeader, codeOf, describeDetail, isGatewayFailure, parseBody, report } from './http'
export interface BlueprintStreamRequest {
@@ -31,8 +32,8 @@ export interface FillJointsRequest {
export type StreamEnd = (error?: string, info?: { status?: number; code?: string; aborted?: boolean }) => void
/** 一条 SSE:返回取消函数 */
function sse(path: string, body: unknown, onOp: (op: any) => void, onEnd: StreamEnd): () => void {
/** 一条 SSE:返回取消函数。帧的形状以服务端为准(typesBlueprint 的 BlueprintStreamEvent、FillJointsEvent),这里不逐帧核对 */
function sse<E>(path: string, body: unknown, onOp: (op: E) => void, onEnd: StreamEnd): () => void {
const controller = new AbortController()
void (async () => {
try {
@@ -94,8 +95,8 @@ function sse(path: string, body: unknown, onOp: (op: any) => void, onEnd: Stream
return () => controller.abort()
}
export const streamBlueprint = (body: BlueprintStreamRequest, onOp: (op: any) => void, onEnd: StreamEnd) =>
export const streamBlueprint = (body: BlueprintStreamRequest, onOp: (op: BlueprintStreamEvent) => void, onEnd: StreamEnd) =>
sse('/copilot/blueprint-stream', body, onOp, onEnd)
export const streamFillJoints = (body: FillJointsRequest, onOp: (op: any) => void, onEnd: StreamEnd) =>
export const streamFillJoints = (body: FillJointsRequest, onOp: (op: FillJointsEvent) => void, onEnd: StreamEnd) =>
sse('/copilot/fill-joints-stream', body, onOp, onEnd)