@sunasteriskrnd/takumi 1.0.0-dev.51 → 1.0.0-dev.52
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/index.js +41 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19815,7 +19815,7 @@ var package_default;
|
|
|
19815
19815
|
var init_package = __esm(() => {
|
|
19816
19816
|
package_default = {
|
|
19817
19817
|
name: "@sunasteriskrnd/takumi",
|
|
19818
|
-
version: "1.0.0-dev.
|
|
19818
|
+
version: "1.0.0-dev.52",
|
|
19819
19819
|
description: "CLI tool for bootstrapping and managing Takumi projects",
|
|
19820
19820
|
type: "module",
|
|
19821
19821
|
repository: {
|
|
@@ -20011,7 +20011,7 @@ function getLegacyManifestPath(providerRoot) {
|
|
|
20011
20011
|
return join4(providerRoot, LEGACY_MANIFEST_FILENAME);
|
|
20012
20012
|
}
|
|
20013
20013
|
function getCliVersion() {
|
|
20014
|
-
return "1.0.0-dev.
|
|
20014
|
+
return "1.0.0-dev.52"?.trim() || process.env.npm_package_version?.trim() || "unknown";
|
|
20015
20015
|
}
|
|
20016
20016
|
function getCliUserAgent() {
|
|
20017
20017
|
return `${TAKUMI_CLI_NPM_PACKAGE_NAME}/${getCliVersion()}`;
|
|
@@ -33292,7 +33292,10 @@ function stepLine(content) {
|
|
|
33292
33292
|
console.log(`${connector}${line}`);
|
|
33293
33293
|
}
|
|
33294
33294
|
}
|
|
33295
|
-
var import_picocolors11,
|
|
33295
|
+
var import_picocolors11, MULTISELECT_HINT = "(Space to select, Enter to confirm)", multiselect = (opts) => ae({
|
|
33296
|
+
...opts,
|
|
33297
|
+
message: `${opts.message} ${import_picocolors11.default.yellow(MULTISELECT_HINT)}`
|
|
33298
|
+
}), log;
|
|
33296
33299
|
var init_safe_prompts = __esm(() => {
|
|
33297
33300
|
init_dist2();
|
|
33298
33301
|
init_output_manager();
|
|
@@ -40028,9 +40031,17 @@ async function loadGroups(extractDir) {
|
|
|
40028
40031
|
}
|
|
40029
40032
|
async function listSkillGroups(extractDir) {
|
|
40030
40033
|
const groups = await loadGroups(extractDir);
|
|
40034
|
+
const roleCounts = {};
|
|
40035
|
+
for (const [name, skills] of groups.role)
|
|
40036
|
+
roleCounts[name] = skills.size;
|
|
40037
|
+
const categoryCounts = {};
|
|
40038
|
+
for (const [name, skills] of groups.category)
|
|
40039
|
+
categoryCounts[name] = skills.size;
|
|
40031
40040
|
return {
|
|
40032
40041
|
roles: [...groups.role.keys()].sort(),
|
|
40033
|
-
categories: [...groups.category.keys()].sort()
|
|
40042
|
+
categories: [...groups.category.keys()].sort(),
|
|
40043
|
+
roleCounts,
|
|
40044
|
+
categoryCounts
|
|
40034
40045
|
};
|
|
40035
40046
|
}
|
|
40036
40047
|
function isEmptyIntent(intent) {
|
|
@@ -77387,7 +77398,7 @@ async function promptHookAgentTargets(options2) {
|
|
|
77387
77398
|
label: AGENT_DISPLAY[row.agent],
|
|
77388
77399
|
hint: row.exists ? "settings file exists" : "settings file will be created"
|
|
77389
77400
|
}));
|
|
77390
|
-
const selected = await
|
|
77401
|
+
const selected = await multiselect({
|
|
77391
77402
|
message: "Select agent(s) to install hooks for",
|
|
77392
77403
|
options: opts,
|
|
77393
77404
|
required: true,
|
|
@@ -78421,7 +78432,7 @@ async function promptAgentSelection(supported) {
|
|
|
78421
78432
|
return { value: provider, label, hint };
|
|
78422
78433
|
});
|
|
78423
78434
|
const initialValues = computeInitialSelection(supported, detections);
|
|
78424
|
-
const selected = await
|
|
78435
|
+
const selected = await multiselect({
|
|
78425
78436
|
message: "Select agent(s) to initialize",
|
|
78426
78437
|
options: options2,
|
|
78427
78438
|
required: true,
|
|
@@ -78463,7 +78474,7 @@ async function selectKits(accessibleKits, defaults) {
|
|
|
78463
78474
|
};
|
|
78464
78475
|
});
|
|
78465
78476
|
const initialValues = defaults && defaults.length > 0 ? Array.from(new Set([BASE_KIT, ...defaults])).filter((k2) => kits.includes(k2)) : kits;
|
|
78466
|
-
const selected = await
|
|
78477
|
+
const selected = await multiselect({
|
|
78467
78478
|
message: "Select kit(s) to install:",
|
|
78468
78479
|
options: options2,
|
|
78469
78480
|
initialValues,
|
|
@@ -79138,6 +79149,11 @@ async function promptDirectorySelection(global3 = false) {
|
|
|
79138
79149
|
}
|
|
79139
79150
|
return selectedCategories;
|
|
79140
79151
|
}
|
|
79152
|
+
function skillCountHint(count) {
|
|
79153
|
+
if (count === undefined)
|
|
79154
|
+
return;
|
|
79155
|
+
return `${count} skill${count === 1 ? "" : "s"}`;
|
|
79156
|
+
}
|
|
79141
79157
|
function describeStoredGroups(sel) {
|
|
79142
79158
|
const parts = [];
|
|
79143
79159
|
if (sel.roles.length > 0)
|
|
@@ -79183,26 +79199,30 @@ async function promptSkillGroupSelection(groups, stored = []) {
|
|
|
79183
79199
|
if (mode === "all")
|
|
79184
79200
|
return { intent: null };
|
|
79185
79201
|
if (mode === "role") {
|
|
79186
|
-
const selected2 = await
|
|
79187
|
-
message: "Select role(s)
|
|
79188
|
-
options: groups.roles.map((r2) => ({
|
|
79189
|
-
|
|
79202
|
+
const selected2 = await multiselect({
|
|
79203
|
+
message: "Select role(s) to install:",
|
|
79204
|
+
options: groups.roles.map((r2) => ({
|
|
79205
|
+
value: r2,
|
|
79206
|
+
label: r2,
|
|
79207
|
+
hint: skillCountHint(groups.roleCounts?.[r2])
|
|
79208
|
+
})),
|
|
79209
|
+
required: true
|
|
79190
79210
|
});
|
|
79191
79211
|
if (lD(selected2))
|
|
79192
79212
|
return { cancelled: true };
|
|
79193
|
-
if (selected2.length === 0)
|
|
79194
|
-
return { intent: null };
|
|
79195
79213
|
return { intent: { roles: selected2, categories: [] } };
|
|
79196
79214
|
}
|
|
79197
|
-
const selected = await
|
|
79198
|
-
message: "Select categor(y/ies)
|
|
79199
|
-
options: groups.categories.map((c2) => ({
|
|
79200
|
-
|
|
79215
|
+
const selected = await multiselect({
|
|
79216
|
+
message: "Select categor(y/ies) to install:",
|
|
79217
|
+
options: groups.categories.map((c2) => ({
|
|
79218
|
+
value: c2,
|
|
79219
|
+
label: c2,
|
|
79220
|
+
hint: skillCountHint(groups.categoryCounts?.[c2])
|
|
79221
|
+
})),
|
|
79222
|
+
required: true
|
|
79201
79223
|
});
|
|
79202
79224
|
if (lD(selected))
|
|
79203
79225
|
return { cancelled: true };
|
|
79204
|
-
if (selected.length === 0)
|
|
79205
|
-
return { intent: null };
|
|
79206
79226
|
return { intent: { roles: [], categories: selected } };
|
|
79207
79227
|
}
|
|
79208
79228
|
async function promptFreshConfirmation(targetPath, analysis) {
|
|
@@ -86716,6 +86736,7 @@ init_logger();
|
|
|
86716
86736
|
// src/domains/mcp/mcp-service-core.ts
|
|
86717
86737
|
init_environment();
|
|
86718
86738
|
init_logger();
|
|
86739
|
+
init_safe_prompts();
|
|
86719
86740
|
init_dist2();
|
|
86720
86741
|
|
|
86721
86742
|
// src/domains/mcp/agent-detector.ts
|
|
@@ -87378,7 +87399,7 @@ async function selectAgents2(verb, entryName, candidates, opts) {
|
|
|
87378
87399
|
return candidates;
|
|
87379
87400
|
}
|
|
87380
87401
|
const preposition = verb === "add" ? "to" : "from";
|
|
87381
|
-
const selected = await
|
|
87402
|
+
const selected = await multiselect({
|
|
87382
87403
|
message: `Select agents to ${verb} "${entryName}" ${preposition}:`,
|
|
87383
87404
|
options: candidates.map((agent) => ({ value: agent, label: agent })),
|
|
87384
87405
|
initialValues: candidates,
|