-
-
Notifications
You must be signed in to change notification settings - Fork 354
Expand file tree
/
Copy pathkiira.config.ts
More file actions
124 lines (123 loc) · 5.58 KB
/
Copy pathkiira.config.ts
File metadata and controls
124 lines (123 loc) · 5.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import { defineConfig } from 'kiira-core'
export default defineConfig({
// skills/** are the repo-level discovery skills; packages/*/skills are the
// per-package skills that ship in each npm package.
include: ['docs/**/*.md', 'skills/**/*.md', 'packages/*/skills/**/*.md'],
tsconfig: 'tsconfig.docs.json',
exclude: [
// docs/reference/** is auto-generated by TypeDoc (`pnpm generate-docs`);
// hand-fixing those snippets would be overwritten on regeneration.
'docs/reference/**',
// @tanstack/ai-angular is an ng-packagr bundle: its published entries
// are dist/types/*.d.ts, which kiira's dist->src heuristic can't map back
// to a source file (unlike every other package's dist/esm/index.d.ts ->
// src/index.ts). So these docs only resolve against the built package,
// which isn't available during a source-based docs check. Excluded until
// ai-angular exposes a source-resolvable entry.
'docs/api/ai-angular.md',
'docs/ui/angular.md',
// docs/superpowers/** are internal planning/spec artifacts (design docs and
// implementation plans), not published, curated examples. Their snippets are
// illustrative pseudo-code, not meant to compile against package source.
'docs/superpowers/**',
],
defaultValidate: 'type',
languages: ['ts', 'tsx', 'js', 'jsx'],
// Third-party packages the docs import but the workspace doesn't depend on.
// kiira installs these into an isolated cache (node_modules/.kiira) and
// type-checks against them, so snippets that show real integrations (Vercel
// AI SDK migration, community adapters, redis/pino/otel/express/hono, other
// schema libs) are validated instead of `ignore`d.
externalPackages: {
// Vercel AI SDK (comparison is v7; migration "before" fences stay on
// APIs that v7 still exports, including deprecated aliases)
ai: '^7.0.0',
'@ai-sdk/openai': '^4.0.0',
'@ai-sdk/anthropic': '^4.0.0',
'@ai-sdk/google': '^4.0.0',
'@ai-sdk/react': '^4.0.0',
// Provider SDKs / schema libraries shown in examples
openai: '^6.0.0',
arktype: '^2.0.0',
valibot: '^1.0.0',
'@valibot/to-json-schema': '^1.0.0',
'@modelcontextprotocol/sdk': '^1.29.0',
// Server / infra libraries used by real integration examples.
// (express is intentionally NOT declared here: it's already a transitive
// dependency in the workspace node_modules without its @types, which
// shadows any cache copy — so those two express snippets stay `ignore`d.)
hono: '^4.0.0',
'@hono/node-server': '^2.0.0',
redis: '^6.0.0',
ioredis: '^5.0.0',
pino: '^10.0.0',
'@opentelemetry/api': '^1.9.0',
// Community adapters (each documented page imports its published package)
'@cloudflare/tanstack-ai': '^0.1.0',
'@cloudflare/workers-types': '^4.20260317.1',
'@decartai/tanstack-ai-adapter': '^0.0.2',
'@mynthio/tanstack-ai-adapter': '^0.0.14',
'@cencori/ai-sdk': '^0.4.0',
'@soniox/tanstack-ai-adapter': '^0.1.2',
'@upstash/agentkit-tanstack-ai': '^0.1.1',
'@upstash/blob': '^0.0.8',
'@fal-ai/client': '1.11.0-alpha.2',
// Octane is a peer of @tanstack/ai-octane, not a root workspace dep.
octane: '^0.1.17',
// Remix 3 is a peer of @tanstack/ai-remix, not a root workspace dep.
remix: '^3.0.0-rc.1',
// TextPart highlighter examples. Not a workspace dependency.
// Subpath exports are mapped in tsconfig.docs.json because kiira
// does not read package.json exports.
'@tanstack/highlight': '^0.1.0',
// remix/ui re-exports this. Kiira's paths["*"] does not read the
// package.json exports field, so the jsx-runtime file must exist on disk.
'@remix-run/ui': '^0.8.0',
},
overrides: [
// React (and anything not overridden below) uses the automatic JSX
// runtime so snippets don't need an explicit `import React`.
// noImplicitReturns is off: doc snippets routinely show callbacks that
// return on some branches and fall through on others (e.g. a middleware
// hook that returns a decision or continues), which is valid and shouldn't
// force an explicit return type or trailing `return`.
{
include: ['docs/**/*.md', 'skills/**/*.md', 'packages/*/skills/**/*.md'],
jsx: 'react-jsx',
jsxImportSource: 'react',
noImplicitReturns: false,
},
// Solid snippets compile JSX through solid-js.
{
include: ['docs/api/ai-solid.md', 'docs/ui/solid.md'],
jsx: 'preserve',
jsxImportSource: 'solid-js',
},
// Preact snippets compile JSX through preact.
{
include: ['docs/api/ai-preact.md', 'docs/ui/preact.md'],
jsx: 'react-jsx',
jsxImportSource: 'preact',
},
// Octane snippets compile JSX through octane. Standard TSX works;
// TSRX (`@{`, `@for`) is not TypeScript, so docs use TSX here.
// `octane/jsx-runtime` is types-only via package.json exports;
// kiira's paths["*"] does not read exports, so `octane/dist` points
// at dist/jsx-runtime.d.ts, which exists on disk.
{
include: ['docs/api/ai-octane.md', 'docs/ui/octane.md'],
jsx: 'react-jsx',
jsxImportSource: 'octane/dist',
},
// Remix snippets compile JSX through remix/ui. `remix/ui/jsx-runtime`
// is types-only via package.json exports; kiira's paths["*"] does not
// read exports, so `remix/dist/ui` points at dist/ui/jsx-runtime.d.ts,
// which exists on disk. Subpath imports (`remix/ui`, `remix/router`)
// are mapped in tsconfig.docs.json for the same reason.
{
include: ['docs/api/ai-remix.md', 'docs/ui/remix.md'],
jsx: 'react-jsx',
jsxImportSource: 'remix/dist/ui',
},
],
})