Files
e2e/docs/package.json
T
Gustavo CostaandOskar Kwaśniewski d1f2089081 feat(decision): act and assert through an AI SDK decision model (#775)
* feat(decision): add Clef and Jev executors on the System One choice API

* feat(decision): default Clef transport to clef-flash

* feat(decision): generalize to decision models, address review

* fix(decision): reject non-string decision choices

* fix(decision): skip empty select labels and blank destinations

An empty option label or whitespace-only destination offered as a choice fails at dispatch with INVALID_ARGUMENT and aborts the step instead of letting the model re-aim. Omit them at enumeration. Also qualify the uncertain-action docs: blocking stops the selected action, while earlier confident actions in the step have already run.

* feat(decision): add opt-in vision for Clef, Jev stays text-only

The executor stays text-only by default. With vision true and a transport that declares it, masked viewport pixels ride along as System One images data URLs. Clef declares vision; Jev never receives pixels. Withheld or tainted viewports fall back to semantic text.

* docs(decision): qualify vision cost to calls carrying pixels

* fix(decision): untainted pixel fixtures and honest skill pixels line

The test helper takes a tainted flag so the image-send tests use the only state the runner returns pixels in; tainted captures stay withheld observations. The skill no longer claims pixels are unavailable: screenshots may inform node choices with vision true, without adding point actions.

* bench(testbed): luna vs clef-flash harness and first numbers

Same todo flow under two configs: default agent on gpt-6-luna via OpenCodeX and decisionExecutor on clef-flash. Luna side passed in 23s with 6 model calls; clef-flash pending credentials. Includes the probe script, the docs section, and the flow screenshot.

* docs(decision): fill clef-flash benchmark row

Two no-cache runs both blocked uncertain on the first action (a25 at p=0.619, conf=0.387 against the default 0.9 gates), answering in about a second with 1,543 input tokens.

* docs(decision): benchmark aggregates over 5 runs per side

Luna completed 5/5 flows at ~14s and ~25k input tokens per run; clef-flash blocked uncertain 5/5 at ~1s and ~1.5k tokens per run.

* bench(testbed): parametrized flow, gate sweep, wire-shape finding

Params fix the missing type choices; gates 0.6/0.5 and 0.51/0.3 still block. Direct experiment shows hierarchical structured questions take clef-flash from 0.57 to 0.89 confidence on the same screen.

* feat(decision): hierarchical operation-then-target on structured transports

Structured transports (Clef, Jev) now decide the operation first and the target within it, with object instructions and element records. Flat endpoints keep the single string choice. Live benchmark: first operation 0.909/0.802, first target 0.940/0.775, up from 0.747/0.558 flat.

* docs(decision): compare luna vs clef-flash vs clef with measured cost

* feat(decision): run decisions through AI SDK evaluate, gates opt-in

decisionExecutor now accepts any AI SDK evaluation model that answers
choice questions, such as typeSafeAi.evaluationModel('jev-latest'), and
decides through experimental_evaluate (one choice question per decision,
no retries, so the call budget stays exact). ai is an optional peer that
loads only on that path. evaluationModel() exposes clef(), jev(), and
systemOne() transports to experimental_evaluate, which covers Clef until
it has an AI SDK provider.

The official TypeSafe provider rounds probabilities to two places, so a
long distribution can sum to 0.99: validation now allows half a unit per
rounded option, the AI SDK rule, and jev() declares the two places.

Probability and confidence gates are off by default and stay
configurable. Measuring clef-flash without them surfaced three executor
bugs, each fixed here:
- a lone target is dispatched without a one-option question, which the
  choice API rejects with HTTP 422;
- acting decisions receive the step's action history, and the repeat
  guard counts the same action on the same screen across the whole step,
  so an A-B oscillation blocks instead of burning the call budget;
- the operation and target questions state that typed text is not saved
  until it is submitted.
The structured path also checks the call budget before the target
request (review feedback).

Testbed todo flow, 5 no-cache runs each: clef-flash 5/5 (9.3s mean, 12
calls), clef 5/5 (11.5s, 12 calls), luna unchanged at 5/5 (14.9s).

* bench(testbed): Laya through systemOne

Laya serves the System One API and accepts structured values, so it runs
through systemOne({ structured: true }) unchanged. On the todo flow its
first operation question chose unsupported at 0.29 / 0.10 on four runs,
answered by the multilingual checkpoint its router picked for an English
prompt; the fifth run and further probes hit insufficient_credits.

* fix(decision): address review on rounding, history, and evaluation ids

- validateDecision accepts a rounded distribution only when 1 lies between
  the sums of each value's rounding interval, clipped to [0, 1]; a summed
  per-option tolerance exceeded 1 with many options and admitted two
  options at probability 1.
- Decisions send the 20 most recent history entries, each clipped to 240
  characters, so long steps and large params stay within request limits.
- evaluationModel() builds its answer, confidence, and criteria maps with
  null prototypes, so an id such as __proto__ stays an own entry.
- @ai-sdk/provider moves to dependencies: the public declarations import
  its evaluation types. ai stays an optional peer.

* bench(testbed): pin Laya's English checkpoint

Laya's router sent the full English prompt to its multilingual checkpoint.
The API accepts model 'english' to pin the English one (its routing
metadata reports the explicit model), so the bench config sends it.

* docs(decision): benchmark Laya locally on M1, both checkpoints 0/5

* docs(decision): reconcile laya narrative with run evidence, money not tokens

* feat(decision): caller-overridable transport flags on clef() and jev()

* feat(decision): AI SDK evaluate executor with element table and text model

* fix(decision): empty-tree check and provider pin

* fix(decision): address review on secrets, options, errors, and docs

Answers the cubic threads on the evaluate-only executor: terminal checks reject an incomplete screen instead of judging it, secret markers are stripped at any depth, hidden/disabled options are never offered, select options share the 255-choice cap, select criteria name the option, out-of-range probabilities fail, text-model errors mirror the decision mapping, and the README/docs describe the evaluate-only API.

* fix(decision): count dropped select options and fix README

Counts enabled options inside rows dropped past the element cap as omitted, adds the E2EConfig type import to the README example, and qualifies when type is offered.

* fix(decision): settle terminal claims by the check and match codebase style

The second rejected done/failed claim now ends by the check verdict (fails -> ACTION_FAILED, anything else -> blocked), and the completion check honors the gates. The decision state carries the last 10 actions, check targets show their checked state, checked radios are never toggled, and options dropped by the per-question cap stay out of omitted. The docs example opens /todos in test code since navigate is not offered. Single quotes, template literals, and split long lines across the package.

* fix(decision): show filled fields to verdicts and pin the history window

Verdict views (assert and the completion check) build the element table with typing enabled, so a field the step filled keeps its row and value even when the step itself cannot type. The history test now asserts the window holds the newest ten actions.

* fix(decision): let completion checks see results and name the text key

Page text keeps a named node's text when it differs from the name, as formatNode does, so a status named Greeting that says Welcome back, admin! reaches the verdict. The completion check now asks whether the task is complete and sees the non-secret params and the actions with their typed values; rejected claims stay out. The text prompt names the single text key, asks for no code fence, and prefixes the request so JSON-object response modes accept it.

* fix(decision): keep secret handles out of replayed history and mark check inputs as data

Replayed summaries name a filled secret handle; seeding the history now replaces declared secret names with <secret>, so names reach the model only as secret question criteria. The completion check treats action descriptions, typed values, and params as data, and the guide says the check sees only non-secret values.

* fix(decision): redact only the handle in replayed secret-fill summaries

Matching the declared secret name anywhere in a replayed summary also erased labels and values equal to it, and missed handles the runner cut at 40 characters. Only the quoted handle after fill secret at the start of the summary becomes <secret> now.

* docs(decision): describe the one-request fan-out in the guide intro

* fix(decision): count a scroll that changes what is in view as progress

The fingerprint behind the stall guard hashed node content but not position, so a scroll that only moved the viewport read as page unchanged and the third one blocked the step. It now also hashes whether each node meets the viewport (membership, not coordinates), so a scroll that brings other nodes into view resets the count while one that moves nothing, as at the page bottom, still trips the guard.

* chore: prune @pnpm/exe from the lockfile after merging main

* fix(decision): match the supported Node range in engines

---------

Co-authored-by: Oskar Kwaśniewski <oskar@okwasniewski.com>
2026-10-04 10:08:55 +02:00

29 lines
830 B
JSON

{
"name": "@e2e-dev/docs",
"private": true,
"description": "The e2e documentation site, built with Mintlify",
"type": "module",
"scripts": {
"dev": "mint dev",
"check": "node ../scripts/check-docs-examples.ts && node ../scripts/check-docs-package-managers.ts && mint validate && mint broken-links",
"typecheck": "tsc --noEmit --project examples/tsconfig.json"
},
"devDependencies": {
"@ai-sdk/typesafe-ai": "3.0.12",
"@e2e-dev/decision": "workspace:*",
"@e2e-dev/mobile": "workspace:*",
"@e2e-dev/web": "workspace:*",
"@openrouter/ai-sdk-provider": "3.1.0",
"@types/node": "26.6.2",
"agent-device": "0.21.20",
"ai": "7.0.107",
"e2e": "workspace:*",
"mint": "4.2.909",
"typescript": "7.0.2",
"zod": "4.6.1"
},
"engines": {
"node": ">=22.12.0"
}
}