@mrciphersmith/keryx 0.4.37 → 0.4.38

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/core.js CHANGED
@@ -25103,6 +25103,45 @@ var init_templates2 = __esm(() => {
25103
25103
  ];
25104
25104
  });
25105
25105
 
25106
+ // src/wiki/page-groups.ts
25107
+ function parseGroupSize(raw) {
25108
+ const text = raw.trim();
25109
+ const match = /^(\d+)(?:\s*-\s*(\d+))?$/.exec(text);
25110
+ if (match === null) {
25111
+ throw new Error(`--group-size must be N or MIN-MAX (e.g. 10-20), got "${raw}"`);
25112
+ }
25113
+ const min = Number.parseInt(match[1], 10);
25114
+ const max = match[2] !== undefined ? Number.parseInt(match[2], 10) : min;
25115
+ if (min < 1 || max < min) {
25116
+ throw new Error(`--group-size needs 1 <= MIN <= MAX, got "${raw}"`);
25117
+ }
25118
+ if (max > MAX_GROUP_SIZE) {
25119
+ throw new Error(`--group-size MAX is capped at ${MAX_GROUP_SIZE}, got ${max}`);
25120
+ }
25121
+ return { min, max };
25122
+ }
25123
+ function parsePagesArgument(raw, readFile) {
25124
+ const fromFile = readFile(raw);
25125
+ const text = fromFile ?? raw;
25126
+ const trimmed = text.trim();
25127
+ if (fromFile !== null && trimmed.startsWith("[")) {
25128
+ const parsed = JSON.parse(trimmed);
25129
+ if (!Array.isArray(parsed) || !parsed.every((v) => typeof v === "string")) {
25130
+ throw new Error(`--pages file ${raw} must hold a JSON array of strings`);
25131
+ }
25132
+ return dedupe2(parsed.map((v) => v.trim()).filter((v) => v.length > 0));
25133
+ }
25134
+ return dedupe2(trimmed.split(/[\n,]/).map((v) => v.trim()).filter((v) => v.length > 0 && !v.startsWith("#")));
25135
+ }
25136
+ function dedupe2(values) {
25137
+ return [...new Set(values)];
25138
+ }
25139
+ var DEFAULT_GROUP_SIZE, MAX_GROUP_SIZE = 50;
25140
+ var init_page_groups = __esm(() => {
25141
+ init_backlinks();
25142
+ DEFAULT_GROUP_SIZE = { min: 10, max: 20 };
25143
+ });
25144
+
25106
25145
  // src/wiki/template-structure.ts
25107
25146
  function validateTemplateStructure(pageType, content, options = {}) {
25108
25147
  const kind = options.template ?? templateKindForPageType(pageType);
@@ -25225,6 +25264,7 @@ var init_template_structure = __esm(() => {
25225
25264
  // src/wiki/service.ts
25226
25265
  var exports_service4 = {};
25227
25266
  __export(exports_service4, {
25267
+ DEFAULT_GROUP_SIZE: () => DEFAULT_GROUP_SIZE,
25228
25268
  collectGraphWikiCandidates: () => collectGraphWikiCandidates,
25229
25269
  createGdWikiService: () => createGdWikiService,
25230
25270
  extractModuleApi: () => extractModuleApi,
@@ -25233,6 +25273,8 @@ __export(exports_service4, {
25233
25273
  moduleNameFromProjectPath: () => moduleNameFromProjectPath,
25234
25274
  openWikiWriteContext: () => openWikiWriteContext,
25235
25275
  pageHistoryDir: () => pageHistoryDir,
25276
+ parseGroupSize: () => parseGroupSize,
25277
+ parsePagesArgument: () => parsePagesArgument,
25236
25278
  parseVersionLabel: () => parseVersionLabel,
25237
25279
  printWikiUndoHint: () => printWikiUndoHint,
25238
25280
  readPageHistory: () => readPageHistory,
@@ -26470,6 +26512,7 @@ var init_service4 = __esm(() => {
26470
26512
  init_templates2();
26471
26513
  init_types3();
26472
26514
  init_history();
26515
+ init_page_groups();
26473
26516
  EXTERNAL_LINK = /^(https?:|mailto:|tel:)/i;
26474
26517
  WIKI_PAGE_PRODUCERS = [
26475
26518
  {
@@ -21794,6 +21794,11 @@ var init_templates2 = __esm(() => {
21794
21794
  init_types3();
21795
21795
  });
21796
21796
 
21797
+ // src/wiki/page-groups.ts
21798
+ var init_page_groups = __esm(() => {
21799
+ init_backlinks();
21800
+ });
21801
+
21797
21802
  // src/wiki/service.ts
21798
21803
  var init_service4 = __esm(() => {
21799
21804
  init_data_dir();
@@ -21813,6 +21818,7 @@ var init_service4 = __esm(() => {
21813
21818
  init_templates2();
21814
21819
  init_types3();
21815
21820
  init_history();
21821
+ init_page_groups();
21816
21822
  });
21817
21823
 
21818
21824
  // src/sac/preserved-wrap-up.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.4.37",
3
+ "version": "0.4.38",
4
4
  "description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
5
5
  "private": false,
6
6
  "publishConfig": {