Files
goodbuddy/src/shared/goodbuddy-config-tools.ts
T
mesalogo 56ebd40bd8 feat: unify execution and add workspace file imports
Remove Ask/Execute modes and general product tool approvals so requests use the selected runtime, enabled capabilities, and execution account permissions. Migrate retired application metadata while preserving user content.

Retire the Results page while retaining conversation images and stored artifacts. Add local and remote workspace file imports, timestamps and sorting, improve image discovery and saving, and refine workspace navigation and supervision responsiveness. Include the accompanying web-search changes, tests, probes, and product documentation.

Remote imports require an updated Agent. Existing artifacts are not automatically copied into project directories. Validation evidence and outstanding failures remain documented in feature progress files; no full test suite or real-model calls were rerun for this commit.

Release note: Run requests without switching work modes, import files into a selected local or remote workspace folder, sort workspace files by date, and keep using conversation images after removal of the Results page.
2026-10-04 20:02:59 +08:00

85 lines
3.2 KiB
TypeScript

import { z } from 'zod'
import {
goodbuddyConfigApplyInputSchema,
goodbuddyConfigApplyOutputSchema,
goodbuddyConfigCapabilitiesInputSchema,
goodbuddyConfigCapabilitiesOutputSchema,
goodbuddyConfigGetInputSchema,
goodbuddyConfigGetOutputSchema,
goodbuddyConfigPlanInputSchema,
goodbuddyConfigPlanOutputSchema
} from './goodbuddy-config-contracts'
export type GoodBuddyConfigToolDefinition = {
name: string
title: string
description: string
summary: string
access: 'read' | 'write'
inputSchema: z.ZodType
outputSchema: z.ZodType
}
export const goodbuddyConfigToolCatalog = {
capabilities: {
name: 'goodbuddy_config_capabilities',
title: 'Discover GoodBuddy configuration capabilities',
description:
'List supported secret-free configuration operations, examples, risk levels, and reload effects. This tool does not read or change settings.',
summary: 'Discover supported configuration operations and examples.',
access: 'read',
inputSchema: goodbuddyConfigCapabilitiesInputSchema,
outputSchema: goodbuddyConfigCapabilitiesOutputSchema
},
get: {
name: 'goodbuddy_config_get',
title: 'Read sanitized GoodBuddy settings',
description:
'Read public application preferences, Skill summaries, and redacted MCP summaries for this request. Credentials and connection details are never returned.',
summary: 'Read sanitized application, Skill, and MCP settings.',
access: 'read',
inputSchema: goodbuddyConfigGetInputSchema,
outputSchema: goodbuddyConfigGetOutputSchema
},
plan: {
name: 'goodbuddy_config_plan',
title: 'Plan GoodBuddy configuration changes',
description:
'Validate and normalize a bounded sequence of strongly typed changes without applying it. The returned plan is scoped to this request and expires.',
summary: 'Validate configuration changes and inspect their effects.',
access: 'read',
inputSchema: goodbuddyConfigPlanInputSchema,
outputSchema: goodbuddyConfigPlanOutputSchema
},
apply: {
name: 'goodbuddy_config_apply',
title: 'Apply a GoodBuddy configuration plan',
description:
'Apply a previously planned request-scoped change. The plan must be unexpired and can be applied only once. Raw operations and secrets are not accepted. If a later operation fails, the result reports partial application and the remaining operations are not attempted.',
summary: 'Apply one request-scoped configuration plan.',
access: 'write',
inputSchema: goodbuddyConfigApplyInputSchema,
outputSchema: goodbuddyConfigApplyOutputSchema
}
} as const satisfies Record<
'capabilities' | 'get' | 'plan' | 'apply',
GoodBuddyConfigToolDefinition
>
export const goodbuddyConfigTools = [
goodbuddyConfigToolCatalog.capabilities,
goodbuddyConfigToolCatalog.get,
goodbuddyConfigToolCatalog.plan,
goodbuddyConfigToolCatalog.apply
] as const satisfies readonly GoodBuddyConfigToolDefinition[]
export type GoodBuddyConfigToolName =
(typeof goodbuddyConfigTools)[number]['name']
export const goodbuddyConfigToolByName = new Map<
GoodBuddyConfigToolName,
(typeof goodbuddyConfigTools)[number]
>(
goodbuddyConfigTools.map((tool) => [tool.name, tool])
)