@coolkiller007/my-page-agent 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/README.md +12 -35
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # My Page Agent
2
2
 
3
- 面向中台的页面内嵌 GUI Agent。项目将自然语言任务转换为受控的页面读取与操作,并以单一 npm 包交付。
3
+ 面向中台的页面内嵌 GUI Agent。项目将自然语言任务转换为受控的页面读取与操作,并以
4
+ 单一 npm 包交付。
4
5
 
5
6
  ## Installation
6
7
 
@@ -32,19 +33,23 @@ writeResult(result.data)
32
33
  agent.dispose()
33
34
  ```
34
35
 
35
- 生产环境必须通过公司后端代理或 AI 网关访问模型,不得把生产 API Key 打进浏览器产物。页面内容在发送给模型前也应通过 `transformPageContent` 完成业务所需的脱敏。
36
+ 生产环境必须通过公司后端代理或 AI 网关访问模型,不得把生产 API Key 打进浏览器产
37
+ 物。页面内容在发送给模型前也应通过 `transformPageContent` 完成业务所需的脱敏。
36
38
 
37
39
  ## Public API
38
40
 
39
41
  包根入口是唯一公共入口:
40
42
 
41
43
  - `createAgent(config)`:创建并组装 `MyPageAgent`。
42
- - `MyPageAgent`:Agent 门面;提供 `execute(task)`、`stop()`、`dispose()` 和只读 `status`。
44
+ - `MyPageAgent`:Agent 门面;提供 `execute(task)`、`stop()`、`dispose()` 和只读
45
+ `status`。
43
46
  - `agent.ui`:提供 `show()`、`hide()`、`expand()` 和 `collapse()`。
44
47
  - `tool(options)`:定义自定义 Agent 工具。
45
- - 类型:`MyPageAgentConfig`、`AgentActivity`、`AgentStatus`、`ExecutionResult` 和 `HistoricalEvent`。
48
+ - 类型:`MyPageAgentConfig`、`AgentActivity`、`AgentStatus`、`ExecutionResult`
49
+ 和 `HistoricalEvent`。
46
50
 
47
- `AgentRuntime`、`BrowserController`、`OpenAICompatibleClient`、UI 内部组件、DOM Tree、Prompt 和自动修复器属于内部实现,不从包根入口导出。
51
+ `AgentRuntime`、`BrowserController`、`OpenAICompatibleClient`、UI 内部组件、DOM
52
+ Tree、Prompt 和自动修复器属于内部实现,不从包根入口导出。
48
53
 
49
54
  ## Architecture
50
55
 
@@ -56,34 +61,6 @@ agent.dispose()
56
61
  - `src/shared`:跨能力共享的无状态工具。
57
62
  - `src/index.ts`:限定公共 API 的唯一包入口。
58
63
 
59
- 项目只发布 `@coolkiller007/my-page-agent`,不使用 npm workspaces。Browser、Runtime 和 UI 只在 `MyPageAgent` 中组装,内部模块使用相对 import。
64
+ 项目只发布 `@coolkiller007/my-page-agent`,不使用 npm workspaces。Browser、Runti
65
+ me 和 UI 只在 `MyPageAgent` 中组装,内部模块使用相对 import。
60
66
 
61
- ## Development
62
-
63
- ```sh
64
- npm install
65
- npm test
66
- npm run typecheck
67
- npm run lint
68
- npm run format:check
69
- npm run build
70
- npm run ci
71
- ```
72
-
73
- `npm pack --dry-run` 可用于检查发布包白名单。预期发布内容仅包含 `dist/`、README、LICENSE、UPSTREAM 和 npm 包元数据。
74
-
75
- ## Non-goals
76
-
77
- 当前迁移不包含:
78
-
79
- - 浏览器 Extension、MCP Server 或 Website;
80
- - IIFE Demo、CDN 自动初始化或跨标签页自动化;
81
- - npm workspace、多包构建与发布脚本;
82
- - 依赖真实模型密钥的 Live 测试;
83
- - Vue 2 生命周期、业务上下文、Action Policy、脱敏和审计的业务实现。
84
-
85
- 这些能力需在独立设计和安全评审后按需实现,不应通过恢复上游多包结构引入。
86
-
87
- ## Upstream
88
-
89
- 项目基于 MIT License 选择性迁移 [Alibaba Page Agent](https://github.com/alibaba/page-agent) 的运行能力。来源基线、目录映射、机械重命名和排除范围见 [UPSTREAM.md](UPSTREAM.md) 与 [LICENSE](LICENSE)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolkiller007/my-page-agent",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "In-page GUI agent for Sexytea Vue 2 applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",