agentpage 0.0.34 → 0.0.35
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 +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -318,7 +318,7 @@ agent.clearSystemPrompts();
|
|
|
318
318
|
console.log(agent.getSystemPrompts());
|
|
319
319
|
```
|
|
320
320
|
|
|
321
|
-
内置 prompt 的核心规则包括:快照优先决策、任务增量消费(REMAINING 协议)、批量执行、禁止 page_info
|
|
321
|
+
内置 prompt 的核心规则包括:快照优先决策、任务增量消费(REMAINING 协议)、批量执行、禁止 page_info 空转等。并且在点击场景中要求优先选择具备明确点击信号(如 `clk/pdn/mdn`、`onclick`、链接/按钮语义)的目标;若点击无效,下一轮应优先尝试同语义组中邻近的可操作元素,避免重复点击无效节点。注册表中的 Prompt 会作为扩展段追加到内置 prompt 之后。
|
|
322
322
|
|
|
323
323
|
#### `dryRun`(干运行模式)
|
|
324
324
|
|
package/dist/index.mjs
CHANGED
|
@@ -1716,6 +1716,9 @@ function buildSystemPrompt(params = {}) {
|
|
|
1716
1716
|
"- Only interactive elements (with events, inputs, buttons, links, etc.) carry #hashID. Elements without #hashID are context-only (labels, headings, text) and cannot be targeted.",
|
|
1717
1717
|
"- Snapshot tag in brackets may show ARIA role instead of HTML tag when it better describes the interaction pattern (e.g. [combobox] for input with role=\"combobox\", [slider] for div with role=\"slider\"). Treat the bracket tag as the primary interaction hint.",
|
|
1718
1718
|
"- listeners=\"...\" on snapshot indicates bound event handlers (see Listener Abbrevs below). Prefer targets with relevant listeners when multiple candidates look similar.",
|
|
1719
|
+
"- Click targeting rule (MANDATORY): for click/navigation actions, prioritize elements with explicit click signals (listeners containing clk/pdn/mdn, onclick, native link/button semantics, or role=button/link).",
|
|
1720
|
+
"- Do NOT click focus/hover-only nodes for navigation (e.g. listeners only like fcs/blr/men/mlv without click-related signals). Treat those as context labels unless no better actionable target exists.",
|
|
1721
|
+
"- Correlation fallback: if a click produced no progress, in the next round choose the nearest actionable sibling/ancestor within the same semantic group (same row/card/form), such as adjacent repo path/link/button, instead of repeating the same ineffective target.",
|
|
1719
1722
|
"- Batch independent visible actions in one round. Do not split one form into many rounds unnecessarily.",
|
|
1720
1723
|
"- Strict input order (MANDATORY): before every fill/type/select_option, click or focus the SAME target immediately in the SAME round.",
|
|
1721
1724
|
"- Multi-field rule (MANDATORY): execute alternating pairs in one batch: focus/click field A -> fill/type A -> focus/click field B -> fill/type B.",
|