跳到正文
cccskills
免费在 GitHub 公开

agent-events

Push browser tab and download lifecycle events plus manager-owned background tabs. Read this when an agent needs lifecycle notifications or a temporary tab without polling.

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

查看安装方法

包含的文件(1)

  • SKILL.md2.6 KB

SKILL.md(原文)

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

Agent Events

TREAT THESE AS PUSH NOTIFICATIONS — NEVER POLL Target.getTargets TO DETECT OPENS, CLOSES, POPUPS, OR DOWNLOADS.

One events capability per connection; await ready before trusting baseline discovery or download configuration:

import { createEvents, createAgentTabs } from "omowright";

const events = createEvents(connection, {
  downloadBehavior: "allow",
  downloadPath: "/absolute/path/to/downloads",
});
const tabs = createAgentTabs(connection);
await Promise.all([events.ready, tabs.ready]);

Subscribe before acting

Install the listener or waitForEvent() before the action that produces the event. Waits are bounded; predicates may be async:

const opened = events.waitForEvent("popupOpened", {
  timeout: 30_000,
  predicate: tab => tab.openerTargetId === mainTargetId,
});
await mainPage.evaluate("window.open('https://example.com')");
const popup = await opened;

Six push events: tabOpened, tabClosed, popupOpened, downloadStarted, downloadProgress, downloadFinished. Only page targets produce tab events. A popup produces both tabOpened and popupOpened; about:blank is a valid URL and popup placeholder. Download progress is not coalesced; terminals fire exactly once.

Own temporary tabs through the manager

CREATE TABS ONLY THROUGH createAgentTabs(connection). NEVER SEND Target.createTarget YOURSELF, NEVER CALL Target.activateTarget, NEVER BRING A TAB TO THE FRONT. The manager always requests background creation so automation cannot steal focus, and it owns cleanup.

const tab = await tabs.create("about:blank", {
  viewport: { width: 1440, height: 900 },
});
try {
  await tab.page.goto("https://example.com");
  await tabs.repin(tab);
} finally {
  await tabs.close(tab);
}

CloakBrowser headless defers renderer startup for background targets, so the manager activates immediately before attaching — only for connections launched with a --headless argument. Headed connections attach without activation.

tabs.list() / tabs.get(targetId) expose only manager-created tabs. The manager pins the viewport after attach and after main-frame navigation; child-frame navigation needs no re-pin. tabs.repin forces a fresh pin before a coordinate action.

Cleanup: await tabs.closeAll() or await tabs.dispose() (owns its tabs by default); events.dispose() closes neither the browser nor the agent tabs.

评价

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

评论

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

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

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

0 / 1000 字

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

同一仓库的技能

captcha

免费

Interact with challenge widgets in an authorized automation flow using checkbox clicks, slider drags, text OCR, and image-grid input. Verify completion with an application-specific condition.

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

code-yeongyu/omowright52026年10月16日 更新

chrome

免费

Read this when you need Chrome MV3-shaped APIs — bookmarks, tabs, windows, history, downloads, or top sites — in standalone OmOWright.

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

code-yeongyu/omowright52026年10月16日 更新

Use when a user-driven CloakBrowser profile needs MV3 Chrome writes/events through the native messaging bridge.

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

code-yeongyu/omowright52026年10月16日 更新

network

免费

Read the network instead of the DOM. Snoop JSON API responses, wait for a request instead of sleeping, collect items while scrolling, record a QA flight trace (jsonl, HAR, screenshots), and intercept requests with routes.

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

code-yeongyu/omowright52026年10月16日 更新

omowright

免费

The default code-driven browser path for interactive browsing work: drives any browser from code with token-efficient a11y snapshots (57% smaller via compactSnapshot), ref-based clicks, coordinate control (CUA), viewport pinning, CAPTCHA solving (reCAPTCHA, Turnstile, hCaptcha, slider, OCR), Chrome MV3 APIs (tabs/bookmarks/history/downloads/topSites), network snoop (read API JSON instead of DOM), flight-recorder trace (jsonl + HAR + screenshots), OOPIF-aware snapshots, dialog policy, human handoff for login/OTP, device emulation, request routes, stealth via CloakBrowser as the default owned engine with zero exposed CDP ports, and an attached engine that drives the user's own signed-in browser through BrowserSkill (connectBrowserSkill, bskSnapshot, one-click onboarding via bskOnboard). MUST USE for interactive browser work: scraping, blocked/WAF/JS-rendered pages, logins, the user's logged-in sites and open tabs, extension popups, form filling, screenshots, web QA, CAPTCHAs. The ulw-research browsing lane runs on ultimate-browsing, not this skill.

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

code-yeongyu/omowright52026年10月16日 更新

Coordinate-level browser control for UI that snapshots, refs, and locators cannot target - canvas apps, extension popups, OS-drawn dialogs, custom drag surfaces. Read this when a DOM-targeted action fails twice, when the next decision depends on rendered pixels, or when CUA clicks land on the wrong element.

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

code-yeongyu/omowright52026年10月16日 更新

查看 code-yeongyu 的全部技能

报告此技能的问题