page-agent 1.8.1 → 1.8.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/README.md +4 -2
- package/dist/esm/page-agent.js +26 -18
- package/dist/esm/page-agent.js.map +1 -1
- package/dist/iife/page-agent.demo.js +116 -115
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -50,8 +50,10 @@ Fastest way to try PageAgent with our free Demo LLM:
|
|
|
50
50
|
|
|
51
51
|
| Mirrors | URL |
|
|
52
52
|
| ------- | ---------------------------------------------------------------------------------- |
|
|
53
|
-
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.8.
|
|
54
|
-
| China | https://registry.npmmirror.com/page-agent/1.8.
|
|
53
|
+
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.8.2/dist/iife/page-agent.demo.js |
|
|
54
|
+
| China | https://registry.npmmirror.com/page-agent/1.8.2/files/dist/iife/page-agent.demo.js |
|
|
55
|
+
|
|
56
|
+
Add `?autoInit=false` to load the script without creating the demo agent automatically. You can then instantiate it with `new window.PageAgent(...)`.
|
|
55
57
|
|
|
56
58
|
### NPM Installation
|
|
57
59
|
|
package/dist/esm/page-agent.js
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { PageAgentCore } from "@page-agent/core";
|
|
2
|
-
export * from "@page-agent/core";
|
|
3
2
|
import { PageController } from "@page-agent/page-controller";
|
|
4
3
|
import { Panel } from "@page-agent/ui";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
export * from "@page-agent/core";
|
|
5
|
+
//#region src/PageAgent.ts
|
|
6
|
+
/**
|
|
7
|
+
* Copyright (C) 2025 Alibaba Group Holding Limited
|
|
8
|
+
* All rights reserved.
|
|
9
|
+
*/
|
|
10
|
+
var PageAgent = class extends PageAgentCore {
|
|
11
|
+
panel;
|
|
12
|
+
constructor(config) {
|
|
13
|
+
const pageController = new PageController({
|
|
14
|
+
...config,
|
|
15
|
+
enableMask: config.enableMask ?? true
|
|
16
|
+
});
|
|
17
|
+
super({
|
|
18
|
+
...config,
|
|
19
|
+
pageController
|
|
20
|
+
});
|
|
21
|
+
this.panel = new Panel(this, {
|
|
22
|
+
language: config.language,
|
|
23
|
+
promptForNextTask: config.promptForNextTask
|
|
24
|
+
});
|
|
25
|
+
}
|
|
21
26
|
};
|
|
22
|
-
//#
|
|
27
|
+
//#endregion
|
|
28
|
+
export { PageAgent };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=page-agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-agent.js","sources":["../../src/PageAgent.ts"],"sourcesContent":["/**\n * Copyright (C) 2025 Alibaba Group Holding Limited\n * All rights reserved.\n */\nimport { type AgentConfig, PageAgentCore } from '@page-agent/core'\nimport { PageController, type PageControllerConfig } from '@page-agent/page-controller'\nimport { Panel, type PanelConfig } from '@page-agent/ui'\n\nexport * from '@page-agent/core'\n\nexport type PageAgentConfig = AgentConfig & PageControllerConfig & Omit<PanelConfig, 'language'>\n\nexport class PageAgent extends PageAgentCore {\n\tpanel: Panel\n\n\tconstructor(config: PageAgentConfig) {\n\t\tconst pageController = new PageController({\n\t\t\t...config,\n\t\t\tenableMask: config.enableMask ?? true,\n\t\t})\n\n\t\tsuper({ ...config, pageController })\n\n\t\tthis.panel = new Panel(this, {\n\t\t\tlanguage: config.language,\n\t\t\tpromptForNextTask: config.promptForNextTask,\n\t\t})\n\t}\n}\n"],"
|
|
1
|
+
{"version":3,"file":"page-agent.js","names":[],"sources":["../../src/PageAgent.ts"],"sourcesContent":["/**\n * Copyright (C) 2025 Alibaba Group Holding Limited\n * All rights reserved.\n */\nimport { type AgentConfig, PageAgentCore } from '@page-agent/core'\nimport { PageController, type PageControllerConfig } from '@page-agent/page-controller'\nimport { Panel, type PanelConfig } from '@page-agent/ui'\n\nexport * from '@page-agent/core'\n\nexport type PageAgentConfig = AgentConfig & PageControllerConfig & Omit<PanelConfig, 'language'>\n\nexport class PageAgent extends PageAgentCore {\n\tpanel: Panel\n\n\tconstructor(config: PageAgentConfig) {\n\t\tconst pageController = new PageController({\n\t\t\t...config,\n\t\t\tenableMask: config.enableMask ?? true,\n\t\t})\n\n\t\tsuper({ ...config, pageController })\n\n\t\tthis.panel = new Panel(this, {\n\t\t\tlanguage: config.language,\n\t\t\tpromptForNextTask: config.promptForNextTask,\n\t\t})\n\t}\n}\n"],"mappings":";;;;;;;;;AAYA,IAAa,YAAb,cAA+B,cAAc;CAC5C;CAEA,YAAY,QAAyB;EACpC,MAAM,iBAAiB,IAAI,eAAe;GACzC,GAAG;GACH,YAAY,OAAO,cAAc;GACjC,CAAC;EAEF,MAAM;GAAE,GAAG;GAAQ;GAAgB,CAAC;EAEpC,KAAK,QAAQ,IAAI,MAAM,MAAM;GAC5B,UAAU,OAAO;GACjB,mBAAmB,OAAO;GAC1B,CAAC"}
|