feat: add natural language configuration tools

This commit is contained in:
lofyer
2026-08-14 01:23:32 +08:00
parent 445ebbc002
commit 7a86c96623
19 changed files with 3284 additions and 119 deletions
+15 -1
View File
@@ -1,4 +1,8 @@
import { z } from 'zod'
import {
goodbuddyConfigTools,
type GoodBuddyConfigToolName
} from './goodbuddy-config-tools'
export type ScopedDataToolAccess = 'read' | 'write'
@@ -230,10 +234,12 @@ export const magicNoteScopedDataTools = [
export const scopedDataTools = [
...knowledgeScopedDataTools,
...magicNoteScopedDataTools
...magicNoteScopedDataTools,
...goodbuddyConfigTools
] as const
export type ScopedDataToolName = (typeof scopedDataTools)[number]['name']
export type { GoodBuddyConfigToolName }
export const scopedDataToolByName = new Map<
ScopedDataToolName,
@@ -254,6 +260,14 @@ export const magicNoteWriteToolNames = magicNoteScopedDataTools
.filter((tool) => tool.access === 'write')
.map((tool) => tool.name)
export const goodbuddyConfigReadToolNames = goodbuddyConfigTools
.filter((tool) => tool.access === 'read')
.map((tool) => tool.name)
export const goodbuddyConfigWriteToolNames = goodbuddyConfigTools
.filter((tool) => tool.access === 'write')
.map((tool) => tool.name)
export const scopedReadToolNames = scopedDataTools
.filter((tool) => tool.access === 'read')
.map((tool) => tool.name)