This commit is contained in:
seb
2026-10-11 12:58:15 +02:00
parent 8262e35e53
commit 1149ffddcb
24 changed files with 575 additions and 261 deletions

View File

@@ -1,4 +1,5 @@
import { defineTool, DirectReturnError } from 'libllmorbiter';
import { TOOL_DESCRIPTIONS, TOOL_PARAMETER_DESCRIPTIONS } from './prompts.js';
/**
* ask_user tool:
@@ -13,8 +14,7 @@ import { defineTool, DirectReturnError } from 'libllmorbiter';
export function createAskUserTool() {
return defineTool({
name: 'ask_user',
description:
'Prompt user for clarification or decision with concise question and up to 3 options.',
description: TOOL_DESCRIPTIONS.ask_user,
strict: false,
parameters: {
type: 'object',
@@ -23,11 +23,11 @@ export function createAskUserTool() {
properties: {
question: {
type: 'string',
description: 'Question prompt.',
description: TOOL_PARAMETER_DESCRIPTIONS.ask_user.question,
},
options: {
type: ['array', 'null'],
description: 'Up to 3 option labels, or null.',
description: TOOL_PARAMETER_DESCRIPTIONS.ask_user.options,
items: { type: 'string' },
maxItems: 3,
},