page-agent-sdk 1.2.0 → 1.3.1
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 +6 -4
- package/README.zh-CN.md +5 -3
- package/dist/page-agent-sdk.iife.js +117 -112
- package/dist/page-agent-sdk.js +330 -295
- package/dist/page-agent-sdk.umd.cjs +25 -20
- package/package.json +3 -2
- package/skills/page-agent-sdk-integrate/SKILL.md +4 -2
- package/skills/page-agent-sdk-integrate/references/advanced.md +32 -0
- package/skills/page-agent-sdk-integrate/references/api.md +13 -0
- package/skills/page-agent-sdk-integrate/references/options.md +2 -2
- package/skills/page-agent-sdk-integrate/references/quickstart.md +33 -1
- package/skills/page-agent-sdk-integrate/references/use-cases.md +31 -0
- package/types/index.d.ts +7 -0
package/types/index.d.ts
CHANGED
|
@@ -103,6 +103,8 @@ export interface SubagentConfig {
|
|
|
103
103
|
export interface AgentInfo {
|
|
104
104
|
id: string;
|
|
105
105
|
model?: string;
|
|
106
|
+
/** 当前生效的 systemPrompt(默认或用户传入;仅 base 段,不含中间件 augmentPrompt,便于调试/验证默认提示词) */
|
|
107
|
+
systemPrompt: string;
|
|
106
108
|
tools: ToolInfo[];
|
|
107
109
|
skills: SkillInfo[];
|
|
108
110
|
windowProps: WindowPropInfo[];
|
|
@@ -422,6 +424,11 @@ export declare function createSubagentMiddleware(opts: any): any;
|
|
|
422
424
|
export declare function createVerifyMiddleware(opts: VerifyMiddlewareOptions): any;
|
|
423
425
|
export declare function createWriteBackCheck(opts?: WriteBackCheckOptions): VerifyCheck;
|
|
424
426
|
export declare const presets: Record<string, any>;
|
|
427
|
+
/** systemPrompt 辅助片段(标准化最佳实践,拼进 systemPrompt 降低写错门槛) */
|
|
428
|
+
export declare const systemPromptHelpers: {
|
|
429
|
+
/** 可靠写入规则:改前先读、动态先 list、字段以 describe 为准、写错看校验错误重试、优先增量 patch */
|
|
430
|
+
readonly reliableWriteRules: string;
|
|
431
|
+
};
|
|
425
432
|
export declare function createSessionStore(config?: StorageConfig): SessionStore;
|
|
426
433
|
export declare function createMemoryBackend(): StorageBackend;
|
|
427
434
|
export declare function createWebStorageBackend(storage: Storage): StorageBackend;
|