@ait-co/devtools 0.1.129 → 0.1.131
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/{attach-orchestrator-DvrgUIx7.js → attach-orchestrator-BiaYiNOr.js} +31 -13
- package/dist/{attach-orchestrator-DvrgUIx7.js.map → attach-orchestrator-BiaYiNOr.js.map} +1 -1
- package/dist/{attach-orchestrator-RhOdO3DS.js → attach-orchestrator-Cjdhir2U.js} +31 -13
- package/dist/{attach-orchestrator-RhOdO3DS.js.map → attach-orchestrator-Cjdhir2U.js.map} +1 -1
- package/dist/{attach-orchestrator-Bdt5Zdo9.js → attach-orchestrator-ca34r46y.js} +31 -13
- package/dist/{attach-orchestrator-Bdt5Zdo9.js.map → attach-orchestrator-ca34r46y.js.map} +1 -1
- package/dist/{cell-Ba9lCI3B.js → cell-Bi8MAPA8.js} +11 -7
- package/dist/cell-Bi8MAPA8.js.map +1 -0
- package/dist/{cell-DA_lcpDI.js → cell-Cw4fVOl2.js} +11 -7
- package/dist/cell-Cw4fVOl2.js.map +1 -0
- package/dist/{cell-DLRv4iG6.js → cell-rr6gL9AT.js} +11 -7
- package/dist/cell-rr6gL9AT.js.map +1 -0
- package/dist/{debug-server-Bu3pCG9c.js → debug-server-BSbfnFR5.js} +9 -9
- package/dist/debug-server-BSbfnFR5.js.map +1 -0
- package/dist/{debug-server-e1qPe0ZB.js → debug-server-CD4zYBq4.js} +4 -4
- package/dist/{debug-server-e1qPe0ZB.js.map → debug-server-CD4zYBq4.js.map} +1 -1
- package/dist/{debug-server--Y0QZVJS.js → debug-server-qRSRG7YZ.js} +15 -11
- package/dist/debug-server-qRSRG7YZ.js.map +1 -0
- package/dist/in-app/auto.js +15 -0
- package/dist/in-app/auto.js.map +1 -1
- package/dist/in-app/index.d.ts +27 -0
- package/dist/in-app/index.d.ts.map +1 -1
- package/dist/in-app/index.js +15 -0
- package/dist/in-app/index.js.map +1 -1
- package/dist/mcp/cli.js +143 -35
- package/dist/mcp/cli.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/panel/index.js +11 -1
- package/dist/panel/index.js.map +1 -1
- package/dist/{pool-C0pc7T2p.d.ts → pool-BaSCZALv.d.ts} +9 -1
- package/dist/{pool-C0pc7T2p.d.ts.map → pool-BaSCZALv.d.ts.map} +1 -1
- package/dist/{qr-http-server-HANhOFwI.js → qr-http-server-BdNGPRoL.js} +76 -6
- package/dist/qr-http-server-BdNGPRoL.js.map +1 -0
- package/dist/{qr-http-server-CrGohOwC.js → qr-http-server-Bq9zR7-z.js} +76 -6
- package/dist/qr-http-server-Bq9zR7-z.js.map +1 -0
- package/dist/{qr-http-server-DM2R25jP.cjs → qr-http-server-BxoRp2w7.cjs} +76 -6
- package/dist/qr-http-server-BxoRp2w7.cjs.map +1 -0
- package/dist/{qr-http-server-Bt_RAxFn.cjs → qr-http-server-CV6TA9ZN.cjs} +76 -6
- package/dist/qr-http-server-CV6TA9ZN.cjs.map +1 -0
- package/dist/{qr-http-server-s1iW_5VQ.js → qr-http-server-DCbjORFa.js} +76 -6
- package/dist/qr-http-server-DCbjORFa.js.map +1 -0
- package/dist/{qr-http-server-BH0UFeUn.js → qr-http-server-cKbciY5k.js} +76 -6
- package/dist/qr-http-server-cKbciY5k.js.map +1 -0
- package/dist/{relay-factory-Ck3vBonr.js → relay-factory-Cloog1jb.js} +33 -13
- package/dist/relay-factory-Cloog1jb.js.map +1 -0
- package/dist/{relay-worker-Bt0QYKQH.js → relay-worker-CCAHLC4a.js} +9 -5
- package/dist/relay-worker-CCAHLC4a.js.map +1 -0
- package/dist/test-runner/bin.js +45 -19
- package/dist/test-runner/bin.js.map +1 -1
- package/dist/test-runner/config.d.ts +15 -9
- package/dist/test-runner/config.d.ts.map +1 -1
- package/dist/test-runner/config.js +1 -1
- package/dist/test-runner/pool.d.ts +1 -1
- package/dist/test-runner/pool.js +1 -1
- package/dist/test-runner/pool.js.map +1 -1
- package/dist/test-runner/relay-factory.d.ts +22 -8
- package/dist/test-runner/relay-factory.d.ts.map +1 -1
- package/dist/test-runner/relay-factory.js +32 -12
- package/dist/test-runner/relay-factory.js.map +1 -1
- package/dist/test-runner/relay-worker.js +1 -1
- package/dist/{tunnel-DyEV6WwL.cjs → tunnel-B2UCKAc7.cjs} +4 -3
- package/dist/{tunnel-DyEV6WwL.cjs.map → tunnel-B2UCKAc7.cjs.map} +1 -1
- package/dist/{tunnel-BFwOSwT4.js → tunnel-C-rQ34dM.js} +4 -3
- package/dist/{tunnel-BFwOSwT4.js.map → tunnel-C-rQ34dM.js.map} +1 -1
- package/dist/unplugin/index.cjs +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/unplugin/tunnel.cjs +3 -2
- package/dist/unplugin/tunnel.cjs.map +1 -1
- package/dist/unplugin/tunnel.d.cts.map +1 -1
- package/dist/unplugin/tunnel.d.ts.map +1 -1
- package/dist/unplugin/tunnel.js +3 -2
- package/dist/unplugin/tunnel.js.map +1 -1
- package/package.json +1 -1
- package/dist/cell-Ba9lCI3B.js.map +0 -1
- package/dist/cell-DA_lcpDI.js.map +0 -1
- package/dist/cell-DLRv4iG6.js.map +0 -1
- package/dist/debug-server--Y0QZVJS.js.map +0 -1
- package/dist/debug-server-Bu3pCG9c.js.map +0 -1
- package/dist/qr-http-server-BH0UFeUn.js.map +0 -1
- package/dist/qr-http-server-Bt_RAxFn.cjs.map +0 -1
- package/dist/qr-http-server-CrGohOwC.js.map +0 -1
- package/dist/qr-http-server-DM2R25jP.cjs.map +0 -1
- package/dist/qr-http-server-HANhOFwI.js.map +0 -1
- package/dist/qr-http-server-s1iW_5VQ.js.map +0 -1
- package/dist/relay-factory-Ck3vBonr.js.map +0 -1
- package/dist/relay-worker-Bt0QYKQH.js.map +0 -1
|
@@ -1626,34 +1626,52 @@ async function renderAndMaybeWait(deps, prep, waitForAttach, callTimeoutMs, conn
|
|
|
1626
1626
|
}, null, 2)}\n\n${qr}`);
|
|
1627
1627
|
}
|
|
1628
1628
|
/**
|
|
1629
|
-
* Builds a self-contained IIFE DOM expression that renders a
|
|
1630
|
-
* "Debugger Connected" badge on the bottom-left of
|
|
1629
|
+
* Builds a self-contained IIFE DOM expression that renders a LIVE
|
|
1630
|
+
* "Debugger Connected" / "Debugger Disconnected" badge on the bottom-left of
|
|
1631
|
+
* the phone screen (#730).
|
|
1631
1632
|
*
|
|
1632
1633
|
* **Pure function** — returns a JS expression string; does NOT inject it.
|
|
1633
1634
|
* Injection is performed by {@link injectDebugIndicator} in `cell.ts`.
|
|
1634
1635
|
*
|
|
1635
1636
|
* The expression, when evaluated on the page, does the following:
|
|
1636
|
-
* 1.
|
|
1637
|
-
*
|
|
1638
|
-
*
|
|
1639
|
-
*
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1637
|
+
* 1. Idempotent controller — a single `window.__ait_indicator` controller
|
|
1638
|
+
* object is created once (keyed on its presence, not on the DOM node).
|
|
1639
|
+
* Re-injection (e.g. explicit disconnect notice from `close()`) UPDATES
|
|
1640
|
+
* the existing badge's state/label in place — it never duplicates the
|
|
1641
|
+
* `<div>` or stacks a second observer.
|
|
1642
|
+
* 2. Renders a fixed-position `<div id="__ait_debug_indicator">` at the
|
|
1643
|
+
* bottom-left, accounting for safe-area insets. Background/text flip
|
|
1644
|
+
* between the attached (red) and disconnected (grey) visuals.
|
|
1645
|
+
* 3. A `pointerdown` listener dismisses (hides) the badge on tap — dismiss
|
|
1646
|
+
* is NON-terminal: a later state transition un-dismisses it, so a
|
|
1647
|
+
* genuine disconnect after a dismissed tap is still visible.
|
|
1648
|
+
* 4. Observes relay-socket lifecycle WITHOUT opening any new connection:
|
|
1649
|
+
* - Preferred path: if the in-app module (`src/in-app/attach.ts`) has
|
|
1650
|
+
* already installed its relay-WS observer (`window.__ait_relay_ws_observed`),
|
|
1651
|
+
* subscribe to the `ait:relay-ws-state` CustomEvent it broadcasts.
|
|
1652
|
+
* - Fallback path: wrap `window.WebSocket` in a `Proxy` and match dials
|
|
1653
|
+
* by PATHNAME SHAPE only (`/target/`) — never by host/wss value — so a
|
|
1654
|
+
* bare CDP-injected badge (no in-app bundle) still reacts to the
|
|
1655
|
+
* chii target socket's own open/close lifecycle.
|
|
1642
1656
|
*
|
|
1643
1657
|
* The expression intentionally contains NO relay URLs, wss addresses, TOTP
|
|
1644
|
-
* codes, or any other secrets. It is pure DOM UI text only.
|
|
1658
|
+
* codes, or any other secrets. It is pure DOM UI text + enum state only.
|
|
1645
1659
|
*
|
|
1646
1660
|
* SECRET-HANDLING: this expression contains no secrets, relay URLs, wss
|
|
1647
|
-
* addresses, or TOTP codes whatsoever — DOM label text
|
|
1661
|
+
* addresses, or TOTP codes whatsoever — DOM label text + a structural
|
|
1662
|
+
* pathname match (`/target/`) only.
|
|
1648
1663
|
*
|
|
1649
|
-
* @param opts.label -
|
|
1664
|
+
* @param opts.label - Attached-state badge text (default: `'Debugger Connected'`).
|
|
1665
|
+
* @param opts.disconnectedLabel - Disconnected-state badge text (default: `'Debugger Disconnected'`).
|
|
1666
|
+
* @param opts.state - Initial/forced state for THIS injection call (default: `'attached'`).
|
|
1650
1667
|
* @returns A JS expression string suitable for `Runtime.evaluate`.
|
|
1651
1668
|
*/
|
|
1652
1669
|
function buildIndicatorExpression(opts) {
|
|
1653
1670
|
const label = opts?.label ?? "Debugger Connected";
|
|
1654
|
-
|
|
1671
|
+
const disconnectedLabel = opts?.disconnectedLabel ?? "Debugger Disconnected";
|
|
1672
|
+
return `(() => {var W = window;function render(c) {if (c.dismissed) { c.el.style.display = 'none'; return; }c.el.style.display = 'block';var up = c.state !== 'disconnected';c.el.style.background = up ? '#e5484d' : '#8a8f98';c.el.textContent = up ? ${JSON.stringify(label)} : ${JSON.stringify(disconnectedLabel)};}function setState(c, next) { c.state = next; c.dismissed = false; render(c); }var c = W.__ait_indicator;if (!c) {var el = document.createElement('div');el.id = '__ait_debug_indicator';el.style.cssText = ['position:fixed','left:max(12px,calc(env(safe-area-inset-left,0px) + 8px))','bottom:max(12px,calc(env(safe-area-inset-bottom,0px) + 8px))','z-index:2147483647','color:#fff','font:bold 11px/1 system-ui,sans-serif','padding:5px 9px','border-radius:6px','pointer-events:auto','user-select:none',].join(';');document.body.appendChild(el);c = { el: el, state: 'attached', dismissed: false };el.addEventListener('pointerdown', function () { c.dismissed = true; render(c); }, { passive: true });W.__ait_indicator = c;if (W.__ait_relay_ws_observed) {W.addEventListener('ait:relay-ws-state', function (e) {setState(c, e.detail && e.detail.state === 'open' ? 'attached' : 'disconnected');});} else {try {var Native = W.WebSocket;W.WebSocket = new Proxy(Native, {construct: function (t, a) {var ws = Reflect.construct(t, a);try {var u = new URL(String(a[0]), location.href);if (/\\/target\\//.test(u.pathname)) {ws.addEventListener('open', function () { setState(c, 'attached'); });ws.addEventListener('close', function () { setState(c, 'disconnected'); });ws.addEventListener('error', function () { setState(c, 'disconnected'); });}} catch (_) {}return ws;},});} catch (_) {}}}setState(c, ${JSON.stringify(opts?.state ?? "attached")});})()`;
|
|
1655
1673
|
}
|
|
1656
1674
|
//#endregion
|
|
1657
1675
|
export { RELAY_SANDBOX_STALE_PAGE_MS, START_ATTACH_REMINT_THRESHOLD_MS, START_ATTACH_SEGMENT_MS, startTunnelHealthProbe as a, buildIndicatorExpression, extractDeploymentId, startQuickTunnel as i, isSandboxPageFresh, mintAttachUrl, makeTunnelStatus as n, prepareAttach, printAttachBanner as r, renderAndMaybeWait, generateAttachToken as t };
|
|
1658
1676
|
|
|
1659
|
-
//# sourceMappingURL=attach-orchestrator-
|
|
1677
|
+
//# sourceMappingURL=attach-orchestrator-ca34r46y.js.map
|