zen-code 4.1.0 → 4.3.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.
@@ -1,6 +1,6 @@
1
- import { r as P, u as d, s as _ } from "./graphBuilder-BSX1uOgk.mjs";
1
+ import { I as P, J as d, K as _ } from "./graphBuilder-2Ioob7L7.mjs";
2
2
  var v, m, g = 0, O = 0;
3
- function s(r, e, n) {
3
+ function h(r, e, n) {
4
4
  var f = 0, t = e || new Array(16);
5
5
  r = r || {};
6
6
  var i = r.node, a = r.clockseq;
@@ -20,7 +20,7 @@ function s(r, e, n) {
20
20
  t[f + b] = i[b];
21
21
  return e || d(t);
22
22
  }
23
- function h(r) {
23
+ function s(r) {
24
24
  var e = typeof r == "string" ? _(r) : r, n = S(e);
25
25
  return typeof r == "string" ? d(n) : n;
26
26
  }
@@ -66,10 +66,10 @@ function q(r, e) {
66
66
  return (e === "string" ? String : Number)(r);
67
67
  }
68
68
  function E(r = {}, e, n = 0) {
69
- var f = s(w(w({}, r), {}, {
69
+ var f = h(w(w({}, r), {}, {
70
70
  _v6: !0
71
71
  }), new Uint8Array(16));
72
- return f = h(f), d(f);
72
+ return f = s(f), d(f);
73
73
  }
74
74
  function A(r) {
75
75
  return E({ clockseq: r });
@@ -1,7 +1,7 @@
1
- import { S as n } from "./graphBuilder-BSX1uOgk.mjs";
2
- import { n as b, f as j, k as T, A as v, m as R, l as L, B as A, o as x, d as $, i as C, e as _, M as I, P as E, j as U, b as z, h as F, T as W, q as K, p as Y } from "./graphBuilder-BSX1uOgk.mjs";
1
+ import { l as n } from "./graphBuilder-2Ioob7L7.mjs";
2
+ import { B as b, t as j, x as v, s as R, z as T, y as L, D as x, E as A, q as $, v as C, r as _, M as I, P as E, w as z, p as U, u as F, o as W, H as K, G as Y } from "./graphBuilder-2Ioob7L7.mjs";
3
3
  import r from "node:fs/promises";
4
- import { join as p } from "node:path";
4
+ import { join as m } from "node:path";
5
5
  import { l as d } from "./load-Cjl9cJ0o.mjs";
6
6
  const k = `
7
7
 
@@ -32,7 +32,7 @@ class g {
32
32
  async findDocumentationFile() {
33
33
  const s = ["CLAUDE.md", "AGENTS.md"];
34
34
  for (const i of s) {
35
- const l = p(this.projectRoot, i);
35
+ const l = m(this.projectRoot, i);
36
36
  try {
37
37
  return await r.access(l), { content: await r.readFile(l, "utf-8"), filename: i };
38
38
  } catch {
@@ -179,31 +179,31 @@ class P {
179
179
  s.systemPrompt ? o = s.systemPrompt + `
180
180
 
181
181
  ` + a : o = a;
182
- const h = new n(o), m = {
182
+ const h = new n(o), p = {
183
183
  ...s,
184
184
  systemMessage: h
185
185
  };
186
- return await i(m);
186
+ return await i(p);
187
187
  }
188
188
  }
189
189
  export {
190
190
  b as AgentPackage,
191
191
  j as AgentPackageSchema,
192
- T as AgentRepository,
193
- v as AgentSchema,
194
- R as AgentSerializer,
192
+ v as AgentRepository,
193
+ R as AgentSchema,
194
+ T as AgentSerializer,
195
195
  L as AgentValidator,
196
196
  g as AgentsMdMiddleware,
197
- A as BaseStorage,
198
- x as MemoryStorage,
197
+ x as BaseStorage,
198
+ A as MemoryStorage,
199
199
  $ as MiddlewareCustomParamsSchema,
200
200
  C as MiddlewareRegistry,
201
201
  _ as MiddlewareSchema,
202
202
  I as ModelSchema,
203
203
  E as PromptSchema,
204
204
  P as SkillsMiddleware,
205
- U as StandardAgent,
206
- z as ToolCustomParamsSchema,
205
+ z as StandardAgent,
206
+ U as ToolCustomParamsSchema,
207
207
  F as ToolRegistry,
208
208
  W as ToolSchema,
209
209
  K as anthropicPromptCachingMiddleware,
@@ -1,6 +1,6 @@
1
- import { u as C } from "./id-CW5jldpA.mjs";
2
- import { B as v, c as x, T as $, m as I } from "./app-C-NaCZSh.mjs";
3
- import "./graphBuilder-BSX1uOgk.mjs";
1
+ import { u as C } from "./id-CxmtJIkV.mjs";
2
+ import { B as v, c as x, T as $, m as I } from "./app-Dy9hkwWD.mjs";
3
+ import "./graphBuilder-2Ioob7L7.mjs";
4
4
  import { createClient as O, createCluster as N } from "redis";
5
5
  const W = [
6
6
  {
@@ -0,0 +1,23 @@
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-2Ioob7L7.mjs";
2
+ import { FileSystemSkillStore as y } from "./FileSystemSkillStore-yvEvcRxB.mjs";
3
+ import { FileSystemPluginStore as F } from "./FileSystemPluginStore-ChortK7z.mjs";
4
+ import "lowdb";
5
+ import "lowdb/node";
6
+ import "micromatch";
7
+ export {
8
+ s as AgentTypeSchema,
9
+ m as ConfigManager,
10
+ o as FileSystemConfigStore,
11
+ F as FileSystemPluginStore,
12
+ y as FileSystemSkillStore,
13
+ c as SparkItemSchema,
14
+ i as SparkItemTypeSchema,
15
+ p as SparkPrioritySchema,
16
+ h as SparkSourceSchema,
17
+ k as SparkStatusSchema,
18
+ n as TaskExecutionRecordSchema,
19
+ g as TaskExecutionSchema,
20
+ T as TaskNodeSchema,
21
+ f as TaskStatusSchema,
22
+ l as createFSManager
23
+ };
@@ -1,5 +1,5 @@
1
1
  import { l } from "./load-Bh8eo6qE.mjs";
2
- import { S as h } from "./graphBuilder-BSX1uOgk.mjs";
2
+ import { l as h } from "./graphBuilder-2Ioob7L7.mjs";
3
3
  const M = `## Memory System
4
4
 
5
5
  你可以访问一个包含之前任务和经验知识的记忆库。
@@ -1,45 +1,44 @@
1
1
  import { HumanMessage as c } from "langchain";
2
- import { g as m } from "./graphBuilder-BSX1uOgk.mjs";
2
+ import { i as d, j as m, k as p } from "./graphBuilder-2Ioob7L7.mjs";
3
3
  import "@langchain/langgraph";
4
4
  import "zod";
5
5
  import "@langchain/openai";
6
6
  import "@langchain/anthropic";
7
7
  import "yaml";
8
8
  import "micromatch";
9
- import { initDb as d, getConfig as p } from "./index-DFARkGOA.mjs";
10
9
  import "lowdb";
11
10
  import "lowdb/node";
12
11
  async function l() {
13
12
  return new Promise((t, n) => {
14
- let e = "";
15
- process.stdin.setEncoding("utf8"), process.stdin.on("data", (r) => {
16
- e += r;
13
+ let r = "";
14
+ process.stdin.setEncoding("utf8"), process.stdin.on("data", (e) => {
15
+ r += e;
17
16
  }), process.stdin.on("end", () => {
18
- t(e);
19
- }), process.stdin.on("error", (r) => {
20
- n(r);
17
+ t(r);
18
+ }), process.stdin.on("error", (e) => {
19
+ n(e);
21
20
  });
22
21
  });
23
22
  }
24
- async function C(t, n = !1) {
23
+ async function x(t, n = !1) {
25
24
  await d();
26
- const e = await p();
27
- let r = t || "";
25
+ const r = await m();
26
+ let e = t || "";
28
27
  if (n)
29
28
  try {
30
- r = (await l()).trim();
29
+ e = (await l()).trim();
31
30
  } catch (o) {
32
31
  throw console.error("❌ 读取 stdin 失败:", o), o;
33
32
  }
34
- r || (console.error("❌ 错误: 未提供输入内容"), console.error(`
33
+ e || (console.error("❌ 错误: 未提供输入内容"), console.error(`
35
34
  用法:`), console.error(' zen-code -p "你的任务描述"'), console.error(' echo "内容" | zen-code'), process.exit(1));
36
35
  try {
37
36
  const o = {
38
- messages: [new c(r)],
39
- provider_id: e.provider_id,
40
- model_id: e.model_id,
41
- enable_thinking: e.enable_thinking
42
- }, i = await m.invoke(o, {
37
+ messages: [new c(e)],
38
+ provider_id: r.provider_id,
39
+ model_id: r.model_id,
40
+ enable_thinking: r.enable_thinking
41
+ }, i = await p.invoke(o, {
43
42
  recursionLimit: 500
44
43
  }), s = i.messages || [], a = s[s.length - 1];
45
44
  return a && console.log(a.text), i;
@@ -50,5 +49,5 @@ async function C(t, n = !1) {
50
49
  }
51
50
  }
52
51
  export {
53
- C as runNonInteractive
52
+ x as runNonInteractive
54
53
  };
@@ -1,4 +1,4 @@
1
- import { a as h, C as u } from "./app-C-NaCZSh.mjs";
1
+ import { a as h, C as u } from "./app-Dy9hkwWD.mjs";
2
2
  import { createClient as c } from "redis";
3
3
  class n extends h {
4
4
  constructor(s, e = !0, i = 300) {
@@ -1,6 +1,6 @@
1
- import { u as $ } from "./id-CW5jldpA.mjs";
2
- import { B as g } from "./app-C-NaCZSh.mjs";
3
- import "./graphBuilder-BSX1uOgk.mjs";
1
+ import { u as $ } from "./id-CxmtJIkV.mjs";
2
+ import { B as g } from "./app-Dy9hkwWD.mjs";
3
+ import "./graphBuilder-2Ioob7L7.mjs";
4
4
  import { createClient as T } from "redis";
5
5
  function k(u) {
6
6
  if (u === null || typeof u != "object") return JSON.stringify(u);
@@ -1,7 +1,7 @@
1
1
  import { tool as p, HumanMessage as d, SystemMessage as m } from "langchain";
2
2
  import { Command as f, Annotation as b } from "@langchain/langgraph";
3
3
  import { z as i } from "zod";
4
- import { c as w, a as y } from "./graphBuilder-BSX1uOgk.mjs";
4
+ import { m as w, n as y } from "./graphBuilder-2Ioob7L7.mjs";
5
5
  import "@langchain/openai";
6
6
  const k = i.object({
7
7
  task_store: i.record(i.string(), i.any()).default({})
package/dist/zen-code.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import "./MultiLineTextInput-DjNvaZzA.mjs";
1
+ import "./MultiLineTextInput-e7hD79Wp.mjs";
2
2
  import "chalk";
3
- import "./app-C-NaCZSh.mjs";
3
+ import "./app-Dy9hkwWD.mjs";