@decantr/registry 1.0.0-beta.9 → 1.0.1
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.
- package/LICENSE +21 -0
- package/README.md +56 -0
- package/dist/client.d.ts +115 -0
- package/dist/client.js +540 -0
- package/dist/client.js.map +1 -0
- package/dist/content-types-BJFuxWNj.d.ts +886 -0
- package/dist/content-types.d.ts +2 -0
- package/dist/content-types.js +44 -0
- package/dist/content-types.js.map +1 -0
- package/dist/index.d.ts +7 -291
- package/dist/index.js +384 -12
- package/dist/index.js.map +1 -1
- package/package.json +39 -9
- package/schema/archetype.v2.json +118 -0
- package/schema/blueprint.v1.json +166 -0
- package/schema/common.v1.json +271 -0
- package/schema/content-intelligence.v1.json +142 -0
- package/schema/pattern.v2.json +149 -0
- package/schema/public-content-list.v1.json +28 -0
- package/schema/public-content-record.v1.json +91 -0
- package/schema/public-content-summary.v1.json +67 -0
- package/schema/registry-intelligence-summary.v1.json +81 -0
- package/schema/search-response.v1.json +28 -0
- package/schema/shell.v1.json +69 -0
- package/schema/showcase-manifest-entry.v1.json +63 -0
- package/schema/showcase-manifest.v1.json +28 -0
- package/schema/showcase-shortlist.v1.json +36 -0
- package/schema/theme.v1.json +190 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Decantr AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @decantr/registry
|
|
2
|
+
|
|
3
|
+
Support status: `core-supported`
|
|
4
|
+
Release channel: `stable`
|
|
5
|
+
|
|
6
|
+
Registry contracts, schemas, API client, ranking helpers, and content utilities for Decantr.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @decantr/registry
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## What It Exports
|
|
15
|
+
|
|
16
|
+
- strong types for patterns, themes, blueprints, archetypes, shells, and intelligence metadata
|
|
17
|
+
- `RegistryAPIClient` for server-side and tool-side registry access
|
|
18
|
+
- `@decantr/registry/client` for web-safe API usage
|
|
19
|
+
- public schema exports for registry content and summary responses
|
|
20
|
+
- ranking and sorting helpers for public registry content
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
Node/runtime usage:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { RegistryAPIClient } from '@decantr/registry';
|
|
28
|
+
|
|
29
|
+
const client = new RegistryAPIClient({ baseUrl: 'https://api.decantr.ai/v1' });
|
|
30
|
+
const results = await client.search({ query: 'dashboard', type: 'blueprint' });
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Browser-safe usage:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { createRegistryClient } from '@decantr/registry/client';
|
|
37
|
+
|
|
38
|
+
const client = createRegistryClient({ baseUrl: 'https://api.decantr.ai/v1' });
|
|
39
|
+
const summary = await client.getIntelligenceSummary();
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Related Schemas
|
|
43
|
+
|
|
44
|
+
This package owns the canonical registry schemas published under `@decantr/registry/schema/*`.
|
|
45
|
+
|
|
46
|
+
## Compatibility
|
|
47
|
+
|
|
48
|
+
`@decantr/registry` is part of the stable public Decantr package surface in the `1.x` line.
|
|
49
|
+
|
|
50
|
+
- exported schema paths and documented client entrypoints are expected to remain stable across `1.x`
|
|
51
|
+
- additive response fields may be introduced without breaking the stable contract
|
|
52
|
+
- breaking client, schema, or path changes require a major version
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
MIT
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { e as ApiContentType, ak as SearchParams, x as ContentListResponse, aa as PublicContentRecord, P as Pattern, A as Archetype, T as Theme, B as Blueprint, S as Shell, al as SearchResponse, ad as PublicUserProfile, ac as PublicContentSummary, ax as UserProfile, ae as PublishPayload, af as PublishResponse, Y as OwnedContentSummary, ao as ShowcaseManifestResponse, aq as ShowcaseShortlistResponse, ap as ShowcaseShortlistReport, ah as RegistryIntelligenceSummaryResponse, F as ExecutionPackBundleResponse, aF as HostedSelectedExecutionPackRequest, aG as SelectedExecutionPackResponse, H as ExecutionPackManifest, Q as HostedFileCritiqueRequest, N as FileCritiqueReport, U as HostedProjectAuditRequest, a7 as ProjectAuditReport } from './content-types-BJFuxWNj.js';
|
|
2
|
+
export { c as API_CONTENT_TYPES, d as API_CONTENT_TYPE_TO_CONTENT_TYPE, n as CONTENT_INTELLIGENCE_SOURCES, o as CONTENT_TYPES, p as CONTENT_TYPE_TO_API_CONTENT_TYPE, r as ContentBenchmarkConfidence, t as ContentGoldenUsage, u as ContentIntelligenceMetadata, v as ContentIntelligenceSource, w as ContentItem, y as ContentVerificationStatus, Z as PUBLIC_CONTENT_SOURCES, ab as PublicContentSource, ag as RegistryIntelligenceSummaryBucket, an as ShowcaseManifestEntry, ar as ShowcaseShortlistSummary, as as ShowcaseVerificationEntry, aB as isApiContentType, aC as isContentIntelligenceSource, aD as isContentType, aE as isPublicContentSource } from './content-types-BJFuxWNj.js';
|
|
3
|
+
import { EssenceFile } from '@decantr/essence-spec';
|
|
4
|
+
|
|
5
|
+
interface RegistryAPIClientOptions {
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
apiKey?: string;
|
|
8
|
+
accessToken?: string;
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
cacheTtlMs?: number;
|
|
11
|
+
}
|
|
12
|
+
declare class RegistryAPIError extends Error {
|
|
13
|
+
status: number;
|
|
14
|
+
details?: unknown;
|
|
15
|
+
constructor(status: number, message: string, details?: unknown);
|
|
16
|
+
}
|
|
17
|
+
declare class RegistryAPIClient {
|
|
18
|
+
private baseUrl;
|
|
19
|
+
private apiKey;
|
|
20
|
+
private accessToken;
|
|
21
|
+
private timeoutMs;
|
|
22
|
+
private cacheTtlMs;
|
|
23
|
+
private cache;
|
|
24
|
+
constructor(options?: RegistryAPIClientOptions);
|
|
25
|
+
private buildHeaders;
|
|
26
|
+
private fetchWithTimeout;
|
|
27
|
+
private request;
|
|
28
|
+
private getCached;
|
|
29
|
+
private setCache;
|
|
30
|
+
clearCache(): void;
|
|
31
|
+
checkHealth(): Promise<boolean>;
|
|
32
|
+
listContent<T = Record<string, unknown>>(type: ApiContentType, params?: {
|
|
33
|
+
namespace?: string;
|
|
34
|
+
source?: SearchParams['source'];
|
|
35
|
+
sort?: string;
|
|
36
|
+
recommended?: boolean;
|
|
37
|
+
intelligenceSource?: SearchParams['intelligenceSource'];
|
|
38
|
+
limit?: number;
|
|
39
|
+
offset?: number;
|
|
40
|
+
}): Promise<ContentListResponse<T>>;
|
|
41
|
+
getContent<T = Record<string, unknown>>(type: ApiContentType, namespace: string, slug: string): Promise<T>;
|
|
42
|
+
getPublicContentRecord<TData = Record<string, unknown>>(type: ApiContentType, namespace: string, slug: string): Promise<PublicContentRecord<TData>>;
|
|
43
|
+
getContentRecord<TData = Record<string, unknown>>(type: ApiContentType, namespace: string, slug: string): Promise<PublicContentRecord<TData>>;
|
|
44
|
+
getPattern(namespace: string, slug: string): Promise<Pattern>;
|
|
45
|
+
getArchetype(namespace: string, slug: string): Promise<Archetype>;
|
|
46
|
+
getTheme(namespace: string, slug: string): Promise<Theme>;
|
|
47
|
+
getBlueprint(namespace: string, slug: string): Promise<Blueprint>;
|
|
48
|
+
getShell(namespace: string, slug: string): Promise<Shell>;
|
|
49
|
+
search(params: SearchParams): Promise<SearchResponse>;
|
|
50
|
+
getPublicUserProfile(username: string): Promise<PublicUserProfile>;
|
|
51
|
+
getPublicUserContent(username: string, params?: {
|
|
52
|
+
type?: string;
|
|
53
|
+
source?: SearchParams['source'];
|
|
54
|
+
sort?: string;
|
|
55
|
+
recommended?: boolean;
|
|
56
|
+
intelligenceSource?: SearchParams['intelligenceSource'];
|
|
57
|
+
limit?: number;
|
|
58
|
+
offset?: number;
|
|
59
|
+
}): Promise<ContentListResponse<PublicContentSummary>>;
|
|
60
|
+
getProfile(): Promise<UserProfile>;
|
|
61
|
+
publishContent(payload: PublishPayload): Promise<PublishResponse>;
|
|
62
|
+
getMyContent(): Promise<ContentListResponse<OwnedContentSummary>>;
|
|
63
|
+
getAccessiblePrivateContent(params?: {
|
|
64
|
+
type?: string;
|
|
65
|
+
scope?: 'all' | 'personal' | 'organization';
|
|
66
|
+
q?: string;
|
|
67
|
+
limit?: number;
|
|
68
|
+
offset?: number;
|
|
69
|
+
}): Promise<ContentListResponse<OwnedContentSummary>>;
|
|
70
|
+
getSchema(name?: string): Promise<Record<string, unknown>>;
|
|
71
|
+
getShowcaseManifest(): Promise<ShowcaseManifestResponse>;
|
|
72
|
+
getShowcaseShortlist(): Promise<ShowcaseShortlistResponse>;
|
|
73
|
+
getShowcaseShortlistVerification(): Promise<ShowcaseShortlistReport>;
|
|
74
|
+
getRegistryIntelligenceSummary(params?: {
|
|
75
|
+
namespace?: string;
|
|
76
|
+
}): Promise<RegistryIntelligenceSummaryResponse>;
|
|
77
|
+
compileExecutionPacks(essence: EssenceFile, params?: {
|
|
78
|
+
namespace?: string;
|
|
79
|
+
}): Promise<ExecutionPackBundleResponse>;
|
|
80
|
+
selectExecutionPack(input: HostedSelectedExecutionPackRequest, params?: {
|
|
81
|
+
namespace?: string;
|
|
82
|
+
}): Promise<SelectedExecutionPackResponse>;
|
|
83
|
+
getExecutionPackManifest(essence: EssenceFile, params?: {
|
|
84
|
+
namespace?: string;
|
|
85
|
+
}): Promise<ExecutionPackManifest>;
|
|
86
|
+
critiqueFile(input: HostedFileCritiqueRequest, params?: {
|
|
87
|
+
namespace?: string;
|
|
88
|
+
}): Promise<FileCritiqueReport>;
|
|
89
|
+
auditProject(input: HostedProjectAuditRequest, params?: {
|
|
90
|
+
namespace?: string;
|
|
91
|
+
}): Promise<ProjectAuditReport>;
|
|
92
|
+
}
|
|
93
|
+
interface RegistryClientOptions {
|
|
94
|
+
baseUrl?: string;
|
|
95
|
+
}
|
|
96
|
+
interface SearchResult {
|
|
97
|
+
id: string;
|
|
98
|
+
type: string;
|
|
99
|
+
name: string;
|
|
100
|
+
description: string;
|
|
101
|
+
version: string;
|
|
102
|
+
tags: string[];
|
|
103
|
+
}
|
|
104
|
+
interface RegistryClient {
|
|
105
|
+
search(query: string, type?: string): Promise<SearchResult[]>;
|
|
106
|
+
fetch(type: string, id: string, version?: string): Promise<unknown>;
|
|
107
|
+
}
|
|
108
|
+
declare function createRegistryClient(options?: RegistryClientOptions): RegistryClient;
|
|
109
|
+
|
|
110
|
+
type PublicContentSort = 'recommended' | 'recent' | 'name';
|
|
111
|
+
declare function normalizePublicContentSort(value: string | null | undefined): PublicContentSort;
|
|
112
|
+
declare function comparePublicContent(a: PublicContentSummary, b: PublicContentSummary, sort?: PublicContentSort): number;
|
|
113
|
+
declare function sortPublicContent<T extends PublicContentSummary>(items: T[], sort?: PublicContentSort): T[];
|
|
114
|
+
|
|
115
|
+
export { ApiContentType, ContentListResponse, OwnedContentSummary, PublicContentRecord, type PublicContentSort, PublicContentSummary, PublicUserProfile, PublishPayload, PublishResponse, RegistryAPIClient, type RegistryAPIClientOptions, RegistryAPIError, type RegistryClient, type RegistryClientOptions, RegistryIntelligenceSummaryResponse, SearchParams, SearchResponse, type SearchResult, ShowcaseManifestResponse, ShowcaseShortlistReport, ShowcaseShortlistResponse, UserProfile, comparePublicContent, createRegistryClient, normalizePublicContentSort, sortPublicContent };
|