From 3e857eb9a5639e9bac9a657bd96313eeff836ab6 Mon Sep 17 00:00:00 2001 From: Rusty Conover Date: Mon, 6 Jul 2026 22:56:27 -0400 Subject: [PATCH] feat(example): declare make_series count/step constraints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The make_series `count` const arg declares ge=0 → [0, +inf) and the integer `step` overload declares ge=1 → [1, +inf), matching the Python, Go, and Rust example workers. Surfaces via vgi_function_arguments() for agent discovery and enforces the ranges at table bind. Fixes catalog/function_arguments_constraints.test:72, which asserted the cross-SDK contract that make_series exposes count/step ranges (expected 2 rows, was getting 0 because the TS example declared no arg constraints). Co-Authored-By: Claude Opus 4.8 (1M context) --- examples/table.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/table.ts b/examples/table.ts index 99a48aa..4389016 100644 --- a/examples/table.ts +++ b/examples/table.ts @@ -1741,6 +1741,7 @@ const make_series_count = defineTableFunction<{ count: number }, MakeSeriesRange name: "make_series", description: "Generate integers from 0 to count-1", args: { count: new Int64() }, + argConstraints: { count: { ge: 0 } }, onBind: () => ({ outputSchema: MAKE_SERIES_SCHEMA }), cardinality: (params: TableBindParams<{ count: number }>) => ({ estimate: params.args.count, @@ -1817,6 +1818,7 @@ const make_series_step = defineTableFunction<{ start: number; stop: number; step name: "make_series", description: "Generate integers from start to stop-1 with step", args: { start: new Int64(), stop: new Int64(), step: new Int64() }, + argConstraints: { step: { ge: 1 } }, onBind: () => ({ outputSchema: MAKE_SERIES_SCHEMA }), initialState: (params: TableProcessParams<{ start: number; stop: number; step: number }>) => { const step = params.args.step;