@taejung3852/project-scaffold 0.1.2 → 0.1.3
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/README.kr.md +1 -1
- package/README.md +1 -1
- package/lib/agents.js +53 -27
- package/package.json +1 -1
package/README.kr.md
CHANGED
|
@@ -181,7 +181,7 @@ npx @taejung3852/project-scaffold@latest agents
|
|
|
181
181
|
|
|
182
182
|
전체 목록과 실제 설치 경로는 위 명령으로 확인한다. `--agent all`과 `--agent '*'`도 지원한다.
|
|
183
183
|
|
|
184
|
-
CLI는 루트 `skills/{wiki,brief,review}`를 한 번 설치한 뒤 같은 경로를 사용하는 에이전트를 묶어서 상대 심링크를 생성한다. `--agent`를 생략하면 로컬 설치 흔적을 감지해 후보를 추천하고, 감지하지 못하면 범용
|
|
184
|
+
CLI는 루트 `skills/{wiki,brief,review}`를 한 번 설치한 뒤 같은 프로젝트 경로를 사용하는 에이전트를 묶어서 상대 심링크를 생성한다. 대화형 선택에서는 `.agents/skills/`를 사용하는 에이전트가 `universal` 공용 그룹 하나로 표시되고, 전용 프로젝트 경로가 필요한 에이전트만 별도 선택지로 표시된다. `--agent`를 생략하면 로컬 설치 흔적을 감지해 후보를 추천하고, 감지하지 못하면 범용 그룹을 기본값으로 사용한다. `claude`, `hermes`, `gemini`, `agy` 같은 별칭도 지원한다. Gemini CLI, Antigravity CLI, Antigravity 2.0은 제품 표면과 전역 스킬 경로가 다르므로 레지스트리에서는 별도 대상으로 유지한다.
|
|
185
185
|
|
|
186
186
|
## 설치되는 구조
|
|
187
187
|
|
package/README.md
CHANGED
|
@@ -181,7 +181,7 @@ npx @taejung3852/project-scaffold@latest agents
|
|
|
181
181
|
|
|
182
182
|
Use this command to see every ID and path. `--agent all` and `--agent '*'` are also supported.
|
|
183
183
|
|
|
184
|
-
The CLI installs canonical `skills/{wiki,brief,review}` once and deduplicates agents that share the same target directory. Without `--agent`, it recommends reliably detected local agents and falls back to universal
|
|
184
|
+
The CLI installs canonical `skills/{wiki,brief,review}` once and deduplicates agents that share the same target directory. In the interactive flow, agents that share `.agents/skills/` are selected as one `universal` group; only agents with dedicated project paths appear as separate options. Without `--agent`, it recommends reliably detected local agents and falls back to the universal group when none are found. Existing aliases such as `claude`, `hermes`, `gemini`, and `agy` remain supported. Google agents are kept as separate registry targets because Gemini CLI, Antigravity CLI, and Antigravity 2.0 use different product surfaces and global skill paths.
|
|
185
185
|
|
|
186
186
|
## Installed structure
|
|
187
187
|
|
package/lib/agents.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "@clack/prompts";
|
|
18
18
|
|
|
19
19
|
export const supportedAgents = supportedAgentIds;
|
|
20
|
+
const universalProjectSkillsDir = ".agents/skills";
|
|
20
21
|
|
|
21
22
|
function writeFileSafely(file, content, force, managedFiles) {
|
|
22
23
|
if (fs.existsSync(file) && !force) return false;
|
|
@@ -121,6 +122,53 @@ export function registryLines() {
|
|
|
121
122
|
return lines;
|
|
122
123
|
}
|
|
123
124
|
|
|
125
|
+
function isUniversalProjectAgent(agentId) {
|
|
126
|
+
return agentRegistry[agentId]?.projectSkillsDir === universalProjectSkillsDir;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const universalProjectAgents = supportedAgentIds.filter(isUniversalProjectAgent);
|
|
130
|
+
|
|
131
|
+
export function buildAgentSelectionOptions(detected = []) {
|
|
132
|
+
const detectedSet = new Set(detected);
|
|
133
|
+
const dedicatedAgents = supportedAgentIds.filter((agent) => !isUniversalProjectAgent(agent));
|
|
134
|
+
const universalNames = universalProjectAgents
|
|
135
|
+
.map((agent) => agentRegistry[agent]?.displayName ?? agent)
|
|
136
|
+
.filter(Boolean);
|
|
137
|
+
const previewNames = universalNames.slice(0, 4).join(", ");
|
|
138
|
+
|
|
139
|
+
return [
|
|
140
|
+
{
|
|
141
|
+
value: "all",
|
|
142
|
+
label: "모든 에이전트",
|
|
143
|
+
hint: `${supportedAgentIds.length}개 설치`,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
value: "universal",
|
|
147
|
+
label: "공용 Agent Skills",
|
|
148
|
+
hint: `${universalProjectSkillsDir} · ${previewNames} 등 ${universalNames.length}개`,
|
|
149
|
+
},
|
|
150
|
+
...dedicatedAgents.map((agent) => {
|
|
151
|
+
const entry = agentRegistry[agent];
|
|
152
|
+
return {
|
|
153
|
+
value: agent,
|
|
154
|
+
label: entry?.displayName ?? agent,
|
|
155
|
+
hint: detectedSet.has(agent)
|
|
156
|
+
? `감지됨 · ${entry?.projectSkillsDir ?? ""}`
|
|
157
|
+
: entry?.projectSkillsDir,
|
|
158
|
+
};
|
|
159
|
+
}),
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function buildAgentSelectionDefaults(detected = []) {
|
|
164
|
+
const detectedUniversal = detected.some(isUniversalProjectAgent);
|
|
165
|
+
const dedicatedDetected = detected.filter((agent) => !isUniversalProjectAgent(agent));
|
|
166
|
+
return [
|
|
167
|
+
...(detectedUniversal || detected.length === 0 ? ["universal"] : []),
|
|
168
|
+
...dedicatedDetected,
|
|
169
|
+
];
|
|
170
|
+
}
|
|
171
|
+
|
|
124
172
|
export async function chooseAgents(
|
|
125
173
|
values,
|
|
126
174
|
yes = false,
|
|
@@ -131,44 +179,22 @@ export async function chooseAgents(
|
|
|
131
179
|
}
|
|
132
180
|
|
|
133
181
|
const detected = detectAgents({ target });
|
|
134
|
-
const defaults = detected
|
|
182
|
+
const defaults = buildAgentSelectionDefaults(detected);
|
|
135
183
|
|
|
136
184
|
if (yes || !process.stdin.isTTY) {
|
|
137
185
|
return defaults;
|
|
138
186
|
}
|
|
139
187
|
|
|
140
188
|
if (detected.length > 0) {
|
|
141
|
-
|
|
189
|
+
const detectedLabels = detected.map((agent) => agentRegistry[agent]?.displayName ?? agent);
|
|
190
|
+
console.log(`\n감지된 에이전트: ${detectedLabels.join(", ")}`);
|
|
142
191
|
} else {
|
|
143
192
|
console.log("\n자동 감지된 에이전트가 없습니다.");
|
|
144
193
|
}
|
|
145
194
|
|
|
146
|
-
const orderedAgents = [
|
|
147
|
-
...defaults,
|
|
148
|
-
...supportedAgentIds.filter(
|
|
149
|
-
(agent) => !defaults.includes(agent),
|
|
150
|
-
),
|
|
151
|
-
];
|
|
152
|
-
|
|
153
195
|
const selected = await multiselect({
|
|
154
|
-
message: "설치할
|
|
155
|
-
options:
|
|
156
|
-
{
|
|
157
|
-
value: "all",
|
|
158
|
-
label: "모든 에이전트",
|
|
159
|
-
hint: `${supportedAgentIds.length}개 설치`,
|
|
160
|
-
},
|
|
161
|
-
...orderedAgents.map((agent) => {
|
|
162
|
-
const entry = agentRegistry[agent];
|
|
163
|
-
return {
|
|
164
|
-
value: agent,
|
|
165
|
-
label: entry?.displayName ?? agent,
|
|
166
|
-
hint: detected.includes(agent)
|
|
167
|
-
? `감지됨 · ${entry?.projectSkillsDir ?? ""}`
|
|
168
|
-
: entry?.projectSkillsDir,
|
|
169
|
-
};
|
|
170
|
-
}),
|
|
171
|
-
],
|
|
196
|
+
message: "설치할 스킬 경로를 선택하세요",
|
|
197
|
+
options: buildAgentSelectionOptions(detected),
|
|
172
198
|
initialValues: defaults,
|
|
173
199
|
required: true,
|
|
174
200
|
});
|