跳到正文
cccskills
免费在 GitHub 公开

ego-jev

Jev (TypeSafe System One) inner loop for ego-browser — one ~0.4 s typed decision per DOM step instead of an LLM turn. Use for multi-step clicking through a semantic page: fill known values into a form, set filters, open a row/card/menu by name, reach a page via nav or site search. Escalates login, payment, free text and content reading back to you; canvas/icon targets only with opt-in screenshot mode.

中文简介正在准备中。当前显示原文说明。

集成工具Vercel
查看安装方法

包含的文件(11)

  • SKILL.md10.5 KB
  • reference.md16.7 KB
  • scripts/backend.test.ts17.7 KB
  • scripts/debug-report.ts8.2 KB
  • scripts/fixture-800x600.png2.7 KB
  • scripts/jev-loop.test.ts35.4 KB
  • scripts/jev-loop.ts65.2 KB
  • scripts/record.test.ts17.1 KB
  • scripts/record.ts10.9 KB
  • scripts/selftest.mjs6.6 KB
  • scripts/types.ts1.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

ego-jev

ego executes; Jev decides. Each step: snapshot → number the interactive elements (a11y refs @N + DOM-discovered clickables dN: div cards, cursor:pointer, iframe/shadow content) → one System One call picks the operation and its target together → ego clicks/fills/selects. Jev never writes text and never sees a screenshot by default; screenshot: true opts into the dreamer-ready image path below.

Read ego-browser first for TaskSpace and Page rules; this skill only replaces the per-step "which element" judgment.

Requires: ego lite installed and onboarded (provides the ego-browser command, whose Node 24 runtime loads the .ts scripts directly — no build step), the ego-browser skill, and TYPESAFE_API_KEY or AI_GATEWAY_API_KEY resolvable in that runtime (see backend and keys).

Task boundary

For ordinary tasks, use only the user's goal, their URL or existing Page, and provided values. If the goal or starting target is missing from the task context, ask the minimum clarification needed before opening a Page. Fill values come from the user; a missing value escalates for clarification.

Author examples, README/demo content and scripts/selftest.mjs are examples or maintenance tests. Run them only when the user explicitly requests a test or demo; never use them as the default entry or an automatic fallback for missing credentials. A mock decision does not verify the real Jev service.

Run

  1. Preflight inside ego-browser nodejs, before creating a TaskSpace or navigating a Page (SKILL_DIR is the absolute directory containing this SKILL.md). Use the backend options intended for this task:

    const { preflightJev } = await import(
      `file://${SKILL_DIR}/scripts/jev-loop.ts`
    );
    const backendOptions = {}; // use the task's supplied overrides, if any
    const ready = await preflightJev(backendOptions);
    if (ready.ok) {
      console.log({ ...ready, next: "continue_jev" });
    } else {
      console.log({ ...ready, next: "pause_jev" });
    }
    

    Treat ready.ok: false as a result for the agent to handle: pause the Jev branch and ask the user once: "Jev 未找到 TypeSafe / Vercel key。你愿意在 本机安全配置,或说明已有配置的位置吗?也可以不用 Jev,继续普通 ego-browser 路径。" Ask about configuration or the next step; never request or print a plaintext key or automatically change real configuration. While awaiting the answer, create no TaskSpace or Page, navigate no Page, make no model request and do not poll or retry preflight. If the user has already explicitly refused configuration or selected the fallback, reuse that choice without asking again. For fallback, continue the same user goal, URL/Page and supplied values with plain ego-browser; preserve any existing TaskSpace and its ownership. Do not switch to an author test page.

    When the user says a key already exists or is now configured, use its location through the supported lookup without exposing the value. Recreate any cached makeAsk instance or use fresh backend options, then rerun preflight in the actual ego-browser nodejs runtime, not just the shell. Continue to step 2 only after ready.ok: true; otherwise keep Jev paused and report safe guidance without repeating the question or busy waiting. Preflight checks resolvability, not key validity, provider health or real Jev availability.

  2. Ask the user once, before the first loop of the task: "是否开启网络请求 / cookie 记录(record)?" Recording is off by default. On yes, pass record: true (request metadata + cookie metadata only) and add headers / bodies / cookieValues / dir only when the user asks for them. Skip the question when the user already said yes or no, or already named the options for this run without record (record stays off); reuse the answer for later loops in the same task. Details, redaction and limits: reference.md.

  3. Create or resume the task's one TaskSpace following ego-browser; reuse the user's starting Page or navigate to their URL (goto with waitUntil: "domcontentloaded" on slow sites). Preserve user ownership; stop when the user takes control. A backend failure is not a reason to create another TaskSpace.

  4. Bind userGoal, providedValues and verifyUserGoal from the actual task; call the loop with that goal verbatim and the same backend options used for preflight:

    const { runJevLoop } = await import(
      `file://${SKILL_DIR}/scripts/jev-loop.ts`
    );
    const result = await runJevLoop(page, {
      ...backendOptions,
      goal: userGoal,
      values: providedValues,
      verify: verifyUserGoal,
      // record: true,  // only after the user opted in (step 2)
    });
    
    • values: Jev picks which key goes in which field by hint; a fill with no matching value escalates instead of inventing data. Site search needs a value too.
    • screenshot: opt-in multimodal (Jev 1.14+, direct TypeSafe backend only — the Vercel gateway does not pass images). Each step sends the viewport PNG in state and asks a speculative Box locate question; when Jev picks the synthetic unlabeled click target (canvas cells, map pins, icon glyphs, image regions no ref/dN names), ego clicks the returned point with page.mouse; when that point lands inside a candidate's bounds, the click upgrades to the candidate's DOM locator. An explicit click id moves only to a same-named element under the box. A shaky click id (below minTargetConfidence) with a confident box follows the box instead of escalating. Images under 280×280 escalate.
    • debugDir: absolute path. Writes report.html, a live, auto-refreshing view of each step: the screenshot with candidate, target and locate-box overlays next to every answer's probabilities. Give the user result.report when they want to see why Jev chose what it did.
    • deadlineMs (120 s) / pageTimeoutMs (15 s): the run and each page op are time-bounded; a timeout escalates with a timeout: or … timed out reason instead of hanging.
    • verify: test URL, dialog text or a DOM fact — the thing the goal is about. A verify on a heading passes early (link clicked, navigation not yet committed) and a verify blind to modals makes Jev loop past a done state.
  5. Branch on result.status — configuration failures return immediately; handle missing credentials with step 1's one-time question. Other backend failures may retry once and appear in timings:

    statusmeaningyou
    doneJev claims visible evidence; verified true when your verify passedread the page and report
    escalatemissing credentials, login/2FA, payment, upload, delete words, free text, low confidence, target missing, two action errors, deadline/page timeoutresult.reason names it; for missing credentials use step 1, handOff for login, or continue the user's goal with plain ego calls
    blockedJev reports stuck: dead end, nothing offered advances the goalreason about the page yourself (e.g. the docs have no such page)
    max_stepsloop bound hitinspect result.trace

    result.trace is per-step {op, ref, name, opConfidence, targetConfidence}; result.snapshot is the last a11y tree. result.timings records where the time went: timings.steps per phase (snapshotMs / domMs / askMs / actMs / verifyMs / stepMs) and timings.llmCalls, one entry per System One request ({seq, step, kind, ms, ok, model, usage} — retries and option_retry included; timings.model names the serving model version, e.g. jev-1.13.0). timings.planner names the driving agent — env detection only finds the harness, so pass planner: "<harness>/<model>" (your own model id) for full attribution. Show the user the latency table once the loop exits:

    const { formatTimings } = await import(
      `file://${SKILL_DIR}/scripts/jev-loop.ts`
    );
    console.log(formatTimings(result));
    

    If the default backend cannot resolve credentials, runJevLoop also stops before page/recording calls: escalate, steps: 0, empty timing step and LLM call arrays. That configuration check is not a model request.

With record on, result.record holds network (one entry per XHR / fetch / document request, tagged with the step whose action caused it) and cookies (before / after / diff); print it with formatRecord(result) (same module) or query the arrays directly. Recorded endpoints can be replayed with page.fetch(), which carries the page's cookies.

Done when the page state your goal describes is confirmed by verify or your own page.evaluate — Jev's done is a claim, the check is yours. Complete TaskSpace cleanup exactly once under ego-browser's user ownership and finish({ keep }) rules; an error or user handoff is not successful completion.

Gotchas

  • A click on a target=_blank link opens a new Page; the loop stays on the old one and escalates on the unchanged page. Continue on the new label.
  • Collapsed menus and teleported dropdown options are not in the DOM until opened: click/hover the parent first, then enter the loop. select on a dN target escalates by design.
  • A search box's autocomplete dropdown can cover its submit button: the click fails twice and escalates. Jev has no "press Enter"; finish with page.press(<field>, "Enter") yourself.
  • Jev will click "Continue with Google" on a login page; keep login pages out of the loop or handOff first.
  • Semantic filtering ("not in the list → switch to All") is planner work; a blocked there is correct, not a bug.

Reference

  • Options, thresholds, backend/keys, latency numbers: reference.md.
  • Explicit test/demo requests only: maintenance tests describes the mock-decider selftest and its real browser/external-site dependencies.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

报告此技能的问题