page-agent-sdk 3.4.0 → 3.6.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 +2006 -1920
- package/dist/page-agent-sdk.iife.js +136 -132
- package/dist/page-agent-sdk.js +3741 -3655
- package/dist/page-agent-sdk.umd.cjs +102 -98
- package/package.json +1 -1
- package/types/index.d.ts +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "page-agent-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
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/index.d.ts
CHANGED
|
@@ -342,7 +342,7 @@ export interface ContextInspectorMiddleware {
|
|
|
342
342
|
}
|
|
343
343
|
/** 创建上下文检查中间件(capabilities.contextInspector 默认开) */
|
|
344
344
|
export declare function createContextInspectorMiddleware(opts?: ContextInspectorOptions): ContextInspectorMiddleware;
|
|
345
|
-
export interface McpServerConfig { transport: 'http' | 'sse' | 'websocket'; url: string; name?: string; requestInit?: any; /** 握手超时 ms(默认 15s;fix-hang-and-feedback P1-2);超时按连接失败降级 */ timeoutMs?: number; }
|
|
345
|
+
export interface McpServerConfig { transport: 'http' | 'sse' | 'websocket'; url: string; name?: string; requestInit?: any; /** 握手超时 ms(默认 15s;fix-hang-and-feedback P1-2);超时按连接失败降级 */ timeoutMs?: number; /** 单次工具调用超时 ms(默认 60s);超时该次调用作废回灌自纠,不断连接 */ callTimeoutMs?: number; }
|
|
346
346
|
|
|
347
347
|
export declare const ChatDialog: DefineComponent<ChatDialogProps>;
|
|
348
348
|
// chatdialog-component-split:原子组件(可拼装/替换,经 ChatDialog 具名 slot 或 L2 自建根组件 provide ctx 后拼装)
|
|
@@ -1408,7 +1408,8 @@ export interface CreateRagSubagentOptions {
|
|
|
1408
1408
|
[k: string]: any;
|
|
1409
1409
|
}
|
|
1410
1410
|
export interface CreateHtmlSubagentOptions {
|
|
1411
|
-
|
|
1411
|
+
/** 可选:未传时装配期从 schema 顶层自动推断(z.array 元素含 codeField string 的路径);推断不出(开放 schema/嵌套容器/点路径 codeField)须显式传 */
|
|
1412
|
+
writablePaths?: string[];
|
|
1412
1413
|
codeVfsPrefix?: string;
|
|
1413
1414
|
id?: string;
|
|
1414
1415
|
description?: string;
|
|
@@ -1424,6 +1425,12 @@ export interface CreateHtmlSubagentOptions {
|
|
|
1424
1425
|
codeField?: string;
|
|
1425
1426
|
/** 自动注入主 agent 委派编排段(含正确 use_<id>);默认 true,false=不注入 */
|
|
1426
1427
|
orchestratorPrompt?: boolean;
|
|
1428
|
+
/**
|
|
1429
|
+
* 组件工匠笔记;默认 true:子 agent 收口回复 [note] 行沉淀为组件 __pgNotes(随 data 持久化),
|
|
1430
|
+
* 下次委派同组件经文件地图注入("前任的交接":设计决策/用户偏好/踩坑)—— 同组件跨委派设计意图持续。
|
|
1431
|
+
* false 关闭(零沉淀零注入)
|
|
1432
|
+
*/
|
|
1433
|
+
craftNotes?: boolean;
|
|
1427
1434
|
[k: string]: any;
|
|
1428
1435
|
}
|
|
1429
1436
|
export declare function createRagSubagent(options: CreateRagSubagentOptions): SubagentConfig;
|