@ait-co/devtools 0.1.127 → 0.1.129
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-CpE0dMew.js → attach-orchestrator-Bdt5Zdo9.js} +3 -94
- package/dist/attach-orchestrator-Bdt5Zdo9.js.map +1 -0
- package/dist/{attach-orchestrator-CPMQWkGV.js → attach-orchestrator-DvrgUIx7.js} +4 -95
- package/dist/attach-orchestrator-DvrgUIx7.js.map +1 -0
- package/dist/{bundle-Cb3GFuw6.d.ts → bundle-BKqyhEK9.d.ts} +1 -1
- package/dist/{bundle-Cb3GFuw6.d.ts.map → bundle-BKqyhEK9.d.ts.map} +1 -1
- package/dist/{capture-B1zfGyTo.d.ts → capture-ltuV0gZa.d.ts} +1 -1
- package/dist/{capture-B1zfGyTo.d.ts.map → capture-ltuV0gZa.d.ts.map} +1 -1
- package/dist/{cdp-connection-Dxw_EY8s.d.ts → cdp-connection-D7AYQck2.d.ts} +1 -1
- package/dist/{cdp-connection-Dxw_EY8s.d.ts.map → cdp-connection-D7AYQck2.d.ts.map} +1 -1
- package/dist/{cell-D0dJSGHi.js → cell-DA_lcpDI.js} +2 -2
- package/dist/{cell-D0dJSGHi.js.map → cell-DA_lcpDI.js.map} +1 -1
- package/dist/{cell-CX92lDI0.js → cell-DLRv4iG6.js} +2 -2
- package/dist/{cell-CX92lDI0.js.map → cell-DLRv4iG6.js.map} +1 -1
- package/dist/{debug-server-Dctc9GAh.js → debug-server--Y0QZVJS.js} +57 -58
- package/dist/debug-server--Y0QZVJS.js.map +1 -0
- package/dist/debug-server-Bu3pCG9c.js +436 -0
- package/dist/debug-server-Bu3pCG9c.js.map +1 -0
- package/dist/debug-server-e1qPe0ZB.js +379 -0
- package/dist/{debug-server-BzzNkETg.js.map → debug-server-e1qPe0ZB.js.map} +1 -1
- package/dist/log-CUik_tHp.js +95 -0
- package/dist/log-CUik_tHp.js.map +1 -0
- package/dist/mcp/cli.js +1296 -1230
- package/dist/mcp/cli.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/panel/index.js +1 -1
- package/dist/{pool-DBLKNeRC.d.ts → pool-C0pc7T2p.d.ts} +4 -4
- package/dist/{pool-DBLKNeRC.d.ts.map → pool-C0pc7T2p.d.ts.map} +1 -1
- package/dist/{qr-http-server-Bo8LMOJQ.js → qr-http-server-HANhOFwI.js} +1 -1
- package/dist/{qr-http-server-Bo8LMOJQ.js.map → qr-http-server-HANhOFwI.js.map} +1 -1
- package/dist/{relay-factory-Dug7W6Ao.js → relay-factory-Ck3vBonr.js} +6 -6
- package/dist/{relay-factory-Dug7W6Ao.js.map → relay-factory-Ck3vBonr.js.map} +1 -1
- package/dist/{relay-secret-store-DKxs7zwq.js → relay-secret-store-DzxDsK6S.js} +1 -1
- package/dist/{relay-secret-store-DKxs7zwq.js.map → relay-secret-store-DzxDsK6S.js.map} +1 -1
- package/dist/{relay-url-store-xmUuTjXA.js → relay-url-store-D3rY-GJJ.js} +2 -2
- package/dist/{relay-url-store-xmUuTjXA.js.map → relay-url-store-D3rY-GJJ.js.map} +1 -1
- package/dist/{debug-server-BzzNkETg.js → relay-worker-Bt0QYKQH.js} +212 -346
- package/dist/relay-worker-Bt0QYKQH.js.map +1 -0
- package/dist/{relay-worker-TReZtzGl.d.ts → relay-worker-o0M2ndyJ.d.ts} +7 -7
- package/dist/relay-worker-o0M2ndyJ.d.ts.map +1 -0
- package/dist/{runtime-ozyPnRbU.d.ts → runtime-9xhN9pr8.d.ts} +1 -1
- package/dist/{runtime-ozyPnRbU.d.ts.map → runtime-9xhN9pr8.d.ts.map} +1 -1
- package/dist/test-runner/bin.js +721 -15
- package/dist/test-runner/bin.js.map +1 -1
- package/dist/test-runner/bundle.d.ts +1 -1
- package/dist/test-runner/capture.d.ts +1 -1
- package/dist/test-runner/config.d.ts +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/relay-factory.d.ts +1 -1
- package/dist/test-runner/relay-factory.js +1 -1
- package/dist/test-runner/relay-worker.d.ts +1 -1
- package/dist/test-runner/relay-worker.js +1 -183
- package/dist/test-runner/report.d.ts +3 -3
- package/dist/test-runner/rpc.d.ts +2 -2
- package/dist/test-runner/rpc.js +12 -3
- package/dist/test-runner/rpc.js.map +1 -1
- package/dist/test-runner/runtime.d.ts +1 -1
- package/dist/test-runner/task-graph.d.ts +1 -1
- package/package.json +1 -1
- package/dist/attach-orchestrator-CPMQWkGV.js.map +0 -1
- package/dist/attach-orchestrator-CpE0dMew.js.map +0 -1
- package/dist/debug-server-1dhDA3aw.js +0 -980
- package/dist/debug-server-1dhDA3aw.js.map +0 -1
- package/dist/debug-server-Dctc9GAh.js.map +0 -1
- package/dist/relay-worker-TReZtzGl.d.ts.map +0 -1
- package/dist/test-runner/relay-worker.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { r as generateTotp } from "./totp-DfekTBk3.js";
|
|
2
|
+
import { n as logInfo } from "./log-CUik_tHp.js";
|
|
2
3
|
import { randomBytes } from "node:crypto";
|
|
3
4
|
import { Tunnel, bin, install } from "cloudflared";
|
|
4
5
|
//#region src/mcp/deeplink.ts
|
|
@@ -244,98 +245,6 @@ function classifyToolError(err, toolName, isLocal = false) {
|
|
|
244
245
|
return mcpError(`${toolName} 실패: ${message}\nlist_pages로 미니앱이 relay에 attach됐는지 확인하세요.`);
|
|
245
246
|
}
|
|
246
247
|
//#endregion
|
|
247
|
-
//#region src/mcp/log.ts
|
|
248
|
-
/**
|
|
249
|
-
* Allowed field keys that may pass through to a log line.
|
|
250
|
-
* Unknown keys are dropped. Values are still redact-scanned.
|
|
251
|
-
*/
|
|
252
|
-
const ALLOWED_KEYS = new Set([
|
|
253
|
-
"ts",
|
|
254
|
-
"level",
|
|
255
|
-
"event",
|
|
256
|
-
"msg",
|
|
257
|
-
"port",
|
|
258
|
-
"totpEnabled",
|
|
259
|
-
"env",
|
|
260
|
-
"tool",
|
|
261
|
-
"deploymentId",
|
|
262
|
-
"errorKind",
|
|
263
|
-
"reason",
|
|
264
|
-
"prevTargetId",
|
|
265
|
-
"mode",
|
|
266
|
-
"fileCount",
|
|
267
|
-
"passed",
|
|
268
|
-
"failed",
|
|
269
|
-
"skipped"
|
|
270
|
-
]);
|
|
271
|
-
/**
|
|
272
|
-
* Patterns that match secret values.
|
|
273
|
-
* Match order matters — more-specific patterns first.
|
|
274
|
-
*
|
|
275
|
-
* #268 redact script covers: relay=wss://…, at=<TOTP>, _deploymentId=<uuid>.
|
|
276
|
-
* Here we extend to in-process value-level patterns used in server logs.
|
|
277
|
-
*/
|
|
278
|
-
const SECRET_PATTERNS = [
|
|
279
|
-
/^\d{6}$/,
|
|
280
|
-
/^(aitcc_|AITCC_)/i,
|
|
281
|
-
/^[A-Za-z0-9_-]+=.{4,}/,
|
|
282
|
-
/^wss:\/\//,
|
|
283
|
-
/(?:^|[?&])at=[A-Z0-9]{6}/i
|
|
284
|
-
];
|
|
285
|
-
/**
|
|
286
|
-
* Returns `true` when the string value matches any known-secret pattern.
|
|
287
|
-
* Only string values are tested — numbers/booleans are always safe.
|
|
288
|
-
*/
|
|
289
|
-
function isSecretValue(value) {
|
|
290
|
-
return SECRET_PATTERNS.some((re) => re.test(value));
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Redacts a single scalar value.
|
|
294
|
-
* - strings: return "***" if the value matches a secret pattern.
|
|
295
|
-
* - other: return as-is.
|
|
296
|
-
*/
|
|
297
|
-
function redactValue(value) {
|
|
298
|
-
if (typeof value === "string" && isSecretValue(value)) return "***";
|
|
299
|
-
return value;
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Builds a safe log payload from raw fields.
|
|
303
|
-
*
|
|
304
|
-
* - Only keys in `ALLOWED_KEYS` are included.
|
|
305
|
-
* - String values are scanned for secret patterns and replaced with "***".
|
|
306
|
-
* - `ts` and `level` and `event` are always included (they are injected by the
|
|
307
|
-
* logger functions below, not by callers).
|
|
308
|
-
*/
|
|
309
|
-
function buildPayload(level, event, fields) {
|
|
310
|
-
const out = {
|
|
311
|
-
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
312
|
-
level,
|
|
313
|
-
event
|
|
314
|
-
};
|
|
315
|
-
for (const [key, value] of Object.entries(fields)) {
|
|
316
|
-
if (!ALLOWED_KEYS.has(key)) continue;
|
|
317
|
-
if (key === "ts" || key === "level" || key === "event") continue;
|
|
318
|
-
out[key] = redactValue(value);
|
|
319
|
-
}
|
|
320
|
-
return out;
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* Writes a single JSON log line to stderr.
|
|
324
|
-
* MCP stdio transport uses stdout; all diagnostics go to stderr.
|
|
325
|
-
*/
|
|
326
|
-
function writeLog(level, event, fields = {}) {
|
|
327
|
-
const payload = buildPayload(level, event, fields);
|
|
328
|
-
process.stderr.write(`${JSON.stringify(payload)}\n`);
|
|
329
|
-
}
|
|
330
|
-
/** Log an informational structured event. */
|
|
331
|
-
function logInfo(event, fields = {}) {
|
|
332
|
-
writeLog("info", event, fields);
|
|
333
|
-
}
|
|
334
|
-
/** Log an error structured event. */
|
|
335
|
-
function logError(event, fields = {}) {
|
|
336
|
-
writeLog("error", event, fields);
|
|
337
|
-
}
|
|
338
|
-
//#endregion
|
|
339
248
|
//#region src/mcp/sdk-signatures.ts
|
|
340
249
|
function isObject(v) {
|
|
341
250
|
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
@@ -1469,7 +1378,7 @@ async function prepareAttach(deps, env, args, conn) {
|
|
|
1469
1378
|
const buildProjectRoot = typeof rawProjectRoot === "string" ? rawProjectRoot : void 0;
|
|
1470
1379
|
let tunnelHttpUrl = process.env.AIT_TUNNEL_BASE_URL?.trim() ?? "";
|
|
1471
1380
|
if (tunnelHttpUrl === "" && buildProjectRoot !== void 0) {
|
|
1472
|
-
const { readRelayUrls } = await import("./relay-url-store-
|
|
1381
|
+
const { readRelayUrls } = await import("./relay-url-store-D3rY-GJJ.js");
|
|
1473
1382
|
tunnelHttpUrl = (await readRelayUrls({ projectRoot: buildProjectRoot }))?.tunnelBaseUrl ?? "";
|
|
1474
1383
|
}
|
|
1475
1384
|
if (tunnelHttpUrl === "") return {
|
|
@@ -1744,6 +1653,6 @@ function buildIndicatorExpression(opts) {
|
|
|
1744
1653
|
return `(() => {if (document.getElementById('__ait_debug_indicator')) return;const 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','background:#e5484d','color:#fff','font:bold 11px/1 system-ui,sans-serif','padding:5px 9px','border-radius:6px','pointer-events:auto','user-select:none',].join(';');el.textContent = ${JSON.stringify(label)};el.addEventListener('pointerdown', () => el.remove(), { once: true });document.body.appendChild(el);})()`;
|
|
1745
1654
|
}
|
|
1746
1655
|
//#endregion
|
|
1747
|
-
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,
|
|
1656
|
+
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 };
|
|
1748
1657
|
|
|
1749
|
-
//# sourceMappingURL=attach-orchestrator-
|
|
1658
|
+
//# sourceMappingURL=attach-orchestrator-DvrgUIx7.js.map
|