9ffe734275
Deploy / deploy (push) Successful in 7m40s
- /api/articles[/slug]: GET/PUT/POST/DELETE, article JSON stored in PostgreSQL (schema analysis) - /api/tool-taxonomy: categories (tree), per-paper tools, each tool in one or more categories - /contents/tools-of-agents: category table with roll-up and links to the papers; removed "By kind of contribution" and "Recent papers" - content moves out of the repo: removed content/articles, load-articles.js, agent-tools.ts Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FbMbJPadPzVwvt9rU9GBNo
15 lines
1.2 KiB
TypeScript
15 lines
1.2 KiB
TypeScript
// Client-safe types for analysis articles (schema: lib/analysis-schema.ts; written through /api/articles).
|
|
export type Block =
|
|
| { type: 'markdown'; data: { text: string } }
|
|
| { type: 'list'; data: { items: string[]; ordered?: boolean } }
|
|
| { type: 'callout'; data: { text: string; title?: string; tone?: 'info' | 'note' | 'warn' } }
|
|
| { type: 'table'; data: { columns: string[]; rows: string[][]; caption?: string; numeric?: boolean; highlightCol?: number } }
|
|
| { type: 'chart'; data: { kind: 'bar'; title: string; labels: string[]; series: { name: string; values: number[] }[]; unit?: string; note?: string; highlight?: number[] } }
|
|
| { type: 'mermaid'; data: { code: string; caption?: string } }
|
|
| { type: 'figure'; data: { src: string; alt: string; caption?: string } }
|
|
| { type: 'code'; data: { text: string; lang?: string } };
|
|
|
|
export interface Section { key: string; title: string; level: number; blocks: Block[]; children: Section[] }
|
|
export interface ArticleLink { kind: string; title: string; url: string; note: string | null }
|
|
export interface ArticleData { slug: string; title: string; summary: string | null; revision: number; updatedAt: string; sections: Section[]; links: ArticleLink[] }
|