@coolkiller007/my-page-agent 0.1.1 → 0.1.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/package.json +2 -2
- package/UPSTREAM.md +0 -97
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coolkiller007/my-page-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "In-page GUI agent for Sexytea Vue 2 applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|
|
33
|
-
"url": "
|
|
33
|
+
"url": ""
|
|
34
34
|
},
|
|
35
35
|
"author": "Sexytea Frontend Team",
|
|
36
36
|
"license": "MIT",
|
package/UPSTREAM.md
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
# Upstream
|
|
2
|
-
|
|
3
|
-
This repository selectively derives runtime code from [Alibaba Page Agent](https://github.com/alibaba/page-agent) under the MIT License.
|
|
4
|
-
|
|
5
|
-
- Baseline commit: `d02db1e`
|
|
6
|
-
- Baseline version: `1.12.2`
|
|
7
|
-
- Imported on: `2026-08-11`
|
|
8
|
-
|
|
9
|
-
## Directory mapping
|
|
10
|
-
|
|
11
|
-
The migration reorganizes upstream package boundaries into capabilities in one npm package:
|
|
12
|
-
|
|
13
|
-
| Alibaba Page Agent source | My Page Agent destination | Notes |
|
|
14
|
-
| ----------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------- |
|
|
15
|
-
| `packages/llms/src/index.ts` | `src/llm/LLM.ts` | LLM orchestration |
|
|
16
|
-
| `packages/llms/src/OpenAIClient.ts` | `src/llm/OpenAICompatibleClient.ts` | Client renamed mechanically |
|
|
17
|
-
| `packages/llms/src/errors.ts` | `src/llm/errors.ts` | Error contracts |
|
|
18
|
-
| `packages/llms/src/types.ts` | `src/llm/types.ts` | Provider contracts |
|
|
19
|
-
| `packages/llms/src/utils.ts` | `src/llm/utils.ts` | Response utilities |
|
|
20
|
-
| `packages/llms/src/index.test.ts` | `src/llm/LLM.test.ts` | Non-Live behavior coverage |
|
|
21
|
-
| `packages/llms/src/OpenAIClient.test.ts` | `src/llm/OpenAICompatibleClient.test.ts` | Client behavior coverage |
|
|
22
|
-
| `packages/llms/src/utils.test.ts` | `src/llm/utils.test.ts` | Utility coverage |
|
|
23
|
-
| `packages/page-controller/src/PageController.ts` | `src/browser/BrowserController.ts` | Controller renamed mechanically |
|
|
24
|
-
| `packages/page-controller/src/actions.ts` | `src/browser/actions.ts` | Browser actions |
|
|
25
|
-
| `packages/page-controller/src/dom/` | `src/browser/dom/` | DOM extraction and DOM Tree |
|
|
26
|
-
| `packages/page-controller/src/mask/` | `src/browser/visual/` | Mask and visual resources |
|
|
27
|
-
| `packages/page-controller/src/patches/` | `src/browser/patches/` | Browser compatibility patches |
|
|
28
|
-
| `packages/page-controller/src/utils/` | `src/browser/utils/` | Browser utilities |
|
|
29
|
-
| `packages/page-controller/src/PageController.ts` | `src/browser/types.ts` | Controller types split into a local barrel |
|
|
30
|
-
| `packages/page-controller/src/PageController.test.ts` | `src/browser/BrowserController.test.ts` | Controller behavior coverage |
|
|
31
|
-
| `packages/core/src/PageAgentCore.ts` | `src/agent/AgentRuntime.ts` | Runtime renamed mechanically |
|
|
32
|
-
| `packages/core/src/types.ts` | `src/agent/types.ts` | Runtime contracts |
|
|
33
|
-
| `packages/core/src/tools/` | `src/agent/tools/` | Agent tools |
|
|
34
|
-
| `packages/core/src/prompts/` | `src/agent/prompts/` | System prompt resources |
|
|
35
|
-
| `packages/core/src/utils/` | `src/agent/utils/` | Runtime utilities |
|
|
36
|
-
| `packages/core/src/env.d.ts` | `src/env.d.ts` | Vite types retained; raw Markdown declaration covered by Vite |
|
|
37
|
-
| `packages/core/src/PageAgentCore.test.ts` | `src/agent/AgentRuntime.test.ts` | Runtime behavior and lifecycle coverage |
|
|
38
|
-
| `packages/page-controller/src/env.d.ts` | `src/env.d.ts` | CSS Module declaration covered by Vite |
|
|
39
|
-
| `packages/ui/src/panel/Panel.ts` | `src/ui/UI.ts` | Behavior retained; terminology changed to UI |
|
|
40
|
-
| `packages/ui/src/panel/Panel.module.css` | `src/ui/styles/UI.module.css` | Styles renamed with the UI surface |
|
|
41
|
-
| `packages/ui/src/panel/cards.ts` | `src/ui/cards.ts` | UI cards |
|
|
42
|
-
| `packages/ui/src/panel/types.ts` | `src/ui/types.ts` | UI adapter contracts |
|
|
43
|
-
| `packages/ui/src/i18n/` | `src/ui/i18n/` | Localized UI resources |
|
|
44
|
-
| upstream UI tests | `src/ui/UI.test.ts` | Focused replacement coverage for migrated UI behavior |
|
|
45
|
-
| `packages/page-agent/src/PageAgent.ts` | `src/agent/MyPageAgent.ts` | Behavior reference only; facade reimplemented for the single package |
|
|
46
|
-
| `packages/page-agent/src/env.d.ts` | `src/env.d.ts` | Vite types retained; IIFE Demo globals intentionally excluded |
|
|
47
|
-
| upstream public package behavior | `tests/integration/public-entry.test.ts` | Public root-entry boundary coverage |
|
|
48
|
-
|
|
49
|
-
The upstream DOM Tree remains JavaScript to minimize drift from the complex extraction algorithm. Its original `@edit` annotations are retained so downstream changes remain auditable.
|
|
50
|
-
|
|
51
|
-
The three upstream environment declaration files are consolidated at `src/env.d.ts`. Its
|
|
52
|
-
`vite/client` reference, together with `types: ["node", "vite/client"]` in `tsconfig.json`, provides
|
|
53
|
-
the Vite client types used by the migrated source. Vite's declarations already cover `*?raw` imports
|
|
54
|
-
such as `system_prompt.md?raw` and `*.module.css`, so the narrower upstream Markdown and CSS Module
|
|
55
|
-
declarations are not duplicated. The upstream `Window.pageAgent` and `Window.PageAgent` globals exist
|
|
56
|
-
only for `packages/page-agent/src/demo.ts`; they were excluded with the IIFE Demo and are not part of
|
|
57
|
-
the library's browser-global or public API contract.
|
|
58
|
-
|
|
59
|
-
## Mechanical renaming
|
|
60
|
-
|
|
61
|
-
The migration applies these structural names without changing the corresponding capability intent:
|
|
62
|
-
|
|
63
|
-
| Upstream name | Current name |
|
|
64
|
-
| ------------------- | ------------------------ |
|
|
65
|
-
| `OpenAIClient` | `OpenAICompatibleClient` |
|
|
66
|
-
| `PageController` | `BrowserController` |
|
|
67
|
-
| `PageAgentCore` | `AgentRuntime` |
|
|
68
|
-
| `Panel` | `UI` |
|
|
69
|
-
| `PanelConfig` | `UIConfig` |
|
|
70
|
-
| `PanelAgentAdapter` | `UIAdapter` |
|
|
71
|
-
| `agent.panel` | `agent.ui` |
|
|
72
|
-
| `mask/` | `visual/` |
|
|
73
|
-
|
|
74
|
-
UI behavior was migrated selectively, while source identifiers and product terminology were standardized on `UI`. `MyPageAgent` is the only assembly point for Browser, Runtime, and UI.
|
|
75
|
-
|
|
76
|
-
## License and copyright
|
|
77
|
-
|
|
78
|
-
Migrated code remains covered by the upstream MIT License. [LICENSE](LICENSE) preserves the MIT grant and the Alibaba Group Holding Limited copyright notice. Original copyright headers remain on migrated source files; downstream copyright notices are additive and do not replace upstream attribution.
|
|
79
|
-
|
|
80
|
-
## Intentionally excluded
|
|
81
|
-
|
|
82
|
-
The following upstream areas were not migrated:
|
|
83
|
-
|
|
84
|
-
- Live model tests that require external services or credentials;
|
|
85
|
-
- Extension and its remote browser-control bridge;
|
|
86
|
-
- MCP server and Extension-dependent control chain;
|
|
87
|
-
- Website and documentation application;
|
|
88
|
-
- IIFE Demo, CDN auto-initialization, and demo API behavior;
|
|
89
|
-
- npm workspace configuration and per-package manifests;
|
|
90
|
-
- multi-package build, version synchronization, pre-publish, post-publish, and release scripts;
|
|
91
|
-
- package wrappers, compatibility exports, and configuration without a single-package caller.
|
|
92
|
-
|
|
93
|
-
These exclusions are deliberate. Extension, MCP, Website, IIFE, workspace, or release infrastructure must not be copied as an incidental part of an upstream sync.
|
|
94
|
-
|
|
95
|
-
## Synchronization policy
|
|
96
|
-
|
|
97
|
-
Future upstream syncs use capability directories (`agent`, `browser`, `llm`, and `ui`) as review units. They do not merge upstream package or workspace structure. Each sync must preserve local public-entry boundaries, rerun the complete test/type/lint/build/package checks, and review license headers and DOM Tree `@edit` annotations. Extension, MCP, and Website changes require separate designs rather than automatic migration.
|