feat: add scoped history and artifacts
This commit is contained in:
@@ -63,6 +63,17 @@ describe("task publication bridge", () => {
|
||||
const report = { title: "报告", current_conclusion: "核验结束", conclusion_boundary: "授权数据范围",
|
||||
stage: "final", outcome: "concluded", stop_reason: null, data_gaps: [] };
|
||||
expect((await post("artifacts", { session_id: contexts[1], request_id: requestId, report })).status).toBe(200);
|
||||
const interactive = { ...report, evidence_refs: ["e1"], ui_blocks: [{ evidence_refs: ["e1"], block: {
|
||||
version: "answer-ui@1", block_id: "summary", fallback_text: "已保存的演练记录。", spec: {
|
||||
root: "text", elements: { text: { type: "Text", children: [], props: { text: "已保存的演练记录。", tone: "neutral" } } },
|
||||
},
|
||||
} }] };
|
||||
expect((await post("artifacts", { session_id: contexts[0], request_id: requestId, report: interactive })).status).toBe(200);
|
||||
expect(published.at(-1)?.args[2]).toMatchObject({ report: { ui_blocks: interactive.ui_blocks }, sourceSessionId: "client-0" });
|
||||
const count = published.length;
|
||||
expect((await post("artifacts", { session_id: contexts[0], request_id: requestId,
|
||||
report: { ...interactive, evidence_refs: [] } })).status).toBe(400);
|
||||
expect(published).toHaveLength(count);
|
||||
} finally {
|
||||
contexts.forEach(removeRuntimeSessionContext);
|
||||
await new Promise<void>((resolve) => server.close(() => resolve()));
|
||||
|
||||
Reference in New Issue
Block a user