@ait-co/devtools 0.1.80 → 0.1.84
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/{chii-relay-DSVG4Ui1.js → chii-relay-BASitNMw.js} +1 -1
- package/dist/{chii-relay-DSVG4Ui1.js.map → chii-relay-BASitNMw.js.map} +1 -1
- package/dist/{chii-relay-BcnVJBqm.cjs → chii-relay-BzUf0LH3.cjs} +1 -1
- package/dist/{chii-relay-BcnVJBqm.cjs.map → chii-relay-BzUf0LH3.cjs.map} +1 -1
- package/dist/{deeplink-B-94XmWA.js → deeplink-BpO9qc-D.js} +5 -3
- package/dist/{deeplink-BLU2_hg6.cjs.map → deeplink-BpO9qc-D.js.map} +1 -1
- package/dist/{deeplink-CYqDwVYs.js → deeplink-D1HXJ2YG.js} +5 -3
- package/dist/{deeplink-CU6opogq.cjs.map → deeplink-D1HXJ2YG.js.map} +1 -1
- package/dist/{deeplink-BLU2_hg6.cjs → deeplink-DCScMYcp.cjs} +5 -3
- package/dist/deeplink-DCScMYcp.cjs.map +1 -0
- package/dist/{deeplink-CU6opogq.cjs → deeplink-DDOe0FQl.cjs} +5 -3
- package/dist/deeplink-DDOe0FQl.cjs.map +1 -0
- package/dist/{devtools-opener-Bp671YXu.cjs → devtools-opener-BDY0w3_0.cjs} +11 -5
- package/dist/devtools-opener-BDY0w3_0.cjs.map +1 -0
- package/dist/{devtools-opener-D84kZFtR.js → devtools-opener-BTl5A6Cd.js} +11 -5
- package/dist/devtools-opener-BTl5A6Cd.js.map +1 -0
- package/dist/{devtools-opener-BbUXBzgA.js → devtools-opener-XpwL3fZ9.js} +22 -6
- package/dist/devtools-opener-XpwL3fZ9.js.map +1 -0
- package/dist/{devtools-opener-h6A-UjzC.cjs → devtools-opener-mDgeg_MX.cjs} +11 -5
- package/dist/devtools-opener-mDgeg_MX.cjs.map +1 -0
- package/dist/machine-state-Chg_6SPq.js +188 -0
- package/dist/machine-state-Chg_6SPq.js.map +1 -0
- package/dist/machine-state-DOUweFsJ.cjs +216 -0
- package/dist/machine-state-DOUweFsJ.cjs.map +1 -0
- package/dist/mcp/cli.js +104 -37
- package/dist/mcp/cli.js.map +1 -1
- package/dist/mcp/server.js +6 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/panel/index.js +109 -8
- package/dist/panel/index.js.map +1 -1
- package/dist/{qr-http-server-DJ5K3Odk.js → qr-http-server-Buorblrx.js} +73 -23
- package/dist/qr-http-server-Buorblrx.js.map +1 -0
- package/dist/{qr-http-server-Dkx2-pKF.cjs → qr-http-server-BvAtX9Lc.cjs} +73 -23
- package/dist/qr-http-server-BvAtX9Lc.cjs.map +1 -0
- package/dist/{qr-http-server-DkOFfZsR.js → qr-http-server-BxjrJr9t.js} +73 -23
- package/dist/qr-http-server-BxjrJr9t.js.map +1 -0
- package/dist/{qr-http-server-MIUHaiYw.cjs → qr-http-server-CAUyOrCm.cjs} +73 -23
- package/dist/qr-http-server-CAUyOrCm.cjs.map +1 -0
- package/dist/{relay-secret-store-CsCOfpWt.cjs → relay-secret-store-B5WAozDv.cjs} +2 -2
- package/dist/{relay-secret-store-CsCOfpWt.cjs.map → relay-secret-store-B5WAozDv.cjs.map} +1 -1
- package/dist/{relay-secret-store-6pPzLkUO.js → relay-secret-store-BvNWdSjV.js} +2 -2
- package/dist/{relay-secret-store-6pPzLkUO.js.map → relay-secret-store-BvNWdSjV.js.map} +1 -1
- package/dist/{relay-url-store-DH8-VUFc.js → relay-url-store-1CXVqNDL.js} +2 -2
- package/dist/{relay-url-store-DH8-VUFc.js.map → relay-url-store-1CXVqNDL.js.map} +1 -1
- package/dist/{relay-url-store-BiEK9BN1.cjs → relay-url-store-D2lX9POP.cjs} +2 -2
- package/dist/{relay-url-store-BiEK9BN1.cjs.map → relay-url-store-D2lX9POP.cjs.map} +1 -1
- package/dist/{totp-DYdP9N3o.js → totp-CauHjkdE.js} +1 -1
- package/dist/{totp-DYdP9N3o.js.map → totp-CauHjkdE.js.map} +1 -1
- package/dist/{totp-CNw0w89F.cjs → totp-D9fjaVak.cjs} +1 -1
- package/dist/{totp-CNw0w89F.cjs.map → totp-D9fjaVak.cjs.map} +1 -1
- package/dist/{tunnel-C-AFdAVL.cjs → tunnel-CfT31xho.cjs} +6 -6
- package/dist/{tunnel-C-AFdAVL.cjs.map → tunnel-CfT31xho.cjs.map} +1 -1
- package/dist/{tunnel-BTlq1mmH.js → tunnel-DPwJBn1u.js} +6 -6
- package/dist/{tunnel-BTlq1mmH.js.map → tunnel-DPwJBn1u.js.map} +1 -1
- package/dist/unplugin/index.cjs +90 -5
- package/dist/unplugin/index.cjs.map +1 -1
- package/dist/unplugin/index.d.cts.map +1 -1
- package/dist/unplugin/index.d.ts.map +1 -1
- package/dist/unplugin/index.js +90 -5
- package/dist/unplugin/index.js.map +1 -1
- package/dist/unplugin/tunnel.cjs +4 -4
- package/dist/unplugin/tunnel.js +4 -4
- package/package.json +1 -1
- package/dist/deeplink-B-94XmWA.js.map +0 -1
- package/dist/deeplink-CYqDwVYs.js.map +0 -1
- package/dist/devtools-opener-BbUXBzgA.js.map +0 -1
- package/dist/devtools-opener-Bp671YXu.cjs.map +0 -1
- package/dist/devtools-opener-D84kZFtR.js.map +0 -1
- package/dist/devtools-opener-h6A-UjzC.cjs.map +0 -1
- package/dist/qr-http-server-DJ5K3Odk.js.map +0 -1
- package/dist/qr-http-server-DkOFfZsR.js.map +0 -1
- package/dist/qr-http-server-Dkx2-pKF.cjs.map +0 -1
- package/dist/qr-http-server-MIUHaiYw.cjs.map +0 -1
package/dist/panel/index.js
CHANGED
|
@@ -25379,8 +25379,8 @@ const en = {
|
|
|
25379
25379
|
"dashboard.url.copy": "Copy",
|
|
25380
25380
|
"dashboard.url.copied": "Copied",
|
|
25381
25381
|
"dashboard.inspector.section": "Inspector",
|
|
25382
|
-
"dashboard.inspector.open": "Open
|
|
25383
|
-
"dashboard.inspector.waiting": "
|
|
25382
|
+
"dashboard.inspector.open": "Open DevTools",
|
|
25383
|
+
"dashboard.inspector.waiting": "Attach a page to enable the \"Open DevTools\" button",
|
|
25384
25384
|
"inspector.error.noTarget": "No page attached. Attach a device and try again.",
|
|
25385
25385
|
"inspector.error.relayDown": "Relay is not active. Start a relay session first.",
|
|
25386
25386
|
"attach.title": "AIT Debug Session — QR Scan",
|
|
@@ -25617,8 +25617,8 @@ const ko = {
|
|
|
25617
25617
|
"dashboard.url.copy": "복사",
|
|
25618
25618
|
"dashboard.url.copied": "복사됨",
|
|
25619
25619
|
"dashboard.inspector.section": "인스펙터",
|
|
25620
|
-
"dashboard.inspector.open": "
|
|
25621
|
-
"dashboard.inspector.waiting": "
|
|
25620
|
+
"dashboard.inspector.open": "디버그 툴 열기",
|
|
25621
|
+
"dashboard.inspector.waiting": "페이지를 attach하면 \"디버그 툴 열기\" 버튼이 표시됩니다",
|
|
25622
25622
|
"inspector.error.noTarget": "연결된 페이지가 없습니다. 기기를 attach한 후 다시 시도하세요.",
|
|
25623
25623
|
"inspector.error.relayDown": "relay가 활성화되지 않았습니다. start_debug로 relay를 기동하세요.",
|
|
25624
25624
|
"attach.title": "AIT 디버그 세션 — QR 스캔",
|
|
@@ -26484,6 +26484,71 @@ async function sendTier0Ping(version) {
|
|
|
26484
26484
|
* Usage: import { telemetry } from './telemetry/index.js' (from panel code).
|
|
26485
26485
|
*/
|
|
26486
26486
|
/**
|
|
26487
|
+
* The dev server consent endpoint path. Must match the path registered in
|
|
26488
|
+
* the unplugin (`TELEMETRY_CONSENT_PATH`).
|
|
26489
|
+
*/
|
|
26490
|
+
const MACHINE_CONSENT_ENDPOINT$1 = "/api/ait-devtools/telemetry-consent";
|
|
26491
|
+
/**
|
|
26492
|
+
* Whether we have already attempted to sync with the machine-level state.
|
|
26493
|
+
* We sync once at init time to avoid repeated network calls.
|
|
26494
|
+
*/
|
|
26495
|
+
let machineSyncDone = false;
|
|
26496
|
+
/**
|
|
26497
|
+
* Reads the machine-level consent state from the dev server endpoint.
|
|
26498
|
+
* Returns `null` when not in a dev-server context (fetch fails, 503, non-JSON).
|
|
26499
|
+
*
|
|
26500
|
+
* BROWSER-ONLY. Runs inside the panel (browser context).
|
|
26501
|
+
*/
|
|
26502
|
+
async function fetchMachineConsent() {
|
|
26503
|
+
try {
|
|
26504
|
+
const res = await fetch(MACHINE_CONSENT_ENDPOINT$1, {
|
|
26505
|
+
method: "GET",
|
|
26506
|
+
headers: { Accept: "application/json" }
|
|
26507
|
+
});
|
|
26508
|
+
if (!res.ok) return null;
|
|
26509
|
+
const data = await res.json();
|
|
26510
|
+
if (data.consent !== "granted" && data.consent !== "denied" && data.consent !== "undecided") return null;
|
|
26511
|
+
return {
|
|
26512
|
+
consent: data.consent,
|
|
26513
|
+
anon_id: typeof data.anon_id === "string" ? data.anon_id : null,
|
|
26514
|
+
policy_version: typeof data.policy_version === "string" ? data.policy_version : ""
|
|
26515
|
+
};
|
|
26516
|
+
} catch {
|
|
26517
|
+
return null;
|
|
26518
|
+
}
|
|
26519
|
+
}
|
|
26520
|
+
/**
|
|
26521
|
+
* Posts a consent decision to the dev server so it is persisted to the
|
|
26522
|
+
* machine-level file. Fire-and-forget — failures are silently ignored.
|
|
26523
|
+
*/
|
|
26524
|
+
function postMachineConsent$1(consent, policyVersion) {
|
|
26525
|
+
fetch(MACHINE_CONSENT_ENDPOINT$1, {
|
|
26526
|
+
method: "POST",
|
|
26527
|
+
headers: { "Content-Type": "application/json" },
|
|
26528
|
+
body: JSON.stringify({
|
|
26529
|
+
consent,
|
|
26530
|
+
policy_version: policyVersion
|
|
26531
|
+
})
|
|
26532
|
+
}).catch(() => {});
|
|
26533
|
+
}
|
|
26534
|
+
/**
|
|
26535
|
+
* Applies the machine-level consent to the browser localStorage so all
|
|
26536
|
+
* subsequent reads from `state.ts` (which are locked to localStorage) reflect
|
|
26537
|
+
* the machine decision.
|
|
26538
|
+
*
|
|
26539
|
+
* Only writes when the machine state is a definitive decision (granted/denied)
|
|
26540
|
+
* and the policy version is current — avoids clobbering a more recent local
|
|
26541
|
+
* decision with a stale machine file.
|
|
26542
|
+
*/
|
|
26543
|
+
function applyMachineConsentToLocalStorage(machineState) {
|
|
26544
|
+
if (machineState.consent === "undecided") return;
|
|
26545
|
+
if (machineState.policy_version !== "2026-05-18") return;
|
|
26546
|
+
setConsentViaToggle(machineState.consent === "granted");
|
|
26547
|
+
if (machineState.anon_id) try {
|
|
26548
|
+
if (!localStorage.getItem("__ait_telemetry:anon_id")) localStorage.setItem("__ait_telemetry:anon_id", machineState.anon_id);
|
|
26549
|
+
} catch {}
|
|
26550
|
+
}
|
|
26551
|
+
/**
|
|
26487
26552
|
* Telemetry ingest endpoint.
|
|
26488
26553
|
* Overridable at build time via define (e.g., for e2e / local dev).
|
|
26489
26554
|
* Do NOT expose this as a public env-var surface.
|
|
@@ -26494,7 +26559,7 @@ function readGlobalString(key) {
|
|
|
26494
26559
|
}
|
|
26495
26560
|
const TELEMETRY_ENDPOINT = readGlobalString("__TELEMETRY_ENDPOINT__") ?? "https://t.aitc.dev";
|
|
26496
26561
|
function getVersion() {
|
|
26497
|
-
return "0.1.
|
|
26562
|
+
return "0.1.84";
|
|
26498
26563
|
}
|
|
26499
26564
|
let panelVisibleSince = null;
|
|
26500
26565
|
let accumulatedMs = 0;
|
|
@@ -26518,12 +26583,33 @@ function wirePagehide() {
|
|
|
26518
26583
|
}
|
|
26519
26584
|
/**
|
|
26520
26585
|
* Call once after panel mounts.
|
|
26521
|
-
* Handles: Tier 0 ping, consent check
|
|
26586
|
+
* Handles: Tier 0 ping, consent check (machine overlay first, localStorage
|
|
26587
|
+
* fallback), optional toast, panel_mount event, pagehide wiring.
|
|
26588
|
+
*
|
|
26589
|
+
* Machine-level overlay (#542): when the dev server is running, we fetch the
|
|
26590
|
+
* machine-level consent once and apply it to localStorage. This prevents the
|
|
26591
|
+
* toast from re-appearing when the origin rotates (quick-tunnel host or port
|
|
26592
|
+
* changes). On non-dev-server surfaces (GitHub Pages, static fixture) the
|
|
26593
|
+
* fetch fails silently and we fall through to the existing localStorage path.
|
|
26522
26594
|
*/
|
|
26523
26595
|
function init() {
|
|
26524
26596
|
if (typeof window === "undefined" || typeof document === "undefined") return;
|
|
26525
26597
|
wirePagehide();
|
|
26526
26598
|
sendTier0Ping(getVersion());
|
|
26599
|
+
if (!machineSyncDone) {
|
|
26600
|
+
machineSyncDone = true;
|
|
26601
|
+
fetchMachineConsent().then((machineState) => {
|
|
26602
|
+
if (machineState) applyMachineConsentToLocalStorage(machineState);
|
|
26603
|
+
runConsentFlow();
|
|
26604
|
+
});
|
|
26605
|
+
} else runConsentFlow();
|
|
26606
|
+
}
|
|
26607
|
+
/**
|
|
26608
|
+
* Core consent flow — reads localStorage (which may have already been
|
|
26609
|
+
* patched by `applyMachineConsentToLocalStorage`) and shows the toast or
|
|
26610
|
+
* fires `panel_mount` accordingly.
|
|
26611
|
+
*/
|
|
26612
|
+
function runConsentFlow() {
|
|
26527
26613
|
if (resolveEffectiveConsent() === "granted") {
|
|
26528
26614
|
getOrCreateAnonId();
|
|
26529
26615
|
send("panel_mount", getVersion());
|
|
@@ -26535,10 +26621,12 @@ function init() {
|
|
|
26535
26621
|
onAccept: () => {
|
|
26536
26622
|
acceptConsent();
|
|
26537
26623
|
getOrCreateAnonId();
|
|
26624
|
+
postMachineConsent$1("granted", CURRENT_POLICY_VERSION);
|
|
26538
26625
|
send("panel_mount", getVersion());
|
|
26539
26626
|
},
|
|
26540
26627
|
onDeny: () => {
|
|
26541
26628
|
denyConsent();
|
|
26629
|
+
postMachineConsent$1("denied", CURRENT_POLICY_VERSION);
|
|
26542
26630
|
}
|
|
26543
26631
|
});
|
|
26544
26632
|
};
|
|
@@ -28165,6 +28253,17 @@ function renderAnalyticsTab() {
|
|
|
28165
28253
|
}
|
|
28166
28254
|
//#endregion
|
|
28167
28255
|
//#region src/panel/tabs/environment.ts
|
|
28256
|
+
const MACHINE_CONSENT_ENDPOINT = "/api/ait-devtools/telemetry-consent";
|
|
28257
|
+
function postMachineConsent(consent) {
|
|
28258
|
+
fetch(MACHINE_CONSENT_ENDPOINT, {
|
|
28259
|
+
method: "POST",
|
|
28260
|
+
headers: { "Content-Type": "application/json" },
|
|
28261
|
+
body: JSON.stringify({
|
|
28262
|
+
consent,
|
|
28263
|
+
policy_version: CURRENT_POLICY_VERSION
|
|
28264
|
+
})
|
|
28265
|
+
}).catch(() => {});
|
|
28266
|
+
}
|
|
28168
28267
|
function renderEnvironmentTab() {
|
|
28169
28268
|
const s = aitState.state;
|
|
28170
28269
|
const disabled = !s.panelEditable;
|
|
@@ -28232,7 +28331,9 @@ function buildTelemetrySection() {
|
|
|
28232
28331
|
style: "font-size:11px"
|
|
28233
28332
|
}, isGranted ? t("env.telemetry.turnOff") : t("env.telemetry.turnOn"));
|
|
28234
28333
|
toggleBtn.addEventListener("click", () => {
|
|
28235
|
-
|
|
28334
|
+
const newConsent = !isGranted;
|
|
28335
|
+
setConsentViaToggle(newConsent);
|
|
28336
|
+
postMachineConsent(newConsent ? "granted" : "denied");
|
|
28236
28337
|
window.dispatchEvent(new CustomEvent("__ait:panel-switch-tab", { detail: { tab: "env" } }));
|
|
28237
28338
|
});
|
|
28238
28339
|
const statusRow = h("div", { className: "ait-row" }, h("label", {}, t("env.telemetry.row")), h("span", { style: "display:flex;align-items:center;gap:8px" }, statusLabel, toggleBtn));
|
|
@@ -30745,7 +30846,7 @@ function Panel() {
|
|
|
30745
30846
|
color: "#666",
|
|
30746
30847
|
fontWeight: 400
|
|
30747
30848
|
},
|
|
30748
|
-
children: ["v", "0.1.
|
|
30849
|
+
children: ["v", "0.1.84"]
|
|
30749
30850
|
}),
|
|
30750
30851
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
30751
30852
|
type: "button",
|