page-agent-sdk 4.10.0 → 4.11.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 +2 -0
- package/README.zh-CN.md +2 -0
- package/dist/page-agent-sdk.headless.js +98 -23
- package/dist/page-agent-sdk.iife.js +134 -134
- package/dist/page-agent-sdk.js +93 -18
- package/dist/page-agent-sdk.legacy.js +13064 -12978
- package/dist/page-agent-sdk.umd.cjs +3 -3
- package/package.json +2 -1
- package/types/headless.d.ts +65 -0
- package/types/index.d.ts +65 -0
package/README.md
CHANGED
|
@@ -160,6 +160,8 @@ CDN zero-config: `<script src="https://unpkg.com/page-agent-sdk"></script>` →
|
|
|
160
160
|
| 💰 Context economy (3.10/3.11+) | Compression cost cap `promptSoftCapTokens` (defaults to 160K when window ≥320K — huge-window models no longer burn hundreds of thousands of tokens before compressing; reflected via `inspect().compression`) + agent budget self-awareness (70%-rounds / half-cap token hint, consecutive write-failure reminder, per-invocation `roundTokenBudget` friendly wrap-up) + tool-description slimming (-40% prompt) | `contextOptions.promptSoftCapTokens`, `roundTokenBudget` |
|
|
161
161
|
| 💾 persistence | IndexedDB multi-session + quota eviction + switch | `storage` |
|
|
162
162
|
| ⚡ quick actions / session transfer (4.10+) | `dialog.quickActions` chip row above the input sends high-frequency prompts in one click (no pre-fill; queueing/gate semantics inherited); `sdk.exportSession`/`importSession` fully restorable session JSON (copy semantics, never overwrites; `dialog.sessionTransfer:true` adds history-panel entries); `dialog.onDropElement` callback when a host element is dragged into the input (focus entry, mapping stays host-side); `approval.preview:true` renders the write-approval bar as a structured old→new diff (validation failures visible before approving) | `dialog.{quickActions,sessionTransfer,onDropElement}` + `approval.preview` |
|
|
163
|
+
| 🖥 server-side (node) execution (smoke-backed 4.10+) | the same SDK runs in node: `page-agent-sdk/headless` subpath + `ui:false`, backed by a real-LLM dual-protocol smoke test (full read→write→restore_data tool loop); browser-domain APIs explicitly unavailable (get_dom returns a friendly pointer to data tools; canvas render checks auto-degrade); unattended combo (approval auto-reject + `conflictPolicy` + `batch`) for scheduled/webhook long tasks | `ui:false` + headless subpath (`npm run test:node-real` is the in-repo smoke) |
|
|
164
|
+
| 🧪 regression toolkit eval-toolkit | the SDK's own real-LLM regression core, exported for integrators to run **their own** pre-upgrade scenario regressions: `createEvalHarness({sdk})` (waitForIdle dual-condition idle detection + collectReport snapshots) + `diffReport` (token ±15% AND ±2000 / toolCount ±3 thresholds, variance-proof); report shape matches the SDK's own — bug reports parse for free; shipped from both main and headless entries | `import { createEvalHarness, diffReport } from 'page-agent-sdk'` |
|
|
163
165
|
| 👁 DOM inspect (2.20+) | `get_dom` structure read + `dom_search` (selector/text) + `dom_info` (content/computed styles/event bindings from inline/Vue props/listener recorder) — lazy-injected via the `dom-inspect` skill so they don't occupy standing tool context | `capabilities.domInspect` |
|
|
164
166
|
| 📊 Context inspector | Snapshot actual-LLM-message composition (total / occupancy / category ratio); DebugDrawer `📊 上下文` tab + `inspectContext()`; zero LLM cost, default on | `capabilities.contextInspector` |
|
|
165
167
|
| 🤖 Agent-driven compression (2.33+) | `capabilities.agentCompression` (opt-in) lets the summary LLM decide per-trigger compression strategy via an `inspect_context` tool loop (keepRounds / windowRatio / summary mode / recall / preserve); `shouldTriggerCompression` gate avoids per-message LLM cost; decide failure/timeout degrades to static; `decisionTimeoutMs` / `decisionMaxTokens` configurable | `capabilities.agentCompression` + `summaryLlm` |
|
package/README.zh-CN.md
CHANGED
|
@@ -160,6 +160,8 @@ CDN 零配置:`<script src="https://unpkg.com/page-agent-sdk"></script>` → `
|
|
|
160
160
|
| 💰 上下文经济性 (3.10/3.11+) | 压缩触发成本上限 `promptSoftCapTokens`(窗口 ≥320K 默认 160K,大窗口模型不再烧几十万 token 才压缩;`inspect().compression` 反射)+ agent 预算自感知(轮次 70%/token 半程注入提示、连续写失败提醒、单轮预算 `roundTokenBudget` 友好收口)+ 工具描述瘦身(-40% prompt) | `contextOptions.promptSoftCapTokens`、`roundTokenBudget` |
|
|
161
161
|
| 💾 持久化 | IndexedDB 多会话 + 配额淘汰 + 切换 | `storage` |
|
|
162
162
|
| ⚡ 快捷指令 / 会话转移 (4.10+) | `dialog.quickActions` 输入区 chip 行一键发高频 prompt(不预填输入框,排队/门禁语义自动继承);`sdk.exportSession`/`importSession` 会话导出导入(可复全 JSON,副本语义不覆盖;`dialog.sessionTransfer:true` 历史面板入口);`dialog.onDropElement` 拖宿主元素进输入框回调(聚焦入口,映射归宿主);`approval.preview:true` write 审批确认条渲染结构化 old→new diff(校验失败批准前可见) | `dialog.{quickActions,sessionTransfer,onDropElement}` + `approval.preview` |
|
|
163
|
+
| 🖥 服务端(node)运行 (4.10+ 冒烟背书) | 同一套 SDK 在 node 跑:`page-agent-sdk/headless` 子路径 + `ui:false`,真 LLM 双协议冒烟(read→write→restore_data 完整工具循环)背书;浏览器域 API 明示不可用(get_dom 友好回退/canvas 渲染检查自动降级);无人值守组合(approval 自动拒 + `conflictPolicy` + `batch`)跑定时/webhook 长任务 | `ui:false` + headless 子路径(`npm run test:node-real` 为仓库内冒烟) |
|
|
164
|
+
| 🧪 回归工具 eval-toolkit | SDK 自用真 LLM 回归判定核公开导出,集成方为**自己的场景**跑升级前回归:`createEvalHarness({sdk})`(waitForIdle 双条件 idle 判定 + collectReport 报告快照)+ `diffReport`(token ±15% 且 ±2000 / toolCount ±3 阈值判定,防方差误报);与 SDK 自用报告同构,报问题格式互通;主包/headless 双入口同带 | `import { createEvalHarness, diffReport } from 'page-agent-sdk'` |
|
|
163
165
|
| 🤖 无人值守自动化 (2.20+) | 资源预算闸(`tokenBudget`/`timeBudgetMs`)+ 致命错误自动恢复(`maxAutoRetries`:回退 checkpoint + 重试)+ 刷新续跑 + `sdk.batch(tasks)` 批处理 | `capabilities.automation` |
|
|
164
166
|
| 📐 上下文健壮性 (2.30+) | 硬地板 `contextWindow ≥200K`(启动拒绝 <200K 模型如老款 `deepseek`/`gpt-4o`/`glm-4.5`);三道闸(压缩/trim/offload)阈值在 `setLlm` 后跟随实时窗口;遇 `context_length_exceeded` 反应性重试(激进 trim → 重试一次,不裸失败);vfs 大结果引用受保护免 LRU 淘汰 + OOM 1.5× 兜底;系统段预算(25% 窗口,丢弃非 pin 段保 base/mission/workingMemory) | 内置 |
|
|
165
167
|
| 🎯 focus 自动切换 (2.31+) | AI 自动判断任务范围 → `set_focus`(局部任务)/ `clear_focus`(全局/完成);focus 跨刷新/切会话持久化(restore 经 `getSchemaAtPath` 校验 path,失效丢弃);子 agent 继承主焦点(三层收敛;主未聚焦 → 子无 focus 中间件,零回归) | `capabilities.focus` |
|
|
@@ -12212,6 +12212,7 @@ function Lp(e, t) {
|
|
|
12212
12212
|
return c(e, n);
|
|
12213
12213
|
}
|
|
12214
12214
|
var Rp = s(({ selector: e, depth: t, attrs: n, includeText: r }) => {
|
|
12215
|
+
if (typeof document > "u") return "ERROR: get_dom 仅在浏览器环境可用(当前运行在 node/服务端,无 DOM)。请改用数据工具(read/schema_data)排查结构。";
|
|
12215
12216
|
let i = e ? document.querySelector(e) : document.body;
|
|
12216
12217
|
if (!i) return `未找到匹配元素:selector="${e}"`;
|
|
12217
12218
|
let a = Lp(i, {
|
|
@@ -14513,8 +14514,82 @@ function Vm(e) {
|
|
|
14513
14514
|
};
|
|
14514
14515
|
}
|
|
14515
14516
|
//#endregion
|
|
14517
|
+
//#region src/core/sdk/evalToolkit.ts
|
|
14518
|
+
function Hm(e = {}) {
|
|
14519
|
+
let t = e.quietMs ?? 9e4, n = e.confirmSamples ?? 3, r = e.baselineMessageCount ?? 0, i = 0;
|
|
14520
|
+
return {
|
|
14521
|
+
push(e) {
|
|
14522
|
+
return e.quietMs > 0xe8d4a51000 ? (i = 0, "reset") : (i = e.messageCount > r && e.hasResponse && e.activeSubagents === 0 && e.quietMs > t ? i + 1 : 0, i >= n ? "done" : "pending");
|
|
14523
|
+
},
|
|
14524
|
+
reset() {
|
|
14525
|
+
i = 0;
|
|
14526
|
+
}
|
|
14527
|
+
};
|
|
14528
|
+
}
|
|
14529
|
+
var Um = /* @__PURE__ */ new Set(["elapsedSec"]);
|
|
14530
|
+
function Wm(e, t, n = {}) {
|
|
14531
|
+
let r = n.tokenAbs ?? 2e3, i = n.tokenPct ?? 15, a = n.toolCountAbs ?? 3, o = [], s = 0, c = 0, l = 0, u = /* @__PURE__ */ new Set([...Object.keys(e ?? {}), ...Object.keys(t ?? {})]);
|
|
14532
|
+
for (let n of u) {
|
|
14533
|
+
let u = Number(e?.[n] ?? 0), d = Number(t?.[n] ?? 0), f = u - d, p = d > 0 ? Math.round(f / d * 100) : 0, m = "";
|
|
14534
|
+
Um.has(n) || (n === "toolCount" ? Math.abs(f) > a : Math.abs(f) > r && Math.abs(p) >= i) && (m = f > 0 ? "up" : "down", m === "up" ? (s++, c++) : l++), o.push({
|
|
14535
|
+
key: n,
|
|
14536
|
+
prev: d,
|
|
14537
|
+
cur: u,
|
|
14538
|
+
delta: f,
|
|
14539
|
+
pct: p,
|
|
14540
|
+
flag: m
|
|
14541
|
+
});
|
|
14542
|
+
}
|
|
14543
|
+
return {
|
|
14544
|
+
status: c > 0 ? "worse" : l > 0 ? "better" : "ok",
|
|
14545
|
+
regressions: s,
|
|
14546
|
+
fields: o
|
|
14547
|
+
};
|
|
14548
|
+
}
|
|
14549
|
+
function Gm(e) {
|
|
14550
|
+
let { sdk: t } = e, n = () => {
|
|
14551
|
+
let e = t.debugLogs.value ?? [], n = e.length ? e[e.length - 1].timestamp : 0;
|
|
14552
|
+
return {
|
|
14553
|
+
messageCount: t.messages?.length ?? 0,
|
|
14554
|
+
quietMs: n ? Date.now() - n : 2 ** 53 - 1,
|
|
14555
|
+
hasResponse: e.some((e) => e.type === "llm_response"),
|
|
14556
|
+
activeSubagents: t.inspect?.().subagent?.active?.length ?? 0,
|
|
14557
|
+
logCount: e.length
|
|
14558
|
+
};
|
|
14559
|
+
};
|
|
14560
|
+
return {
|
|
14561
|
+
async waitForIdle(e = {}) {
|
|
14562
|
+
let { timeoutMs: r = 6e5, sampleMs: i = 2500, onSample: a, ...o } = e, s = Hm(o), c = Date.now();
|
|
14563
|
+
for (;;) {
|
|
14564
|
+
let e = n(), o = s.push(e);
|
|
14565
|
+
if (a?.(e), o === "done") return e;
|
|
14566
|
+
if (o === "reset") throw Error(`eval: 等待 idle 期间日志被清空(会话切换/重置;logCount=${e.logCount})—— 采样口径已失效`);
|
|
14567
|
+
if (Date.now() - c > r) {
|
|
14568
|
+
let n = t.debugLogs.value ?? [], i = [...n].reverse().find((e) => e.type === "tool_result"), a = [...n].reverse().find((e) => e.type === "llm_request"), o = t.inspect?.().subagent?.active ?? [];
|
|
14569
|
+
throw Error(`eval: 等待 agent idle 超时(${Math.round(r / 1e3)}s)。诊断:msgs=${e.messageCount} logs=${e.logCount} lastRound=${String(a?.data?.round ?? "-")} lastTool=${i ? `${String(i.data?.name)}@${String(i.data?.round)}` : "-"} activeSubagents=${o.length}${o.length ? `(${o.map((e) => String(e.label ?? "?")).join(",")})` : ""}`);
|
|
14570
|
+
}
|
|
14571
|
+
await new Promise((e) => setTimeout(e, i));
|
|
14572
|
+
}
|
|
14573
|
+
},
|
|
14574
|
+
collectReport() {
|
|
14575
|
+
let e = t.debugLogs.value ?? [], n = t.usage;
|
|
14576
|
+
return {
|
|
14577
|
+
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
14578
|
+
messageCount: t.messages?.length ?? 0,
|
|
14579
|
+
toolCount: e.filter((e) => e.type === "tool_result").length,
|
|
14580
|
+
usage: {
|
|
14581
|
+
prompt: n?.prompt ?? 0,
|
|
14582
|
+
completion: n?.completion ?? 0,
|
|
14583
|
+
...n?.cacheRead ? { cacheRead: n.cacheRead } : {},
|
|
14584
|
+
...n?.cacheCreate ? { cacheCreate: n.cacheCreate } : {}
|
|
14585
|
+
}
|
|
14586
|
+
};
|
|
14587
|
+
}
|
|
14588
|
+
};
|
|
14589
|
+
}
|
|
14590
|
+
//#endregion
|
|
14516
14591
|
//#region src/core/utils/clipboard.ts
|
|
14517
|
-
async function
|
|
14592
|
+
async function Km(e) {
|
|
14518
14593
|
try {
|
|
14519
14594
|
let t = globalThis.navigator?.clipboard;
|
|
14520
14595
|
if (t && typeof t.writeText == "function") return await t.writeText(e), !0;
|
|
@@ -14532,8 +14607,8 @@ async function Hm(e) {
|
|
|
14532
14607
|
}
|
|
14533
14608
|
//#endregion
|
|
14534
14609
|
//#region src/core/composables/useChat.ts
|
|
14535
|
-
var
|
|
14536
|
-
function
|
|
14610
|
+
var qm = 4e3;
|
|
14611
|
+
function Jm(e = {}) {
|
|
14537
14612
|
let { fetchResponse: t, fetchStream: n, onPersist: r, onClear: i, onQueuedCleared: a, onBeforeRegenerate: o } = e, s = /* @__PURE__ */ Mt({
|
|
14538
14613
|
messages: e.messages ?? [],
|
|
14539
14614
|
loading: !1,
|
|
@@ -14613,7 +14688,7 @@ function Wm(e = {}) {
|
|
|
14613
14688
|
let t = e.delta || "";
|
|
14614
14689
|
n.subReasonFull = (n.subReasonFull || "") + t;
|
|
14615
14690
|
let r = (n.subReason || "") + t;
|
|
14616
|
-
n.subReason = r.length >
|
|
14691
|
+
n.subReason = r.length > qm ? r.slice(-4e3) : r;
|
|
14617
14692
|
break;
|
|
14618
14693
|
}
|
|
14619
14694
|
n.children ||= [];
|
|
@@ -14744,7 +14819,7 @@ function Wm(e = {}) {
|
|
|
14744
14819
|
}
|
|
14745
14820
|
//#endregion
|
|
14746
14821
|
//#region src/core/components/icons.ts
|
|
14747
|
-
var
|
|
14822
|
+
var Ym = {
|
|
14748
14823
|
header: "🤖",
|
|
14749
14824
|
subagent: "🤖",
|
|
14750
14825
|
subagentProgress: "🧬",
|
|
@@ -14755,10 +14830,10 @@ var Gm = {
|
|
|
14755
14830
|
recommend: "💡",
|
|
14756
14831
|
conflict: "⚠️"
|
|
14757
14832
|
};
|
|
14758
|
-
function
|
|
14759
|
-
let t = { ...
|
|
14833
|
+
function Xm(e) {
|
|
14834
|
+
let t = { ...Ym };
|
|
14760
14835
|
if (!e) return t;
|
|
14761
|
-
let n = Object.keys(
|
|
14836
|
+
let n = Object.keys(Ym);
|
|
14762
14837
|
for (let r of n) {
|
|
14763
14838
|
let n = e[r];
|
|
14764
14839
|
typeof n == "string" && (t[r] = n);
|
|
@@ -14767,7 +14842,7 @@ function Km(e) {
|
|
|
14767
14842
|
}
|
|
14768
14843
|
//#endregion
|
|
14769
14844
|
//#region src/core/components/messages.ts
|
|
14770
|
-
var
|
|
14845
|
+
var Zm = {
|
|
14771
14846
|
defaultTitle: "AI 助手",
|
|
14772
14847
|
inputPlaceholder: "输入消息,Enter 发送...",
|
|
14773
14848
|
newSession: "新建会话",
|
|
@@ -14994,8 +15069,8 @@ var qm = {
|
|
|
14994
15069
|
codeDemoText: "这是一段示例文字,用于展示 CSS 效果。",
|
|
14995
15070
|
codeDemoButton: "按钮",
|
|
14996
15071
|
codeDemoInput: "输入框"
|
|
14997
|
-
},
|
|
14998
|
-
"zh-CN":
|
|
15072
|
+
}, Qm = {
|
|
15073
|
+
"zh-CN": Zm,
|
|
14999
15074
|
"en-US": {
|
|
15000
15075
|
defaultTitle: "AI Assistant",
|
|
15001
15076
|
inputPlaceholder: "Type a message, Enter to send...",
|
|
@@ -15225,10 +15300,10 @@ var qm = {
|
|
|
15225
15300
|
codeDemoInput: "Input"
|
|
15226
15301
|
}
|
|
15227
15302
|
};
|
|
15228
|
-
function
|
|
15303
|
+
function $m(e = "zh-CN", t) {
|
|
15229
15304
|
let n = {
|
|
15230
|
-
...
|
|
15231
|
-
...
|
|
15305
|
+
...Zm,
|
|
15306
|
+
...Qm[e]
|
|
15232
15307
|
};
|
|
15233
15308
|
if (!t) return n;
|
|
15234
15309
|
let r = { ...n };
|
|
@@ -15240,9 +15315,9 @@ function Ym(e = "zh-CN", t) {
|
|
|
15240
15315
|
}
|
|
15241
15316
|
//#endregion
|
|
15242
15317
|
//#region src/core/composables/chatContext.ts
|
|
15243
|
-
var
|
|
15244
|
-
function
|
|
15245
|
-
let t =
|
|
15318
|
+
var eh = Symbol("chatContext");
|
|
15319
|
+
function th(e = {}) {
|
|
15320
|
+
let t = Jm({
|
|
15246
15321
|
fetchResponse: e.fetchResponse,
|
|
15247
15322
|
fetchStream: e.fetchStream,
|
|
15248
15323
|
messages: e.messages,
|
|
@@ -15264,7 +15339,7 @@ function Zm(e = {}) {
|
|
|
15264
15339
|
}, h = /* @__PURE__ */ Wt({}), g = (e) => h.value[e] === !0, _ = (e) => {
|
|
15265
15340
|
h.value[e] = !g(e);
|
|
15266
15341
|
}, v = /* @__PURE__ */ Wt(!1), y = (e) => {
|
|
15267
|
-
|
|
15342
|
+
Km(e).then((e) => {
|
|
15268
15343
|
e && (v.value = !0, setTimeout(() => {
|
|
15269
15344
|
v.value = !1;
|
|
15270
15345
|
}, 1500));
|
|
@@ -15326,7 +15401,7 @@ function Zm(e = {}) {
|
|
|
15326
15401
|
e.onClearFocus?.();
|
|
15327
15402
|
}, M = (t) => {
|
|
15328
15403
|
e.onFocusChipClick?.(t);
|
|
15329
|
-
}, N =
|
|
15404
|
+
}, N = Xm(e.icons), ce = e.locale ?? "zh-CN", P = $m(ce, e.dialogMessages);
|
|
15330
15405
|
return {
|
|
15331
15406
|
chat: t,
|
|
15332
15407
|
inputText: o,
|
|
@@ -15368,15 +15443,15 @@ function Zm(e = {}) {
|
|
|
15368
15443
|
toolStepView: e.toolStepView
|
|
15369
15444
|
};
|
|
15370
15445
|
}
|
|
15371
|
-
function
|
|
15372
|
-
let e = Qn(
|
|
15446
|
+
function nh() {
|
|
15447
|
+
let e = Qn(eh);
|
|
15373
15448
|
if (!e) throw Error("useChatContext 必须在 provide(chatContextKey) 的组件子树内调用");
|
|
15374
15449
|
return e;
|
|
15375
15450
|
}
|
|
15376
15451
|
//#endregion
|
|
15377
15452
|
//#region src/core/index.headless.ts
|
|
15378
|
-
function
|
|
15453
|
+
function rh(e) {
|
|
15379
15454
|
return Fm(e);
|
|
15380
15455
|
}
|
|
15381
15456
|
//#endregion
|
|
15382
|
-
export { wp as CAPABILITIES, Dp as CONTEXT_PRESETS, Pf as CompressDecisionSchema, Bp as DEFAULT_COMPUTED_STYLES, Kc as DEFAULT_PROMPT_SOFT_CAP, xu as DEFAULT_SYSTEM_PROMPT, Cd as HTML_VOID_TAGS, Il as HUMAN_CONFIRM_TOOL_NAME, gi as ImageInputError, g as LOW_CAPS_HINT_BASELINE, p as MIN_CONTEXT_WINDOW, $i as MODEL_UNAVAILABLE_GUIDANCE, Gc as SOFT_CAP_MIN_WINDOW, Lc as STOP_WORDS, zs as UNSAFE_KEYS, cm as actionsToInspectInfo, sm as actionsToTools, fi as agentError, mu as analyzeContext, Zs as applyPatchToClone, ec as applyPatchToLive, dd as applyPatchesToBind, is as arrayMinLength, di as asAgentError, hf as buildCollectorJs, Gp as buildCssPath, Cu as buildDataPrompt, sf as buildDiagnosticsReport, gf as buildSandboxSrcdoc, wu as buildSystemPrompt,
|
|
15457
|
+
export { wp as CAPABILITIES, Dp as CONTEXT_PRESETS, Pf as CompressDecisionSchema, Bp as DEFAULT_COMPUTED_STYLES, Kc as DEFAULT_PROMPT_SOFT_CAP, xu as DEFAULT_SYSTEM_PROMPT, Cd as HTML_VOID_TAGS, Il as HUMAN_CONFIRM_TOOL_NAME, gi as ImageInputError, g as LOW_CAPS_HINT_BASELINE, p as MIN_CONTEXT_WINDOW, $i as MODEL_UNAVAILABLE_GUIDANCE, Gc as SOFT_CAP_MIN_WINDOW, Lc as STOP_WORDS, zs as UNSAFE_KEYS, cm as actionsToInspectInfo, sm as actionsToTools, fi as agentError, mu as analyzeContext, Zs as applyPatchToClone, ec as applyPatchToLive, dd as applyPatchesToBind, is as arrayMinLength, di as asAgentError, hf as buildCollectorJs, Gp as buildCssPath, Cu as buildDataPrompt, sf as buildDiagnosticsReport, gf as buildSandboxSrcdoc, wu as buildSystemPrompt, eh as chatContextKey, ud as commitSetToBind, Sf as composeStructureThenRender, Di as compressImage, bu as connectMcp, ee as constructLlmFromConfig, E as constructOpenLlmSync, Km as copyText, Jo as createAgent, Fl as createApprovalMiddleware, th as createChatContext, rh as createChatSdk, Kl as createCheckpointManager, ql as createCheckpointMiddleware, qf as createConflictManager, hu as createContextInspectorMiddleware, Of as createCraftNoteCheck, Sd as createDataOps, Gm as createEvalHarness, Ef as createHtmlFormatCheck, xf as createHtmlRenderCheck, Af as createHtmlSubagent, zl as createHumanConfirmMiddleware, Rl as createHumanConfirmTool, Hm as createIdleDetector, hp as createMemoryBackend, Ol as createMemoryMiddleware, u as createProxyLlm, Vm as createRagSubagent, aa as createSandboxRunner, Ep as createSdkEvents, Tm as createSerialRunner, yp as createSessionStore, bp as createSessionStoreWithBackend, xm as createSkillStore, yl as createSubagentMiddleware, $c as createSubagentTracker, Sl as createSubagentsMiddleware, hm as createUsageHintsMiddleware, Yl as createVerifyMiddleware, Ou as createVfs, _p as createWebStorageBackend, tu as createWriteBackCheck, ea as decorateModelUnavailable, Q as deepClone, dm as defineDataToolset, pc as defineSkill, jf as defineTool, Us as deleteByPath, Ff as deriveTitle, vs as describeSchemaNode, Po as detectGarbledToolCall, ic as diffObjects, Wm as diffReport, Xp as domInfoTool, Zp as domInspectSkill, Yp as domSearchTool, Lp as domToStructure, zp as domTools, um as domToolsStatic, as as elementSchemaCandidates, Up as ensureDomListenerRecorder, zc as estimateMessageTokens, Hc as estimateRoundTokens, y as estimateTokens, ne as extractReasoningDelta, js as extractSchemaHint, gu as extractText, te as extractTextDelta, re as extractUsage, Np as fetchDocTools, lm as fetchTools, rc as findStrippedKeys, ys as formatConstraints, si as formatZodIssues, Z as getByPath, Rp as getDomTool, Jp as getElementInfo, em as getEnvSummary, Wp as getRecordedListeners, yf as getSandboxLifecycle, Qo as getSchemaAtPath, Yo as getSchemaTopKeys, Ys as hashValue, Es as htmlOrchestratorPrompt, Uc as indexSummarize, rm as inspectEnvTool, im as inspectTools, Lf as isChatModel, Zi as isContextLengthError, Qi as isModelUnavailableError, Xo as isPathAllowed, sp as isQuotaError, Bs as isUnsafePath, ha as jpEval, li as jsonParseError, qs as limitDepth, _ as lowCapsHint, af as maskUrlCredentials, Gs as maybeParseValue, Qd as measureWriteScale, mf as normalizeRenderResult, ae as normalizeUsage, x as offloadPassThroughChars, b as offloadThresholdChars, Ts as presets, fs as projectBySchema, ds as projectBySchemaDeep, Ks as projectFields, Wc as recallRounds, bf as renderInSandbox, bs as renderSchemaHint, xs as renderSchemaOverview, ws as renderSchemaShallow, Tp as resolveCapabilities, kp as resolveContextOptions, Cp as resolveDialogConfig, Kf as resolveLlm, v as resolveModelCaps, Jc as resolvePromptSoftCap, ts as resolveSchemaPath, Sp as resolveStorage, nc as restoreInPlace, tc as restoreLive, ui as routeError, ya as runSandboxedScript, Vs as safeMerge, $p as safeSerialize, $ as safeStringify, rs as schemaHasRefinement, Kp as searchDom, _a as searchJson, fm as selectBuiltinTools, Hs as setByPath, Yc as shouldTriggerCompression, cf as stringifyDiagnosticsReport, Ds as systemPromptHelpers, h as tableMaxOutputTokens, Rc as tokenize, X as toolError, Zo as unwrapSchema, Jm as useChat, nh as useChatContext, ns as validateAtPath, Td as validateHtmlFormat, cd as validateRootValueLocally, ld as validateWriteLocally, Xs as watchFieldsHash, e as z, ci as zodError };
|