zen-code 1.7.3 → 1.7.5

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.
@@ -1,6 +1,6 @@
1
1
  import { K as T } from "./kysely-Bchvsze0.mjs";
2
2
  import { F as r } from "./sql-CJsUpKEQ.mjs";
3
- import { B as f, T as l, c as y, m } from "./app-QLT8tZMr.mjs";
3
+ import { B as f, T as l, c as y, m } from "./app-CGYzSqAY.mjs";
4
4
  const g = ["source", "step", "parents"];
5
5
  const E = g;
6
6
  class w extends f {
@@ -1,4 +1,4 @@
1
- import { T as l, B as N, W as k, m as y } from "./app-QLT8tZMr.mjs";
1
+ import { T as l, B as N, W as k, m as y } from "./app-CGYzSqAY.mjs";
2
2
  import w from "pg";
3
3
  const S = (h) => [
4
4
  "checkpoints",
@@ -0,0 +1,79 @@
1
+ import { r as P, u as d, p as _ } from "./app-CGYzSqAY.mjs";
2
+ var v, m, g = 0, O = 0;
3
+ function h(r, e, n) {
4
+ var f = 0, t = e || new Array(16);
5
+ r = r || {};
6
+ var i = r.node, a = r.clockseq;
7
+ if (r._v6 || (i || (i = v), a == null && (a = m)), i == null || a == null) {
8
+ var u = r.random || (r.rng || P)();
9
+ i == null && (i = [u[0], u[1], u[2], u[3], u[4], u[5]], !v && !r._v6 && (i[0] |= 1, v = i)), a == null && (a = (u[6] << 8 | u[7]) & 16383, m === void 0 && !r._v6 && (m = a));
10
+ }
11
+ var c = r.msecs !== void 0 ? r.msecs : Date.now(), o = r.nsecs !== void 0 ? r.nsecs : O + 1, p = c - g + (o - O) / 1e4;
12
+ if (p < 0 && r.clockseq === void 0 && (a = a + 1 & 16383), (p < 0 || c > g) && r.nsecs === void 0 && (o = 0), o >= 1e4)
13
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
14
+ g = c, O = o, m = a, c += 122192928e5;
15
+ var l = ((c & 268435455) * 1e4 + o) % 4294967296;
16
+ t[f++] = l >>> 24 & 255, t[f++] = l >>> 16 & 255, t[f++] = l >>> 8 & 255, t[f++] = l & 255;
17
+ var x = c / 4294967296 * 1e4 & 268435455;
18
+ t[f++] = x >>> 8 & 255, t[f++] = x & 255, t[f++] = x >>> 24 & 15 | 16, t[f++] = x >>> 16 & 255, t[f++] = a >>> 8 | 128, t[f++] = a & 255;
19
+ for (var b = 0; b < 6; ++b)
20
+ t[f + b] = i[b];
21
+ return e || d(t);
22
+ }
23
+ function s(r) {
24
+ var e = typeof r == "string" ? _(r) : r, n = S(e);
25
+ return typeof r == "string" ? d(n) : n;
26
+ }
27
+ function S(r, e = !1) {
28
+ return Uint8Array.of((r[6] & 15) << 4 | r[7] >> 4 & 15, (r[7] & 15) << 4 | (r[4] & 240) >> 4, (r[4] & 15) << 4 | (r[5] & 240) >> 4, (r[5] & 15) << 4 | (r[0] & 240) >> 4, (r[0] & 15) << 4 | (r[1] & 240) >> 4, (r[1] & 15) << 4 | (r[2] & 240) >> 4, 96 | r[2] & 15, r[3], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]);
29
+ }
30
+ function j(r, e) {
31
+ var n = Object.keys(r);
32
+ if (Object.getOwnPropertySymbols) {
33
+ var f = Object.getOwnPropertySymbols(r);
34
+ e && (f = f.filter(function(t) {
35
+ return Object.getOwnPropertyDescriptor(r, t).enumerable;
36
+ })), n.push.apply(n, f);
37
+ }
38
+ return n;
39
+ }
40
+ function w(r) {
41
+ for (var e = 1; e < arguments.length; e++) {
42
+ var n = arguments[e] != null ? arguments[e] : {};
43
+ e % 2 ? j(Object(n), !0).forEach(function(f) {
44
+ k(r, f, n[f]);
45
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(n)) : j(Object(n)).forEach(function(f) {
46
+ Object.defineProperty(r, f, Object.getOwnPropertyDescriptor(n, f));
47
+ });
48
+ }
49
+ return r;
50
+ }
51
+ function k(r, e, n) {
52
+ return (e = D(e)) in r ? Object.defineProperty(r, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = n, r;
53
+ }
54
+ function D(r) {
55
+ var e = q(r, "string");
56
+ return typeof e == "symbol" ? e : e + "";
57
+ }
58
+ function q(r, e) {
59
+ if (typeof r != "object" || !r) return r;
60
+ var n = r[Symbol.toPrimitive];
61
+ if (n !== void 0) {
62
+ var f = n.call(r, e);
63
+ if (typeof f != "object") return f;
64
+ throw new TypeError("@@toPrimitive must return a primitive value.");
65
+ }
66
+ return (e === "string" ? String : Number)(r);
67
+ }
68
+ function E(r = {}, e, n = 0) {
69
+ var f = h(w(w({}, r), {}, {
70
+ _v6: !0
71
+ }), new Uint8Array(16));
72
+ return f = s(f), d(f);
73
+ }
74
+ function A(r) {
75
+ return E({ clockseq: r });
76
+ }
77
+ export {
78
+ A as u
79
+ };
@@ -1,4 +1,5 @@
1
- import { B as C, u as v, c as x, T as $, m as I } from "./app-QLT8tZMr.mjs";
1
+ import { u as C } from "./id-Di_PC5Tt.mjs";
2
+ import { B as v, c as x, T as $, m as I } from "./app-CGYzSqAY.mjs";
2
3
  import { createClient as O, createCluster as N } from "redis";
3
4
  const W = [
4
5
  {
@@ -104,7 +105,7 @@ const W = [
104
105
  }
105
106
  }
106
107
  ];
107
- var j = class T extends C {
108
+ var E = class m extends v {
108
109
  client;
109
110
  ttlConfig;
110
111
  constructor(e, t) {
@@ -113,13 +114,13 @@ var j = class T extends C {
113
114
  static async fromUrl(e, t) {
114
115
  const s = O({ url: e });
115
116
  await s.connect();
116
- const i = new T(s, t);
117
+ const i = new m(s, t);
117
118
  return await i.ensureIndexes(), i;
118
119
  }
119
120
  static async fromCluster(e, t) {
120
121
  const s = N({ rootNodes: e });
121
122
  await s.connect();
122
- const i = new T(s, t);
123
+ const i = new m(s, t);
123
124
  return await i.ensureIndexes(), i;
124
125
  }
125
126
  async get(e) {
@@ -145,7 +146,7 @@ var j = class T extends C {
145
146
  await this.ensureIndexes();
146
147
  const c = e.configurable?.thread_id, o = e.configurable?.checkpoint_ns ?? "", f = e.configurable?.checkpoint_id;
147
148
  if (!c) throw new Error("thread_id is required");
148
- const n = t.id || v(0), r = `checkpoint:${c}:${o}:${n}`, p = x(t);
149
+ const n = t.id || C(0), r = `checkpoint:${c}:${o}:${n}`, p = x(t);
149
150
  if (p.channel_values && i !== void 0) if (Object.keys(i).length === 0) p.channel_values = {};
150
151
  else {
151
152
  const u = {};
@@ -247,14 +248,14 @@ var j = class T extends C {
247
248
  const _ = await this.client.json.get(y);
248
249
  if (_) {
249
250
  let k = !0;
250
- for (const [S, m] of Object.entries(t.filter)) {
251
+ for (const [S, T] of Object.entries(t.filter)) {
251
252
  const A = _.metadata?.[S];
252
- if (m === null) {
253
+ if (T === null) {
253
254
  if (A !== null) {
254
255
  k = !1;
255
256
  break;
256
257
  }
257
- } else if (A !== m) {
258
+ } else if (A !== T) {
258
259
  k = !1;
259
260
  break;
260
261
  }
@@ -458,5 +459,5 @@ function g(w) {
458
459
  });
459
460
  }
460
461
  export {
461
- j as RedisSaver
462
+ E as RedisSaver
462
463
  };
@@ -1,4 +1,4 @@
1
- import { a as u, C as h } from "./app-QLT8tZMr.mjs";
1
+ import { a as u, C as h } from "./app-CGYzSqAY.mjs";
2
2
  import { createClient as n } from "redis";
3
3
  class r extends u {
4
4
  constructor(s, e = !0, i = 300) {
@@ -1,4 +1,5 @@
1
- import { B as $, u as g } from "./app-QLT8tZMr.mjs";
1
+ import { u as $ } from "./id-Di_PC5Tt.mjs";
2
+ import { B as g } from "./app-CGYzSqAY.mjs";
2
3
  import { createClient as T } from "redis";
3
4
  function k(u) {
4
5
  if (u === null || typeof u != "object") return JSON.stringify(u);
@@ -85,7 +86,7 @@ const S = [{
85
86
  }
86
87
  }
87
88
  }];
88
- var x = class w extends $ {
89
+ var C = class w extends g {
89
90
  client;
90
91
  ttlConfig;
91
92
  constructor(t, e) {
@@ -104,7 +105,7 @@ var x = class w extends $ {
104
105
  await this.ensureIndexes();
105
106
  const s = t.configurable?.thread_id, c = t.configurable?.checkpoint_ns ?? "", r = t.configurable?.checkpoint_id;
106
107
  if (!s) throw new Error("thread_id is required");
107
- const a = e.id || g(0), l = `checkpoint:${s}:${c}:shallow`;
108
+ const a = e.id || $(0), l = `checkpoint:${s}:${c}:shallow`;
108
109
  let h = null, p = null;
109
110
  try {
110
111
  h = await this.client.json.get(l), h && typeof h == "object" && (p = h.checkpoint_id);
@@ -326,5 +327,5 @@ var x = class w extends $ {
326
327
  }
327
328
  };
328
329
  export {
329
- x as ShallowRedisSaver
330
+ C as ShallowRedisSaver
330
331
  };
package/dist/zen-code.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import "./app-QLT8tZMr.mjs";
1
+ import "./app-CGYzSqAY.mjs";
2
2
  import "chalk";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-code",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "description": "",
5
5
  "main": "cli.js",
6
6
  "bin": "cli.js",
@@ -13,11 +13,13 @@
13
13
  "license": "Apache-2.0",
14
14
  "dependencies": {
15
15
  "@anthropic-ai/sdk": "^0.71.2",
16
- "@langgraph-js/pure-graph": "^2.8.1",
16
+ "@langgraph-js/pure-graph": "^2.10.0",
17
17
  "chalk": "^5.6.2",
18
18
  "execa": "^9.6.0",
19
- "@langchain/anthropic": "^1.3.7",
20
- "@langchain/openai": "^1.2.0",
19
+ "@langchain/anthropic": "1.1.3",
20
+ "@langchain/openai": "1.1.3",
21
+ "@langchain/core": "^1",
22
+ "@langchain/langgraph": "^1.0.7",
21
23
  "extract-zip": "^2.0.1",
22
24
  "fs-extra": "^11.3.3",
23
25
  "lowdb": "^7.0.1",
@@ -29,12 +31,14 @@
29
31
  "tempy": "^3.1.0",
30
32
  "xdg-basedir": "^5.1.0",
31
33
  "yaml": "^2.8.2",
32
- "zod": "^4"
34
+ "zod": "^4",
35
+ "langchain": "1.1.1"
33
36
  },
34
37
  "devDependencies": {
38
+ "ink": "^6.6.0",
35
39
  "@inkjs/ui": "^2.0.0",
36
40
  "@langchain/mcp-adapters": "^1.1.1",
37
- "@langgraph-js/sdk": "^4.3.7",
41
+ "@langgraph-js/sdk": "^4.3.8",
38
42
  "@nanostores/react": "^1.0.0",
39
43
  "@types/diff-match-patch": "^1.0.36",
40
44
  "@types/fs-extra": "^11.0.4",
@@ -43,7 +47,6 @@
43
47
  "@vitejs/plugin-react": "^5.1.2",
44
48
  "comlink": "^4.4.2",
45
49
  "diff-match-patch": "^1.0.5",
46
- "ink": "^6.6.0",
47
50
  "ink-markdown": "^1.0.4",
48
51
  "ink-select-input": "^6.2.0",
49
52
  "ink-spinner": "^5.0.0",