Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
80bc907
fix(server): schedule_task advertises how a webhook run's prompt read…
EtanHey Oct 31, 2026
1ddf5bd
test(evals): the webhook template case needs the complete {{body.ref}…
EtanHey Oct 31, 2026
e964d1f
Merge remote-tracking branch 'origin/main' into up/schedule-webhook-g…
EtanHey Nov 1, 2026
d77ca79
test(evals): the webhook template case names its source PR
EtanHey Nov 1, 2026
15d7ecd
Merge remote-tracking branch 'origin/main' into up/schedule-webhook-g…
EtanHey Nov 1, 2026
4709331
Merge remote-tracking branch 'origin/main' into up/schedule-webhook-g…
EtanHey Nov 1, 2026
b4d9d90
Merge branch 'main' into up/schedule-webhook-guidance
EtanHey Nov 1, 2026
25aa412
Merge branch 'main' into up/schedule-webhook-guidance
EtanHey Nov 2, 2026
23a9d0f
Merge branch 'main' into up/schedule-webhook-guidance
EtanHey Nov 2, 2026
da73cf8
Merge branch 'main' into up/schedule-webhook-guidance
EtanHey Nov 3, 2026
a40de58
Merge branch 'main' into up/schedule-webhook-guidance
EtanHey Nov 4, 2026
22b8c26
chore: merge main into webhook schedule guidance
maria-rcks Nov 4, 2026
8d99c35
chore: merge main into schedule webhook guidance
EtanHey Nov 5, 2026
4859f4a
merge: refresh schedule webhook guidance against main
EtanHey Nov 8, 2026
39438b0
merge: reconcile scheduled webhook guidance with main
EtanHey Nov 9, 2026
eefb098
merge: maintain webhook guidance against main
EtanHey Nov 10, 2026
e53fd34
merge: refresh webhook guidance against main
EtanHey Nov 11, 2026
f4fe4cf
merge: refresh webhook guidance against main
EtanHey Nov 12, 2026
01072ba
merge: refresh webhook guidance against main
EtanHey Nov 13, 2026
494ef06
merge: origin/main into schedule-webhook-guidance
EtanHey Nov 13, 2026
447f25b
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 14, 2026
d5e2602
merge: origin/main into up/schedule-webhook-guidance
juliusmarminge Nov 14, 2026
0d9a64f
test(evals): drop the grader test for the webhook template case
juliusmarminge Nov 14, 2026
8697c8a
Merge remote-tracking branch 'origin/main' into up/schedule-webhook-g…
juliusmarminge Nov 14, 2026
30316d6
Merge remote-tracking branch 'origin/main' into up/schedule-webhook-g…
juliusmarminge Nov 14, 2026
01de97c
merge: refresh webhook guidance against main
EtanHey Nov 14, 2026
490ea05
merge: refresh webhook guidance against main
EtanHey Nov 15, 2026
e95ded0
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 15, 2026
43101b3
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 16, 2026
e093232
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 17, 2026
c4420fa
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 19, 2026
88987d2
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 19, 2026
6fc3630
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 21, 2026
4170f07
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 22, 2026
330da55
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 23, 2026
e3a4ec6
merge: origin/main into up/schedule-webhook-guidance
EtanHey Nov 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions apps/server/src/mcp/advertisedJsonSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@ it("drops JSON noise, merges tagged unions, and keeps null where it is required"
});
});

it("keeps a tagged union branch's description on its tag value", () => {
const tool = Tool.make("example", {
parameters: Schema.Struct({
schedule: Schema.Union([
Schema.Struct({ type: Schema.Literal("interval"), everyMs: Schema.Int }),
Schema.Struct({ type: Schema.Literal("webhook"), path: Schema.String }).annotate({
description: "Run per request.",
}),
]),
}),
});

const schema = advertisedJsonSchema(tool) as {
properties: { schedule: { properties: { type: unknown } } };
};
expect(schema.properties.schedule.properties.type).toEqual({
type: "string",
enum: ["interval", "webhook"],
description: "webhook: Run per request.",
});
});

it("advertises only string enum values, which Gemini requires", () => {
const enumValues: Array<unknown> = [];
const collect = (node: unknown): void => {
Expand Down
10 changes: 9 additions & 1 deletion apps/server/src/mcp/advertisedJsonSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,16 @@ const mergeTaggedObjects = (branches: ReadonlyArray<Json>): JsonObject | undefin
return values.every((value) => value !== undefined) && new Set(values).size === values.length;
});
if (tag === undefined) return undefined;
// The merged object has no branches left, so a branch's description moves onto its tag value.
const branchDescriptions = objects
.filter((object) => typeof object.description === "string")
.map((object) => `${String(tagOf(object, tag))}: ${String(object.description)}`);
const properties: JsonObject = {
[tag]: { type: "string", enum: objects.map((object) => tagOf(object, tag)) },
[tag]: {
type: "string",
enum: objects.map((object) => tagOf(object, tag)),
...(branchDescriptions.length === 0 ? {} : { description: branchDescriptions.join(" ") }),
},
};
for (const object of objects) {
for (const [name, property] of Object.entries(object.properties)) {
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/agentContextBudget.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"claudeSystemAppendBytes": 6245,
"codexAdditionalContextBytes": 7639,
"mcpToolListJsonBytes": 61724
"mcpToolListJsonBytes": 61861
}
Loading
Loading