page-agent-sdk 1.4.0 → 1.4.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.css +1 -1
- package/dist/page-agent-sdk.iife.js +112 -112
- package/dist/page-agent-sdk.js +1190 -1167
- package/dist/page-agent-sdk.umd.cjs +47 -47
- package/package.json +1 -1
- package/types/index.d.ts +6 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "page-agent-sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "框架无关的页面内 Agent JS SDK —— 以对话框形态挂载到任意网页,通过自定义 tool 读写宿主 window 属性(GET 抓文档),具备 planning/skills/虚拟工作区/快照回退/context 管理能力。Vue 打包进库,使用者无需安装 Vue。",
|
|
6
6
|
"main": "./dist/page-agent-sdk.umd.cjs",
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefineComponent } from 'vue';
|
|
1
|
+
import { DefineComponent, Ref } from 'vue';
|
|
2
2
|
export { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
export interface ToolStep {
|
|
@@ -403,8 +403,8 @@ export interface ChatSdk {
|
|
|
403
403
|
removeWindowProp(path: string): boolean;
|
|
404
404
|
/** 列出当前所有已注册 window 属性(反映动态增删后的最新状态) */
|
|
405
405
|
listWindowProps(): WindowPropSpec[];
|
|
406
|
-
/** 乐观锁冲突挂起状态(
|
|
407
|
-
pendingConflict: PendingConflict | null
|
|
406
|
+
/** 乐观锁冲突挂起状态(响应式 ref;无冲突为 null,有冲突时 UI 据此渲染冲突对话框)。headless 集成方可 watch 自建 UI */
|
|
407
|
+
pendingConflict: Ref<PendingConflict | null>;
|
|
408
408
|
/** 冲突解决:用户点「保留外部」(keep_external)/「强制覆盖」(overwrite)/「回退」(restore) → 收口挂起的 conflict,被挂起的工具调用继续 */
|
|
409
409
|
resolveConflict(action: ConflictResolution['action']): void;
|
|
410
410
|
}
|
|
@@ -569,3 +569,6 @@ export declare function estimateTokens(text: string): number;
|
|
|
569
569
|
export declare function offloadThresholdChars(contextWindow: number): number;
|
|
570
570
|
export declare function offloadPassThroughChars(contextWindow: number): number;
|
|
571
571
|
export interface ModelCaps { [k: string]: any }
|
|
572
|
+
|
|
573
|
+
// 剪贴板复制(clipboard API + execCommand 降级,兼容非 secure context / 旧浏览器)
|
|
574
|
+
export declare function copyText(text: string): Promise<boolean>;
|