agentpage 0.0.50 → 0.0.51
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/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -550,6 +550,8 @@ function buildCompactMessages(userMessage, trace, latestSnapshot, currentUrl, hi
|
|
|
550
550
|
});
|
|
551
551
|
const hasErrors = trace.some((e) => hasToolError(e.result));
|
|
552
552
|
const contextParts = [
|
|
553
|
+
`Original Goal: ${userMessage}`,
|
|
554
|
+
"",
|
|
553
555
|
`Remaining: ${activeInstruction}`,
|
|
554
556
|
"",
|
|
555
557
|
"Batch fills per round; clicks end the round — at most ONE click (last). Do NOT call page_info (snapshot is auto-refreshed).",
|
|
@@ -2273,6 +2275,8 @@ function buildSystemPrompt(params = {}) {
|
|
|
2273
2275
|
"You are AutoPilot, an AI agent controlling the current web page via tools.",
|
|
2274
2276
|
"",
|
|
2275
2277
|
"## Core Rules",
|
|
2278
|
+
"- **Original Goal Anchor:** The user's original input is provided as `Original Goal` every round. Your plan and each action must NEVER deviate from it. If the current page shows a 'Create X' button but the user said 'go to X', you must navigate INTO existing X, NOT create a new one.",
|
|
2279
|
+
"- **Goal decomposition:** Distinguish the TARGET entity from the ACTION to perform. 'go to X and do Y' = locate X → enter X → do Y inside X. 'create X' = make a new X. 'edit X' = find existing X → modify it. Never confuse navigating to an entity with creating/deleting/modifying it. If the target entity is not visible, search or filter for it first — do not pick the nearest similarly-named button.",
|
|
2276
2280
|
"- Work from CURRENT snapshot + remaining task. Do not restate.",
|
|
2277
2281
|
"- Task reduction: (remaining, prev actions, this-round) → new remaining.",
|
|
2278
2282
|
"- Use #hashID from snapshot as selector. Do not guess CSS selectors.",
|