Skip to content

Interface: CaptureSource

Defined in: aiui-intent-client/src/transport.ts:325

Pixels: the capture half (tabCapture in MV3, getDisplayMedia elsewhere).

Properties

grantHint?

optional grantHint?: string

Defined in: aiui-intent-client/src/transport.ts:344

How the user mints a grant, as a short label the page shows beside the hollow ring ("⌘B"). The host discovers it live — the MV3 bus reads the command's actual binding from chrome.commands.getAll() — so nothing below the host ever knows (or hard-codes) what the key is. Gated hosts only; meaningless when grantless.


grantless?

optional grantless?: boolean

Defined in: aiui-intent-client/src/transport.ts:336

This host can capture ANY attached tab with no user grant — so there is no grant to mint, and grantedTab simply tracks the tab in view.

That is the CDP tier: Page.captureScreenshot asks nobody. MV3's tabCapture does not — it is invocation-gated per tab, so its grant is a real world fact the activation gesture mints, and the capture acts stay dark until it exists. Same machine, same gates; the host decides whether the fact is free.

Methods

grabRegion()?

optional grabRegion(tab, rect, viewport): Promise<PanelShot>

Defined in: aiui-intent-client/src/transport.ts:354

Crop a REGION of the tab (rect in CSS px; viewport for scale mapping). Optional: hosts without it degrade to the full-frame grabShot.

Parameters

tab

number

rect
h

number

w

number

x

number

y

number

viewport
h

number

w

number

Returns

Promise<PanelShot>


grabShot()

grabShot(tab, opts?): Promise<PanelShot>

Defined in: aiui-intent-client/src/transport.ts:351

Grab one shot off the warm stream. opts.thumbMaxPx caps the inline thumb's longest edge — the video sampler passes it so frequent frames stay lean; omitted, the thumb is FULL resolution for a crisp preview peek. Hosts may ignore opts (the CDP tier's thumb is already the full screenshot).

Parameters

tab

number

opts?
thumbMaxPx?

number

Returns

Promise<PanelShot>


holdStream()

holdStream(tab): Promise<HeldStream>

Defined in: aiui-intent-client/src/transport.ts:346

Warm a stream for a tab; the claim holds it for the turn's life.

Parameters

tab

number

Returns

Promise<HeldStream>