page-agent-sdk 3.9.0 → 3.10.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 +3 -3
- package/README.zh-CN.md +3 -3
- package/dist/page-agent-sdk.headless.js +2041 -2004
- package/dist/page-agent-sdk.iife.js +144 -144
- package/dist/page-agent-sdk.js +3739 -3702
- package/dist/page-agent-sdk.umd.cjs +100 -100
- package/package.json +1 -1
- package/types/index.d.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "page-agent-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.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
|
@@ -21,6 +21,10 @@ export interface ConstructOpts {
|
|
|
21
21
|
}
|
|
22
22
|
/** 同步构造 OpenAI 协议 LLM(仅 openai 分支;Anthropic 无同步构造,用 constructLlmFromConfig) */
|
|
23
23
|
export declare function constructOpenLlmSync(cfg: LLMConfig, opts?: ConstructOpts): import('@langchain/core/language_models/chat_models').BaseChatModel;
|
|
24
|
+
/** baseUrl 容错归一:相对路径('/llm/v1' 同源代理用法)补 location.origin 成绝对 URL(openai/anthropic SDK 的 new URL 不收相对路径);非浏览器/绝对路径原样 */
|
|
25
|
+
export declare function normalizeBaseUrl(baseUrl: string | undefined): string | undefined;
|
|
26
|
+
/** 默认 fetch 包装:剥 x-stainless-* 遥测头(严格 CORS 网关预检兼容);集成方 extraConfig.fetch 可覆盖 */
|
|
27
|
+
export declare function stripStainlessFetch(url: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
24
28
|
/** 按 provider 分支构造 LLM(openai 同步 / anthropic 动态 import @langchain/anthropic);缺省 provider → openai */
|
|
25
29
|
export declare function constructLlmFromConfig(cfg: LLMConfig, opts?: ConstructOpts): Promise<import('@langchain/core/language_models/chat_models').BaseChatModel>;
|
|
26
30
|
/** 从流式 chunk 提取文本 delta(兼容 OpenAI string content 与 Anthropic parts 数组) */
|
|
@@ -1454,6 +1458,8 @@ export interface HtmlFormatCheckOptions {
|
|
|
1454
1458
|
}
|
|
1455
1459
|
/** HTML 格式 verify check(beforeReturn 门禁):扫 state.files 代码文件,不通过回灌 feedback 自纠 */
|
|
1456
1460
|
export declare function createHtmlFormatCheck(opts?: HtmlFormatCheckOptions): VerifyCheck;
|
|
1461
|
+
/** 内置完整 HTML 生成规范 skill(createHtmlSubagent 默认装;传自定义 skills 覆盖默认时,显式并回此 skill 保住生成规范/安全底线) */
|
|
1462
|
+
export declare const htmlFragmentSkill: SkillSpec;
|
|
1457
1463
|
|
|
1458
1464
|
// checkpoint / dataOps / permissions
|
|
1459
1465
|
export interface CheckpointDeps { [k: string]: any }
|