steward-cli 0.27.0 → 0.28.0

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 +197 -71
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -42874,8 +42874,8 @@ function resolveThemeColor(color, isBg = false) {
42874
42874
  if (color === "dim" || color === "ansi(dim)") {
42875
42875
  return isBg ? (s) => s : (s) => source_default.dim(s);
42876
42876
  }
42877
- if (color.startsWith("ansi(") && color.endsWith(")")) {
42878
- const name = color.slice(5, -1).trim();
42877
+ if (color.startsWith("ansi(") && color.endsWith(")") || color.startsWith("ansi:")) {
42878
+ const name = color.startsWith("ansi:") ? color.slice(5).trim() : color.slice(5, -1).trim();
42879
42879
  if (name === "reset" || name === "none" || name === "transparent" || name === "default") {
42880
42880
  return (s) => s;
42881
42881
  }
@@ -43062,48 +43062,122 @@ var draculaTheme = {
43062
43062
  default: "rgb(248,248,242)"
43063
43063
  }
43064
43064
  };
43065
+ var darkDaltonizedTheme = {
43066
+ text: "rgb(255,255,255)",
43067
+ muted: "rgb(153,153,153)",
43068
+ subtle: "rgb(80,80,80)",
43069
+ brand: "rgb(255,153,51)",
43070
+ info: "rgb(153,204,255)",
43071
+ success: "rgb(51,153,255)",
43072
+ warning: "rgb(255,204,0)",
43073
+ error: "rgb(255,102,102)",
43074
+ permission: "rgb(153,204,255)",
43075
+ selected: "rgb(153,204,255)",
43076
+ current: "rgb(255,204,0)",
43077
+ promptBorder: "rgb(136,136,136)",
43078
+ rule: "rgb(102,153,153)",
43079
+ userChevron: "rgb(136,136,136)",
43080
+ userBg: "rgb(55,55,55)",
43081
+ diffAddBg: "rgb(0,68,102)",
43082
+ diffDelBg: "rgb(102,0,0)",
43083
+ diffAddFg: "rgb(0,119,179)",
43084
+ diffDelFg: "rgb(179,0,0)",
43085
+ syntax: {
43086
+ keyword: "rgb(255,178,102)",
43087
+ string: "rgb(153,204,255)",
43088
+ number: "rgb(255,255,102)",
43089
+ literal: "rgb(255,255,102)",
43090
+ comment: "rgb(153,153,153)",
43091
+ function: "rgb(178,102,255)",
43092
+ type: "rgb(255,153,51)",
43093
+ variable: "rgb(255,178,102)",
43094
+ tag: "rgb(102,178,255)",
43095
+ attr: "rgb(153,204,255)",
43096
+ meta: "rgb(178,102,255)",
43097
+ addition: "rgb(102,178,255)",
43098
+ deletion: "rgb(255,102,102)",
43099
+ default: "rgb(255,255,255)"
43100
+ }
43101
+ };
43102
+ var lightDaltonizedTheme = {
43103
+ text: "rgb(0,0,0)",
43104
+ muted: "rgb(102,102,102)",
43105
+ subtle: "rgb(175,175,175)",
43106
+ brand: "rgb(255,153,51)",
43107
+ info: "rgb(51,102,255)",
43108
+ success: "rgb(0,102,153)",
43109
+ warning: "rgb(255,153,0)",
43110
+ error: "rgb(204,0,0)",
43111
+ permission: "rgb(51,102,255)",
43112
+ selected: "rgb(51,102,255)",
43113
+ current: "rgb(255,153,0)",
43114
+ promptBorder: "rgb(153,153,153)",
43115
+ rule: "rgb(51,102,102)",
43116
+ userChevron: "rgb(153,153,153)",
43117
+ userBg: "rgb(220,220,220)",
43118
+ diffAddBg: "rgb(153,204,255)",
43119
+ diffDelBg: "rgb(255,204,204)",
43120
+ diffAddFg: "rgb(51,102,204)",
43121
+ diffDelFg: "rgb(153,51,51)",
43122
+ syntax: {
43123
+ keyword: "rgb(204,0,0)",
43124
+ string: "rgb(0,102,204)",
43125
+ number: "rgb(0,102,204)",
43126
+ literal: "rgb(0,102,204)",
43127
+ comment: "rgb(102,102,102)",
43128
+ function: "rgb(128,0,128)",
43129
+ type: "rgb(255,128,0)",
43130
+ variable: "rgb(255,128,0)",
43131
+ tag: "rgb(0,102,204)",
43132
+ attr: "rgb(0,102,204)",
43133
+ meta: "rgb(128,0,128)",
43134
+ addition: "rgb(0,102,153)",
43135
+ deletion: "rgb(204,0,0)",
43136
+ default: "rgb(0,0,0)"
43137
+ }
43138
+ };
43065
43139
  var darkAnsiTheme = {
43066
- text: "default",
43067
- muted: "dim",
43068
- subtle: "dim",
43069
- brand: "ansi(yellow)",
43070
- info: "ansi(cyan)",
43071
- success: "ansi(green)",
43072
- warning: "ansi(yellow)",
43073
- error: "ansi(red)",
43074
- permission: "ansi(blue)",
43075
- selected: "ansi(blue)",
43076
- current: "ansi(yellow)",
43077
- promptBorder: "dim",
43078
- rule: "dim",
43079
- userChevron: "dim",
43140
+ text: "ansi(whiteBright)",
43141
+ muted: "ansi(white)",
43142
+ subtle: "ansi(white)",
43143
+ brand: "ansi(redBright)",
43144
+ info: "ansi(blueBright)",
43145
+ success: "ansi(greenBright)",
43146
+ warning: "ansi(yellowBright)",
43147
+ error: "ansi(redBright)",
43148
+ permission: "ansi(blueBright)",
43149
+ selected: "ansi(blueBright)",
43150
+ current: "ansi(yellowBright)",
43151
+ promptBorder: "ansi(white)",
43152
+ rule: "ansi(cyanBright)",
43153
+ userChevron: "ansi(white)",
43080
43154
  userBg: "ansi(bgBlackBright)",
43081
43155
  diffAddBg: "default",
43082
43156
  diffDelBg: "default",
43083
- diffAddFg: "ansi(green)",
43084
- diffDelFg: "ansi(red)",
43157
+ diffAddFg: "ansi(greenBright)",
43158
+ diffDelFg: "ansi(redBright)",
43085
43159
  syntax: {
43086
- keyword: "ansi(red)",
43160
+ keyword: "ansi(redBright)",
43087
43161
  string: "ansi(cyan)",
43088
43162
  number: "ansi(cyan)",
43089
43163
  literal: "ansi(cyan)",
43090
43164
  comment: "ansi(gray)",
43091
- function: "ansi(magenta)",
43092
- type: "ansi(yellow)",
43093
- variable: "ansi(yellow)",
43094
- tag: "ansi(green)",
43165
+ function: "ansi(magentaBright)",
43166
+ type: "ansi(yellowBright)",
43167
+ variable: "ansi(yellowBright)",
43168
+ tag: "ansi(greenBright)",
43095
43169
  attr: "ansi(cyan)",
43096
- meta: "ansi(blue)",
43097
- addition: "ansi(green)",
43098
- deletion: "ansi(red)",
43099
- default: "ansi(white)"
43170
+ meta: "ansi(blueBright)",
43171
+ addition: "ansi(greenBright)",
43172
+ deletion: "ansi(redBright)",
43173
+ default: "ansi(whiteBright)"
43100
43174
  }
43101
43175
  };
43102
43176
  var lightAnsiTheme = {
43103
- text: "default",
43104
- muted: "dim",
43105
- subtle: "dim",
43106
- brand: "ansi(yellow)",
43177
+ text: "ansi(black)",
43178
+ muted: "ansi(blackBright)",
43179
+ subtle: "ansi(blackBright)",
43180
+ brand: "ansi(redBright)",
43107
43181
  info: "ansi(blue)",
43108
43182
  success: "ansi(green)",
43109
43183
  warning: "ansi(yellow)",
@@ -43111,14 +43185,14 @@ var lightAnsiTheme = {
43111
43185
  permission: "ansi(blue)",
43112
43186
  selected: "ansi(blue)",
43113
43187
  current: "ansi(yellow)",
43114
- promptBorder: "dim",
43115
- rule: "dim",
43116
- userChevron: "dim",
43188
+ promptBorder: "ansi(white)",
43189
+ rule: "ansi(cyan)",
43190
+ userChevron: "ansi(blackBright)",
43117
43191
  userBg: "ansi(bgWhiteBright)",
43118
43192
  diffAddBg: "default",
43119
43193
  diffDelBg: "default",
43120
- diffAddFg: "ansi(green)",
43121
- diffDelFg: "ansi(red)",
43194
+ diffAddFg: "ansi(greenBright)",
43195
+ diffDelFg: "ansi(redBright)",
43122
43196
  syntax: {
43123
43197
  keyword: "ansi(red)",
43124
43198
  string: "ansi(blue)",
@@ -43133,7 +43207,44 @@ var lightAnsiTheme = {
43133
43207
  meta: "ansi(blue)",
43134
43208
  addition: "ansi(green)",
43135
43209
  deletion: "ansi(red)",
43136
- default: "default"
43210
+ default: "ansi(black)"
43211
+ }
43212
+ };
43213
+ var noColorTheme = {
43214
+ text: "rgb(255,255,255)",
43215
+ muted: "rgb(255,255,255)",
43216
+ subtle: "rgb(255,255,255)",
43217
+ brand: "rgb(255,255,255)",
43218
+ info: "rgb(255,255,255)",
43219
+ success: "rgb(255,255,255)",
43220
+ warning: "rgb(255,255,255)",
43221
+ error: "rgb(255,255,255)",
43222
+ permission: "rgb(255,255,255)",
43223
+ selected: "rgb(255,255,255)",
43224
+ current: "rgb(255,255,255)",
43225
+ promptBorder: "rgb(255,255,255)",
43226
+ rule: "rgb(255,255,255)",
43227
+ userChevron: "rgb(255,255,255)",
43228
+ userBg: "default",
43229
+ diffAddBg: "default",
43230
+ diffDelBg: "default",
43231
+ diffAddFg: "rgb(255,255,255)",
43232
+ diffDelFg: "rgb(255,255,255)",
43233
+ syntax: {
43234
+ keyword: "rgb(255,255,255)",
43235
+ string: "rgb(255,255,255)",
43236
+ number: "rgb(255,255,255)",
43237
+ literal: "rgb(255,255,255)",
43238
+ comment: "rgb(255,255,255)",
43239
+ function: "rgb(255,255,255)",
43240
+ type: "rgb(255,255,255)",
43241
+ variable: "rgb(255,255,255)",
43242
+ tag: "rgb(255,255,255)",
43243
+ attr: "rgb(255,255,255)",
43244
+ meta: "rgb(255,255,255)",
43245
+ addition: "rgb(255,255,255)",
43246
+ deletion: "rgb(255,255,255)",
43247
+ default: "rgb(255,255,255)"
43137
43248
  }
43138
43249
  };
43139
43250
  var builtInThemes = [
@@ -43151,6 +43262,20 @@ var builtInThemes = [
43151
43262
  theme: lightTheme,
43152
43263
  source: "built-in"
43153
43264
  },
43265
+ {
43266
+ name: "dark-daltonized",
43267
+ label: "Dark Daltonized",
43268
+ description: "Color-blind friendly dark theme adjusted for deuteranopia",
43269
+ theme: darkDaltonizedTheme,
43270
+ source: "built-in"
43271
+ },
43272
+ {
43273
+ name: "light-daltonized",
43274
+ label: "Light Daltonized",
43275
+ description: "Color-blind friendly light theme adjusted for deuteranopia",
43276
+ theme: lightDaltonizedTheme,
43277
+ source: "built-in"
43278
+ },
43154
43279
  {
43155
43280
  name: "dracula",
43156
43281
  label: "Dracula",
@@ -43171,6 +43296,13 @@ var builtInThemes = [
43171
43296
  description: "16-color ANSI light palette respecting terminal colors",
43172
43297
  theme: lightAnsiTheme,
43173
43298
  source: "built-in"
43299
+ },
43300
+ {
43301
+ name: "no-color",
43302
+ label: "No Color",
43303
+ description: "Monochrome pure white palette with no color styling",
43304
+ theme: noColorTheme,
43305
+ source: "built-in"
43174
43306
  }
43175
43307
  ];
43176
43308
  var registry = new Map;
@@ -43185,7 +43317,8 @@ function findTheme(query) {
43185
43317
  const q = query.trim().toLowerCase().replace(/^["']|["']$/g, "");
43186
43318
  if (!q)
43187
43319
  return;
43188
- return listThemes().find((t) => t.name.toLowerCase() === q || t.label.toLowerCase() === q || t.label.toLowerCase().startsWith(q));
43320
+ const normalizedQ = q.replace(/[\s-_]+/g, "");
43321
+ return listThemes().find((t) => t.name.toLowerCase() === q || t.label.toLowerCase() === q || t.label.toLowerCase().startsWith(q) || t.name.replace(/[\s-_]+/g, "") === normalizedQ || t.label.toLowerCase().replace(/[\s-_]+/g, "") === normalizedQ);
43189
43322
  }
43190
43323
  function setActiveTheme(name) {
43191
43324
  if (registry.has(name)) {
@@ -56001,7 +56134,7 @@ import { isIP } from "node:net";
56001
56134
  // package.json
56002
56135
  var package_default = {
56003
56136
  name: "steward-cli",
56004
- version: "0.27.0",
56137
+ version: "0.28.0",
56005
56138
  description: "Interactive AI engineering assistant for the terminal.",
56006
56139
  author: "sapirrior",
56007
56140
  license: "MIT",
@@ -59464,6 +59597,19 @@ class AgentSession {
59464
59597
  }
59465
59598
  }
59466
59599
 
59600
+ // src/app/commands/bug/index.ts
59601
+ var bugCommand = {
59602
+ name: "bug",
59603
+ description: "Report issues or submit feedback to GitHub",
59604
+ usage: "/bug",
59605
+ async execute(_args, _context) {
59606
+ return {
59607
+ handled: true,
59608
+ message: "Report issues or feedback to https://github.com/sapirrior/steward/issues"
59609
+ };
59610
+ }
59611
+ };
59612
+
59467
59613
  // src/app/commands/clear/index.ts
59468
59614
  var clearCommand = {
59469
59615
  name: "clear",
@@ -59897,28 +60043,6 @@ function formatDuration(isoDateString) {
59897
60043
  return `${mins}m ${secs}s`;
59898
60044
  return `${secs}s`;
59899
60045
  }
59900
- function getContextWindowLimit(modelId, provider) {
59901
- const m = modelId.toLowerCase();
59902
- const p = provider.toLowerCase();
59903
- if (p === "gemini" || m.includes("gemini"))
59904
- return 1e6;
59905
- if (p === "anthropic" || m.includes("claude"))
59906
- return 200000;
59907
- if (m.includes("deepseek"))
59908
- return 64000;
59909
- if (m.includes("gpt-4") || m.includes("o1") || m.includes("o3") || m.includes("llama"))
59910
- return 128000;
59911
- return 128000;
59912
- }
59913
- function renderProgressBar(current, max, length = 16) {
59914
- if (max <= 0)
59915
- return `[${"░".repeat(length)}] 0%`;
59916
- const ratio = Math.min(Math.max(current / max, 0), 1);
59917
- const percent = Math.round(ratio * 100);
59918
- const filled = Math.round(ratio * length);
59919
- const empty = length - filled;
59920
- return `[${"█".repeat(filled)}${"░".repeat(empty)}] ${percent}%`;
59921
- }
59922
60046
  function estimateUniversalCost(usage, modelId, provider) {
59923
60047
  const p = provider.toLowerCase();
59924
60048
  const m = modelId.toLowerCase();
@@ -59952,17 +60076,18 @@ var usageCommand = {
59952
60076
  let toolCallsCount = 0;
59953
60077
  for (const turn of turns) {
59954
60078
  if (Array.isArray(turn.messages)) {
60079
+ let turnToolCalls = 0;
60080
+ let turnToolMessages = 0;
59955
60081
  for (const msg of turn.messages) {
59956
- if (msg.role === "tool") {
59957
- toolCallsCount++;
59958
- } else if (msg.role === "assistant" && Array.isArray(msg.content)) {
59959
- toolCallsCount += msg.content.filter((c) => c?.type === "tool-call").length;
60082
+ if (msg.role === "assistant" && Array.isArray(msg.content)) {
60083
+ turnToolCalls += msg.content.filter((c) => c?.type === "tool-call").length;
60084
+ } else if (msg.role === "tool") {
60085
+ turnToolMessages++;
59960
60086
  }
59961
60087
  }
60088
+ toolCallsCount += turnToolCalls > 0 ? turnToolCalls : turnToolMessages;
59962
60089
  }
59963
60090
  }
59964
- const contextLimit = getContextWindowLimit(model.modelId, model.provider);
59965
- const contextBar = renderProgressBar(usage.totalTokens, contextLimit);
59966
60091
  const duration = formatDuration(sessionData?.createdAt);
59967
60092
  const costEstimate = estimateUniversalCost(usage, model.modelId, model.provider);
59968
60093
  const lines = [
@@ -59970,7 +60095,6 @@ var usageCommand = {
59970
60095
  `• Active Model: ${model.modelId} (${model.provider}${model.effort !== "medium" ? `, effort: ${model.effort}` : ""})`,
59971
60096
  `• Session Duration: ${duration}`,
59972
60097
  `• Activity: ${formatNumber(turnsCount)} turns (${formatNumber(toolCallsCount)} tool executions)`,
59973
- `• Context Window: ${contextBar} (${formatNumber(usage.totalTokens)} / ${formatNumber(contextLimit)} tokens)`,
59974
60098
  ``,
59975
60099
  `Token Breakdown:`,
59976
60100
  `• Input Tokens: ${formatNumber(usage.inputTokens)}`,
@@ -60468,6 +60592,7 @@ class CommandRegistry {
60468
60592
  }
60469
60593
  }
60470
60594
  var builtInCommands = [
60595
+ bugCommand,
60471
60596
  initCommand,
60472
60597
  copyCommand,
60473
60598
  exportCommand,
@@ -64224,11 +64349,12 @@ function renderToolDetail(detail, targetWidth, expanded = false) {
64224
64349
  }
64225
64350
 
64226
64351
  // src/app/ui/utils/message-formatter.ts
64227
- function formatSystemMessage(content) {
64352
+ function formatSlashCommandOutput(content) {
64228
64353
  const rawLines = content.split(`
64229
64354
  `);
64230
- return rawLines.map((l, i) => i === 0 ? ` ${c.muted("└ ")}${c.permission(l)}` : ` ${c.permission(l)}`);
64355
+ return rawLines.map((l, i) => i === 0 ? ` ${c.muted("└ ")}${l}` : ` ${l}`);
64231
64356
  }
64357
+ var formatSystemMessage = formatSlashCommandOutput;
64232
64358
  function formatAssistantMessage(content) {
64233
64359
  const lines = [];
64234
64360
  if (content) {
@@ -66411,7 +66537,7 @@ async function applyCommandResult(text, cmdResult, ctx) {
66411
66537
  return true;
66412
66538
  }
66413
66539
  if (cmdResult.message) {
66414
- ctx.engine.commit("system", formatSystemMessage(cmdResult.message));
66540
+ ctx.engine.commit("system", formatSlashCommandOutput(cmdResult.message));
66415
66541
  }
66416
66542
  const updatedModel = ctx.session.getModel();
66417
66543
  ctx.header.render();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steward-cli",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "description": "Interactive AI engineering assistant for the terminal.",
5
5
  "license": "MIT",
6
6
  "author": "sapirrior",