relayax-cli 0.2.22 → 0.2.24

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.
@@ -5,7 +5,9 @@ export declare function generatePreamble(slug: string): string;
5
5
  */
6
6
  export declare function injectPreamble(filePath: string, slug: string): void;
7
7
  /**
8
- * 팀의 루트 SKILL.md와 commands/*.md에 preamble을 주입한다.
9
- * 서브 스킬의 SKILL.md는 건드리지 않는다 (frontmatter 검색에 영향).
8
+ * 팀의 사용자 진입점 파일에 preamble을 주입한다.
9
+ * - 루트 SKILL.md
10
+ * - user-invocable: true인 서브 스킬 SKILL.md
11
+ * - commands/*.md
10
12
  */
11
13
  export declare function injectPreambleToTeam(teamDir: string, slug: string): number;
@@ -54,18 +54,40 @@ function injectPreamble(filePath, slug) {
54
54
  fs_1.default.writeFileSync(filePath, cleaned);
55
55
  }
56
56
  /**
57
- * 팀의 루트 SKILL.md와 commands/*.md에 preamble을 주입한다.
58
- * 서브 스킬의 SKILL.md는 건드리지 않는다 (frontmatter 검색에 영향).
57
+ * 팀의 사용자 진입점 파일에 preamble을 주입한다.
58
+ * - 루트 SKILL.md
59
+ * - user-invocable: true인 서브 스킬 SKILL.md
60
+ * - commands/*.md
59
61
  */
60
62
  function injectPreambleToTeam(teamDir, slug) {
61
63
  let count = 0;
62
- // 1. 루트 SKILL.md (skills/<slug>/SKILL.md 레벨)
64
+ // 1. 루트 SKILL.md
63
65
  const rootSkill = path_1.default.join(teamDir, 'SKILL.md');
64
66
  if (fs_1.default.existsSync(rootSkill)) {
65
67
  injectPreamble(rootSkill, slug);
66
68
  count++;
67
69
  }
68
- // 2. commands/*.md
70
+ // 2. user-invocable 서브 스킬 SKILL.md만 (skills/**/SKILL.md)
71
+ const skillsDir = path_1.default.join(teamDir, 'skills');
72
+ if (fs_1.default.existsSync(skillsDir)) {
73
+ function walkSkills(dir) {
74
+ for (const entry of fs_1.default.readdirSync(dir, { withFileTypes: true })) {
75
+ const fullPath = path_1.default.join(dir, entry.name);
76
+ if (entry.isDirectory()) {
77
+ walkSkills(fullPath);
78
+ }
79
+ else if (entry.name === 'SKILL.md') {
80
+ const content = fs_1.default.readFileSync(fullPath, 'utf-8');
81
+ if (/user-invocable:\s*true/i.test(content)) {
82
+ injectPreamble(fullPath, slug);
83
+ count++;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ walkSkills(skillsDir);
89
+ }
90
+ // 3. commands/*.md
69
91
  const commandsDir = path_1.default.join(teamDir, 'commands');
70
92
  if (fs_1.default.existsSync(commandsDir)) {
71
93
  for (const entry of fs_1.default.readdirSync(commandsDir, { withFileTypes: true })) {
@@ -17,8 +17,3 @@ export declare function isSimpleSlug(input: string): boolean;
17
17
  * 단순 slug는 서버에 resolve를 요청한다.
18
18
  */
19
19
  export declare function resolveSlug(input: string): Promise<ParsedSlug>;
20
- /**
21
- * installed.json에서 단순 slug로 매칭되는 scoped 키를 찾는다.
22
- * 네트워크 없이 로컬에서만 동작.
23
- */
24
- export declare function findInstalledByName(installed: Record<string, unknown>, name: string): string | null;
package/dist/lib/slug.js CHANGED
@@ -4,7 +4,6 @@ exports.parseSlug = parseSlug;
4
4
  exports.isScopedSlug = isScopedSlug;
5
5
  exports.isSimpleSlug = isSimpleSlug;
6
6
  exports.resolveSlug = resolveSlug;
7
- exports.findInstalledByName = findInstalledByName;
8
7
  const api_js_1 = require("./api.js");
9
8
  const SCOPED_SLUG_RE = /^@([a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\/([a-z0-9](?:[a-z0-9-]*[a-z0-9])?)$/;
10
9
  const SIMPLE_SLUG_RE = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
@@ -52,20 +51,3 @@ async function resolveSlug(input) {
52
51
  const list = results.map((r) => ` ${r.full}`).join('\n');
53
52
  throw new Error(`'${input}'에 해당하는 팀이 여러 개입니다. 전체 slug를 지정해주세요:\n${list}`);
54
53
  }
55
- /**
56
- * installed.json에서 단순 slug로 매칭되는 scoped 키를 찾는다.
57
- * 네트워크 없이 로컬에서만 동작.
58
- */
59
- function findInstalledByName(installed, name) {
60
- // 정확한 키가 있으면 그대로 (하위 호환)
61
- if (name in installed)
62
- return name;
63
- // scoped 키 중 name 부분이 매칭되는 것 찾기
64
- const matches = Object.keys(installed).filter((key) => {
65
- const parsed = parseSlug(key);
66
- return parsed && parsed.name === name;
67
- });
68
- if (matches.length === 1)
69
- return matches[0];
70
- return null;
71
- }
package/dist/types.d.ts CHANGED
@@ -10,6 +10,10 @@ export interface InstalledTeam {
10
10
  type?: 'team' | 'system';
11
11
  /** Space 소속 팀인 경우 Space slug */
12
12
  space_slug?: string;
13
+ /** 배치 범위 — 에이전트가 relay deploy-record로 기록 */
14
+ deploy_scope?: 'global' | 'local';
15
+ /** 배치된 파일 절대경로 목록 — 에이전트가 relay deploy-record로 기록 */
16
+ deployed_files?: string[];
13
17
  }
14
18
  /** 키는 scoped slug 포맷: "@owner/name" */
15
19
  export interface InstalledRegistry {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "relayax-cli",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "RelayAX Agent Team Marketplace CLI - Install and manage agent teams",
5
5
  "main": "dist/index.js",
6
6
  "bin": {