relayax-cli 0.3.41 → 0.3.42
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/commands/access.js +12 -12
- package/dist/commands/changelog.js +2 -2
- package/dist/commands/check-update.js +12 -12
- package/dist/commands/create.js +46 -19
- package/dist/commands/deploy-record.js +2 -2
- package/dist/commands/diff.js +2 -2
- package/dist/commands/grant.d.ts +33 -0
- package/dist/commands/grant.js +190 -0
- package/dist/commands/init.js +10 -10
- package/dist/commands/install.js +69 -68
- package/dist/commands/join.js +3 -3
- package/dist/commands/list.js +15 -15
- package/dist/commands/login.js +10 -3
- package/dist/commands/orgs.js +1 -1
- package/dist/commands/outdated.js +7 -7
- package/dist/commands/package.d.ts +18 -0
- package/dist/commands/package.js +355 -146
- package/dist/commands/ping.js +5 -5
- package/dist/commands/publish.d.ts +1 -1
- package/dist/commands/publish.js +56 -48
- package/dist/commands/search.js +2 -2
- package/dist/commands/status.js +11 -11
- package/dist/commands/uninstall.js +7 -7
- package/dist/commands/update.js +22 -22
- package/dist/commands/versions.js +2 -2
- package/dist/index.js +2 -0
- package/dist/lib/ai-tools.d.ts +15 -0
- package/dist/lib/ai-tools.js +48 -1
- package/dist/lib/api.d.ts +7 -7
- package/dist/lib/api.js +11 -11
- package/dist/lib/command-adapter.js +30 -682
- package/dist/lib/config.d.ts +1 -1
- package/dist/lib/config.js +2 -2
- package/dist/lib/guide.js +34 -79
- package/dist/lib/installer.d.ts +2 -2
- package/dist/lib/installer.js +4 -4
- package/dist/lib/preamble.d.ts +4 -4
- package/dist/lib/preamble.js +14 -14
- package/dist/lib/slug.d.ts +5 -0
- package/dist/lib/slug.js +49 -2
- package/dist/lib/update-cache.js +4 -4
- package/dist/lib/version-check.d.ts +3 -3
- package/dist/lib/version-check.js +13 -13
- package/dist/prompts/_business-card.md +41 -0
- package/dist/prompts/_error-handling.md +38 -0
- package/dist/prompts/_requirements-check.md +59 -0
- package/dist/prompts/_setup-cli.md +19 -0
- package/dist/prompts/_setup-login.md +7 -0
- package/dist/prompts/_setup-org.md +27 -0
- package/dist/prompts/business-card.md +41 -0
- package/dist/prompts/error-handling.md +38 -0
- package/dist/prompts/index.d.ts +7 -0
- package/dist/prompts/index.js +28 -0
- package/dist/prompts/install.md +187 -0
- package/dist/prompts/publish.md +444 -0
- package/dist/prompts/requirements-check.md +59 -0
- package/dist/types.d.ts +9 -9
- package/package.json +3 -3
package/dist/lib/api.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AgentRegistryInfo, SearchResult } from '../types.js';
|
|
2
2
|
export declare function fetchMyOrgs(): Promise<{
|
|
3
3
|
id: string;
|
|
4
4
|
slug: string;
|
|
5
5
|
name: string;
|
|
6
6
|
role: string;
|
|
7
7
|
}[]>;
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export interface
|
|
8
|
+
export declare function fetchAgentInfo(slug: string): Promise<AgentRegistryInfo>;
|
|
9
|
+
export declare function searchAgents(query: string, tag?: string): Promise<SearchResult[]>;
|
|
10
|
+
export interface AgentVersionInfo {
|
|
11
11
|
version: string;
|
|
12
12
|
changelog: string | null;
|
|
13
13
|
created_at: string;
|
|
14
14
|
}
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function reportInstall(
|
|
15
|
+
export declare function fetchAgentVersions(slug: string): Promise<AgentVersionInfo[]>;
|
|
16
|
+
export declare function reportInstall(agentId: string, slug: string, version?: string): Promise<void>;
|
|
17
17
|
export interface ResolvedSlug {
|
|
18
18
|
owner: string;
|
|
19
19
|
name: string;
|
|
20
20
|
full: string;
|
|
21
21
|
}
|
|
22
22
|
export declare function resolveSlugFromServer(name: string): Promise<ResolvedSlug[]>;
|
|
23
|
-
export declare function sendUsagePing(
|
|
23
|
+
export declare function sendUsagePing(agentId: string, slug: string, version?: string): Promise<void>;
|
|
24
24
|
export declare function followBuilder(username: string): Promise<void>;
|
package/dist/lib/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fetchMyOrgs = fetchMyOrgs;
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
4
|
+
exports.fetchAgentInfo = fetchAgentInfo;
|
|
5
|
+
exports.searchAgents = searchAgents;
|
|
6
|
+
exports.fetchAgentVersions = fetchAgentVersions;
|
|
7
7
|
exports.reportInstall = reportInstall;
|
|
8
8
|
exports.resolveSlugFromServer = resolveSlugFromServer;
|
|
9
9
|
exports.sendUsagePing = sendUsagePing;
|
|
@@ -21,17 +21,17 @@ async function fetchMyOrgs() {
|
|
|
21
21
|
return [];
|
|
22
22
|
return res.json();
|
|
23
23
|
}
|
|
24
|
-
async function
|
|
24
|
+
async function fetchAgentInfo(slug) {
|
|
25
25
|
const registrySlug = slug.startsWith('@') ? slug.slice(1) : slug;
|
|
26
26
|
const url = `${config_js_1.API_URL}/api/registry/${registrySlug}`;
|
|
27
27
|
const res = await fetch(url);
|
|
28
28
|
if (!res.ok) {
|
|
29
29
|
const body = await res.text();
|
|
30
|
-
throw new Error(
|
|
30
|
+
throw new Error(`에이전트 정보 조회 실패 (${res.status}): ${body}`);
|
|
31
31
|
}
|
|
32
32
|
return res.json();
|
|
33
33
|
}
|
|
34
|
-
async function
|
|
34
|
+
async function searchAgents(query, tag) {
|
|
35
35
|
const params = new URLSearchParams({ q: query });
|
|
36
36
|
if (tag)
|
|
37
37
|
params.set('tag', tag);
|
|
@@ -44,7 +44,7 @@ async function searchTeams(query, tag) {
|
|
|
44
44
|
const data = (await res.json());
|
|
45
45
|
return data.results;
|
|
46
46
|
}
|
|
47
|
-
async function
|
|
47
|
+
async function fetchAgentVersions(slug) {
|
|
48
48
|
const registrySlug = slug.startsWith('@') ? slug.slice(1) : slug;
|
|
49
49
|
const url = `${config_js_1.API_URL}/api/registry/${registrySlug}/versions`;
|
|
50
50
|
const res = await fetch(url);
|
|
@@ -54,8 +54,8 @@ async function fetchTeamVersions(slug) {
|
|
|
54
54
|
}
|
|
55
55
|
return res.json();
|
|
56
56
|
}
|
|
57
|
-
async function reportInstall(
|
|
58
|
-
const url = `${config_js_1.API_URL}/api/
|
|
57
|
+
async function reportInstall(agentId, slug, version) {
|
|
58
|
+
const url = `${config_js_1.API_URL}/api/agents/${agentId}/install`;
|
|
59
59
|
const headers = { 'Content-Type': 'application/json' };
|
|
60
60
|
const body = { slug };
|
|
61
61
|
if (version)
|
|
@@ -88,13 +88,13 @@ async function resolveSlugFromServer(name) {
|
|
|
88
88
|
const data = (await res.json());
|
|
89
89
|
return data.results;
|
|
90
90
|
}
|
|
91
|
-
async function sendUsagePing(
|
|
91
|
+
async function sendUsagePing(agentId, slug, version) {
|
|
92
92
|
const { createHash } = await import('crypto');
|
|
93
93
|
const { hostname, userInfo } = await import('os');
|
|
94
94
|
const deviceHash = createHash('sha256')
|
|
95
95
|
.update(`${hostname()}:${userInfo().username}`)
|
|
96
96
|
.digest('hex');
|
|
97
|
-
const url = `${config_js_1.API_URL}/api/
|
|
97
|
+
const url = `${config_js_1.API_URL}/api/agents/${agentId}/ping`;
|
|
98
98
|
const payload = { device_hash: deviceHash, slug };
|
|
99
99
|
if (version)
|
|
100
100
|
payload.installed_version = version;
|