zen-code 4.7.1 → 4.7.2

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.
@@ -0,0 +1,144 @@
1
+ const g = (a = 0) => (e) => `\x1B[${e + a}m`, u = (a = 0) => (e) => `\x1B[${38 + a};5;${e}m`, b = (a = 0) => (e, n, t) => `\x1B[${38 + a};2;${e};${n};${t}m`, r = {
2
+ modifier: {
3
+ reset: [0, 0],
4
+ // 21 isn't widely supported and 22 does the same thing
5
+ bold: [1, 22],
6
+ dim: [2, 22],
7
+ italic: [3, 23],
8
+ underline: [4, 24],
9
+ overline: [53, 55],
10
+ inverse: [7, 27],
11
+ hidden: [8, 28],
12
+ strikethrough: [9, 29]
13
+ },
14
+ color: {
15
+ black: [30, 39],
16
+ red: [31, 39],
17
+ green: [32, 39],
18
+ yellow: [33, 39],
19
+ blue: [34, 39],
20
+ magenta: [35, 39],
21
+ cyan: [36, 39],
22
+ white: [37, 39],
23
+ // Bright color
24
+ blackBright: [90, 39],
25
+ gray: [90, 39],
26
+ // Alias of `blackBright`
27
+ grey: [90, 39],
28
+ // Alias of `blackBright`
29
+ redBright: [91, 39],
30
+ greenBright: [92, 39],
31
+ yellowBright: [93, 39],
32
+ blueBright: [94, 39],
33
+ magentaBright: [95, 39],
34
+ cyanBright: [96, 39],
35
+ whiteBright: [97, 39]
36
+ },
37
+ bgColor: {
38
+ bgBlack: [40, 49],
39
+ bgRed: [41, 49],
40
+ bgGreen: [42, 49],
41
+ bgYellow: [43, 49],
42
+ bgBlue: [44, 49],
43
+ bgMagenta: [45, 49],
44
+ bgCyan: [46, 49],
45
+ bgWhite: [47, 49],
46
+ // Bright color
47
+ bgBlackBright: [100, 49],
48
+ bgGray: [100, 49],
49
+ // Alias of `bgBlackBright`
50
+ bgGrey: [100, 49],
51
+ // Alias of `bgBlackBright`
52
+ bgRedBright: [101, 49],
53
+ bgGreenBright: [102, 49],
54
+ bgYellowBright: [103, 49],
55
+ bgBlueBright: [104, 49],
56
+ bgMagentaBright: [105, 49],
57
+ bgCyanBright: [106, 49],
58
+ bgWhiteBright: [107, 49]
59
+ }
60
+ };
61
+ Object.keys(r.modifier);
62
+ const h = Object.keys(r.color), c = Object.keys(r.bgColor);
63
+ [...h, ...c];
64
+ function f() {
65
+ const a = /* @__PURE__ */ new Map();
66
+ for (const [e, n] of Object.entries(r)) {
67
+ for (const [t, o] of Object.entries(n))
68
+ r[t] = {
69
+ open: `\x1B[${o[0]}m`,
70
+ close: `\x1B[${o[1]}m`
71
+ }, n[t] = r[t], a.set(o[0], o[1]);
72
+ Object.defineProperty(r, e, {
73
+ value: n,
74
+ enumerable: !1
75
+ });
76
+ }
77
+ return Object.defineProperty(r, "codes", {
78
+ value: a,
79
+ enumerable: !1
80
+ }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = g(), r.color.ansi256 = u(), r.color.ansi16m = b(), r.bgColor.ansi = g(10), r.bgColor.ansi256 = u(10), r.bgColor.ansi16m = b(10), Object.defineProperties(r, {
81
+ rgbToAnsi256: {
82
+ value(e, n, t) {
83
+ return e === n && n === t ? e < 8 ? 16 : e > 248 ? 231 : Math.round((e - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(e / 255 * 5) + 6 * Math.round(n / 255 * 5) + Math.round(t / 255 * 5);
84
+ },
85
+ enumerable: !1
86
+ },
87
+ hexToRgb: {
88
+ value(e) {
89
+ const n = /[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));
90
+ if (!n)
91
+ return [0, 0, 0];
92
+ let [t] = n;
93
+ t.length === 3 && (t = [...t].map((l) => l + l).join(""));
94
+ const o = Number.parseInt(t, 16);
95
+ return [
96
+ /* eslint-disable no-bitwise */
97
+ o >> 16 & 255,
98
+ o >> 8 & 255,
99
+ o & 255
100
+ /* eslint-enable no-bitwise */
101
+ ];
102
+ },
103
+ enumerable: !1
104
+ },
105
+ hexToAnsi256: {
106
+ value: (e) => r.rgbToAnsi256(...r.hexToRgb(e)),
107
+ enumerable: !1
108
+ },
109
+ ansi256ToAnsi: {
110
+ value(e) {
111
+ if (e < 8)
112
+ return 30 + e;
113
+ if (e < 16)
114
+ return 90 + (e - 8);
115
+ let n, t, o;
116
+ if (e >= 232)
117
+ n = ((e - 232) * 10 + 8) / 255, t = n, o = n;
118
+ else {
119
+ e -= 16;
120
+ const s = e % 36;
121
+ n = Math.floor(e / 36) / 5, t = Math.floor(s / 6) / 5, o = s % 6 / 5;
122
+ }
123
+ const l = Math.max(n, t, o) * 2;
124
+ if (l === 0)
125
+ return 30;
126
+ let i = 30 + (Math.round(o) << 2 | Math.round(t) << 1 | Math.round(n));
127
+ return l === 2 && (i += 60), i;
128
+ },
129
+ enumerable: !1
130
+ },
131
+ rgbToAnsi: {
132
+ value: (e, n, t) => r.ansi256ToAnsi(r.rgbToAnsi256(e, n, t)),
133
+ enumerable: !1
134
+ },
135
+ hexToAnsi: {
136
+ value: (e) => r.ansi256ToAnsi(r.hexToAnsi256(e)),
137
+ enumerable: !1
138
+ }
139
+ }), r;
140
+ }
141
+ const m = f();
142
+ export {
143
+ m as a
144
+ };
@@ -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-skVEY6RJ.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-C0ZKh5fB.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-CcnStH9S.mjs";
2
- import "./graphBuilder-skVEY6RJ.mjs";
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";
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-skVEY6RJ.mjs";
2
+ import { n as h } from "./graphBuilder-C0ZKh5fB.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-skVEY6RJ.mjs";
2
+ import { i as m, j as d, k as p } from "./graphBuilder-C0ZKh5fB.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-CcnStH9S.mjs";
1
+ import { a as h, C as d } from "./app-BEVifv1a.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-CcnStH9S.mjs";
2
- import "./graphBuilder-skVEY6RJ.mjs";
1
+ import { B as $, u as g } from "./app-BEVifv1a.mjs";
2
+ import "./graphBuilder-C0ZKh5fB.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-CcnStH9S.mjs";
3
- import "./graphBuilder-skVEY6RJ.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-BEVifv1a.mjs";
3
+ import "./graphBuilder-C0ZKh5fB.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-skVEY6RJ.mjs";
3
+ import { l as i, m as o } from "./graphBuilder-C0ZKh5fB.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
- import "./MultiLineTextInput-e7hD79Wp.mjs";
1
+ import "./MultiLineTextInput-CL8nm9nv.mjs";
2
2
  import "chalk";
3
- import "./app-CcnStH9S.mjs";
3
+ import "./app-BEVifv1a.mjs";
@@ -1,4 +1,4 @@
1
- import { r as a, j as n, a as c, u as f, T as x } from "./MultiLineTextInput-e7hD79Wp.mjs";
1
+ import { r as a, j as n, a as c, u as f, T as x } from "./MultiLineTextInput-CL8nm9nv.mjs";
2
2
  a(/* @__PURE__ */ n.jsx(l, {}));
3
3
  function l() {
4
4
  const [r, u] = c.useState(`Press any key...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-code",
3
- "version": "4.7.1",
3
+ "version": "4.7.2",
4
4
  "description": "",
5
5
  "main": "./dist/cli.mjs",
6
6
  "bin": "./dist/cli.mjs",
@@ -14,7 +14,7 @@
14
14
  "@anthropic-ai/sdk": "^0.71.2",
15
15
  "@google/generative-ai": "^0.24.1",
16
16
  "@langchain/anthropic": "1.3.10",
17
- "@langchain/core": "1.1.15",
17
+ "@langchain/core": "^1.1.26",
18
18
  "@langchain/google-genai": "^2.1.18",
19
19
  "@langchain/langgraph": "^1.1.0",
20
20
  "@langchain/mcp-adapters": "^1.1.1",
@@ -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.1.1",
31
+ "langchain": "^1.2.25",
32
32
  "lowdb": "^7.0.1",
33
33
  "marked": "^16.4.2",
34
34
  "marked-terminal": "^7.3.0",
@@ -42,7 +42,7 @@
42
42
  "xdg-basedir": "^5.1.0",
43
43
  "yaml": "^2.8.2",
44
44
  "zod": "^4.3.5",
45
- "@langgraph-js/standard-agent": "1.2.2"
45
+ "@langgraph-js/standard-agent": "1.2.3"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@inkjs/ui": "^2.0.0",
@@ -67,9 +67,9 @@
67
67
  "vite-bundle-analyzer": "^1.3.2",
68
68
  "vite-plugin-static-copy": "^3.1.4",
69
69
  "vitest": "^4.0.18",
70
+ "@codegraph/union-client": "1.0.0",
70
71
  "@codegraph/agent": "1.0.0",
71
72
  "@codegraph/config": "1.0.0",
72
- "@codegraph/union-client": "1.0.0",
73
73
  "ink-pro": "1.1.0"
74
74
  },
75
75
  "babel": {