zen-code 4.7.2 → 4.7.4

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.
@@ -6,7 +6,7 @@ import { a as $a } from "./_commonjsHelpers-DQNKXVTB.mjs";
6
6
  import T, { z as L } from "zod";
7
7
  import { parse as dc } from "marked";
8
8
  import hc from "marked-terminal";
9
- import { Z as z, o as or, r as fc, u as qs, p as mc, _ as K, q as pc, s as gc, t as yc, M as bc, v as wc, w as $n, x as Un, y as ft, z as Xt, R as lt, B as gs, D as Ua, E as ys, G as Qs, H as Ht, I as Zs, J as Ws, K as Ys, L as Xs, N as $t, n as _t, O as Ge, P as me, Q as en, U as ut, V as vc, W as _c, X as xc, Y as Sc, $ as Cc, a0 as Tc, a1 as jc, a2 as Ec, a3 as Ba, a4 as Ic, a5 as Mc, a6 as Pc, a7 as kc, a8 as Ac, a9 as Oc, aa as Rc, ab as Dc, ac as Lc, ad as Nc, ae as Fc, af as $c, ag as Uc, ah as Bc, ai as Vc, aj as zc, ak as Ye, al as Va, am as bs, an as za, ao as Hc, ap as Kc, aq as Gc, ar as Jc, as as Ha, at as qc, au as tt, av as Qc, aw as Zc, ax as Wc, ay as Yc, az as Xc, aA as el, aB as tl, aC as cr, aD as Ka, aE as Tt, aF as Re, aG as rl, aH as sl, aI as Bn, aJ as Ut, aK as Ga, aL as Ja, aM as xt, aN as qa, aO as Qa, aP as rt, aQ as Za, aR as Vn, aS as yr, aT as Wa, aU as Ya, aV as ye, aW as Xa, aX as nl, aY as lr, aZ as Qe, a_ as ei, a$ as al, b0 as tn, b1 as il, b2 as ol, b3 as cl, b4 as ll, b5 as ul, b6 as dl, b7 as hl, b8 as fl, b9 as ml, ba as pl, bb as Ar, bc as st, bd as Or, be as ti, bf as ri, bg as si, bh as Rr, bi as ws, bj as gl, bk as vs, bl as rn, bm as yl, bn as bl, bo as wl, bp as vl, bq as _l, br as xl, bs as ni, bt as sn, bu as Sl, bv as Cl, bw as Tl, bx as nn, by as jl, bz as El, bA as Il, bB as Ml, bC as ai, bD as _s, bE as Pl, bF as kl, bG as Al, bH as Ol, bI as Rl, bJ as Dl, bK as Ll, bL as Nl, bM as Fl, bN as $l, bO as Ul, bP as Bl, bQ as Vl, bR as zl, bS as Hl, bT as Kl, bU as Gl, bV as Jl, bW as ql, bX as Ql, bY as Zl, bZ as Wl, b_ as Yl, b$ as Xl, c0 as eu, c1 as tu, c2 as ru, c3 as su, c4 as nu, c5 as au, c6 as iu, c7 as ou, c8 as cu, c9 as lu, ca as uu, cb as du, cc as hu, cd as fu, ce as mu, cf as pu, cg as gu, ch as yu, ci as bu, cj as wu, ck as vu, cl as _u, cm as xu, cn as Su, co as Cu, cp as Tu, cq as ju, cr as Eu, cs as Iu, k as Mu, ct as Pu, cu as ku, cv as Au, cw as Ou, cx as ii, cy as Ru } from "./graphBuilder-C0ZKh5fB.mjs";
9
+ import { Z as z, o as or, r as fc, u as qs, p as mc, _ as K, q as pc, s as gc, t as yc, M as bc, v as wc, w as $n, x as Un, y as ft, z as Xt, R as lt, B as gs, D as Ua, E as ys, G as Qs, H as Ht, I as Zs, J as Ws, K as Ys, L as Xs, N as $t, n as _t, O as Ge, P as me, Q as en, U as ut, V as vc, W as _c, X as xc, Y as Sc, $ as Cc, a0 as Tc, a1 as jc, a2 as Ec, a3 as Ba, a4 as Ic, a5 as Mc, a6 as Pc, a7 as kc, a8 as Ac, a9 as Oc, aa as Rc, ab as Dc, ac as Lc, ad as Nc, ae as Fc, af as $c, ag as Uc, ah as Bc, ai as Vc, aj as zc, ak as Ye, al as Va, am as bs, an as za, ao as Hc, ap as Kc, aq as Gc, ar as Jc, as as Ha, at as qc, au as tt, av as Qc, aw as Zc, ax as Wc, ay as Yc, az as Xc, aA as el, aB as tl, aC as cr, aD as Ka, aE as Tt, aF as Re, aG as rl, aH as sl, aI as Bn, aJ as Ut, aK as Ga, aL as Ja, aM as xt, aN as qa, aO as Qa, aP as rt, aQ as Za, aR as Vn, aS as yr, aT as Wa, aU as Ya, aV as ye, aW as Xa, aX as nl, aY as lr, aZ as Qe, a_ as ei, a$ as al, b0 as tn, b1 as il, b2 as ol, b3 as cl, b4 as ll, b5 as ul, b6 as dl, b7 as hl, b8 as fl, b9 as ml, ba as pl, bb as Ar, bc as st, bd as Or, be as ti, bf as ri, bg as si, bh as Rr, bi as ws, bj as gl, bk as vs, bl as rn, bm as yl, bn as bl, bo as wl, bp as vl, bq as _l, br as xl, bs as ni, bt as sn, bu as Sl, bv as Cl, bw as Tl, bx as nn, by as jl, bz as El, bA as Il, bB as Ml, bC as ai, bD as _s, bE as Pl, bF as kl, bG as Al, bH as Ol, bI as Rl, bJ as Dl, bK as Ll, bL as Nl, bM as Fl, bN as $l, bO as Ul, bP as Bl, bQ as Vl, bR as zl, bS as Hl, bT as Kl, bU as Gl, bV as Jl, bW as ql, bX as Ql, bY as Zl, bZ as Wl, b_ as Yl, b$ as Xl, c0 as eu, c1 as tu, c2 as ru, c3 as su, c4 as nu, c5 as au, c6 as iu, c7 as ou, c8 as cu, c9 as lu, ca as uu, cb as du, cc as hu, cd as fu, ce as mu, cf as pu, cg as gu, ch as yu, ci as bu, cj as wu, ck as vu, cl as _u, cm as xu, cn as Su, co as Cu, cp as Tu, cq as ju, cr as Eu, cs as Iu, k as Mu, ct as Pu, cu as ku, cv as Au, cw as Ou, cx as ii, cy as Ru } from "./graphBuilder-DJoMXf6J.mjs";
10
10
  import { m as St } from "./metadata-XVTVXthy.mjs";
11
11
  import { readdirSync as Du, readFileSync as Lu } from "node:fs";
12
12
  import { join as br } from "node:path";
@@ -9529,7 +9529,7 @@ User's request:
9529
9529
  success: !1,
9530
9530
  message: "配置更新功能不可用"
9531
9531
  };
9532
- const { configStore: s } = await import("./graphBuilder-C0ZKh5fB.mjs").then((o) => o.cz), a = (await s.getConfig()).compact_mode ?? !1;
9532
+ const { configStore: s } = await import("./graphBuilder-DJoMXf6J.mjs").then((o) => o.cz), a = (await s.getConfig()).compact_mode ?? !1;
9533
9533
  return await r({ compact_mode: !a }), {
9534
9534
  success: !0,
9535
9535
  message: !a ? "紧凑模式已启用" : "紧凑模式已关闭",
@@ -16599,7 +16599,7 @@ const Ib = async () => {
16599
16599
  if (process.env.REDIS_URL && (process.env.CHECKPOINT_TYPE === "redis" || process.env.CHECKPOINT_TYPE === "shallow/redis")) {
16600
16600
  if (process.env.CHECKPOINT_TYPE === "redis") {
16601
16601
  console.debug("LG | Using redis as checkpoint");
16602
- const { RedisSaver: e } = await import("./index-C1KlZecq.mjs");
16602
+ const { RedisSaver: e } = await import("./index-F6_SKYUd.mjs");
16603
16603
  return await e.fromUrl(process.env.REDIS_URL, {
16604
16604
  defaultTTL: 60,
16605
16605
  // TTL in minutes
@@ -16608,23 +16608,23 @@ const Ib = async () => {
16608
16608
  }
16609
16609
  if (process.env.CHECKPOINT_TYPE === "shallow/redis") {
16610
16610
  console.debug("LG | Using shallow redis as checkpoint");
16611
- const { ShallowRedisSaver: e } = await import("./shallow-Chojy10N.mjs");
16611
+ const { ShallowRedisSaver: e } = await import("./shallow-G4eKoZ7M.mjs");
16612
16612
  return await e.fromUrl(process.env.REDIS_URL);
16613
16613
  }
16614
16614
  }
16615
16615
  if (process.env.DATABASE_URL && Go(process.env.DATABASE_URL) === "postgres") {
16616
16616
  console.debug("LG | Using postgres as checkpoint");
16617
- const { createPGCheckpoint: e } = await import("./checkpoint-DxiUsHMy-DUR1G4qr.mjs");
16617
+ const { createPGCheckpoint: e } = await import("./checkpoint-DxiUsHMy-B5iaccT2.mjs");
16618
16618
  return e();
16619
16619
  }
16620
16620
  if (process.env.SQLITE_DATABASE_URI) {
16621
16621
  if (process.env.CHECKPOINT_TYPE === "sqlite") {
16622
16622
  console.debug("LG | Using sqlite (full) as checkpoint");
16623
- const { SqliteSaver: r } = await import("./checkpoint-C5AFBYE--BLTNueev.mjs");
16623
+ const { SqliteSaver: r } = await import("./checkpoint-C5AFBYE--CczNxXBB.mjs");
16624
16624
  return await r.fromConnStringAsync(process.env.SQLITE_DATABASE_URI);
16625
16625
  }
16626
16626
  console.debug("LG | Using shallow sqlite as checkpoint (default)");
16627
- const { SqliteShallowSaver: e } = await import("./shallow-checkpoint-BEhTdp7z-DXpUl1bX.mjs");
16627
+ const { SqliteShallowSaver: e } = await import("./shallow-checkpoint-BEhTdp7z-DfHxnfoU.mjs");
16628
16628
  return await e.fromConnStringAsync(process.env.SQLITE_DATABASE_URI);
16629
16629
  }
16630
16630
  return console.log("LG | You are using memory as checkpoint!"), console.log(
@@ -16638,7 +16638,7 @@ const Ib = async () => {
16638
16638
  let e;
16639
16639
  if (process.env.REDIS_URL) {
16640
16640
  console.debug("LG | Using redis as stream queue");
16641
- const { RedisStreamQueue: t } = await import("./queue-DySatFkr-CEs2Mnxs.mjs");
16641
+ const { RedisStreamQueue: t } = await import("./queue-DySatFkr-CG2GdO4P.mjs");
16642
16642
  e = t;
16643
16643
  } else
16644
16644
  e = An;
@@ -19789,7 +19789,7 @@ const ct = ({ path: e, color: t = "cyan", line: r }) => {
19789
19789
  ] }) });
19790
19790
  }
19791
19791
  }), wv = we({
19792
- name: "search-files-rg",
19792
+ name: "search_files_rg",
19793
19793
  description: "Ripgrep - fast text search tool",
19794
19794
  parameters: {},
19795
19795
  handler: ve.waitForUIDone,
@@ -21589,7 +21589,7 @@ function S_({ filter: e, enabled: t = !0 }) {
21589
21589
  return Je({
21590
21590
  queryKey: ue.tasks.list(e),
21591
21591
  queryFn: async () => {
21592
- const { getTasksStore: r } = await import("./index-BtwwcW8G.mjs"), s = r(process.cwd());
21592
+ const { getTasksStore: r } = await import("./index-Dxfhvdx8.mjs"), s = r(process.cwd());
21593
21593
  return await s.initialize(), e ? await s.getTasksByStatus(e) : await s.getAllTasks();
21594
21594
  },
21595
21595
  enabled: t,
@@ -21601,7 +21601,7 @@ function C_() {
21601
21601
  const e = Gt();
21602
21602
  return mn({
21603
21603
  mutationFn: async (t) => {
21604
- const { getTasksStore: r } = await import("./index-BtwwcW8G.mjs"), s = r(process.cwd());
21604
+ const { getTasksStore: r } = await import("./index-Dxfhvdx8.mjs"), s = r(process.cwd());
21605
21605
  return await s.initialize(), await s.deleteTask(t);
21606
21606
  },
21607
21607
  onSuccess: (t, r) => {
@@ -1,6 +1,6 @@
1
1
  import { Kysely as m, sql as d } from "kysely";
2
- import { B as b, T as l, c as E, m as g } from "./app-BEVifv1a.mjs";
3
- import "./graphBuilder-C0ZKh5fB.mjs";
2
+ import { B as b, T as l, c as E, m as g } from "./app-CK3nD8Gj.mjs";
3
+ import "./graphBuilder-DJoMXf6J.mjs";
4
4
  const u = {
5
5
  maxRetries: 3,
6
6
  baseDelayMs: 100,
@@ -1,5 +1,5 @@
1
- import { T as l, B as N, W as k, m as y } from "./app-BEVifv1a.mjs";
2
- import "./graphBuilder-C0ZKh5fB.mjs";
1
+ import { T as l, B as N, W as k, m as y } from "./app-CK3nD8Gj.mjs";
2
+ import "./graphBuilder-DJoMXf6J.mjs";
3
3
  import w from "pg";
4
4
  const S = (h) => [
5
5
  "checkpoints",
@@ -23210,7 +23210,7 @@ Level 3: 实现细节 (具体函数、测试用例、依赖关系)
23210
23210
 
23211
23211
  | 目标 | 首选工具 | 备选策略 |
23212
23212
  |------|----------|----------|
23213
- | 找函数/类定义 | \`search-files-rg\` 正则 | glob + 读取 |
23213
+ | 找函数/类定义 | \`search_files_rg\` 正则 | glob + 读取 |
23214
23214
  | 找文件位置 | \`glob_files\` 模式 | 目录遍历 |
23215
23215
  | 理解调用关系 | grep 引用 + 读取上下文 | 类型定义追踪 |
23216
23216
  | 找配置项 | grep 配置文件 | 环境变量搜索 |
@@ -28025,7 +28025,7 @@ Process timed out`
28025
28025
  return r.code !== 0 && r.stderr ? r.code === 1 && r.stdout === "" ? "No matches found." : r.code === 124 || r.stderr.includes("timeout") || r.stderr.includes("timed out") ? "Error: Search timed out after 15 seconds. Please use a more specific pattern or limit the search scope with type/glob/path parameters." : `Error executing ripgrep: ${r.stderr}` : r.stdout || "No matches found.";
28026
28026
  },
28027
28027
  {
28028
- name: "search-files-rg",
28028
+ name: "search_files_rg",
28029
28029
  description: `Ripgrep (rg) - A fast text search tool that recursively searches directories for regex patterns
28030
28030
 
28031
28031
  ⚠️ IMPORTANT USAGE GUIDELINES:
@@ -28415,7 +28415,7 @@ async function jA(t) {
28415
28415
  name: "subagents",
28416
28416
  description: "Task delegation to specialized agents",
28417
28417
  execute: async () => {
28418
- const { createSubAgentsMiddleware: i } = await import("./subTasks-BiLgSVbj.mjs");
28418
+ const { createSubAgentsMiddleware: i } = await import("./subTasks-DNjIN4eU.mjs");
28419
28419
  return await i(t);
28420
28420
  }
28421
28421
  };
@@ -28426,7 +28426,7 @@ async function jA(t) {
28426
28426
  description: "Knowledge persistence",
28427
28427
  execute: async (i) => {
28428
28428
  i.projectMemoriesDir = i.projectMemoriesDir || "./.claude/memories";
28429
- const { MemoriesMiddleware: a } = await import("./memories-pFgbB1RI.mjs");
28429
+ const { MemoriesMiddleware: a } = await import("./memories-CaHDnBK1.mjs");
28430
28430
  return new a(i);
28431
28431
  }
28432
28432
  };
@@ -28611,7 +28611,7 @@ async function zA() {
28611
28611
  write_file: !0,
28612
28612
  edit_file: !0,
28613
28613
  glob_files: !0,
28614
- "search-files-rg": !0,
28614
+ search_files_rg: !0,
28615
28615
  folder_operations: !0,
28616
28616
  terminal: !0,
28617
28617
  ask_user_questions: !0,
@@ -28634,7 +28634,7 @@ async function zA() {
28634
28634
  write_file: !0,
28635
28635
  edit_file: !0,
28636
28636
  glob_files: !0,
28637
- "search-files-rg": !0,
28637
+ search_files_rg: !0,
28638
28638
  folder_operations: !0,
28639
28639
  terminal: !0,
28640
28640
  ask_user_questions: !0,
@@ -1,4 +1,4 @@
1
- import { A as s, C as m, F as o, e as c, S as i, a as p, d as h, b as k, h as n, f as g, g as T, T as f, c as l } from "./graphBuilder-C0ZKh5fB.mjs";
1
+ import { A as s, C as m, F as o, e as c, S as i, a as p, d as h, b as k, h as n, f as g, g as T, T as f, c as l } from "./graphBuilder-DJoMXf6J.mjs";
2
2
  import { FileSystemSkillStore as y } from "./FileSystemSkillStore-Dl5briBv.mjs";
3
3
  import { FileSystemPluginStore as F } from "./FileSystemPluginStore-ChortK7z.mjs";
4
4
  import "lowdb";
@@ -1,5 +1,5 @@
1
- import { B as C, u as v, c as x, T as $, m as I } from "./app-BEVifv1a.mjs";
2
- import "./graphBuilder-C0ZKh5fB.mjs";
1
+ import { B as C, u as v, c as x, T as $, m as I } from "./app-CK3nD8Gj.mjs";
2
+ import "./graphBuilder-DJoMXf6J.mjs";
3
3
  import { createClient as O, createCluster as N } from "redis";
4
4
  const W = [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  import { l } from "./load-iYJqYrjn.mjs";
2
- import { n as h } from "./graphBuilder-C0ZKh5fB.mjs";
2
+ import { n as h } from "./graphBuilder-DJoMXf6J.mjs";
3
3
  const M = `## Memory System
4
4
 
5
5
  你可以访问一个包含之前任务和经验知识的记忆库。
@@ -1,5 +1,5 @@
1
1
  import { HumanMessage as c } from "langchain";
2
- import { i as m, j as d, k as p } from "./graphBuilder-C0ZKh5fB.mjs";
2
+ import { i as m, j as d, k as p } from "./graphBuilder-DJoMXf6J.mjs";
3
3
  import "@langchain/langgraph";
4
4
  import "zod";
5
5
  import "@langchain/openai";
@@ -1,4 +1,4 @@
1
- import { a as h, C as d } from "./app-BEVifv1a.mjs";
1
+ import { a as h, C as d } from "./app-CK3nD8Gj.mjs";
2
2
  import { createClient as m } from "redis";
3
3
  class o extends h {
4
4
  // 轮询间隔(毫秒)
@@ -1,5 +1,5 @@
1
- import { B as $, u as g } from "./app-BEVifv1a.mjs";
2
- import "./graphBuilder-C0ZKh5fB.mjs";
1
+ import { B as $, u as g } from "./app-CK3nD8Gj.mjs";
2
+ import "./graphBuilder-DJoMXf6J.mjs";
3
3
  import { createClient as T } from "redis";
4
4
  function k(u) {
5
5
  if (u === null || typeof u != "object") return JSON.stringify(u);
@@ -1,6 +1,6 @@
1
1
  import { Kysely as L, sql as p } from "kysely";
2
- import { B as S, g as x, T as f, u as O, c as R, W as v, m as C } from "./app-BEVifv1a.mjs";
3
- import "./graphBuilder-C0ZKh5fB.mjs";
2
+ import { B as S, g as x, T as f, u as O, c as R, W as v, m as C } from "./app-CK3nD8Gj.mjs";
3
+ import "./graphBuilder-DJoMXf6J.mjs";
4
4
  const u = {
5
5
  maxRetries: 3,
6
6
  baseDelayMs: 100,
@@ -1,6 +1,6 @@
1
1
  import { getAgentListFromPackage as s, SubAgentsMiddleware as g } from "@langgraph-js/standard-agent";
2
2
  import { SubAgentsMiddleware as w, getAgentListFromPackage as S } from "@langgraph-js/standard-agent";
3
- import { l as i, m as o } from "./graphBuilder-C0ZKh5fB.mjs";
3
+ import { l as i, m as o } from "./graphBuilder-DJoMXf6J.mjs";
4
4
  async function m(e) {
5
5
  const t = await s(e);
6
6
  return new g({
package/dist/zen-code.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./MultiLineTextInput-CL8nm9nv.mjs";
2
2
  import "chalk";
3
- import "./app-BEVifv1a.mjs";
3
+ import "./app-CK3nD8Gj.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-code",
3
- "version": "4.7.2",
3
+ "version": "4.7.4",
4
4
  "description": "",
5
5
  "main": "./dist/cli.mjs",
6
6
  "bin": "./dist/cli.mjs",
@@ -28,7 +28,7 @@
28
28
  "kysely": "^0.28.11",
29
29
  "kysely-bun-worker": "^1.2.1",
30
30
  "kysely-wasm": "^1.2.1",
31
- "langchain": "^1.2.25",
31
+ "langchain": "1.1.1",
32
32
  "lowdb": "^7.0.1",
33
33
  "marked": "^16.4.2",
34
34
  "marked-terminal": "^7.3.0",
@@ -68,8 +68,8 @@
68
68
  "vite-plugin-static-copy": "^3.1.4",
69
69
  "vitest": "^4.0.18",
70
70
  "@codegraph/union-client": "1.0.0",
71
- "@codegraph/agent": "1.0.0",
72
71
  "@codegraph/config": "1.0.0",
72
+ "@codegraph/agent": "1.0.0",
73
73
  "ink-pro": "1.1.0"
74
74
  },
75
75
  "babel": {