memeloop 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,57 @@
1
+ declare const MODEL_CATALOG_SCHEMA_VERSION: 1;
2
+ declare const MODEL_CATALOG_SOURCE_URL = "https://models.dev/api.json";
3
+ interface ModelCatalogModel {
4
+ id: string;
5
+ name: string;
6
+ attachment: boolean;
7
+ reasoning: boolean;
8
+ toolCall: boolean;
9
+ structuredOutput?: boolean;
10
+ temperature?: boolean;
11
+ releaseDate?: string;
12
+ lastUpdated?: string;
13
+ status?: 'alpha' | 'beta' | 'deprecated';
14
+ modalities?: {
15
+ input: string[];
16
+ output: string[];
17
+ };
18
+ limit?: {
19
+ context?: number;
20
+ input?: number;
21
+ output?: number;
22
+ };
23
+ }
24
+ interface ModelCatalogProvider {
25
+ id: string;
26
+ name: string;
27
+ npm?: string;
28
+ api?: string;
29
+ doc?: string;
30
+ env: string[];
31
+ models: ModelCatalogModel[];
32
+ }
33
+ interface ModelCatalog {
34
+ schemaVersion: typeof MODEL_CATALOG_SCHEMA_VERSION;
35
+ source: typeof MODEL_CATALOG_SOURCE_URL;
36
+ catalogVersion: string;
37
+ fetchedAt: string;
38
+ providers: ModelCatalogProvider[];
39
+ }
40
+ interface FetchModelCatalogOptions {
41
+ fetch?: typeof globalThis.fetch;
42
+ signal?: AbortSignal;
43
+ timeoutMs?: number;
44
+ maxBytes?: number;
45
+ }
46
+
47
+ declare function normalizeModelsDevelopmentCatalog(input: unknown, metadata: {
48
+ catalogVersion: string;
49
+ fetchedAt: string;
50
+ }): ModelCatalog;
51
+ declare function parseModelCatalog(input: unknown): ModelCatalog;
52
+ declare function mergeDiscoveredModelIds(provider: ModelCatalogProvider | undefined, discoveredIds: readonly string[]): ModelCatalogModel[];
53
+ declare function fetchModelCatalog(options?: FetchModelCatalogOptions): Promise<ModelCatalog>;
54
+
55
+ declare const EMBEDDED_MODEL_CATALOG: ModelCatalog;
56
+
57
+ export { EMBEDDED_MODEL_CATALOG, type FetchModelCatalogOptions, MODEL_CATALOG_SCHEMA_VERSION, MODEL_CATALOG_SOURCE_URL, type ModelCatalog, type ModelCatalogModel, type ModelCatalogProvider, fetchModelCatalog, mergeDiscoveredModelIds, normalizeModelsDevelopmentCatalog, parseModelCatalog };
@@ -0,0 +1,57 @@
1
+ declare const MODEL_CATALOG_SCHEMA_VERSION: 1;
2
+ declare const MODEL_CATALOG_SOURCE_URL = "https://models.dev/api.json";
3
+ interface ModelCatalogModel {
4
+ id: string;
5
+ name: string;
6
+ attachment: boolean;
7
+ reasoning: boolean;
8
+ toolCall: boolean;
9
+ structuredOutput?: boolean;
10
+ temperature?: boolean;
11
+ releaseDate?: string;
12
+ lastUpdated?: string;
13
+ status?: 'alpha' | 'beta' | 'deprecated';
14
+ modalities?: {
15
+ input: string[];
16
+ output: string[];
17
+ };
18
+ limit?: {
19
+ context?: number;
20
+ input?: number;
21
+ output?: number;
22
+ };
23
+ }
24
+ interface ModelCatalogProvider {
25
+ id: string;
26
+ name: string;
27
+ npm?: string;
28
+ api?: string;
29
+ doc?: string;
30
+ env: string[];
31
+ models: ModelCatalogModel[];
32
+ }
33
+ interface ModelCatalog {
34
+ schemaVersion: typeof MODEL_CATALOG_SCHEMA_VERSION;
35
+ source: typeof MODEL_CATALOG_SOURCE_URL;
36
+ catalogVersion: string;
37
+ fetchedAt: string;
38
+ providers: ModelCatalogProvider[];
39
+ }
40
+ interface FetchModelCatalogOptions {
41
+ fetch?: typeof globalThis.fetch;
42
+ signal?: AbortSignal;
43
+ timeoutMs?: number;
44
+ maxBytes?: number;
45
+ }
46
+
47
+ declare function normalizeModelsDevelopmentCatalog(input: unknown, metadata: {
48
+ catalogVersion: string;
49
+ fetchedAt: string;
50
+ }): ModelCatalog;
51
+ declare function parseModelCatalog(input: unknown): ModelCatalog;
52
+ declare function mergeDiscoveredModelIds(provider: ModelCatalogProvider | undefined, discoveredIds: readonly string[]): ModelCatalogModel[];
53
+ declare function fetchModelCatalog(options?: FetchModelCatalogOptions): Promise<ModelCatalog>;
54
+
55
+ declare const EMBEDDED_MODEL_CATALOG: ModelCatalog;
56
+
57
+ export { EMBEDDED_MODEL_CATALOG, type FetchModelCatalogOptions, MODEL_CATALOG_SCHEMA_VERSION, MODEL_CATALOG_SOURCE_URL, type ModelCatalog, type ModelCatalogModel, type ModelCatalogProvider, fetchModelCatalog, mergeDiscoveredModelIds, normalizeModelsDevelopmentCatalog, parseModelCatalog };