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.
- package/dist/{MultiLineTextInput-DjNvaZzA.mjs → MultiLineTextInput-e7hD79Wp.mjs} +2 -2
- package/dist/{_commonjsHelpers-ByX85dGu.mjs → _commonjsHelpers-DQNKXVTB.mjs} +2 -2
- package/dist/app-Dy9hkwWD.mjs +14467 -0
- package/dist/{checkpoint-1sAx_j1E-22R2HLa7.mjs → checkpoint-1sAx_j1E-DhkeZ_II.mjs} +2 -2
- package/dist/{checkpoint-DxiUsHMy-CaZzTHEH.mjs → checkpoint-DxiUsHMy-_eGVKDHU.mjs} +2 -2
- package/dist/{devtools-DpL9Fl6d.mjs → devtools-CzaVuYnh.mjs} +1 -1
- package/dist/{graphBuilder-BSX1uOgk.mjs → graphBuilder-2Ioob7L7.mjs} +9161 -8606
- package/dist/{id-CW5jldpA.mjs → id-CxmtJIkV.mjs} +5 -5
- package/dist/{index-DHHejsBD.mjs → index-BtzTnQfe.mjs} +13 -13
- package/dist/{index-C37SAWjK.mjs → index-CwuY4ELx.mjs} +3 -3
- package/dist/index-DeHHUkFW.mjs +23 -0
- package/dist/{memories-FoRbTUbN.mjs → memories-Dqh58QqM.mjs} +1 -1
- package/dist/nonInteractive.mjs +18 -19
- package/dist/{queue-D6tEGCGs-CGkpBFRj.mjs → queue-D6tEGCGs-C6wkO825.mjs} +1 -1
- package/dist/{shallow-CehIJgqa.mjs → shallow-Bky_pv_P.mjs} +3 -3
- package/dist/{subTasks-DRzFBQoV.mjs → subTasks-Cklo326x.mjs} +1 -1
- package/dist/zen-code.mjs +2 -2
- package/dist/zen-init.mjs +1 -534
- package/dist/zen-keyboard.mjs +1 -1
- package/package.json +3 -2
- package/dist/FileSystemConfigStore-ezrLDNGJ.mjs +0 -91
- package/dist/app-C-NaCZSh.mjs +0 -12053
- package/dist/get_allowed_models-DWso18Ri.mjs +0 -253
- package/dist/index-DFARkGOA.mjs +0 -442
- package/dist/tasks-D5CMeC2P.mjs +0 -237
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
|
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 =
|
|
69
|
+
var f = h(w(w({}, r), {}, {
|
|
70
70
|
_v6: !0
|
|
71
71
|
}), new Uint8Array(16));
|
|
72
|
-
return 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 {
|
|
2
|
-
import {
|
|
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
|
|
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 =
|
|
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),
|
|
182
|
+
const h = new n(o), p = {
|
|
183
183
|
...s,
|
|
184
184
|
systemMessage: h
|
|
185
185
|
};
|
|
186
|
-
return await i(
|
|
186
|
+
return await i(p);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
export {
|
|
190
190
|
b as AgentPackage,
|
|
191
191
|
j as AgentPackageSchema,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
192
|
+
v as AgentRepository,
|
|
193
|
+
R as AgentSchema,
|
|
194
|
+
T as AgentSerializer,
|
|
195
195
|
L as AgentValidator,
|
|
196
196
|
g as AgentsMdMiddleware,
|
|
197
|
-
|
|
198
|
-
|
|
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
|
-
|
|
206
|
-
|
|
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-
|
|
2
|
-
import { B as v, c as x, T as $, m as I } from "./app-
|
|
3
|
-
import "./graphBuilder-
|
|
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
|
+
};
|
package/dist/nonInteractive.mjs
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
1
|
import { HumanMessage as c } from "langchain";
|
|
2
|
-
import {
|
|
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
|
|
15
|
-
process.stdin.setEncoding("utf8"), process.stdin.on("data", (
|
|
16
|
-
|
|
13
|
+
let r = "";
|
|
14
|
+
process.stdin.setEncoding("utf8"), process.stdin.on("data", (e) => {
|
|
15
|
+
r += e;
|
|
17
16
|
}), process.stdin.on("end", () => {
|
|
18
|
-
t(
|
|
19
|
-
}), process.stdin.on("error", (
|
|
20
|
-
n(
|
|
17
|
+
t(r);
|
|
18
|
+
}), process.stdin.on("error", (e) => {
|
|
19
|
+
n(e);
|
|
21
20
|
});
|
|
22
21
|
});
|
|
23
22
|
}
|
|
24
|
-
async function
|
|
23
|
+
async function x(t, n = !1) {
|
|
25
24
|
await d();
|
|
26
|
-
const
|
|
27
|
-
let
|
|
25
|
+
const r = await m();
|
|
26
|
+
let e = t || "";
|
|
28
27
|
if (n)
|
|
29
28
|
try {
|
|
30
|
-
|
|
29
|
+
e = (await l()).trim();
|
|
31
30
|
} catch (o) {
|
|
32
31
|
throw console.error("❌ 读取 stdin 失败:", o), o;
|
|
33
32
|
}
|
|
34
|
-
|
|
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(
|
|
39
|
-
provider_id:
|
|
40
|
-
model_id:
|
|
41
|
-
enable_thinking:
|
|
42
|
-
}, i = await
|
|
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
|
-
|
|
52
|
+
x as runNonInteractive
|
|
54
53
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as $ } from "./id-
|
|
2
|
-
import { B as g } from "./app-
|
|
3
|
-
import "./graphBuilder-
|
|
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 {
|
|
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-
|
|
1
|
+
import "./MultiLineTextInput-e7hD79Wp.mjs";
|
|
2
2
|
import "chalk";
|
|
3
|
-
import "./app-
|
|
3
|
+
import "./app-Dy9hkwWD.mjs";
|