feat(api): add audit helpers, tool registry, shared tool manifest types, and UI primitives

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-09 21:14:26 +02:00
parent 1a67af6761
commit 43de66e982
8 changed files with 904 additions and 0 deletions
@@ -0,0 +1,29 @@
/**
* Tool manifest types for the AI assistant.
* Provides rich metadata beyond the OpenAI function schema (ToolDef).
*/
export type ToolCategory =
| "planning"
| "resource"
| "project"
| "vacation"
| "staffing"
| "reporting"
| "admin"
| "system";
export interface ToolManifest {
/** Tool name as registered in OpenAI function schema. */
name: string;
/** Functional category for grouping and filtering. */
category: ToolCategory;
/** True if the tool performs a write operation (used for audit and confirmation). */
isMutation: boolean;
/** True if the tool requires advanced assistant permission. */
requiresAdvanced?: boolean;
/** One-line description of what this tool does (for system prompts and docs). */
intent: string;
/** Optional natural-language examples to guide model tool selection. */
examples?: string[];
}