Sign In

execbro

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

execbro - npm Package Compare versions

Comparing version
1.10.16
to
1.10.17
+2
build/__tests__/unit/flowpoints.test.d.ts
export {};
//# sourceMappingURL=flowpoints.test.d.ts.map
{"version":3,"file":"flowpoints.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/unit/flowpoints.test.ts"],"names":[],"mappings":""}
import { describe, expect, it } from "@jest/globals";
import { FLOWPOINT_STORE_CAP, createFlowpointStore, applyDrain, buildDrainExpression, buildClearExpression, parseDrainResult, clearFlowpointStores, getFlowpointStore, } from "../../pro/flowpoints.js";
function makeEntry(seq, overrides = {}) {
return { seq, t: 1000 + seq, name: "add-to-cart", step: `step-${seq}`, run: "r1", level: "info", ...overrides };
}
describe("applyDrain", () => {
it("appends everything on first drain and sets cursor/contextId", () => {
const store = createFlowpointStore();
const added = applyDrain(store, { contextId: "ctx-a", entries: [makeEntry(1), makeEntry(2)] });
expect(added).toBe(2);
expect(store.entries).toHaveLength(2);
expect(store.cursor).toBe(2);
expect(store.contextId).toBe("ctx-a");
});
it("is idempotent for the same snapshot and incremental for grown snapshots", () => {
const store = createFlowpointStore();
applyDrain(store, { contextId: "ctx-a", entries: [makeEntry(1)] });
expect(applyDrain(store, { contextId: "ctx-a", entries: [makeEntry(1)] })).toBe(0);
expect(applyDrain(store, { contextId: "ctx-a", entries: [makeEntry(1), makeEntry(2)] })).toBe(1);
expect(store.entries.map((e) => e.seq)).toEqual([1, 2]);
});
it("treats a changed contextId as a reload: all snapshot entries are fresh", () => {
const store = createFlowpointStore();
applyDrain(store, { contextId: "ctx-a", entries: [makeEntry(1), makeEntry(2), makeEntry(3)] });
// reload: seq restarts, MORE entries than the old cursor — heuristics would miss this
const added = applyDrain(store, {
contextId: "ctx-b",
entries: [makeEntry(1), makeEntry(2), makeEntry(3), makeEntry(4)],
});
expect(added).toBe(4);
expect(store.entries).toHaveLength(7);
expect(store.cursor).toBe(4);
expect(store.contextId).toBe("ctx-b");
});
it("caps the store at FLOWPOINT_STORE_CAP, dropping oldest", () => {
const store = createFlowpointStore();
const entries = Array.from({ length: FLOWPOINT_STORE_CAP + 10 }, (_, i) => makeEntry(i + 1));
applyDrain(store, { contextId: "ctx-a", entries });
expect(store.entries).toHaveLength(FLOWPOINT_STORE_CAP);
expect(store.entries[0].seq).toBe(11);
});
});
describe("expression builders", () => {
it("drain expression is an IIFE reading getFlowpointSnapshot with dual-global fallback", () => {
const expr = buildDrainExpression();
expect(expr).toContain("__EXECBRO__");
expect(expr).toContain("__RN_AI_DEVTOOLS__");
expect(expr).toContain("getFlowpointSnapshot");
expect(expr).toContain("__missing");
expect(expr).toContain("meta not JSON-serializable");
expect(expr).toContain("__EXECBRO_FLOWPOINT_WARNED__");
expect(expr).toContain("console.warn");
expect(expr).toContain("outdated");
expect(expr).toContain("execbro-sdk@latest");
});
it("clear expression calls clearFlowpoints", () => {
expect(buildClearExpression()).toContain("clearFlowpoints");
});
});
describe("parseDrainResult", () => {
it("parses a snapshot", () => {
const parsed = parseDrainResult(JSON.stringify({ contextId: "c", entries: [makeEntry(1)] }));
expect(parsed).toEqual({ contextId: "c", entries: [makeEntry(1)] });
});
it("detects the SDK-missing marker, defaulting to uninitialized when no reason is given", () => {
expect(parseDrainResult(JSON.stringify({ __missing: true }))).toEqual({
missing: true,
reason: "uninitialized",
});
});
it("detects the outdated-SDK marker", () => {
expect(parseDrainResult(JSON.stringify({ __missing: true, __reason: "outdated" }))).toEqual({
missing: true,
reason: "outdated",
});
});
it("returns null on garbage", () => {
expect(parseDrainResult("not json")).toBeNull();
});
});
describe("clearFlowpointStores", () => {
it("device-scoped clear touches only that device's store", () => {
const deviceA = getFlowpointStore("clear-test-device-a");
const deviceB = getFlowpointStore("clear-test-device-b");
applyDrain(deviceA, { contextId: "ctx-a", entries: [makeEntry(1), makeEntry(2)] });
applyDrain(deviceB, { contextId: "ctx-b", entries: [makeEntry(1), makeEntry(2), makeEntry(3)] });
const removed = clearFlowpointStores(undefined, "clear-test-device-a");
expect(removed).toBe(2);
expect(deviceA.entries).toHaveLength(0);
expect(deviceB.entries).toHaveLength(3);
// cursor/contextId retained so cleared entries never re-drain
expect(deviceA.cursor).toBe(2);
expect(deviceA.contextId).toBe("ctx-a");
});
it("undefined deviceName clears all stores", () => {
// Reset any state left by other stores/tests sharing the module-level map.
clearFlowpointStores(undefined, undefined);
const deviceC = getFlowpointStore("clear-test-device-c");
const deviceD = getFlowpointStore("clear-test-device-d");
applyDrain(deviceC, { contextId: "ctx-c", entries: [makeEntry(1)] });
applyDrain(deviceD, { contextId: "ctx-d", entries: [makeEntry(1), makeEntry(2)] });
const removed = clearFlowpointStores(undefined, undefined);
expect(removed).toBe(3);
expect(deviceC.entries).toHaveLength(0);
expect(deviceD.entries).toHaveLength(0);
});
it("combines name filter with device scoping", () => {
const deviceE = getFlowpointStore("clear-test-device-e");
applyDrain(deviceE, {
contextId: "ctx-e",
entries: [
makeEntry(1, { name: "checkout" }),
makeEntry(2, { name: "onboarding" }),
makeEntry(3, { name: "checkout" }),
],
});
const deviceF = getFlowpointStore("clear-test-device-f");
applyDrain(deviceF, { contextId: "ctx-f", entries: [makeEntry(1, { name: "checkout" })] });
const removed = clearFlowpointStores("checkout", "clear-test-device-e");
expect(removed).toBe(2);
expect(deviceE.entries.map((e) => e.name)).toEqual(["onboarding"]);
// other device's "checkout" entries untouched since deviceName scoped the clear
expect(deviceF.entries).toHaveLength(1);
});
});
//# sourceMappingURL=flowpoints.test.js.map
{"version":3,"file":"flowpoints.test.js","sourceRoot":"","sources":["../../../src/__tests__/unit/flowpoints.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAEH,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EACh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gBAClC,SAAS,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;gBACpC,SAAS,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;aACrC;SACJ,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;QACzD,UAAU,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAE3F,MAAM,OAAO,GAAG,oBAAoB,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;QAExE,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;QACnE,gFAAgF;QAChF,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
export {};
//# sourceMappingURL=flowpointsQuery.test.d.ts.map
{"version":3,"file":"flowpointsQuery.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/unit/flowpointsQuery.test.ts"],"names":[],"mappings":""}
import { describe, expect, it } from "@jest/globals";
import { formatMeta, matchesPoint, resolveLastRuns, filterFlowpoints, formatFlowpoints, } from "../../pro/flowpoints.js";
function e(seq, overrides = {}) {
return { seq, t: 1000 + seq, name: "add-to-cart", step: `s${seq}`, run: "r1", level: "info", ...overrides };
}
describe("formatMeta", () => {
it("passes strings through and stringifies objects", () => {
expect(formatMeta("start")).toBe("start");
expect(formatMeta({ removed: 3 })).toBe('{"removed":3}');
expect(formatMeta(undefined)).toBe("");
});
});
describe("matchesPoint", () => {
it("matches on step equality, level, and case-insensitive metaIncludes", () => {
const entry = e(1, { step: "failed", level: "error", meta: { reason: "Timeout" } });
expect(matchesPoint(entry, { step: "failed" })).toBe(true);
expect(matchesPoint(entry, { step: "other" })).toBe(false);
expect(matchesPoint(entry, { level: "error" })).toBe(true);
expect(matchesPoint(entry, { metaIncludes: "timeout" })).toBe(true);
expect(matchesPoint(entry, { step: "failed", level: "info" })).toBe(false);
});
});
describe("resolveLastRuns", () => {
it("returns the run of the chronologically last entry per flow", () => {
const entries = [
e(1, { run: "aaaa" }),
e(2, { run: "aaaa" }),
e(3, { run: "bbbb" }),
e(4, { name: "other", run: "cccc" }),
];
const last = resolveLastRuns(entries);
expect(last.get("add-to-cart")).toBe("bbbb");
expect(last.get("other")).toBe("cccc");
});
});
describe("filterFlowpoints", () => {
const entries = [
e(1, { run: "aaaa", step: "start" }),
e(2, { run: "aaaa", step: "failed", level: "error", meta: { reason: "timeout" } }),
e(3, { run: "bbbb", step: "start" }),
e(4, { run: "bbbb", step: "done" }),
e(5, { name: "checkout", run: "cccc", step: "start" }),
];
it("filters by name, step, and level", () => {
expect(filterFlowpoints(entries, { name: "checkout" })).toHaveLength(1);
expect(filterFlowpoints(entries, { step: "start" })).toHaveLength(3);
expect(filterFlowpoints(entries, { level: "error" })).toHaveLength(1);
});
it("filters by metaIncludes and since", () => {
expect(filterFlowpoints(entries, { metaIncludes: "TIMEOUT" })).toHaveLength(1);
expect(filterFlowpoints(entries, { since: 1003 })).toHaveLength(2);
});
it("resolves run: 'last' per flow and explicit run ids", () => {
const last = filterFlowpoints(entries, { run: "last" });
expect(last.map((x) => x.seq)).toEqual([3, 4, 5]);
expect(filterFlowpoints(entries, { run: "aaaa" })).toHaveLength(2);
});
it("applies limit keeping the newest entries", () => {
expect(filterFlowpoints(entries, { limit: 2 }).map((x) => x.seq)).toEqual([4, 5]);
});
});
describe("formatFlowpoints", () => {
it("formats a single-run flow with deltas, span, level prefix, and meta", () => {
const out = formatFlowpoints([
e(1, { step: "start", t: 1000 }),
e(2, { step: "cleared", t: 1006, meta: { removed: 3 } }),
e(3, { step: "failed", t: 1312, level: "error", meta: { reason: "timeout" } }),
]);
expect(out).toContain('Flow "add-to-cart" run r1 — 3 points (312ms span):');
expect(out).toContain("+0ms");
expect(out).toContain("+6ms");
expect(out).toContain('cleared {"removed":3}');
expect(out).toContain("[error] failed");
});
it("groups multiple runs and labels the latest", () => {
const out = formatFlowpoints([e(1, { run: "aaaa", t: 1000 }), e(2, { run: "bbbb", t: 2000 })]);
expect(out).toContain('Flow "add-to-cart" — 2 runs');
expect(out).toContain("run aaaa — 1 points");
expect(out).toContain("run bbbb (latest) — 1 points");
});
it("labels (latest) by last activity, not first appearance, under interleaved runs", () => {
const out = formatFlowpoints([
e(1, { run: "aaaa", t: 1000 }),
e(2, { run: "bbbb", t: 1500 }),
e(3, { run: "aaaa", t: 2000 }),
]);
expect(out).toContain("run aaaa (latest)");
expect(out).not.toContain("bbbb (latest)");
});
});
//# sourceMappingURL=flowpointsQuery.test.js.map
{"version":3,"file":"flowpointsQuery.test.js","sourceRoot":"","sources":["../../../src/__tests__/unit/flowpointsQuery.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAEH,UAAU,EACV,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,SAAS,CAAC,CAAC,GAAW,EAAE,YAAqC,EAAE;IAC3D,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,GAAG,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;AAChH,CAAC;AAED,QAAQ,CAAC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AC;AACP,CAAC,CAAC,CAAC"}
export {};
//# sourceMappingURL=verifyFlow.test.d.ts.map
{"version":3,"file":"verifyFlow.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/unit/verifyFlow.test.ts"],"names":[],"mappings":""}
import { describe, expect, it } from "@jest/globals";
import { verifyFlow } from "../../pro/flowpoints.js";
function e(seq, step, overrides = {}) {
return { seq, t: 1000 + seq * 10, name: "add-to-cart", step, run: "r1", level: "info", ...overrides };
}
const happy = [e(1, "start"), e(2, "cleared"), e(3, "item-added"), e(4, "done")];
describe("verifyFlow", () => {
it("passes when expected steps appear in order (subsequence: extras allowed)", () => {
const result = verifyFlow("add-to-cart", "r1", happy, ["start", "item-added", "done"], false);
expect(result.pass).toBe(true);
expect(result.text).toContain('PASS — flow "add-to-cart" run r1:');
expect(result.text).toContain("✓ start (+0ms)");
expect(result.text).toContain("✓ done (+30ms)");
});
it("fails and diffs a missing step", () => {
const result = verifyFlow("add-to-cart", "r1", [e(1, "start"), e(2, "cleared")], ["start", "item-added"], false);
expect(result.pass).toBe(false);
expect(result.text).toContain("✗ item-added — not seen");
});
it("fails on out-of-order steps", () => {
const result = verifyFlow("add-to-cart", "r1", happy, ["done", "start"], false);
expect(result.pass).toBe(false);
});
it("fails on an unexpected error point, with a ! line", () => {
const entries = [e(1, "start"), e(2, "failed", { level: "error", meta: { reason: "timeout" } })];
const result = verifyFlow("add-to-cart", "r1", entries, ["start"], false);
expect(result.pass).toBe(false);
expect(result.text).toContain('! failed [error] (+10ms) {"reason":"timeout"} — unexpected error point');
});
it("allowErrors tolerates unexpected error points", () => {
const entries = [e(1, "start"), e(2, "failed", { level: "error" })];
expect(verifyFlow("add-to-cart", "r1", entries, ["start"], true).pass).toBe(true);
});
it("an explicitly expected error step passes", () => {
const entries = [e(1, "start"), e(2, "failed", { level: "error" })];
const result = verifyFlow("add-to-cart", "r1", entries, ["start", { step: "failed", level: "error" }], false);
expect(result.pass).toBe(true);
});
it("object matchers can constrain meta", () => {
const entries = [e(1, "done", { meta: { count: 5 } })];
expect(verifyFlow("f", "r1", entries, [{ step: "done", metaIncludes: '"count":5' }], false).pass).toBe(true);
expect(verifyFlow("f", "r1", entries, [{ step: "done", metaIncludes: 'count":9' }], false).pass).toBe(false);
});
});
//# sourceMappingURL=verifyFlow.test.js.map
{"version":3,"file":"verifyFlow.test.js","sourceRoot":"","sources":["../../../src/__tests__/unit/verifyFlow.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAkB,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErE,SAAS,CAAC,CAAC,GAAW,EAAE,IAAY,EAAE,YAAqC,EAAE;IACzE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;AAC1G,CAAC;AAED,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAEjF,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,0EAA0E,EAAE,GAAG,EAAE;QAChF,MAAM,MAAM,GAAG,UAAU,CAAC,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC;QAC9F,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CA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AE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7G,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjH,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
export type FlowpointLevel = "info" | "warn" | "error";
export interface FlowpointEntry {
seq: number;
t: number;
name: string;
step: string;
run: string;
level: FlowpointLevel;
meta?: unknown;
}
export interface FlowpointSnapshot {
contextId: string;
entries: FlowpointEntry[];
}
export declare const FLOWPOINT_STORE_CAP = 2000;
export interface FlowpointStoreState {
entries: FlowpointEntry[];
cursor: number;
contextId: string | null;
}
export declare function createFlowpointStore(): FlowpointStoreState;
/** Pure drain reducer: diff a full in-app snapshot against the store. Returns entries appended. */
export declare function applyDrain(store: FlowpointStoreState, snapshot: FlowpointSnapshot): number;
export declare function buildDrainExpression(): string;
export declare function buildClearExpression(): string;
export type FlowpointMissingReason = "uninitialized" | "outdated";
export declare function parseDrainResult(raw: string): FlowpointSnapshot | {
missing: true;
reason: FlowpointMissingReason;
} | null;
export interface FlowpointFilters {
name?: string;
step?: string;
run?: string;
level?: FlowpointLevel;
metaIncludes?: string;
since?: number;
limit?: number;
}
export declare function formatMeta(meta: unknown): string;
export interface PointMatch {
step?: string;
level?: FlowpointLevel;
metaIncludes?: string;
}
export declare function matchesPoint(entry: FlowpointEntry, match: PointMatch): boolean;
/** Per flow name, the run id of the chronologically last entry. Assumes entries sorted by t. */
export declare function resolveLastRuns(entries: FlowpointEntry[]): Map<string, string>;
export declare function filterFlowpoints(entries: FlowpointEntry[], filters: FlowpointFilters): FlowpointEntry[];
/** Compact grouped text: flow → run → points with inter-point deltas. Assumes entries sorted by t. */
export declare function formatFlowpoints(entries: FlowpointEntry[]): string;
export declare function getFlowpointStore(deviceName: string): FlowpointStoreState;
/** All stored entries across devices, sorted chronologically. */
export declare function allStoredFlowpoints(): FlowpointEntry[];
/**
* Remove entries from the server stores. Cursors/contextIds are kept so cleared
* entries never re-drain. When deviceName is given, only that device's store is
* touched; otherwise all stores are.
*/
export declare function clearFlowpointStores(name?: string, deviceName?: string): number;
export declare const SDK_FLOWPOINTS_MISSING: string;
export declare const SDK_FLOWPOINTS_OUTDATED: string;
export type DrainOutcome = {
ok: true;
} | {
ok: false;
error: string;
sdkMissing?: boolean;
};
export declare function drainFlowpoints(deviceName: string, device?: string): Promise<DrainOutcome>;
export type ExpectStep = string | {
step: string;
level?: FlowpointLevel;
metaIncludes?: string;
};
export interface VerifyOutcome {
pass: boolean;
text: string;
}
/**
* Subsequence assertion: expected steps must appear in order within the run; extra
* points in between are allowed. Unexpected error-level points fail the verification
* unless allowErrors is true or the error point matched an expected step.
*/
export declare function verifyFlow(name: string, runId: string, runEntries: FlowpointEntry[], expect: ExpectStep[], allowErrors: boolean): VerifyOutcome;
//# sourceMappingURL=flowpoints.d.ts.map
{"version":3,"file":"flowpoints.d.ts","sourceRoot":"","sources":["../../src/pro/flowpoints.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,cAAc,CAAC;IACt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;IACd,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,cAAc,EAAE,EAC5B,MAAM,EAAE,UAAU,EAAE,EACpB,WAAW,EAAE,OAAO,GACrB,aAAa,CAmCf"}
import { executeInApp } from "../core/executor.js";
import { pushLogBox } from "../core/logbox.js";
export const FLOWPOINT_STORE_CAP = 2000;
export function createFlowpointStore() {
return { entries: [], cursor: 0, contextId: null };
}
/** Pure drain reducer: diff a full in-app snapshot against the store. Returns entries appended. */
export function applyDrain(store, snapshot) {
const reset = store.contextId !== snapshot.contextId;
const fresh = reset ? snapshot.entries : snapshot.entries.filter((e) => e.seq > store.cursor);
store.entries.push(...fresh);
if (store.entries.length > FLOWPOINT_STORE_CAP) {
store.entries.splice(0, store.entries.length - FLOWPOINT_STORE_CAP);
}
const maxSeq = snapshot.entries.reduce((m, e) => Math.max(m, e.seq), 0);
store.cursor = reset ? maxSeq : Math.max(store.cursor, maxSeq);
store.contextId = snapshot.contextId;
return fresh.length;
}
export function buildDrainExpression() {
return `(() => {
const g = globalThis.__EXECBRO__ ?? globalThis.__RN_AI_DEVTOOLS__;
if (!g || typeof g.getFlowpointSnapshot !== "function") {
const reason = g ? "outdated" : "uninitialized";
if (!globalThis.__EXECBRO_FLOWPOINT_WARNED__) {
globalThis.__EXECBRO_FLOWPOINT_WARNED__ = true;
console.warn(reason === "outdated"
? "[execbro] An AI agent tried to use flowpoints, but this app's execbro-sdk version does not support them. Upgrade it: npm install execbro-sdk@latest, then reload."
: "[execbro] An AI agent tried to use flowpoints, but execbro-sdk is not initialized. Install it (npm install execbro-sdk) and call init() at app start.");
}
return JSON.stringify({ __missing: true, __reason: reason });
}
const s = g.getFlowpointSnapshot();
const entries = s.entries.map((e) => {
try { JSON.stringify(e.meta); return e; }
catch { return Object.assign({}, e, { meta: { __error: "meta not JSON-serializable" } }); }
});
return JSON.stringify({ contextId: s.contextId, entries });
})()`;
}
export function buildClearExpression() {
return `(() => {
const g = globalThis.__EXECBRO__ ?? globalThis.__RN_AI_DEVTOOLS__;
return g && typeof g.clearFlowpoints === "function" ? String(g.clearFlowpoints()) : "0";
})()`;
}
export function parseDrainResult(raw) {
try {
const parsed = JSON.parse(raw);
if (parsed && parsed.__missing === true) {
return { missing: true, reason: parsed.__reason === "outdated" ? "outdated" : "uninitialized" };
}
if (parsed && typeof parsed.contextId === "string" && Array.isArray(parsed.entries)) {
return parsed;
}
return null;
}
catch {
return null;
}
}
export function formatMeta(meta) {
if (meta === undefined)
return "";
if (typeof meta === "string")
return meta;
try {
return JSON.stringify(meta);
}
catch {
return String(meta);
}
}
export function matchesPoint(entry, match) {
if (match.step !== undefined && entry.step !== match.step)
return false;
if (match.level !== undefined && entry.level !== match.level)
return false;
if (match.metaIncludes !== undefined &&
!formatMeta(entry.meta).toLowerCase().includes(match.metaIncludes.toLowerCase())) {
return false;
}
return true;
}
/** Per flow name, the run id of the chronologically last entry. Assumes entries sorted by t. */
export function resolveLastRuns(entries) {
const last = new Map();
for (const entry of entries) {
last.set(entry.name, entry.run);
}
return last;
}
export function filterFlowpoints(entries, filters) {
let result = entries;
if (filters.name !== undefined)
result = result.filter((e) => e.name === filters.name);
if (filters.run === "last") {
const lastRuns = resolveLastRuns(result);
result = result.filter((e) => lastRuns.get(e.name) === e.run);
}
else if (filters.run !== undefined) {
result = result.filter((e) => e.run === filters.run);
}
if (filters.step !== undefined)
result = result.filter((e) => e.step === filters.step);
if (filters.level !== undefined)
result = result.filter((e) => e.level === filters.level);
if (filters.metaIncludes !== undefined) {
const needle = filters.metaIncludes.toLowerCase();
result = result.filter((e) => formatMeta(e.meta).toLowerCase().includes(needle));
}
if (filters.since !== undefined)
result = result.filter((e) => e.t > filters.since);
const limit = filters.limit ?? 200;
if (result.length > limit)
result = result.slice(result.length - limit);
return result;
}
function formatPointLine(entry, t0, indent) {
const delta = `+${entry.t - t0}ms`.padEnd(9);
const levelPrefix = entry.level !== "info" ? `[${entry.level}] ` : "";
const meta = entry.meta !== undefined ? ` ${formatMeta(entry.meta)}` : "";
return `${indent}${delta}${levelPrefix}${entry.step}${meta}`;
}
function formatRunBlock(runId, runEntries, latest, indent) {
const span = runEntries[runEntries.length - 1].t - runEntries[0].t;
const label = latest ? ` (latest)` : "";
const header = `${indent}run ${runId}${label} — ${runEntries.length} points (${span}ms span):`;
const lines = runEntries.map((e) => formatPointLine(e, runEntries[0].t, indent + " "));
return [header, ...lines].join("\n");
}
/** Compact grouped text: flow → run → points with inter-point deltas. Assumes entries sorted by t. */
export function formatFlowpoints(entries) {
const lastRuns = resolveLastRuns(entries);
const byName = new Map();
for (const entry of entries) {
let runs = byName.get(entry.name);
if (!runs) {
runs = new Map();
byName.set(entry.name, runs);
}
let run = runs.get(entry.run);
if (!run) {
run = [];
runs.set(entry.run, run);
}
run.push(entry);
}
const blocks = [];
for (const [name, runs] of byName) {
const runIds = [...runs.keys()];
if (runIds.length === 1) {
const runEntries = runs.get(runIds[0]);
const span = runEntries[runEntries.length - 1].t - runEntries[0].t;
const header = `Flow "${name}" run ${runIds[0]} — ${runEntries.length} points (${span}ms span):`;
blocks.push([header, ...runEntries.map((e) => formatPointLine(e, runEntries[0].t, " "))].join("\n"));
}
else {
const header = `Flow "${name}" — ${runIds.length} runs`;
const runBlocks = runIds.map((id) => formatRunBlock(id, runs.get(id), id === lastRuns.get(name), " "));
blocks.push([header, ...runBlocks].join("\n"));
}
}
return blocks.join("\n\n");
}
const flowpointStores = new Map();
export function getFlowpointStore(deviceName) {
let store = flowpointStores.get(deviceName);
if (!store) {
store = createFlowpointStore();
flowpointStores.set(deviceName, store);
}
return store;
}
/** All stored entries across devices, sorted chronologically. */
export function allStoredFlowpoints() {
const all = [];
for (const store of flowpointStores.values()) {
all.push(...store.entries);
}
return all.sort((a, b) => a.t - b.t);
}
/**
* Remove entries from the server stores. Cursors/contextIds are kept so cleared
* entries never re-drain. When deviceName is given, only that device's store is
* touched; otherwise all stores are.
*/
export function clearFlowpointStores(name, deviceName) {
let removed = 0;
const stores = deviceName !== undefined ? [getFlowpointStore(deviceName)] : [...flowpointStores.values()];
for (const store of stores) {
if (name === undefined) {
removed += store.entries.length;
store.entries = [];
}
else {
const before = store.entries.length;
store.entries = store.entries.filter((e) => e.name !== name);
removed += before - store.entries.length;
}
}
return removed;
}
const LOGBOX_FLOWPOINTS_OUTDATED = "An AI agent tried to use flowpoints, but this app's execbro-sdk version does not support them.\n" +
"Upgrade it: npm install execbro-sdk@latest, then rebuild/reload.";
const LOGBOX_FLOWPOINTS_UNINITIALIZED = "An AI agent tried to use flowpoints, but execbro-sdk is not initialized.\n" +
"Install it (npm install execbro-sdk) and call init() at app start.";
// Once per device+reason per server session — LogBox banners must not repeat on every poll.
const flowpointLogBoxNotified = new Set();
export const SDK_FLOWPOINTS_MISSING = "Flowpoints require the execbro-sdk: npm install execbro-sdk, call init() at app start, " +
"then instrument the flow with flowpoint({ name, step }). Older SDK versions without " +
"flowpoint support must be upgraded. A notice with these instructions was also shown on " +
'the device (LogBox error banner). See get_usage_guide(topic="flowpoints").';
export const SDK_FLOWPOINTS_OUTDATED = "This app's execbro-sdk version predates flowpoints. Upgrade it (npm install execbro-sdk@latest), " +
"rebuild/reload the app, then retry. A notice with these instructions was also shown on the " +
'device (LogBox error banner). See get_usage_guide(topic="flowpoints").';
export async function drainFlowpoints(deviceName, device) {
const result = await executeInApp(buildDrainExpression(), false, { timeoutMs: 5000, originatingToolName: "flowpoints" }, device);
if (!result.success) {
return { ok: false, error: result.error || "executeInApp failed" };
}
const parsed = parseDrainResult(result.result ?? "");
if (parsed === null) {
return { ok: false, error: "Failed to parse flowpoint snapshot from the app" };
}
if ("missing" in parsed) {
const notifyKey = `${deviceName}:${parsed.reason}`;
if (!flowpointLogBoxNotified.has(notifyKey)) {
flowpointLogBoxNotified.add(notifyKey);
await pushLogBox(parsed.reason === "outdated" ? LOGBOX_FLOWPOINTS_OUTDATED : LOGBOX_FLOWPOINTS_UNINITIALIZED, "error", false, "logbox", "Flowpoints", device);
}
return {
ok: false,
error: parsed.reason === "outdated" ? SDK_FLOWPOINTS_OUTDATED : SDK_FLOWPOINTS_MISSING,
sdkMissing: true,
};
}
applyDrain(getFlowpointStore(deviceName), parsed);
return { ok: true };
}
/**
* Subsequence assertion: expected steps must appear in order within the run; extra
* points in between are allowed. Unexpected error-level points fail the verification
* unless allowErrors is true or the error point matched an expected step.
*/
export function verifyFlow(name, runId, runEntries, expect, allowErrors) {
const matchers = expect.map((x) => (typeof x === "string" ? { step: x } : x));
const t0 = runEntries.length > 0 ? runEntries[0].t : 0;
const matchedIndexes = new Set();
const lines = [];
let pass = true;
let cursor = 0;
for (const matcher of matchers) {
let found = -1;
for (let i = cursor; i < runEntries.length; i++) {
if (matchesPoint(runEntries[i], matcher)) {
found = i;
break;
}
}
if (found === -1) {
pass = false;
lines.push(` ✗ ${matcher.step} — not seen`);
}
else {
matchedIndexes.add(found);
cursor = found + 1;
lines.push(` ✓ ${matcher.step} (+${runEntries[found].t - t0}ms)`);
}
}
if (!allowErrors) {
runEntries.forEach((entry, i) => {
if (entry.level === "error" && !matchedIndexes.has(i)) {
pass = false;
const meta = entry.meta !== undefined ? ` ${formatMeta(entry.meta)}` : "";
lines.push(` ! ${entry.step} [error] (+${entry.t - t0}ms)${meta} — unexpected error point`);
}
});
}
const header = `${pass ? "PASS" : "FAIL"} — flow "${name}" run ${runId}:`;
return { pass, text: [header, ...lines].join("\n") };
}
//# sourceMappingURL=flowpoints.js.map
{"version":3,"file":"flowpoints.js","sourceRoot":"","sources":["../../src/pro/flowpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAmB/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC;AAQxC,MAAM,UAAU,oBAAoB;IAChC,OAAO,EAA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jD,CAAC;aAAM,CAAC;YACJ,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC1B,MAAM,GAAG,KAAK,GAAG,CAAC,CAAC;YACnB,KAAK,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,IAAI,MAAM,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACvE,CAAC;IACL,CAAC;IACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;YAC5B,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpD,IAAI,GAAG,KAAK,CAAC;gBACb,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1E,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,cAAc,KAAK,CAAC,CAAC,GAAG,EAAE,MAAM,IAAI,2BAA2B,CAAC,CAAC;YACjG,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACD,MAAM,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,YAAY,IAAI,SAAS,KAAK,GAAG,CAAC;IAC1E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACzD,CAAC"}
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
export declare function resolveTargetDeviceName(device?: string): string;
export declare function registerFlowpointTools(server: McpServer): void;
//# sourceMappingURL=flowpointTools.d.ts.map
{"version":3,"file":"flowpointTools.d.ts","sourceRoot":"","sources":["../../src/pro/flowpointTools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA0BzE,wBAAgB,uBAAuB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAS/D;AAOD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAkR9D"}
import { z } from "zod";
import { registerToolWithTelemetry } from "../core/register.js";
import { getConnectedAppByDevice, getFirstConnectedApp, executeInApp } from "../core/index.js";
import { UserInputError } from "../core/errors.js";
import { allStoredFlowpoints, clearFlowpointStores, drainFlowpoints, filterFlowpoints, formatFlowpoints, formatMeta, getFlowpointStore, matchesPoint, buildClearExpression, verifyFlow, resolveLastRuns, } from "./flowpoints.js";
const NO_FLOWPOINTS_HINT = "No flowpoints captured. Instrument the flow under test (execbro-sdk required):\n\n" +
" import { flowpoint } from 'execbro-sdk'\n" +
" flowpoint({ name: 'my-flow', step: 'start', begin: true })\n" +
" flowpoint({ name: 'my-flow', step: 'done', meta: { anything: true } })\n\n" +
"Then reload the app, drive the flow, and query again. " +
'See get_usage_guide(topic="flowpoints").';
export function resolveTargetDeviceName(device) {
if (device) {
const app = getConnectedAppByDevice(device);
if (!app)
throw new UserInputError(`No connected device matches "${device}"`);
return app.deviceInfo.deviceName || app.deviceInfo.title || "unknown";
}
const first = getFirstConnectedApp();
if (!first)
throw new UserInputError("No connected app. Run scan_metro first.");
return first.deviceInfo.deviceName || first.deviceInfo.title || "unknown";
}
const deviceParam = z
.string()
.optional()
.describe("Target device name (substring match). Omit for all devices. Run get_apps to see connected devices.");
export function registerFlowpointTools(server) {
registerToolWithTelemetry(server, "get_flowpoints", {
description: "Read flowpoint breadcrumbs — structured, timestamped points emitted by flowpoint() calls " +
"(execbro-sdk) — grouped by flow and run, with inter-point timing deltas.\n" +
"PURPOSE: verify what actually happened inside a flow (steps, order, timing, failures) " +
"instead of inferring it from console logs.\n" +
"WHEN TO USE: after driving an instrumented flow; or with level: 'error' to ask " +
'"did any flow fail?" across all flows at once.\n' +
"WORKFLOW: instrument with flowpoint() -> reload -> drive the flow -> " +
"wait_for_flowpoint (sync) -> verify_flow (assert) -> get_flowpoints (inspect details).\n" +
"LIMITATIONS: requires execbro-sdk init() and flowpoint() instrumentation in app code.\n" +
"GOOD: get_flowpoints({ name: 'add-to-cart', run: 'last' }) after a retry.\n" +
"BAD: polling get_flowpoints in a loop — use wait_for_flowpoint instead.\n" +
'SEE ALSO: call get_usage_guide(topic="flowpoints") for the full playbook.',
inputSchema: {
name: z.string().optional().describe("Filter to one flow name. Omit for all flows."),
step: z.string().optional().describe("Filter to one step label (exact match)."),
run: z
.string()
.optional()
.describe("Filter to one run id, or 'last' for the most recent run per flow."),
level: z.enum(["info", "warn", "error"]).optional().describe("Filter by severity."),
metaIncludes: z
.string()
.optional()
.describe("Case-insensitive substring match against the stringified meta payload."),
since: z.number().optional().describe("Epoch-ms lower bound on the point timestamp (exclusive)."),
limit: z.number().optional().default(200).describe("Max points returned, newest kept (default 200)."),
device: deviceParam,
},
}, async ({ name, step, run, level, metaIncludes, since, limit, device }) => {
const deviceName = resolveTargetDeviceName(device);
const drained = await drainFlowpoints(deviceName, device);
if (!drained.ok) {
return { isError: true, content: [{ type: "text", text: drained.error }] };
}
const sourceEntries = device ? getFlowpointStore(deviceName).entries : allStoredFlowpoints();
const entries = filterFlowpoints(sourceEntries, {
name,
step,
run,
level,
metaIncludes,
since,
limit,
});
if (entries.length === 0) {
if (sourceEntries.length === 0) {
return { content: [{ type: "text", text: NO_FLOWPOINTS_HINT }] };
}
return {
content: [
{
type: "text",
text: `${sourceEntries.length} flowpoints stored, but 0 matched your filters. ` +
"Loosen or drop filters (name/step/run/level/metaIncludes/since) to see them.",
},
],
};
}
const flows = new Set(entries.map((e) => e.name)).size;
return {
content: [
{
type: "text",
text: `Flowpoints (${entries.length} points, ${flows} flow${flows === 1 ? "" : "s"}):\n\n${formatFlowpoints(entries)}`,
},
],
};
}, (result) => !!result?.content?.[0]?.text?.startsWith("No flowpoints captured"));
registerToolWithTelemetry(server, "clear_flowpoints", {
description: "Clear stored flowpoints.\n" +
"PURPOSE: reset flowpoint history between test sessions.\n" +
"WHEN TO USE: rarely — prefer begin: true + run: 'last' filtering between attempts. " +
"With name: clears one flow from the server store only (cleared entries never re-drain). " +
"Without name: clears everything server-side AND the in-app buffer.",
inputSchema: {
name: z.string().optional().describe("Clear only this flow (server-side). Omit to clear all."),
device: z
.string()
.optional()
.describe("Target device (substring match). Scopes both the server-store clear and the in-app " +
"buffer clear. Omit for all devices."),
},
}, async ({ name, device }) => {
const deviceName = device ? resolveTargetDeviceName(device) : undefined;
let cleared = clearFlowpointStores(name, deviceName);
let caveat = "";
if (!name) {
const result = await executeInApp(buildClearExpression(), false, { timeoutMs: 3000, originatingToolName: "clear_flowpoints" }, device);
if (result.success) {
const inApp = parseInt(result.result || "0", 10);
if (!isNaN(inApp))
cleared = Math.max(cleared, inApp);
}
else {
caveat = " (in-app buffer clear failed — still-buffered points may re-drain after the next app event)";
}
}
const scope = name ? ` for flow "${name}"` : "";
return { content: [{ type: "text", text: `Cleared ${cleared} flowpoints${scope}.${caveat}` }] };
});
registerToolWithTelemetry(server, "wait_for_flowpoint", {
description: "Block until a flowpoint matching the criteria arrives, or timeout.\n" +
"PURPOSE: deterministic synchronization for drive-then-verify — act first, then block on the flow's " +
"terminal step instead of sleeping and re-polling.\n" +
"WHEN TO USE: after tapping/driving an instrumented flow, with the flow's terminal step.\n" +
"Points emitted after your action but before this call still match (only points already " +
"seen by a previous flowpoint tool call are excluded).\n" +
"On timeout, returns whatever points DID arrive for the flow — that partial trail is the " +
"diagnostic for what stalled.\n" +
'SEE ALSO: get_usage_guide(topic="flowpoints").',
inputSchema: {
name: z.string().describe("Flow name to watch."),
step: z.string().optional().describe("Step label to wait for (exact match). Omit to match any step."),
level: z.enum(["info", "warn", "error"]).optional().describe("Only match this severity."),
metaIncludes: z
.string()
.optional()
.describe("Case-insensitive substring the stringified meta must contain."),
timeoutMs: z.number().optional().default(5000).describe("Max wait in ms (default 5000, cap 30000)."),
device: deviceParam,
},
}, async ({ name, step, level, metaIncludes, timeoutMs, device }) => {
const effectiveTimeout = Math.min(timeoutMs, 30000);
const deviceName = resolveTargetDeviceName(device);
const store = getFlowpointStore(deviceName);
const baselineEntry = store.entries.length > 0 ? store.entries[store.entries.length - 1] : null;
const start = Date.now();
const deadline = start + effectiveTimeout;
const freshEntries = () => {
const startIdx = baselineEntry ? store.entries.indexOf(baselineEntry) + 1 : 0;
return store.entries.slice(startIdx).filter((e) => e.name === name);
};
for (;;) {
const remaining = deadline - Date.now();
if (remaining > 0) {
const drained = await Promise.race([
drainFlowpoints(deviceName, device),
new Promise((resolve) => setTimeout(() => resolve(null), remaining)),
]);
if (drained && !drained.ok) {
return { isError: true, content: [{ type: "text", text: drained.error }] };
}
}
const fresh = freshEntries();
const match = fresh.find((e) => matchesPoint(e, { step, level, metaIncludes }));
if (match) {
const meta = match.meta !== undefined ? `\nmeta: ${formatMeta(match.meta)}` : "";
return {
content: [
{
type: "text",
text: `Matched after ${Date.now() - start}ms: flow "${match.name}" ` +
`run ${match.run} step "${match.step}" [${match.level}]${meta}`,
},
],
};
}
if (Date.now() >= deadline) {
const trail = fresh.length
? `Points that DID arrive for "${name}" during the wait:\n\n${formatFlowpoints(fresh)}`
: `No new points arrived for flow "${name}" during the wait.`;
return {
content: [
{
type: "text",
text: `Timeout after ${effectiveTimeout}ms waiting for flow "${name}"${step ? ` step "${step}"` : ""}.\n${trail}`,
},
],
};
}
await new Promise((resolve) => setTimeout(resolve, Math.min(250, Math.max(1, deadline - Date.now()))));
}
});
registerToolWithTelemetry(server, "verify_flow", {
description: "Assert a flow behaved as expected: compare the actual flowpoint trail of one run " +
"against an expected step sequence and get a factual PASS/FAIL diff.\n" +
"PURPOSE: factual PASS/FAIL assertion of a flow run against an expected step sequence.\n" +
"WHEN TO USE: after wait_for_flowpoint confirms the flow finished; or write the expectation first " +
"(runtime TDD) and iterate until PASS.\n" +
"Matching is subsequence: expected steps must appear in order; extra points in between " +
"are fine. Any unexpected error-level point fails the run unless allowErrors is true or " +
"that step is explicitly expected.\n" +
"WORKFLOW: write the expected sequence (even before implementing — runtime TDD), drive " +
"the flow, wait_for_flowpoint on the terminal step, then verify_flow.\n" +
'SEE ALSO: get_usage_guide(topic="flowpoints").',
inputSchema: {
name: z.string().describe("Flow name to verify."),
expect: z
.array(z.union([
z.string(),
z.object({
step: z.string(),
level: z.enum(["info", "warn", "error"]).optional(),
metaIncludes: z.string().optional(),
}),
]))
.describe("Expected step sequence, in order. Strings are shorthand for { step }."),
run: z.string().optional().default("last").describe("Run id to check, or 'last' (default)."),
allowErrors: z
.boolean()
.optional()
.default(false)
.describe("Tolerate unexpected error-level points (default false)."),
device: deviceParam,
},
}, async ({ name, expect: expected, run, allowErrors, device }) => {
const deviceName = resolveTargetDeviceName(device);
const drained = await drainFlowpoints(deviceName, device);
if (!drained.ok) {
return { isError: true, content: [{ type: "text", text: drained.error }] };
}
const sourceEntries = device ? getFlowpointStore(deviceName).entries : allStoredFlowpoints();
const flowEntries = sourceEntries.filter((e) => e.name === name);
if (flowEntries.length === 0) {
return {
content: [
{
type: "text",
text: `No flowpoints recorded for flow "${name}".\n\n${NO_FLOWPOINTS_HINT}`,
},
],
};
}
const runId = run === "last" || run === undefined ? resolveLastRuns(flowEntries).get(name) : run;
const runEntries = flowEntries.filter((e) => e.run === runId);
if (runEntries.length === 0) {
return {
isError: true,
content: [{ type: "text", text: `No entries for flow "${name}" run "${runId}".` }],
};
}
const result = verifyFlow(name, runId, runEntries, expected, allowErrors ?? false);
// A FAIL verdict is a successful verification, not a tool error — never set isError for it.
return { content: [{ type: "text", text: result.text }] };
});
}
//# sourceMappingURL=flowpointTools.js.map
{"version":3,"file":"flowpointTools.js","sourceRoot":"","sources":["../../src/pro/flowpointTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK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E,CAAC,CAAC,CAAC,GAAG,CAAC;QAClG,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC;QAC9D,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO;gBACH,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,wBAAwB,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;aAC9F,CAAC;QACN,CAAC;QACD,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,IAAI,KAAK,CAAC,CAAC;QACnF,4FAA4F;QAC5F,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;IACvE,CAAC,CACJ,CAAC;AACN,CAAC"}
+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"guides.d.ts","sourceRoot":"","sources":["../../src/core/guides.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB;AAiWD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,MAchB,CAAC;AAEb,wBAAgB,gBAAgB,IAAI,MAAM,CAWzC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI5D;AAED,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C"}
{"version":3,"file":"guides.d.ts","sourceRoot":"","sources":["../../src/core/guides.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB;AA4YD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,MAehB,CAAC;AAEb,wBAAgB,gBAAgB,IAAI,MAAM,CAWzC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI5D;AAED,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C"}

@@ -205,3 +205,4 @@ /**

- Use verbose=true with low maxLogs for full error details
- Use startFromText to begin reading from a specific point`
- Use startFromText to begin reading from a specific point
- Instrumenting a flow to verify behavior? Prefer flowpoint() over console.log — see get_usage_guide(topic="flowpoints")`
},

@@ -354,2 +355,44 @@ {

- No GitHub account setup or CLI tools needed — just a browser`
},
{
id: "flowpoints",
title: "Flowpoints — Flow Tracing & Verification",
summary: "Instrument app flows with flowpoint() breadcrumbs, then query, wait on, and assert them",
content: `# Flowpoints — Flow Tracing & Verification
Flowpoints are structured, timestamped breadcrumbs emitted by flowpoint() calls in app
code (execbro-sdk). They replace console.log spraying when you need to VERIFY what a
flow actually did — steps, order, timing, failures — with factual assertions.
## Workflow (verify a flow)
1. Instrument the flow (edit app code; execbro-sdk must be installed and init()-ed):
import { flowpoint } from 'execbro-sdk'
flowpoint({ name: 'add-to-cart', step: 'start', begin: true }) // flow entry
flowpoint({ name: 'add-to-cart', step: 'cleared', meta: { removed: 3 } })
flowpoint({ name: 'add-to-cart', step: 'done' })
flowpoint({ name: 'add-to-cart', step: 'failed', level: 'error' }) // error paths
2. Reload the app so the instrumented code is live.
3. Drive the flow (tap, swipe, input).
4. wait_for_flowpoint({ name: 'add-to-cart', step: 'done' }) — blocks until the flow
finishes instead of sleeping and re-polling.
5. verify_flow({ name: 'add-to-cart', expect: ['start', 'cleared', 'done'] }) —
factual PASS/FAIL diff against the expected sequence.
6. get_flowpoints({ name: 'add-to-cart', run: 'last' }) — full trail with timing
deltas when diagnosing a failure.
## Key Tools
- get_flowpoints: query the trail (filters: name, step, run, level, metaIncludes, since)
- wait_for_flowpoint: block until a matching point arrives (or timeout with partial trail)
- verify_flow: assert an expected step sequence against one run (any unexpected error-level point fails it unless allowErrors: true)
- clear_flowpoints: reset stored points (name-scoped clears touch only the server store; rarely needed — prefer run filters)
## Tips
- Prefer flowpoint() over console.log when instrumenting a flow to verify behavior.
- Keep name and step low-cardinality and stable; dynamic payload goes in meta.
- begin: true on the flow's entry point separates retries into runs; run: 'last'
queries only the newest attempt.
- get_flowpoints({ level: 'error' }) answers "did anything fail?" across every flow.
- flowpoint() is a production no-op — instrumentation can stay in the code.
- Runtime TDD: write the verify_flow expectation FIRST, then implement until it passes.
- verify_flow FAILS on any unexpected error-level point in the run — pass allowErrors: true to tolerate them, or include the error step in expect.`
}

@@ -368,11 +411,12 @@ ];

"Call get_usage_guide(topic=...) for end-to-end workflows. Available topics:",
" setup — session setup (scan_metro, connect_metro, ensure_connection)",
" logs — console debugging (get_logs, search_logs)",
" interact — device interaction (tap, swipe, screenshots, android_input_text, clear_focused_input, dismiss_keyboard)",
" layout — on-screen layout check (get_screen_layout, get_pressable_elements)",
" inspect — component inspection (find_components, inspect_component, get_inspector_selection)",
" network — network request inspection (get_network_requests, search_network)",
" state — app state & JS execution (execute_in_app, list_debug_globals)",
" bundle — bundle / Metro error checks (get_bundle_status, get_bundle_errors)",
" feedback — share feedback, feature requests, or bug reports (send_feedback)"
" setup — session setup (scan_metro, connect_metro, ensure_connection)",
" logs — console debugging (get_logs, search_logs)",
" interact — device interaction (tap, swipe, screenshots, android_input_text, clear_focused_input, dismiss_keyboard)",
" layout — on-screen layout check (get_screen_layout, get_pressable_elements)",
" inspect — component inspection (find_components, inspect_component, get_inspector_selection)",
" network — network request inspection (get_network_requests, search_network)",
" flowpoints — verify a flow's behavior (flowpoint() breadcrumbs, wait_for_flowpoint, verify_flow)",
" state — app state & JS execution (execute_in_app, list_debug_globals)",
" bundle — bundle / Metro error checks (get_bundle_status, get_bundle_errors)",
" feedback — share feedback, feature requests, or bug reports (send_feedback)"
].join("\n");

@@ -379,0 +423,0 @@ export function getGuideOverview() {

@@ -1,1 +0,1 @@

{"version":3,"file":"guides.js","sourceRoot":"","sources":["../../src/core/guides.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,MAAM,GAAY;IACpB;QACI,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,eAAe;QACtB,OAAO,EAAE,yDAAyD;QAClE,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA8B8B;KAC1C;IACD;QACI,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,sBAAsB;QAC7B,OAAO,EAAE,mFAAmF;QAC5F,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iIAsCgH;KAC5H;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,kBAAkB;QACzB,OAAO,EAAE,0EAA0E;QACnF,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;0FA4ByE;KACrF;IACD;QACI,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE,wDAAwD;QACjE,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAyDwB;KACpC;IACD;QACI,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,8DAA8D;QACvE,OAAO,EAAE;;;;;;;;;;;;;;;;;;2DAkB0C;KACtD;IACD;QACI,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE,oEAAoE;QAC7E,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0FAuCyE;KACrF;IACD;QACI,EAAE,E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AE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,KAAK,CAAC,OAAO,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAC9B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC"}

@@ -1,1 +0,1 @@

{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAkC,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAiBlF,OAAO,EAAE,YAAY,EAAE,CAAC"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAkC,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAkBlF,OAAO,EAAE,YAAY,EAAE,CAAC"}

@@ -23,2 +23,3 @@ #!/usr/bin/env node

import { registerComponentTools } from "./tools/componentTools.js";
import { registerFlowpointTools } from "./pro/flowpointTools.js";
// Re-export so tests (src/__tests__/unit/toolDescriptions.test.ts) can enumerate

@@ -49,2 +50,3 @@ // registered tools without booting the server.

registerNetworkTools(server);
registerFlowpointTools(server);
registerBundleTools(server);

@@ -51,0 +53,0 @@ registerDeviceTools(server);

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,C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 import { z } from "zod";

.optional()
.describe("Topic to get the full guide for. Available topics: setup, inspect, layout, interact, logs, network, state, bundle. Omit to see the overview of all topics.")
.describe("Topic to get the full guide for. Available topics: setup, inspect, layout, interact, logs, network, state, bundle, feedback, flowpoints. Omit to see the overview of all topics.")
}

@@ -20,0 +20,0 @@ }, async ({ topic }) => {

@@ -1,1 +0,1 @@

{"version":3,"file":"metaTools.js","sourceRoot":"","sources":["../../src/tools/metaTools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAE5C,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOtE,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,IAAqB;IACtE,+BAA+B;IAC/B,yBAAyB,CACrB,MAAM,EACN,iBAAiB,EACjB;QACI,WAAW,EACP,4NAA4N;QAChO,WAAW,EAAE;YACT,KAAK,EAAE,CAAC;iBACH,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACL,4JAA4J,CAC/J;SACR;KACJ,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QAChB,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,OAAO;gBACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAg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C,CAAC,CAAC,CAAC;qBACpD,CAAC;gBACN,CAAC,CAAC,CAAC;gBACP,OAAO;oBACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;iBAC7E,CAAC;YACN,CAAC;YAED,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;gBACpB,IAAI,CAAC,IAAI,EAAE,CAAC;oBACR,OAAO;wBACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,2DAA2D,EAAE,CAAC;wBACvG,OAAO,EAAE,IAAI;qBAChB,CAAC;gBACN,CAAC;gBACD,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrC,IAAI,CAAC,KAAK,EAAE,CAAC;oBACT,OAAO;wBACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,gBAAgB,IAAI,wDAAwD,EAAE,CAAC;wBACxH,OAAO,EAAE,IAAI;qBAChB,CAAC;gBACN,CAAC;gBACD,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;YAC3C,CAAC;YAED,OAAO;gBACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,wCAAwC,EAAE,CAAC;gBACpF,OAAO,EAAE,IAAI;aAChB,CAAC;QACN,CAAC,CACJ,CAAC;IACN,CAAC;AACL,CAAC;AACD,sDAAsD"}
{
"name": "execbro",
"version": "1.10.16",
"version": "1.10.17",
"description": "ExecBro — MCP server giving AI agents eyes and hands into React Native apps. Logs, REPL, state inspection, tap, screenshot.",

@@ -5,0 +5,0 @@ "type": "module",

+50
-361
# ExecBro
> [!IMPORTANT]
> **Already using ExecBro?** `npx` caches packages indefinitely, so you may be stuck on an old version without realizing it. Update your MCP config to use `npx -y execbro@latest` (see [Setup](#setup)) so every session pulls the latest release with new tools and bug fixes. New installs after this change auto-update automatically.
> Ships as the npm package `execbro`. Legacy `react-native-ai-devtools` and `react-native-ai-debugger` packages keep receiving identical builds via mirror-publish.
**Give your AI assistant eyes and hands into your running React Native app.** Like Chrome DevTools — but for AI agents.

@@ -21,17 +16,9 @@

1. [Setup ExecBro as an MCP server for your agent of choice](#setup)
2. [Setup UI automation helpers](#ios-simulator--ui-automation-setup)
2. [Setup UI automation helpers](docs/setup.md#ios-simulator--ui-automation-setup)
3. [Install the SDK for richer capture](#install-the-sdk-recommended) — optional, but recommended for the most robust log, network, and state experience
## Feedback & Feature Requests
## See your usage — [execbro.com](https://execbro.com)
**Please run this at the end of your session to help me make the tools better.** ExecBro is built for AI agents, so the most valuable feedback comes from the agent itself — paste this prompt to your agent:
Log in at **[execbro.com](https://execbro.com)** to see your ExecBro activity rendered back to you: which tools you use most, tool **error rates**, and your **session history** — so you can spot flaky tools, track usage over time, and understand how your agent drives the app across sessions. It's built from the same anonymous telemetry described in [Telemetry & Privacy](#telemetry--privacy), tied to your installation ID.
> Write a report about your experience with the ExecBro tools — where you were struggling and what could be improved. Save it as a Markdown file for me, then submit it using the `send_feedback` tool (type `"feedback"`) so it becomes a GitHub issue.
It takes 30 seconds: your agent runs `send_feedback`, hands you a pre-filled GitHub issue URL (environment info already attached), and you click submit — no GitHub setup, no copy-pasting. Real friction logs from real sessions are what shape the roadmap and get fixed first, so please send one. 🙏 And if you just have a quick idea or question, drop into [GitHub Discussions](https://github.com/igorzheludkov/execbro/discussions) to share feedback, request features, and vote on what gets built next.
## Pricing
ExecBro is **free and open** — every feature, no usage limits, no account required. Use it as much as you like. The tools you run locally stay free; that's the model.
## Features

@@ -74,212 +61,12 @@

No installation required — every client below uses `npx` to fetch the latest version on demand. Pick your agent:
Add ExecBro to Claude Code in one command — no installation, `npx` fetches the latest version on demand:
- [Claude Code](#claude-code) · [Claude Desktop](#claude-desktop) · [Codex CLI](#codex-cli-openai) · [Cursor](#cursor) · [VS Code Copilot](#vs-code-copilot) · [Windsurf](#windsurf) · [Zed](#zed) · [Gemini CLI](#gemini-cli)
After adding the server, fully restart the client (quit and relaunch, not just reload) so it picks up the new configuration.
### Legacy package names
The npm package was previously published as `react-native-ai-devtools` and before that as `react-native-ai-debugger`. Both legacy names continue to receive identical builds via mirror-publish — existing installations and MCP configs keep working unchanged. New installs should use `execbro`.
### Claude Code
```bash
# Global (all projects)
claude mcp add execbro --scope user -- npx -y execbro@latest
# Project-specific
claude mcp add execbro --scope project -- npx -y execbro@latest
```
Or edit `~/.claude.json` (user) / `.mcp.json` (project) manually:
Then fully restart the client (quit and relaunch) so it picks up the new server.
```json
{
"mcpServers": {
"execbro": {
"type": "stdio",
"command": "npx",
"args": ["-y", "execbro@latest"]
}
}
}
```
**Using a different client or need platform setup?** The [full setup guide](docs/setup.md) covers Claude Desktop, Codex CLI, Cursor, VS Code Copilot, Windsurf, Zed, and Gemini CLI, plus [Android](docs/setup.md#android) and [iOS simulator UI automation](docs/setup.md#ios-simulator--ui-automation-setup) requirements.
### Claude Desktop
Edit the config at:
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"execbro": {
"command": "npx",
"args": ["-y", "execbro@latest"]
}
}
}
```
You can also open this file from **Settings → Developer → Edit Config**. Fully quit and relaunch Claude Desktop after saving.
### Codex CLI (OpenAI)
```bash
codex mcp add execbro -- npx -y execbro@latest
```
Or edit `~/.codex/config.toml` directly:
```toml
[mcp_servers.execbro]
command = "npx"
args = ["-y", "execbro@latest"]
```
### Cursor
[Docs](https://docs.cursor.com/context/model-context-protocol). Add via `Cmd+Shift+P` → "View: Open MCP Settings", or edit `.cursor/mcp.json` (project) / `~/.cursor/mcp.json` (global):
```json
{
"mcpServers": {
"execbro": {
"command": "npx",
"args": ["-y", "execbro@latest"]
}
}
}
```
### VS Code Copilot
Requires VS Code 1.102+ with Copilot ([docs](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)). Add via `Cmd+Shift+P` → "MCP: Add Server", or edit `.vscode/mcp.json`:
```json
{
"servers": {
"execbro": {
"type": "stdio",
"command": "npx",
"args": ["-y", "execbro@latest"]
}
}
}
```
### Windsurf
[Docs](https://docs.windsurf.com/windsurf/cascade/mcp). Edit `~/.codeium/windsurf/mcp_config.json`:
```json
{
"mcpServers": {
"execbro": {
"command": "npx",
"args": ["-y", "execbro@latest"]
}
}
}
```
### Zed
[Docs](https://zed.dev/docs/ai/mcp). Open the Agent Panel settings → "Add Custom Server", or add to `settings.json`:
```json
{
"context_servers": {
"execbro": {
"command": "npx",
"args": ["-y", "execbro@latest"],
"env": {}
}
}
}
```
### Gemini CLI
Edit `~/.gemini/settings.json` (user) or `.gemini/settings.json` (project):
```json
{
"mcpServers": {
"execbro": {
"command": "npx",
"args": ["-y", "execbro@latest"]
}
}
}
```
### Android
Android works out of the box — all device control tools use ADB, which ships with Android Studio. Verify it's available:
```bash
adb devices
```
### iOS Simulator — UI Automation Setup
iOS UI automation tools (tap, swipe, text input, accessibility queries) require a UI driver. Install one of the following:
**Option A: AXe CLI (default)**
[AXe](https://github.com/cameroncooke/AXe) is a standalone CLI for iOS simulator automation. No daemon required — single binary, simple setup. Used by default; no `IOS_DRIVER` env var needed.
```bash
brew install cameroncooke/axe/axe
```
Verify: `axe --version`
> **Note:** AXe text input only supports US keyboard layout characters.
**Option B: IDB (alternative)**
[IDB (iOS Development Bridge)](https://github.com/facebook/idb) is a tool built by Meta for automating iOS Simulators. Requires a background daemon. Use this if you prefer IDB or hit AXe limitations.
```bash
brew install idb-companion
```
Verify: `idb_companion --list 1`
Opt in by setting `IOS_DRIVER=idb` in your MCP server configuration:
```json
{
"mcpServers": {
"execbro": {
"type": "stdio",
"command": "npx",
"args": ["-y", "execbro@latest"],
"env": { "IOS_DRIVER": "idb" }
}
}
}
```
**What works without a UI driver:**
| Capability | Without AXe/IDB | With AXe/IDB |
| --------------------------------- | --------------- | ------------ |
| Screenshots | Yes (simctl) | Yes |
| App install/launch/terminate | Yes (simctl) | Yes |
| URL opening | Yes (simctl) | Yes |
| Boot simulator | Yes (simctl) | Yes |
| **Tap / swipe / gestures** | **No** | Yes |
| **Text input** | **No** | Yes |
| **Accessibility tree queries** | **No** | Yes |
| **Element finding / waiting** | **No** | Yes |
| **Hardware buttons (Home, Lock)** | **No** | Yes |
> **Troubleshooting**: If you see errors like `"IDB is not installed"` or `"AXe is not installed"` in tap results, install the appropriate driver with the commands above and retry.
## Install the SDK (recommended)

@@ -289,4 +76,2 @@

Under the hood, the MCP server connects over Chrome DevTools Protocol (CDP), which misses events that fire before it attaches and can't read request/response bodies on newer architectures. The SDK patches `fetch` and `console` at import time and buffers everything in-app from the very first line — the MCP server auto-detects it and reads from it, no extra config.
| | Without SDK | With SDK |

@@ -300,28 +85,4 @@ | ---------------------------------------- | ----------------------- | ------------------------------ |

**Install:**
It's one `npm install` plus a single `init()` call in your app's entry file. See the [SDK guide](docs/sdk.md) for install, initialization, and every config option.
```bash
npm install execbro-sdk
```
**Initialize** — add to your app's entry file (`index.js`, `App.tsx`, or `app/_layout.tsx` for Expo Router) as the **first import**, and pass in the stores and references you want the agent to reach:
```js
import { init } from 'execbro-sdk';
import { store } from './store'; // Redux store
import { queryClient } from './queryClient'; // TanStack Query
import { navigationRef } from './navigation';
if (__DEV__) {
init({
stores: { redux: store, queryClient },
navigation: navigationRef,
});
}
// ... rest of your imports
```
`init()` alone (no arguments) already unlocks full log and network capture. Wiring `stores`, `navigation`, or `custom` references is what makes the agent able to read and reason about your app's state directly. See the [SDK README](https://github.com/igorzheludkov/execbro-sdk#readme) for every config option.
## Requirements

@@ -333,3 +94,3 @@

- **iOS UI automation**: [AXe CLI](https://github.com/cameroncooke/AXe) (`brew install cameroncooke/axe/axe`, default) or [Facebook IDB](https://fbidb.io/) (`brew install idb-companion`, opt in via `IOS_DRIVER=idb`) — required for tap, swipe, text input, accessibility on iOS Simulator
- **Optional for offline OCR fallback**: Python 3.6+ (only needed when cloud OCR is unavailable, see [OCR Setup](#ocr-text-extraction))
- **Optional for offline OCR fallback**: Python 3.6+ (only needed when cloud OCR is unavailable, see [OCR guide](docs/ocr.md))

@@ -349,2 +110,3 @@ ## Claude Code Skills

| `get_network_requests` | Monitor HTTP requests with method/status filtering |
| `get_flowpoints` / `verify_flow` | Flow tracing + factual verification: query, wait on, and assert `flowpoint()` breadcrumbs (SDK) |
| `get_screen_layout` | Screen map of visible components with positions, sizes, and text content |

@@ -368,13 +130,22 @@ | `tap` | **Unified tap** — auto-detects platform, tries fiber → accessibility → OCR → coordinates |

2. In Claude Code, scan for Metro:
2. Just describe what you want in plain language — the agent picks the right tools. You don't need to know tool names or ask for a specific one. For example:
```
Use scan_metro to find and connect to Metro
Check the network logs and investigate why this error is happening
```
3. Get logs:
```
Use get_logs to see recent console output
Why is the current screen empty? Take a look and figure it out
```
```
Tap the "Sign in" button and tell me what happens
```
```
The list won't scroll — scroll it down and check what's going on
```
```
Instrument the checkout flow with flowpoints, run it, and verify the steps fire in order
```
The agent connects to Metro, reads logs and network, inspects the screen, and drives the UI as needed to answer.
## Detailed Guides

@@ -384,2 +155,4 @@

| ---------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [Setup](docs/setup.md) | Per-client MCP config (Claude, Codex, Cursor, VS Code, …), Android & iOS setup |
| [SDK Setup](docs/sdk.md) | Install & `init()` the in-app SDK to wire stores + network layer into the agent |
| [Console Logging](docs/logging.md) | `get_logs` parameters, filtering, summary mode, TONL format, token optimization |

@@ -394,12 +167,2 @@ | [Network Tracking](docs/network.md) | SDK setup for full capture, filtering, request details, statistics |

## Supported React Native Versions
| Version | Architecture | Engine | Status |
| -------------- | --------------------- | ------------ | ------------------------------------------------ |
| Expo SDK 54+ | Bridgeless (New Arch) | Hermes | ✓ Fully supported |
| RN 0.76+ | Bridgeless (New Arch) | Hermes | ✓ Fully supported |
| RN 0.73 - 0.75 | Bridge (Old Arch) | Hermes | ✓ Fully supported (best network capture via CDP) |
| RN 0.70 - 0.72 | Bridge (Old Arch) | Hermes / JSC | ✓ Supported |
| RN < 0.70 | Bridge | JSC | Not tested |
## How It Works

@@ -417,42 +180,7 @@

### Explicit Connection
- **One server per session** — each agent session (each terminal or IDE window) runs its own ExecBro MCP server instance.
- **Connects on request, not on startup** — the server never auto-connects. It only attaches to your running React Native app when you ask it to (e.g. `scan_metro`), so it stays out of the way until you actually need a device.
- **One driver per device** — if two or more sessions in the same project point at the same Metro/device, they'll compete to control it, like a car with two steering wheels. Keep interaction to a single session per device.
- **Want parallel sessions? Give each its own device + port** — run separate work in a [git worktree](https://git-scm.com/docs/git-worktree) with its own Metro instance on a different port, and connect a second device (simulator/emulator) to it. For example, keep `main` on the default `8081` and start the worktree's Metro on `8082` (`npx react-native start --port 8082`, or `npx expo start --port 8082`), then launch that worktree's app pointed at `8082`. Each agent session then `scan_metro`s and drives its own device, so the two never fight over the connection.
The server does **not** auto-connect on startup. Call `scan_metro` to discover and connect to Metro servers. This prevents multiple MCP server instances (from parallel agent sessions) from competing for the single CDP WebSocket slot, which would cause connection thrashing and dropped tools.
### Graceful Shutdown
When the MCP server process is terminated (`SIGINT`/`SIGTERM`), it closes all CDP WebSocket connections and cancels reconnection timers, freeing the CDP slot immediately for other sessions.
### Reconnection on Disconnect
When the connection to Metro is lost (e.g., app restart, Metro restart, or network issues):
1. The server automatically attempts to reconnect
2. Uses exponential backoff: 500ms, 1s, 2s, 4s, 8s (up to 8 attempts)
3. Re-fetches device list to handle new WebSocket URLs
4. Preserves existing log and network buffers
### Connection Gap Warnings
If there was a recent disconnect, `get_logs` and `get_network_requests` will include a warning:
```
[WARNING] Connection was restored 5s ago. Some logs may have been missed during the 3s gap.
```
### Monitor Connection Health
Use `get_connection_status` to see detailed connection information:
```
=== Connection Status ===
--- React Native (Port 8081) ---
Status: CONNECTED
Connected since: 2:45:30 PM
Uptime: 5m 23s
Recent gaps: 1
- 2:43:15 PM (2s): Connection closed
```
## Troubleshooting

@@ -465,10 +193,2 @@

### Wrong device connected
The server prioritizes devices in this order:
1. React Native Bridgeless (SDK 54+)
2. Hermes React Native
3. Any React Native (excluding Reanimated/Experimental)
### Logs not appearing

@@ -481,70 +201,39 @@

## Telemetry & Data Collection
## Telemetry & Privacy
This package collects anonymous usage telemetry to help improve the product. No personal information is collected.
ExecBro collects anonymous usage telemetry — tool names, success/failure, and durations — to improve the product. **No source code, file paths, or app content is ever sent.** This is what powers your [usage dashboard](#see-your-usage--execbrocom).
### What is collected
See the [Telemetry & Data Collection guide](docs/telemetry.md) for the full breakdown of what's collected, auto-registration, and how to opt out, and [PRIVACY.md](./PRIVACY.md) for the complete privacy policy.
| Data | Purpose |
| ----------------- | ---------------------------------------- |
| Tool names | Which MCP tools are used most |
| Success/failure | Error rates for reliability improvements |
| Duration (ms) | Performance monitoring |
| Session start/end | Retention analysis |
| Platform | macOS/Linux/Windows distribution |
| Server version | Adoption of new versions |
## Supported React Native Versions
**Not collected**: No file paths, code content, network data, or personally identifiable information.
| Version | Architecture | Engine | Status |
| -------------- | --------------------- | ------------ | ------------------------------------------------ |
| Expo SDK 54+ | Bridgeless (New Arch) | Hermes | ✓ Fully supported |
| RN 0.76+ | Bridgeless (New Arch) | Hermes | ✓ Fully supported |
| RN 0.73 - 0.75 | Bridge (Old Arch) | Hermes | ✓ Fully supported (best network capture via CDP) |
| RN 0.70 - 0.72 | Bridge (Old Arch) | Hermes / JSC | ✓ Supported |
| RN < 0.70 | Bridge | JSC | Not tested |
### Auto-registration
## Pricing
On first tool use, the package automatically registers your installation with our backend. No account or login is required — the Tool works fully out of the box.
ExecBro is **free and open** — every feature, no usage limits, no account required. Use it as much as you like. The tools you run locally stay free; that's the model.
**Why we do this:** The product roadmap includes features that build on installation identity — project memory (your AI assistant gets smarter with every session by remembering navigation maps, element signatures, and debug patterns), cloud sync across machines, team collaboration with shared debugging context, and a dashboard for managing your installations. Auto-registration lays the groundwork so these features work seamlessly when they ship, without requiring a disruptive setup step later.
## Feedback & Feature Requests
**What is sent:**
**Please run this at the end of your session to help me make the tools better.** ExecBro is built for AI agents, so the most valuable feedback comes from the agent itself — paste this prompt to your agent:
- A random installation ID (UUID)
- A device fingerprint (one-way SHA-256 hash — cannot be reversed to recover its components)
- Platform, hostname, OS version, and server version
> Write a report about your experience with the ExecBro tools — where you were struggling and what could be improved. Save it as a Markdown file for me, then submit it using the `send_feedback` tool (type `"feedback"`) so it becomes a GitHub issue.
**What is NOT sent:** No source code, file paths, console logs, network data, component names, or any content from your app. The fingerprint exists solely to prevent installation hijacking — it ties your installation to your physical machine so no one else can claim it.
It takes 30 seconds: your agent runs `send_feedback`, hands you a pre-filled GitHub issue URL (environment info already attached), and you click submit — no GitHub setup, no copy-pasting. Real friction logs from real sessions are what shape the roadmap and get fixed first, so please send one. 🙏 And if you just have a quick idea or question, drop into [GitHub Discussions](https://github.com/igorzheludkov/execbro/discussions) to share feedback, request features, and vote on what gets built next.
Registration is fire-and-forget — it never blocks your work, fails silently if the network is unavailable, and can be disabled entirely (see Opt-out below). See [PRIVACY.md](./PRIVACY.md) for full details on data handling, storage, and your rights.
## Package names & staying up to date
### Opt-out
Ships as the npm package `execbro`. The package was previously published as `react-native-ai-devtools` and before that as `react-native-ai-debugger` — both legacy names keep receiving identical builds via mirror-publish, so existing installations and MCP configs keep working unchanged. New installs should use `execbro`.
To disable telemetry and auto-registration, add `RN_DEBUGGER_TELEMETRY` to the `env` field in your MCP server configuration:
> [!IMPORTANT]
> **Already using ExecBro?** `npx` caches packages indefinitely, so you may be stuck on an old version without realizing it. Update your MCP config to use `npx -y execbro@latest` (see [Setup](#setup)) so every session pulls the latest release with new tools and bug fixes. New installs after this change auto-update automatically.
```json
{
"mcpServers": {
"execbro": {
"type": "stdio",
"command": "npx",
"args": ["-y", "execbro@latest"],
"env": { "RN_DEBUGGER_TELEMETRY": "false" }
}
}
}
```
All debugging tools work normally with telemetry disabled. For the complete privacy policy, see [PRIVACY.md](./PRIVACY.md).
### Tap failure artifacts
When the `tap` tool fails or produces no visible change on screen, the package uploads a small JSON bundle and up to three downscaled PNG screenshots (before, after, and after-with-marker showing exactly where the tap landed) to a 10-day-retention store so we can diagnose and fix tap reliability issues. We do **not** use this data to train AI models and do **not** share it with third parties. See [PRIVACY.md](./PRIVACY.md#4-tap-failure-diagnostic-artifacts) for details.
To opt out while keeping the rest of the package working:
```json
"env": { "RN_AI_DEVTOOLS_DISABLE_FAILURE_ARTIFACTS": "1" }
```
### Build attestation
Official npm builds are stamped with a secret build token at publish time (via `npm run inject-token` in CI, which requires the `BUILD_TOKEN` secret). Builds from a source checkout carry an inert placeholder and are labeled "fork" in our telemetry dashboard. The token is never committed to source.
## License
MIT