Add capability-probed structured outputs and a prototype/instance creation graph.

Probe API profiles for json_schema/tools, flatten worker artifacts onto a strict schema, and let users spawn or revise graph nodes instead of a one-shot DAG.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-31 01:57:22 +08:00
co-authored by Cursor
parent 872f742d3e
commit bd5d88abfa
65 changed files with 7625 additions and 942 deletions
+23
View File
@@ -48,6 +48,29 @@ describe("pruneContextTraces", () => {
expect(pruned.map((m) => m.id)).toEqual(["a", "b"]);
});
it("pins design-flow traces while pruning others", () => {
const messages = [
{
id: "flow",
contextTrace: buildContextTrace({
caller: "worker:design-flow",
messages: [{ role: "user", content: "plan" }],
}),
},
msg("1", true),
msg("2", true),
msg("3", true),
];
const pruned = pruneContextTraces(messages, 1);
expect(pruned[0]?.contextTrace?.caller).toBe("worker:design-flow");
expect(pruned.map((m) => Boolean(m.contextTrace))).toEqual([
true,
false,
false,
true,
]);
});
it("is a no-op when under the limit", () => {
const messages = [msg("1", true), msg("2", true)];
const pruned = pruneContextTraces(messages, 5);