fix(consult): allow reported-time precision and persist receipts
This commit is contained in:
@@ -21,13 +21,21 @@ test("chat session schema preserves the safe agent execution receipt", () => {
|
||||
runtime: "mastra-agentic" as const,
|
||||
skill: { name: "jyotish-vedic-astrology" as const, loaded: true },
|
||||
steps: [{ sequence: 1, kind: "skill" as const, name: "jyotish-vedic-astrology", status: "completed" as const }],
|
||||
workflow: { route: "career", status: "ready", preciseTiming: "blocked", missingLayers: [] },
|
||||
workflow: { route: "multi-domain", status: "ready", preciseTiming: "allowed", missingLayers: [], domains: ["general", "timing"] },
|
||||
techniqueTruth: "verified",
|
||||
};
|
||||
const workflowReceipt = {
|
||||
route: "multi-domain",
|
||||
status: "ready",
|
||||
preciseTiming: "allowed",
|
||||
missingLayers: [],
|
||||
domains: ["general", "timing"] as const,
|
||||
};
|
||||
const parsed = chatSessionWriteSchema.parse({
|
||||
...values,
|
||||
messages: [{ role: "assistant", text: "回答", agentExecutionReceipt: receipt }],
|
||||
messages: [{ role: "assistant", text: "回答", workflowReceipt, agentExecutionReceipt: receipt }],
|
||||
});
|
||||
assert.deepEqual(parsed.messages[0]?.workflowReceipt, workflowReceipt);
|
||||
assert.deepEqual(parsed.messages[0]?.agentExecutionReceipt, receipt);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user