@nostop/page 0.0.0-stage → 0.1.0-rc.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/LICENSE +22 -0
- package/README.md +137 -2
- package/dist/esm/PageAgent.d.ts +27 -0
- package/dist/esm/SimulatorMask-Dft-xqkt.js +163 -0
- package/dist/esm/SimulatorMask-Dft-xqkt.js.map +1 -0
- package/dist/esm/page-agent.js +6446 -0
- package/dist/esm/page-agent.js.map +1 -0
- package/dist/iife/page-agent.demo.js +355 -0
- package/package.json +53 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alibaba Group Holding Limited
|
|
4
|
+
Copyright (c) 2026 nostop
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,138 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Page Agent (fork local)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Agente de IA que opera a página em que está instalado: lê o texto e os elementos clicáveis, decide uma ação e executa, passo a passo, até concluir a tarefa. Este README resume **todas as camadas de customização** disponíveis, do mais simples ao mais avançado.
|
|
4
|
+
|
|
5
|
+
> Documentação original do projeto: https://alibaba.github.io/page-agent/ (o repositório original foi removido deste fork; os nomes abaixo são os da versão atual do código).
|
|
6
|
+
|
|
7
|
+
## Mapa do projeto
|
|
8
|
+
|
|
9
|
+
| Pasta | O que faz | Quando mexer |
|
|
10
|
+
| -------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------- |
|
|
11
|
+
| `packages/core` | Ciclo do agente: passos, histórico, ferramentas, prompts | Quase nunca. Só com autorização explícita |
|
|
12
|
+
| `packages/core/src/prompts/system_prompt.md` | Prompt de sistema padrão (regras gerais do agente) | Preferir `instructions.system` |
|
|
13
|
+
| `packages/llms` | Cliente LLM compatível com OpenAI, com retentativas | Raramente |
|
|
14
|
+
| `packages/page-controller` | Leitura da página (DOM simplificado) e ações (clicar, digitar, rolar) | Para regras de extração e de bloqueio |
|
|
15
|
+
| `packages/page-controller/src/mask` | Overlay visual: brilho de borda e cursor do agente | Para aparência |
|
|
16
|
+
| `packages/ui` | Painel (conversa, ferramentas, voz, trilho, cartão de prévia) | Para interface |
|
|
17
|
+
| `packages/page-agent` | Classe `PageAgent` (núcleo + painel) e o bundle da demo | Ponto de entrada para integrar |
|
|
18
|
+
| `packages/website` | Site de documentação do projeto original | Opcional |
|
|
19
|
+
| `packages/extension` | Extensão do Chrome | Opcional |
|
|
20
|
+
| `packages/mcp` | Ponte MCP para a extensão | Opcional |
|
|
21
|
+
|
|
22
|
+
## Uso básico
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { PageAgent } from 'page-agent'
|
|
26
|
+
|
|
27
|
+
const agent = new PageAgent({
|
|
28
|
+
model: 'gpt-4o-mini',
|
|
29
|
+
baseURL: 'https://api.openai.com/v1', // ou o seu proxy
|
|
30
|
+
apiKey: 'sk-...', // em produção, use um proxy; nunca exponha a chave
|
|
31
|
+
language: 'pt-BR', // 'pt-BR' ou 'en-US'
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
agent.panel.show()
|
|
35
|
+
await agent.execute('Vá até o rodapé e pare quando não houver mais conteúdo abaixo.')
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Na demo, a mesma configuração vem dos parâmetros da URL do script (`model`, `baseURL`, `apiKey`, `lang`, `showPanel`).
|
|
39
|
+
|
|
40
|
+
## Camadas de customização
|
|
41
|
+
|
|
42
|
+
Cada camada abaixo pode ser usada sozinha. Elas vão de "configurar" a "substituir".
|
|
43
|
+
|
|
44
|
+
### Camada 1: configuração básica
|
|
45
|
+
|
|
46
|
+
| Opção | Efeito |
|
|
47
|
+
| ---------------------------- | ------------------------------------------------------------------------------------ |
|
|
48
|
+
| `model`, `baseURL`, `apiKey` | Modelo e endpoint compatível com OpenAI |
|
|
49
|
+
| `language` | Idioma da interface e do prompt de trabalho (`pt-BR` ou `en-US`; outros usam inglês) |
|
|
50
|
+
| `maxSteps` | Limite de passos por tarefa. Evita loops longos |
|
|
51
|
+
|
|
52
|
+
### Camada 2: instruções (a forma recomendada de guiar o agente)
|
|
53
|
+
|
|
54
|
+
- **`instructions.system`**: regras aplicadas a todas as tarefas. Entra no prompt sem substituir o prompt padrão.
|
|
55
|
+
- **`instructions.getPageInstructions(url)`**: regras que mudam conforme a página (retorna texto ou `null`).
|
|
56
|
+
|
|
57
|
+
Exemplo usado no Aferis: regras de critério de parada, proibição de afirmar verificação visual (o agente lê texto, não imagem) e idioma da memória. Arquivo: `frontend/src/dev/page-agent/instructions.ts`.
|
|
58
|
+
|
|
59
|
+
### Camada 3: privacidade e conteúdo
|
|
60
|
+
|
|
61
|
+
- **`transformPageContent(content)`**: transforma o texto da página antes de ir ao modelo. Use para mascarar CPF, CNPJ, e-mail e telefone.
|
|
62
|
+
|
|
63
|
+
### Camada 4: ferramentas
|
|
64
|
+
|
|
65
|
+
- **`customTools`**: adiciona ferramentas próprias ou substitui as existentes. Definir uma chave como `null` remove a ferramenta correspondente (por exemplo, `ask_user`).
|
|
66
|
+
- Ferramenta de script (`execute_javascript`): ligada por padrão, executa JavaScript gerado pelo agente na página. Para remover, use `experimentalScriptExecutionTool: false`. É experimental e pode ter efeitos colaterais.
|
|
67
|
+
|
|
68
|
+
### Camada 5: controle de ações e extração da página
|
|
69
|
+
|
|
70
|
+
- **`interactiveBlacklist` / `interactiveWhitelist`** (controlador de página): impedem o agente de mexer em certos elementos, ou limitam a uma lista fixa.
|
|
71
|
+
- **`includeAttributes`**: inclui atributos HTML extras na leitura (aceita curingas, como `data-*`).
|
|
72
|
+
- **`keepSemanticTags`**: mantém `nav`, `main`, `footer` etc. na leitura, mesmo sem serem clicáveis.
|
|
73
|
+
- **`experimentalLlmsTxt`**: envia o `/llms.txt` do site como contexto (experimental).
|
|
74
|
+
- **`enableMask`** e `hideMask()`: liga ou desliga o overlay visual durante a execução.
|
|
75
|
+
|
|
76
|
+
### Camada 6: prompt completo (use com cuidado)
|
|
77
|
+
|
|
78
|
+
- **`customSystemPrompt`**: substitui o prompt de sistema inteiro. Perde as regras padrão de fábrica; é experimental.
|
|
79
|
+
|
|
80
|
+
### Camada 7: ciclo de vida (hooks)
|
|
81
|
+
|
|
82
|
+
- `onBeforeTask`, `onAfterTask`, `onBeforeStep`, `onAfterStep`, `onDispose`.
|
|
83
|
+
- São experimentais. **Um erro dentro de um hook faz a tarefa falhar**: capture erros dentro do hook quando não quiser esse efeito.
|
|
84
|
+
|
|
85
|
+
### Camada 8: perguntas ao usuário
|
|
86
|
+
|
|
87
|
+
- **`agent.onAskUser(question, { signal })`**: o agente pede uma resposta. Quando `signal` é abortado (parada ou fechamento), a promessa deve ser rejeitada.
|
|
88
|
+
|
|
89
|
+
### Camada 9: interface
|
|
90
|
+
|
|
91
|
+
- **Painel** (`PanelConfig`): `name` (padrão `NoStop`), `language`, `promptForNextTask`.
|
|
92
|
+
- **Recursos já prontos:** arrastar pelo cabeçalho (posição guardada), recolher, botão do cursor (◎), botão flutuante quando fechado, troca para voz com controle de microfone (pede permissão e libera o microfone ao silenciar), trilho com marcas por tarefa, cartão de prévia com trecho e marcador de fixar, histórico de tarefas anteriores na tela e **Exportar log** (texto compacto por passo).
|
|
93
|
+
- **Logo:** usa o favicon do próprio site; se não houver, usa o símbolo padrão.
|
|
94
|
+
- **Sem painel:** use `PageAgentCore` com a sua própria interface, ouvindo os eventos `statuschange`, `historychange` e `activity`.
|
|
95
|
+
|
|
96
|
+
### Camada 10: rede e provedor
|
|
97
|
+
|
|
98
|
+
- **`customFetch`**: função `fetch` própria, para cabeçalhos, credenciais, proxy.
|
|
99
|
+
- **`disableNamedToolChoice`**: para provedores que não aceitam o formato de escolha de ferramenta por nome.
|
|
100
|
+
|
|
101
|
+
### Camada 11: ambiente sem navegador
|
|
102
|
+
|
|
103
|
+
- **`PageController` próprio**: para rodar com Puppeteer ou Playwright, implementando os métodos que o agente usa (leitura do estado, clicar, digitar, selecionar, rolar).
|
|
104
|
+
|
|
105
|
+
## Eventos úteis
|
|
106
|
+
|
|
107
|
+
| Evento | Quando | Persistência |
|
|
108
|
+
| --------------- | --------------------------------------------------------- | ------------------------------ |
|
|
109
|
+
| `statuschange` | Muda `idle`, `running`, `completed`, `error` ou `stopped` | — |
|
|
110
|
+
| `historychange` | Um passo, observação ou erro entrou no histórico | Persistido em `agent.history` |
|
|
111
|
+
| `activity` | `thinking`, `executing`, `executed`, `retrying`, `error` | Transitório; não vai ao modelo |
|
|
112
|
+
| `dispose` | O agente foi destruído | — |
|
|
113
|
+
|
|
114
|
+
## Segurança
|
|
115
|
+
|
|
116
|
+
- A chave `apiKey` no navegador fica exposta a quem abre a página. Em produção, use um proxy no servidor.
|
|
117
|
+
- Para dados sensíveis, use `transformPageContent` antes de chegar ao modelo.
|
|
118
|
+
- Liste operações de alto risco nas instruções: proíba-as ou exija confirmação do usuário.
|
|
119
|
+
- Pedidos com critério de parada explícito terminam antes e custam menos. Pedidos vagos (como "desce mais") podem percorrer a página inteira.
|
|
120
|
+
|
|
121
|
+
## Testes e build
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm run ci # lint, formatação, tipos, testes e build
|
|
125
|
+
npm test # testes unitários
|
|
126
|
+
npm run build:demo --workspace=@nostop/page # bundle da demo (dist/iife)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Pontos de atenção deste fork
|
|
130
|
+
|
|
131
|
+
- A pasta `website` e a extensão são produtos separados; o agente não depende deles.
|
|
132
|
+
- O prompt padrão está em inglês; a memória do agente pode misturar idiomas se o pedido não for claro. Use `instructions.system` para fixar o idioma da memória.
|
|
133
|
+
- Cada tarefa começa do zero para o modelo: o histórico de tarefas anteriores é só visual no painel.
|
|
134
|
+
- Recursos de voz dependem de um motor de voz que não está incluído neste repositório.
|
|
135
|
+
|
|
136
|
+
## Licença
|
|
137
|
+
|
|
138
|
+
Este fork não inclui arquivo de licença. A licença do projeto original deve ser conferida na origem antes de qualquer distribuição.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AgentConfig } from '@page-agent/core';
|
|
2
|
+
import { PageAgentCore } from '@page-agent/core';
|
|
3
|
+
import { PageControllerConfig } from '@page-agent/page-controller';
|
|
4
|
+
import { Panel } from '@page-agent/ui';
|
|
5
|
+
import { PanelConfig } from '@page-agent/ui';
|
|
6
|
+
|
|
7
|
+
export declare class PageAgent extends PageAgentCore {
|
|
8
|
+
#private;
|
|
9
|
+
panel: Panel;
|
|
10
|
+
constructor(config: PageAgentConfig);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare type PageAgentConfig = AgentConfig & PageControllerConfig & Omit<PanelConfig, 'language'>;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export * from "@page-agent/core";
|
|
17
|
+
|
|
18
|
+
export { }
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
declare global {
|
|
23
|
+
interface Window {
|
|
24
|
+
pageAgent?: PageAgent
|
|
25
|
+
PageAgent: typeof PageAgent
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
(function() { try { if (typeof document != "undefined") { var elementStyle = document.createElement("style"); elementStyle.appendChild(document.createTextNode("._wrapper_rragw_1 {\n position: fixed;\n inset: 0;\n z-index: 2147483641; /* 确保在所有元素之上,除了 panel */\n cursor: wait;\n overflow: hidden;\n\n display: none;\n}\n\n._wrapper_rragw_1._visible_rragw_11 {\n display: block;\n}\n\n._glow_rragw_15 {\n position: absolute;\n inset: 0;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.4s ease;\n box-shadow:\n inset 0 0 0 2px color-mix(in srgb, var(--pa-accent, #fa8d45) 80%, transparent),\n inset 0 0 42px 8px color-mix(in srgb, var(--pa-accent, #fa8d45) 38%, transparent),\n inset 0 0 100px 22px color-mix(in srgb, var(--pa-accent, #fa8d45) 12%, transparent);\n}\n\n._glowVisible_rragw_27 {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n ._glow_rragw_15 {\n transition: none;\n }\n}\n/* AI 光标样式 */\n._cursor_20vi4_2 {\n position: absolute;\n width: var(--cursor-size, 21px);\n height: var(--cursor-size, 25px);\n pointer-events: none;\n z-index: 10000;\n background: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M3 2v20l5.5-5 3.9 8 3-1.5-4-7.8L19 15z' fill='%23f28a46' stroke='%23171715' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/svg%3E\")\n center / contain no-repeat;\n filter: drop-shadow(0 2px 2px #0005);\n}\n\n._cursorFilling_20vi4_13,\n._cursorBorder_20vi4_14 {\n display: none;\n}\n\n._cursorBorder_20vi4_14 {\n position: absolute;\n width: 100%;\n height: 100%;\n background: linear-gradient(45deg, rgb(57, 182, 255), rgb(189, 69, 251));\n mask-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%20fill='none'%3e%3cg%3e%3cpath%20d='M%2015%2042%20L%2015%2036.99%20Q%2015%2031.99%2023.7%2031.99%20L%2028.05%2031.99%20Q%2032.41%2031.99%2032.41%2021.99%20L%2032.41%2017%20Q%2032.41%2012%2041.09%2016.95%20L%2076.31%2037.05%20Q%2085%2042%2076.31%2046.95%20L%2041.09%2067.05%20Q%2032.41%2072%2032.41%2062.01%20L%2032.41%2057.01%20Q%2032.41%2052.01%2023.7%2052.01%20L%2019.35%2052.01%20Q%2015%2052.01%2015%2047.01%20Z'%20fill='none'%20stroke='%23000000'%20stroke-width='6'%20stroke-miterlimit='10'%20style='stroke:%20light-dark(rgb(0,%200,%200),%20rgb(255,%20255,%20255));'/%3e%3c/g%3e%3c/svg%3e\");\n mask-size: 100% 100%;\n mask-repeat: no-repeat;\n\n transform-origin: center;\n transform: rotate(-135deg) scale(1.2);\n margin-left: -10px;\n margin-top: -18px;\n}\n\n._cursorFilling_20vi4_13 {\n position: absolute;\n width: 100%;\n height: 100%;\n background: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20100%20100'%3e%3cdefs%3e%3c/defs%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20style='filter:%20drop-shadow(light-dark(rgba(0,%200,%200,%200.4),%20rgba(237,%20237,%20237,%200.4))%203px%204px%204px);'%3e%3cpath%20d='M%2015%2042%20L%2015%2036.99%20Q%2015%2031.99%2023.7%2031.99%20L%2028.05%2031.99%20Q%2032.41%2031.99%2032.41%2021.99%20L%2032.41%2017%20Q%2032.41%2012%2041.09%2016.95%20L%2076.31%2037.05%20Q%2085%2042%2076.31%2046.95%20L%2041.09%2067.05%20Q%2032.41%2072%2032.41%2062.01%20L%2032.41%2057.01%20Q%2032.41%2052.01%2023.7%2052.01%20L%2019.35%2052.01%20Q%2015%2052.01%2015%2047.01%20Z'%20fill='%23ffffff'%20stroke='none'%20style='fill:%20%23ffffff;'/%3e%3c/g%3e%3c/svg%3e\");\n background-size: 100% 100%;\n background-repeat: no-repeat;\n\n transform-origin: center;\n transform: rotate(-135deg) scale(1.2);\n margin-left: -10px;\n margin-top: -18px;\n}\n\n._cursorRipple_20vi4_47 {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n margin-left: -50%;\n margin-top: -50%;\n\n &::after {\n content: '';\n opacity: 0;\n position: absolute;\n inset: 0;\n border: 4px solid rgba(57, 182, 255, 1);\n border-radius: 50%;\n }\n}\n\n._cursor_20vi4_2._clicking_20vi4_65 ._cursorRipple_20vi4_47::after {\n animation: _cursor-ripple_20vi4_1 300ms ease-out forwards;\n}\n\n@keyframes _cursor-ripple_20vi4_1 {\n 0% {\n transform: scale(0);\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n\n/* Panel button \"Hide agent cursor\": only the drawing disappears; the run continues. */\nhtml[data-pa-cursor-hidden] ._cursor_20vi4_2 {\n display: none !important;\n}")); document.head.appendChild(elementStyle); } } catch (e) { console.error("vite-plugin-css-injected-by-js", e); }})();
|
|
2
|
+
var SimulatorMask_module_default = {
|
|
3
|
+
wrapper: "_wrapper_rragw_1",
|
|
4
|
+
visible: "_visible_rragw_11",
|
|
5
|
+
glow: "_glow_rragw_15",
|
|
6
|
+
glowVisible: "_glowVisible_rragw_27"
|
|
7
|
+
};
|
|
8
|
+
var cursor_module_default = {
|
|
9
|
+
cursor: "_cursor_20vi4_2",
|
|
10
|
+
cursorFilling: "_cursorFilling_20vi4_13",
|
|
11
|
+
cursorBorder: "_cursorBorder_20vi4_14",
|
|
12
|
+
cursorRipple: "_cursorRipple_20vi4_47",
|
|
13
|
+
clicking: "_clicking_20vi4_65",
|
|
14
|
+
"cursor-ripple": "_cursor-ripple_20vi4_1"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../page-controller/src/mask/SimulatorMask.ts
|
|
18
|
+
var SimulatorMask = class extends EventTarget {
|
|
19
|
+
shown = false;
|
|
20
|
+
wrapper = document.createElement("div");
|
|
21
|
+
glow = document.createElement("div");
|
|
22
|
+
#disposed = false;
|
|
23
|
+
#cursor = document.createElement("div");
|
|
24
|
+
#currentCursorX = 0;
|
|
25
|
+
#currentCursorY = 0;
|
|
26
|
+
#targetCursorX = 0;
|
|
27
|
+
#targetCursorY = 0;
|
|
28
|
+
constructor() {
|
|
29
|
+
super();
|
|
30
|
+
this.wrapper.id = "page-agent-runtime_simulator-mask";
|
|
31
|
+
this.wrapper.className = SimulatorMask_module_default.wrapper;
|
|
32
|
+
this.wrapper.setAttribute("data-browser-use-ignore", "true");
|
|
33
|
+
this.wrapper.setAttribute("data-page-agent-ignore", "true");
|
|
34
|
+
this.glow.className = SimulatorMask_module_default.glow;
|
|
35
|
+
this.wrapper.appendChild(this.glow);
|
|
36
|
+
this.wrapper.addEventListener("click", (e) => {
|
|
37
|
+
e.stopPropagation();
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
});
|
|
40
|
+
this.wrapper.addEventListener("mousedown", (e) => {
|
|
41
|
+
e.stopPropagation();
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
});
|
|
44
|
+
this.wrapper.addEventListener("mouseup", (e) => {
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
});
|
|
48
|
+
this.wrapper.addEventListener("mousemove", (e) => {
|
|
49
|
+
e.stopPropagation();
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
});
|
|
52
|
+
this.wrapper.addEventListener("wheel", (e) => {
|
|
53
|
+
e.stopPropagation();
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
});
|
|
56
|
+
this.wrapper.addEventListener("keydown", (e) => {
|
|
57
|
+
e.stopPropagation();
|
|
58
|
+
e.preventDefault();
|
|
59
|
+
});
|
|
60
|
+
this.wrapper.addEventListener("keyup", (e) => {
|
|
61
|
+
e.stopPropagation();
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
});
|
|
64
|
+
this.#createCursor();
|
|
65
|
+
document.body.appendChild(this.wrapper);
|
|
66
|
+
this.#moveCursorToTarget();
|
|
67
|
+
const movePointerToListener = (event) => {
|
|
68
|
+
const { x, y } = event.detail;
|
|
69
|
+
this.setCursorPosition(x, y);
|
|
70
|
+
};
|
|
71
|
+
const clickPointerListener = () => {
|
|
72
|
+
this.triggerClickAnimation();
|
|
73
|
+
};
|
|
74
|
+
const enablePassThroughListener = () => {
|
|
75
|
+
this.wrapper.style.pointerEvents = "none";
|
|
76
|
+
};
|
|
77
|
+
const disablePassThroughListener = () => {
|
|
78
|
+
this.wrapper.style.pointerEvents = "auto";
|
|
79
|
+
};
|
|
80
|
+
window.addEventListener("PageAgent::MovePointerTo", movePointerToListener);
|
|
81
|
+
window.addEventListener("PageAgent::ClickPointer", clickPointerListener);
|
|
82
|
+
window.addEventListener("PageAgent::EnablePassThrough", enablePassThroughListener);
|
|
83
|
+
window.addEventListener("PageAgent::DisablePassThrough", disablePassThroughListener);
|
|
84
|
+
this.addEventListener("dispose", () => {
|
|
85
|
+
window.removeEventListener("PageAgent::MovePointerTo", movePointerToListener);
|
|
86
|
+
window.removeEventListener("PageAgent::ClickPointer", clickPointerListener);
|
|
87
|
+
window.removeEventListener("PageAgent::EnablePassThrough", enablePassThroughListener);
|
|
88
|
+
window.removeEventListener("PageAgent::DisablePassThrough", disablePassThroughListener);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
#createCursor() {
|
|
92
|
+
this.#cursor.className = cursor_module_default.cursor;
|
|
93
|
+
const rippleContainer = document.createElement("div");
|
|
94
|
+
rippleContainer.className = cursor_module_default.cursorRipple;
|
|
95
|
+
this.#cursor.appendChild(rippleContainer);
|
|
96
|
+
const fillingLayer = document.createElement("div");
|
|
97
|
+
fillingLayer.className = cursor_module_default.cursorFilling;
|
|
98
|
+
this.#cursor.appendChild(fillingLayer);
|
|
99
|
+
const borderLayer = document.createElement("div");
|
|
100
|
+
borderLayer.className = cursor_module_default.cursorBorder;
|
|
101
|
+
this.#cursor.appendChild(borderLayer);
|
|
102
|
+
this.wrapper.appendChild(this.#cursor);
|
|
103
|
+
}
|
|
104
|
+
#moveCursorToTarget() {
|
|
105
|
+
if (this.#disposed) return;
|
|
106
|
+
const newX = this.#currentCursorX + (this.#targetCursorX - this.#currentCursorX) * .2;
|
|
107
|
+
const newY = this.#currentCursorY + (this.#targetCursorY - this.#currentCursorY) * .2;
|
|
108
|
+
const xDistance = Math.abs(newX - this.#targetCursorX);
|
|
109
|
+
if (xDistance > 0) {
|
|
110
|
+
if (xDistance < 2) this.#currentCursorX = this.#targetCursorX;
|
|
111
|
+
else this.#currentCursorX = newX;
|
|
112
|
+
this.#cursor.style.left = `${this.#currentCursorX}px`;
|
|
113
|
+
}
|
|
114
|
+
const yDistance = Math.abs(newY - this.#targetCursorY);
|
|
115
|
+
if (yDistance > 0) {
|
|
116
|
+
if (yDistance < 2) this.#currentCursorY = this.#targetCursorY;
|
|
117
|
+
else this.#currentCursorY = newY;
|
|
118
|
+
this.#cursor.style.top = `${this.#currentCursorY}px`;
|
|
119
|
+
}
|
|
120
|
+
requestAnimationFrame(() => this.#moveCursorToTarget());
|
|
121
|
+
}
|
|
122
|
+
setCursorPosition(x, y) {
|
|
123
|
+
if (this.#disposed) return;
|
|
124
|
+
this.#targetCursorX = x;
|
|
125
|
+
this.#targetCursorY = y;
|
|
126
|
+
}
|
|
127
|
+
triggerClickAnimation() {
|
|
128
|
+
if (this.#disposed) return;
|
|
129
|
+
this.#cursor.classList.remove(cursor_module_default.clicking);
|
|
130
|
+
this.#cursor.getBoundingClientRect();
|
|
131
|
+
this.#cursor.classList.add(cursor_module_default.clicking);
|
|
132
|
+
}
|
|
133
|
+
show() {
|
|
134
|
+
if (this.shown || this.#disposed) return;
|
|
135
|
+
this.shown = true;
|
|
136
|
+
this.glow.classList.add(SimulatorMask_module_default.glowVisible);
|
|
137
|
+
this.wrapper.classList.add(SimulatorMask_module_default.visible);
|
|
138
|
+
this.#currentCursorX = window.innerWidth / 2;
|
|
139
|
+
this.#currentCursorY = window.innerHeight / 2;
|
|
140
|
+
this.#targetCursorX = this.#currentCursorX;
|
|
141
|
+
this.#targetCursorY = this.#currentCursorY;
|
|
142
|
+
this.#cursor.style.left = `${this.#currentCursorX}px`;
|
|
143
|
+
this.#cursor.style.top = `${this.#currentCursorY}px`;
|
|
144
|
+
}
|
|
145
|
+
hide() {
|
|
146
|
+
if (!this.shown || this.#disposed) return;
|
|
147
|
+
this.shown = false;
|
|
148
|
+
this.glow.classList.remove(SimulatorMask_module_default.glowVisible);
|
|
149
|
+
this.#cursor.classList.remove(cursor_module_default.clicking);
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
this.wrapper.classList.remove(SimulatorMask_module_default.visible);
|
|
152
|
+
}, 800);
|
|
153
|
+
}
|
|
154
|
+
dispose() {
|
|
155
|
+
this.#disposed = true;
|
|
156
|
+
this.wrapper.remove();
|
|
157
|
+
this.dispatchEvent(new Event("dispose"));
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
//#endregion
|
|
161
|
+
export { SimulatorMask };
|
|
162
|
+
|
|
163
|
+
//# sourceMappingURL=SimulatorMask-Dft-xqkt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimulatorMask-Dft-xqkt.js","names":[],"sources":["../../../page-controller/src/mask/SimulatorMask.module.css","../../../page-controller/src/mask/cursor.module.css","../../../page-controller/src/mask/SimulatorMask.ts"],"sourcesContent":[".wrapper {\n\tposition: fixed;\n\tinset: 0;\n\tz-index: 2147483641; /* 确保在所有元素之上,除了 panel */\n\tcursor: wait;\n\toverflow: hidden;\n\n\tdisplay: none;\n}\n\n.wrapper.visible {\n\tdisplay: block;\n}\n\n.glow {\n\tposition: absolute;\n\tinset: 0;\n\tpointer-events: none;\n\topacity: 0;\n\ttransition: opacity 0.4s ease;\n\tbox-shadow:\n\t\tinset 0 0 0 2px color-mix(in srgb, var(--pa-accent, #fa8d45) 80%, transparent),\n\t\tinset 0 0 42px 8px color-mix(in srgb, var(--pa-accent, #fa8d45) 38%, transparent),\n\t\tinset 0 0 100px 22px color-mix(in srgb, var(--pa-accent, #fa8d45) 12%, transparent);\n}\n\n.glowVisible {\n\topacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t.glow {\n\t\ttransition: none;\n\t}\n}\n","/* AI 光标样式 */\n.cursor {\n\tposition: absolute;\n\twidth: var(--cursor-size, 21px);\n\theight: var(--cursor-size, 25px);\n\tpointer-events: none;\n\tz-index: 10000;\n\tbackground: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M3 2v20l5.5-5 3.9 8 3-1.5-4-7.8L19 15z' fill='%23f28a46' stroke='%23171715' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/svg%3E\")\n\t\tcenter / contain no-repeat;\n\tfilter: drop-shadow(0 2px 2px #0005);\n}\n\n.cursorFilling,\n.cursorBorder {\n\tdisplay: none;\n}\n\n.cursorBorder {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: linear-gradient(45deg, rgb(57, 182, 255), rgb(189, 69, 251));\n\tmask-image: url(./cursor-border.svg);\n\tmask-size: 100% 100%;\n\tmask-repeat: no-repeat;\n\n\ttransform-origin: center;\n\ttransform: rotate(-135deg) scale(1.2);\n\tmargin-left: -10px;\n\tmargin-top: -18px;\n}\n\n.cursorFilling {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: url(./cursor-fill.svg);\n\tbackground-size: 100% 100%;\n\tbackground-repeat: no-repeat;\n\n\ttransform-origin: center;\n\ttransform: rotate(-135deg) scale(1.2);\n\tmargin-left: -10px;\n\tmargin-top: -18px;\n}\n\n.cursorRipple {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n\tmargin-left: -50%;\n\tmargin-top: -50%;\n\n\t&::after {\n\t\tcontent: '';\n\t\topacity: 0;\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder: 4px solid rgba(57, 182, 255, 1);\n\t\tborder-radius: 50%;\n\t}\n}\n\n.cursor.clicking .cursorRipple::after {\n\tanimation: cursor-ripple 300ms ease-out forwards;\n}\n\n@keyframes cursor-ripple {\n\t0% {\n\t\ttransform: scale(0);\n\t\topacity: 1;\n\t}\n\t100% {\n\t\ttransform: scale(2);\n\t\topacity: 0;\n\t}\n}\n\n/* Panel button \"Hide agent cursor\": only the drawing disappears; the run continues. */\n:global(html[data-pa-cursor-hidden]) .cursor {\n\tdisplay: none !important;\n}\n","import styles from './SimulatorMask.module.css'\nimport cursorStyles from './cursor.module.css'\n\nexport class SimulatorMask extends EventTarget {\n\tshown: boolean = false\n\twrapper = document.createElement('div')\n\tglow = document.createElement('div')\n\n\t#disposed = false\n\n\t#cursor = document.createElement('div')\n\n\t#currentCursorX = 0\n\t#currentCursorY = 0\n\n\t#targetCursorX = 0\n\t#targetCursorY = 0\n\n\tconstructor() {\n\t\tsuper()\n\n\t\tthis.wrapper.id = 'page-agent-runtime_simulator-mask'\n\t\tthis.wrapper.className = styles.wrapper\n\t\tthis.wrapper.setAttribute('data-browser-use-ignore', 'true')\n\t\tthis.wrapper.setAttribute('data-page-agent-ignore', 'true')\n\n\t\t// Transparent edge glow marking the page under agent control. No fill; it never blocks pointer events.\n\t\tthis.glow.className = styles.glow\n\t\tthis.wrapper.appendChild(this.glow)\n\n\t\t// Capture all mouse, keyboard, and wheel events\n\t\tthis.wrapper.addEventListener('click', (e) => {\n\t\t\te.stopPropagation()\n\t\t\te.preventDefault()\n\t\t})\n\t\tthis.wrapper.addEventListener('mousedown', (e) => {\n\t\t\te.stopPropagation()\n\t\t\te.preventDefault()\n\t\t})\n\t\tthis.wrapper.addEventListener('mouseup', (e) => {\n\t\t\te.stopPropagation()\n\t\t\te.preventDefault()\n\t\t})\n\t\tthis.wrapper.addEventListener('mousemove', (e) => {\n\t\t\te.stopPropagation()\n\t\t\te.preventDefault()\n\t\t})\n\t\tthis.wrapper.addEventListener('wheel', (e) => {\n\t\t\te.stopPropagation()\n\t\t\te.preventDefault()\n\t\t})\n\t\tthis.wrapper.addEventListener('keydown', (e) => {\n\t\t\te.stopPropagation()\n\t\t\te.preventDefault()\n\t\t})\n\t\tthis.wrapper.addEventListener('keyup', (e) => {\n\t\t\te.stopPropagation()\n\t\t\te.preventDefault()\n\t\t})\n\n\t\t// Create AI cursor\n\t\tthis.#createCursor()\n\t\t// this.show()\n\n\t\tdocument.body.appendChild(this.wrapper)\n\n\t\tthis.#moveCursorToTarget()\n\n\t\t// global events\n\t\t// @note Mask should be isolated from the rest of the code.\n\t\t// Global events are easier to manage and cleanup.\n\n\t\tconst movePointerToListener = (event: Event) => {\n\t\t\tconst { x, y } = (event as CustomEvent).detail\n\t\t\tthis.setCursorPosition(x, y)\n\t\t}\n\t\tconst clickPointerListener = () => {\n\t\t\tthis.triggerClickAnimation()\n\t\t}\n\t\tconst enablePassThroughListener = () => {\n\t\t\tthis.wrapper.style.pointerEvents = 'none'\n\t\t}\n\t\tconst disablePassThroughListener = () => {\n\t\t\tthis.wrapper.style.pointerEvents = 'auto'\n\t\t}\n\n\t\twindow.addEventListener('PageAgent::MovePointerTo', movePointerToListener)\n\t\twindow.addEventListener('PageAgent::ClickPointer', clickPointerListener)\n\t\twindow.addEventListener('PageAgent::EnablePassThrough', enablePassThroughListener)\n\t\twindow.addEventListener('PageAgent::DisablePassThrough', disablePassThroughListener)\n\n\t\tthis.addEventListener('dispose', () => {\n\t\t\twindow.removeEventListener('PageAgent::MovePointerTo', movePointerToListener)\n\t\t\twindow.removeEventListener('PageAgent::ClickPointer', clickPointerListener)\n\t\t\twindow.removeEventListener('PageAgent::EnablePassThrough', enablePassThroughListener)\n\t\t\twindow.removeEventListener('PageAgent::DisablePassThrough', disablePassThroughListener)\n\t\t})\n\t}\n\n\t#createCursor() {\n\t\tthis.#cursor.className = cursorStyles.cursor\n\n\t\t// Create ripple effect container\n\t\tconst rippleContainer = document.createElement('div')\n\t\trippleContainer.className = cursorStyles.cursorRipple\n\t\tthis.#cursor.appendChild(rippleContainer)\n\n\t\t// Create filling layer\n\t\tconst fillingLayer = document.createElement('div')\n\t\tfillingLayer.className = cursorStyles.cursorFilling\n\t\tthis.#cursor.appendChild(fillingLayer)\n\n\t\t// Create border layer\n\t\tconst borderLayer = document.createElement('div')\n\t\tborderLayer.className = cursorStyles.cursorBorder\n\t\tthis.#cursor.appendChild(borderLayer)\n\n\t\tthis.wrapper.appendChild(this.#cursor)\n\t}\n\n\t#moveCursorToTarget() {\n\t\tif (this.#disposed) return\n\n\t\tconst newX = this.#currentCursorX + (this.#targetCursorX - this.#currentCursorX) * 0.2\n\t\tconst newY = this.#currentCursorY + (this.#targetCursorY - this.#currentCursorY) * 0.2\n\n\t\tconst xDistance = Math.abs(newX - this.#targetCursorX)\n\t\tif (xDistance > 0) {\n\t\t\tif (xDistance < 2) {\n\t\t\t\tthis.#currentCursorX = this.#targetCursorX\n\t\t\t} else {\n\t\t\t\tthis.#currentCursorX = newX\n\t\t\t}\n\t\t\tthis.#cursor.style.left = `${this.#currentCursorX}px`\n\t\t}\n\n\t\tconst yDistance = Math.abs(newY - this.#targetCursorY)\n\t\tif (yDistance > 0) {\n\t\t\tif (yDistance < 2) {\n\t\t\t\tthis.#currentCursorY = this.#targetCursorY\n\t\t\t} else {\n\t\t\t\tthis.#currentCursorY = newY\n\t\t\t}\n\t\t\tthis.#cursor.style.top = `${this.#currentCursorY}px`\n\t\t}\n\n\t\trequestAnimationFrame(() => this.#moveCursorToTarget())\n\t}\n\n\tsetCursorPosition(x: number, y: number) {\n\t\tif (this.#disposed) return\n\n\t\tthis.#targetCursorX = x\n\t\tthis.#targetCursorY = y\n\t}\n\n\ttriggerClickAnimation() {\n\t\tif (this.#disposed) return\n\n\t\tthis.#cursor.classList.remove(cursorStyles.clicking)\n\t\t// Force reflow to restart animation\n\t\tthis.#cursor.getBoundingClientRect()\n\t\tthis.#cursor.classList.add(cursorStyles.clicking)\n\t}\n\n\tshow() {\n\t\tif (this.shown || this.#disposed) return\n\n\t\tthis.shown = true\n\t\tthis.glow.classList.add(styles.glowVisible)\n\n\t\tthis.wrapper.classList.add(styles.visible)\n\n\t\t// Initialize cursor position\n\t\tthis.#currentCursorX = window.innerWidth / 2\n\t\tthis.#currentCursorY = window.innerHeight / 2\n\t\tthis.#targetCursorX = this.#currentCursorX\n\t\tthis.#targetCursorY = this.#currentCursorY\n\t\tthis.#cursor.style.left = `${this.#currentCursorX}px`\n\t\tthis.#cursor.style.top = `${this.#currentCursorY}px`\n\t}\n\n\thide() {\n\t\tif (!this.shown || this.#disposed) return\n\n\t\tthis.shown = false\n\t\tthis.glow.classList.remove(styles.glowVisible)\n\n\t\tthis.#cursor.classList.remove(cursorStyles.clicking)\n\n\t\tsetTimeout(() => {\n\t\t\tthis.wrapper.classList.remove(styles.visible)\n\t\t}, 800) // Match the animation duration\n\t}\n\n\tdispose() {\n\t\tthis.#disposed = true\n\t\tthis.wrapper.remove()\n\t\tthis.dispatchEvent(new Event('dispose'))\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AEGA,IAAa,gBAAb,cAAmC,YAAY;CAC9C,QAAiB;CACjB,UAAU,SAAS,cAAc,KAAK;CACtC,OAAO,SAAS,cAAc,KAAK;CAEnC,YAAY;CAEZ,UAAU,SAAS,cAAc,KAAK;CAEtC,kBAAkB;CAClB,kBAAkB;CAElB,iBAAiB;CACjB,iBAAiB;CAEjB,cAAc;EACb,MAAM;EAEN,KAAK,QAAQ,KAAK;EAClB,KAAK,QAAQ,YAAY,6BAAO;EAChC,KAAK,QAAQ,aAAa,2BAA2B,MAAM;EAC3D,KAAK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