@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
|
@@ -1716,34 +1716,52 @@ async function renderAndMaybeWait(deps, prep, waitForAttach, callTimeoutMs, conn
|
|
|
1716
1716
|
}, null, 2)}\n\n${qr}`);
|
|
1717
1717
|
}
|
|
1718
1718
|
/**
|
|
1719
|
-
* Builds a self-contained IIFE DOM expression that renders a
|
|
1720
|
-
* "Debugger Connected" badge on the bottom-left of
|
|
1719
|
+
* Builds a self-contained IIFE DOM expression that renders a LIVE
|
|
1720
|
+
* "Debugger Connected" / "Debugger Disconnected" badge on the bottom-left of
|
|
1721
|
+
* the phone screen (#730).
|
|
1721
1722
|
*
|
|
1722
1723
|
* **Pure function** — returns a JS expression string; does NOT inject it.
|
|
1723
1724
|
* Injection is performed by {@link injectDebugIndicator} in `cell.ts`.
|
|
1724
1725
|
*
|
|
1725
1726
|
* The expression, when evaluated on the page, does the following:
|
|
1726
|
-
* 1.
|
|
1727
|
-
*
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1730
|
-
*
|
|
1731
|
-
*
|
|
1727
|
+
* 1. Idempotent controller — a single `window.__ait_indicator` controller
|
|
1728
|
+
* object is created once (keyed on its presence, not on the DOM node).
|
|
1729
|
+
* Re-injection (e.g. explicit disconnect notice from `close()`) UPDATES
|
|
1730
|
+
* the existing badge's state/label in place — it never duplicates the
|
|
1731
|
+
* `<div>` or stacks a second observer.
|
|
1732
|
+
* 2. Renders a fixed-position `<div id="__ait_debug_indicator">` at the
|
|
1733
|
+
* bottom-left, accounting for safe-area insets. Background/text flip
|
|
1734
|
+
* between the attached (red) and disconnected (grey) visuals.
|
|
1735
|
+
* 3. A `pointerdown` listener dismisses (hides) the badge on tap — dismiss
|
|
1736
|
+
* is NON-terminal: a later state transition un-dismisses it, so a
|
|
1737
|
+
* genuine disconnect after a dismissed tap is still visible.
|
|
1738
|
+
* 4. Observes relay-socket lifecycle WITHOUT opening any new connection:
|
|
1739
|
+
* - Preferred path: if the in-app module (`src/in-app/attach.ts`) has
|
|
1740
|
+
* already installed its relay-WS observer (`window.__ait_relay_ws_observed`),
|
|
1741
|
+
* subscribe to the `ait:relay-ws-state` CustomEvent it broadcasts.
|
|
1742
|
+
* - Fallback path: wrap `window.WebSocket` in a `Proxy` and match dials
|
|
1743
|
+
* by PATHNAME SHAPE only (`/target/`) — never by host/wss value — so a
|
|
1744
|
+
* bare CDP-injected badge (no in-app bundle) still reacts to the
|
|
1745
|
+
* chii target socket's own open/close lifecycle.
|
|
1732
1746
|
*
|
|
1733
1747
|
* The expression intentionally contains NO relay URLs, wss addresses, TOTP
|
|
1734
|
-
* codes, or any other secrets. It is pure DOM UI text only.
|
|
1748
|
+
* codes, or any other secrets. It is pure DOM UI text + enum state only.
|
|
1735
1749
|
*
|
|
1736
1750
|
* SECRET-HANDLING: this expression contains no secrets, relay URLs, wss
|
|
1737
|
-
* addresses, or TOTP codes whatsoever — DOM label text
|
|
1751
|
+
* addresses, or TOTP codes whatsoever — DOM label text + a structural
|
|
1752
|
+
* pathname match (`/target/`) only.
|
|
1738
1753
|
*
|
|
1739
|
-
* @param opts.label -
|
|
1754
|
+
* @param opts.label - Attached-state badge text (default: `'Debugger Connected'`).
|
|
1755
|
+
* @param opts.disconnectedLabel - Disconnected-state badge text (default: `'Debugger Disconnected'`).
|
|
1756
|
+
* @param opts.state - Initial/forced state for THIS injection call (default: `'attached'`).
|
|
1740
1757
|
* @returns A JS expression string suitable for `Runtime.evaluate`.
|
|
1741
1758
|
*/
|
|
1742
1759
|
function buildIndicatorExpression(opts) {
|
|
1743
1760
|
const label = opts?.label ?? "Debugger Connected";
|
|
1744
|
-
|
|
1761
|
+
const disconnectedLabel = opts?.disconnectedLabel ?? "Debugger Disconnected";
|
|
1762
|
+
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")});})()`;
|
|
1745
1763
|
}
|
|
1746
1764
|
//#endregion
|
|
1747
1765
|
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, logError as o, prepareAttach, printAttachBanner as r, renderAndMaybeWait, logInfo as s, generateAttachToken as t };
|
|
1748
1766
|
|
|
1749
|
-
//# sourceMappingURL=attach-orchestrator-
|
|
1767
|
+
//# sourceMappingURL=attach-orchestrator-Cjdhir2U.js.map
|