chore: introduce capabilities argument (#135)

This commit is contained in:
Pavel Feldman 2025-04-04 17:14:30 -07:00 committed by GitHub
parent 707ebbf4d4
commit abd56f514b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 432 additions and 242 deletions

View file

@ -20,6 +20,7 @@ import { zodToJsonSchema } from 'zod-to-json-schema';
import type { ToolFactory, Tool } from './tool';
const listTabs: Tool = {
capability: 'tabs',
schema: {
name: 'browser_tab_list',
description: 'List browser tabs',
@ -40,6 +41,7 @@ const selectTabSchema = z.object({
});
const selectTab: ToolFactory = captureSnapshot => ({
capability: 'tabs',
schema: {
name: 'browser_tab_select',
description: 'Select a tab by index',
@ -58,6 +60,7 @@ const newTabSchema = z.object({
});
const newTab: Tool = {
capability: 'tabs',
schema: {
name: 'browser_tab_new',
description: 'Open a new tab',
@ -77,6 +80,7 @@ const closeTabSchema = z.object({
});
const closeTab: ToolFactory = captureSnapshot => ({
capability: 'tabs',
schema: {
name: 'browser_tab_close',
description: 'Close a tab',