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.
Files changed (58) hide show
  1. package/dist/commands/access.js +12 -12
  2. package/dist/commands/changelog.js +2 -2
  3. package/dist/commands/check-update.js +12 -12
  4. package/dist/commands/create.js +46 -19
  5. package/dist/commands/deploy-record.js +2 -2
  6. package/dist/commands/diff.js +2 -2
  7. package/dist/commands/grant.d.ts +33 -0
  8. package/dist/commands/grant.js +190 -0
  9. package/dist/commands/init.js +10 -10
  10. package/dist/commands/install.js +69 -68
  11. package/dist/commands/join.js +3 -3
  12. package/dist/commands/list.js +15 -15
  13. package/dist/commands/login.js +10 -3
  14. package/dist/commands/orgs.js +1 -1
  15. package/dist/commands/outdated.js +7 -7
  16. package/dist/commands/package.d.ts +18 -0
  17. package/dist/commands/package.js +355 -146
  18. package/dist/commands/ping.js +5 -5
  19. package/dist/commands/publish.d.ts +1 -1
  20. package/dist/commands/publish.js +56 -48
  21. package/dist/commands/search.js +2 -2
  22. package/dist/commands/status.js +11 -11
  23. package/dist/commands/uninstall.js +7 -7
  24. package/dist/commands/update.js +22 -22
  25. package/dist/commands/versions.js +2 -2
  26. package/dist/index.js +2 -0
  27. package/dist/lib/ai-tools.d.ts +15 -0
  28. package/dist/lib/ai-tools.js +48 -1
  29. package/dist/lib/api.d.ts +7 -7
  30. package/dist/lib/api.js +11 -11
  31. package/dist/lib/command-adapter.js +30 -682
  32. package/dist/lib/config.d.ts +1 -1
  33. package/dist/lib/config.js +2 -2
  34. package/dist/lib/guide.js +34 -79
  35. package/dist/lib/installer.d.ts +2 -2
  36. package/dist/lib/installer.js +4 -4
  37. package/dist/lib/preamble.d.ts +4 -4
  38. package/dist/lib/preamble.js +14 -14
  39. package/dist/lib/slug.d.ts +5 -0
  40. package/dist/lib/slug.js +49 -2
  41. package/dist/lib/update-cache.js +4 -4
  42. package/dist/lib/version-check.d.ts +3 -3
  43. package/dist/lib/version-check.js +13 -13
  44. package/dist/prompts/_business-card.md +41 -0
  45. package/dist/prompts/_error-handling.md +38 -0
  46. package/dist/prompts/_requirements-check.md +59 -0
  47. package/dist/prompts/_setup-cli.md +19 -0
  48. package/dist/prompts/_setup-login.md +7 -0
  49. package/dist/prompts/_setup-org.md +27 -0
  50. package/dist/prompts/business-card.md +41 -0
  51. package/dist/prompts/error-handling.md +38 -0
  52. package/dist/prompts/index.d.ts +7 -0
  53. package/dist/prompts/index.js +28 -0
  54. package/dist/prompts/install.md +187 -0
  55. package/dist/prompts/publish.md +444 -0
  56. package/dist/prompts/requirements-check.md +59 -0
  57. package/dist/types.d.ts +9 -9
  58. package/package.json +3 -3
package/dist/lib/api.d.ts CHANGED
@@ -1,24 +1,24 @@
1
- import type { TeamRegistryInfo, SearchResult } from '../types.js';
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 fetchTeamInfo(slug: string): Promise<TeamRegistryInfo>;
9
- export declare function searchTeams(query: string, tag?: string): Promise<SearchResult[]>;
10
- export interface TeamVersionInfo {
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 fetchTeamVersions(slug: string): Promise<TeamVersionInfo[]>;
16
- export declare function reportInstall(teamId: string, slug: string, version?: string): Promise<void>;
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(teamId: string, slug: string, version?: string): Promise<void>;
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.fetchTeamInfo = fetchTeamInfo;
5
- exports.searchTeams = searchTeams;
6
- exports.fetchTeamVersions = fetchTeamVersions;
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 fetchTeamInfo(slug) {
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(`팀 정보 조회 실패 (${res.status}): ${body}`);
30
+ throw new Error(`에이전트 정보 조회 실패 (${res.status}): ${body}`);
31
31
  }
32
32
  return res.json();
33
33
  }
34
- async function searchTeams(query, tag) {
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 fetchTeamVersions(slug) {
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(teamId, slug, version) {
58
- const url = `${config_js_1.API_URL}/api/teams/${teamId}/install`;
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(teamId, slug, version) {
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/teams/${teamId}/ping`;
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;