forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregistry.ts
More file actions
116 lines (104 loc) · 3.02 KB
/
Copy pathregistry.ts
File metadata and controls
116 lines (104 loc) · 3.02 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
import registryData from "@/data/registry.json";
import { sortOrder } from "./sort-order";
export type FeatureKind = "primary" | "testing" | "docs-only";
export interface Feature {
id: string;
name: string;
category: string;
description: string;
kind?: FeatureKind;
og_docs_url?: string;
shell_docs_path?: string;
/**
* `true` when the feature represents a legacy/replaced pattern that the
* gold-standard integration (LangGraph Python) intentionally does NOT
* implement. Other integrations may still serve the legacy demo, but
* the dashboard hides deprecated rows behind a "Show deprecated" toggle
* so the default gold-standard view stays clean.
*/
deprecated?: boolean;
}
export interface FeatureCategory {
id: string;
name: string;
}
export interface Demo {
id: string;
name: string;
description: string;
tags: string[];
route?: string;
animated_preview_url?: string | null;
/**
* Informational demos (e.g. `cli-start`) have no runnable route — they just
* surface a copy-pasteable shell command. When `command` is set, the shell
* renders a code block with a copy button instead of Demo/Code links.
*/
command?: string;
}
export interface Integration {
name: string;
slug: string;
category: string;
language: string;
logo?: string;
description: string;
repo: string;
backend_url: string;
deployed: boolean;
sort_order?: number;
features: string[];
demos: Demo[];
/**
* Feature IDs the integration's framework cannot architecturally support
* (e.g. lacks a graph-interrupt primitive or MCP tool runtime). Cells for
* these IDs render as "Not supported" rather than the unshipped "no demo"
* marker. Source: `not_supported_features:` in the integration's manifest.
*/
not_supported_features?: string[];
/**
* Per-column docs link overrides sourced from
* `showcase/integrations/<slug>/docs-links.json`. The `shell_docs_path` is a
* path relative to the shell root; callers combine it with the framework
* slug to build framework-scoped URLs.
*/
docs_links?: {
features: Record<
string,
{
og_docs_url: string | null;
shell_docs_path: string | null;
}
>;
};
}
export interface Package {
slug: string;
name: string;
}
export interface Registry {
feature_registry: {
version: string;
categories: FeatureCategory[];
features: Feature[];
};
integrations: Integration[];
packages?: Package[];
}
const registry = registryData as unknown as Registry;
export function getIntegrations(): Integration[] {
return [...registry.integrations].sort((a, b) => {
const aRank = sortOrder[a.slug] ?? a.sort_order ?? 999;
const bRank = sortOrder[b.slug] ?? b.sort_order ?? 999;
return aRank - bRank;
});
}
export function getFeatures(): Feature[] {
return registry.feature_registry.features;
}
export function getFeatureCategories(): FeatureCategory[] {
return registry.feature_registry.categories;
}
export function getPackages(): Package[] {
return registry.packages ?? [];
}