feat: implement tool types definition system

- Add ToolType SQLAlchemy model with Docker Compose template support
- Create CRUD API endpoints for tool type management
- Implement YAML and template variable validation
- Add built-in tool types (code-server, jupyter-notebook) seeded on startup
- Create frontend page with list, create, edit, and delete functionality
- Add tool types navigation to app shell
- Update mypy config to ignore missing imports

Quality gates: ruff (passed), mypy (passed), pytest unit (8 passed),
typecheck (passed), lint (passed), build (passed)
This commit is contained in:
Fusion
2026-05-18 16:27:19 +02:00
parent fb5725947d
commit 6b302b3279
15 changed files with 945 additions and 1 deletions
+53
View File
@@ -0,0 +1,53 @@
import { apiClient } from "./client";
export interface ToolType {
id: string;
name: string;
display_name: string;
description: string | null;
compose_template: string;
required_variables: string[];
is_builtin: boolean;
created_by_id: string | null;
created_at: string;
updated_at: string;
}
export interface CreateToolTypeRequest {
name: string;
display_name: string;
description?: string;
compose_template: string;
required_variables: string[];
}
export interface UpdateToolTypeRequest {
display_name?: string;
description?: string;
compose_template?: string;
required_variables?: string[];
}
export const listToolTypes = async (): Promise<ToolType[]> => {
const response = await apiClient.get<ToolType[]>("/tool-types");
return response.data;
};
export const getToolType = async (id: string): Promise<ToolType> => {
const response = await apiClient.get<ToolType>(`/tool-types/${id}`);
return response.data;
};
export const createToolType = async (data: CreateToolTypeRequest): Promise<ToolType> => {
const response = await apiClient.post<ToolType>("/tool-types", data);
return response.data;
};
export const updateToolType = async (id: string, data: UpdateToolTypeRequest): Promise<ToolType> => {
const response = await apiClient.put<ToolType>(`/tool-types/${id}`, data);
return response.data;
};
export const deleteToolType = async (id: string): Promise<void> => {
await apiClient.delete(`/tool-types/${id}`);
};