mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-22 23:21:59 +00:00
普通用户建应用集成收尾:
- 问数据和个人应用的图放行绑定只读查询等合规工具的调用工具节点,只读和遮罩在这条路径上生效;被治理成写入的工具在只读运行里直接拒;知识库范围在工具层固定(图级默认值、参数名纠错、Agent 都改不了) - 个人应用的刷新和个人蓝图的试运行只有拥有者能读:运行、事件、证据、工件、文件、运行与审批列表、对比、可验证报告、质询、假设分析、提取工作流一并收紧;个人蓝图的试运行不论谁发起都按个人应用约束 - 共享蓝图只给拥有者、对应应用的管理者、管理员,看不到的一律 404;审核副本归审核人;管理员看别人的个人应用只有元数据、可以归档 - 记录表跨版本汇总(只读挂载旧版本、按当前列 UNION ALL、各版本各自固定高水位,缺的版本照实写进印章);停用前发起的运行可以继续写旧版本;更正沿用原提交人、更正人记审计 - 约定收口:待办种类 review、事件 file.extracted、表单错误 file、模板定义带示例与预置;前端类型一次补齐、去掉临时的局部类型;审核待办卡不再给打不开的链接;读附件事件有中文说法;检查脚本补断言
This commit is contained in:
@@ -65,9 +65,12 @@ const HOME = {
|
||||
{ id: 'my_records', type: 'records_list', props: { table: 'loss', title: '报损登记' } },
|
||||
{ id: 'no_table', type: 'records_list', props: {} },
|
||||
{ id: 'server_page', type: 'records_list', props: { who: 'mine' },
|
||||
data: { table: 'loss', version: 1, columns: COLUMNS_FIRST, mine_only: true, items: [] } },
|
||||
data: { table: 'loss', version: 1, columns: COLUMNS_FIRST, mine_only: true, items: [], next_cursor: null, state: 'ok' } },
|
||||
{ id: 'empty_page', type: 'records_list', props: {},
|
||||
data: { table: null, version: 0, columns: [], items: [], mine_only: true, state: 'empty', next_cursor: null } },
|
||||
// 按草稿预览(服务端 apps/resolve._records_list):不列真实的记录
|
||||
{ id: 'preview_page', type: 'records_list', props: {},
|
||||
data: { table: null, version: 0, columns: [], items: [], mine_only: false, state: 'preview', next_cursor: null } },
|
||||
],
|
||||
forms: {},
|
||||
problems: [],
|
||||
@@ -79,8 +82,10 @@ const COLUMNS = [
|
||||
{ name: 'photo', label: '照片', type: 'file' },
|
||||
]
|
||||
const PHOTO = { file_id: 'f_photo', name: '破损.png', size: 20480, sha256: 'ab'.repeat(32), type: 'image/png' }
|
||||
// 一行的形状同服务端 records/listing.py:系统列(records.SYSTEM_COLUMNS)加上这一行在第几版表里(_version)
|
||||
const row = (id, seq, by, values, extra = {}) => ({
|
||||
_id: id, _seq: seq, _submitted_by: by, _submitted_at: at(seq), _supersedes: null, values, ...extra,
|
||||
_id: id, _seq: seq, _submitted_by: by, _submitted_at: at(seq), _run_id: `run_${id}`, _supersedes: null, _schema_version: 1,
|
||||
_version: 1, superseded: false, values, ...extra,
|
||||
})
|
||||
/** zhangsan 的三条:r3 是对 r1 的更正(r1 被更正过,只在历史里) */
|
||||
const MINE_ROWS = [
|
||||
@@ -120,7 +125,7 @@ async function open({ state, width = 1280, height = 900 }) {
|
||||
const items = mine ? MINE_ROWS : ALL_ROWS
|
||||
const history = url.searchParams.get('history') === 'true' || url.searchParams.get('history') === '1'
|
||||
return route.fulfill({ json: { table: 'loss', version: 1, columns: COLUMNS, mine_only: mine,
|
||||
items: history ? [R1, ...items] : items } })
|
||||
items: history ? [R1, ...items] : items, next_cursor: null, state: 'ok' } })
|
||||
}
|
||||
return route.continue()
|
||||
})
|
||||
@@ -167,6 +172,10 @@ await section('我的记录:使用者只看到自己的、标题写「我的
|
||||
check('服务端给了第一页的照它画(这里是空的,写「你还没有提交过记录」)',
|
||||
(await page.locator('[data-node="server_page"]').innerText()).includes('你还没有提交过记录'))
|
||||
check('服务端说还没有记录表的照实说', (await page.locator('[data-node="empty_page"]').innerText()).includes('还没有记录表'))
|
||||
const preview = page.locator('[data-node="preview_page"]')
|
||||
check('按草稿预览(state=preview):照实说不列真实的记录,不说成「还没有记录表」,也不给重新读取',
|
||||
await preview.locator('[data-records-preview]').count() === 1 && !(await preview.innerText()).includes('还没有记录表')
|
||||
&& await preview.getByRole('button', { name: '重新读取' }).count() === 0, (await preview.innerText()).replace(/\s+/g, ' '))
|
||||
check('只读:没有发出写请求', state.writes.length === 0, state.writes.map((w) => w.path).join(','))
|
||||
check('没有未捕获的运行时错误', page.errors.length === 0, page.errors[0] ?? '')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user