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 03405ad754
commit 1560f38f85
3 changed files with 5 additions and 3 deletions

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