claudekit-cli 3.39.3-dev.6 → 3.39.3-dev.8

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 CHANGED
@@ -42305,6 +42305,13 @@ function normalizeMigrateProviderToken(token) {
42305
42305
  const unwrapped = trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'") ? trimmed.slice(1, -1) : trimmed;
42306
42306
  return unwrapped.trim().toLowerCase();
42307
42307
  }
42308
+ function normalizeGeminiModelValue(value) {
42309
+ if (typeof value !== "string") {
42310
+ return value;
42311
+ }
42312
+ const normalized = value.trim().toLowerCase();
42313
+ return LEGACY_GEMINI_MODEL_ALIASES[normalized] ?? normalized;
42314
+ }
42308
42315
  function parseMigrateProvidersString(value) {
42309
42316
  const trimmed = value.trim();
42310
42317
  if (!trimmed)
@@ -42353,7 +42360,14 @@ function normalizeCkConfigInput(value) {
42353
42360
  return value;
42354
42361
  }
42355
42362
  const normalized = structuredClone(value);
42363
+ const gemini = normalized.gemini;
42356
42364
  const updatePipeline = normalized.updatePipeline;
42365
+ if (gemini && typeof gemini === "object" && !Array.isArray(gemini)) {
42366
+ const geminiConfig = gemini;
42367
+ if ("model" in geminiConfig) {
42368
+ geminiConfig.model = normalizeGeminiModelValue(geminiConfig.model);
42369
+ }
42370
+ }
42357
42371
  if (updatePipeline && typeof updatePipeline === "object" && !Array.isArray(updatePipeline)) {
42358
42372
  const pipeline = updatePipeline;
42359
42373
  if ("migrateProviders" in pipeline) {
@@ -42362,7 +42376,7 @@ function normalizeCkConfigInput(value) {
42362
42376
  }
42363
42377
  return normalized;
42364
42378
  }
42365
- var PlanValidationModeSchema, PlanFocusAreaSchema, PlanResolutionOrderSchema, ProjectTypeSchema, PackageManagerSchema, FrameworkSchema, GeminiModelSchema, StatuslineModeSchema, CodingLevelSchema, PlanResolutionSchema, PlanValidationSchema, CkPlanConfigSchema, CkDocsConfigSchema, CkPathsConfigSchema, CkLocaleConfigSchema, CkTrustConfigSchema, CkProjectConfigSchema, CkGeminiConfigSchema, CkSkillsConfigSchema, UpdatePipelineSchema, ResolvedModelConfigSchema, ModelTierMapSchema, CkModelTaxonomySchema, CkAssertionSchema, CkHooksConfigSchema, CkConfigSchema, DEFAULT_CK_CONFIG, CK_HOOK_NAMES;
42379
+ var PlanValidationModeSchema, PlanFocusAreaSchema, PlanResolutionOrderSchema, ProjectTypeSchema, PackageManagerSchema, FrameworkSchema, GEMINI_MODEL_VALUES, LEGACY_GEMINI_MODEL_ALIASES, GeminiModelSchema, StatuslineModeSchema, CodingLevelSchema, PlanResolutionSchema, PlanValidationSchema, CkPlanConfigSchema, CkDocsConfigSchema, CkPathsConfigSchema, CkLocaleConfigSchema, CkTrustConfigSchema, CkProjectConfigSchema, CkGeminiConfigSchema, CkSkillsConfigSchema, UpdatePipelineSchema, ResolvedModelConfigSchema, ModelTierMapSchema, CkModelTaxonomySchema, CkAssertionSchema, CkHooksConfigSchema, CkConfigSchema, DEFAULT_CK_CONFIG, CK_HOOK_NAMES;
42366
42380
  var init_ck_config = __esm(() => {
42367
42381
  init_zod();
42368
42382
  PlanValidationModeSchema = exports_external.enum(["prompt", "auto", "strict", "none"]);
@@ -42401,12 +42415,19 @@ var init_ck_config = __esm(() => {
42401
42415
  "fastify",
42402
42416
  "none"
42403
42417
  ]);
42404
- GeminiModelSchema = exports_external.enum([
42418
+ GEMINI_MODEL_VALUES = [
42405
42419
  "gemini-2.5-flash",
42406
42420
  "gemini-2.5-pro",
42407
42421
  "gemini-3-pro-preview",
42408
42422
  "gemini-3-flash-preview"
42409
- ]);
42423
+ ];
42424
+ LEGACY_GEMINI_MODEL_ALIASES = {
42425
+ "gemini-3.0-flash": "gemini-3-flash-preview",
42426
+ "gemini-3.0-pro": "gemini-3-pro-preview",
42427
+ "gemini-3-flash": "gemini-3-flash-preview",
42428
+ "gemini-3-pro": "gemini-3-pro-preview"
42429
+ };
42430
+ GeminiModelSchema = exports_external.enum(GEMINI_MODEL_VALUES);
42410
42431
  StatuslineModeSchema = exports_external.enum(["full", "compact", "minimal", "none"]);
42411
42432
  CodingLevelSchema = exports_external.number().int().min(-1).max(5);
42412
42433
  PlanResolutionSchema = exports_external.object({
@@ -42491,6 +42512,7 @@ var init_ck_config = __esm(() => {
42491
42512
  codingLevel: CodingLevelSchema.optional(),
42492
42513
  statusline: StatuslineModeSchema.optional(),
42493
42514
  statuslineColors: exports_external.boolean().optional(),
42515
+ statuslineQuota: exports_external.boolean().optional(),
42494
42516
  privacyBlock: exports_external.boolean().optional(),
42495
42517
  docs: CkDocsConfigSchema.optional(),
42496
42518
  plan: CkPlanConfigSchema.optional(),
@@ -42509,6 +42531,7 @@ var init_ck_config = __esm(() => {
42509
42531
  codingLevel: -1,
42510
42532
  statusline: "full",
42511
42533
  statuslineColors: true,
42534
+ statuslineQuota: true,
42512
42535
  privacyBlock: true,
42513
42536
  docs: {
42514
42537
  maxLoc: 800
@@ -43015,14 +43038,17 @@ class CkConfigManager {
43015
43038
  if (!existsSync12(configDir)) {
43016
43039
  await mkdir5(configDir, { recursive: true });
43017
43040
  }
43018
- let existingConfig = {};
43019
- if (existsSync12(configPath)) {
43041
+ let existingConfig = await CkConfigManager.loadScope(scope, projectDir);
43042
+ if (!existingConfig && existsSync12(configPath)) {
43020
43043
  try {
43021
43044
  const content = await readFile8(configPath, "utf-8");
43022
- existingConfig = JSON.parse(content);
43045
+ const parsed = JSON.parse(content);
43046
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
43047
+ existingConfig = normalizeCkConfigInput(parsed);
43048
+ }
43023
43049
  } catch {}
43024
43050
  }
43025
- const mergedConfig = deepMerge(existingConfig, validConfig);
43051
+ const mergedConfig = deepMerge(existingConfig || {}, validConfig);
43026
43052
  await writeFile6(configPath, JSON.stringify(mergedConfig, null, 2), "utf-8");
43027
43053
  logger.debug(`Config saved to ${configPath}`);
43028
43054
  return configPath;
@@ -48464,7 +48490,7 @@ var init_ck_config_schema = __esm(() => {
48464
48490
  "gemini-3-flash-preview"
48465
48491
  ],
48466
48492
  default: "gemini-3-flash-preview",
48467
- description: "Gemini model to use for CLI commands"
48493
+ description: "Gemini model to use for CLI commands. Legacy gemini-3.0-* ids are auto-mapped to the current preview aliases when loading config."
48468
48494
  }
48469
48495
  },
48470
48496
  additionalProperties: false
@@ -48523,6 +48549,11 @@ var init_ck_config_schema = __esm(() => {
48523
48549
  default: true,
48524
48550
  description: "Enable ANSI colors in statusline output. Set false for plain text. Respects NO_COLOR/FORCE_COLOR env vars."
48525
48551
  },
48552
+ statuslineQuota: {
48553
+ type: "boolean",
48554
+ default: true,
48555
+ description: "Show the cosmetic 5h / wk quota chips in the statusline. Disable to keep the statusline layout without usage-window percentages."
48556
+ },
48526
48557
  hooks: {
48527
48558
  type: "object",
48528
48559
  description: "Toggle individual hooks on/off. Default: all enabled.",
@@ -48550,7 +48581,7 @@ var init_ck_config_schema = __esm(() => {
48550
48581
  "usage-context-awareness": {
48551
48582
  type: "boolean",
48552
48583
  default: true,
48553
- description: "UserPromptSubmit/PostToolUse hook - usage limits awareness"
48584
+ description: "UserPromptSubmit/PostToolUse hook - inject usage-limit awareness into prompt context"
48554
48585
  },
48555
48586
  "context-tracking": {
48556
48587
  type: "boolean",
@@ -48730,10 +48761,23 @@ function registerCkConfigRoutes(app) {
48730
48761
  }
48731
48762
  }
48732
48763
  const savedPath = await CkConfigManager.saveFull(parseResult.data, scope, projectDir);
48764
+ let savedConfig = await CkConfigManager.loadScope(scope, projectDir);
48765
+ if (!savedConfig) {
48766
+ try {
48767
+ const rawContent = await readFile11(savedPath, "utf-8");
48768
+ const rawConfig = JSON.parse(rawContent);
48769
+ if (rawConfig && typeof rawConfig === "object" && !Array.isArray(rawConfig)) {
48770
+ savedConfig = normalizeCkConfigInput(rawConfig);
48771
+ }
48772
+ } catch {
48773
+ savedConfig = null;
48774
+ }
48775
+ }
48733
48776
  res.json({
48734
48777
  success: true,
48735
48778
  path: savedPath,
48736
- scope
48779
+ scope,
48780
+ config: savedConfig || {}
48737
48781
  });
48738
48782
  } catch (error) {
48739
48783
  logger.error(`Failed to save ck-config: ${error}`);
@@ -57284,7 +57328,7 @@ var package_default;
57284
57328
  var init_package = __esm(() => {
57285
57329
  package_default = {
57286
57330
  name: "claudekit-cli",
57287
- version: "3.39.3-dev.6",
57331
+ version: "3.39.3-dev.8",
57288
57332
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
57289
57333
  type: "module",
57290
57334
  repository: {
@@ -75523,9 +75567,11 @@ async function handleSet(key, value, options2) {
75523
75567
  scope = selectedScope;
75524
75568
  }
75525
75569
  const projectDir = process.cwd();
75570
+ const lookupProjectDir = scope === "project" ? projectDir : null;
75526
75571
  try {
75527
75572
  await CkConfigManager.updateField(key, parsedValue, scope, projectDir);
75528
- logger.success(`Set ${key} = ${JSON.stringify(parsedValue)} (${scope === "project" ? "local" : "global"})`);
75573
+ const { value: savedValue } = await CkConfigManager.getFieldWithSource(key, lookupProjectDir);
75574
+ logger.success(`Set ${key} = ${JSON.stringify(savedValue)} (${scope === "project" ? "local" : "global"})`);
75529
75575
  } catch (error) {
75530
75576
  logger.error(`Invalid value for ${key}: ${error instanceof Error ? error.message : "Unknown"}`);
75531
75577
  process.exitCode = 1;