relayax-cli 0.3.53 → 0.3.55

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.
@@ -17,6 +17,7 @@ const version_check_js_1 = require("../lib/version-check.js");
17
17
  const paths_js_1 = require("../lib/paths.js");
18
18
  const error_report_js_1 = require("../lib/error-report.js");
19
19
  const step_tracker_js_1 = require("../lib/step-tracker.js");
20
+ const index_js_1 = require("../prompts/index.js");
20
21
  // eslint-disable-next-line @typescript-eslint/no-var-requires
21
22
  const cliPkg = require('../../package.json');
22
23
  const VALID_DIRS = ['skills', 'agents', 'rules', 'commands', 'bin'];
@@ -705,11 +706,11 @@ function registerPublish(program) {
705
706
  : `https://relayax.com/api/registry/${detailSlug}/guide.md`;
706
707
  console.log(`\n \x1b[90m주변인에게 공유하세요:\x1b[0m\n`);
707
708
  console.log('```');
708
- console.log('아래 가이드를 읽고 그대로 따라해줘:');
709
+ console.log(index_js_1.GUIDE_INSTRUCTION);
709
710
  console.log(guideUrl);
710
711
  console.log('```');
711
- console.log(`\n \x1b[90mCLI 설치된 사용자용 (짧은 버전):\x1b[0m`);
712
- console.log(` /relay:relay-install ${result.slug}`);
712
+ console.log(`\n \x1b[90m이미 relay를 쓰는 사용자는 이렇게만 하면 됩니다:\x1b[0m`);
713
+ console.log(` /relay-install ${result.slug}`);
713
714
  if (config.visibility === 'private') {
714
715
  console.log(`\n \x1b[90mprivate 에이전트:\x1b[0m`);
715
716
  console.log(` 접근 링크를 생성한 뒤 guide.md?code={agent_code}로 공유하세요.`);
@@ -52,6 +52,33 @@ function countFiles(dir) {
52
52
  function jsonText(obj) {
53
53
  return { type: 'text', text: JSON.stringify(obj) };
54
54
  }
55
+ // 주요 도구 응답에 CLI 업데이트 경고를 병합하는 헬퍼
56
+ // MCP 서버 프로세스는 Claude 재시작 전까지 유지되므로, 응답에 버전 정보를 포함시켜
57
+ // 에이전트가 사용자에게 재시작을 안내할 수 있도록 한다.
58
+ let _cachedCliUpdate;
59
+ async function getCliUpdateWarning() {
60
+ if (_cachedCliUpdate === undefined) {
61
+ try {
62
+ const { checkCliVersion } = await import('../lib/version-check.js');
63
+ _cachedCliUpdate = await checkCliVersion(true);
64
+ }
65
+ catch {
66
+ _cachedCliUpdate = null;
67
+ }
68
+ }
69
+ if (!_cachedCliUpdate)
70
+ return null;
71
+ return {
72
+ cli_update: {
73
+ current: pkg.version,
74
+ latest: _cachedCliUpdate.latest,
75
+ message: `relay v${_cachedCliUpdate.latest}이 있습니다. npm update -g relayax-cli 후 Claude를 재시작해주세요.`,
76
+ },
77
+ };
78
+ }
79
+ function jsonTextWithUpdate(obj, update) {
80
+ return jsonText(update ? { ...obj, ...update } : obj);
81
+ }
55
82
  // ─── Server ───
56
83
  function createMcpServer() {
57
84
  const server = new mcp_js_1.McpServer({ name: 'relay', version: pkg.version }, { capabilities: { tools: {}, prompts: {} } });
@@ -97,7 +124,8 @@ function createMcpServer() {
97
124
  (0, config_js_1.saveInstalled)(installed);
98
125
  await (0, api_js_1.reportInstall)(agent.id, fullSlug, agent.version);
99
126
  (0, api_js_1.sendUsagePing)(agent.id, fullSlug, agent.version);
100
- return { content: [jsonText({ status: 'ok', agent: agent.name, slug: fullSlug, version: agent.version, files: countFiles(agentDir), install_path: agentDir })] };
127
+ const cliUpdate = await getCliUpdateWarning();
128
+ return { content: [jsonTextWithUpdate({ status: 'ok', agent: agent.name, slug: fullSlug, version: agent.version, files: countFiles(agentDir), install_path: agentDir }, cliUpdate)] };
101
129
  }
102
130
  finally {
103
131
  (0, storage_js_1.removeTempDir)(tempDir);
@@ -264,7 +292,8 @@ function createMcpServer() {
264
292
  cli_version: pkg.version,
265
293
  };
266
294
  const result = await publishToApi(token, tarPath, metadata);
267
- return { content: [jsonText(result)] };
295
+ const cliUpdate = await getCliUpdateWarning();
296
+ return { content: [jsonTextWithUpdate(result, cliUpdate)] };
268
297
  }
269
298
  finally {
270
299
  fs_1.default.unlinkSync(tarPath);
@@ -0,0 +1,2 @@
1
+ 아래 URL의 설치 가이드를 읽고 모든 단계를 순서대로 빠짐없이 실행해.
2
+ 가이드 내용을 임의로 수정하거나 건너뛰지 마:
@@ -39,7 +39,7 @@ cat ~/Library/Application\ Support/Claude/claude_desktop_config.json 2>/dev/null
39
39
  "mcpServers": {
40
40
  "relay": {
41
41
  "command": "npx",
42
- "args": ["relayax-cli", "mcp"]
42
+ "args": ["relayax-cli@latest", "mcp"]
43
43
  }
44
44
  }
45
45
  }
@@ -3,5 +3,6 @@ export declare const ERROR_HANDLING_GUIDE: string;
3
3
  export declare const SETUP_ENVIRONMENT: string;
4
4
  export declare const SETUP_CLI: string;
5
5
  export declare const SETUP_LOGIN: string;
6
+ export declare const GUIDE_INSTRUCTION: string;
6
7
  export declare const INSTALL_PROMPT: string;
7
8
  export declare const PUBLISH_PROMPT: string;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PUBLISH_PROMPT = exports.INSTALL_PROMPT = exports.SETUP_LOGIN = exports.SETUP_CLI = exports.SETUP_ENVIRONMENT = exports.ERROR_HANDLING_GUIDE = exports.REQUIREMENTS_CHECK = void 0;
6
+ exports.PUBLISH_PROMPT = exports.INSTALL_PROMPT = exports.GUIDE_INSTRUCTION = exports.SETUP_LOGIN = exports.SETUP_CLI = exports.SETUP_ENVIRONMENT = exports.ERROR_HANDLING_GUIDE = exports.REQUIREMENTS_CHECK = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  function readPrompt(filename) {
@@ -18,9 +18,11 @@ exports.ERROR_HANDLING_GUIDE = readPrompt('_error-handling.md');
18
18
  exports.SETUP_ENVIRONMENT = readPrompt('_setup-environment.md');
19
19
  exports.SETUP_CLI = readPrompt('_setup-cli.md');
20
20
  exports.SETUP_LOGIN = readPrompt('_setup-login.md');
21
+ exports.GUIDE_INSTRUCTION = readPrompt('_guide-instruction.md');
21
22
  const fragments = {
22
23
  REQUIREMENTS_CHECK: exports.REQUIREMENTS_CHECK,
23
24
  ERROR_HANDLING_GUIDE: exports.ERROR_HANDLING_GUIDE,
25
+ GUIDE_INSTRUCTION: exports.GUIDE_INSTRUCTION,
24
26
  };
25
27
  // ─── 전체 프롬프트 (조각 합성 완료) ───
26
28
  exports.INSTALL_PROMPT = interpolate(readPrompt('install.md'), fragments);
@@ -149,7 +149,7 @@ relay deploy-record <slug> --scope <global|local> --files <배치된_파일1> <
149
149
  ```
150
150
  주변인에게 공유하세요:
151
151
 
152
- 아래 가이드를 읽고 그대로 따라해줘:
152
+ {{GUIDE_INSTRUCTION}}
153
153
  https://relayax.com/api/registry/{owner}/{slug}/guide.md
154
154
  ```
155
155
 
@@ -406,14 +406,14 @@ requires: env 2개, cli 1개
406
406
  - `relay publish --json` 응답의 `access_code` 필드가 있으면 (internal agent) 가이드 URL에 `?code={access_code}` 포함:
407
407
 
408
408
  \`\`\`
409
- 아래 가이드를 읽고 그대로 따라해줘:
409
+ {{GUIDE_INSTRUCTION}}
410
410
  https://relayax.com/api/registry/{owner}/{slug}/guide.md?code={access_code}
411
411
  \`\`\`
412
412
 
413
413
  - `access_code`가 없으면 (public agent) code 파라미터 없이:
414
414
 
415
415
  \`\`\`
416
- 아래 가이드를 읽고 그대로 따라해줘:
416
+ {{GUIDE_INSTRUCTION}}
417
417
  https://relayax.com/api/registry/{owner}/{slug}/guide.md
418
418
  \`\`\`
419
419
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relayax-cli",
3
- "version": "0.3.53",
3
+ "version": "0.3.55",
4
4
  "description": "RelayAX Agent Team Marketplace CLI - Install and manage agent teams",
5
5
  "main": "dist/index.js",
6
6
  "bin": {