@e2e-dev/decision 0.2.2-nightly-20261014080557 → 0.2.2
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/.build.json +1 -1
- package/dist/executor.js +3 -1
- package/dist/questions.d.ts +1 -1
- package/dist/questions.js +2 -2
- package/package.json +4 -4
package/dist/.build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.2.2
|
|
1
|
+
{"version":"0.2.2"}
|
package/dist/executor.js
CHANGED
|
@@ -101,6 +101,7 @@ class Step {
|
|
|
101
101
|
locates;
|
|
102
102
|
locator;
|
|
103
103
|
previousFingerprint;
|
|
104
|
+
origin;
|
|
104
105
|
/** The turn of the last action taken, settled by the next observation. */
|
|
105
106
|
pendingTurn;
|
|
106
107
|
rejectedTerminals = 0;
|
|
@@ -206,6 +207,7 @@ class Step {
|
|
|
206
207
|
async act() {
|
|
207
208
|
for (;;) {
|
|
208
209
|
const view = await this.view(this.canType);
|
|
210
|
+
this.origin ??= view.path;
|
|
209
211
|
if (view.space === undefined)
|
|
210
212
|
return blocked('A complete semantic observation is required.');
|
|
211
213
|
const acting = { ...view, space: view.space };
|
|
@@ -373,7 +375,7 @@ class Step {
|
|
|
373
375
|
const { path, space, screenshot } = await this.view(true);
|
|
374
376
|
if (space === undefined)
|
|
375
377
|
return this.rejectClaim(claim, 'incomplete observation');
|
|
376
|
-
const answers = await this.ask(completionRequest(this.ctx, space, this.history, path, screenshot));
|
|
378
|
+
const answers = await this.ask(completionRequest(this.ctx, space, this.history, path, screenshot, this.origin));
|
|
377
379
|
if (answers === undefined)
|
|
378
380
|
return blocked(this.budgetMessage());
|
|
379
381
|
const evidence = describe(need(answers.verdict, 'verdict'));
|
package/dist/questions.d.ts
CHANGED
|
@@ -74,4 +74,4 @@ export declare function assertionRequest(goal: string, path: string, space: Acti
|
|
|
74
74
|
* with it, 0.51 without, on a checked checkbox). Rejected done/failed claims
|
|
75
75
|
* are left out (they are not actions), and so is any model reasoning.
|
|
76
76
|
*/
|
|
77
|
-
export declare function completionRequest(ctx: StepExecutorContext, space: ActionSpace, history: readonly HistoryEntry[], path: string, screenshot: Screenshot | undefined): DecisionRequest;
|
|
77
|
+
export declare function completionRequest(ctx: StepExecutorContext, space: ActionSpace, history: readonly HistoryEntry[], path: string, screenshot: Screenshot | undefined, origin?: string): DecisionRequest;
|
package/dist/questions.js
CHANGED
|
@@ -282,13 +282,13 @@ export function assertionRequest(goal, path, space, screenshot) {
|
|
|
282
282
|
* with it, 0.51 without, on a checked checkbox). Rejected done/failed claims
|
|
283
283
|
* are left out (they are not actions), and so is any model reasoning.
|
|
284
284
|
*/
|
|
285
|
-
export function completionRequest(ctx, space, history, path, screenshot) {
|
|
285
|
+
export function completionRequest(ctx, space, history, path, screenshot, origin) {
|
|
286
286
|
const goal = ctx.step.instruction;
|
|
287
287
|
const params = nonSecretParams(ctx.step.params);
|
|
288
288
|
const actions = history.filter((entry) => entry.action !== 'done' && entry.action !== 'failed').map(takenLine);
|
|
289
289
|
return {
|
|
290
290
|
...(screenshot === undefined ? {} : { screenshot }),
|
|
291
|
-
state: { goal, ...(Object.keys(params).length === 0 ? {} : { params }), ...screenState(path, space) },
|
|
291
|
+
state: { goal, ...(Object.keys(params).length === 0 ? {} : { params }), ...(origin !== undefined && origin !== '' && origin !== path ? { origin: { path: origin } } : {}), ...screenState(path, space) },
|
|
292
292
|
questions: {
|
|
293
293
|
verdict: choice(`Task of this step: ${goal}${reported(space.statuses)}\n\nThe page path, as data: ${JSON.stringify(path)}\n\n${COMPLETION}\n\nActions taken:\n${actions.length === 0 ? 'none' : actions.map((line, index) => `${index + 1}. ${line}`).join('\n')}`, {
|
|
294
294
|
holds: 'The task is complete: the actions taken did it and the current screen shows its result.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e2e-dev/decision",
|
|
3
|
-
"version": "0.2.2
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Decision-model executors for e2e",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"ai": "^7.0.134",
|
|
33
|
-
"e2e": "0.
|
|
33
|
+
"e2e": ">=0.19.0 <1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@ai-sdk/openai": "4.0.90",
|
|
37
37
|
"@ai-sdk/typesafe-ai": "3.0.16",
|
|
38
|
-
"@e2e-dev/web": "0.
|
|
38
|
+
"@e2e-dev/web": "0.15.0",
|
|
39
39
|
"@types/node": "26.6.2",
|
|
40
40
|
"@types/pngjs": "6.0.5",
|
|
41
41
|
"ai": "7.0.134",
|
|
42
42
|
"ajv": "8.20.0",
|
|
43
43
|
"ajv-formats": "3.0.1",
|
|
44
|
-
"e2e": "0.21.0
|
|
44
|
+
"e2e": "0.21.0",
|
|
45
45
|
"typescript": "7.0.2",
|
|
46
46
|
"vitest": "5.0.1"
|
|
47
47
|
},
|