@enactprotocol/api 2.0.0 → 2.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/dist/attestations.d.ts +253 -0
- package/dist/attestations.d.ts.map +1 -0
- package/dist/attestations.js +326 -0
- package/dist/attestations.js.map +1 -0
- package/dist/auth.d.ts +169 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +196 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +111 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +251 -0
- package/dist/client.js.map +1 -0
- package/dist/download.d.ts +172 -0
- package/dist/download.d.ts.map +1 -0
- package/dist/download.js +154 -0
- package/dist/download.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/publish.d.ts +177 -0
- package/dist/publish.d.ts.map +1 -0
- package/dist/publish.js +174 -0
- package/dist/publish.js.map +1 -0
- package/dist/search.d.ts +76 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +66 -0
- package/dist/search.js.map +1 -0
- package/dist/trust.d.ts +123 -0
- package/dist/trust.d.ts.map +1 -0
- package/dist/trust.js +152 -0
- package/dist/trust.js.map +1 -0
- package/dist/types.d.ts +421 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +24 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +13 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +84 -0
- package/dist/utils.js.map +1 -0
- package/package.json +1 -1
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @enactprotocol/api - Registry API client for Enact tools (v2)
|
|
3
|
+
*
|
|
4
|
+
* This package provides HTTP client functionality for interacting with
|
|
5
|
+
* the Enact registry v2, including:
|
|
6
|
+
* - OAuth authentication
|
|
7
|
+
* - Tool search and discovery
|
|
8
|
+
* - Bundle download with yank handling
|
|
9
|
+
* - Tool publishing (multipart upload)
|
|
10
|
+
* - Attestation management
|
|
11
|
+
* - Trust configuration
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
export const VERSION = "0.2.0";
|
|
16
|
+
// =============================================================================
|
|
17
|
+
// Types
|
|
18
|
+
// =============================================================================
|
|
19
|
+
export * from "./types";
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// Client
|
|
22
|
+
// =============================================================================
|
|
23
|
+
export { EnactApiClient, createApiClient } from "./client";
|
|
24
|
+
// =============================================================================
|
|
25
|
+
// Search
|
|
26
|
+
// =============================================================================
|
|
27
|
+
export { searchTools } from "./search";
|
|
28
|
+
// =============================================================================
|
|
29
|
+
// Download
|
|
30
|
+
// =============================================================================
|
|
31
|
+
export { downloadBundle, getToolInfo, getToolVersion, getAttestations } from "./download";
|
|
32
|
+
// =============================================================================
|
|
33
|
+
// Publish
|
|
34
|
+
// =============================================================================
|
|
35
|
+
export { publishTool, createBundle, submitAttestation, yankVersion, unyankVersion, deleteTool, } from "./publish";
|
|
36
|
+
// =============================================================================
|
|
37
|
+
// Auth (v2 OAuth)
|
|
38
|
+
// =============================================================================
|
|
39
|
+
export { initiateLogin, exchangeCodeForToken, refreshAccessToken, getCurrentUser, authenticate, logout, getAuthStatus, getUserProfile, submitFeedback, } from "./auth";
|
|
40
|
+
// =============================================================================
|
|
41
|
+
// Attestations (v2)
|
|
42
|
+
// =============================================================================
|
|
43
|
+
export { getAttestations as getAttestationList, submitAttestation as submitAttestationToRegistry, revokeAttestation, hasAttestation, getAttestationBundle, verifyAttestationLocally, verifyAllAttestations, hasTrustedAttestation, } from "./attestations";
|
|
44
|
+
// =============================================================================
|
|
45
|
+
// Trust (v2)
|
|
46
|
+
// =============================================================================
|
|
47
|
+
export { getUserTrust, updateMyTrust, addTrustedAuditor, removeTrustedAuditor, userTrustsAuditor, getMyTrustedAuditors, } from "./trust";
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,gFAAgF;AAChF,QAAQ;AACR,gFAAgF;AAEhF,cAAc,SAAS,CAAC;AAExB,gFAAgF;AAChF,SAAS;AACT,gFAAgF;AAEhF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3D,gFAAgF;AAChF,SAAS;AACT,gFAAgF;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,gFAAgF;AAChF,WAAW;AACX,gFAAgF;AAEhF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG1F,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,OAAO,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,WAAW,CAAC;AASnB,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,aAAa,EACb,cAAc,EACd,cAAc,GACf,MAAM,QAAQ,CAAC;AAGhB,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF,OAAO,EACL,eAAe,IAAI,kBAAkB,EACrC,iBAAiB,IAAI,2BAA2B,EAChD,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAGxB,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAEhF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool publishing functionality (v2)
|
|
3
|
+
* Implements bundle creation and publishing to registry
|
|
4
|
+
*/
|
|
5
|
+
import type { EnactApiClient } from "./client";
|
|
6
|
+
/**
|
|
7
|
+
* Publish options
|
|
8
|
+
*/
|
|
9
|
+
export interface PublishOptions {
|
|
10
|
+
/** Tool name (e.g., "alice/utils/greeter") */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Tool version (e.g., "1.2.0") */
|
|
13
|
+
version: string;
|
|
14
|
+
/** Bundle data (tar.gz) */
|
|
15
|
+
bundle: ArrayBuffer | Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Publish result
|
|
19
|
+
*/
|
|
20
|
+
export interface PublishResult {
|
|
21
|
+
/** Tool name */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Published version */
|
|
24
|
+
version: string;
|
|
25
|
+
/** Publication timestamp */
|
|
26
|
+
publishedAt: Date;
|
|
27
|
+
/** Bundle hash */
|
|
28
|
+
bundleHash: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Bundle info (for createBundle)
|
|
32
|
+
*/
|
|
33
|
+
export interface BundleInfo {
|
|
34
|
+
/** Bundle data */
|
|
35
|
+
data: Uint8Array;
|
|
36
|
+
/** SHA-256 hash */
|
|
37
|
+
hash: string;
|
|
38
|
+
/** Size in bytes */
|
|
39
|
+
size: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Attestation submission options (v2)
|
|
43
|
+
*/
|
|
44
|
+
export interface SubmitAttestationOptions {
|
|
45
|
+
/** Tool name */
|
|
46
|
+
name: string;
|
|
47
|
+
/** Tool version */
|
|
48
|
+
version: string;
|
|
49
|
+
/** Sigstore bundle (full bundle object) */
|
|
50
|
+
sigstoreBundle: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Attestation submission result (v2)
|
|
54
|
+
*/
|
|
55
|
+
export interface AttestationResult {
|
|
56
|
+
/** Auditor email */
|
|
57
|
+
auditor: string;
|
|
58
|
+
/** OAuth provider */
|
|
59
|
+
auditorProvider: string;
|
|
60
|
+
/** Signing timestamp */
|
|
61
|
+
signedAt: Date;
|
|
62
|
+
/** Rekor log ID */
|
|
63
|
+
rekorLogId: string;
|
|
64
|
+
/** Rekor log index */
|
|
65
|
+
rekorLogIndex?: number | undefined;
|
|
66
|
+
/** Verification result */
|
|
67
|
+
verification: {
|
|
68
|
+
verified: boolean;
|
|
69
|
+
verifiedAt: Date;
|
|
70
|
+
rekorVerified: boolean;
|
|
71
|
+
certificateVerified: boolean;
|
|
72
|
+
signatureVerified: boolean;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Create a bundle from tool directory
|
|
77
|
+
*
|
|
78
|
+
* This is a placeholder that would typically:
|
|
79
|
+
* 1. Read all files from the tool directory
|
|
80
|
+
* 2. Create a tar.gz archive
|
|
81
|
+
* 3. Compute SHA-256 hash
|
|
82
|
+
*
|
|
83
|
+
* @param toolDir - Path to tool directory
|
|
84
|
+
* @returns Bundle info with data and hash
|
|
85
|
+
*/
|
|
86
|
+
export declare function createBundle(toolDir: string): Promise<BundleInfo>;
|
|
87
|
+
/**
|
|
88
|
+
* Publish a tool to the registry (v2 - multipart upload)
|
|
89
|
+
*
|
|
90
|
+
* @param client - API client instance (must be authenticated)
|
|
91
|
+
* @param options - Publish options with manifest and bundle
|
|
92
|
+
* @returns Publish result
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* const bundle = await createBundle("./my-tool");
|
|
97
|
+
* const result = await publishTool(client, {
|
|
98
|
+
* name: "alice/utils/greeter",
|
|
99
|
+
* manifest: { enact: "2.0.0", name: "alice/utils/greeter", version: "1.2.0", ... },
|
|
100
|
+
* bundle: bundle.data,
|
|
101
|
+
* readme: "# My Tool\n\nDescription..."
|
|
102
|
+
* });
|
|
103
|
+
* console.log(`Published: ${result.bundleHash}`);
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
export declare function publishTool(client: EnactApiClient, options: {
|
|
107
|
+
name: string;
|
|
108
|
+
manifest: Record<string, unknown>;
|
|
109
|
+
bundle: ArrayBuffer | Uint8Array;
|
|
110
|
+
readme?: string | undefined;
|
|
111
|
+
}): Promise<PublishResult>;
|
|
112
|
+
/**
|
|
113
|
+
* Submit an attestation for a tool version (v2)
|
|
114
|
+
*
|
|
115
|
+
* @param client - API client instance (must be authenticated via OIDC)
|
|
116
|
+
* @param options - Attestation options
|
|
117
|
+
* @returns Attestation result
|
|
118
|
+
*/
|
|
119
|
+
export declare function submitAttestation(client: EnactApiClient, options: SubmitAttestationOptions): Promise<AttestationResult>;
|
|
120
|
+
/**
|
|
121
|
+
* Yank a tool version (v2)
|
|
122
|
+
*
|
|
123
|
+
* Yanked versions remain downloadable but are excluded from version listings
|
|
124
|
+
* by default and show warnings to users.
|
|
125
|
+
*
|
|
126
|
+
* @param client - API client instance (must be authenticated and owner)
|
|
127
|
+
* @param name - Tool name
|
|
128
|
+
* @param version - Version to yank
|
|
129
|
+
* @param options - Yank options (reason, replacement)
|
|
130
|
+
* @returns Yank result
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* const result = await yankVersion(client, "alice/utils/greeter", "1.1.0", {
|
|
135
|
+
* reason: "Security vulnerability CVE-2025-1234",
|
|
136
|
+
* replacementVersion: "1.2.0"
|
|
137
|
+
* });
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
export declare function yankVersion(client: EnactApiClient, name: string, version: string, options?: {
|
|
141
|
+
reason?: string | undefined;
|
|
142
|
+
replacementVersion?: string | undefined;
|
|
143
|
+
}): Promise<{
|
|
144
|
+
yanked: true;
|
|
145
|
+
version: string;
|
|
146
|
+
reason?: string | undefined;
|
|
147
|
+
replacementVersion?: string | undefined;
|
|
148
|
+
yankedAt: Date;
|
|
149
|
+
}>;
|
|
150
|
+
/**
|
|
151
|
+
* Unyank a tool version (v2)
|
|
152
|
+
*
|
|
153
|
+
* Restore a previously yanked version.
|
|
154
|
+
*
|
|
155
|
+
* @param client - API client instance (must be authenticated and owner)
|
|
156
|
+
* @param name - Tool name
|
|
157
|
+
* @param version - Version to unyank
|
|
158
|
+
* @returns Unyank result
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const result = await unyankVersion(client, "alice/utils/greeter", "1.1.0");
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
export declare function unyankVersion(client: EnactApiClient, name: string, version: string): Promise<{
|
|
166
|
+
yanked: false;
|
|
167
|
+
version: string;
|
|
168
|
+
unyankedAt: Date;
|
|
169
|
+
}>;
|
|
170
|
+
/**
|
|
171
|
+
* Delete a tool from the registry
|
|
172
|
+
*
|
|
173
|
+
* @param client - API client instance (must be authenticated and owner)
|
|
174
|
+
* @param name - Tool name to delete
|
|
175
|
+
*/
|
|
176
|
+
export declare function deleteTool(client: EnactApiClient, name: string): Promise<void>;
|
|
177
|
+
//# sourceMappingURL=publish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,MAAM,EAAE,WAAW,GAAG,UAAU,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IAC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
+
* Tool publishing functionality (v2)
|
|
3
|
+
* Implements bundle creation and publishing to registry
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Create a bundle from tool directory
|
|
7
|
+
*
|
|
8
|
+
* This is a placeholder that would typically:
|
|
9
|
+
* 1. Read all files from the tool directory
|
|
10
|
+
* 2. Create a tar.gz archive
|
|
11
|
+
* 3. Compute SHA-256 hash
|
|
12
|
+
*
|
|
13
|
+
* @param toolDir - Path to tool directory
|
|
14
|
+
* @returns Bundle info with data and hash
|
|
15
|
+
*/
|
|
16
|
+
export async function createBundle(toolDir) {
|
|
17
|
+
// This would use @enactprotocol/shared utilities to:
|
|
18
|
+
// 1. Read files from toolDir
|
|
19
|
+
// 2. Create tarball
|
|
20
|
+
// 3. Compute hash
|
|
21
|
+
// For now, this is a placeholder that throws
|
|
22
|
+
// The actual implementation would integrate with the shared package
|
|
23
|
+
throw new Error(`createBundle not yet implemented for: ${toolDir}`);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Publish a tool to the registry (v2 - multipart upload)
|
|
27
|
+
*
|
|
28
|
+
* @param client - API client instance (must be authenticated)
|
|
29
|
+
* @param options - Publish options with manifest and bundle
|
|
30
|
+
* @returns Publish result
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const bundle = await createBundle("./my-tool");
|
|
35
|
+
* const result = await publishTool(client, {
|
|
36
|
+
* name: "alice/utils/greeter",
|
|
37
|
+
* manifest: { enact: "2.0.0", name: "alice/utils/greeter", version: "1.2.0", ... },
|
|
38
|
+
* bundle: bundle.data,
|
|
39
|
+
* readme: "# My Tool\n\nDescription..."
|
|
40
|
+
* });
|
|
41
|
+
* console.log(`Published: ${result.bundleHash}`);
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export async function publishTool(client, options) {
|
|
45
|
+
const { name, manifest, bundle, readme } = options;
|
|
46
|
+
// Create FormData for multipart upload
|
|
47
|
+
const formData = new FormData();
|
|
48
|
+
// Add manifest as JSON
|
|
49
|
+
formData.append("manifest", JSON.stringify(manifest));
|
|
50
|
+
// Add bundle as file
|
|
51
|
+
const bundleBlob = bundle instanceof ArrayBuffer
|
|
52
|
+
? new Blob([bundle], { type: "application/gzip" })
|
|
53
|
+
: new Blob([bundle], { type: "application/gzip" });
|
|
54
|
+
formData.append("bundle", bundleBlob, "bundle.tar.gz");
|
|
55
|
+
// Add optional readme
|
|
56
|
+
if (readme) {
|
|
57
|
+
formData.append("readme", readme);
|
|
58
|
+
}
|
|
59
|
+
// Make multipart request (v2 endpoint is POST /tools/{name})
|
|
60
|
+
const response = await fetch(`${client.getBaseUrl()}/tools/${name}`, {
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: {
|
|
63
|
+
Authorization: client.getAuthToken() ? `Bearer ${client.getAuthToken()}` : "",
|
|
64
|
+
"User-Agent": client.getUserAgent() || "enact-cli/0.1.0",
|
|
65
|
+
},
|
|
66
|
+
body: formData,
|
|
67
|
+
});
|
|
68
|
+
if (!response.ok) {
|
|
69
|
+
const errorText = await response.text();
|
|
70
|
+
throw new Error(`Publish failed: ${response.status} - ${errorText}`);
|
|
71
|
+
}
|
|
72
|
+
const json = (await response.json());
|
|
73
|
+
// Handle both wrapped and unwrapped responses
|
|
74
|
+
const data = "data" in json ? json.data : json;
|
|
75
|
+
return {
|
|
76
|
+
name: data.name,
|
|
77
|
+
version: data.version,
|
|
78
|
+
publishedAt: new Date(data.published_at),
|
|
79
|
+
bundleHash: data.bundle_hash,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Submit an attestation for a tool version (v2)
|
|
84
|
+
*
|
|
85
|
+
* @param client - API client instance (must be authenticated via OIDC)
|
|
86
|
+
* @param options - Attestation options
|
|
87
|
+
* @returns Attestation result
|
|
88
|
+
*/
|
|
89
|
+
export async function submitAttestation(client, options) {
|
|
90
|
+
const { name, version, sigstoreBundle } = options;
|
|
91
|
+
const response = await client.post(`/tools/${name}/versions/${version}/attestations`, {
|
|
92
|
+
bundle: sigstoreBundle,
|
|
93
|
+
});
|
|
94
|
+
return {
|
|
95
|
+
auditor: response.data.auditor,
|
|
96
|
+
auditorProvider: response.data.auditor_provider,
|
|
97
|
+
signedAt: new Date(response.data.signed_at),
|
|
98
|
+
rekorLogId: response.data.rekor_log_id,
|
|
99
|
+
rekorLogIndex: response.data.rekor_log_index,
|
|
100
|
+
verification: {
|
|
101
|
+
verified: response.data.verification.verified,
|
|
102
|
+
verifiedAt: new Date(response.data.verification.verified_at),
|
|
103
|
+
rekorVerified: response.data.verification.rekor_verified,
|
|
104
|
+
certificateVerified: response.data.verification.certificate_verified,
|
|
105
|
+
signatureVerified: response.data.verification.signature_verified,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Yank a tool version (v2)
|
|
111
|
+
*
|
|
112
|
+
* Yanked versions remain downloadable but are excluded from version listings
|
|
113
|
+
* by default and show warnings to users.
|
|
114
|
+
*
|
|
115
|
+
* @param client - API client instance (must be authenticated and owner)
|
|
116
|
+
* @param name - Tool name
|
|
117
|
+
* @param version - Version to yank
|
|
118
|
+
* @param options - Yank options (reason, replacement)
|
|
119
|
+
* @returns Yank result
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* const result = await yankVersion(client, "alice/utils/greeter", "1.1.0", {
|
|
124
|
+
* reason: "Security vulnerability CVE-2025-1234",
|
|
125
|
+
* replacementVersion: "1.2.0"
|
|
126
|
+
* });
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
export async function yankVersion(client, name, version, options) {
|
|
130
|
+
const response = await client.post(`/tools/${name}/versions/${version}/yank`, {
|
|
131
|
+
reason: options?.reason,
|
|
132
|
+
replacement_version: options?.replacementVersion,
|
|
133
|
+
});
|
|
134
|
+
return {
|
|
135
|
+
yanked: response.data.yanked,
|
|
136
|
+
version: response.data.version,
|
|
137
|
+
reason: response.data.reason,
|
|
138
|
+
replacementVersion: response.data.replacement_version,
|
|
139
|
+
yankedAt: new Date(response.data.yanked_at),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Unyank a tool version (v2)
|
|
144
|
+
*
|
|
145
|
+
* Restore a previously yanked version.
|
|
146
|
+
*
|
|
147
|
+
* @param client - API client instance (must be authenticated and owner)
|
|
148
|
+
* @param name - Tool name
|
|
149
|
+
* @param version - Version to unyank
|
|
150
|
+
* @returns Unyank result
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* const result = await unyankVersion(client, "alice/utils/greeter", "1.1.0");
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
export async function unyankVersion(client, name, version) {
|
|
158
|
+
const response = await client.post(`/tools/${name}/versions/${version}/unyank`);
|
|
159
|
+
return {
|
|
160
|
+
yanked: response.data.yanked,
|
|
161
|
+
version: response.data.version,
|
|
162
|
+
unyankedAt: new Date(response.data.unyanked_at),
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Delete a tool from the registry
|
|
167
|
+
*
|
|
168
|
+
* @param client - API client instance (must be authenticated and owner)
|
|
169
|
+
* @param name - Tool name to delete
|
|
170
|
+
*/
|
|
171
|
+
export async function deleteTool(client, name) {
|
|
172
|
+
await client.delete(`/tools/${name}`);
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+EH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAe;IAChD,qDAAqD;IACrD,6BAA6B;IAC7B,oBAAoB;IACpB,kBAAkB;IAElB,6CAA6C;IAC7C,oEAAoE;IACpE,MAAM,IAAI,KAAK,CAAC,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,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO;QAC9B,UAAU,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;KAChD,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAsB,EAAE,IAAY;IACnE,MAAM,MAAM,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/search.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool search functionality
|
|
3
|
+
* Implements semantic search via registry API
|
|
4
|
+
*/
|
|
5
|
+
import type { EnactApiClient } from "./client";
|
|
6
|
+
/**
|
|
7
|
+
* Search options
|
|
8
|
+
*/
|
|
9
|
+
export interface SearchOptions {
|
|
10
|
+
/** Search query (semantic) */
|
|
11
|
+
query: string;
|
|
12
|
+
/** Filter by tags (comma-separated or array) */
|
|
13
|
+
tags?: string | string[] | undefined;
|
|
14
|
+
/** Maximum results (default: 20, max: 100) */
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
/** Pagination offset */
|
|
17
|
+
offset?: number | undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Single search result with parsed data (v2)
|
|
21
|
+
*/
|
|
22
|
+
export interface SearchResult {
|
|
23
|
+
/** Tool name */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Tool description */
|
|
26
|
+
description: string;
|
|
27
|
+
/** Tool tags */
|
|
28
|
+
tags: string[];
|
|
29
|
+
/** Latest version */
|
|
30
|
+
version: string;
|
|
31
|
+
/** Author */
|
|
32
|
+
author: {
|
|
33
|
+
username: string;
|
|
34
|
+
avatarUrl?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
/** Download count */
|
|
37
|
+
downloads: number;
|
|
38
|
+
/** Trust status */
|
|
39
|
+
trustStatus?: {
|
|
40
|
+
auditorCount: number;
|
|
41
|
+
} | undefined;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Search response with pagination info
|
|
45
|
+
*/
|
|
46
|
+
export interface SearchResponse {
|
|
47
|
+
/** Search results */
|
|
48
|
+
results: SearchResult[];
|
|
49
|
+
/** Total matching tools */
|
|
50
|
+
total: number;
|
|
51
|
+
/** Results limit used */
|
|
52
|
+
limit: number;
|
|
53
|
+
/** Results offset used */
|
|
54
|
+
offset: number;
|
|
55
|
+
/** Whether more results are available */
|
|
56
|
+
hasMore: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Search for tools in the registry
|
|
60
|
+
*
|
|
61
|
+
* @param client - API client instance
|
|
62
|
+
* @param options - Search options
|
|
63
|
+
* @returns Search results with pagination
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const client = createApiClient();
|
|
68
|
+
* const results = await searchTools(client, {
|
|
69
|
+
* query: "pdf extraction",
|
|
70
|
+
* tags: ["ai", "document"],
|
|
71
|
+
* limit: 10
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare function searchTools(client: EnactApiClient, options: SearchOptions): Promise<SearchResponse>;
|
|
76
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa;IACb,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAChC,CAAC;IACF,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,WAAW,CAAC,EACR;QACE,YAAY,EAAE,MAAM,CAAC;KACtB,GACD,SAAS,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,qBAAqB;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC;CAClB;AAkCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,cAAc,CAAC,CA6BzB"}
|
package/dist/search.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool search functionality
|
|
3
|
+
* Implements semantic search via registry API
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Convert raw API result to clean SearchResult
|
|
7
|
+
*/
|
|
8
|
+
function toSearchResult(raw) {
|
|
9
|
+
return {
|
|
10
|
+
name: raw.name,
|
|
11
|
+
description: raw.description,
|
|
12
|
+
tags: raw.tags,
|
|
13
|
+
version: raw.version,
|
|
14
|
+
author: {
|
|
15
|
+
username: raw.author.username,
|
|
16
|
+
avatarUrl: raw.author.avatar_url,
|
|
17
|
+
},
|
|
18
|
+
downloads: raw.downloads,
|
|
19
|
+
trustStatus: raw.trust_status
|
|
20
|
+
? {
|
|
21
|
+
auditorCount: raw.trust_status.auditor_count,
|
|
22
|
+
}
|
|
23
|
+
: undefined,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Search for tools in the registry
|
|
28
|
+
*
|
|
29
|
+
* @param client - API client instance
|
|
30
|
+
* @param options - Search options
|
|
31
|
+
* @returns Search results with pagination
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const client = createApiClient();
|
|
36
|
+
* const results = await searchTools(client, {
|
|
37
|
+
* query: "pdf extraction",
|
|
38
|
+
* tags: ["ai", "document"],
|
|
39
|
+
* limit: 10
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export async function searchTools(client, options) {
|
|
44
|
+
const params = new URLSearchParams();
|
|
45
|
+
params.set("q", options.query);
|
|
46
|
+
if (options.tags) {
|
|
47
|
+
const tagsStr = Array.isArray(options.tags) ? options.tags.join(",") : options.tags;
|
|
48
|
+
params.set("tags", tagsStr);
|
|
49
|
+
}
|
|
50
|
+
if (options.limit !== undefined) {
|
|
51
|
+
params.set("limit", String(Math.min(options.limit, 100)));
|
|
52
|
+
}
|
|
53
|
+
if (options.offset !== undefined) {
|
|
54
|
+
params.set("offset", String(options.offset));
|
|
55
|
+
}
|
|
56
|
+
const response = await client.get(`/tools/search?${params.toString()}`);
|
|
57
|
+
const results = response.data.tools.map(toSearchResult);
|
|
58
|
+
return {
|
|
59
|
+
results,
|
|
60
|
+
total: response.data.total,
|
|
61
|
+
limit: response.data.limit,
|
|
62
|
+
offset: response.data.offset,
|
|
63
|
+
hasMore: response.data.offset + results.length < response.data.total,
|
|
64
|
+
};
|
|
65
|
+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