@sunasteriskrnd/takumi 1.0.0-dev.31 → 1.0.0-dev.32
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 +16 -4
- 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.32",
|
|
19819
19819
|
description: "CLI tool for bootstrapping and managing Takumi projects",
|
|
19820
19820
|
type: "module",
|
|
19821
19821
|
repository: {
|
|
@@ -22283,6 +22283,7 @@ var init_commands = __esm(() => {
|
|
|
22283
22283
|
fresh: exports_external.boolean().default(false),
|
|
22284
22284
|
force: exports_external.boolean().default(false),
|
|
22285
22285
|
installSkills: exports_external.boolean().default(false),
|
|
22286
|
+
installHooks: exports_external.boolean().default(false),
|
|
22286
22287
|
withSudo: exports_external.boolean().default(false),
|
|
22287
22288
|
prefix: exports_external.boolean().default(false),
|
|
22288
22289
|
beta: exports_external.boolean().default(false),
|
|
@@ -66467,6 +66468,12 @@ var AGENT_DISPLAY3 = {
|
|
|
66467
66468
|
claude: "Claude Code",
|
|
66468
66469
|
codex: "Codex"
|
|
66469
66470
|
};
|
|
66471
|
+
function selectHandlersForInstall(categories) {
|
|
66472
|
+
if (!categories)
|
|
66473
|
+
return HOOK_HANDLERS;
|
|
66474
|
+
const wanted = new Set(categories);
|
|
66475
|
+
return HOOK_HANDLERS.filter((h2) => wanted.has(h2.category));
|
|
66476
|
+
}
|
|
66470
66477
|
function countEntries(section) {
|
|
66471
66478
|
let count = 0;
|
|
66472
66479
|
for (const groups of Object.values(section)) {
|
|
@@ -66483,7 +66490,7 @@ async function installForAgent(agent, options2, interactive, useStepUI) {
|
|
|
66483
66490
|
const section = buildHookSection(agent, options2.bin, {
|
|
66484
66491
|
noDetach: options2.noDetach,
|
|
66485
66492
|
debug: options2.debug
|
|
66486
|
-
});
|
|
66493
|
+
}, selectHandlersForInstall(options2.categories));
|
|
66487
66494
|
const entriesPlanned = countEntries(section);
|
|
66488
66495
|
const result = await writeSettingsWithConfirm({
|
|
66489
66496
|
path: location2.realPath,
|
|
@@ -67952,6 +67959,7 @@ function createInitContext(rawOptions, prompts) {
|
|
|
67952
67959
|
exclude: [],
|
|
67953
67960
|
only: [],
|
|
67954
67961
|
installSkills: false,
|
|
67962
|
+
installHooks: false,
|
|
67955
67963
|
withSudo: false,
|
|
67956
67964
|
forceOverwrite: false,
|
|
67957
67965
|
forceOverwriteSettings: false,
|
|
@@ -72669,6 +72677,7 @@ async function resolveOptions(ctx) {
|
|
|
72669
72677
|
docsDir: parsed.docsDir,
|
|
72670
72678
|
plansDir: parsed.plansDir,
|
|
72671
72679
|
installSkills: parsed.installSkills ?? false,
|
|
72680
|
+
installHooks: parsed.installHooks ?? false,
|
|
72672
72681
|
withSudo: parsed.withSudo ?? false,
|
|
72673
72682
|
forceOverwrite: parsed.forceOverwrite ?? false,
|
|
72674
72683
|
forceOverwriteSettings: parsed.forceOverwriteSettings ?? false,
|
|
@@ -75020,6 +75029,7 @@ function mapAgentToHookAgent(agent) {
|
|
|
75020
75029
|
return null;
|
|
75021
75030
|
}
|
|
75022
75031
|
async function installTkmHooksForAgents(targetAgents2, options2) {
|
|
75032
|
+
const categories = options2.installHooks ? undefined : ["metrics"];
|
|
75023
75033
|
for (const agent of targetAgents2) {
|
|
75024
75034
|
const hookAgent = mapAgentToHookAgent(agent);
|
|
75025
75035
|
if (!hookAgent)
|
|
@@ -75029,6 +75039,7 @@ async function installTkmHooksForAgents(targetAgents2, options2) {
|
|
|
75029
75039
|
agent: hookAgent,
|
|
75030
75040
|
global: options2.global,
|
|
75031
75041
|
dryRun: options2.dryRun,
|
|
75042
|
+
categories,
|
|
75032
75043
|
yes: true
|
|
75033
75044
|
});
|
|
75034
75045
|
} catch (err) {
|
|
@@ -75148,7 +75159,8 @@ async function executeInit(options2, prompts) {
|
|
|
75148
75159
|
if (!isSyncMode) {
|
|
75149
75160
|
await installTkmHooksForAgents(targetAgents2, {
|
|
75150
75161
|
global: Boolean(ctx.options.global),
|
|
75151
|
-
dryRun: Boolean(ctx.options.dryRun)
|
|
75162
|
+
dryRun: Boolean(ctx.options.dryRun),
|
|
75163
|
+
installHooks: Boolean(ctx.options.installHooks)
|
|
75152
75164
|
});
|
|
75153
75165
|
}
|
|
75154
75166
|
if (targetAgents2.length > 1) {
|
|
@@ -77525,7 +77537,7 @@ ${import_picocolors29.default.bold(import_picocolors29.default.cyan(result.kitCo
|
|
|
77525
77537
|
// src/cli/command-registry.ts
|
|
77526
77538
|
init_logger();
|
|
77527
77539
|
function registerCommands(cli) {
|
|
77528
|
-
cli.command("init", "Initialize or update Takumi project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit(s) to install (core, extras). Repeat the flag to install multiple kits, e.g. --kit core --kit extras.").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--only <pattern>", "Include only files matching glob pattern (can be used multiple times)").option("-g, --global", "Use platform-specific user configuration directory").option("--fresh", "Full reset: remove SK files, replace settings.json and CLAUDE.md, reinstall from scratch").option("--force", "Force reinstall even if already at latest version (use with --yes; re-onboards missing files without full reset)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--with-sudo", "Include system packages requiring sudo (Linux: ffmpeg, imagemagick)").option("--prefix", "Add /sk: prefix to all slash commands by moving them to commands/sk/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").option("--dry-run", "Preview changes without applying them (requires --prefix)").option("--force-overwrite", "Override ownership protections and delete user-modified files (requires --prefix)").option("--force-overwrite-settings", "Fully replace settings.json instead of selective merge (destroys user customizations)").option("--docs-dir <name>", "Custom docs folder name (default: docs)").option("--plans-dir <name>", "Custom plans folder name (default: plans)").option("-y, --yes", "Non-interactive mode with sensible defaults (skip all prompts)").option("--sync", "Sync config files from upstream with interactive hunk-by-hunk merge").option("--use-git", "Use git clone instead of GitHub API (uses SSH/HTTPS credentials)").option("--archive <path>", "Use local archive file instead of downloading (zip/tar.gz)").option("--kit-path <path>", "Use local kit directory instead of downloading").option("--local", "Use local monorepo as kit source (auto-detects from CLI location)").option("--use-gh", "Force GitHub release source (bypass Worker R2 proxy; default uses Worker)").option("-a, --agent <agents...>", "Target agents (claude-code, codex). Default: claude-code").action(async (options2) => {
|
|
77540
|
+
cli.command("init", "Initialize or update Takumi project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit(s) to install (core, extras). Repeat the flag to install multiple kits, e.g. --kit core --kit extras.").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--only <pattern>", "Include only files matching glob pattern (can be used multiple times)").option("-g, --global", "Use platform-specific user configuration directory").option("--fresh", "Full reset: remove SK files, replace settings.json and CLAUDE.md, reinstall from scratch").option("--force", "Force reinstall even if already at latest version (use with --yes; re-onboards missing files without full reset)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--install-hooks", "Install all agent hooks (guard, session, convention, extension). Default installs only telemetry hooks.").option("--with-sudo", "Include system packages requiring sudo (Linux: ffmpeg, imagemagick)").option("--prefix", "Add /sk: prefix to all slash commands by moving them to commands/sk/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").option("--dry-run", "Preview changes without applying them (requires --prefix)").option("--force-overwrite", "Override ownership protections and delete user-modified files (requires --prefix)").option("--force-overwrite-settings", "Fully replace settings.json instead of selective merge (destroys user customizations)").option("--docs-dir <name>", "Custom docs folder name (default: docs)").option("--plans-dir <name>", "Custom plans folder name (default: plans)").option("-y, --yes", "Non-interactive mode with sensible defaults (skip all prompts)").option("--sync", "Sync config files from upstream with interactive hunk-by-hunk merge").option("--use-git", "Use git clone instead of GitHub API (uses SSH/HTTPS credentials)").option("--archive <path>", "Use local archive file instead of downloading (zip/tar.gz)").option("--kit-path <path>", "Use local kit directory instead of downloading").option("--local", "Use local monorepo as kit source (auto-detects from CLI location)").option("--use-gh", "Force GitHub release source (bypass Worker R2 proxy; default uses Worker)").option("-a, --agent <agents...>", "Target agents (claude-code, codex). Default: claude-code").action(async (options2) => {
|
|
77529
77541
|
if (options2.exclude && !Array.isArray(options2.exclude)) {
|
|
77530
77542
|
options2.exclude = [options2.exclude];
|
|
77531
77543
|
}
|