page-agent-sdk 2.42.0 → 2.43.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/README.md +4 -4
- package/README.zh-CN.md +4 -4
- package/dist/page-agent-sdk.headless.js +1028 -809
- package/dist/page-agent-sdk.iife.js +188 -140
- package/dist/page-agent-sdk.js +241 -22
- package/dist/page-agent-sdk.umd.cjs +80 -32
- package/package.json +1 -1
- package/types/headless.d.ts +27 -0
- package/types/index.d.ts +27 -0
package/dist/page-agent-sdk.js
CHANGED
|
@@ -6838,6 +6838,7 @@ async function Ef(e, t, n, r, i, a) {
|
|
|
6838
6838
|
...t.middleware ?? []
|
|
6839
6839
|
],
|
|
6840
6840
|
maxToolRounds: t.maxToolRounds ?? gf,
|
|
6841
|
+
maxVerifyAttempts: t.maxVerifyAttempts ?? 0,
|
|
6841
6842
|
onLog: i,
|
|
6842
6843
|
debug: t.debug
|
|
6843
6844
|
});
|
|
@@ -6970,6 +6971,7 @@ function kf(e, t) {
|
|
|
6970
6971
|
...e.allowedTools?.length ? { allowedTools: e.allowedTools } : {},
|
|
6971
6972
|
...e.middleware?.length ? { middleware: e.middleware } : {},
|
|
6972
6973
|
...e.summarization === void 0 ? {} : { summarization: e.summarization },
|
|
6974
|
+
...e.maxVerifyAttempts === void 0 ? {} : { maxVerifyAttempts: e.maxVerifyAttempts },
|
|
6973
6975
|
...t.getFocuses ? { getFocuses: t.getFocuses } : {},
|
|
6974
6976
|
...t.getSchema ? { getSchema: t.getSchema } : {},
|
|
6975
6977
|
...t.tracker ? { tracker: t.tracker } : {},
|
|
@@ -23785,36 +23787,252 @@ function yE(e) {
|
|
|
23785
23787
|
};
|
|
23786
23788
|
}
|
|
23787
23789
|
//#endregion
|
|
23790
|
+
//#region src/core/tools/htmlValidate.ts
|
|
23791
|
+
var bE = /* @__PURE__ */ new Set([
|
|
23792
|
+
"area",
|
|
23793
|
+
"base",
|
|
23794
|
+
"br",
|
|
23795
|
+
"col",
|
|
23796
|
+
"embed",
|
|
23797
|
+
"hr",
|
|
23798
|
+
"img",
|
|
23799
|
+
"input",
|
|
23800
|
+
"link",
|
|
23801
|
+
"meta",
|
|
23802
|
+
"param",
|
|
23803
|
+
"source",
|
|
23804
|
+
"track",
|
|
23805
|
+
"wbr"
|
|
23806
|
+
]), xE = /* @__PURE__ */ new Set(["script", "style"]), SE = /* @__PURE__ */ new Set([
|
|
23807
|
+
"html",
|
|
23808
|
+
"head",
|
|
23809
|
+
"body"
|
|
23810
|
+
]);
|
|
23811
|
+
function CE(e, t = {}) {
|
|
23812
|
+
let n = t.sfc === !0, r = [], i = e.length;
|
|
23813
|
+
if (!e.trim()) return r;
|
|
23814
|
+
let a = [0];
|
|
23815
|
+
for (let t = 0; t < i; t++) e[t] === "\n" && a.push(t + 1);
|
|
23816
|
+
let o = (e) => {
|
|
23817
|
+
let t = 0, n = a.length - 1;
|
|
23818
|
+
for (; t < n;) {
|
|
23819
|
+
let r = t + n + 1 >> 1;
|
|
23820
|
+
a[r] <= e ? t = r : n = r - 1;
|
|
23821
|
+
}
|
|
23822
|
+
return t + 1;
|
|
23823
|
+
}, s = [], c = 0;
|
|
23824
|
+
for (; c < i;) {
|
|
23825
|
+
let t = e.indexOf("<", c);
|
|
23826
|
+
if (t < 0) break;
|
|
23827
|
+
if (e.startsWith("<!--", t)) {
|
|
23828
|
+
let n = e.indexOf("-->", t + 4);
|
|
23829
|
+
if (n < 0) {
|
|
23830
|
+
r.push({
|
|
23831
|
+
line: o(t),
|
|
23832
|
+
code: "UNCLOSED_COMMENT",
|
|
23833
|
+
message: "注释 <!-- 未闭合(缺 -->)"
|
|
23834
|
+
});
|
|
23835
|
+
break;
|
|
23836
|
+
}
|
|
23837
|
+
c = n + 3;
|
|
23838
|
+
continue;
|
|
23839
|
+
}
|
|
23840
|
+
if (e[t + 1] === "!") {
|
|
23841
|
+
let n = e.indexOf(">", t), a = e.slice(t, n < 0 ? i : n + 1);
|
|
23842
|
+
/^<!doctype/i.test(a) && r.push({
|
|
23843
|
+
line: o(t),
|
|
23844
|
+
code: "DOCTYPE_IN_FRAGMENT",
|
|
23845
|
+
message: "<!DOCTYPE> 不应出现(渲染产物经 v-html 注入,只输出内容片段)"
|
|
23846
|
+
}), c = n < 0 ? i : n + 1;
|
|
23847
|
+
continue;
|
|
23848
|
+
}
|
|
23849
|
+
let a = e[t + 1] === "/", l = a ? t + 2 : t + 1, u = e[l] ?? "";
|
|
23850
|
+
if (!/[a-zA-Z]/.test(u)) {
|
|
23851
|
+
c = t + 1;
|
|
23852
|
+
continue;
|
|
23853
|
+
}
|
|
23854
|
+
let d = l, f = "";
|
|
23855
|
+
for (; d < i;) {
|
|
23856
|
+
let t = e[d];
|
|
23857
|
+
if (f) t === f && (f = "");
|
|
23858
|
+
else if (t === "\"" || t === "'") f = t;
|
|
23859
|
+
else if (t === ">") break;
|
|
23860
|
+
d++;
|
|
23861
|
+
}
|
|
23862
|
+
if (d >= i) {
|
|
23863
|
+
r.push({
|
|
23864
|
+
line: o(t),
|
|
23865
|
+
code: "UNCLOSED_TAG",
|
|
23866
|
+
message: `标签 ${e.slice(t, Math.min(t + 20, i))} 未写完(缺 >)`
|
|
23867
|
+
});
|
|
23868
|
+
break;
|
|
23869
|
+
}
|
|
23870
|
+
let p = e.slice(l, d), m = (p.match(/^[a-zA-Z][a-zA-Z0-9-]*/) ?? [""])[0].toLowerCase(), h = !a && /\/\s*$/.test(p);
|
|
23871
|
+
if (c = d + 1, m) {
|
|
23872
|
+
if (a) {
|
|
23873
|
+
let e = s.length - 1;
|
|
23874
|
+
if (e >= 0 && s[e].name === m) s.pop();
|
|
23875
|
+
else {
|
|
23876
|
+
let e = s.findIndex((e) => e.name === m);
|
|
23877
|
+
if (e >= 0) {
|
|
23878
|
+
let t = s.splice(e);
|
|
23879
|
+
for (let e of t.slice(1)) r.push({
|
|
23880
|
+
line: o(e.idx),
|
|
23881
|
+
code: "UNCLOSED_TAG",
|
|
23882
|
+
message: `<${e.name}> 未闭合(先遇到 </${m}>)`
|
|
23883
|
+
});
|
|
23884
|
+
} else r.push({
|
|
23885
|
+
line: o(t),
|
|
23886
|
+
code: "STRAY_CLOSE_TAG",
|
|
23887
|
+
message: `</${m}> 无匹配的开标签`
|
|
23888
|
+
});
|
|
23889
|
+
}
|
|
23890
|
+
continue;
|
|
23891
|
+
}
|
|
23892
|
+
if (SE.has(m) && r.push({
|
|
23893
|
+
line: o(t),
|
|
23894
|
+
code: "DOC_TAG_IN_FRAGMENT",
|
|
23895
|
+
message: `<${m}> 不应出现(v-html 注入场景只输出内容片段,不要 html/head/body 外围)`
|
|
23896
|
+
}), !(bE.has(m) || h)) {
|
|
23897
|
+
if (xE.has(m)) {
|
|
23898
|
+
m === "script" && !n && r.push({
|
|
23899
|
+
line: o(t),
|
|
23900
|
+
code: "SCRIPT_IN_FRAGMENT",
|
|
23901
|
+
message: "<script> 禁用(v-html 注入不执行脚本,且有安全风险)"
|
|
23902
|
+
});
|
|
23903
|
+
let i = RegExp(`</${m}\\s*>`, "i").exec(e.slice(c));
|
|
23904
|
+
if (!i) {
|
|
23905
|
+
r.push({
|
|
23906
|
+
line: o(t),
|
|
23907
|
+
code: "UNCLOSED_TAG",
|
|
23908
|
+
message: `<${m}> 未闭合(缺 </${m}>)`
|
|
23909
|
+
});
|
|
23910
|
+
break;
|
|
23911
|
+
}
|
|
23912
|
+
c += i.index + i[0].length;
|
|
23913
|
+
continue;
|
|
23914
|
+
}
|
|
23915
|
+
s.push({
|
|
23916
|
+
name: m,
|
|
23917
|
+
idx: t
|
|
23918
|
+
});
|
|
23919
|
+
}
|
|
23920
|
+
}
|
|
23921
|
+
}
|
|
23922
|
+
for (let e of s) r.push({
|
|
23923
|
+
line: o(e.idx),
|
|
23924
|
+
code: "UNCLOSED_TAG",
|
|
23925
|
+
message: `<${e.name}> 未闭合`
|
|
23926
|
+
});
|
|
23927
|
+
return r;
|
|
23928
|
+
}
|
|
23929
|
+
//#endregion
|
|
23788
23930
|
//#region src/core/sdk/htmlSubagent.ts
|
|
23789
|
-
function
|
|
23790
|
-
|
|
23931
|
+
function wE(e, t) {
|
|
23932
|
+
let n = t === "html" ? "html" : "vue";
|
|
23933
|
+
return `你是纯代码组件生成专家。可用工具:vfs_write / vfs_edit / vfs_rm(写/改/删代码到 vfs ${e}) / vfs_grep + vfs_read(读 vfs) / validate_code(代码格式自检) / write + set(写 data 引用,writablePaths 限定) / read / write_todos + update_todo(规划)。
|
|
23791
23934
|
|
|
23792
23935
|
代码存储约定(重要):
|
|
23793
|
-
- 代码正文写 vfs:${e}<name
|
|
23794
|
-
- data 存引用:write({ patch:{ op:'set', jsonPath:'components.N', value:{ type:'custom', codeRef:'vfs://${e}<name
|
|
23795
|
-
- 改代码:先 vfs_edit
|
|
23936
|
+
- 代码正文写 vfs:${e}<name>.${n}(如 ${e}hero.${n})
|
|
23937
|
+
- data 存引用:write({ patch:{ op:'set', jsonPath:'components.N', value:{ type:'custom', codeRef:'vfs://${e}<name>.${n}', name, props } } })
|
|
23938
|
+
- 改代码:先 vfs_edit 局部改 vfs 文件(工具返回替换结果;data 的 codeRef 引用不变,无需改 data)
|
|
23939
|
+
|
|
23940
|
+
代码形态规则:
|
|
23941
|
+
${t === "html" ? `- 输出纯 HTML 片段(.${n}):结构 + 内联 <style>(class 加统一前缀防样式冲突);交互交给宿主(不写 JS)
|
|
23942
|
+
- 单根元素包裹(如 <section class="...">…</section>),语义化标签` : `- 输出 Vue SFC(.${n}):<template> + <script setup>(组合式),defineProps 接外部数据
|
|
23943
|
+
- 只渲染 UI,不做副作用(不发请求 / 不读写 storage)`}
|
|
23944
|
+
|
|
23945
|
+
输出契约(必须):
|
|
23946
|
+
- 渲染产物经 v-html 等方式注入宿主页面:不要 <!DOCTYPE>,不要 <html>/<head>/<body> 外围标签,只输出内容片段本身
|
|
23947
|
+
- 非 SFC 块不要 <script>(注入场景不执行脚本,且有安全风险);不引入外部脚本 / CDN
|
|
23796
23948
|
|
|
23797
23949
|
工作方式:
|
|
23798
23950
|
1. 中等任务(多组件 / 大段代码)先 write_todos 拆解:读现有结构 → 规划各组件 → 逐个生成 → read 确认;
|
|
23799
|
-
2.
|
|
23951
|
+
2. 遵循已加载 skill 的规范(安全底线 / 可访问性 / 组件库引用);
|
|
23800
23952
|
3. 小段代码 vfs_write 整体写;大段用 vfs_edit 增量拼(避免单次输出超限);
|
|
23801
|
-
4.
|
|
23953
|
+
4. 生成/修改完成后必须调 validate_code 自检(标签闭合 + 片段契约),报错用 vfs_edit 修正后复查,直到通过;
|
|
23954
|
+
5. 最后 read(vfs 文件 + data 引用)确认结构正确;只写 writablePaths 内 data + ${e} 下 vfs。`;
|
|
23802
23955
|
}
|
|
23803
|
-
var
|
|
23956
|
+
var TE = "# 纯代码组件生成规范\n\n## 代码存储约定(重要)\n- 代码正文写 vfs:html/<name>.vue(如 html/hero.vue)\n- data 存引用:{ type:'custom', codeRef:'vfs://html/<name>.vue', name, props }\n- 改代码:vfs_edit 局部改 vfs 文件(data 的 codeRef 引用不变)\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制交互 / 一次性特效 / 特殊布局)→ 写 custom 代码组件\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## Vue SFC 规范\n- Vue 3 <template> + <script setup>(组合式)\n- props 用 defineProps;事件用 defineEmits\n- 只渲染 UI,不做副作用(不发请求 / 不读写 storage)\n\n## 输出契约(必须)\n- 渲染产物经 v-html 等方式注入宿主:<template> 内不要 <!DOCTYPE> / <html> / <head> / <body> 外围标签,只输出内容片段\n- <template> 内不写 <script>;不引入外部脚本 / CDN\n- 每次生成/修改后调 validate_code 自检,报错修正直到通过\n\n## props 定义\n- 代码组件 defineProps 接受外部 data 传入(集成方渲染时按 data 的 props 字段传)\n\n## 组件库引用\n- 代码内可 import 组件库组件(如 <Button>);所用依赖以集成方渲染层已注入为准,不重复造\n\n## 安全底线(必须)\n- 禁 eval / new Function / Function 构造器\n- 禁访问 window 敏感属性(document.cookie / apiKey / token)\n- 不引入外部脚本 / CDN\n\n## 可访问性 + 语义化\n- 语义化标签(button / nav / section);图片 alt;交互可键盘聚焦\n- 颜色对比达标;不只用颜色传达信息", EE = "# HTML 片段生成规范\n\n## 代码存储约定(重要)\n- 代码正文写 vfs:html/<name>.html(如 html/landing.html)\n- data 存引用:{ type:'custom', codeRef:'vfs://html/<name>.html', name, props }\n- 改代码:vfs_edit 局部改 vfs 文件(data 的 codeRef 引用不变)\n\n## 输出契约(必须)\n- 输出经 v-html 注入宿主的 HTML 片段:不要 <!DOCTYPE>,不要 <html> / <head> / <body> 外围标签\n- 单根元素包裹(如 <section class=\"hero\">…</section>)\n- 不写 <script>(v-html 注入不执行脚本);交互交宿主页面已有机制\n- 样式用片段内 <style>,class 统一加前缀防冲突(如 .pg-hero-…)\n- 不引入外部脚本 / CDN / 外链样式\n\n## 标签闭合(必须)\n- 非自闭合标签必须成对闭合(<img> / <br> / <input> 等 void 元素除外)\n- 每次生成/修改后调 validate_code 自检,报错用 vfs_edit 修正直到通过\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制布局 / 一次性专题页 / 特殊视觉效果)→ 写 HTML 片段\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## 安全底线(必须)\n- 禁 eval / new Function / Function 构造器\n- 禁访问 window 敏感属性(document.cookie / apiKey / token)\n- 不引入外部脚本 / CDN\n\n## 可访问性 + 语义化\n- 语义化标签(button / nav / section);图片 alt;交互可键盘聚焦\n- 颜色对比达标;不只用颜色传达信息", DE = {
|
|
23804
23957
|
name: "html-builder",
|
|
23805
|
-
description: "纯代码组件(custom Vue SFC)生成规范:代码存 vfs+data 引用 / SFC 规范 /
|
|
23806
|
-
getContent: () =>
|
|
23958
|
+
description: "纯代码组件(custom Vue SFC)生成规范:代码存 vfs+data 引用 / SFC 规范 / 输出契约 / props / 组件库引用 / 可访问性",
|
|
23959
|
+
getContent: () => TE
|
|
23960
|
+
}, OE = {
|
|
23961
|
+
name: "html-fragment",
|
|
23962
|
+
description: "纯 HTML 片段(v-html 注入)生成规范:无外围标签 / 单根元素 / 标签闭合 / validate_code 自检 / 安全底线 / 可访问性",
|
|
23963
|
+
getContent: () => EE
|
|
23807
23964
|
};
|
|
23808
|
-
function
|
|
23809
|
-
let
|
|
23965
|
+
function kE(e = {}) {
|
|
23966
|
+
let t = e.vfsPrefix ?? "html/";
|
|
23967
|
+
return ({ state: e }) => {
|
|
23968
|
+
let n = e.files;
|
|
23969
|
+
if (!n) return { ok: !0 };
|
|
23970
|
+
let r = [];
|
|
23971
|
+
for (let [e, i] of Object.entries(n)) {
|
|
23972
|
+
if (!e.startsWith(t)) continue;
|
|
23973
|
+
let n = CE(i.content, { sfc: e.endsWith(".vue") });
|
|
23974
|
+
for (let t of n) r.push(`${e} 第 ${t.line} 行:${t.message}(${t.code})`);
|
|
23975
|
+
}
|
|
23976
|
+
return r.length ? {
|
|
23977
|
+
ok: !1,
|
|
23978
|
+
feedback: `HTML 格式校验未通过(共 ${r.length} 处):\n- ${r.join("\n- ")}\n请用 vfs_edit 逐项修正,改完调 validate_code 复查,全部通过后再返回。`
|
|
23979
|
+
} : { ok: !0 };
|
|
23980
|
+
};
|
|
23981
|
+
}
|
|
23982
|
+
function AE(e) {
|
|
23983
|
+
let n;
|
|
23984
|
+
return {
|
|
23985
|
+
name: "html-validate-tools",
|
|
23986
|
+
beforeAgent: (e) => {
|
|
23987
|
+
n = e.files;
|
|
23988
|
+
},
|
|
23989
|
+
tools: [r(async ({ path: t, content: r }) => {
|
|
23990
|
+
let i = [];
|
|
23991
|
+
if (r !== void 0) i.push({
|
|
23992
|
+
path: t ?? "(传入内容)",
|
|
23993
|
+
content: r
|
|
23994
|
+
});
|
|
23995
|
+
else if (t) {
|
|
23996
|
+
let r = t.replace(/^\/+/, ""), a = n?.[r];
|
|
23997
|
+
if (!a) return `未找到 vfs 文件 "${t}"。先 vfs_ls 查看;代码须写在 ${e} 下。`;
|
|
23998
|
+
i.push({
|
|
23999
|
+
path: r,
|
|
24000
|
+
content: a.content
|
|
24001
|
+
});
|
|
24002
|
+
} else {
|
|
24003
|
+
if (n) for (let [t, r] of Object.entries(n)) t.startsWith(e) && i.push({
|
|
24004
|
+
path: t,
|
|
24005
|
+
content: r.content
|
|
24006
|
+
});
|
|
24007
|
+
if (!i.length) return `${e} 下暂无代码文件,无需校验。`;
|
|
24008
|
+
}
|
|
24009
|
+
let a = [];
|
|
24010
|
+
for (let e of i) {
|
|
24011
|
+
let t = CE(e.content, { sfc: e.path.endsWith(".vue") });
|
|
24012
|
+
t.length && a.push(`${e.path}:\n${t.map((e) => ` 第 ${e.line} 行 ${e.message}(${e.code})`).join("\n")}`);
|
|
24013
|
+
}
|
|
24014
|
+
return a.length ? `❌ 格式校验未通过:\n${a.join("\n")}\n请用 vfs_edit 修正后重新调用 validate_code 复查。` : `✅ 格式校验通过(${i.map((e) => e.path).join(", ")}:标签闭合、片段契约)。`;
|
|
24015
|
+
}, {
|
|
24016
|
+
name: "validate_code",
|
|
24017
|
+
description: "校验 HTML/Vue SFC 代码格式(标签闭合 + v-html 片段契约:无 html/head/body/DOCTYPE 外围、片段无 script)。生成/修改代码后必调;报错修正后复查直到通过。",
|
|
24018
|
+
schema: t.object({
|
|
24019
|
+
path: t.string().optional().describe("vfs 代码文件路径(如 html/hero.vue);省略则校验代码前缀下全部文件"),
|
|
24020
|
+
content: t.string().optional().describe("直接校验的代码内容(优先于 path)")
|
|
24021
|
+
})
|
|
24022
|
+
})]
|
|
24023
|
+
};
|
|
24024
|
+
}
|
|
24025
|
+
var jE = 2;
|
|
24026
|
+
function ME(e) {
|
|
24027
|
+
let { writablePaths: t, codeVfsPrefix: n = "html/", id: r = "html", description: i, planning: a = !0, summarization: o = !0, maxToolRounds: s = 12, temperature: c = .4, skills: l, extraTools: u, codeKind: d = "sfc", formatCheck: f = !0 } = e;
|
|
23810
24028
|
if (!t?.length) throw Error("[page-agent-sdk][createHtmlSubagent] writablePaths 必填(代码组件 data 区,如 [\"components\"])");
|
|
23811
|
-
let
|
|
23812
|
-
a &&
|
|
23813
|
-
let
|
|
24029
|
+
let p = [];
|
|
24030
|
+
a && p.push(Vu()), f && (p.push(AE(n)), p.push(jf({ check: kE({ vfsPrefix: n }) })));
|
|
24031
|
+
let m = u ?? [];
|
|
23814
24032
|
return {
|
|
23815
24033
|
id: r,
|
|
23816
|
-
description: i ?? "生成/修改纯代码组件(custom
|
|
23817
|
-
systemPrompt:
|
|
24034
|
+
description: i ?? "生成/修改纯代码组件(custom 代码)。代码写 vfs,data 存引用;能规划(write_todos)+ 执行。需写代码组件或灵活定制时委派",
|
|
24035
|
+
systemPrompt: wE(n, d),
|
|
23818
24036
|
writablePaths: t,
|
|
23819
24037
|
allowedTools: [
|
|
23820
24038
|
"vfs_write",
|
|
@@ -23823,18 +24041,19 @@ function CE(e) {
|
|
|
23823
24041
|
"vfs_grep",
|
|
23824
24042
|
"vfs_read"
|
|
23825
24043
|
],
|
|
23826
|
-
middleware:
|
|
24044
|
+
middleware: p.length ? p : void 0,
|
|
23827
24045
|
summarization: o === !1 ? void 0 : o,
|
|
24046
|
+
maxVerifyAttempts: f ? jE : void 0,
|
|
23828
24047
|
temperature: c,
|
|
23829
|
-
skills: l ?? [
|
|
24048
|
+
skills: l ?? (d === "html" ? [OE] : [DE]),
|
|
23830
24049
|
maxToolRounds: s,
|
|
23831
|
-
tools:
|
|
24050
|
+
tools: m.length ? m : void 0
|
|
23832
24051
|
};
|
|
23833
24052
|
}
|
|
23834
24053
|
//#endregion
|
|
23835
24054
|
//#region src/core/index.ts
|
|
23836
|
-
function
|
|
24055
|
+
function NE(e) {
|
|
23837
24056
|
return ag(e, pE);
|
|
23838
24057
|
}
|
|
23839
24058
|
//#endregion
|
|
23840
|
-
export { Bx as ApprovalBar, Jp as CAPABILITIES, Zp as CONTEXT_PRESETS, fE as ChatDialog, wg as ChatHeader, lS as ChatInput, Zb as CodePreview, cp as CompressDecisionSchema, Zx as ConflictBar, np as DEFAULT_SYSTEM_PROMPT, JT as DebugDrawer, Ag as FocusBar, Ab as HLJS_BLOCK_MAX_CHARS, Nd as HUMAN_CONFIRM_TOOL_NAME, Bl as MIN_CONTEXT_WINDOW, $b as MessageContent, bx as MessageList, px as MessageRow, Ox as QueuedBar, ef as STOP_WORDS, dE as SkillPanel, nm as UNSAFE_KEYS, Fh as actionsToInspectInfo, Ph as actionsToTools, Nl as agentError, Xf as analyzeContext, hm as applyPatchToClone, gm as applyPatchToLive, Ml as asAgentError, rp as buildDataPrompt, ip as buildSystemPrompt, cg as chatContextKey, mh as commitSetToBind, tp as connectMcp, x as constructLlmFromConfig, b as constructOpenLlmSync, sg as copyText, bu as createAgent, Md as createApprovalMiddleware, lg as createChatContext,
|
|
24059
|
+
export { Bx as ApprovalBar, Jp as CAPABILITIES, Zp as CONTEXT_PRESETS, fE as ChatDialog, wg as ChatHeader, lS as ChatInput, Zb as CodePreview, cp as CompressDecisionSchema, Zx as ConflictBar, np as DEFAULT_SYSTEM_PROMPT, JT as DebugDrawer, Ag as FocusBar, Ab as HLJS_BLOCK_MAX_CHARS, bE as HTML_VOID_TAGS, Nd as HUMAN_CONFIRM_TOOL_NAME, Bl as MIN_CONTEXT_WINDOW, $b as MessageContent, bx as MessageList, px as MessageRow, Ox as QueuedBar, ef as STOP_WORDS, dE as SkillPanel, nm as UNSAFE_KEYS, Fh as actionsToInspectInfo, Ph as actionsToTools, Nl as agentError, Xf as analyzeContext, hm as applyPatchToClone, gm as applyPatchToLive, Ml as asAgentError, rp as buildDataPrompt, ip as buildSystemPrompt, cg as chatContextKey, mh as commitSetToBind, tp as connectMcp, x as constructLlmFromConfig, b as constructOpenLlmSync, sg as copyText, bu as createAgent, Md as createApprovalMiddleware, lg as createChatContext, NE as createChatSdk, Ud as createCheckpointManager, Wd as createCheckpointMiddleware, bp as createConflictManager, Zf as createContextInspectorMiddleware, gh as createDataOps, kE as createHtmlFormatCheck, ME as createHtmlSubagent, Id as createHumanConfirmMiddleware, Fd as createHumanConfirmTool, Vp as createMemoryBackend, Td as createMemoryMiddleware, y as createProxyLlm, yE as createRagSubagent, ld as createSandboxRunner, Xp as createSdkEvents, Qh as createSerialRunner, Gp as createSessionStore, Jh as createSkillStore, Df as createSubagentMiddleware, df as createSubagentTracker, Af as createSubagentsMiddleware, Hh as createUsageHintsMiddleware, jf as createVerifyMiddleware, Cm as createVfs, Up as createWebStorageBackend, Lf as createWriteBackCheck, cm as deepClone, Rh as defineDataToolset, dd as defineSkill, ap as defineTool, sm as deleteByPath, lp as deriveTitle, Mu as describeSchemaNode, uu as detectGarbledToolCall, ym as diffObjects, Sh as domToStructure, wh as domTools, Lh as domToolsStatic, nf as estimateMessageTokens, rf as estimateRoundTokens, Hl as estimateTokens, C as extractReasoningDelta, Zu as extractSchemaHint, Qf as extractText, S as extractTextDelta, w as extractUsage, vh as fetchDocTools, Ih as fetchTools, ph as filterByToolMode, Nu as formatConstraints, Ol as formatZodIssues, am as getByPath, Ch as getDomTool, Dh as getEnvSummary, wu as getSchemaAtPath, xu as getSchemaTopKeys, Gl as getTraceMetrics, mm as hashValue, af as indexSummarize, Ah as inspectEnvTool, jh as inspectTools, up as isChatModel, tu as isContextLengthError, Su as isPathAllowed, Np as isQuotaError, rm as isUnsafePath, Hm as jpEval, Al as jsonParseError, dm as limitDepth, Ib as markedToHtml, lm as maybeParseValue, T as normalizeUsage, Wl as offloadPassThroughChars, Ul as offloadThresholdChars, Ku as presets, Eu as projectBySchema, Tu as projectBySchemaDeep, um as projectFields, of as recallRounds, Lb as renderMarkdownHtml, Pu as renderSchemaHint, Fu as renderSchemaOverview, Lu as renderSchemaShallow, Yp as resolveCapabilities, $p as resolveContextOptions, qp as resolveDialogConfig, yp as resolveLlm, Vl as resolveModelCaps, Kp as resolveStorage, vm as restoreInPlace, _m as restoreLive, jl as routeError, ud as runHostScript, Km as runSandboxedScript, im as safeMerge, Eh as safeSerialize, fm as safeStringify, Wm as searchJson, zh as selectBuiltinTools, om as setByPath, sf as shouldTriggerCompression, qu as systemPromptHelpers, tf as tokenize, $ as toolError, Cu as unwrapSchema, og as useChat, ug as useChatContext, CE as validateHtmlFormat, e as z, kl as zodError };
|