relayax-cli 0.4.26 → 0.4.27

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.
@@ -315,18 +315,6 @@ function registerPackage(program) {
315
315
  });
316
316
  }
317
317
  }
318
- // 마운트 경로 스캔 (Cowork/sandbox 환경)
319
- for (const { tool, basePath } of (0, ai_tools_js_1.detectMountedCLIs)()) {
320
- const items = (0, ai_tools_js_1.scanMountedItems)(basePath, tool);
321
- if (items.length > 0) {
322
- sources.push({
323
- path: `${basePath}/${tool.skillsDir}`,
324
- location: 'global',
325
- name: `${tool.name} (mounted)`,
326
- items,
327
- });
328
- }
329
- }
330
318
  // ~/.relay/agents/ 에 기존 에이전트 패키지가 있는지 스캔
331
319
  const globalAgentsDir = path_1.default.join(homeDir ?? os_1.default.homedir(), '.relay', 'agents');
332
320
  const existingAgents = [];
@@ -15,7 +15,6 @@ const paths_js_1 = require("../lib/paths.js");
15
15
  const error_report_js_1 = require("../lib/error-report.js");
16
16
  const step_tracker_js_1 = require("../lib/step-tracker.js");
17
17
  const git_operations_js_1 = require("../lib/git-operations.js");
18
- // GUIDE_INSTRUCTION removed — share text now uses npx install command directly
19
18
  // eslint-disable-next-line @typescript-eslint/no-var-requires
20
19
  const cliPkg = require('../../package.json');
21
20
  const VALID_DIRS = ['skills', 'agents', 'rules', 'commands', 'bin'];
@@ -700,12 +699,6 @@ function registerPublish(program) {
700
699
  if (!json) {
701
700
  console.error(`패키지 생성 중... (${config.name} v${config.version})`);
702
701
  }
703
- // GUIDE.html deprecation warning
704
- if (fs_1.default.existsSync(path_1.default.join(relayDir, 'GUIDE.html'))) {
705
- console.error('\x1b[33m⚠ GUIDE.html은 더 이상 지원되지 않습니다. 상세페이지가 가이드 역할을 합니다.\x1b[0m');
706
- console.error(' long_description을 활용하거나 relayax.com에서 에이전트 정보를 편집하세요.\n');
707
- }
708
- // guide.md는 웹 API route에서 동적 생성 (/api/registry/{owner}/{slug}/guide.md)
709
702
  // Generate bin/relay-preamble.sh (self-contained tracking + update check)
710
703
  (0, preamble_js_1.generatePreambleBin)(relayDir, config.slug, config_js_1.API_URL);
711
704
  // Generate entry command (commands/{author}-{name}.md)
@@ -12,18 +12,6 @@ export declare const AI_TOOLS: AITool[];
12
12
  * 프로젝트 디렉토리에서 에이전트 CLI 디렉토리를 감지한다.
13
13
  */
14
14
  export declare function detectAgentCLIs(projectPath: string): AITool[];
15
- /**
16
- * Cowork/sandbox 환경의 마운트 경로 후보를 반환한다.
17
- * /sessions/<id>/mnt/ 같은 경로에 실제 파일이 마운트됨.
18
- */
19
- export declare function detectMountPaths(): string[];
20
- /**
21
- * 마운트 경로에서 에이전트 CLI 디렉토리를 감지한다.
22
- */
23
- export declare function detectMountedCLIs(): {
24
- tool: AITool;
25
- basePath: string;
26
- }[];
27
15
  /**
28
16
  * 홈 디렉토리에서 글로벌 에이전트 CLI 디렉토리를 감지한다.
29
17
  * ~/{skillsDir}/ 가 존재하는 CLI를 반환.
@@ -44,7 +32,3 @@ export declare function scanLocalItems(projectPath: string, tool: AITool): Conte
44
32
  * 글로벌 홈 디렉토리 소스의 개별 스킬/에이전트/커맨드/룰 항목을 반환한다.
45
33
  */
46
34
  export declare function scanGlobalItems(tool: AITool, home?: string): ContentItem[];
47
- /**
48
- * 마운트 경로의 개별 스킬/에이전트/커맨드/룰 항목을 반환한다.
49
- */
50
- export declare function scanMountedItems(basePath: string, tool: AITool): ContentItem[];
@@ -5,12 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AI_TOOLS = void 0;
7
7
  exports.detectAgentCLIs = detectAgentCLIs;
8
- exports.detectMountPaths = detectMountPaths;
9
- exports.detectMountedCLIs = detectMountedCLIs;
10
8
  exports.detectGlobalCLIs = detectGlobalCLIs;
11
9
  exports.scanLocalItems = scanLocalItems;
12
10
  exports.scanGlobalItems = scanGlobalItems;
13
- exports.scanMountedItems = scanMountedItems;
14
11
  const fs_1 = __importDefault(require("fs"));
15
12
  const os_1 = __importDefault(require("os"));
16
13
  const path_1 = __importDefault(require("path"));
@@ -52,31 +49,6 @@ exports.AI_TOOLS = [
52
49
  function detectAgentCLIs(projectPath) {
53
50
  return exports.AI_TOOLS.filter((tool) => fs_1.default.existsSync(path_1.default.join(projectPath, tool.skillsDir)));
54
51
  }
55
- /**
56
- * Cowork/sandbox 환경의 마운트 경로 후보를 반환한다.
57
- * /sessions/<id>/mnt/ 같은 경로에 실제 파일이 마운트됨.
58
- */
59
- function detectMountPaths() {
60
- const home = os_1.default.homedir();
61
- const mntPath = path_1.default.join(home, 'mnt');
62
- if (!fs_1.default.existsSync(mntPath))
63
- return [];
64
- return [mntPath];
65
- }
66
- /**
67
- * 마운트 경로에서 에이전트 CLI 디렉토리를 감지한다.
68
- */
69
- function detectMountedCLIs() {
70
- const results = [];
71
- for (const mnt of detectMountPaths()) {
72
- for (const tool of exports.AI_TOOLS) {
73
- if (fs_1.default.existsSync(path_1.default.join(mnt, tool.skillsDir))) {
74
- results.push({ tool, basePath: mnt });
75
- }
76
- }
77
- }
78
- return results;
79
- }
80
52
  /**
81
53
  * 홈 디렉토리에서 글로벌 에이전트 CLI 디렉토리를 감지한다.
82
54
  * ~/{skillsDir}/ 가 존재하는 CLI를 반환.
@@ -130,9 +102,3 @@ function scanGlobalItems(tool, home) {
130
102
  const basePath = path_1.default.join(home ?? os_1.default.homedir(), tool.skillsDir);
131
103
  return scanItemsIn(basePath);
132
104
  }
133
- /**
134
- * 마운트 경로의 개별 스킬/에이전트/커맨드/룰 항목을 반환한다.
135
- */
136
- function scanMountedItems(basePath, tool) {
137
- return scanItemsIn(path_1.default.join(basePath, tool.skillsDir));
138
- }
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * bin/relay-preamble.sh 스크립트를 생성한다.
3
- * relay CLI가 있으면 사용, 없으면 curl fallback.
3
+ * bash 실행 가능 환경을 전제로, relay CLI를 직접 호출한다.
4
4
  */
5
- export declare function generatePreambleScript(slug: string, apiUrl: string): string;
5
+ export declare function generatePreambleScript(slug: string, _apiUrl: string): string;
6
6
  /**
7
7
  * SKILL.md / command에 삽입할 preamble 마크다운.
8
8
  * agentDir: 설치된 에이전트의 절대 경로 (install 시점에 결정)
@@ -14,54 +14,16 @@ const PREAMBLE_START = '<!-- RELAY_PREAMBLE_START - DO NOT EDIT -->';
14
14
  const PREAMBLE_END = '<!-- RELAY_PREAMBLE_END -->';
15
15
  /**
16
16
  * bin/relay-preamble.sh 스크립트를 생성한다.
17
- * relay CLI가 있으면 사용, 없으면 curl fallback.
17
+ * bash 실행 가능 환경을 전제로, relay CLI를 직접 호출한다.
18
18
  */
19
- function generatePreambleScript(slug, apiUrl) {
20
- // slug format: @owner/agent → extract agent slug for ping
21
- const stripped = slug.startsWith('@') ? slug.slice(1) : slug;
22
- const slashIdx = stripped.indexOf('/');
23
- const agentSlug = slashIdx !== -1 ? stripped.slice(slashIdx + 1) : stripped;
19
+ function generatePreambleScript(slug, _apiUrl) {
24
20
  return `#!/usr/bin/env bash
25
21
  # relay-preamble.sh — auto-generated by relay publish
26
22
  set +e
27
23
 
28
- # Device hash (shasum → sha256sum → openssl fallback)
29
- _RAW="$(hostname):$(whoami)"
30
- if command -v shasum &>/dev/null; then
31
- DEVICE_HASH=$(printf '%s' "$_RAW" | shasum -a 256 | cut -d' ' -f1)
32
- elif command -v sha256sum &>/dev/null; then
33
- DEVICE_HASH=$(printf '%s' "$_RAW" | sha256sum | cut -d' ' -f1)
34
- elif command -v openssl &>/dev/null; then
35
- DEVICE_HASH=$(printf '%s' "$_RAW" | openssl dgst -sha256 | awk '{print $NF}')
36
- else
37
- DEVICE_HASH="unknown"
38
- fi
39
-
40
- # Read relay token (for user identification in usage ping)
41
- _RELAY_TOKEN=""
42
- if [ -f "$HOME/.relay/token.json" ]; then
43
- _RELAY_TOKEN=$(grep -o '"access_token":"[^"]*"' "$HOME/.relay/token.json" 2>/dev/null | head -1 | cut -d'"' -f4)
44
- fi
45
-
46
- # CLI version (for usage tracking)
47
- _CLI_VERSION=""
48
- if command -v relay &>/dev/null; then
49
- _CLI_VERSION=$(relay --version 2>/dev/null | head -1 | grep -o '[0-9][0-9.]*' || true)
50
- fi
51
-
52
- # Usage ping (with user identity if logged in)
24
+ # Usage ping (background, non-blocking)
53
25
  if command -v relay &>/dev/null; then
54
26
  relay ping "${slug}" --quiet 2>/dev/null &
55
- elif command -v curl &>/dev/null; then
56
- _AUTH_HEADER=""
57
- [ -n "$_RELAY_TOKEN" ] && _AUTH_HEADER="-H \\"Authorization: Bearer $_RELAY_TOKEN\\""
58
- _CLI_VER_FIELD=""
59
- [ -n "$_CLI_VERSION" ] && _CLI_VER_FIELD=",\\"cli_version\\":\\"$_CLI_VERSION\\""
60
- eval curl -sf --max-time 5 -X POST "${apiUrl}/api/agents/${agentSlug}/ping" \\
61
- -H "Content-Type: application/json" \\
62
- $_AUTH_HEADER \\
63
- -d "{\\"device_hash\\":\\"$DEVICE_HASH\\",\\"slug\\":\\"${slug}\\"$_CLI_VER_FIELD}" \\
64
- 2>/dev/null &
65
27
  fi
66
28
 
67
29
  # Update check (already 24h cached by relay CLI)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relayax-cli",
3
- "version": "0.4.26",
3
+ "version": "0.4.27",
4
4
  "description": "RelayAX Agent Team Marketplace CLI - Install and manage agent teams",
5
5
  "main": "dist/index.js",
6
6
  "bin": {