relayax-cli 0.2.39 → 0.2.41

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/lib/guide.js CHANGED
@@ -1,52 +1,144 @@
1
1
  "use strict";
2
- /**
3
- * GUIDE.html 생성 프롬프트 템플릿.
4
- * publish slash command에서 Claude Code가 이 프롬프트를 읽고 GUIDE.html을 생성한다.
5
- */
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.GUIDE_HTML_PROMPT = void 0;
8
- exports.GUIDE_HTML_PROMPT = `
9
- 당신은 에이전트 팀의 사용가이드(GUIDE.html)를 생성하는 에이전트입니다.
10
- 팀의 skills/, agents/, commands/ 파일을 분석한 결과를 바탕으로, 설치자가 읽을 수 있는 standalone HTML 파일을 생성하세요.
11
-
12
- ## 콘텐츠 구조 (순서대로)
13
-
14
- 1. **헤더**: 이름 + 한 줄 소개
15
- 2. **설치 방법 (준비하기)**:
16
- - Step 1: CLI 설치 — \`npm install -g relayax-cli\`
17
- - Step 2: 팀 설치 — \`relay install @owner/slug\` (실제 팀의 scoped slug 사용)
18
- - Step 3: 에이전트에 복사붙여넣기 — "사용하시는 AI 에이전트(Claude Code, Codex 등)의 채팅창에 아래 명령어를 붙여넣기 하세요!"
19
- 3. **안내 Callout**: 노란 배경 박스로 시작 방법 강조 — "채팅창에 '○○○'라고 입력하세요."
20
- 4. **워크플로우 요약**: 전체 흐름을 한 줄로 — \`[0 온보딩 1 분석 1.5 선택 2 추천 3 생성]\`
21
- 5. **파이프라인 다이어그램**: 2-column 세로 플로우차트
22
- - 왼쪽 컬럼: 파이프라인 단계 (노드 + 연결선, 세로 흐름)
23
- - 오른쪽 컬럼: 해당 단계에서 사용하는 skill 카드 (skill명 + 한 줄 설명)
24
- - 색상 구분: 유저 개입 단계 = 베이지/주황 톤, AI 자동 단계 = 연두/초록 톤
25
- - 상단에 범례: 유저 개입 / ■ 자동 실행
26
- - 선택적 단계(optional)는 점선 테두리 그룹으로 묶기
27
- 6. **단계별 상세 테이블**: 4-column 테이블
28
- - 컬럼: 단계 | skill명 | 액션 | 상세
29
- - 각 행에 역할 뱃지: "AI가 알아서 해줘요" (초록 배경) / "직접 아래 액션을 수행해주세요!" (주황 배경, 볼드)
30
- - 상세 컬럼에 bullet list로 구체적 동작 설명
31
- - 주의사항은 빨간 이탤릭 (*주의: ...)
32
- 7. **사전 준비사항**: 필요한 환경변수, 접근 권한, 데이터 등
33
- 8. **Q&A**: 접이식 토글(details/summary)로 자주 묻는 질문
34
- - 커스터마이징 방법 (개수 변경, 타입 고정 등)
35
- - 중단/재시작 방법
36
- - 데이터 형식 요구사항
37
-
38
- 파이프라인이 없는 단순한 팀은 시작 방법 + 기능 설명 + Q&A만 포함합니다.
39
-
40
- ## 디자인 규칙 (Notion 스타일)
41
-
42
- - **라이트 모드**: 배경 #ffffff / 부배경 #fafaf8, 텍스트 다크 #1a1a18
43
- - **레이아웃**: max-width 900px, padding 40px, Notion 문서형 넓은 여백
44
- - **타이포그래피**: system-ui, -apple-system, sans-serif. 본문 15px, line-height 1.7
45
- - **Callout 박스**: 노란 배경 #fffbeb + 좌측 보더 4px solid #fcd34d (중요 안내), 파란 배경 #eff6ff + 보더 #93c5fd (참고)
46
- - **역할 뱃지**: 둥근 모서리 pill, 초록 배경 #e0f5ea + 텍스트 #0d6b2e (AI) / 주황 배경 #fff0e0 + 텍스트 #b85a00 (유저)
47
- - **테이블**: 깔끔한 border #e8e8e4, hover 시 행 하이라이트 #f5f5f3, 헤더 회색 배경 #f5f5f3
48
- - **색상**: 유저 단계 = 베이지/주황 (#fff8f0, #f0c090), AI 단계 = 연두 (#f0faf4, #90d4a8)
49
- - **톤**: 따뜻하고 친근한 한국어, 이모지 적절히 활용
50
- - **반응형**: 600px 이하에서 테이블 가로스크롤, 다이어그램 단일 컬럼
51
- - **기술 제약**: standalone HTML, CSS는 style 태그 내, 외부 CDN/폰트 없음, JS 최소화 (details/summary만)
52
- `.trim();
3
+ exports.generateGuide = generateGuide;
4
+ function buildSetupSection(needsLogin) {
5
+ const installStep = `## Step 1. Relay CLI 설치
6
+
7
+ relay CLI가 설치되어 있지 않다면:
8
+
9
+ \`\`\`bash
10
+ npm install -g relayax-cli
11
+ \`\`\`
12
+
13
+ Node.js가 없는 경우:
14
+ - macOS: \`brew install node\`
15
+ - Windows: \`winget install OpenJS.NodeJS.LTS\`
16
+ - Linux: \`curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash && source ~/.bashrc && nvm install --lts\`
17
+
18
+ npm 권한 오류 시:
19
+ \`\`\`bash
20
+ mkdir -p ~/.npm-global && npm config set prefix '~/.npm-global'
21
+ echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc && source ~/.zshrc
22
+ npm install -g relayax-cli
23
+ \`\`\``;
24
+ if (!needsLogin)
25
+ return installStep;
26
+ return `${installStep}
27
+
28
+ ## Step 2. 로그인
29
+
30
+ \`\`\`bash
31
+ relay login
32
+ \`\`\`
33
+
34
+ 브라우저가 열리면 GitHub 또는 카카오 계정으로 로그인하세요.`;
35
+ }
36
+ function buildRequiresSection(requires) {
37
+ const sections = [];
38
+ if (requires.cli && requires.cli.length > 0) {
39
+ sections.push('### CLI 도구 설치\n');
40
+ for (const cli of requires.cli) {
41
+ const label = cli.required === false ? '(선택)' : '(필수)';
42
+ if (cli.install) {
43
+ sections.push(`- **${cli.name}** ${label}: \`${cli.install}\``);
44
+ }
45
+ else {
46
+ sections.push(`- **${cli.name}** ${label}: 설치 \`which ${cli.name}\`으로 확인`);
47
+ }
48
+ }
49
+ sections.push('');
50
+ }
51
+ if (requires.npm && requires.npm.length > 0) {
52
+ sections.push('### npm 패키지 설치\n');
53
+ sections.push('```bash');
54
+ const pkgNames = requires.npm.map((p) => typeof p === 'string' ? p : p.name);
55
+ sections.push(`npm install ${pkgNames.join(' ')}`);
56
+ sections.push('```\n');
57
+ }
58
+ if (requires.env && requires.env.length > 0) {
59
+ sections.push('### 환경변수 설정\n');
60
+ sections.push('```bash');
61
+ for (const env of requires.env) {
62
+ const label = env.required === false ? '# (선택)' : '# (필수)';
63
+ const desc = env.description ? ` — ${env.description}` : '';
64
+ sections.push(`${env.name}=your_value_here ${label}${desc}`);
65
+ }
66
+ sections.push('```\n');
67
+ }
68
+ if (requires.mcp && requires.mcp.length > 0) {
69
+ sections.push('### MCP 서버 설정\n');
70
+ for (const mcp of requires.mcp) {
71
+ sections.push(`**${mcp.name}:**`);
72
+ if (mcp.package)
73
+ sections.push(`- 패키지: \`${mcp.package}\``);
74
+ if (mcp.config) {
75
+ sections.push(`- 실행: \`${mcp.config.command}${mcp.config.args ? ' ' + mcp.config.args.join(' ') : ''}\``);
76
+ }
77
+ if (mcp.env && mcp.env.length > 0) {
78
+ sections.push(`- 필요한 환경변수: ${mcp.env.map((e) => `\`${e}\``).join(', ')}`);
79
+ }
80
+ sections.push('');
81
+ }
82
+ }
83
+ if (requires.teams && requires.teams.length > 0) {
84
+ sections.push('### 의존 팀 설치\n');
85
+ sections.push('```bash');
86
+ for (const team of requires.teams) {
87
+ sections.push(`relay install ${team}`);
88
+ }
89
+ sections.push('```\n');
90
+ }
91
+ if (requires.permissions && requires.permissions.length > 0) {
92
+ sections.push('### 권한 설정\n');
93
+ sections.push('아래 도구 사용을 허용해야 합니다:\n');
94
+ for (const perm of requires.permissions) {
95
+ sections.push(`- \`${perm}\``);
96
+ }
97
+ sections.push('');
98
+ }
99
+ if (sections.length === 0)
100
+ return '';
101
+ return '## Step 4. 환경 구성\n\n' + sections.join('\n');
102
+ }
103
+ function generateGuide(config, commands, requires) {
104
+ const scopedSlug = config.slug.startsWith('@') ? config.slug : `@${config.slug}`;
105
+ const needsLogin = config.visibility === 'private' || config.visibility === 'gated';
106
+ const setupSection = buildSetupSection(needsLogin);
107
+ const installStepNum = needsLogin ? 3 : 2;
108
+ const requiresSection = requires ? buildRequiresSection(requires) : '';
109
+ const requiresSectionFinal = requiresSection
110
+ ? requiresSection.replace('## Step 4.', `## Step ${installStepNum + 1}.`)
111
+ : '';
112
+ let usageHint = '';
113
+ if (commands.length > 0) {
114
+ usageHint = `## 사용법
115
+
116
+ 설치가 완료되면 아래 커맨드를 사용할 수 있습니다:
117
+
118
+ ${commands.map((cmd) => `- \`/${cmd.name}\`: ${cmd.description}`).join('\n')}
119
+
120
+ 원하는 작업을 말하거나 위 커맨드를 직접 실행하세요.
121
+ `;
122
+ }
123
+ return `# ${config.name} — 설치 가이드
124
+
125
+ > ${config.description}
126
+
127
+ 이 가이드는 [RelayAX](https://relayax.com)에서 자동 생성되었습니다.
128
+ 아래 단계를 순서대로 실행하면 Agent 팀이 설치됩니다.
129
+
130
+ ${setupSection}
131
+
132
+ ## Step ${installStepNum}. 팀 설치
133
+
134
+ \`\`\`bash
135
+ relay install ${scopedSlug}
136
+ \`\`\`
137
+
138
+ 설치 후 Agent가 자동으로 의존성을 확인하고 환경을 구성합니다.
139
+
140
+ ${requiresSectionFinal}${usageHint}---
141
+ *출처: https://relayax.com — Agent Team Marketplace*
142
+ *설치: \`relay install ${scopedSlug}\`*
143
+ `;
144
+ }
package/dist/types.d.ts CHANGED
@@ -51,7 +51,7 @@ export interface TeamRegistryInfo {
51
51
  tags?: string[];
52
52
  install_count?: number;
53
53
  requires?: Record<string, unknown>;
54
- visibility?: "public" | "private";
54
+ visibility?: "public" | "gated" | "private";
55
55
  welcome?: string | null;
56
56
  contact?: Record<string, string> | null;
57
57
  author?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relayax-cli",
3
- "version": "0.2.39",
3
+ "version": "0.2.41",
4
4
  "description": "RelayAX Agent Team Marketplace CLI - Install and manage agent teams",
5
5
  "main": "dist/index.js",
6
6
  "bin": {