@mrciphersmith/keryx 0.2.159 → 0.2.160

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.
Files changed (3) hide show
  1. package/dist/cli.js +75 -30
  2. package/dist/core.js +32 -19
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -53009,7 +53009,7 @@ import path47 from "path";
53009
53009
  // package.json
53010
53010
  var package_default = {
53011
53011
  name: "@mrciphersmith/keryx",
53012
- version: "0.2.159",
53012
+ version: "0.2.160",
53013
53013
  description: "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
53014
53014
  private: false,
53015
53015
  publishConfig: {
@@ -74308,15 +74308,15 @@ function extractCapabilities(manifest) {
74308
74308
 
74309
74309
  // src/standard/help-groups.ts
74310
74310
  var HELP_GROUP_ORDER = [
74311
- { name: "Start here", slug: "start-here" },
74312
- { name: "Connect a model provider", slug: "connect" },
74313
- { name: "Look and feel", slug: "look-and-feel" },
74314
- { name: "Working in keryx shell", slug: "shell-work" },
74315
- { name: "Project knowledge", slug: "project-knowledge" },
74316
- { name: "Managed work", slug: "managed-work" },
74317
- { name: "Automation", slug: "automation" },
74318
- { name: "External agents, ACP and MCP", slug: "external-agents" },
74319
- { name: "Maintenance and diagnostics", slug: "maintenance" }
74311
+ { name: "Start here", slug: "start-here", tab: "Start", tabShort: "Start" },
74312
+ { name: "Connect a model provider", slug: "connect", tab: "Connect", tabShort: "Conn" },
74313
+ { name: "Look and feel", slug: "look-and-feel", tab: "Look", tabShort: "Look" },
74314
+ { name: "Working in keryx shell", slug: "shell-work", tab: "Shell", tabShort: "Shell" },
74315
+ { name: "Project knowledge", slug: "project-knowledge", tab: "Knowledge", tabShort: "Know" },
74316
+ { name: "Managed work", slug: "managed-work", tab: "Work", tabShort: "Work" },
74317
+ { name: "Automation", slug: "automation", tab: "Automate", tabShort: "Auto" },
74318
+ { name: "External agents, ACP and MCP", slug: "external-agents", tab: "Agents", tabShort: "Agents" },
74319
+ { name: "Maintenance and diagnostics", slug: "maintenance", tab: "Maintain", tabShort: "Maint" }
74320
74320
  ];
74321
74321
  var HELP_GROUPS = [
74322
74322
  { kind: "cli", name: "init", group: "Start here", summary: "Initialize .metaproject in the current project." },
@@ -74762,15 +74762,29 @@ function renderEntryRows(entries, maxColumns) {
74762
74762
  }
74763
74763
  return rows;
74764
74764
  }
74765
+ var SHELL_SUBHEADING = " in keryx shell:";
74766
+ function renderGroupLines(group, maxColumns) {
74767
+ const cliEntries = entriesInGroup(group.name, "cli");
74768
+ const slashEntries = entriesInGroup(group.name, "slash");
74769
+ if (cliEntries.length === 0 && slashEntries.length === 0) {
74770
+ return [];
74771
+ }
74772
+ const lines = [`${group.name}:`];
74773
+ lines.push(...renderEntryRows(cliEntries, maxColumns));
74774
+ if (slashEntries.length > 0) {
74775
+ lines.push(SHELL_SUBHEADING);
74776
+ lines.push(...renderEntryRows(slashEntries, maxColumns));
74777
+ }
74778
+ return lines;
74779
+ }
74765
74780
  function renderGroupedCliHelp(maxColumns = HELP_DEFAULT_COLUMNS) {
74766
74781
  const lines = [];
74767
74782
  for (const group of HELP_GROUP_ORDER) {
74768
- const entries = entriesInGroup(group.name, "cli");
74769
- if (entries.length === 0) {
74783
+ const groupLines = renderGroupLines(group, maxColumns);
74784
+ if (groupLines.length === 0) {
74770
74785
  continue;
74771
74786
  }
74772
- lines.push(`${group.name}:`);
74773
- lines.push(...renderEntryRows(entries, maxColumns));
74787
+ lines.push(...groupLines);
74774
74788
  lines.push("");
74775
74789
  }
74776
74790
  return lines.join(`
@@ -74778,8 +74792,7 @@ function renderGroupedCliHelp(maxColumns = HELP_DEFAULT_COLUMNS) {
74778
74792
  `);
74779
74793
  }
74780
74794
  function renderCliGroupHelp(group, maxColumns = HELP_DEFAULT_COLUMNS) {
74781
- const entries = entriesInGroup(group.name, "cli");
74782
- const lines = [`${group.name}:`, ...renderEntryRows(entries, maxColumns)];
74795
+ const lines = renderGroupLines(group, maxColumns);
74783
74796
  return lines.join(`
74784
74797
  `) + `
74785
74798
  `;
@@ -74798,12 +74811,12 @@ function renderGroupedNamedHelp(options, maxColumns) {
74798
74811
  `) + `
74799
74812
  `;
74800
74813
  }
74801
- function renderEntryDetail(entry) {
74802
- const lines = [`${entry.name}`, "", entry.summary, ""];
74814
+ function renderEntryDetail(entry, maxColumns = HELP_DEFAULT_COLUMNS) {
74815
+ const lines = [`${entry.name}`, "", ...wrapWords(entry.summary, maxColumns), ""];
74803
74816
  if (entry.kind === "slash") {
74804
- lines.push("This is a keryx shell command \u2014 type it inside `keryx shell` (readline chat/agent mode, or the", "TUI's `/`-menu). It has no standalone CLI form.");
74817
+ lines.push(...wrapWords("This is a keryx shell command \u2014 type it inside `keryx shell` (readline chat/agent mode, or " + "the TUI's `/`-menu). It has no standalone CLI form.", maxColumns));
74805
74818
  } else {
74806
- lines.push(`Run \`keryx ${entry.name} --help\` (or \`keryx help ${entry.name}\`) for its full usage.`);
74819
+ lines.push(...wrapWords(`Run \`keryx ${entry.name} --help\` (or \`keryx help ${entry.name}\`) for its full usage.`, maxColumns));
74807
74820
  }
74808
74821
  return lines.join(`
74809
74822
  `) + `
@@ -109997,7 +110010,32 @@ function openSessionInfo(otui, chrome, options) {
109997
110010
  // src/tui/help-modal.ts
109998
110011
  var HELP_MODAL_TITLE = "/help";
109999
110012
  var HELP_MODAL_KEYS = "keys: \u2191/\u2193 select \xB7 enter details \xB7 \u2190/\u2192 tabs \xB7 esc close";
110000
- var HELP_MODAL_TABS = HELP_GROUP_ORDER.map((g) => ({ id: g.slug, label: g.name }));
110013
+ var HELP_MODAL_TABS = HELP_GROUP_ORDER.map((g) => ({ id: g.slug, label: g.tab }));
110014
+ var HELP_MODAL_TABS_SHORT = HELP_GROUP_ORDER.map((g) => ({ id: g.slug, label: g.tabShort }));
110015
+ function tabStripWidth(labels) {
110016
+ return labels.reduce((total, label, i) => total + label.length + 2 + (i === 0 ? 0 : 1), 0);
110017
+ }
110018
+ var READABLE_TAB_STRIP_WIDTH = tabStripWidth(HELP_MODAL_TABS.map((t) => t.label));
110019
+ function pickTabs(chrome, options) {
110020
+ let cols;
110021
+ let rows;
110022
+ if (options.renderer !== undefined) {
110023
+ cols = options.renderer.width;
110024
+ rows = options.renderer.height;
110025
+ } else {
110026
+ const c = chrome;
110027
+ if (c?.renderer !== undefined) {
110028
+ cols = resolveModalAvailableWidth(c);
110029
+ rows = c.renderer.height;
110030
+ }
110031
+ }
110032
+ if (typeof cols !== "number" || typeof rows !== "number") {
110033
+ return HELP_MODAL_TABS_SHORT;
110034
+ }
110035
+ const panelWidth = Math.min(cols, resolveModalPanelSize(cols, rows).width);
110036
+ const innerWidth = panelWidth - MODAL_PANEL_CHROME_X;
110037
+ return READABLE_TAB_STRIP_WIDTH <= innerWidth ? HELP_MODAL_TABS : HELP_MODAL_TABS_SHORT;
110038
+ }
110001
110039
  function entriesForGroup(group) {
110002
110040
  return [...entriesInGroup(group.name, "cli"), ...entriesInGroup(group.name, "slash")];
110003
110041
  }
@@ -110010,9 +110048,10 @@ function openHelpModal(otui, chrome, options) {
110010
110048
  const core = otui;
110011
110049
  const r = chrome?.renderer;
110012
110050
  const bodyRows = bodyRowsFor2(chrome, options);
110051
+ const tabs = pickTabs(chrome, options);
110013
110052
  const states = new Map(HELP_GROUP_ORDER.map((group) => [
110014
110053
  group.slug,
110015
- { entries: entriesForGroup(group), selected: 0, detail: false, scroll: 0 }
110054
+ { groupName: group.name, entries: entriesForGroup(group), selected: 0, detail: false, scroll: 0 }
110016
110055
  ]));
110017
110056
  let width;
110018
110057
  let bodyNode;
@@ -110020,23 +110059,29 @@ function openHelpModal(otui, chrome, options) {
110020
110059
  const keys = {};
110021
110060
  const host = {};
110022
110061
  const activeState = () => {
110023
- const id = host.handle?.activeTab() ?? (HELP_MODAL_TABS[0]?.id ?? "");
110062
+ const id = host.handle?.activeTab() ?? (tabs[0]?.id ?? "");
110024
110063
  const existing = states.get(id);
110025
110064
  if (existing !== undefined) {
110026
110065
  return existing;
110027
110066
  }
110028
- const fallback = { entries: [], selected: 0, detail: false, scroll: 0 };
110067
+ const fallback = { groupName: "", entries: [], selected: 0, detail: false, scroll: 0 };
110029
110068
  states.set(id, fallback);
110030
110069
  return fallback;
110031
110070
  };
110032
110071
  const tabLines = (state) => {
110072
+ const heading = `${state.groupName}:`;
110033
110073
  if (state.entries.length === 0) {
110034
- return [HELP_MODAL_KEYS, "", "(no commands in this group)"];
110074
+ return [heading, HELP_MODAL_KEYS, "", "(no commands in this group)"];
110035
110075
  }
110036
110076
  if (state.detail) {
110037
110077
  const entry = state.entries[state.selected];
110038
- return [HELP_MODAL_KEYS, "", ...entry === undefined ? ["(nothing selected)"] : wrapLines(renderEntryDetail(entry), width).split(`
110039
- `)];
110078
+ return [
110079
+ heading,
110080
+ HELP_MODAL_KEYS,
110081
+ "",
110082
+ ...entry === undefined ? ["(nothing selected)"] : wrapLines(renderEntryDetail(entry), width).split(`
110083
+ `)
110084
+ ];
110040
110085
  }
110041
110086
  const rows = state.entries.map((entry, i) => {
110042
110087
  const marker = i === state.selected ? ">" : " ";
@@ -110045,7 +110090,7 @@ function openHelpModal(otui, chrome, options) {
110045
110090
  `).join(`
110046
110091
  `);
110047
110092
  });
110048
- return [HELP_MODAL_KEYS, "", ...rows];
110093
+ return [heading, HELP_MODAL_KEYS, "", ...rows];
110049
110094
  };
110050
110095
  const paint = () => {
110051
110096
  if (closed) {
@@ -110054,7 +110099,7 @@ function openHelpModal(otui, chrome, options) {
110054
110099
  const state = activeState();
110055
110100
  const lines = tabLines(state);
110056
110101
  if (!state.detail) {
110057
- state.scroll = scrollToReveal(state.selected + 2, state.scroll, bodyRows);
110102
+ state.scroll = scrollToReveal(state.selected + 3, state.scroll, bodyRows);
110058
110103
  }
110059
110104
  state.scroll = clampScroll(state.scroll, lines.length, bodyRows);
110060
110105
  if (bodyNode !== undefined) {
@@ -110065,7 +110110,7 @@ function openHelpModal(otui, chrome, options) {
110065
110110
  const initialTab = options.initialGroupSlug !== undefined && groupBySlug(options.initialGroupSlug) !== undefined ? options.initialGroupSlug : undefined;
110066
110111
  const handle = openModal(core, chrome, {
110067
110112
  title: HELP_MODAL_TITLE,
110068
- tabs: HELP_MODAL_TABS,
110113
+ tabs,
110069
110114
  ...initialTab !== undefined ? { initialTab } : {},
110070
110115
  footer: [
110071
110116
  { key: "\u2191/\u2193", label: "select" },
package/dist/core.js CHANGED
@@ -26937,15 +26937,15 @@ function extractCapabilities(manifest) {
26937
26937
 
26938
26938
  // src/standard/help-groups.ts
26939
26939
  var HELP_GROUP_ORDER = [
26940
- { name: "Start here", slug: "start-here" },
26941
- { name: "Connect a model provider", slug: "connect" },
26942
- { name: "Look and feel", slug: "look-and-feel" },
26943
- { name: "Working in keryx shell", slug: "shell-work" },
26944
- { name: "Project knowledge", slug: "project-knowledge" },
26945
- { name: "Managed work", slug: "managed-work" },
26946
- { name: "Automation", slug: "automation" },
26947
- { name: "External agents, ACP and MCP", slug: "external-agents" },
26948
- { name: "Maintenance and diagnostics", slug: "maintenance" }
26940
+ { name: "Start here", slug: "start-here", tab: "Start", tabShort: "Start" },
26941
+ { name: "Connect a model provider", slug: "connect", tab: "Connect", tabShort: "Conn" },
26942
+ { name: "Look and feel", slug: "look-and-feel", tab: "Look", tabShort: "Look" },
26943
+ { name: "Working in keryx shell", slug: "shell-work", tab: "Shell", tabShort: "Shell" },
26944
+ { name: "Project knowledge", slug: "project-knowledge", tab: "Knowledge", tabShort: "Know" },
26945
+ { name: "Managed work", slug: "managed-work", tab: "Work", tabShort: "Work" },
26946
+ { name: "Automation", slug: "automation", tab: "Automate", tabShort: "Auto" },
26947
+ { name: "External agents, ACP and MCP", slug: "external-agents", tab: "Agents", tabShort: "Agents" },
26948
+ { name: "Maintenance and diagnostics", slug: "maintenance", tab: "Maintain", tabShort: "Maint" }
26949
26949
  ];
26950
26950
  var HELP_GROUPS = [
26951
26951
  { kind: "cli", name: "init", group: "Start here", summary: "Initialize .metaproject in the current project." },
@@ -27408,15 +27408,29 @@ function renderEntryRows(entries, maxColumns) {
27408
27408
  }
27409
27409
  return rows;
27410
27410
  }
27411
+ var SHELL_SUBHEADING = " in keryx shell:";
27412
+ function renderGroupLines(group, maxColumns) {
27413
+ const cliEntries = entriesInGroup(group.name, "cli");
27414
+ const slashEntries = entriesInGroup(group.name, "slash");
27415
+ if (cliEntries.length === 0 && slashEntries.length === 0) {
27416
+ return [];
27417
+ }
27418
+ const lines = [`${group.name}:`];
27419
+ lines.push(...renderEntryRows(cliEntries, maxColumns));
27420
+ if (slashEntries.length > 0) {
27421
+ lines.push(SHELL_SUBHEADING);
27422
+ lines.push(...renderEntryRows(slashEntries, maxColumns));
27423
+ }
27424
+ return lines;
27425
+ }
27411
27426
  function renderGroupedCliHelp(maxColumns = HELP_DEFAULT_COLUMNS) {
27412
27427
  const lines = [];
27413
27428
  for (const group of HELP_GROUP_ORDER) {
27414
- const entries = entriesInGroup(group.name, "cli");
27415
- if (entries.length === 0) {
27429
+ const groupLines = renderGroupLines(group, maxColumns);
27430
+ if (groupLines.length === 0) {
27416
27431
  continue;
27417
27432
  }
27418
- lines.push(`${group.name}:`);
27419
- lines.push(...renderEntryRows(entries, maxColumns));
27433
+ lines.push(...groupLines);
27420
27434
  lines.push("");
27421
27435
  }
27422
27436
  return lines.join(`
@@ -27424,8 +27438,7 @@ function renderGroupedCliHelp(maxColumns = HELP_DEFAULT_COLUMNS) {
27424
27438
  `);
27425
27439
  }
27426
27440
  function renderCliGroupHelp(group, maxColumns = HELP_DEFAULT_COLUMNS) {
27427
- const entries = entriesInGroup(group.name, "cli");
27428
- const lines = [`${group.name}:`, ...renderEntryRows(entries, maxColumns)];
27441
+ const lines = renderGroupLines(group, maxColumns);
27429
27442
  return lines.join(`
27430
27443
  `) + `
27431
27444
  `;
@@ -27459,12 +27472,12 @@ function renderGroupedNamedHelp(options, maxColumns) {
27459
27472
  `) + `
27460
27473
  `;
27461
27474
  }
27462
- function renderEntryDetail(entry) {
27463
- const lines = [`${entry.name}`, "", entry.summary, ""];
27475
+ function renderEntryDetail(entry, maxColumns = HELP_DEFAULT_COLUMNS) {
27476
+ const lines = [`${entry.name}`, "", ...wrapWords(entry.summary, maxColumns), ""];
27464
27477
  if (entry.kind === "slash") {
27465
- lines.push("This is a keryx shell command \u2014 type it inside `keryx shell` (readline chat/agent mode, or the", "TUI's `/`-menu). It has no standalone CLI form.");
27478
+ lines.push(...wrapWords("This is a keryx shell command \u2014 type it inside `keryx shell` (readline chat/agent mode, or " + "the TUI's `/`-menu). It has no standalone CLI form.", maxColumns));
27466
27479
  } else {
27467
- lines.push(`Run \`keryx ${entry.name} --help\` (or \`keryx help ${entry.name}\`) for its full usage.`);
27480
+ lines.push(...wrapWords(`Run \`keryx ${entry.name} --help\` (or \`keryx help ${entry.name}\`) for its full usage.`, maxColumns));
27468
27481
  }
27469
27482
  return lines.join(`
27470
27483
  `) + `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.2.159",
3
+ "version": "0.2.160",
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": {