From 1560f38f8527cb27f8de54e27eb4131a125ba8f3 Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Thu, 1 Jan 2026 10:59:36 +1000 Subject: [PATCH] fix(slo-draft): add min/max constraints to target schema Helps AI SDK validate that target percentages are between 0-100 before calling the tool --- apps/web/next-env.d.ts | 2 +- packages/tools/official/slo-draft/package.json | 2 +- packages/tools/official/slo-draft/src/index.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/next-env.d.ts b/apps/web/next-env.d.ts index c4b7818..9edff1c 100644 --- a/apps/web/next-env.d.ts +++ b/apps/web/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/packages/tools/official/slo-draft/package.json b/packages/tools/official/slo-draft/package.json index d6388b4..d17717e 100644 --- a/packages/tools/official/slo-draft/package.json +++ b/packages/tools/official/slo-draft/package.json @@ -1,6 +1,6 @@ { "name": "@tpmjs/tools-slo-draft", - "version": "0.2.0", + "version": "0.2.1", "description": "Draft SLO (Service Level Objective) definitions for services", "type": "module", "keywords": ["tpmjs", "ops", "slo", "monitoring", "sre"], diff --git a/packages/tools/official/slo-draft/src/index.ts b/packages/tools/official/slo-draft/src/index.ts index 037fa06..aa1efd7 100644 --- a/packages/tools/official/slo-draft/src/index.ts +++ b/packages/tools/official/slo-draft/src/index.ts @@ -243,7 +243,9 @@ export const sloDraftTool = tool({ }, target: { type: 'number', - description: 'Target percentage (e.g., 99.9 for 99.9%)', + description: 'Target percentage (e.g., 99.9 for 99.9%). Must be between 0 and 100.', + minimum: 0, + maximum: 100, }, window: { type: 'string',