feat(settings): add Blocks tab — 12-block decision schema reference
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m35s

Read-only display of BLOCK_CONFIG from block_writer.py with CREAC role
and JWM functional-purpose annotations per block (sourced from
docs/block-schema.md).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 07:58:04 +00:00
parent ae35934383
commit e90faa9ba4
4 changed files with 206 additions and 1 deletions

View File

@@ -169,3 +169,27 @@ export function useMcpRegistrations() {
staleTime: 60_000,
});
}
export type McpBlock = {
id: string;
index: number;
title: string;
gen_type: string;
model: string;
temperature: number | null;
max_tokens: number | null;
creac_role: string | null;
jwm_purpose: string | null;
};
export function useMcpBlocks() {
return useQuery({
queryKey: ["settings", "mcp-blocks"] as const,
queryFn: ({ signal }) =>
apiRequest<{ blocks: McpBlock[]; count: number }>(
"/api/settings/mcp/blocks",
{ signal },
),
staleTime: 5 * 60_000, // 5 minutes — static reference data
});
}