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
This commit is contained in:
Ajax Davis 2026-01-01 10:59:36 +10:00
parent faa183b1ec
commit 3cd4102caa
3 changed files with 5 additions and 3 deletions

View file

@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
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.

View file

@ -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"],

View file

@ -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',