@mrciphersmith/keryx 0.2.136 → 0.2.139

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 (2) hide show
  1. package/dist/cli.js +112 -19
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -51141,7 +51141,7 @@ import path47 from "path";
51141
51141
  // package.json
51142
51142
  var package_default = {
51143
51143
  name: "@mrciphersmith/keryx",
51144
- version: "0.2.136",
51144
+ version: "0.2.139",
51145
51145
  description: "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
51146
51146
  private: false,
51147
51147
  publishConfig: {
@@ -92550,18 +92550,23 @@ function createBlockView(otui, renderer, parent, block, options = {}) {
92550
92550
  }
92551
92551
  function appendUserEcho(otui, renderer, parent, options) {
92552
92552
  const text = `${options.marker ?? "\u276F"} ${options.line}`;
92553
+ const fullWidth = options.fullWidth === true;
92553
92554
  const box = new otui.BoxRenderable(renderer, {
92554
92555
  id: options.id,
92555
- borderStyle: "rounded",
92556
- border: true,
92557
- borderColor: options.borderColor ?? frameColor(),
92556
+ borderStyle: fullWidth ? "single" : "rounded",
92557
+ border: fullWidth ? ["left"] : true,
92558
+ borderColor: options.borderColor ?? (fullWidth ? getTheme().user : frameColor()),
92559
+ ...fullWidth ? { width: "100%", backgroundColor: getTheme().panel } : { maxWidth: hugWidth(text, FRAME_CHROME) },
92558
92560
  paddingLeft: 1,
92559
92561
  paddingRight: 1,
92560
92562
  marginTop: options.marginTop ?? 1,
92561
- flexShrink: 0,
92562
- maxWidth: hugWidth(text, FRAME_CHROME)
92563
+ flexShrink: 0
92563
92564
  });
92564
- box.add(new otui.TextRenderable(renderer, { id: `${options.id}-t`, content: otui.t`${otui.dim(text)}` }));
92565
+ box.add(new otui.TextRenderable(renderer, {
92566
+ id: `${options.id}-t`,
92567
+ content: fullWidth ? text : otui.t`${otui.dim(text)}`,
92568
+ ...fullWidth ? { fg: getTheme().user, wrapMode: "word" } : {}
92569
+ }));
92565
92570
  parent.add(box);
92566
92571
  return box;
92567
92572
  }
@@ -94907,6 +94912,8 @@ var SIDEBAR_WIDTH = 30;
94907
94912
  var SIDEBAR_BORDER_LEFT = 1;
94908
94913
  var SIDEBAR_PADDING_LEFT = 2;
94909
94914
  var SIDEBAR_PADDING_RIGHT = 1;
94915
+ var WORKSPACE_GUTTER_X = 1;
94916
+ var TRANSCRIPT_PADDING_X = 1;
94910
94917
  var SIDEBAR_TEXT_WIDTH = SIDEBAR_WIDTH - SIDEBAR_BORDER_LEFT - SIDEBAR_PADDING_LEFT - SIDEBAR_PADDING_RIGHT;
94911
94918
  function formatSidebarVersionUpdateAdvisory(result) {
94912
94919
  const advisory = formatVersionUpdateAdvisory(result);
@@ -95023,7 +95030,15 @@ async function createShellChrome(otui, renderer, opts) {
95023
95030
  let appliedTheme = getTheme();
95024
95031
  const rootRow = new otui.BoxRenderable(r, { id: "root-row", flexGrow: 1, flexDirection: "row" });
95025
95032
  r.root.add(rootRow);
95026
- const main = new otui.BoxRenderable(r, { id: "main", flexGrow: 1, minWidth: 0, flexDirection: "column" });
95033
+ const main = new otui.BoxRenderable(r, {
95034
+ id: "main",
95035
+ flexGrow: 1,
95036
+ flexShrink: 1,
95037
+ minWidth: 0,
95038
+ flexDirection: "column",
95039
+ paddingLeft: WORKSPACE_GUTTER_X,
95040
+ paddingRight: WORKSPACE_GUTTER_X
95041
+ });
95027
95042
  rootRow.add(main);
95028
95043
  const sidebar = new otui.BoxRenderable(r, {
95029
95044
  id: "sidebar",
@@ -95031,7 +95046,7 @@ async function createShellChrome(otui, renderer, opts) {
95031
95046
  flexShrink: 0,
95032
95047
  flexDirection: "column",
95033
95048
  border: ["left"],
95034
- borderColor: getTheme().highlight,
95049
+ borderColor: getTheme().border,
95035
95050
  backgroundColor: getTheme().panel,
95036
95051
  paddingLeft: SIDEBAR_PADDING_LEFT,
95037
95052
  paddingRight: SIDEBAR_PADDING_RIGHT,
@@ -95096,7 +95111,7 @@ async function createShellChrome(otui, renderer, opts) {
95096
95111
  flexShrink: 0,
95097
95112
  flexDirection: "row",
95098
95113
  justifyContent: "space-between",
95099
- backgroundColor: getTheme().panel,
95114
+ backgroundColor: getTheme().bg,
95100
95115
  paddingLeft: 1,
95101
95116
  paddingRight: 1
95102
95117
  });
@@ -95112,6 +95127,27 @@ async function createShellChrome(otui, renderer, opts) {
95112
95127
  target.content = text.length === 0 ? "" : otui.t`${otui.dim(text)}`;
95113
95128
  };
95114
95129
  paintDim(headerRight, opts.headerMeta ?? "");
95130
+ const promptPin = new otui.BoxRenderable(r, {
95131
+ id: "prompt-pin",
95132
+ flexShrink: 0,
95133
+ width: "100%",
95134
+ height: 1,
95135
+ visible: false,
95136
+ border: ["left"],
95137
+ borderColor: getTheme().user,
95138
+ backgroundColor: getTheme().highlight,
95139
+ paddingLeft: 1,
95140
+ paddingRight: 1
95141
+ });
95142
+ const promptPinText = new otui.TextRenderable(r, {
95143
+ id: "prompt-pin-text",
95144
+ content: "",
95145
+ fg: getTheme().user,
95146
+ wrapMode: "none",
95147
+ truncate: true
95148
+ });
95149
+ promptPin.add(promptPinText);
95150
+ main.add(promptPin);
95115
95151
  const scroll = new otui.ScrollBoxRenderable(r, {
95116
95152
  id: "transcript",
95117
95153
  flexGrow: 1,
@@ -95119,10 +95155,45 @@ async function createShellChrome(otui, renderer, opts) {
95119
95155
  scrollY: true,
95120
95156
  stickyScroll: true,
95121
95157
  stickyStart: "bottom",
95122
- contentOptions: { flexDirection: "column", paddingLeft: 1, paddingRight: 1 }
95158
+ contentOptions: {
95159
+ flexDirection: "column",
95160
+ paddingLeft: TRANSCRIPT_PADDING_X,
95161
+ paddingRight: TRANSCRIPT_PADDING_X,
95162
+ paddingTop: 1
95163
+ }
95123
95164
  });
95124
95165
  main.add(scroll);
95125
95166
  const transcript = scroll.content;
95167
+ const userPrompts = [];
95168
+ let pinnedPrompt;
95169
+ const syncPromptPin = () => {
95170
+ let active;
95171
+ for (let i = userPrompts.length - 1;i >= 0; i -= 1) {
95172
+ const candidate = userPrompts[i];
95173
+ if (candidate === undefined)
95174
+ continue;
95175
+ if (candidate.box.parent !== transcript) {
95176
+ userPrompts.splice(i, 1);
95177
+ continue;
95178
+ }
95179
+ const logicalTop = candidate.box.y - transcript.y;
95180
+ if (logicalTop < scroll.scrollTop) {
95181
+ active = candidate;
95182
+ break;
95183
+ }
95184
+ }
95185
+ if (active?.box === pinnedPrompt?.box)
95186
+ return;
95187
+ pinnedPrompt = active;
95188
+ promptPin.visible = active !== undefined;
95189
+ promptPinText.content = active === undefined ? "" : `\u21A5 \u276F ${active.line}`;
95190
+ };
95191
+ const registerUserPrompt = (box, line) => {
95192
+ if (line.length === 0 || userPrompts.some((item) => item.box === box))
95193
+ return;
95194
+ userPrompts.push({ box, line });
95195
+ };
95196
+ r.on(otui.CliRenderEvents.FRAME, syncPromptPin);
95126
95197
  let liveStatus;
95127
95198
  const originalTranscriptAdd = transcript.add.bind(transcript);
95128
95199
  const originalTranscriptRemove = transcript.remove.bind(transcript);
@@ -95220,7 +95291,7 @@ async function createShellChrome(otui, renderer, opts) {
95220
95291
  flexDirection: "column",
95221
95292
  borderStyle: "rounded",
95222
95293
  border: true,
95223
- borderColor: getTheme().highlight,
95294
+ borderColor: getTheme().border,
95224
95295
  backgroundColor: getTheme().panel,
95225
95296
  paddingLeft: 1,
95226
95297
  paddingRight: 1
@@ -95304,7 +95375,7 @@ async function createShellChrome(otui, renderer, opts) {
95304
95375
  flexShrink: 0,
95305
95376
  flexDirection: "row",
95306
95377
  justifyContent: "space-between",
95307
- backgroundColor: getTheme().panel,
95378
+ backgroundColor: getTheme().bg,
95308
95379
  paddingLeft: 1,
95309
95380
  paddingRight: 1
95310
95381
  });
@@ -95533,15 +95604,18 @@ async function createShellChrome(otui, renderer, opts) {
95533
95604
  try {
95534
95605
  r.setBackgroundColor(theme.bg);
95535
95606
  } catch {}
95536
- sidebar.borderColor = theme.highlight;
95607
+ sidebar.borderColor = theme.border;
95537
95608
  sidebar.backgroundColor = theme.panel;
95538
- header.backgroundColor = theme.panel;
95539
- footer.backgroundColor = theme.panel;
95609
+ header.backgroundColor = theme.bg;
95610
+ promptPin.borderColor = theme.user;
95611
+ promptPin.backgroundColor = theme.highlight;
95612
+ promptPinText.fg = theme.user;
95613
+ footer.backgroundColor = theme.bg;
95540
95614
  dock.backgroundColor = theme.panel;
95541
95615
  dock.borderColor = theme.border;
95542
95616
  queueDock.backgroundColor = theme.panel;
95543
95617
  queueDock.borderColor = theme.border;
95544
- composer.borderColor = theme.highlight;
95618
+ composer.borderColor = theme.border;
95545
95619
  composer.backgroundColor = theme.panel;
95546
95620
  menu.backgroundColor = theme.panel;
95547
95621
  menu.focusedBackgroundColor = theme.panel;
@@ -95579,6 +95653,7 @@ async function createShellChrome(otui, renderer, opts) {
95579
95653
  sidebarTop,
95580
95654
  sidebarScroll: sidebarTopScroll,
95581
95655
  header,
95656
+ promptPin,
95582
95657
  scroll,
95583
95658
  transcript,
95584
95659
  dock,
@@ -95588,6 +95663,8 @@ async function createShellChrome(otui, renderer, opts) {
95588
95663
  textarea,
95589
95664
  footer,
95590
95665
  input,
95666
+ registerUserPrompt,
95667
+ pinnedUserPrompt: () => pinnedPrompt?.line,
95591
95668
  focusComposer: () => {
95592
95669
  textarea.focus();
95593
95670
  },
@@ -95648,6 +95725,9 @@ async function createShellChrome(otui, renderer, opts) {
95648
95725
  try {
95649
95726
  r.off(otui.CliRenderEvents.SELECTION, onSelection);
95650
95727
  } catch {}
95728
+ try {
95729
+ r.off(otui.CliRenderEvents.FRAME, syncPromptPin);
95730
+ } catch {}
95651
95731
  }
95652
95732
  };
95653
95733
  }
@@ -106637,7 +106717,12 @@ Usage: /reasoning <${REASONING_EFFORT_LEVELS.join("|")}>
106637
106717
  }
106638
106718
  return;
106639
106719
  }
106640
- appendUserEcho(otui, r, transcript, { id: `ub${uid++}`, line: displayLine });
106720
+ const userEcho = appendUserEcho(otui, r, transcript, {
106721
+ id: `ub${uid++}`,
106722
+ line: displayLine,
106723
+ fullWidth: true
106724
+ });
106725
+ chrome.registerUserPrompt(userEcho, displayLine);
106641
106726
  transcript.add(new otui.TextRenderable(r, {
106642
106727
  id: `h${uid++}`,
106643
106728
  content: otui.t`${otui.cyan("\u25CF")} ${otui.bold("keryx")} ${otui.dim(hhmm())}`,
@@ -107115,7 +107200,15 @@ async function mountChatShell(otui, renderer, opts) {
107115
107200
  const bridge = createChatBridge({
107116
107201
  onAccepted: (line) => {
107117
107202
  const displayLine = line.startsWith("/") ? line : summarizeSubmittedLine(line);
107118
- appendUserEcho(otui, r, transcript, { id: `ub${uid++}`, line: displayLine });
107203
+ const isCommand = line.startsWith("/");
107204
+ const userEcho = appendUserEcho(otui, r, transcript, {
107205
+ id: `ub${uid++}`,
107206
+ line: displayLine,
107207
+ fullWidth: !isCommand
107208
+ });
107209
+ if (!isCommand) {
107210
+ chrome.registerUserPrompt(userEcho, displayLine);
107211
+ }
107119
107212
  if (!line.startsWith("/")) {
107120
107213
  seen.push({ content: line });
107121
107214
  paintContext();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.2.136",
3
+ "version": "0.2.139",
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": {