Open-source AI browser agent for Chrome and Firefox (monorepo) ðŸ§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
Carry the several-deliverables flag across a trusted Continue
Claudea3a91dbf0c8c
diff --git a/src/chrome/src/agent/agent.js b/src/chrome/src/agent/agent.jsindex cb29fcd0f..bce2f5347 100644--- a/src/chrome/src/agent/agent.js+++ b/src/chrome/src/agent/agent.js@@ -40093,8 +40093,10 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d&& gateOutcome.deliverables.every(value => typeof value === 'string' && value.length <= 1000)? [...gateOutcome.deliverables]: [],+ // A continuation of the same task still owes the deliverables the first run did.multipleDeliverables: gateOutcome?.multipleDeliverables === true- || (Array.isArray(gateOutcome?.deliverables) && gateOutcome.deliverables.length > 1),+ || (Array.isArray(gateOutcome?.deliverables) && gateOutcome.deliverables.length > 1)+ || (carryScopeMatches && carried?.multipleDeliverables === true),siteWorkflowUrl: String(gateOutcome?.siteWorkflowUrl || ''),messaging,messagingConversationScope,@@ -40671,6 +40673,7 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout dscheduledResume: guard.scheduledResume === true,conditionalSiteWorkflow: guard.conditionalSiteWorkflow,conditionalMutationBlocked: guard.conditionalMutationBlocked === true,+ multipleDeliverables: guard.multipleDeliverables === true || (guard.deliverables || []).length > 1,approvedPlanAnchor: guard.approvedPlanAnchor,approvedPlanText: guard.approvedPlanText,taskKey: guard.taskKey,diff --git a/src/firefox/src/agent/agent.js b/src/firefox/src/agent/agent.jsindex b7cafdd60..5f0307043 100644--- a/src/firefox/src/agent/agent.js+++ b/src/firefox/src/agent/agent.js@@ -36835,8 +36835,10 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d&& gateOutcome.deliverables.every(value => typeof value === 'string' && value.length <= 1000)? [...gateOutcome.deliverables]: [],+ // A continuation of the same task still owes the deliverables the first run did.multipleDeliverables: gateOutcome?.multipleDeliverables === true- || (Array.isArray(gateOutcome?.deliverables) && gateOutcome.deliverables.length > 1),+ || (Array.isArray(gateOutcome?.deliverables) && gateOutcome.deliverables.length > 1)+ || (carryScopeMatches && carried?.multipleDeliverables === true),siteWorkflowUrl: String(gateOutcome?.siteWorkflowUrl || ''),messaging,messagingConversationScope,@@ -37413,6 +37415,7 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout dscheduledResume: guard.scheduledResume === true,conditionalSiteWorkflow: guard.conditionalSiteWorkflow,conditionalMutationBlocked: guard.conditionalMutationBlocked === true,+ multipleDeliverables: guard.multipleDeliverables === true || (guard.deliverables || []).length > 1,approvedPlanAnchor: guard.approvedPlanAnchor,approvedPlanText: guard.approvedPlanText,taskKey: guard.taskKey,diff --git a/test/post-submit-model-recovery.mjs b/test/post-submit-model-recovery.mjsindex 34c6a1b6a..e7c8ab3c5 100644--- a/test/post-submit-model-recovery.mjs+++ b/test/post-submit-model-recovery.mjs@@ -165,6 +165,24 @@ for (const browser of ['chrome', 'firefox']) {assert.deepEqual(f.operations, [], 'one verified submission cannot finish nine');});+ test(`${browser}: Continue keeps the task's several-deliverables flag`, async () => {+ const f = fixture();+ const gate = { requestKind: 'execute', requiresStateChange: true, requiresSubmission: true };+ f.agent._startPlanExecutionGuard(f.tab, 'act', { ...gate, deliverables: [], multipleDeliverables: true }, {});+ const first = f.agent._planExecutionGuards.get(f.tab);+ assert.equal(first.multipleDeliverables, true);+ first.successfulTaskToolCalls = 1;+ first.successfulConsequentialToolCalls = 1;+ f.agent._storeContinuationExecutionEvidence(f.tab);+ assert.equal(f.agent._continuationExecutionEvidence.get(f.tab)?.multipleDeliverables, true, 'the first run stores the flag');+ // The trusted continuation's own plan names no deliverables.+ f.agent._startPlanExecutionGuard(f.tab, 'act', { ...gate, deliverables: [] }, { trustedContinuation: true });+ assert.equal(f.agent._planExecutionGuards.get(f.tab).multipleDeliverables, true, 'the continuation restores it');+ // A run that is not a continuation does not inherit it.+ f.agent._startPlanExecutionGuard(f.tab, 'act', { ...gate, deliverables: [] }, {});+ assert.equal(f.agent._planExecutionGuards.get(f.tab).multipleDeliverables, false);+ });+test(`${browser}: a later self-verifying action does not make the earlier submission the latest step`, async () => {// The submission left verification debt; scheduling a follow-up then// succeeded and proved itself. lastAction still names the submission, but