claudekit-cli 3.39.3-dev.5 → 3.39.3-dev.7
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
|
@@ -14335,6 +14335,32 @@ function truncateField(value, field, warnings) {
|
|
|
14335
14335
|
}
|
|
14336
14336
|
return value;
|
|
14337
14337
|
}
|
|
14338
|
+
function parseFrontmatterFallback(content) {
|
|
14339
|
+
const fmMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
14340
|
+
if (!fmMatch)
|
|
14341
|
+
return null;
|
|
14342
|
+
const fmBlock = fmMatch[1];
|
|
14343
|
+
const body = content.slice(fmMatch[0].length);
|
|
14344
|
+
const frontmatter = {};
|
|
14345
|
+
const warnings = [];
|
|
14346
|
+
const lines = fmBlock.split(/\r?\n/);
|
|
14347
|
+
for (const line of lines) {
|
|
14348
|
+
const keyMatch = line.match(/^([a-zA-Z][\w-]*)\s*:\s*(.*)/);
|
|
14349
|
+
if (!keyMatch)
|
|
14350
|
+
continue;
|
|
14351
|
+
const [, rawKey, rawValue] = keyMatch;
|
|
14352
|
+
const value = rawValue.replace(/^(['"])(.*)\1$/, "$2").trim();
|
|
14353
|
+
if (!value)
|
|
14354
|
+
continue;
|
|
14355
|
+
const mappedKey = KNOWN_KEYS[rawKey];
|
|
14356
|
+
if (mappedKey) {
|
|
14357
|
+
frontmatter[mappedKey] = truncateField(value, String(mappedKey), warnings);
|
|
14358
|
+
} else {
|
|
14359
|
+
frontmatter[rawKey] = value;
|
|
14360
|
+
}
|
|
14361
|
+
}
|
|
14362
|
+
return { frontmatter, body: body.trim(), warnings };
|
|
14363
|
+
}
|
|
14338
14364
|
function parseFrontmatter(content) {
|
|
14339
14365
|
try {
|
|
14340
14366
|
const { data, content: body } = import_gray_matter3.default(content);
|
|
@@ -14359,6 +14385,11 @@ function parseFrontmatter(content) {
|
|
|
14359
14385
|
}
|
|
14360
14386
|
return { frontmatter, body: body.trim(), warnings };
|
|
14361
14387
|
} catch (error) {
|
|
14388
|
+
const fallback = parseFrontmatterFallback(content);
|
|
14389
|
+
if (fallback && Object.keys(fallback.frontmatter).length > 0) {
|
|
14390
|
+
logger.verbose(`Failed to parse frontmatter: ${error instanceof Error ? error.message : "Unknown error"} (recovered via fallback)`);
|
|
14391
|
+
return fallback;
|
|
14392
|
+
}
|
|
14362
14393
|
logger.warning(`Failed to parse frontmatter: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
14363
14394
|
return { frontmatter: {}, body: content.trim(), warnings: [] };
|
|
14364
14395
|
}
|
|
@@ -14367,7 +14398,7 @@ async function parseFrontmatterFile(filePath) {
|
|
|
14367
14398
|
const content = await readFile5(filePath, "utf-8");
|
|
14368
14399
|
return parseFrontmatter(content);
|
|
14369
14400
|
}
|
|
14370
|
-
var import_gray_matter3, FRONTMATTER_LIMITS;
|
|
14401
|
+
var import_gray_matter3, FRONTMATTER_LIMITS, KNOWN_KEYS;
|
|
14371
14402
|
var init_frontmatter_parser = __esm(() => {
|
|
14372
14403
|
init_logger();
|
|
14373
14404
|
import_gray_matter3 = __toESM(require_gray_matter(), 1);
|
|
@@ -14379,6 +14410,14 @@ var init_frontmatter_parser = __esm(() => {
|
|
|
14379
14410
|
memory: 50,
|
|
14380
14411
|
argumentHint: 500
|
|
14381
14412
|
};
|
|
14413
|
+
KNOWN_KEYS = {
|
|
14414
|
+
name: "name",
|
|
14415
|
+
description: "description",
|
|
14416
|
+
model: "model",
|
|
14417
|
+
tools: "tools",
|
|
14418
|
+
memory: "memory",
|
|
14419
|
+
"argument-hint": "argumentHint"
|
|
14420
|
+
};
|
|
14382
14421
|
});
|
|
14383
14422
|
|
|
14384
14423
|
// src/commands/agents/agents-discovery.ts
|
|
@@ -42452,6 +42491,7 @@ var init_ck_config = __esm(() => {
|
|
|
42452
42491
|
codingLevel: CodingLevelSchema.optional(),
|
|
42453
42492
|
statusline: StatuslineModeSchema.optional(),
|
|
42454
42493
|
statuslineColors: exports_external.boolean().optional(),
|
|
42494
|
+
statuslineQuota: exports_external.boolean().optional(),
|
|
42455
42495
|
privacyBlock: exports_external.boolean().optional(),
|
|
42456
42496
|
docs: CkDocsConfigSchema.optional(),
|
|
42457
42497
|
plan: CkPlanConfigSchema.optional(),
|
|
@@ -42470,6 +42510,7 @@ var init_ck_config = __esm(() => {
|
|
|
42470
42510
|
codingLevel: -1,
|
|
42471
42511
|
statusline: "full",
|
|
42472
42512
|
statuslineColors: true,
|
|
42513
|
+
statuslineQuota: true,
|
|
42473
42514
|
privacyBlock: true,
|
|
42474
42515
|
docs: {
|
|
42475
42516
|
maxLoc: 800
|
|
@@ -48484,6 +48525,11 @@ var init_ck_config_schema = __esm(() => {
|
|
|
48484
48525
|
default: true,
|
|
48485
48526
|
description: "Enable ANSI colors in statusline output. Set false for plain text. Respects NO_COLOR/FORCE_COLOR env vars."
|
|
48486
48527
|
},
|
|
48528
|
+
statuslineQuota: {
|
|
48529
|
+
type: "boolean",
|
|
48530
|
+
default: true,
|
|
48531
|
+
description: "Show the cosmetic 5h / wk quota chips in the statusline. Disable to keep the statusline layout without usage-window percentages."
|
|
48532
|
+
},
|
|
48487
48533
|
hooks: {
|
|
48488
48534
|
type: "object",
|
|
48489
48535
|
description: "Toggle individual hooks on/off. Default: all enabled.",
|
|
@@ -48511,7 +48557,7 @@ var init_ck_config_schema = __esm(() => {
|
|
|
48511
48557
|
"usage-context-awareness": {
|
|
48512
48558
|
type: "boolean",
|
|
48513
48559
|
default: true,
|
|
48514
|
-
description: "UserPromptSubmit/PostToolUse hook - usage
|
|
48560
|
+
description: "UserPromptSubmit/PostToolUse hook - inject usage-limit awareness into prompt context"
|
|
48515
48561
|
},
|
|
48516
48562
|
"context-tracking": {
|
|
48517
48563
|
type: "boolean",
|
|
@@ -57245,7 +57291,7 @@ var package_default;
|
|
|
57245
57291
|
var init_package = __esm(() => {
|
|
57246
57292
|
package_default = {
|
|
57247
57293
|
name: "claudekit-cli",
|
|
57248
|
-
version: "3.39.3-dev.
|
|
57294
|
+
version: "3.39.3-dev.7",
|
|
57249
57295
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
57250
57296
|
type: "module",
|
|
57251
57297
|
repository: {
|