page-agent-sdk 4.24.0 → 4.24.2
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/page-agent-sdk.headless.js +1142 -1138
- package/dist/page-agent-sdk.iife.js +10 -10
- package/dist/page-agent-sdk.js +882 -878
- package/dist/page-agent-sdk.legacy.js +583 -576
- package/dist/page-agent-sdk.umd.cjs +8 -8
- package/package.json +1 -1
- package/types/headless.d.ts +2 -2
- package/types/index.d.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "page-agent-sdk",
|
|
3
|
-
"version": "4.24.
|
|
3
|
+
"version": "4.24.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI agent SDK for web pages — embed a chat assistant that edits page data via schema-validated tools. A lighter, framework-agnostic alternative to CopilotKit/LangChain for in-page JSON-editing agents. Vue-bundled; works with DeepSeek, OpenAI, MCP.",
|
|
6
6
|
"main": "./dist/page-agent-sdk.umd.cjs",
|
package/types/headless.d.ts
CHANGED
|
@@ -215,10 +215,10 @@ export interface ApprovalPreviewItem {
|
|
|
215
215
|
oldSummary?: string;
|
|
216
216
|
newSummary?: string;
|
|
217
217
|
}
|
|
218
|
-
/** write 审批 diff 预览结果(三意图只读计算,dryRun 纯函数通道不落盘) */
|
|
218
|
+
/** write 审批 diff 预览结果(三意图只读计算,dryRun 纯函数通道不落盘)。intent 为 string(4.24.1 放宽):内置 write 用 set/edit/delete,集成方自定义工具可给任意语义标签 */
|
|
219
219
|
export interface ApprovalWritePreview {
|
|
220
220
|
ok: boolean;
|
|
221
|
-
intent:
|
|
221
|
+
intent: string;
|
|
222
222
|
items: ApprovalPreviewItem[];
|
|
223
223
|
/** ok=false 时的校验失败说明(预览即看到会被拒的原因) */
|
|
224
224
|
error?: string;
|
package/types/index.d.ts
CHANGED
|
@@ -1152,6 +1152,9 @@ export interface ApprovalOptions {
|
|
|
1152
1152
|
/**
|
|
1153
1153
|
* write 审批 diff 预览计算(ui-quick-wins Q3;装配层注入,中间件保持通用):挂起前对需确认调用做只读预览,
|
|
1154
1154
|
* 结果附在 approval_request 载荷 preview 字段(UI 渲染 old→new)。返回 null/抛错 → 无 preview,不影响挂起流。
|
|
1155
|
+
* **组合语义(4.24.1)**:集成方 previewWrite 优先(自定义工具的审批预览通道 —— 写目标由宿主态决定、
|
|
1156
|
+
* 不在 args 里时,如「标用户选中的那段」);返回 null 再落 dataOps write 内置 dryRun 预览(approval.preview
|
|
1157
|
+
* 显式开才接)。修前装配层把集成方回调静默覆盖丢弃。
|
|
1155
1158
|
*/
|
|
1156
1159
|
previewWrite?: (name: string, args: any) => ApprovalWritePreview | null;
|
|
1157
1160
|
/** write 审批 diff 预览(ui-quick-wins Q3;默认 false):挂起 write 时只读预览(dryRun 纯函数通道)附 approval_request 载荷,ApprovalBar 渲染 old→new;预览跑一次校验链有成本,args JSON 已有兜底呈现,故显式开 */
|
|
@@ -1164,10 +1167,10 @@ export interface ApprovalPreviewItem {
|
|
|
1164
1167
|
oldSummary?: string;
|
|
1165
1168
|
newSummary?: string;
|
|
1166
1169
|
}
|
|
1167
|
-
/** write 审批 diff 预览结果(ui-quick-wins Q3):三意图只读计算(dryRun 纯函数通道,不落盘) */
|
|
1170
|
+
/** write 审批 diff 预览结果(ui-quick-wins Q3):三意图只读计算(dryRun 纯函数通道,不落盘)。intent 为 string(4.24.1 放宽):内置 write 预览用 set/edit/delete,集成方自定义工具可给任意语义标签(如 'annotate')—— ApprovalBar 只渲染 items/error,intent 不进 UI */
|
|
1168
1171
|
export interface ApprovalWritePreview {
|
|
1169
1172
|
ok: boolean;
|
|
1170
|
-
intent:
|
|
1173
|
+
intent: string;
|
|
1171
1174
|
items: ApprovalPreviewItem[];
|
|
1172
1175
|
/** ok=false 时的校验失败说明(预览即看到会被拒的原因) */
|
|
1173
1176
|
error?: string;
|