@holt-os/holt 0.19.1 → 0.19.3

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/README.md +4 -1
  2. package/dist/cli.js +156 -144
  3. package/package.json +5 -2
package/README.md CHANGED
@@ -7,6 +7,7 @@
7
7
  <a href="https://github.com/holt-os/homebrew-tap"><img src="https://img.shields.io/badge/brew-holt--os%2Ftap%2Fholt-f5a623?logo=homebrew&logoColor=white" alt="Homebrew tap"></a>
8
8
  <img src="https://img.shields.io/node/v/@holt-os/holt?logo=node.js&logoColor=white&color=3c873a" alt="Node version">
9
9
  <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-ready-4dd0e1?logo=modelcontextprotocol&logoColor=white" alt="MCP ready"></a>
10
+ <a href="https://yourstory.com/cs/uploads/Vibecode30-Report-2026-1791951345453.pdf"><img src="https://img.shields.io/badge/VibeCode30%202026-winner-e8a33d" alt="VibeCode30 2026 winner"></a>
10
11
  <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
11
12
  </p>
12
13
 
@@ -647,4 +648,6 @@ Holt is built to be extended without touching the core. See [`CONTRIBUTING.md`](
647
648
 
648
649
  ## License
649
650
 
650
- [MIT](./LICENSE) © Debashis Nayak
651
+ [MIT](./LICENSE) © [Debashis Nayak](https://productsdecoded.com/about)
652
+
653
+ Built by [Debashis Nayak](https://productsdecoded.com/about).
package/dist/cli.js CHANGED
@@ -4202,6 +4202,144 @@ async function hook(sub, rest = []) {
4202
4202
  }
4203
4203
  }
4204
4204
 
4205
+ // src/commands/statusline.ts
4206
+ import { execFileSync } from "child_process";
4207
+ import { basename } from "path";
4208
+ var SEP = " \xB7 ";
4209
+ function readStdin2(timeoutMs) {
4210
+ return new Promise((resolve9) => {
4211
+ let input = "";
4212
+ let done = false;
4213
+ const finish = () => {
4214
+ if (done) return;
4215
+ done = true;
4216
+ resolve9(input);
4217
+ };
4218
+ try {
4219
+ process.stdin.setEncoding("utf8");
4220
+ process.stdin.on("data", (chunk2) => {
4221
+ input += chunk2;
4222
+ });
4223
+ process.stdin.on("end", finish);
4224
+ process.stdin.on("error", finish);
4225
+ } catch {
4226
+ finish();
4227
+ }
4228
+ setTimeout(finish, timeoutMs);
4229
+ });
4230
+ }
4231
+ function get(obj, key) {
4232
+ if (!obj || typeof obj !== "object") return void 0;
4233
+ return obj[key];
4234
+ }
4235
+ function str(v) {
4236
+ if (typeof v !== "string") return void 0;
4237
+ const t = v.trim();
4238
+ return t.length ? t : void 0;
4239
+ }
4240
+ function dirFrom(data) {
4241
+ const ws = get(data, "workspace");
4242
+ return str(get(ws, "current_dir")) ?? str(get(ws, "project_dir")) ?? str(get(ws, "cwd")) ?? str(get(data, "cwd")) ?? str(get(data, "current_dir"));
4243
+ }
4244
+ function folderFrom(data) {
4245
+ const dir = dirFrom(data);
4246
+ if (!dir) return void 0;
4247
+ try {
4248
+ const base = basename(dir.replace(/[\\/]+$/, ""));
4249
+ return base.length ? base : void 0;
4250
+ } catch {
4251
+ return void 0;
4252
+ }
4253
+ }
4254
+ function modelFrom(data) {
4255
+ const model = get(data, "model");
4256
+ if (typeof model === "string") return str(model);
4257
+ return str(get(model, "display_name")) ?? str(get(model, "id")) ?? str(get(data, "model_display_name")) ?? str(get(data, "model_id"));
4258
+ }
4259
+ function contextPctFrom(data) {
4260
+ const cw = get(data, "context_window");
4261
+ const clamp = (n) => Math.max(0, Math.min(100, Math.round(n)));
4262
+ const used = get(cw, "used_percentage");
4263
+ if (typeof used === "number" && Number.isFinite(used)) return clamp(used);
4264
+ if (typeof used === "string" && used.trim() && Number.isFinite(Number(used))) {
4265
+ return clamp(Number(used));
4266
+ }
4267
+ const size = get(cw, "context_window_size");
4268
+ const cu = get(cw, "current_usage");
4269
+ if (typeof size === "number" && size > 0 && cu && typeof cu === "object") {
4270
+ const n = (k) => {
4271
+ const v = get(cu, k);
4272
+ return typeof v === "number" && Number.isFinite(v) ? v : 0;
4273
+ };
4274
+ const tokens2 = n("input_tokens") + n("cache_creation_input_tokens") + n("cache_read_input_tokens");
4275
+ if (tokens2 > 0) return clamp(tokens2 / size * 100);
4276
+ }
4277
+ return void 0;
4278
+ }
4279
+ function contextBar(pct) {
4280
+ if (pct === void 0) return `[${"\u2591".repeat(20)}] --`;
4281
+ const filled = Math.floor(pct / 5);
4282
+ return `[${"\u2588".repeat(filled)}${"\u2591".repeat(20 - filled)}] ${pct}%`;
4283
+ }
4284
+ function paint(code, text, color) {
4285
+ return color ? `\x1B[${code}m${text}\x1B[0m` : text;
4286
+ }
4287
+ function renderStatusLine(data, opts = {}) {
4288
+ const color = opts.color ?? false;
4289
+ const parts = [paint("1;35", "Holt", color)];
4290
+ const folder = folderFrom(data);
4291
+ if (folder) {
4292
+ const branch = str(opts.branch);
4293
+ parts.push(
4294
+ paint("1;34", folder, color) + (branch ? " " + paint("1;33", `(${branch})`, color) : "")
4295
+ );
4296
+ }
4297
+ const model = modelFrom(data);
4298
+ if (model) parts.push(paint("0;36", model, color));
4299
+ if (folder || model) parts.push(paint("0;32", contextBar(contextPctFrom(data)), color));
4300
+ return parts.join(SEP);
4301
+ }
4302
+ function gitBranch(dir) {
4303
+ if (!dir) return void 0;
4304
+ try {
4305
+ const out = execFileSync("git", ["-C", dir, "symbolic-ref", "--short", "HEAD"], {
4306
+ encoding: "utf8",
4307
+ stdio: ["ignore", "pipe", "ignore"],
4308
+ timeout: 500,
4309
+ env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" }
4310
+ });
4311
+ return str(out);
4312
+ } catch {
4313
+ return void 0;
4314
+ }
4315
+ }
4316
+ function parse(raw) {
4317
+ try {
4318
+ return JSON.parse(raw || "{}");
4319
+ } catch {
4320
+ return {};
4321
+ }
4322
+ }
4323
+ function isLegacyHoltStatusLine(statusLine2) {
4324
+ if (!statusLine2 || typeof statusLine2 !== "object") return false;
4325
+ const cmd = statusLine2.command;
4326
+ return typeof cmd === "string" && /^printf\s+["']Holt["']$/.test(cmd.trim());
4327
+ }
4328
+ async function statusline() {
4329
+ let line = "Holt";
4330
+ try {
4331
+ const raw = await readStdin2(1e3);
4332
+ const data = parse(raw);
4333
+ line = renderStatusLine(data, {
4334
+ branch: gitBranch(dirFrom(data)),
4335
+ color: !process.env.NO_COLOR
4336
+ });
4337
+ } catch {
4338
+ line = "Holt";
4339
+ }
4340
+ process.stdout.write(line + "\n");
4341
+ }
4342
+
4205
4343
  // src/commands/chat.ts
4206
4344
  import { randomUUID as randomUUID4 } from "crypto";
4207
4345
 
@@ -4768,11 +4906,18 @@ var TIPS = [
4768
4906
  "If I ever say I am signed out, type /login.",
4769
4907
  "Everything stays on your machine."
4770
4908
  ];
4909
+ var WORDMARK = [
4910
+ "\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
4911
+ "\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D",
4912
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551",
4913
+ "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551",
4914
+ "\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551",
4915
+ "\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D"
4916
+ ];
4771
4917
  function renderIntroBox() {
4772
- const wordmark = "HOLT";
4773
4918
  const context = "Your assistant is ready. Memory is on for this folder.";
4774
4919
  const bullets = TIPS.map((t) => `\u2022 ${t}`);
4775
- const content = [wordmark, TAGLINE, "", context, "", ...bullets];
4920
+ const content = [TAGLINE, "", context, "", ...bullets];
4776
4921
  const pad = 2;
4777
4922
  const inner = Math.max(...content.map((l) => l.length));
4778
4923
  const span = inner + pad * 2;
@@ -4783,9 +4928,9 @@ function renderIntroBox() {
4783
4928
  const body = " ".repeat(pad) + colorize(plain) + right + " ".repeat(pad);
4784
4929
  return c.dim("\u2502") + body + c.dim("\u2502");
4785
4930
  };
4786
- const lines = [];
4931
+ const lines = WORDMARK.map((l) => " " + c.accent(l));
4932
+ lines.push("");
4787
4933
  lines.push(c.dim(top));
4788
- lines.push(row2(wordmark, c.accent));
4789
4934
  lines.push(row2(TAGLINE, c.dim));
4790
4935
  lines.push(row2(""));
4791
4936
  lines.push(row2(context, c.dim));
@@ -4839,7 +4984,7 @@ function brandStatusLine() {
4839
4984
  } catch {
4840
4985
  return false;
4841
4986
  }
4842
- if (settings.statusLine) return false;
4987
+ if (settings.statusLine && !isLegacyHoltStatusLine(settings.statusLine)) return false;
4843
4988
  try {
4844
4989
  if (existsSync12(path)) copyFileSync2(path, `${path}.holt-bak`);
4845
4990
  settings.statusLine = {
@@ -4950,7 +5095,7 @@ async function launch() {
4950
5095
 
4951
5096
  // src/commands/memory.ts
4952
5097
  import { existsSync as existsSync13, readFileSync as readFileSync14 } from "fs";
4953
- import { basename } from "path";
5098
+ import { basename as basename2 } from "path";
4954
5099
  async function memoryCmd(sub, rest = []) {
4955
5100
  const { ask, close } = createReader();
4956
5101
  if (!await ensureTrusted(ask)) {
@@ -5050,7 +5195,7 @@ async function memoryCmd(sub, rest = []) {
5050
5195
  if (hits.length === 0) console.log(c.dim(" Nothing relevant found."));
5051
5196
  else for (const h of hits) {
5052
5197
  const when = new Date(h.turn.ts).toISOString().slice(0, 10);
5053
- const src = h.workspace ? c.dim(` [${basename(h.workspace)}]`) : "";
5198
+ const src = h.workspace ? c.dim(` [${basename2(h.workspace)}]`) : "";
5054
5199
  console.log(
5055
5200
  ` ${c.accent(h.score.toFixed(2))} ${c.dim(when)} (${h.turn.role})${src} ${h.turn.content.slice(0, 100).replace(/\s+/g, " ")}`
5056
5201
  );
@@ -5134,7 +5279,7 @@ function globalCmd(act, rest) {
5134
5279
  console.log(` registry ${memoryScopesPath()}`);
5135
5280
  if (contributors.length) {
5136
5281
  console.log(c.dim("\n Folders sharing facts:"));
5137
- for (const w of contributors) console.log(c.dim(` ${basename(w)} ${w === ws ? "(this folder)" : w}`));
5282
+ for (const w of contributors) console.log(c.dim(` ${basename2(w)} ${w === ws ? "(this folder)" : w}`));
5138
5283
  }
5139
5284
  console.log(c.dim("\n holt memory global on share this folder's facts + read others"));
5140
5285
  console.log(c.dim(" holt memory global off stop sharing + reading (add --purge to delete rows)"));
@@ -6933,7 +7078,7 @@ function renderGraphHtml(graph2, meta) {
6933
7078
 
6934
7079
  // src/ingest.ts
6935
7080
  import { readdirSync as readdirSync5, readFileSync as readFileSync18, statSync as statSync9 } from "fs";
6936
- import { join as join17, relative, sep as sep3, extname, dirname as dirname7, basename as basename2 } from "path";
7081
+ import { join as join17, relative, sep as sep3, extname, dirname as dirname7, basename as basename3 } from "path";
6937
7082
  var CODE_EXT = /* @__PURE__ */ new Set([
6938
7083
  "js",
6939
7084
  "jsx",
@@ -7204,7 +7349,7 @@ function resolveDocLink(f, spec, byId, files) {
7204
7349
  const wantName = clean.toLowerCase();
7205
7350
  for (const cand of files) {
7206
7351
  if (cand.kind !== "doc") continue;
7207
- const stem = basename2(cand.id).replace(/\.[^.]+$/, "").toLowerCase();
7352
+ const stem = basename3(cand.id).replace(/\.[^.]+$/, "").toLowerCase();
7208
7353
  if (stem === wantName) return cand.id;
7209
7354
  }
7210
7355
  return null;
@@ -7687,7 +7832,7 @@ function holtTools() {
7687
7832
  }
7688
7833
 
7689
7834
  // src/version.ts
7690
- var VERSION = "0.19.1";
7835
+ var VERSION = "0.19.3";
7691
7836
 
7692
7837
  // src/commands/mcp.ts
7693
7838
  function printSetup() {
@@ -7732,139 +7877,6 @@ async function mcp(sub, rest = []) {
7732
7877
  }
7733
7878
  }
7734
7879
 
7735
- // src/commands/statusline.ts
7736
- import { execFileSync } from "child_process";
7737
- import { basename as basename3 } from "path";
7738
- var SEP = " \xB7 ";
7739
- function readStdin2(timeoutMs) {
7740
- return new Promise((resolve9) => {
7741
- let input = "";
7742
- let done = false;
7743
- const finish = () => {
7744
- if (done) return;
7745
- done = true;
7746
- resolve9(input);
7747
- };
7748
- try {
7749
- process.stdin.setEncoding("utf8");
7750
- process.stdin.on("data", (chunk2) => {
7751
- input += chunk2;
7752
- });
7753
- process.stdin.on("end", finish);
7754
- process.stdin.on("error", finish);
7755
- } catch {
7756
- finish();
7757
- }
7758
- setTimeout(finish, timeoutMs);
7759
- });
7760
- }
7761
- function get(obj, key) {
7762
- if (!obj || typeof obj !== "object") return void 0;
7763
- return obj[key];
7764
- }
7765
- function str(v) {
7766
- if (typeof v !== "string") return void 0;
7767
- const t = v.trim();
7768
- return t.length ? t : void 0;
7769
- }
7770
- function dirFrom(data) {
7771
- const ws = get(data, "workspace");
7772
- return str(get(ws, "current_dir")) ?? str(get(ws, "project_dir")) ?? str(get(ws, "cwd")) ?? str(get(data, "cwd")) ?? str(get(data, "current_dir"));
7773
- }
7774
- function folderFrom(data) {
7775
- const dir = dirFrom(data);
7776
- if (!dir) return void 0;
7777
- try {
7778
- const base = basename3(dir.replace(/[\\/]+$/, ""));
7779
- return base.length ? base : void 0;
7780
- } catch {
7781
- return void 0;
7782
- }
7783
- }
7784
- function modelFrom(data) {
7785
- const model = get(data, "model");
7786
- if (typeof model === "string") return str(model);
7787
- return str(get(model, "display_name")) ?? str(get(model, "id")) ?? str(get(data, "model_display_name")) ?? str(get(data, "model_id"));
7788
- }
7789
- function contextPctFrom(data) {
7790
- const cw = get(data, "context_window");
7791
- const clamp = (n) => Math.max(0, Math.min(100, Math.round(n)));
7792
- const used = get(cw, "used_percentage");
7793
- if (typeof used === "number" && Number.isFinite(used)) return clamp(used);
7794
- if (typeof used === "string" && used.trim() && Number.isFinite(Number(used))) {
7795
- return clamp(Number(used));
7796
- }
7797
- const size = get(cw, "context_window_size");
7798
- const cu = get(cw, "current_usage");
7799
- if (typeof size === "number" && size > 0 && cu && typeof cu === "object") {
7800
- const n = (k) => {
7801
- const v = get(cu, k);
7802
- return typeof v === "number" && Number.isFinite(v) ? v : 0;
7803
- };
7804
- const tokens2 = n("input_tokens") + n("cache_creation_input_tokens") + n("cache_read_input_tokens");
7805
- if (tokens2 > 0) return clamp(tokens2 / size * 100);
7806
- }
7807
- return void 0;
7808
- }
7809
- function contextBar(pct) {
7810
- if (pct === void 0) return `[${"\u2591".repeat(20)}] --`;
7811
- const filled = Math.floor(pct / 5);
7812
- return `[${"\u2588".repeat(filled)}${"\u2591".repeat(20 - filled)}] ${pct}%`;
7813
- }
7814
- function paint(code, text, color) {
7815
- return color ? `\x1B[${code}m${text}\x1B[0m` : text;
7816
- }
7817
- function renderStatusLine(data, opts = {}) {
7818
- const color = opts.color ?? false;
7819
- const parts = [paint("1;35", "Holt", color)];
7820
- const folder = folderFrom(data);
7821
- if (folder) {
7822
- const branch = str(opts.branch);
7823
- parts.push(
7824
- paint("1;34", folder, color) + (branch ? " " + paint("1;33", `(${branch})`, color) : "")
7825
- );
7826
- }
7827
- const model = modelFrom(data);
7828
- if (model) parts.push(paint("0;36", model, color));
7829
- if (folder || model) parts.push(paint("0;32", contextBar(contextPctFrom(data)), color));
7830
- return parts.join(SEP);
7831
- }
7832
- function gitBranch(dir) {
7833
- if (!dir) return void 0;
7834
- try {
7835
- const out = execFileSync("git", ["-C", dir, "symbolic-ref", "--short", "HEAD"], {
7836
- encoding: "utf8",
7837
- stdio: ["ignore", "pipe", "ignore"],
7838
- timeout: 500,
7839
- env: { ...process.env, GIT_OPTIONAL_LOCKS: "0" }
7840
- });
7841
- return str(out);
7842
- } catch {
7843
- return void 0;
7844
- }
7845
- }
7846
- function parse(raw) {
7847
- try {
7848
- return JSON.parse(raw || "{}");
7849
- } catch {
7850
- return {};
7851
- }
7852
- }
7853
- async function statusline() {
7854
- let line = "Holt";
7855
- try {
7856
- const raw = await readStdin2(1e3);
7857
- const data = parse(raw);
7858
- line = renderStatusLine(data, {
7859
- branch: gitBranch(dirFrom(data)),
7860
- color: !process.env.NO_COLOR
7861
- });
7862
- } catch {
7863
- line = "Holt";
7864
- }
7865
- process.stdout.write(line + "\n");
7866
- }
7867
-
7868
7880
  // src/commands/run.ts
7869
7881
  import { writeFileSync as writeFileSync16 } from "fs";
7870
7882
  import { resolve as resolve6 } from "path";
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@holt-os/holt",
3
- "version": "0.19.1",
3
+ "version": "0.19.3",
4
4
  "description": "An open-source personal agent OS: any LLM, private memory you can see and walk.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
- "author": "Debashis Nayak",
7
+ "author": {
8
+ "name": "Debashis Nayak",
9
+ "url": "https://productsdecoded.com/about"
10
+ },
8
11
  "homepage": "https://productsdecoded.com/holt",
9
12
  "repository": {
10
13
  "type": "git",