@sunasteriskrnd/takumi 1.0.0-dev.14 → 1.0.0-dev.15
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.md +7 -7
- package/dist/index.js +75 -54
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ Verify: `tkm --version`
|
|
|
35
35
|
tkm --help # All commands
|
|
36
36
|
tkm auth login # One-time login (default install path)
|
|
37
37
|
tkm new # Create new project (interactive)
|
|
38
|
-
tkm new --kit
|
|
38
|
+
tkm new --kit core # Create with specific kit
|
|
39
39
|
tkm init # Initialize/update in current project
|
|
40
40
|
tkm init -g -y # Global install, non-interactive
|
|
41
41
|
```
|
|
@@ -49,7 +49,7 @@ flow is still available via `--use-gh` for archived tags.
|
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
tkm new # Interactive
|
|
52
|
-
tkm new --dir my-project --kit
|
|
52
|
+
tkm new --dir my-project --kit core # With options
|
|
53
53
|
tkm new --archive ~/kit.zip # Offline install
|
|
54
54
|
tkm new --install-skills # Auto-install skill deps
|
|
55
55
|
tkm new --prefix # /tkm: namespace for commands
|
|
@@ -62,7 +62,7 @@ Run from project root:
|
|
|
62
62
|
```bash
|
|
63
63
|
tkm init # Interactive (claude-code default)
|
|
64
64
|
tkm init -y # Non-interactive, latest version
|
|
65
|
-
tkm init -g --kit
|
|
65
|
+
tkm init -g --kit core -y # Global install
|
|
66
66
|
tkm init --fresh # Clean reinstall (destructive)
|
|
67
67
|
tkm init --archive ~/kit.zip # Offline install
|
|
68
68
|
tkm init --local # From local monorepo (development)
|
|
@@ -91,7 +91,7 @@ tkm doctor --report # Shareable diagnostic report
|
|
|
91
91
|
### Install to Other Coding Agents
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
tkm init -a codex --kit
|
|
94
|
+
tkm init -a codex --kit core # Install for Codex
|
|
95
95
|
tkm init -a claude-code -a codex # Install for multiple agents
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -101,7 +101,7 @@ tkm init -a claude-code -a codex # Install for multiple agents
|
|
|
101
101
|
tkm versions # List available versions
|
|
102
102
|
tkm uninstall # Remove Takumi
|
|
103
103
|
tkm config get defaults.kit # Read config
|
|
104
|
-
tkm config set defaults.kit
|
|
104
|
+
tkm config set defaults.kit core # Write config
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
### Debugging
|
|
@@ -128,7 +128,7 @@ Global config stored in `~/.claude/.takumi.json`; project config at `<project>/.
|
|
|
128
128
|
|
|
129
129
|
```json
|
|
130
130
|
{
|
|
131
|
-
"defaults": { "kit": "
|
|
131
|
+
"defaults": { "kit": "core", "dir": "." }
|
|
132
132
|
}
|
|
133
133
|
```
|
|
134
134
|
|
|
@@ -140,7 +140,7 @@ Never overwritten during updates: `.env*`, `*.key`, `*.pem`, `node_modules/**`,
|
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
142
|
bun install # Install deps
|
|
143
|
-
bun run dev new --kit
|
|
143
|
+
bun run dev new --kit core # Run locally
|
|
144
144
|
bun test # Run tests (3600+ tests)
|
|
145
145
|
bun run lint:fix # Auto-fix lint
|
|
146
146
|
bun run typecheck # Type check
|
package/dist/index.js
CHANGED
|
@@ -19579,14 +19579,17 @@ function isSafeRelativeLayoutPath(value) {
|
|
|
19579
19579
|
return segments.every((segment) => segment.length > 0 && segment !== "." && segment !== "..");
|
|
19580
19580
|
}
|
|
19581
19581
|
function isValidKitType(value) {
|
|
19582
|
-
return value === "
|
|
19582
|
+
return value === "core" || value === "extras";
|
|
19583
19583
|
}
|
|
19584
|
-
|
|
19584
|
+
function backendIdOf(kitType) {
|
|
19585
|
+
return AVAILABLE_KITS[kitType].id;
|
|
19586
|
+
}
|
|
19587
|
+
var KitType, KitConfigSchema, KitLayoutSchema, TakumiPackageMetadataSchema, DEFAULT_KIT_LAYOUT, AVAILABLE_KITS, BASE_KIT = "core", NEVER_COPY_PATTERNS, USER_CONFIG_PATTERNS, PROTECTED_PATTERNS;
|
|
19585
19588
|
var init_kit = __esm(() => {
|
|
19586
19589
|
init_zod();
|
|
19587
|
-
KitType = exports_external.enum(["
|
|
19590
|
+
KitType = exports_external.enum(["core", "extras"]);
|
|
19588
19591
|
KitConfigSchema = exports_external.object({
|
|
19589
|
-
id:
|
|
19592
|
+
id: exports_external.string(),
|
|
19590
19593
|
name: exports_external.string(),
|
|
19591
19594
|
repo: exports_external.string(),
|
|
19592
19595
|
owner: exports_external.string(),
|
|
@@ -19604,12 +19607,12 @@ var init_kit = __esm(() => {
|
|
|
19604
19607
|
runtimeDir: ".claude"
|
|
19605
19608
|
};
|
|
19606
19609
|
AVAILABLE_KITS = {
|
|
19607
|
-
|
|
19610
|
+
core: {
|
|
19608
19611
|
id: "engineer",
|
|
19609
|
-
name: "
|
|
19612
|
+
name: "Core",
|
|
19610
19613
|
repo: "takumi",
|
|
19611
19614
|
owner: "sun-asterisk-internal",
|
|
19612
|
-
description: "
|
|
19615
|
+
description: "Core toolkit for building with Claude"
|
|
19613
19616
|
},
|
|
19614
19617
|
extras: {
|
|
19615
19618
|
id: "extras",
|
|
@@ -20270,6 +20273,7 @@ var exports_types = {};
|
|
|
20270
20273
|
__export(exports_types, {
|
|
20271
20274
|
normalizeTakumiConfigInput: () => normalizeTakumiConfigInput,
|
|
20272
20275
|
isValidKitType: () => isValidKitType,
|
|
20276
|
+
backendIdOf: () => backendIdOf,
|
|
20273
20277
|
VidcapOptionsSchema: () => VidcapOptionsSchema,
|
|
20274
20278
|
VersionCommandOptionsSchema: () => VersionCommandOptionsSchema,
|
|
20275
20279
|
ValidationResultSchema: () => ValidationResultSchema,
|
|
@@ -33370,7 +33374,7 @@ async function checkTokenScopes() {
|
|
|
33370
33374
|
};
|
|
33371
33375
|
}
|
|
33372
33376
|
}
|
|
33373
|
-
async function checkRepositoryAccess(kitType = "
|
|
33377
|
+
async function checkRepositoryAccess(kitType = "core") {
|
|
33374
33378
|
if (process.env.CI === "true") {
|
|
33375
33379
|
return {
|
|
33376
33380
|
id: `github-repo-access-${kitType}`,
|
|
@@ -36583,8 +36587,8 @@ var init_new_command_help = __esm(() => {
|
|
|
36583
36587
|
usage: "tkm new [options]",
|
|
36584
36588
|
examples: [
|
|
36585
36589
|
{
|
|
36586
|
-
command: "tkm new --kit
|
|
36587
|
-
description: "Create
|
|
36590
|
+
command: "tkm new --kit core --dir ./my-project",
|
|
36591
|
+
description: "Create core kit project in specific directory"
|
|
36588
36592
|
},
|
|
36589
36593
|
{
|
|
36590
36594
|
command: "tkm new -y --use-git --release v2.1.0",
|
|
@@ -36619,7 +36623,7 @@ var init_new_command_help = __esm(() => {
|
|
|
36619
36623
|
},
|
|
36620
36624
|
{
|
|
36621
36625
|
flags: "--kit <kit>",
|
|
36622
|
-
description: "Kit to use (
|
|
36626
|
+
description: "Kit to use (core, extras)"
|
|
36623
36627
|
},
|
|
36624
36628
|
{
|
|
36625
36629
|
flags: "-r, --release <version>",
|
|
@@ -36672,8 +36676,8 @@ var init_init_command_help = __esm(() => {
|
|
|
36672
36676
|
usage: "tkm init [options]",
|
|
36673
36677
|
examples: [
|
|
36674
36678
|
{
|
|
36675
|
-
command: "tkm init --kit
|
|
36676
|
-
description: "Update local project with latest
|
|
36679
|
+
command: "tkm init --kit core",
|
|
36680
|
+
description: "Update local project with latest core kit"
|
|
36677
36681
|
},
|
|
36678
36682
|
{
|
|
36679
36683
|
command: "tkm init --use-git --release v2.1.0 -y",
|
|
@@ -36686,7 +36690,7 @@ var init_init_command_help = __esm(() => {
|
|
|
36686
36690
|
options: [
|
|
36687
36691
|
{
|
|
36688
36692
|
flags: "-y, --yes",
|
|
36689
|
-
description: "Non-interactive mode with sensible defaults (kit:
|
|
36693
|
+
description: "Non-interactive mode with sensible defaults (kit: core, dir: ., version: latest)"
|
|
36690
36694
|
},
|
|
36691
36695
|
{
|
|
36692
36696
|
flags: "--use-git",
|
|
@@ -36712,7 +36716,7 @@ var init_init_command_help = __esm(() => {
|
|
|
36712
36716
|
},
|
|
36713
36717
|
{
|
|
36714
36718
|
flags: "--kit <kit>",
|
|
36715
|
-
description: "Kit to use (
|
|
36719
|
+
description: "Kit to use (core, extras)"
|
|
36716
36720
|
},
|
|
36717
36721
|
{
|
|
36718
36722
|
flags: "-r, --release <version>",
|
|
@@ -36877,7 +36881,7 @@ var init_uninstall_command_help = __esm(() => {
|
|
|
36877
36881
|
},
|
|
36878
36882
|
{
|
|
36879
36883
|
flags: "-k, --kit <type>",
|
|
36880
|
-
description: "Uninstall specific kit only (
|
|
36884
|
+
description: "Uninstall specific kit only (core, extras)"
|
|
36881
36885
|
}
|
|
36882
36886
|
]
|
|
36883
36887
|
},
|
|
@@ -36991,8 +36995,8 @@ var init_versions_command_help = __esm(() => {
|
|
|
36991
36995
|
usage: "tkm versions [options]",
|
|
36992
36996
|
examples: [
|
|
36993
36997
|
{
|
|
36994
|
-
command: "tkm versions --kit
|
|
36995
|
-
description: "Show latest 10 versions of
|
|
36998
|
+
command: "tkm versions --kit core --limit 10",
|
|
36999
|
+
description: "Show latest 10 versions of core kit"
|
|
36996
37000
|
},
|
|
36997
37001
|
{
|
|
36998
37002
|
command: "tkm versions --all",
|
|
@@ -37005,7 +37009,7 @@ var init_versions_command_help = __esm(() => {
|
|
|
37005
37009
|
options: [
|
|
37006
37010
|
{
|
|
37007
37011
|
flags: "--kit <kit>",
|
|
37008
|
-
description: "Filter by specific kit (
|
|
37012
|
+
description: "Filter by specific kit (core, extras)"
|
|
37009
37013
|
},
|
|
37010
37014
|
{
|
|
37011
37015
|
flags: "--limit <number>",
|
|
@@ -37035,7 +37039,7 @@ var init_config_command_help = __esm(() => {
|
|
|
37035
37039
|
description: "Read a config value"
|
|
37036
37040
|
},
|
|
37037
37041
|
{
|
|
37038
|
-
command: "tkm config set defaults.kit
|
|
37042
|
+
command: "tkm config set defaults.kit core",
|
|
37039
37043
|
description: "Set a config value from the CLI"
|
|
37040
37044
|
},
|
|
37041
37045
|
{
|
|
@@ -42942,7 +42946,21 @@ function findManifestPathSync(providerRoot) {
|
|
|
42942
42946
|
// src/domains/migration/metadata-migration.ts
|
|
42943
42947
|
init_logger();
|
|
42944
42948
|
init_takumi_constants();
|
|
42949
|
+
init_types2();
|
|
42945
42950
|
var import_fs_extra4 = __toESM(require_lib(), 1);
|
|
42951
|
+
function renameLegacyKitsKey(metadata) {
|
|
42952
|
+
if (!metadata.kits)
|
|
42953
|
+
return metadata;
|
|
42954
|
+
const raw = metadata.kits;
|
|
42955
|
+
const { engineer: legacy, ...rest } = raw;
|
|
42956
|
+
if (legacy == null)
|
|
42957
|
+
return metadata;
|
|
42958
|
+
const nextKits = rest;
|
|
42959
|
+
if (nextKits.core == null) {
|
|
42960
|
+
nextKits.core = legacy;
|
|
42961
|
+
}
|
|
42962
|
+
return { ...metadata, kits: nextKits };
|
|
42963
|
+
}
|
|
42946
42964
|
async function detectMetadataFormat(claudeDir) {
|
|
42947
42965
|
const resolved = await findManifestPath(claudeDir);
|
|
42948
42966
|
if (!resolved) {
|
|
@@ -42955,9 +42973,9 @@ async function detectMetadataFormat(claudeDir) {
|
|
|
42955
42973
|
if (!trimmed) {
|
|
42956
42974
|
return { format: "none", metadata: null, detectedKit: null, filenameUsed: null };
|
|
42957
42975
|
}
|
|
42958
|
-
const parsed = JSON.parse(trimmed);
|
|
42976
|
+
const parsed = renameLegacyKitsKey(JSON.parse(trimmed));
|
|
42959
42977
|
if (parsed.kits && Object.keys(parsed.kits).length > 0) {
|
|
42960
|
-
const installedKits = Object.keys(parsed.kits);
|
|
42978
|
+
const installedKits = Object.keys(parsed.kits).filter(isValidKitType);
|
|
42961
42979
|
return {
|
|
42962
42980
|
format: "multi-kit",
|
|
42963
42981
|
metadata: parsed,
|
|
@@ -42966,12 +42984,12 @@ async function detectMetadataFormat(claudeDir) {
|
|
|
42966
42984
|
};
|
|
42967
42985
|
}
|
|
42968
42986
|
if (parsed.name || parsed.version || parsed.files) {
|
|
42969
|
-
let detectedKit = "
|
|
42987
|
+
let detectedKit = "core";
|
|
42970
42988
|
const nameToCheck = parsed.name || "";
|
|
42971
42989
|
if (/\bextras\b/i.test(nameToCheck)) {
|
|
42972
42990
|
detectedKit = "extras";
|
|
42973
42991
|
} else if (/\bengineer\b/i.test(nameToCheck)) {
|
|
42974
|
-
detectedKit = "
|
|
42992
|
+
detectedKit = "core";
|
|
42975
42993
|
}
|
|
42976
42994
|
return { format: "legacy", metadata: parsed, detectedKit, filenameUsed };
|
|
42977
42995
|
}
|
|
@@ -43011,7 +43029,7 @@ async function migrateToMultiKit(claudeDir) {
|
|
|
43011
43029
|
error: "Metadata exists but could not be read"
|
|
43012
43030
|
};
|
|
43013
43031
|
}
|
|
43014
|
-
const legacyKit = detection.detectedKit || "
|
|
43032
|
+
const legacyKit = detection.detectedKit || "core";
|
|
43015
43033
|
try {
|
|
43016
43034
|
const kitMetadata = {
|
|
43017
43035
|
version: legacy.version || "unknown",
|
|
@@ -43101,18 +43119,19 @@ function getTrackedFilesForKit(metadata, kitType) {
|
|
|
43101
43119
|
}
|
|
43102
43120
|
function getInstalledKits(metadata) {
|
|
43103
43121
|
if (metadata.kits) {
|
|
43104
|
-
|
|
43122
|
+
const migrated = renameLegacyKitsKey(metadata);
|
|
43123
|
+
return Object.keys(migrated.kits ?? {}).filter(isValidKitType);
|
|
43105
43124
|
}
|
|
43106
43125
|
const nameToCheck = metadata.name || "";
|
|
43107
43126
|
const kits = [];
|
|
43108
43127
|
if (/\bengineer\b/i.test(nameToCheck)) {
|
|
43109
|
-
kits.push("
|
|
43128
|
+
kits.push("core");
|
|
43110
43129
|
}
|
|
43111
43130
|
if (kits.length > 0) {
|
|
43112
43131
|
return kits;
|
|
43113
43132
|
}
|
|
43114
43133
|
if (metadata.version) {
|
|
43115
|
-
return ["
|
|
43134
|
+
return ["core"];
|
|
43116
43135
|
}
|
|
43117
43136
|
return [];
|
|
43118
43137
|
}
|
|
@@ -43130,7 +43149,7 @@ async function readManifest(providerRoot) {
|
|
|
43130
43149
|
try {
|
|
43131
43150
|
const content = await import_fs_extra5.readFile(resolved.path, "utf-8");
|
|
43132
43151
|
const parsed = JSON.parse(content);
|
|
43133
|
-
return MetadataSchema.parse(parsed);
|
|
43152
|
+
return renameLegacyKitsKey(MetadataSchema.parse(parsed));
|
|
43134
43153
|
} catch (error) {
|
|
43135
43154
|
logger.debug(`Failed to read manifest: ${error}`);
|
|
43136
43155
|
return null;
|
|
@@ -43557,7 +43576,7 @@ async function reconcileCoexistingLegacy(legacyPath, canonicalPath) {
|
|
|
43557
43576
|
async function writeManifest(providerRoot, kitName, version3, scope, kitType, trackedFiles, userConfigFiles) {
|
|
43558
43577
|
await migrateLegacyManifestFilename(providerRoot);
|
|
43559
43578
|
const metadataPath = getManifestPath(providerRoot);
|
|
43560
|
-
const kit = kitType || "
|
|
43579
|
+
const kit = kitType || "core";
|
|
43561
43580
|
await import_fs_extra6.ensureFile(metadataPath);
|
|
43562
43581
|
let release = null;
|
|
43563
43582
|
try {
|
|
@@ -43576,7 +43595,7 @@ async function writeManifest(providerRoot, kitName, version3, scope, kitType, tr
|
|
|
43576
43595
|
const content = await import_fs_extra6.readFile(metadataPath, "utf-8");
|
|
43577
43596
|
const parsed = JSON.parse(content);
|
|
43578
43597
|
if (parsed && typeof parsed === "object" && Object.keys(parsed).length > 0) {
|
|
43579
|
-
existingMetadata = parsed;
|
|
43598
|
+
existingMetadata = renameLegacyKitsKey(parsed);
|
|
43580
43599
|
}
|
|
43581
43600
|
} catch (error) {
|
|
43582
43601
|
logger.debug(`Could not read existing metadata: ${error}`);
|
|
@@ -47692,7 +47711,7 @@ function logCleanupSummary(deletedCount, preservedCount, dryRun, results) {
|
|
|
47692
47711
|
|
|
47693
47712
|
// src/services/transformers/commands-prefix/prefix-cleaner.ts
|
|
47694
47713
|
var KIT_PREFIX_MAP = {
|
|
47695
|
-
tkm: "
|
|
47714
|
+
tkm: "core"
|
|
47696
47715
|
};
|
|
47697
47716
|
function createKitSpecificMetadata(metadata, kitType) {
|
|
47698
47717
|
if (metadata.kits?.[kitType]) {
|
|
@@ -56554,7 +56573,7 @@ async function writeCodexManifest(ctx, results, codexRoot, installGlobally) {
|
|
|
56554
56573
|
});
|
|
56555
56574
|
await trackFilesWithProgress(filesToTrack, {
|
|
56556
56575
|
providerRoot: codexRoot,
|
|
56557
|
-
kitName: ctx.kit?.name ?? "
|
|
56576
|
+
kitName: ctx.kit?.name ?? "Core",
|
|
56558
56577
|
releaseTag: installedVersion,
|
|
56559
56578
|
mode: installGlobally ? "global" : "local",
|
|
56560
56579
|
kitType: ctx.kitType
|
|
@@ -57691,7 +57710,7 @@ function checkComponentCounts(setup) {
|
|
|
57691
57710
|
priority: "standard",
|
|
57692
57711
|
status: totalComponents > 0 ? "info" : "warn",
|
|
57693
57712
|
message: totalComponents > 0 ? `${totalAgents} agents, ${totalCommands} commands, ${totalRules} rules, ${totalSkills} skills` : "No components found",
|
|
57694
|
-
suggestion: totalComponents === 0 ? "Install Takumi: takumi new --kit
|
|
57713
|
+
suggestion: totalComponents === 0 ? "Install Takumi: takumi new --kit core" : undefined,
|
|
57695
57714
|
autoFixable: false
|
|
57696
57715
|
};
|
|
57697
57716
|
}
|
|
@@ -58314,7 +58333,7 @@ function maskToken(token) {
|
|
|
58314
58333
|
class AuthChecker {
|
|
58315
58334
|
group = "auth";
|
|
58316
58335
|
kits;
|
|
58317
|
-
constructor(kits = ["
|
|
58336
|
+
constructor(kits = ["core"]) {
|
|
58318
58337
|
this.kits = kits;
|
|
58319
58338
|
}
|
|
58320
58339
|
async run() {
|
|
@@ -59695,8 +59714,9 @@ class WorkerSource {
|
|
|
59695
59714
|
}
|
|
59696
59715
|
|
|
59697
59716
|
// src/domains/installation/release-entry-adapter.ts
|
|
59698
|
-
|
|
59699
|
-
|
|
59717
|
+
init_types2();
|
|
59718
|
+
function githubReleaseToEntry(release, kit = "core") {
|
|
59719
|
+
const expected = assetNameFor(backendIdOf(kit));
|
|
59700
59720
|
const expectedAsset = release.assets.find((a3) => a3.name === expected);
|
|
59701
59721
|
const fallback2 = release.assets[0];
|
|
59702
59722
|
const archive = expectedAsset?.name ?? fallback2?.name ?? expected;
|
|
@@ -65749,7 +65769,7 @@ async function handleSelection(ctx) {
|
|
|
65749
65769
|
const github2 = new GitHubClient;
|
|
65750
65770
|
release2 = await github2.getReleaseByTag(kit2, ctx.selectedVersion);
|
|
65751
65771
|
} else {
|
|
65752
|
-
const worker = new WorkerSource(getServerUrl(), ctx.kitType);
|
|
65772
|
+
const worker = new WorkerSource(getServerUrl(), backendIdOf(ctx.kitType));
|
|
65753
65773
|
const entry = await worker.fetchByTag(ctx.selectedVersion);
|
|
65754
65774
|
release2 = releaseEntryToGitHubRelease(entry, kit2);
|
|
65755
65775
|
}
|
|
@@ -66019,7 +66039,7 @@ async function handleSelection(ctx) {
|
|
|
66019
66039
|
logger.success(`Found: ${release.tag_name}`);
|
|
66020
66040
|
}
|
|
66021
66041
|
} else if (selectedVersion) {
|
|
66022
|
-
const worker = new WorkerSource(getServerUrl(), kitType);
|
|
66042
|
+
const worker = new WorkerSource(getServerUrl(), backendIdOf(kitType));
|
|
66023
66043
|
const entry = await worker.fetchByTag(selectedVersion);
|
|
66024
66044
|
release = releaseEntryToGitHubRelease(entry, kit);
|
|
66025
66045
|
} else {
|
|
@@ -66028,7 +66048,7 @@ async function handleSelection(ctx) {
|
|
|
66028
66048
|
} else {
|
|
66029
66049
|
logger.info("Fetching latest release...");
|
|
66030
66050
|
}
|
|
66031
|
-
const worker = new WorkerSource(getServerUrl(), kitType);
|
|
66051
|
+
const worker = new WorkerSource(getServerUrl(), backendIdOf(kitType));
|
|
66032
66052
|
const entry = await worker.fetchLatest(ctx.options.beta);
|
|
66033
66053
|
release = releaseEntryToGitHubRelease(entry, kit);
|
|
66034
66054
|
if (release.prerelease) {
|
|
@@ -66099,7 +66119,7 @@ async function handleSelection(ctx) {
|
|
|
66099
66119
|
const ghClient = github ?? new GitHubClient;
|
|
66100
66120
|
secondaryRelease = secondaryVersion ? await ghClient.getReleaseByTag(kitConfig, secondaryVersion) : await ghClient.getLatestRelease(kitConfig, ctx.options.beta);
|
|
66101
66121
|
} else {
|
|
66102
|
-
const worker = new WorkerSource(getServerUrl(), secondaryKit);
|
|
66122
|
+
const worker = new WorkerSource(getServerUrl(), backendIdOf(secondaryKit));
|
|
66103
66123
|
const entry = secondaryVersion ? await worker.fetchByTag(secondaryVersion) : await worker.fetchLatest(ctx.options.beta);
|
|
66104
66124
|
secondaryRelease = releaseEntryToGitHubRelease(entry, kitConfig);
|
|
66105
66125
|
}
|
|
@@ -66134,7 +66154,7 @@ async function resolveReleaseForKit(ctx, kitType) {
|
|
|
66134
66154
|
const release = await github.getLatestRelease(kit, ctx.options.beta);
|
|
66135
66155
|
return release;
|
|
66136
66156
|
}
|
|
66137
|
-
const worker = new WorkerSource(getServerUrl(), kitType);
|
|
66157
|
+
const worker = new WorkerSource(getServerUrl(), backendIdOf(kitType));
|
|
66138
66158
|
const entry = await worker.fetchLatest(ctx.options.beta);
|
|
66139
66159
|
return releaseEntryToGitHubRelease(entry, kit);
|
|
66140
66160
|
}
|
|
@@ -66158,6 +66178,7 @@ import { mkdir as mkdir27, readFile as readFile37, unlink as unlink11, writeFile
|
|
|
66158
66178
|
import { join as join93 } from "node:path";
|
|
66159
66179
|
init_logger();
|
|
66160
66180
|
init_path_resolver();
|
|
66181
|
+
init_types2();
|
|
66161
66182
|
var CACHE_TTL_HOURS = 24;
|
|
66162
66183
|
var DEFAULT_CACHE_TTL_MS = CACHE_TTL_HOURS * 60 * 60 * 1000;
|
|
66163
66184
|
var MIN_CACHE_TTL_MS = 60 * 1000;
|
|
@@ -66220,7 +66241,7 @@ class ConfigVersionChecker {
|
|
|
66220
66241
|
const baseBackoff = 1000;
|
|
66221
66242
|
for (let attempt = 0;attempt < maxRetries; attempt++) {
|
|
66222
66243
|
try {
|
|
66223
|
-
const worker = new WorkerSource(getServerUrl(), kitType);
|
|
66244
|
+
const worker = new WorkerSource(getServerUrl(), backendIdOf(kitType));
|
|
66224
66245
|
const entry = await worker.fetchLatest();
|
|
66225
66246
|
const version3 = entry.version.replace(/^v/, "");
|
|
66226
66247
|
if (!version3 || version3.length > 256) {
|
|
@@ -67866,9 +67887,9 @@ Run 'takumi init' to update.`, "Legacy Installation");
|
|
|
67866
67887
|
}
|
|
67867
67888
|
let kitType = ctx.options.selectedKits?.[0];
|
|
67868
67889
|
if (!kitType) {
|
|
67869
|
-
const
|
|
67870
|
-
if (
|
|
67871
|
-
kitType = "
|
|
67890
|
+
const coreMeta = await readKitManifest(claudeDir, "core");
|
|
67891
|
+
if (coreMeta) {
|
|
67892
|
+
kitType = "core";
|
|
67872
67893
|
} else {
|
|
67873
67894
|
logger.error("Cannot sync: no kit installation found in metadata");
|
|
67874
67895
|
return { ...ctx, cancelled: true };
|
|
@@ -71786,7 +71807,7 @@ var import_fs_extra40 = __toESM(require_lib(), 1);
|
|
|
71786
71807
|
// package.json
|
|
71787
71808
|
var package_default = {
|
|
71788
71809
|
name: "@sunasteriskrnd/takumi",
|
|
71789
|
-
version: "1.0.0-dev.
|
|
71810
|
+
version: "1.0.0-dev.15",
|
|
71790
71811
|
description: "CLI tool for bootstrapping and managing Takumi projects",
|
|
71791
71812
|
type: "module",
|
|
71792
71813
|
repository: {
|
|
@@ -72341,7 +72362,7 @@ async function fetchReleasesForKit(kitType, options2) {
|
|
|
72341
72362
|
const filtered = options2.includePrereleases ? releases : releases.filter((r2) => !r2.draft && !r2.prerelease);
|
|
72342
72363
|
return filtered.map((r2) => githubReleaseToEntry(r2, kitType));
|
|
72343
72364
|
}
|
|
72344
|
-
const worker = new WorkerSource(getServerUrl(), kitType);
|
|
72365
|
+
const worker = new WorkerSource(getServerUrl(), backendIdOf(kitType));
|
|
72345
72366
|
const entries = await worker.fetchReleaseList(options2.includePrereleases);
|
|
72346
72367
|
return entries.slice(0, options2.limit);
|
|
72347
72368
|
}
|
|
@@ -73910,7 +73931,7 @@ Run this command from a directory with a GitHub remote.`);
|
|
|
73910
73931
|
const skillsPath = join114(homedir25(), ".claude", "skills");
|
|
73911
73932
|
const skillsAvailable = existsSync56(skillsPath);
|
|
73912
73933
|
if (!skillsAvailable) {
|
|
73913
|
-
logger.warning(`
|
|
73934
|
+
logger.warning(`Core skills not found at ${skillsPath}`);
|
|
73914
73935
|
}
|
|
73915
73936
|
return {
|
|
73916
73937
|
repoOwner,
|
|
@@ -74237,13 +74258,13 @@ function sleep2(ms2) {
|
|
|
74237
74258
|
// src/cli/command-registry.ts
|
|
74238
74259
|
init_logger();
|
|
74239
74260
|
function registerCommands(cli) {
|
|
74240
|
-
cli.command("new", "Bootstrap a new Takumi project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit(s) to install (
|
|
74261
|
+
cli.command("new", "Bootstrap a new 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("--force", "Overwrite existing files without confirmation").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--opencode", "Install OpenCode CLI package (non-interactive mode)").option("--gemini", "Install Google Gemini CLI package (non-interactive mode)").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("--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("--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)").action(async (options2) => {
|
|
74241
74262
|
if (options2.exclude && !Array.isArray(options2.exclude)) {
|
|
74242
74263
|
options2.exclude = [options2.exclude];
|
|
74243
74264
|
}
|
|
74244
74265
|
await newCommand(options2);
|
|
74245
74266
|
});
|
|
74246
|
-
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 (
|
|
74267
|
+
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("--skip-setup", "Skip interactive configuration wizard").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) => {
|
|
74247
74268
|
if (options2.exclude && !Array.isArray(options2.exclude)) {
|
|
74248
74269
|
options2.exclude = [options2.exclude];
|
|
74249
74270
|
}
|
|
@@ -74285,13 +74306,13 @@ function registerCommands(cli) {
|
|
|
74285
74306
|
process.exit(1);
|
|
74286
74307
|
}
|
|
74287
74308
|
});
|
|
74288
|
-
cli.command("versions", "List available versions of Takumi repositories").option("--kit <kit>", "Filter by specific kit (
|
|
74309
|
+
cli.command("versions", "List available versions of Takumi repositories").option("--kit <kit>", "Filter by specific kit (core)").option("--limit <limit>", "Number of releases to show (default: 30)").option("--all", "Show the beta channel (prereleases only) instead of the stable channel. " + "On --use-gh, returns all release types interleaved.").option("--use-gh", "Use legacy GitHub release source (requires gh CLI)").action(async (options2) => {
|
|
74289
74310
|
await versionCommand(options2);
|
|
74290
74311
|
});
|
|
74291
74312
|
cli.command("doctor", "Comprehensive health check for Takumi").option("--report", "Generate shareable diagnostic report").option("--fix", "Auto-fix all fixable issues").option("--check-only", "CI mode: no prompts, exit 1 on failures").option("--json", "Output JSON format").option("--full", "Include extended priority checks (slower)").action(async (options2) => {
|
|
74292
74313
|
await doctorCommand(options2);
|
|
74293
74314
|
});
|
|
74294
|
-
cli.command("uninstall", "Remove Takumi installations").option("-y, --yes", "Non-interactive mode with sensible defaults (skip all prompts)").option("-l, --local", "Uninstall only local installation (current project)").option("-g, --global", "Uninstall only global installation (~/.claude/)").option("-A, --all", "Uninstall from both local and global locations").option("-k, --kit <type>", "Uninstall specific kit only (
|
|
74315
|
+
cli.command("uninstall", "Remove Takumi installations").option("-y, --yes", "Non-interactive mode with sensible defaults (skip all prompts)").option("-l, --local", "Uninstall only local installation (current project)").option("-g, --global", "Uninstall only global installation (~/.claude/)").option("-A, --all", "Uninstall from both local and global locations").option("-k, --kit <type>", "Uninstall specific kit only (core)").option("--dry-run", "Preview what would be removed without deleting").option("--force-overwrite", "Delete even user-modified files (requires confirmation)").action(async (options2) => {
|
|
74295
74316
|
await uninstallCommand(options2);
|
|
74296
74317
|
});
|
|
74297
74318
|
cli.command("content [action] [id]", "Multi-channel content automation (start|stop|status|logs|setup|queue|approve|reject)").option("--dry-run", "Generate content without publishing").option("--verbose", "Enable verbose logging").option("--force", "Kill existing process and start fresh").option("--tail", "Follow log output (for logs action)").option("--reason <reason>", "Rejection reason (for reject action)").action(async (action, id, options2) => {
|
|
@@ -74456,7 +74477,7 @@ class VersionCacheManager {
|
|
|
74456
74477
|
async function fetchLatestRelease(currentVersion) {
|
|
74457
74478
|
try {
|
|
74458
74479
|
const githubClient = new GitHubClient;
|
|
74459
|
-
const kit = AVAILABLE_KITS.
|
|
74480
|
+
const kit = AVAILABLE_KITS.core;
|
|
74460
74481
|
const timeoutPromise = new Promise((_4, reject) => setTimeout(() => reject(new Error("Timeout")), 5000));
|
|
74461
74482
|
const releasePromise = githubClient.getLatestRelease(kit);
|
|
74462
74483
|
const release = await Promise.race([releasePromise, timeoutPromise]);
|