ccjk 9.4.4 → 9.4.6

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.
@@ -1,14 +1,16 @@
1
1
  import { randomUUID, createHash } from 'node:crypto';
2
2
  import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'node:fs';
3
3
  import { release, platform, type, homedir, hostname } from 'node:os';
4
- import { join } from 'pathe';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { join, dirname } from 'pathe';
5
6
  import { CCJK_CONFIG_DIR } from './constants.mjs';
6
7
  import './index3.mjs';
7
8
  import 'node:process';
8
- import 'node:url';
9
9
  import 'i18next';
10
10
  import 'i18next-fs-backend';
11
11
 
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = dirname(__filename);
12
14
  const CLOUD_CONFIG_DIR = join(CCJK_CONFIG_DIR, "cloud");
13
15
  const DEVICE_CONFIG_FILE = join(CLOUD_CONFIG_DIR, "device.json");
14
16
  const CLOUD_STATE_FILE = join(CLOUD_CONFIG_DIR, "state.json");
@@ -9,7 +9,7 @@ import { ccjkAgents } from './ccjk-agents.mjs';
9
9
  import { ccjkHooks } from './ccjk-hooks.mjs';
10
10
  import { ccjkMcp } from './ccjk-mcp.mjs';
11
11
  import { ccjkSkills } from './ccjk-skills.mjs';
12
- import dayjs__default from 'dayjs';
12
+ import dayjs from 'dayjs';
13
13
  import 'fs-extra';
14
14
  import 'fs';
15
15
  import 'path';
@@ -39,7 +39,7 @@ import 'tinyexec';
39
39
  import '../shared/ccjk.Bdhyg3X-.mjs';
40
40
 
41
41
  async function createBackup(operation, options = {}) {
42
- const timestamp = dayjs__default().format("YYYYMMDD-HHmmss");
42
+ const timestamp = dayjs().format("YYYYMMDD-HHmmss");
43
43
  const backupName = options.name || operation;
44
44
  const backupDir = join(process.cwd(), ".ccjk-backups", `${backupName}-${timestamp}`);
45
45
  try {
@@ -106,7 +106,7 @@ async function copyDirectory(src, dest) {
106
106
 
107
107
  function generateReport(result) {
108
108
  const report = {
109
- date: dayjs__default().format("YYYY-MM-DD HH:mm:ss"),
109
+ date: dayjs().format("YYYY-MM-DD HH:mm:ss"),
110
110
  profile: result.installationPlan?.profile || "unknown",
111
111
  duration: result.duration,
112
112
  projectAnalysis: result.projectAnalysis,
@@ -1,6 +1,7 @@
1
1
  import { promises } from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
- import { join } from 'node:path';
3
+ import { join, dirname } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
4
5
  import ansis from 'ansis';
5
6
  import consola from 'consola';
6
7
  import inquirer from 'inquirer';
@@ -16,10 +17,11 @@ import 'module';
16
17
  import 'smol-toml';
17
18
  import 'ofetch';
18
19
  import 'node:process';
19
- import 'node:url';
20
20
  import 'i18next';
21
21
  import 'i18next-fs-backend';
22
22
 
23
+ const __filename = fileURLToPath(import.meta.url);
24
+ const __dirname = dirname(__filename);
23
25
  async function ccjkSkills(options = {}) {
24
26
  const logger = consola.withTag("ccjk:skills");
25
27
  const startTime = Date.now();
@@ -487,8 +489,9 @@ function getCategoryIcon(category) {
487
489
  review: "\u{1F440}",
488
490
  seo: "\u{1F50D}",
489
491
  devops: "\u{1F680}",
490
- custom: "\u2699\uFE0F",
491
- debug: "\u{1F41B}"
492
+ planning: "\u{1F4CB}",
493
+ debug: "\u{1F41B}",
494
+ custom: "\u2699\uFE0F"
492
495
  };
493
496
  return icons[category] || "\u{1F4E6}";
494
497
  }
@@ -1,4 +1,4 @@
1
- import dayjs__default from 'dayjs';
1
+ import dayjs from 'dayjs';
2
2
  import { join } from 'pathe';
3
3
  import { ZCF_CONFIG_FILE, ZCF_CONFIG_DIR, SETTINGS_FILE } from './constants.mjs';
4
4
  import { readDefaultTomlConfig, createDefaultTomlConfig, writeTomlConfig } from './ccjk-config.mjs';
@@ -288,7 +288,7 @@ class ClaudeCodeConfigManager {
288
288
  if (!exists(this.CONFIG_FILE)) {
289
289
  return null;
290
290
  }
291
- const timestamp = dayjs__default().format("YYYY-MM-DD_HH-mm-ss");
291
+ const timestamp = dayjs().format("YYYY-MM-DD_HH-mm-ss");
292
292
  const backupPath = join(ZCF_CONFIG_DIR, `config.backup.${timestamp}.toml`);
293
293
  copyFile(this.CONFIG_FILE, backupPath);
294
294
  return backupPath;
@@ -1,7 +1,7 @@
1
1
  import process__default from 'node:process';
2
2
  import { fileURLToPath } from 'node:url';
3
3
  import ansis from 'ansis';
4
- import dayjs__default from 'dayjs';
4
+ import dayjs from 'dayjs';
5
5
  import inquirer from 'inquirer';
6
6
  import ora from 'ora';
7
7
  import { join, dirname } from 'pathe';
@@ -541,7 +541,7 @@ function backupCodexFiles() {
541
541
  return null;
542
542
  if (process__default.env.CCJK_CODEX_SKIP_PROMPT_SINGLE_BACKUP === "true" && cachedSkipPromptBackup)
543
543
  return cachedSkipPromptBackup;
544
- const timestamp = dayjs__default().format("YYYY-MM-DD_HH-mm-ss");
544
+ const timestamp = dayjs().format("YYYY-MM-DD_HH-mm-ss");
545
545
  const backupDir = createBackupDirectory(timestamp);
546
546
  const filter = (path) => {
547
547
  return !path.includes("/backup");
@@ -558,7 +558,7 @@ function backupCodexConfig() {
558
558
  if (!exists(CODEX_CONFIG_FILE))
559
559
  return null;
560
560
  try {
561
- const timestamp = dayjs__default().format("YYYY-MM-DD_HH-mm-ss");
561
+ const timestamp = dayjs().format("YYYY-MM-DD_HH-mm-ss");
562
562
  const backupDir = createBackupDirectory(timestamp);
563
563
  const backupPath = join(backupDir, "config.toml");
564
564
  copyFile(CODEX_CONFIG_FILE, backupPath);
@@ -573,7 +573,7 @@ function backupCodexAgents() {
573
573
  if (!exists(CODEX_AGENTS_FILE))
574
574
  return null;
575
575
  try {
576
- const timestamp = dayjs__default().format("YYYY-MM-DD_HH-mm-ss");
576
+ const timestamp = dayjs().format("YYYY-MM-DD_HH-mm-ss");
577
577
  const backupDir = createBackupDirectory(timestamp);
578
578
  const backupPath = join(backupDir, "AGENTS.md");
579
579
  copyFile(CODEX_AGENTS_FILE, backupPath);
@@ -588,7 +588,7 @@ function backupCodexPrompts() {
588
588
  if (!exists(CODEX_PROMPTS_DIR))
589
589
  return null;
590
590
  try {
591
- const timestamp = dayjs__default().format("YYYY-MM-DD_HH-mm-ss");
591
+ const timestamp = dayjs().format("YYYY-MM-DD_HH-mm-ss");
592
592
  const backupDir = createBackupDirectory(timestamp);
593
593
  const backupPath = join(backupDir, "prompts");
594
594
  copyDir(CODEX_PROMPTS_DIR, backupPath);
@@ -2,7 +2,7 @@ import { existsSync, statSync, readFileSync } from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
3
  import process__default from 'node:process';
4
4
  import ansis from 'ansis';
5
- import dayjs__default from 'dayjs';
5
+ import dayjs from 'dayjs';
6
6
  import { join } from 'pathe';
7
7
  import { SETTINGS_FILE, ClAUDE_CONFIG_FILE, CLAUDE_VSC_CONFIG_FILE } from './constants.mjs';
8
8
  import { S as STATUS } from '../shared/ccjk.DHVCT7SF.mjs';
@@ -143,7 +143,7 @@ function displayConfigScan(configs) {
143
143
  continue;
144
144
  }
145
145
  const sizeKB = config.size ? (config.size / 1024).toFixed(1) : "?";
146
- const modified = config.modifiedAt ? dayjs__default(config.modifiedAt).format("YYYY-MM-DD HH:mm") : "unknown";
146
+ const modified = config.modifiedAt ? dayjs(config.modifiedAt).format("YYYY-MM-DD HH:mm") : "unknown";
147
147
  const typeLabel = config.type === "global" ? "primary" : config.type;
148
148
  if (config.type === "global" && config.path === SETTINGS_FILE) {
149
149
  console.log(STATUS.success(`${config.path}`));
@@ -1,6 +1,6 @@
1
1
  import { fileURLToPath } from 'node:url';
2
2
  import ansis from 'ansis';
3
- import dayjs__default from 'dayjs';
3
+ import dayjs from 'dayjs';
4
4
  import inquirer from 'inquirer';
5
5
  import { join, dirname } from 'pathe';
6
6
  import { SETTINGS_FILE, CLAUDE_VSC_CONFIG_FILE, CLAUDE_DIR, AI_OUTPUT_LANGUAGES } from './constants.mjs';
@@ -58,7 +58,7 @@ function backupExistingConfig() {
58
58
  if (!exists(CLAUDE_DIR)) {
59
59
  return null;
60
60
  }
61
- const timestamp = dayjs__default().format("YYYY-MM-DD_HH-mm-ss");
61
+ const timestamp = dayjs().format("YYYY-MM-DD_HH-mm-ss");
62
62
  const backupBaseDir = join(CLAUDE_DIR, "backup");
63
63
  const backupDir = join(backupBaseDir, `backup_${timestamp}`);
64
64
  ensureDir(backupDir);
@@ -4,7 +4,7 @@ import { homedir } from 'node:os';
4
4
  import process__default from 'node:process';
5
5
  import { promisify } from 'node:util';
6
6
  import ansis from 'ansis';
7
- import dayjs__default from 'dayjs';
7
+ import dayjs from 'dayjs';
8
8
  import inquirer from 'inquirer';
9
9
  import { join } from 'pathe';
10
10
  import { SETTINGS_FILE } from './constants.mjs';
@@ -186,7 +186,7 @@ async function backupCcrConfig() {
186
186
  if (!existsSync(CCR_CONFIG_FILE)) {
187
187
  return null;
188
188
  }
189
- const timestamp = `${dayjs__default().format("YYYY-MM-DDTHH-mm-ss-SSS")}Z`;
189
+ const timestamp = `${dayjs().format("YYYY-MM-DDTHH-mm-ss-SSS")}Z`;
190
190
  const backupFileName = `config.json.${timestamp}.bak`;
191
191
  const backupPath = join(CCR_BACKUP_DIR, backupFileName);
192
192
  console.log(ansis.green(`${i18n.t("ccr:backupCcrConfig")}`));
@@ -1,6 +1,7 @@
1
- export { b as generateCompactWelcome, c as generateRecommendations, d as generateWelcome, g as getCapabilitiesByType, a as getCapability, s as scanCapabilities } from '../shared/ccjk.3Rl727PQ.mjs';
1
+ export { b as generateCompactWelcome, c as generateRecommendations, d as generateWelcome, g as getCapabilitiesByType, a as getCapability, s as scanCapabilities } from '../shared/ccjk.tO8zeFh1.mjs';
2
2
  import 'node:child_process';
3
3
  import 'node:fs';
4
4
  import 'node:os';
5
5
  import 'pathe';
6
6
  import 'ansis';
7
+ import './package.mjs';
@@ -35,7 +35,7 @@ class ProjectAnalyzer {
35
35
  cicd,
36
36
  patterns,
37
37
  confidence,
38
- packageJson
38
+ packageJson: packageJson ?? void 0
39
39
  };
40
40
  }
41
41
  /**
@@ -334,8 +334,8 @@ async function analyzeProject(projectRoot) {
334
334
  return analyzer.analyze();
335
335
  }
336
336
 
337
- const __filename = fileURLToPath(import.meta.url);
338
- const __dirname$1 = dirname(__filename);
337
+ const __filename$1 = fileURLToPath(import.meta.url);
338
+ const __dirname$1 = dirname(__filename$1);
339
339
  class TemplateSelector {
340
340
  templatesDir;
341
341
  constructor(templatesDir) {
@@ -533,6 +533,8 @@ async function selectTemplates(analysis) {
533
533
  return selector.select(analysis);
534
534
  }
535
535
 
536
+ const __filename = fileURLToPath(import.meta.url);
537
+ const __dirname = dirname(__filename);
536
538
  class ConfigGenerator {
537
539
  templatesDir;
538
540
  outputDir;
@@ -1,4 +1,4 @@
1
- import * as dayjs from 'dayjs';
1
+ import dayjs from 'dayjs';
2
2
  import { join } from 'pathe';
3
3
  import { exists, readFile, writeFileAtomic, writeFile, ensureDir, copyFile } from './fs-operations.mjs';
4
4
  import 'node:crypto';
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync, readdirSync, mkdirSync, statSync } from 'node:fs';
2
2
  import process__default from 'node:process';
3
3
  import ansis from 'ansis';
4
- import dayjs__default from 'dayjs';
4
+ import dayjs from 'dayjs';
5
5
  import inquirer from 'inquirer';
6
6
  import ora from 'ora';
7
7
  import { join, basename } from 'pathe';
@@ -52,7 +52,7 @@ function saveKnowledgeBase(kb) {
52
52
  function isFileOutdated(filePath, daysThreshold = 30) {
53
53
  try {
54
54
  const stat = statSync(filePath);
55
- const daysSinceModified = dayjs__default().diff(dayjs__default(stat.mtime), "day");
55
+ const daysSinceModified = dayjs().diff(dayjs(stat.mtime), "day");
56
56
  return daysSinceModified > daysThreshold;
57
57
  } catch {
58
58
  return true;
@@ -195,7 +195,7 @@ ${project.buildTools.length > 0 ? `Build tools: ${project.buildTools.join(", ")}
195
195
  - Ask before making breaking changes
196
196
 
197
197
  ---
198
- *Generated by CCJK on ${dayjs__default().format("YYYY-MM-DD")}*
198
+ *Generated by CCJK on ${dayjs().format("YYYY-MM-DD")}*
199
199
  `;
200
200
  }
201
201
  async function runOnboarding(projectDir = process__default.cwd()) {
@@ -241,7 +241,7 @@ async function runOnboarding(projectDir = process__default.cwd()) {
241
241
  ]);
242
242
  if (updateClaudeMd) {
243
243
  const newContent = generateDefaultClaudeMd(project);
244
- const backupPath = `${claudeMd.path}.backup-${dayjs__default().format("YYYYMMDD")}`;
244
+ const backupPath = `${claudeMd.path}.backup-${dayjs().format("YYYYMMDD")}`;
245
245
  writeFileAtomic(backupPath, claudeMd.content);
246
246
  writeFileAtomic(claudeMd.path, newContent);
247
247
  console.log(STATUS.success(`Updated! Backup saved to ${backupPath}`));
@@ -1,6 +1,6 @@
1
1
  const name = "ccjk";
2
2
  const type = "module";
3
- const version = "9.4.4";
3
+ const version = "9.4.6";
4
4
  const packageManager = "pnpm@10.17.1";
5
5
  const description = "CCJK v9.0.0 - Revolutionary AI Development Platform with Enterprise Security, Streaming Cloud Sync, CRDT Conflict Resolution, and Unified V3 Architecture";
6
6
  const author = {
@@ -78,7 +78,7 @@ const scripts = {
78
78
  build: "unbuild",
79
79
  start: "node bin/ccjk.mjs",
80
80
  typecheck: "tsc --noEmit",
81
- prepublishOnly: "node scripts/validate-prepublish.mjs && pnpm build",
81
+ prepublishOnly: "node scripts/validate-prepublish.mjs && pnpm build && pnpm test:run",
82
82
  lint: "eslint",
83
83
  "lint:fix": "eslint --fix",
84
84
  test: "vitest",
@@ -1,15 +1,17 @@
1
1
  import { existsSync, readFileSync, writeFileSync, appendFileSync, unlinkSync, mkdirSync } from 'node:fs';
2
2
  import { platform } from 'node:os';
3
3
  import process__default from 'node:process';
4
- import { join } from 'pathe';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { join, dirname } from 'pathe';
5
6
  import { CCJK_CONFIG_DIR } from './constants.mjs';
6
7
  import { getCloudState, updateCloudState } from './auto-bootstrap.mjs';
7
8
  import './index3.mjs';
8
- import 'node:url';
9
9
  import 'i18next';
10
10
  import 'i18next-fs-backend';
11
11
  import 'node:crypto';
12
12
 
13
+ const __filename = fileURLToPath(import.meta.url);
14
+ const __dirname = dirname(__filename);
13
15
  const UPGRADE_LOG_DIR = join(CCJK_CONFIG_DIR, "cloud", "logs");
14
16
  const UPGRADE_LOG_FILE = join(UPGRADE_LOG_DIR, "upgrades.log");
15
17
  const UPGRADE_LOCK_FILE = join(CCJK_CONFIG_DIR, "cloud", ".upgrade.lock");
@@ -1,21 +1,23 @@
1
1
  import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
+ import { fileURLToPath } from 'node:url';
3
4
  import ansis from 'ansis';
4
5
  import * as Handlebars from 'handlebars';
5
6
  import inquirer from 'inquirer';
6
- import { join } from 'pathe';
7
+ import { join, dirname } from 'pathe';
7
8
  import { g as getPluginManager } from '../shared/ccjk.Cg7t5XaL.mjs';
8
9
  import 'tinyexec';
9
10
  import './constants.mjs';
10
11
  import './index3.mjs';
11
12
  import 'node:process';
12
- import 'node:url';
13
13
  import 'i18next';
14
14
  import 'i18next-fs-backend';
15
15
  import '../shared/ccjk.Bvoex4TZ.mjs';
16
16
  import 'node:child_process';
17
17
  import '../shared/ccjk.Bdhyg3X-.mjs';
18
18
 
19
+ const __filename = fileURLToPath(import.meta.url);
20
+ const __dirname = dirname(__filename);
19
21
  async function handleSkillCommand(args, options = {}) {
20
22
  const subcommand = args[0];
21
23
  const restArgs = args.slice(1);
@@ -84,101 +86,119 @@ async function createSkill(name, _options) {
84
86
  console.log(ansis.cyan("\n\u{1F3A8} Create New Skill\n"));
85
87
  const availableTemplates = getAvailableTemplates();
86
88
  const categories = ["dev", "git", "review", "testing", "docs", "devops", "planning", "debugging", "custom"];
87
- const answers = await inquirer.prompt([
88
- {
89
- type: "input",
90
- name: "name",
91
- message: "Skill name (kebab-case):",
92
- default: name || "my-skill",
93
- validate: (input) => {
94
- if (!/^[a-z][a-z0-9-]*$/.test(input)) {
95
- return "Name must be kebab-case (lowercase letters, numbers, hyphens)";
96
- }
97
- return true;
89
+ const { name: skillName } = await inquirer.prompt({
90
+ type: "input",
91
+ name: "name",
92
+ message: "Skill name (kebab-case):",
93
+ default: name || "my-skill",
94
+ validate: (input) => {
95
+ if (!/^[a-z][a-z0-9-]*$/.test(input)) {
96
+ return "Name must be kebab-case (lowercase letters, numbers, hyphens)";
98
97
  }
99
- },
100
- {
101
- type: "input",
102
- name: "title",
103
- message: "Skill title:",
104
- default: (ans) => ans.name.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ")
105
- },
106
- {
107
- type: "input",
108
- name: "description",
109
- message: "Brief description:",
110
- default: "A custom skill for CCJK"
111
- },
112
- {
113
- type: "list",
114
- name: "template",
115
- message: "Select template:",
116
- choices: availableTemplates.map((t) => ({
117
- name: t === "basic" ? `${t} (blank template)` : t,
118
- value: t
119
- })),
120
- default: "basic"
121
- },
122
- {
123
- type: "list",
124
- name: "category",
125
- message: "Category:",
126
- choices: categories,
127
- default: "custom"
128
- },
129
- {
130
- type: "input",
131
- name: "use_when",
132
- message: "When should this skill activate? (natural language):",
133
- default: "When user requests this functionality"
134
- },
135
- {
136
- type: "confirm",
137
- name: "auto_activate",
138
- message: "Auto-activate based on context?",
139
- default: true
140
- },
141
- {
142
- type: "list",
143
- name: "context",
144
- message: "Execution context:",
145
- choices: [
146
- { name: "inherit - Share parent context", value: "inherit" },
147
- { name: "fork - Isolated context", value: "fork" }
148
- ],
149
- default: "inherit"
150
- },
151
- {
152
- type: "number",
153
- name: "priority",
154
- message: "Priority (1-10, higher = more priority):",
155
- default: 5,
156
- validate: (input) => input >= 1 && input <= 10 ? true : "Must be between 1 and 10"
157
- },
158
- {
159
- type: "confirm",
160
- name: "hasArgs",
161
- message: "Does this skill accept arguments ($0, $1, etc.)?",
162
- default: false
163
- },
164
- {
98
+ return true;
99
+ }
100
+ });
101
+ const { title } = await inquirer.prompt({
102
+ type: "input",
103
+ name: "title",
104
+ message: "Skill title:",
105
+ default: skillName.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ")
106
+ });
107
+ const { description } = await inquirer.prompt({
108
+ type: "input",
109
+ name: "description",
110
+ message: "Brief description:",
111
+ default: "A custom skill for CCJK"
112
+ });
113
+ const { template: selectedTemplate } = await inquirer.prompt({
114
+ type: "list",
115
+ name: "template",
116
+ message: "Select template:",
117
+ choices: availableTemplates.map((t) => ({
118
+ name: t === "basic" ? `${t} (blank template)` : t,
119
+ value: t
120
+ })),
121
+ default: "basic"
122
+ });
123
+ const { category } = await inquirer.prompt({
124
+ type: "list",
125
+ name: "category",
126
+ message: "Category:",
127
+ choices: categories,
128
+ default: "custom"
129
+ });
130
+ const { use_when } = await inquirer.prompt({
131
+ type: "input",
132
+ name: "use_when",
133
+ message: "When should this skill activate? (natural language):",
134
+ default: "When user requests this functionality"
135
+ });
136
+ const { auto_activate } = await inquirer.prompt({
137
+ type: "confirm",
138
+ name: "auto_activate",
139
+ message: "Auto-activate based on context?",
140
+ default: true
141
+ });
142
+ const { context } = await inquirer.prompt({
143
+ type: "list",
144
+ name: "context",
145
+ message: "Execution context:",
146
+ choices: [
147
+ { name: "inherit - Share parent context", value: "inherit" },
148
+ { name: "fork - Isolated context", value: "fork" }
149
+ ],
150
+ default: "inherit"
151
+ });
152
+ const { priority } = await inquirer.prompt({
153
+ type: "number",
154
+ name: "priority",
155
+ message: "Priority (1-10, higher = more priority):",
156
+ default: 5,
157
+ validate: (input) => {
158
+ if (input === void 0) return "Please enter a number";
159
+ return input >= 1 && input <= 10 ? true : "Must be between 1 and 10";
160
+ }
161
+ });
162
+ const { hasArgs } = await inquirer.prompt({
163
+ type: "confirm",
164
+ name: "hasArgs",
165
+ message: "Does this skill accept arguments ($0, $1, etc.)?",
166
+ default: false
167
+ });
168
+ let argNames = "";
169
+ if (hasArgs) {
170
+ const result = await inquirer.prompt({
165
171
  type: "input",
166
172
  name: "argNames",
167
173
  message: "Argument names (comma-separated):",
168
- when: (ans) => ans.hasArgs,
169
174
  default: "file,options"
170
- },
171
- {
172
- type: "list",
173
- name: "targetDir",
174
- message: "Where to create the skill?",
175
- choices: [
176
- { name: `~/.claude/skills (global)`, value: join(homedir(), ".claude", "skills") },
177
- { name: `.claude/skills (project)`, value: join(process.cwd(), ".claude", "skills") }
178
- ],
179
- default: join(homedir(), ".claude", "skills")
180
- }
181
- ]);
175
+ });
176
+ argNames = result.argNames;
177
+ }
178
+ const { targetDir } = await inquirer.prompt({
179
+ type: "list",
180
+ name: "targetDir",
181
+ message: "Where to create the skill?",
182
+ choices: [
183
+ { name: `~/.claude/skills (global)`, value: join(homedir(), ".claude", "skills") },
184
+ { name: `.claude/skills (project)`, value: join(process.cwd(), ".claude", "skills") }
185
+ ],
186
+ default: join(homedir(), ".claude", "skills")
187
+ });
188
+ const answers = {
189
+ name: skillName,
190
+ title,
191
+ description,
192
+ template: selectedTemplate,
193
+ category,
194
+ use_when,
195
+ auto_activate,
196
+ context,
197
+ priority,
198
+ hasArgs,
199
+ argNames,
200
+ targetDir
201
+ };
182
202
  const args = answers.hasArgs && answers.argNames ? answers.argNames.split(",").map((name2, index) => ({
183
203
  name: name2.trim(),
184
204
  description: `Argument ${index + 1}`,
@@ -214,12 +234,12 @@ Add your specific instructions for Claude.`
214
234
  }
215
235
  const skillPath = join(answers.targetDir, `${answers.name}.md`);
216
236
  if (existsSync(skillPath)) {
217
- const { overwrite } = await inquirer.prompt([{
237
+ const { overwrite } = await inquirer.prompt({
218
238
  type: "confirm",
219
239
  name: "overwrite",
220
240
  message: `Skill ${answers.name}.md already exists. Overwrite?`,
221
241
  default: false
222
- }]);
242
+ });
223
243
  if (!overwrite) {
224
244
  console.log(ansis.yellow("\nSkill creation cancelled."));
225
245
  return;
package/dist/cli.mjs CHANGED
File without changes
package/dist/index.mjs CHANGED
@@ -11,13 +11,14 @@ import { exec, spawn } from 'node:child_process';
11
11
  import { promises, createReadStream } from 'node:fs';
12
12
  import * as os from 'node:os';
13
13
  import { promisify } from 'node:util';
14
- export { b as generateCompactWelcome, c as generateRecommendations, d as generateWelcome, g as getCapabilitiesByType, a as getCapability, s as scanCapabilities } from './shared/ccjk.3Rl727PQ.mjs';
14
+ export { b as generateCompactWelcome, c as generateRecommendations, d as generateWelcome, g as getCapabilitiesByType, a as getCapability, s as scanCapabilities } from './shared/ccjk.tO8zeFh1.mjs';
15
15
  export { j as config } from './chunks/config.mjs';
16
16
  export { e as extractDisplayName, a as extractString, i as i18nHelpers, n as normalizeRecommendation, b as normalizeRecommendations } from './shared/ccjk.AqnXPAzw.mjs';
17
17
  export { p as platform } from './chunks/platform.mjs';
18
18
  import { Transform } from 'node:stream';
19
19
  import { pipeline } from 'node:stream/promises';
20
20
  import 'pathe';
21
+ import './chunks/package.mjs';
21
22
  import 'node:url';
22
23
  import 'dayjs';
23
24
  import './chunks/constants.mjs';
@@ -3,6 +3,7 @@ import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
3
3
  import { homedir } from 'node:os';
4
4
  import { join } from 'pathe';
5
5
  import ansis from 'ansis';
6
+ import { version } from '../chunks/package.mjs';
6
7
 
7
8
  const CLAUDE_DIR = join(homedir(), ".claude");
8
9
  const COMMANDS_DIR = join(CLAUDE_DIR, "commands", "ccjk");
@@ -264,12 +265,7 @@ function leftText(text, width) {
264
265
  return `${BOX_CHARS.vertical} ${text}${" ".repeat(padding - 1)}${BOX_CHARS.vertical}`;
265
266
  }
266
267
  function getVersion() {
267
- try {
268
- const pkg = require("../../../package.json");
269
- return pkg.version || "0.0.0";
270
- } catch {
271
- return "0.0.0";
272
- }
268
+ return version;
273
269
  }
274
270
  function generateWelcome(scanResult, options = {}) {
275
271
  const {
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "ccjk",
3
3
  "type": "module",
4
- "version": "9.4.4",
4
+ "version": "9.4.6",
5
+ "packageManager": "pnpm@10.17.1",
5
6
  "description": "CCJK v9.0.0 - Revolutionary AI Development Platform with Enterprise Security, Streaming Cloud Sync, CRDT Conflict Resolution, and Unified V3 Architecture",
6
7
  "author": {
7
8
  "name": "CCJK Team",
@@ -73,64 +74,12 @@
73
74
  "engines": {
74
75
  "node": ">=20"
75
76
  },
76
- "dependencies": {
77
- "@anthropic-ai/sdk": "^0.52.0",
78
- "ansis": "^4.1.0",
79
- "cac": "^6.7.14",
80
- "chokidar": "^4.0.3",
81
- "consola": "^3.4.2",
82
- "dayjs": "^1.11.18",
83
- "find-up-simple": "^1.0.1",
84
- "fs-extra": "^11.3.2",
85
- "gray-matter": "^4.0.3",
86
- "handlebars": "^4.7.8",
87
- "i18next": "^25.5.2",
88
- "i18next-fs-backend": "^2.6.0",
89
- "inquirer": "^12.9.6",
90
- "inquirer-toggle": "^1.0.1",
91
- "ioredis": "^5.9.2",
92
- "nanoid": "^5.1.6",
93
- "ofetch": "^1.5.1",
94
- "ohash": "^2.0.11",
95
- "ora": "^9.0.0",
96
- "pathe": "^2.0.3",
97
- "semver": "^7.7.2",
98
- "smol-toml": "^1.4.2",
99
- "tar": "^7.5.2",
100
- "tinyexec": "^1.0.1",
101
- "trash": "^10.0.0",
102
- "uuid": "^11.1.0",
103
- "web-tree-sitter": "^0.26.3"
104
- },
105
- "devDependencies": {
106
- "@antfu/eslint-config": "^5.4.1",
107
- "@types/fs-extra": "^11.0.4",
108
- "@types/inquirer": "^9.0.9",
109
- "@types/node": "^22.18.6",
110
- "@types/semver": "^7.7.1",
111
- "@types/uuid": "^11.0.0",
112
- "@typescript-eslint/eslint-plugin": "^6.0.0",
113
- "@typescript-eslint/parser": "^6.0.0",
114
- "@vitest/coverage-v8": "^3.2.4",
115
- "@vitest/ui": "^3.2.4",
116
- "concurrently": "^9.2.1",
117
- "eslint": "^9.36.0",
118
- "eslint-plugin-format": "^1.0.2",
119
- "glob": "^11.0.3",
120
- "husky": "^9.1.7",
121
- "lint-staged": "^16.2.0",
122
- "prettier": "^3.0.0",
123
- "tinyglobby": "^0.2.15",
124
- "tsx": "^4.20.5",
125
- "typescript": "^5.9.2",
126
- "unbuild": "^3.6.1",
127
- "vitest": "^3.2.4"
128
- },
129
77
  "scripts": {
130
78
  "dev": "tsx ./src/cli.ts",
131
79
  "build": "unbuild",
132
80
  "start": "node bin/ccjk.mjs",
133
81
  "typecheck": "tsc --noEmit",
82
+ "prepublishOnly": "node scripts/validate-prepublish.mjs && pnpm build && pnpm test:run",
134
83
  "lint": "eslint",
135
84
  "lint:fix": "eslint --fix",
136
85
  "test": "vitest",
@@ -148,6 +97,7 @@
148
97
  "test:v2:coverage": "vitest run --config vitest.config.v2.ts --coverage",
149
98
  "test:v2:run": "vitest run --config vitest.config.v2.ts",
150
99
  "test:v2:watch": "vitest watch --config vitest.config.v2.ts",
100
+ "prepare": "husky",
151
101
  "format": "prettier --write src/**/*.ts",
152
102
  "prepublish:fix": "node scripts/fix-package-catalog.mjs",
153
103
  "cleanup": "node scripts/cleanup.js",
@@ -180,5 +130,58 @@
180
130
  "benchmark:open": "open docs/v2/dashboard.html || xdg-open docs/v2/dashboard.html || start docs/v2/dashboard.html",
181
131
  "i18n:check": "tsx scripts/check-i18n.ts",
182
132
  "i18n:report": "tsx scripts/check-i18n.ts --report"
133
+ },
134
+ "dependencies": {
135
+ "@anthropic-ai/sdk": "^0.52.0",
136
+ "ansis": "^4.1.0",
137
+ "cac": "^6.7.14",
138
+ "chokidar": "^4.0.3",
139
+ "consola": "^3.4.2",
140
+ "dayjs": "^1.11.18",
141
+ "find-up-simple": "^1.0.1",
142
+ "fs-extra": "^11.3.2",
143
+ "gray-matter": "^4.0.3",
144
+ "handlebars": "^4.7.8",
145
+ "i18next": "^25.5.2",
146
+ "i18next-fs-backend": "^2.6.0",
147
+ "inquirer": "^12.9.6",
148
+ "inquirer-toggle": "^1.0.1",
149
+ "ioredis": "^5.9.2",
150
+ "nanoid": "^5.1.6",
151
+ "ofetch": "^1.5.1",
152
+ "ohash": "^2.0.11",
153
+ "ora": "^9.0.0",
154
+ "pathe": "^2.0.3",
155
+ "semver": "^7.7.2",
156
+ "smol-toml": "^1.4.2",
157
+ "tar": "^7.5.2",
158
+ "tinyexec": "^1.0.1",
159
+ "trash": "^10.0.0",
160
+ "uuid": "^11.1.0",
161
+ "web-tree-sitter": "^0.26.3"
162
+ },
163
+ "devDependencies": {
164
+ "@antfu/eslint-config": "^5.4.1",
165
+ "@types/fs-extra": "^11.0.4",
166
+ "@types/inquirer": "^9.0.9",
167
+ "@types/node": "^22.18.6",
168
+ "@types/semver": "^7.7.1",
169
+ "@types/uuid": "^11.0.0",
170
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
171
+ "@typescript-eslint/parser": "^6.0.0",
172
+ "@vitest/coverage-v8": "^3.2.4",
173
+ "@vitest/ui": "^3.2.4",
174
+ "concurrently": "^9.2.1",
175
+ "eslint": "^9.36.0",
176
+ "eslint-plugin-format": "^1.0.2",
177
+ "glob": "^11.0.3",
178
+ "husky": "^9.1.7",
179
+ "lint-staged": "^16.2.0",
180
+ "prettier": "^3.0.0",
181
+ "tinyglobby": "^0.2.15",
182
+ "tsx": "^4.20.5",
183
+ "typescript": "^5.9.2",
184
+ "unbuild": "^3.6.1",
185
+ "vitest": "^3.2.4"
183
186
  }
184
- }
187
+ }