@aarwitz/tapp 0.17.27 → 0.18.0
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/.claude-plugin/plugin.json +2 -2
- package/AGENTS.md +43 -44
- package/README.md +32 -42
- package/bin/tapp.js +168 -99
- package/browser/app.css +220 -208
- package/browser/app.js +173 -20
- package/browser/index.html +118 -57
- package/browser/tokens.css +33 -25
- package/docs/BROWSER-PRODUCT.md +16 -8
- package/docs/BUSINESS-WORKFLOWS.md +134 -0
- package/docs/PRODUCT-ENGINE.md +5 -0
- package/mcp-server/src/browser-product.js +15 -3
- package/mcp-server/src/business-observation.d.ts +2 -0
- package/mcp-server/src/business-observation.js +25 -0
- package/mcp-server/src/business-workflow-files.js +36 -0
- package/mcp-server/src/business-workflow-runtime.js +47 -0
- package/mcp-server/src/business-workflows.d.ts +50 -0
- package/mcp-server/src/business-workflows.js +169 -0
- package/mcp-server/src/environment-capabilities.d.ts +16 -0
- package/mcp-server/src/environment-capabilities.js +78 -0
- package/mcp-server/src/index.js +546 -794
- package/mcp-server/src/product-operations.js +3 -1
- package/mcp-server/src/public-network.js +65 -0
- package/mcp-server/src/web-audit.js +77 -17
- package/mcp-server/src/web-explorer.js +11 -1
- package/mcp-server/src/web-flow.js +17 -4
- package/package.json +7 -1
- package/scripts/run-web-flow.js +4 -0
- package/skills/tapp/SKILL.md +14 -13
- package/skills/tapp/references/commands.md +73 -57
package/mcp-server/src/index.js
CHANGED
|
@@ -272,11 +272,11 @@ export async function ensureBootedSim({ autoBoot = false } = {}) {
|
|
|
272
272
|
return { error: "No iOS simulators exist on this Mac. Install a simulator runtime in Xcode (Settings → Platforms), then retry." };
|
|
273
273
|
}
|
|
274
274
|
if (!autoBoot) {
|
|
275
|
-
return { error: `No simulator is booted. Call
|
|
275
|
+
return { error: `No simulator is booted. Call tapp_build (action boot) (e.g. udid "${candidate.udid}" — ${candidate.name}) and retry.` };
|
|
276
276
|
}
|
|
277
277
|
await runCommand("xcrun", ["simctl", "boot", candidate.udid], { timeoutMs: 2 * 60 * 1000 });
|
|
278
278
|
const st = await runCommand("xcrun", ["simctl", "bootstatus", candidate.udid, "-b"], { timeoutMs: 3 * 60 * 1000 });
|
|
279
|
-
if (st.code !== 0) return { error: `Auto-boot of ${candidate.name} failed — boot one manually with
|
|
279
|
+
if (st.code !== 0) return { error: `Auto-boot of ${candidate.name} failed — boot one manually with tapp_build (action boot).` };
|
|
280
280
|
return { booted: candidate, autoBooted: true };
|
|
281
281
|
}
|
|
282
282
|
|
|
@@ -292,7 +292,7 @@ function notInstalledError(bundleId, booted) {
|
|
|
292
292
|
const name = booted && booted.name ? booted.name : "the booted simulator";
|
|
293
293
|
return (
|
|
294
294
|
`\`${bundleId}\` is not installed on ${name}. Install a simulator build first — ` +
|
|
295
|
-
`
|
|
295
|
+
`tapp_build (action install) with the .app path (CLI: xcrun simctl install booted path/to/App.app) — ` +
|
|
296
296
|
`or double-check the bundle id (xcrun simctl listapps booted).`
|
|
297
297
|
);
|
|
298
298
|
}
|
|
@@ -764,7 +764,7 @@ function focusMetadata(result) {
|
|
|
764
764
|
|
|
765
765
|
async function startSession(bundleId, extraEnv = {}) {
|
|
766
766
|
if (activeSession && !activeSession.ended) {
|
|
767
|
-
return { error: "A session is already active; call
|
|
767
|
+
return { error: "A session is already active; call tapp_session (action end) first.", screen: treeSnapshot() };
|
|
768
768
|
}
|
|
769
769
|
const sim = await ensureBootedSim();
|
|
770
770
|
if (sim.error) return { error: sim.error };
|
|
@@ -781,7 +781,7 @@ async function startSession(bundleId, extraEnv = {}) {
|
|
|
781
781
|
});
|
|
782
782
|
activeSession = {
|
|
783
783
|
platform:"ios", proc, bundleId, seq: 0, cmdPath, resultPath, latestTree: null, treeVersion: 0, buffer: "", ready: false, ended: false,
|
|
784
|
-
// Always-on recorder: each act appends a Flow step;
|
|
784
|
+
// Always-on recorder: each act appends a Flow step; tapp_session (action save_flow) snapshots it to a file.
|
|
785
785
|
recording: [],
|
|
786
786
|
creds: { email: extraEnv.OCQA_TEST_EMAIL || "", password: extraEnv.OCQA_TEST_PASSWORD || "" },
|
|
787
787
|
lastScreen: null,
|
|
@@ -811,7 +811,7 @@ async function startSession(bundleId, extraEnv = {}) {
|
|
|
811
811
|
|
|
812
812
|
async function startAndroidSession(appId, { serial, apkPath, clearData = true, testEmail = "", testPassword = "" } = {}) {
|
|
813
813
|
if (activeSession && !activeSession.ended) {
|
|
814
|
-
return { error: "A session is already active; call
|
|
814
|
+
return { error: "A session is already active; call tapp_session (action end) first.", screen: treeSnapshot() };
|
|
815
815
|
}
|
|
816
816
|
try {
|
|
817
817
|
const { AndroidDriver } = await import("./android-driver.js");
|
|
@@ -887,23 +887,23 @@ async function firstVisibleWebLocator(page, target, { input = false } = {}) {
|
|
|
887
887
|
return await fallback.isVisible().catch(() => false) ? fallback : null;
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
async function startWebSession(url, { testEmail = "", testPassword = "", device = "", viewport = "" } = {}) {
|
|
891
|
-
if (activeSession && !activeSession.ended) return { error: "A session is already active; call
|
|
890
|
+
async function startWebSession(url, { testEmail = "", testPassword = "", device = "", viewport = "", recordVideoDir = "" } = {}) {
|
|
891
|
+
if (activeSession && !activeSession.ended) return { error: "A session is already active; call tapp_session (action end) first.", screen:treeSnapshot() };
|
|
892
892
|
let browser;
|
|
893
893
|
try {
|
|
894
894
|
const parsed = new URL(String(url || ""));
|
|
895
895
|
if (!/^https?:$/.test(parsed.protocol)) return { error:"Web session URL must be http(s)" };
|
|
896
|
-
const { loadPlaywright, webContextOptions } = await import("./web-explorer.js");
|
|
896
|
+
const { loadPlaywright, webContextOptions, webBrowserLaunchOptions } = await import("./web-explorer.js");
|
|
897
897
|
const { chromium, devices } = await loadPlaywright();
|
|
898
|
-
browser = await chromium.launch(
|
|
899
|
-
const context = await browser.newContext(webContextOptions({ device, viewport, devices }));
|
|
898
|
+
browser = await chromium.launch(webBrowserLaunchOptions());
|
|
899
|
+
const context = await browser.newContext({ ...webContextOptions({ device, viewport, devices }), ...(recordVideoDir ? {recordVideo:{dir:recordVideoDir}} : {}) });
|
|
900
900
|
const page = await context.newPage();
|
|
901
901
|
await page.goto(parsed.href, { waitUntil:"domcontentloaded", timeout:30_000 });
|
|
902
902
|
await page.waitForLoadState("networkidle", { timeout:5_000 }).catch(() => {});
|
|
903
903
|
const snapshot = await webSessionSnapshot(page);
|
|
904
904
|
activeSession = {
|
|
905
905
|
platform:"web", browser, context, page, latestTree:snapshot, treeVersion:1, recording:[],
|
|
906
|
-
creds:{ email:testEmail, password:testPassword },
|
|
906
|
+
creds:{ email:testEmail, password:testPassword }, credentialOrigin:parsed.origin,
|
|
907
907
|
lastScreen:snapshot.screenTitle, ended:false,
|
|
908
908
|
};
|
|
909
909
|
return { ok:true, ...treeSnapshot(), url:snapshot.url };
|
|
@@ -1016,7 +1016,7 @@ function recordStep(cmd, result) {
|
|
|
1016
1016
|
if (newScreen) activeSession.lastScreen = newScreen;
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
|
-
// Argument shapes
|
|
1019
|
+
// Argument shapes tapp_session accepts, per action. A malformed call is answered here with
|
|
1020
1020
|
// the accepted shape and never reaches the driver, so it can neither time out nor disturb the
|
|
1021
1021
|
// session (feedback #7: `{action:"wait", seconds:3}` used to wait on an empty target).
|
|
1022
1022
|
const SESSION_ACT_ARGS = Object.freeze({
|
|
@@ -1046,11 +1046,14 @@ export function sessionActUsageError(cmd = {}) {
|
|
|
1046
1046
|
async function sessionAct(cmd) {
|
|
1047
1047
|
const startedAt = Date.now();
|
|
1048
1048
|
const done = (result) => ({ ...result, durationMs: Date.now() - startedAt });
|
|
1049
|
-
if (!activeSession) return done({ error: "No active session. Call
|
|
1049
|
+
if (!activeSession) return done({ error: "No active session. Call tapp_session (action start) first." });
|
|
1050
1050
|
if (activeSession.ended) return done({ error: sessionFailureReason(activeSession.buffer, activeSession.creds) });
|
|
1051
1051
|
const usage = sessionActUsageError(cmd);
|
|
1052
1052
|
if (usage) return done({ status: "usage", detail: usage, ...treeSnapshot(), recordedSteps: activeSession.recording.length });
|
|
1053
1053
|
if (cmd.action === "login") {
|
|
1054
|
+
if (activeSession.platform === "web" && process.env.TAPP_ENFORCE_PUBLIC_EGRESS === "1" && new URL(activeSession.page.url()).origin !== activeSession.credentialOrigin) {
|
|
1055
|
+
return done({status:"blocked",detail:"The sign-in page is on another origin. Configure that authentication path before sending saved credentials.",...treeSnapshot()});
|
|
1056
|
+
}
|
|
1054
1057
|
if (cmd.email) activeSession.creds.email = cmd.email;
|
|
1055
1058
|
if (cmd.password) activeSession.creds.password = cmd.password;
|
|
1056
1059
|
}
|
|
@@ -1226,6 +1229,7 @@ async function endSession() {
|
|
|
1226
1229
|
const s = activeSession;
|
|
1227
1230
|
if (s.platform === "web") {
|
|
1228
1231
|
activeSession = null;
|
|
1232
|
+
await s.context?.close().catch(() => {});
|
|
1229
1233
|
await s.browser.close().catch(() => {});
|
|
1230
1234
|
if (s.managedRuntime) await stopManagedWebTarget(s.managedRuntime).catch(() => {});
|
|
1231
1235
|
return { ok:true };
|
|
@@ -1426,6 +1430,7 @@ async function runExploreStreaming(bundleId, actions, timeout, env, onProgress)
|
|
|
1426
1430
|
let captureDir = null;
|
|
1427
1431
|
let pos = 0;
|
|
1428
1432
|
let timedOut = false;
|
|
1433
|
+
let lastProgress = { action: 0, max: actions, states: 0 };
|
|
1429
1434
|
// Interactive runs pause for a human — time spent waiting is excluded from the harness's own
|
|
1430
1435
|
// budget, so give the watchdog matching headroom.
|
|
1431
1436
|
const interactiveGrace = env.OCQA_INTERACTIVE_INPUT === "1" ? 900 : 0;
|
|
@@ -1450,7 +1455,17 @@ async function runExploreStreaming(bundleId, actions, timeout, env, onProgress)
|
|
|
1450
1455
|
pos = size;
|
|
1451
1456
|
for (const line of buf.toString("utf8").split("\n")) {
|
|
1452
1457
|
if (line.startsWith("OCQA_PROGRESS:")) {
|
|
1453
|
-
try {
|
|
1458
|
+
try { lastProgress = JSON.parse(line.slice("OCQA_PROGRESS:".length)); onProgress(lastProgress); } catch {}
|
|
1459
|
+
}
|
|
1460
|
+
// Per-action narration for transcript hosts; the harness does not always write a
|
|
1461
|
+
// narrative, so one is synthesized from the action itself.
|
|
1462
|
+
if (line.startsWith("OCQA_ACTION:")) {
|
|
1463
|
+
try {
|
|
1464
|
+
const action = JSON.parse(line.slice("OCQA_ACTION:".length));
|
|
1465
|
+
const target = action.identifier || action.label || action.target || (action.x !== undefined ? `(${action.x}, ${action.y})` : "");
|
|
1466
|
+
const narrative = action.narrative || `${String(action.type || "action").replace(/^\w/, (c) => c.toUpperCase())} ${target}${action.status === "disabled" ? " (disabled)" : ""}`.trim();
|
|
1467
|
+
onProgress({ ...lastProgress, narrative, ...(action.screen ? { screen: action.screen } : {}) });
|
|
1468
|
+
} catch {}
|
|
1454
1469
|
}
|
|
1455
1470
|
// Surface harness pause requests to the host as a sidecar file next to the response
|
|
1456
1471
|
// path — prompting hosts (VS Code extension) poll it, answer the human, and write
|
|
@@ -1506,12 +1521,12 @@ export async function captureScreenshotImage(maxWidth) {
|
|
|
1506
1521
|
}
|
|
1507
1522
|
|
|
1508
1523
|
// ---- Model backend (subscription proxy / BYO key) — mirrors Tapp/Services/ModelBackend.swift.
|
|
1509
|
-
// Used by AI-generate (
|
|
1524
|
+
// Used by AI-generate (tapp_session (action draft_flow)). Resolution: Tapp subscription token → proxy;
|
|
1510
1525
|
// else ANTHROPIC_API_KEY → api.anthropic.com; else null (feature disabled).
|
|
1511
1526
|
// Remote-AI opt-in for IMPLICIT model calls (post-run finding enrichment). A bare
|
|
1512
1527
|
// ANTHROPIC_API_KEY is often ambient in dev shells — its mere presence must never silently
|
|
1513
1528
|
// change data-handling behavior. A subscription token is an explicit tapp choice, and
|
|
1514
|
-
// explicitly-invoked AI tools (
|
|
1529
|
+
// explicitly-invoked AI tools (tapp_session (action draft_flow), assert_ai) carry their own consent.
|
|
1515
1530
|
export function remoteAiOptedIn(env = process.env) {
|
|
1516
1531
|
if ((env.TAPP_SUBSCRIPTION_TOKEN || "").trim()) return true;
|
|
1517
1532
|
return ["1", "true", "yes"].includes(String(env.TAPP_ENABLE_REMOTE_AI || "").trim().toLowerCase());
|
|
@@ -1764,7 +1779,7 @@ export function qaNextSteps(report, surface = "mcp") {
|
|
|
1764
1779
|
const next = [];
|
|
1765
1780
|
if (report?.findings?.length) next.push("inspect the evidence with `npx -y @aarwitz/tapp@latest report latest`");
|
|
1766
1781
|
next.push("save this run with `--json <report.json>`, then re-run with `--baseline <report.json>` to compare a fix (`tapp ci` gates it)");
|
|
1767
|
-
next.push("replay a committed journey with `npx -y @aarwitz/tapp@latest
|
|
1782
|
+
next.push("replay a committed journey with `npx -y @aarwitz/tapp@latest run <file>`");
|
|
1768
1783
|
return next;
|
|
1769
1784
|
}
|
|
1770
1785
|
const next = [];
|
|
@@ -1774,11 +1789,11 @@ export function qaNextSteps(report, surface = "mcp") {
|
|
|
1774
1789
|
const reason = String(report.stopReason || "");
|
|
1775
1790
|
if (reason.startsWith("login-wall")) next.push("re-run with `testEmail`/`testPassword` (or an `actor` from .tapp/project.json) — the sign-in wall was not exercised");
|
|
1776
1791
|
else if (reason === "time-budget-exhausted") next.push("re-run with a larger `timeoutSeconds` or a smaller `maxActions` — the time budget ran out, not the app");
|
|
1777
|
-
else next.push("check the app launches: `
|
|
1792
|
+
else next.push("check the app launches: `tapp_look` first (add `appLaunchArgs`/`appLaunchEnv` if it needs a test bypass), then re-run");
|
|
1778
1793
|
}
|
|
1779
|
-
if (report?.findings?.length) next.push("open a flagged screen with `
|
|
1794
|
+
if (report?.findings?.length) next.push("open a flagged screen with `tapp_look`");
|
|
1780
1795
|
next.push("re-run with `baselineFindings` to gate a fix");
|
|
1781
|
-
next.push("drive it step-by-step via `
|
|
1796
|
+
next.push("drive it step-by-step via `tapp_session (action start)`");
|
|
1782
1797
|
return next;
|
|
1783
1798
|
}
|
|
1784
1799
|
|
|
@@ -2547,10 +2562,10 @@ const server = new Server(
|
|
|
2547
2562
|
// reaching for the wrong tool, in the order the mistakes actually happen.
|
|
2548
2563
|
instructions: [
|
|
2549
2564
|
"Tapp gives you hands and eyes on real iOS, Android and web app surfaces. Pick the smallest operation:",
|
|
2550
|
-
"- see or screenshot one screen →
|
|
2551
|
-
"- reach a named screen or drive a journey →
|
|
2565
|
+
"- see or screenshot one screen → tapp_look; what is on screen now → tapp_look / tapp_look (tree: true);",
|
|
2566
|
+
"- reach a named screen or drive a journey → tapp_session (action start) (+ focus) then session_act;",
|
|
2552
2567
|
"- find bugs in an app or environment you own → tapp_explore (it clicks, types and submits; minutes);",
|
|
2553
|
-
"- check production or a site you do not own →
|
|
2568
|
+
"- check production or a site you do not own → tapp_explore (readOnly: true) only (read-only: never clicks);",
|
|
2554
2569
|
"- a merge decision → the CI gate (tapp ci / GitHub Action), never exploration.",
|
|
2555
2570
|
"Results are observations with findings, coverage and evidence paths — never a score or ship verdict.",
|
|
2556
2571
|
"inconclusive:true is not a pass; say what blocked coverage. A clean audit says the page is served without structural defects, not that the product works.",
|
|
@@ -2599,7 +2614,7 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
|
2599
2614
|
text:
|
|
2600
2615
|
`${goal}.${target} Use the connected Tapp tools on the real UI surface. ` +
|
|
2601
2616
|
"Use the smallest operation that satisfies the request; initialize/explore the source repo only for a general repository test. " +
|
|
2602
|
-
"For a named screen/control, pass the exact request as session focus or call
|
|
2617
|
+
"For a named screen/control, pass the exact request as session focus or call tapp_explore (goal) so Tapp uses source + its observed UI Map instead of wandering. " +
|
|
2603
2618
|
"If Tapp returns multiple target choices, ask me to select one instead of guessing. " +
|
|
2604
2619
|
"Read visual evidence before describing it. Report findings, coverage, authority, inconclusive state, and checked/not-checked scope; " +
|
|
2605
2620
|
"never turn exploration into a score or ship verdict. Do not edit the app unless I ask for a fix.",
|
|
@@ -2609,792 +2624,383 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
|
2609
2624
|
};
|
|
2610
2625
|
});
|
|
2611
2626
|
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
"
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
},
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
inputSchema: {
|
|
2671
|
-
type: "object",
|
|
2672
|
-
properties: {
|
|
2673
|
-
authToken: {
|
|
2674
|
-
type: "string",
|
|
2675
|
-
description: "Required when TAPP_MCP_TOKEN is set",
|
|
2676
|
-
},
|
|
2677
|
-
mode: {
|
|
2678
|
-
type: "string",
|
|
2679
|
-
enum: ["screenshot", "record", "explore", "tree"],
|
|
2680
|
-
description: "Capture mode",
|
|
2681
|
-
},
|
|
2682
|
-
appBundleId: {
|
|
2683
|
-
type: "string",
|
|
2684
|
-
description: "Bundle ID (required for explore/tree)",
|
|
2685
|
-
},
|
|
2686
|
-
actions: {
|
|
2687
|
-
type: "integer",
|
|
2688
|
-
minimum: 1,
|
|
2689
|
-
maximum: 1000,
|
|
2690
|
-
description: "Action limit for explore",
|
|
2691
|
-
},
|
|
2692
|
-
duration: {
|
|
2693
|
-
type: "integer",
|
|
2694
|
-
minimum: 1,
|
|
2695
|
-
maximum: 3600,
|
|
2696
|
-
description: "Record duration in seconds",
|
|
2697
|
-
},
|
|
2698
|
-
testEmail: {
|
|
2699
|
-
type: "string",
|
|
2700
|
-
description: "Optional OCQA_TEST_EMAIL override",
|
|
2701
|
-
},
|
|
2702
|
-
testPassword: {
|
|
2703
|
-
type: "string",
|
|
2704
|
-
description: "Optional OCQA_TEST_PASSWORD override",
|
|
2705
|
-
},
|
|
2706
|
-
inputOverrides: {
|
|
2707
|
-
type: "object",
|
|
2708
|
-
description:
|
|
2709
|
-
"Deterministic field values typed during explore. Map of field key -> value. " +
|
|
2710
|
-
"Keys: 'id:<identifier>', 'label:<label>', or scoped 'screen:<title>|id:<identifier>'. " +
|
|
2711
|
-
"Example: {\"id:email_field\": \"user@example.com\", \"id:zip\": \"90210\"}. " +
|
|
2712
|
-
"Values replace the default 'test' input and are typed exactly as given on every run.",
|
|
2713
|
-
additionalProperties: { type: "string" },
|
|
2714
|
-
},
|
|
2715
|
-
},
|
|
2716
|
-
required: ["mode"],
|
|
2717
|
-
},
|
|
2718
|
-
},
|
|
2719
|
-
{
|
|
2720
|
-
name: "tapp_parse_markers",
|
|
2721
|
-
title: "Parse capture markers",
|
|
2722
|
-
description: "Parse OCQA markers from a capture run into structured summary",
|
|
2723
|
-
inputSchema: {
|
|
2724
|
-
type: "object",
|
|
2725
|
-
properties: {
|
|
2726
|
-
runId: {
|
|
2727
|
-
type: "string",
|
|
2728
|
-
description: "Capture run directory name under captures/",
|
|
2729
|
-
},
|
|
2730
|
-
runPath: {
|
|
2731
|
-
type: "string",
|
|
2732
|
-
description: "Absolute capture path override (must remain under captures/)",
|
|
2733
|
-
},
|
|
2734
|
-
},
|
|
2735
|
-
},
|
|
2736
|
-
},
|
|
2737
|
-
{
|
|
2738
|
-
name: "tapp_list_captures",
|
|
2739
|
-
title: "List captures",
|
|
2740
|
-
description: "List recent capture runs for THIS project (the workspace the server runs in). The captures directory is shared by every project on the machine; other projects' captures and pre-provenance captures are counted but hidden unless allProjects is true. Each entry carries provenance {kind, platform, target, project}. Use the capture a command just returned as evidence; never cite a capture from another project as if it were this one.",
|
|
2741
|
-
inputSchema: {
|
|
2742
|
-
type: "object",
|
|
2743
|
-
properties: {
|
|
2744
|
-
limit: {
|
|
2745
|
-
type: "integer",
|
|
2746
|
-
minimum: 1,
|
|
2747
|
-
maximum: 100,
|
|
2748
|
-
default: 10,
|
|
2749
|
-
},
|
|
2750
|
-
allProjects: { type: "boolean", default: false, description: "Include captures from other projects and captures without provenance — only when the user explicitly asks for historical evidence" },
|
|
2751
|
-
},
|
|
2752
|
-
},
|
|
2753
|
-
},
|
|
2754
|
-
{
|
|
2755
|
-
name: "tapp_capture_summary",
|
|
2756
|
-
title: "Capture summary",
|
|
2757
|
-
description: "Show summary metadata for a capture run",
|
|
2758
|
-
inputSchema: {
|
|
2759
|
-
type: "object",
|
|
2760
|
-
properties: {
|
|
2761
|
-
runId: {
|
|
2762
|
-
type: "string",
|
|
2763
|
-
description: "Capture run directory name under captures/",
|
|
2764
|
-
},
|
|
2765
|
-
runPath: {
|
|
2766
|
-
type: "string",
|
|
2767
|
-
description: "Absolute capture path override",
|
|
2768
|
-
},
|
|
2769
|
-
},
|
|
2770
|
-
},
|
|
2771
|
-
},
|
|
2772
|
-
{
|
|
2773
|
-
name: "tapp_explore",
|
|
2774
|
-
title: "Explore (autonomous)",
|
|
2775
|
-
description:
|
|
2776
|
-
"Autonomously explore iOS (appBundleId), Android (androidAppId), OR a web app " +
|
|
2777
|
-
"(url — requires Playwright installed) and return a structured EXPLORATION OBSERVATION. " +
|
|
2778
|
-
"Exploration OBSERVES — it surfaces findings + coverage + evidence; it does NOT render a ship " +
|
|
2779
|
-
"verdict or score. To gate a merge, run the deterministic gate (contracts + baseline via CI). " +
|
|
2780
|
-
"Use when the user wants to find bugs / observe what breaks — this " +
|
|
2781
|
-
"runs for MINUTES exploring the whole app. Do NOT use it just to view, screenshot, or reach a specific " +
|
|
2782
|
-
"screen — use tapp_open_app (launch + screenshot) or a session for that. Tapp explores the app " +
|
|
2783
|
-
"like a tester (taps, types, navigates, scrolls) and detects real issues — crashes, dead buttons, failed sign-ins, error screens, " +
|
|
2784
|
-
"stuck/hung screens; on web also uncaught JS exceptions, failed/5xx requests, broken links and assets. " +
|
|
2785
|
-
"Returns {kind:'tapp-exploration-run', headline, inconclusive, screensExplored, " +
|
|
2786
|
-
"actionsPerformed, findingCounts, findings:[{type,severity,category,authority,title,screen}]} — NO " +
|
|
2787
|
-
"verdict/releaseScore. Web separates deterministic findings from advisory sampled control probes. " +
|
|
2788
|
-
"There is a coverage floor: if the app barely explored (crash on launch / sign-in wall) it reports " +
|
|
2789
|
-
"`inconclusive` — absence of findings is NEVER a pass. For iOS the app must already be installed on a booted simulator (use tapp_list_simulators / " +
|
|
2790
|
-
"tapp_boot_simulator first). For web, only point it at an app/environment you own — it CLICKS things; for production or a site you do not own use tapp_audit (read-only). " +
|
|
2791
|
-
"Tapp explores autonomously and does NOT pause to prompt for input — " +
|
|
2792
|
-
"it fills forms with safe defaults. The result includes `inputFieldsEncountered` (and `inputHint`): if " +
|
|
2793
|
-
"the app showed login/form fields and the user hasn't given you values, ASK THE USER what to enter (offer " +
|
|
2794
|
-
"to use defaults or skip), then re-run with testEmail/testPassword or inputOverrides for a real result.",
|
|
2795
|
-
inputSchema: {
|
|
2796
|
-
type: "object",
|
|
2797
|
-
properties: {
|
|
2798
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
2799
|
-
appBundleId: { type: "string", description: "iOS: bundle id of the installed app to test, e.g. com.acme.app. Provide exactly one of appBundleId | url." },
|
|
2800
|
-
androidAppId: { type: "string", description: "Android: application id installed on a connected emulator/device, e.g. com.acme.app." },
|
|
2801
|
-
apkPath: { type: "string", description: "Android: optional APK to install before testing." },
|
|
2802
|
-
androidSerial: { type: "string", description: "Android: optional adb device serial; defaults to the first authorized device." },
|
|
2803
|
-
clearData: { type: "boolean", default: true, description: "Android: clear app data before launch for a repeatable starting state." },
|
|
2804
|
-
url: { type: "string", description: "Web: URL of the app to explore in a real browser (same-origin only; your own app/staging). Provide exactly one of appBundleId | url." },
|
|
2805
|
-
watch: { type: "boolean", default: false, description: "Web only: open Tapp's controlled Chromium window and show a cursor/HUD for each exploration action. Evidence screenshots exclude the overlay." },
|
|
2806
|
-
device: { type: "string", description: "Web only: render as a Playwright device profile (e.g. \"iPhone 13\") — viewport, user agent, touch" },
|
|
2807
|
-
viewport: { type: "string", description: "Web only: explicit viewport WIDTHxHEIGHT (e.g. \"390x844\"); overrides the device profile's viewport" },
|
|
2808
|
-
maxActions: { type: "integer", minimum: 1, maximum: 1000, default: 60, description: "Exploration action budget" },
|
|
2809
|
-
timeout: { type: "integer", minimum: 30, maximum: 3600, default: 600, description: "Max wall-clock seconds" },
|
|
2810
|
-
testEmail: { type: "string", description: "Email for the login preamble, if the app has a sign-in" },
|
|
2811
|
-
testPassword: { type: "string", description: "Password for the login preamble" },
|
|
2812
|
-
interactive: { type: "boolean", description: "Host-with-a-human only (e.g. the VS Code extension): pause at input screens and wait for values via interactiveResponsePath. Plain agents: omit." },
|
|
2813
|
-
interactiveResponsePath: { type: "string", description: "File path the prompting host answers on (requests appear at <path>.request)" },
|
|
2814
|
-
visualReadyPath: { type: "string", description: "Local-client temp path written once the iOS target is foregrounded and settled, so previews exclude build/install footage" },
|
|
2815
|
-
inputOverrides: {
|
|
2816
|
-
type: "object",
|
|
2817
|
-
additionalProperties: { type: "string" },
|
|
2818
|
-
description:
|
|
2819
|
-
"Deterministic field values typed during exploration. Map of field key -> value; keys are " +
|
|
2820
|
-
"'id:<identifier>', 'label:<label>', or scoped 'screen:<title>|id:<identifier>'. " +
|
|
2821
|
-
"Example: {\"id:email_field\": \"user@example.com\"}.",
|
|
2822
|
-
},
|
|
2823
|
-
appLaunchArgs: {
|
|
2824
|
-
type: "array",
|
|
2825
|
-
items: { type: "string" },
|
|
2826
|
-
description: "Launch arguments passed to the app, e.g. [\"--uitesting\"] to enable a login bypass.",
|
|
2827
|
-
},
|
|
2828
|
-
appLaunchEnv: {
|
|
2829
|
-
type: "object",
|
|
2830
|
-
additionalProperties: { type: "string" },
|
|
2831
|
-
description: "Launch environment for the app, e.g. {\"UI_TEST_BACKEND\": \"staging\"} to point it at a test backend.",
|
|
2832
|
-
},
|
|
2833
|
-
loginSteps: {
|
|
2834
|
-
type: "array",
|
|
2835
|
-
items: {},
|
|
2836
|
-
description:
|
|
2837
|
-
"Explicit login replay run BEFORE exploration, for custom login UIs the heuristic can't " +
|
|
2838
|
-
"parse (the #1 reason a real app stays invisible). Each step is {action:'type'|'tap'|'wait', " +
|
|
2839
|
-
"target:'<accessibility-id-or-label>', value?:'<text>', timeoutMs?:<for wait>} — or a shorthand " +
|
|
2840
|
-
"string 'action:target[:value]'. $TEST_EMAIL/$TEST_PASSWORD are substituted from testEmail/" +
|
|
2841
|
-
"testPassword. Example: [{\"action\":\"type\",\"target\":\"email_field\",\"value\":\"$TEST_EMAIL\"}," +
|
|
2842
|
-
"{\"action\":\"type\",\"target\":\"password_field\",\"value\":\"$TEST_PASSWORD\"},{\"action\":\"tap\",\"target\":\"sign_in_button\"}].",
|
|
2843
|
-
},
|
|
2844
|
-
baselineFindings: {
|
|
2845
|
-
type: "array",
|
|
2846
|
-
items: { type: "object" },
|
|
2847
|
-
description:
|
|
2848
|
-
"Findings from a previous run (pass back the `findings` array a prior tapp_explore returned). " +
|
|
2849
|
-
"When provided, the result adds a `regression` COMPARISON {counts:{new,persisting,resolved}, " +
|
|
2850
|
-
"newFindings, resolved} vs. that baseline — an observation, not a gate signal. To gate a merge, " +
|
|
2851
|
-
"run `npx -y @aarwitz/tapp@latest ci` (or the GitHub Action): it applies the deterministic policy and returns the " +
|
|
2852
|
-
"pass/fail/inconclusive outcome.",
|
|
2853
|
-
},
|
|
2854
|
-
},
|
|
2855
|
-
},
|
|
2856
|
-
},
|
|
2857
|
-
{
|
|
2858
|
-
name: "tapp_audit",
|
|
2859
|
-
title: "Audit (read-only)",
|
|
2860
|
-
description:
|
|
2861
|
-
"Read-only audit of a web page or site: renders it and reads it, NEVER clicks, types, submits or hovers — " +
|
|
2862
|
-
"the one analysis safe to point at production or at a site you do not own. Finds controls that were never " +
|
|
2863
|
-
"alive (dead in-page anchors, placeholder links, aria-controls naming nothing, buttons with no handler/form/link), " +
|
|
2864
|
-
"images that failed to load, same-origin assets answering 404, 5xx/failed requests and uncaught JS exceptions " +
|
|
2865
|
-
"during load, same-origin links answering 404/410/5xx, mixed content, and a page wider than its viewport. " +
|
|
2866
|
-
"pages > 1 crawls same-origin links breadth-first with robots.txt honoured. Writes a capture (screenshots, " +
|
|
2867
|
-
"per-finding evidence, report.html) like an explore run. Returns {kind:'tapp-structural-audit', readOnly:true, " +
|
|
2868
|
-
"pagesAudited, findingCounts, pages:[{url,title,controlsExamined,linksChecked,findings}], checkedFor, notChecked, capture}. " +
|
|
2869
|
-
"An observation, never a verdict; absence of findings says the page is served without structural defects, not that the product works. " +
|
|
2870
|
-
"NOT for exercising behaviour (forms, buttons, journeys) on an app you own — that is tapp_explore or a session.",
|
|
2871
|
-
inputSchema: {
|
|
2872
|
-
type: "object",
|
|
2873
|
-
properties: {
|
|
2874
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
2875
|
-
url: { type: "string", description: "http(s) URL of the page to audit (the crawl start page when pages > 1)" },
|
|
2876
|
-
pages: { type: "integer", default: 1, minimum: 1, maximum: 200, description: "How many same-origin pages to audit at most (1 = this page only)" },
|
|
2877
|
-
delayMs: { type: "integer", default: 1000, minimum: 0, description: "Pause between pages when crawling — be polite to sites you do not own" },
|
|
2878
|
-
linkCheckLimit: { type: "integer", default: 30, minimum: 0, description: "Same-origin links to HEAD-check per page" },
|
|
2879
|
-
device: { type: "string", description: "Playwright device profile, e.g. 'iPhone 13' — audit the mobile rendering" },
|
|
2880
|
-
viewport: { type: "string", description: "WIDTHxHEIGHT viewport override" },
|
|
2881
|
-
capture: { type: "boolean", default: true, description: "Write a capture directory (screenshots, evidence, report.html)" },
|
|
2882
|
-
},
|
|
2883
|
-
required: ["url"],
|
|
2884
|
-
},
|
|
2885
|
-
},
|
|
2886
|
-
{
|
|
2887
|
-
name: "tapp_init",
|
|
2888
|
-
title: "Inspect or explore a repository and create the Tapp application model and release plan",
|
|
2889
|
-
description:
|
|
2890
|
-
"Deterministically inspect repository targets, reviewed Tasks/contracts, actors, capabilities, entities, requirements, and the persistent UI Map. Returns an evidence-classified application model plus a compact grounded release-contract plan. `inspect` is read-only; `write` creates artifacts without overwriting; `refresh` updates source evidence; `explore` safely builds/starts a detected web target when url is omitted (or resolves native targets), runs the ordinary real-surface QA engine, tears managed runtimes down, merges its observed UI Map, then refreshes the model/plan while preserving explicit decisions and invalidating stale replay trust. Execution is deterministic/keyless and does not invoke AI unless remote AI was separately and explicitly enabled.",
|
|
2891
|
-
inputSchema: {
|
|
2892
|
-
type: "object",
|
|
2893
|
-
properties: {
|
|
2894
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
2895
|
-
operation: { type: "string", enum: ["inspect", "write", "refresh", "explore"], default: "inspect" },
|
|
2896
|
-
projectDir: { type: "string", description: "Repo-relative project root; defaults to the MCP workspace root" },
|
|
2897
|
-
platform: { type: "string", enum: ["ios", "android", "web"], description: "Optional target filter" },
|
|
2898
|
-
url: { type: "string", description: "Owned web runtime URL when already running; omit during web explore to build/start one safely detected target" },
|
|
2899
|
-
target: { type: "string", description: "Explore target selector: web target name/path, or iOS repo directory, Xcode container, .app, or bundle id; defaults to projectDir" },
|
|
2900
|
-
appBundleId: { type: "string", description: "iOS explore: already-installed bundle id, avoiding a build" },
|
|
2901
|
-
androidAppId: { type: "string", description: "Android explore: required application id" },
|
|
2902
|
-
apkPath: { type: "string", description: "Android explore: optional repo-relative APK to install" },
|
|
2903
|
-
androidSerial: { type: "string", description: "Android explore: optional adb device serial" },
|
|
2904
|
-
maxActions: { type: "integer", minimum: 1, maximum: 1000, default: 40 },
|
|
2905
|
-
timeout: { type: "integer", minimum: 30, maximum: 3600, default: 600 },
|
|
2906
|
-
testEmail: { type: "string", description: "Explore: actor/login email; never persisted in the model" },
|
|
2907
|
-
testPassword: { type: "string", description: "Explore: actor/login password; never persisted in the model" },
|
|
2908
|
-
watch: { type: "boolean", default: false, description: "Web explore only: show the controlled browser and Tapp's actions" },
|
|
2909
|
-
maxContracts: { type: "integer", minimum: 1, maximum: 50, default: 15 },
|
|
2910
|
-
outDir: { type: "string", description: "Repo-relative artifact directory; default .tapp" },
|
|
2911
|
-
},
|
|
2912
|
-
},
|
|
2913
|
-
},
|
|
2914
|
-
{
|
|
2915
|
-
name: "tapp_actor_config",
|
|
2916
|
-
title: "Inspect or configure named test actors without storing credential values",
|
|
2917
|
-
description:
|
|
2918
|
-
"Manage the repository-native .tapp/project.json actor/session contract used by init, release-contract generation, and CI. `read` is inspect-only. `set` writes an explicit actor role, isolation/provisioning policy, and credential-name to environment-variable-name bindings. The tool never accepts, returns, or persists credential values and never overwrites an actor unless replace is explicit.",
|
|
2919
|
-
inputSchema: {
|
|
2920
|
-
type: "object",
|
|
2921
|
-
properties: {
|
|
2922
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
2923
|
-
operation: { type: "string", enum: ["read", "set"], default: "read" },
|
|
2924
|
-
projectDir: { type: "string", description: "Repo-relative project root; defaults to the MCP workspace root" },
|
|
2925
|
-
name: { type: "string", description: "Set: stable actor name" },
|
|
2926
|
-
role: { type: "string", description: "Set: product role, such as member or admin" },
|
|
2927
|
-
session: { type: "string", enum: ["default", "isolated"], default: "default" },
|
|
2928
|
-
provisioning: { type: "string", enum: ["existing", "seeded", "api", "unknown"], default: "existing" },
|
|
2929
|
-
credentialBindings: { type: "object", additionalProperties: { type: "string", pattern: "^[A-Z_][A-Z0-9_]{0,127}$" }, description: "Set: credential names mapped to environment-variable names, for example {email:'ALICE_EMAIL'}; values/secrets are forbidden" },
|
|
2930
|
-
replace: { type: "boolean", default: false, description: "Explicitly replace an existing actor's non-secret configuration" },
|
|
2931
|
-
},
|
|
2932
|
-
},
|
|
2933
|
-
},
|
|
2934
|
-
{
|
|
2935
|
-
name: "tapp_release_plan",
|
|
2936
|
-
title: "Inspect or explicitly review a Tapp release plan",
|
|
2937
|
-
description:
|
|
2938
|
-
"Read the repository-native release plan, apply explicit approve/reject/defer decisions, generate grounded Task/contract drafts, deterministically validate drafts on a real target, or explicitly promote fully replay-validated drafts into reviewed repository-native artifacts. Review changes only decision metadata. Generation writes under .tapp/proposals, never overwrites, never invokes AI, and remains untrusted until real deterministic replay passes. Web validation can build/start/stop the detected managed target when url is omitted.",
|
|
2939
|
-
inputSchema: {
|
|
2940
|
-
type: "object",
|
|
2941
|
-
properties: {
|
|
2942
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
2943
|
-
operation: { type: "string", enum: ["read", "review", "generate", "validate", "promote"], default: "read" },
|
|
2944
|
-
planPath: { type: "string", description: "Repo-relative plan path; default .tapp/release-plan.json" },
|
|
2945
|
-
projectDir: { type: "string", description: "Generate: repo-relative project root containing the scoped .tapp Task directories" },
|
|
2946
|
-
approve: { type: "array", items: { type: "string" }, description: "Plan item ids or names to approve" },
|
|
2947
|
-
reject: { type: "array", items: { type: "string" }, description: "Plan item ids or names to reject" },
|
|
2948
|
-
defer: { type: "array", items: { type: "string" }, description: "Plan item ids or names to defer" },
|
|
2949
|
-
items: { type: "array", items: { type: "string" }, description: "Validate/promote only these plan item ids or names; defaults to every matching draft" },
|
|
2950
|
-
platform: { type: "string", enum: ["ios", "android", "web"], description: "Validate: target platform; inferred when all selected drafts use one platform" },
|
|
2951
|
-
url: { type: "string", description: "Validate web: already-running owned URL; omit to use Tapp's managed target lifecycle" },
|
|
2952
|
-
target: { type: "string", description: "Validate managed web: target id, name, or source path when the repository has multiple browser targets" },
|
|
2953
|
-
appBundleId: { type: "string", description: "Validate iOS: installed application bundle id" },
|
|
2954
|
-
androidAppId: { type: "string", description: "Validate Android: installed application id" },
|
|
2955
|
-
apkPath: { type: "string", description: "Validate Android: optional repo-relative APK" },
|
|
2956
|
-
androidSerial: { type: "string", description: "Validate Android: optional adb serial" },
|
|
2957
|
-
timeout: { type: "integer", minimum: 30, maximum: 3600, default: 600 },
|
|
2958
|
-
},
|
|
2959
|
-
},
|
|
2960
|
-
},
|
|
2961
|
-
{
|
|
2962
|
-
name: "tapp_ci_setup",
|
|
2963
|
-
title: "Create a target-scoped baseline or reviewable CI installation",
|
|
2964
|
-
description:
|
|
2965
|
-
"Complete the local release-contract onboarding loop from the shared application model. `inspect` renders a target-aware GitHub workflow and machine-readable CI manifest without writing; `install` writes both with collision protection; `baseline` imports an existing successful conclusive portable-gate report into a platform/target-specific repository baseline. No network resources, commits, pushes, branch protection, or AI are used.",
|
|
2966
|
-
inputSchema: {
|
|
2967
|
-
type: "object",
|
|
2968
|
-
properties: {
|
|
2969
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
2970
|
-
operation: { type: "string", enum: ["inspect", "install", "baseline"], default: "inspect" },
|
|
2971
|
-
projectDir: { type: "string", description: "Repo-relative project root; defaults to the MCP workspace root" },
|
|
2972
|
-
modelPath: { type: "string", description: "Repo-relative application model path; defaults to <projectDir>/.tapp/application-model.json" },
|
|
2973
|
-
actionRef: { type: "string", description: "GitHub Action reference owner/repository@release-tag-or-sha; defaults to the current Tapp release tag" },
|
|
2974
|
-
defaultBranch: { type: "string", default: "main" },
|
|
2975
|
-
workflowPath: { type: "string", description: "Install: project-relative output; default .github/workflows/tapp.yml" },
|
|
2976
|
-
manifestPath: { type: "string", description: "Install: project-relative output; default .tapp/ci.json" },
|
|
2977
|
-
allowUnresolved: { type: "boolean", default: false, description: "Permit writing a draft whose manifest names unresolved target configuration" },
|
|
2978
|
-
replace: { type: "boolean", default: false, description: "Explicitly replace an existing generated workflow/manifest or target baseline" },
|
|
2979
|
-
reportPath: { type: "string", description: "Baseline: repo-relative successful conclusive portable-gate JSON report" },
|
|
2980
|
-
platform: { type: "string", enum: ["ios", "android", "web"], description: "Baseline: select a target platform" },
|
|
2981
|
-
target: { type: "string", description: "Baseline: application-model target id, name, or source path" },
|
|
2982
|
-
baselinePath: { type: "string", description: "Baseline: optional project-relative target baseline output" },
|
|
2983
|
-
},
|
|
2984
|
-
},
|
|
2985
|
-
},
|
|
2986
|
-
{
|
|
2987
|
-
name: "tapp_ui_map",
|
|
2988
|
-
title: "Build, inspect, or diff the Tapp UI Map",
|
|
2989
|
-
description:
|
|
2990
|
-
"Use Tapp's first-class platform-neutral UI Map: evidence-grounded screen states, semantic controls, transitions, platform variants, provenance, and task/contract coverage hooks. " +
|
|
2991
|
-
"QA runs create capture-local ui-map.json automatically. `read` returns one; `build` deterministically builds/merges a repository map from OCQA evidence; `diff` reports additions and absences without calling shallow-run absence a regression unless comparableFullSweep is explicitly true. No AI is used.",
|
|
2992
|
-
inputSchema: {
|
|
2993
|
-
type: "object",
|
|
2994
|
-
properties: {
|
|
2995
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
2996
|
-
operation: { type: "string", enum: ["read", "build", "diff"], default: "read" },
|
|
2997
|
-
captureId: { type: "string", description: "Read/build from this Tapp capture's ocqa-markers.txt/ui-map.json" },
|
|
2998
|
-
mapPath: { type: "string", description: "Repo-relative UI Map path for read, or build output (default .tapp/ui-map.json)" },
|
|
2999
|
-
markersPath: { type: "string", description: "Repo-relative OCQA markers path for build when captureId is not supplied" },
|
|
3000
|
-
beforePath: { type: "string", description: "Repo-relative baseline UI Map for diff" },
|
|
3001
|
-
afterPath: { type: "string", description: "Repo-relative current UI Map for diff" },
|
|
3002
|
-
platform: { type: "string", enum: ["ios", "android", "web"], default: "ios" },
|
|
3003
|
-
target: { type: "string", description: "Bundle id, Android app id, or owned URL recorded as map provenance" },
|
|
3004
|
-
replace: { type: "boolean", default: false, description: "Build: replace rather than merge existing repository map" },
|
|
3005
|
-
comparableFullSweep: { type: "boolean", default: false, description: "Diff: only enable when both runs had comparable target/config/action budget; permits lost-reachability classification" },
|
|
3006
|
-
},
|
|
3007
|
-
},
|
|
3008
|
-
},
|
|
3009
|
-
{
|
|
3010
|
-
name: "tapp_task",
|
|
3011
|
-
title: "Inspect, validate, or compile a reusable deterministic Task",
|
|
3012
|
-
description:
|
|
3013
|
-
"Work with repository-native compositional Tasks in .tapp/tasks. Tasks define inputs, outputs, pre/postconditions, platform implementations, and the UI Map states/transitions they cover. " +
|
|
3014
|
-
"Validation is deterministic and can ground selectors/coverage against ui-map.json. Compilation expands a Task into the shared keyless Flow contract with reviewable Task provenance; pass that returned flow to tapp_flow_run to replay it. No AI or API key is used.",
|
|
3015
|
-
inputSchema: {
|
|
3016
|
-
type: "object",
|
|
3017
|
-
required: ["taskPath"],
|
|
3018
|
-
properties: {
|
|
3019
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
3020
|
-
operation: { type: "string", enum: ["read", "validate", "compile"], default: "validate" },
|
|
3021
|
-
taskPath: { type: "string", description: "Repo-relative .tapp/tasks/*.yml|json file" },
|
|
3022
|
-
platform: { type: "string", enum: ["ios", "android", "web"], description: "Implementation to validate/compile" },
|
|
3023
|
-
inputs: { type: "object", additionalProperties: { type: "string" }, description: "Task inputs for compile. Secret inputs must be environment placeholders such as $TEST_PASSWORD, never plaintext." },
|
|
3024
|
-
mapPath: { type: "string", description: "Optional repo-relative UI Map v1 used to ground states, edges, and semantic controls" },
|
|
3025
|
-
updateMap: { type: "boolean", default: false, description: "Explicitly add the validated Task's coverage references to mapPath" },
|
|
3026
|
-
outPath: { type: "string", description: "Compile: optional repo-relative JSON output; omitted returns the compiled Flow without writing" },
|
|
3027
|
-
},
|
|
3028
|
-
},
|
|
3029
|
-
},
|
|
3030
|
-
{
|
|
3031
|
-
name: "tapp_release_contract",
|
|
3032
|
-
title: "Inspect, validate, compile, or run a release contract",
|
|
3033
|
-
description:
|
|
3034
|
-
"Work with repository-native TypeScript release contracts in .tapp/contracts. Contracts express business guarantees through reusable Tasks, named actors, exact/eventual expectations, criticality, policy, and UI Map coverage. " +
|
|
3035
|
-
"Compilation targets the same deterministic Flow/Scenario evidence contract; ordinary run is keyless and never invokes a model. Multi-actor isolated replay is currently web-only.",
|
|
3036
|
-
inputSchema: {
|
|
3037
|
-
type: "object",
|
|
3038
|
-
required: ["contractPath"],
|
|
3039
|
-
properties: {
|
|
3040
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
3041
|
-
operation: { type: "string", enum: ["read", "validate", "compile", "run"], default: "validate" },
|
|
3042
|
-
contractPath: { type: "string", description: "Repo-relative .tapp/contracts/*.contract.ts file" },
|
|
3043
|
-
platform: { type: "string", enum: ["ios", "android", "web"], description: "Target platform; optional when the contract declares exactly one" },
|
|
3044
|
-
mapPath: { type: "string", description: "Optional repo-relative UI Map v1 for coverage grounding" },
|
|
3045
|
-
updateMap: { type: "boolean", default: false, description: "Explicitly add the reviewed contract coverage to mapPath" },
|
|
3046
|
-
outPath: { type: "string", description: "Compile: optional repo-relative deterministic JSON output" },
|
|
3047
|
-
url: { type: "string", description: "Run: web target URL override" },
|
|
3048
|
-
appBundleId: { type: "string", description: "Run: iOS bundle id override" },
|
|
3049
|
-
androidAppId: { type: "string", description: "Run: Android application id override" },
|
|
3050
|
-
apkPath: { type: "string", description: "Run: optional Android APK" },
|
|
3051
|
-
androidSerial: { type: "string", description: "Run: optional adb serial" },
|
|
3052
|
-
},
|
|
3053
|
-
},
|
|
3054
|
-
},
|
|
3055
|
-
{
|
|
3056
|
-
name: "tapp_pr_plan",
|
|
3057
|
-
title: "Plan PR coverage or explicitly adopt an observed coverage proposal",
|
|
3058
|
-
description:
|
|
3059
|
-
"Plan builds a deterministic reviewable PR plan from changed files, reviewed ownership, exact observed static-route evidence, UI Map coverage, reusable Tasks, and contract policy. It also emits bounded exploration targets for changed weakly covered UI states. Adopt is an explicit write: it appends one conclusively observed, review-only coverage proposal to the repository release plan, but generates or trusts nothing. No AI runs; plan is read-only and adopt never rewrites existing items.",
|
|
3060
|
-
inputSchema: {
|
|
3061
|
-
type: "object",
|
|
3062
|
-
properties: {
|
|
3063
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
3064
|
-
operation: { type: "string", enum: ["plan", "adopt"], default: "plan" },
|
|
3065
|
-
changedFiles: {
|
|
3066
|
-
type: "array", minItems: 1,
|
|
3067
|
-
items: {
|
|
3068
|
-
anyOf: [
|
|
3069
|
-
{ type: "string" },
|
|
3070
|
-
{
|
|
3071
|
-
type: "object", required: ["filename"], additionalProperties: false,
|
|
3072
|
-
properties: {
|
|
3073
|
-
filename: { type: "string" },
|
|
3074
|
-
previous_filename: { type: "string" },
|
|
3075
|
-
patch: { type: "string", description: "Optional bounded unified patch from the PR provider; consumed locally and never copied into the plan" },
|
|
3076
|
-
},
|
|
3077
|
-
},
|
|
3078
|
-
],
|
|
3079
|
-
},
|
|
3080
|
-
description: "Repository-relative PR paths or provider change objects with optional bounded patch evidence for reviewed symbol ownership",
|
|
3081
|
-
},
|
|
3082
|
-
projectDir: { type: "string", description: "Repo-relative project root; defaults to the MCP workspace root" },
|
|
3083
|
-
platform: { type: "string", enum: ["ios", "android", "web"], description: "Optional platform filter" },
|
|
3084
|
-
mapPath: { type: "string", description: "Project-relative UI Map; defaults to .tapp/ui-map.json" },
|
|
3085
|
-
prPlanPath: { type: "string", description: "Adopt: project-relative executed PR plan containing conclusive exploration evidence" },
|
|
3086
|
-
item: { type: "string", description: "Adopt: stable exploration target id whose reviewable proposal should be appended" },
|
|
3087
|
-
releasePlanPath: { type: "string", description: "Adopt: project-relative target; defaults to .tapp/release-plan.json" },
|
|
3088
|
-
},
|
|
3089
|
-
},
|
|
3090
|
-
},
|
|
3091
|
-
{
|
|
3092
|
-
name: "tapp_flow_run",
|
|
3093
|
-
title: "Run a deterministic E2E flow",
|
|
3094
|
-
description:
|
|
3095
|
-
"Replay a deterministic, authored end-to-end test (a Flow) against iOS (XCUITest), Android " +
|
|
3096
|
-
"(ADB/UIAutomator), or web (Playwright), and return a scannable pass/fail report. A Flow is a list of steps + assertions " +
|
|
3097
|
-
"(see docs/flows-architecture.md). Unlike tapp_explore (autonomous exploration), a Flow does EXACTLY " +
|
|
3098
|
-
"what you specify, the same way every time — use it for regression tests and verifying a fix. Steps: " +
|
|
3099
|
-
"{tap: X} · {type: {field: F, value: V}} · {swipe: up} · {back} · {wait_for: SCREEN}. Assertions " +
|
|
3100
|
-
"(deterministic): {assert_screen: X} · {assert_exists: X} · {assert_absent: X} · {assert_text: {of, contains}}. " +
|
|
3101
|
-
"Opt-in AI assertion: {assert_ai: '<claim about the current screen>'} (judged host-side; needs a key; " +
|
|
3102
|
-
"skipped otherwise). Pass a flow inline via `flow`, or a repo-relative `flowPath` to a .yml/.json. " +
|
|
3103
|
-
"A failed assertion fails the flow and is reported like a QA finding. $TEST_EMAIL/$TEST_PASSWORD and any " +
|
|
3104
|
-
"flow `vars` are substituted; pass testEmail/testPassword for real credential values, or `actor` to " +
|
|
3105
|
-
"resolve them from a configured actor's environment-variable bindings.",
|
|
3106
|
-
inputSchema: {
|
|
3107
|
-
type: "object",
|
|
3108
|
-
properties: {
|
|
3109
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
3110
|
-
flow: {
|
|
3111
|
-
type: "object",
|
|
3112
|
-
description:
|
|
3113
|
-
"Inline Flow: {name, app, steps:[...], vars?}. Example: {name:'login', app:'com.acme.app', steps:[{tap:'Sign In'}, {type:{field:'Email', value:'$TEST_EMAIL'}}, {tap:'Continue'}, {assert_screen:'Home'}]}",
|
|
3114
|
-
},
|
|
3115
|
-
flowPath: { type: "string", description: "Alternative to `flow`: repo-relative path to a .yml/.json Flow (e.g. .tapp/flows/login.yml)" },
|
|
3116
|
-
platform: { type: "string", enum: ["ios", "web", "android"], description: "Overrides Flow platform detection" },
|
|
3117
|
-
appBundleId: { type: "string", description: "iOS: overrides the Flow's `app:` field" },
|
|
3118
|
-
androidAppId: { type: "string", description: "Android: overrides the Flow's `app:` field" },
|
|
3119
|
-
url: { type: "string", description: "Web start URL. Overrides the Flow's `url:` field." },
|
|
3120
|
-
apkPath: { type: "string", description: "Android APK to install before replay." },
|
|
3121
|
-
androidSerial: { type: "string", description: "Android adb device serial." },
|
|
3122
|
-
testEmail: { type: "string", description: "Value for $TEST_EMAIL" },
|
|
3123
|
-
testPassword: { type: "string", description: "Value for $TEST_PASSWORD" },
|
|
3124
|
-
actor: { type: "string", description: "Configured actor name; resolves $TEST_EMAIL/$TEST_PASSWORD from the actor's env-var bindings (explicit testEmail/testPassword win)" },
|
|
3125
|
-
device: { type: "string", description: "Web flows: replay in a Playwright device profile (e.g. \"iPhone 13\")" },
|
|
3126
|
-
viewport: { type: "string", description: "Web flows: explicit viewport WIDTHxHEIGHT (e.g. \"390x844\")" },
|
|
3127
|
-
},
|
|
3128
|
-
},
|
|
3129
|
-
},
|
|
3130
|
-
{
|
|
3131
|
-
name: "tapp_scenario_run",
|
|
3132
|
-
title: "Run a deterministic multi-actor Scenario",
|
|
3133
|
-
description:
|
|
3134
|
-
"Replay a repository-native system test whose named actors run in isolated browser contexts against shared application state. " +
|
|
3135
|
-
"Scenarios use the same deterministic Flow actions/assertions plus explicit actors, shared variables, setup/teardown requests, " +
|
|
3136
|
-
"and polling timeouts for eventual consistency. No model or API key is used during replay. Every result is tagged with its actor. " +
|
|
3137
|
-
"Web actor isolation is implemented now; iOS and Android multi-actor replay is reported as unsupported rather than simulated.",
|
|
3138
|
-
inputSchema: {
|
|
3139
|
-
type: "object",
|
|
3140
|
-
properties: {
|
|
3141
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
3142
|
-
scenario: { type: "object", description: "Inline Scenario with {kind:'scenario', platform:'web', actors, steps, setup?, teardown?}" },
|
|
3143
|
-
scenarioPath: { type: "string", description: "Repo-relative path to a .yml/.json Scenario" },
|
|
3144
|
-
url: { type: "string", description: "Override the Scenario's web URL" },
|
|
3145
|
-
variables: { type: "object", additionalProperties: { type: "string" }, description: "Explicit non-secret/shared variable overrides. Actor secrets may also be referenced by environment variable name in committed Scenario vars." },
|
|
3146
|
-
},
|
|
2627
|
+
// ADR-0007: one command surface. Thirteen public tools; the engine handlers below keep their
|
|
2628
|
+
// original internal names and are reached through dispatchTool(). Every pre-0.18 tool name still
|
|
2629
|
+
// answers (see LEGACY_TOOLS) with a `deprecated` pointer to its replacement.
|
|
2630
|
+
const AUTH = { authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" } };
|
|
2631
|
+
const PLATFORM = { type: "string", enum: ["ios", "android", "web"] };
|
|
2632
|
+
const TARGET_PROPS = {
|
|
2633
|
+
appBundleId: { type: "string", description: "iOS: bundle id of the installed app" },
|
|
2634
|
+
androidAppId: { type: "string", description: "Android: application id on a connected emulator/device" },
|
|
2635
|
+
apkPath: { type: "string", description: "Android: optional APK to install first" },
|
|
2636
|
+
androidSerial: { type: "string", description: "Android: optional adb device serial" },
|
|
2637
|
+
url: { type: "string", description: "Web: http(s) URL of an app or environment you own" },
|
|
2638
|
+
};
|
|
2639
|
+
const INPUT_OVERRIDES = {
|
|
2640
|
+
type: "object", additionalProperties: { type: "string" },
|
|
2641
|
+
description: "Deterministic field values typed during exploration: {'id:<identifier>'|'label:<label>'|'screen:<title>|id:<identifier>': value}",
|
|
2642
|
+
};
|
|
2643
|
+
|
|
2644
|
+
export const TOOLS = [
|
|
2645
|
+
{
|
|
2646
|
+
name: "tapp_explore",
|
|
2647
|
+
title: "Explore the real app (observe — never a verdict)",
|
|
2648
|
+
description:
|
|
2649
|
+
"Autonomously explore an iOS app (appBundleId), Android app (androidAppId) or web app (url) like a tester — taps, types, " +
|
|
2650
|
+
"navigates — and return findings, coverage and evidence. It OBSERVES: no score, no ship verdict; the deterministic gate " +
|
|
2651
|
+
"(`npx -y @aarwitz/tapp@latest ci`) judges. Runs for minutes; for one screen use tapp_look, for a journey use tapp_session. " +
|
|
2652
|
+
"readOnly:true turns it into the read-only audit (renders and reads, never clicks, crawls `pages` same-origin pages) — the only " +
|
|
2653
|
+
"mode safe against production or a site you do not own. goal:\"…\" locates a named screen/control from source + the observed " +
|
|
2654
|
+
"UI Map and, inside an active session, takes the shortest observed route there. If the app barely explored (sign-in wall, crash) " +
|
|
2655
|
+
"the result is `inconclusive` — absence of findings is never a pass. When fields were encountered and you have no values, ASK the user.",
|
|
2656
|
+
inputSchema: {
|
|
2657
|
+
type: "object",
|
|
2658
|
+
properties: {
|
|
2659
|
+
...AUTH, ...TARGET_PROPS,
|
|
2660
|
+
readOnly: { type: "boolean", default: false, description: "Read-only audit of `url`: never clicks, types, submits or hovers" },
|
|
2661
|
+
goal: { type: "string", description: "A named screen, control or focused task to locate (source-connected) instead of exploring everything" },
|
|
2662
|
+
pages: { type: "integer", default: 1, minimum: 1, maximum: 200, description: "readOnly: same-origin pages to audit at most" },
|
|
2663
|
+
delayMs: { type: "integer", default: 1000, minimum: 0, description: "readOnly: pause between crawled pages" },
|
|
2664
|
+
linkCheckLimit: { type: "integer", default: 30, minimum: 0, description: "readOnly: same-origin links to check per page" },
|
|
2665
|
+
capture: { type: "boolean", default: true, description: "readOnly: write a capture (screenshots, evidence, report.html)" },
|
|
2666
|
+
projectDir: { type: "string", description: "goal: repository root; defaults to the MCP workspace" },
|
|
2667
|
+
mapPath: { type: "string", description: "goal: repository-relative UI Map; defaults to .tapp/ui-map.json" },
|
|
2668
|
+
platform: { ...PLATFORM, description: "goal: optional when no session is active" },
|
|
2669
|
+
clearData: { type: "boolean", default: true, description: "Android: clear app data before launch" },
|
|
2670
|
+
watch: { type: "boolean", default: false, description: "Web: show Tapp's controlled Chromium window and a cursor/HUD" },
|
|
2671
|
+
device: { type: "string", description: "Web: Playwright device profile, e.g. \"iPhone 13\"" },
|
|
2672
|
+
viewport: { type: "string", description: "Web: viewport WIDTHxHEIGHT, e.g. \"390x844\"" },
|
|
2673
|
+
maxActions: { type: "integer", minimum: 1, maximum: 1000, default: 60, description: "Exploration action budget" },
|
|
2674
|
+
timeout: { type: "integer", minimum: 30, maximum: 3600, default: 600, description: "Max wall-clock seconds" },
|
|
2675
|
+
testEmail: { type: "string", description: "Email for the sign-in preamble" },
|
|
2676
|
+
testPassword: { type: "string", description: "Password for the sign-in preamble" },
|
|
2677
|
+
interactive: { type: "boolean", description: "Host-with-a-human only: pause at input screens and wait for values via interactiveResponsePath" },
|
|
2678
|
+
interactiveResponsePath: { type: "string", description: "File path the prompting host answers on" },
|
|
2679
|
+
visualReadyPath: { type: "string", description: "Local-client temp path written once the iOS target is foregrounded" },
|
|
2680
|
+
inputOverrides: INPUT_OVERRIDES,
|
|
2681
|
+
appLaunchArgs: { type: "array", items: { type: "string" }, description: "Launch arguments, e.g. [\"--uitesting\"]" },
|
|
2682
|
+
appLaunchEnv: { type: "object", additionalProperties: { type: "string" }, description: "Launch environment, e.g. {\"UI_TEST_BACKEND\": \"staging\"}" },
|
|
2683
|
+
loginSteps: { type: "array", items: {}, description: "Explicit login replay before exploring: [{action:'type'|'tap'|'wait', target, value?, timeoutMs?}] or 'action:target[:value]' strings; $TEST_EMAIL/$TEST_PASSWORD substituted" },
|
|
2684
|
+
baselineFindings: { type: "array", items: { type: "object" }, description: "Findings from a previous run; adds a `regression` comparison (an observation, not a gate)" },
|
|
3147
2685
|
},
|
|
3148
2686
|
},
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
maxActions: { type: "integer", minimum: 5, maximum: 200, default: 35, description: "Exploration budget when building grounding" },
|
|
3169
|
-
run: { type: "boolean", default: false, description: "Also replay the generated flow and include the pass/fail result" },
|
|
3170
|
-
testEmail: { type: "string" },
|
|
3171
|
-
testPassword: { type: "string" },
|
|
3172
|
-
},
|
|
3173
|
-
required: ["goal", "appBundleId"],
|
|
2687
|
+
},
|
|
2688
|
+
{
|
|
2689
|
+
name: "tapp_look",
|
|
2690
|
+
title: "See one screen",
|
|
2691
|
+
description:
|
|
2692
|
+
"The fast way (seconds) to SEE the app: with appBundleId/androidAppId it launches the installed app fresh and returns a screenshot " +
|
|
2693
|
+
"plus the accessibility tree of the screen it lands on; with no target it photographs whatever is on the booted simulator right now " +
|
|
2694
|
+
"(tree:true returns the accessibility tree instead). No exploration, no findings. Use appLaunchArgs/appLaunchEnv for a login bypass " +
|
|
2695
|
+
"or backend override. For a screen reached by signing in or several taps, use tapp_session.",
|
|
2696
|
+
inputSchema: {
|
|
2697
|
+
type: "object",
|
|
2698
|
+
properties: {
|
|
2699
|
+
...AUTH,
|
|
2700
|
+
appBundleId: TARGET_PROPS.appBundleId, androidAppId: TARGET_PROPS.androidAppId, apkPath: TARGET_PROPS.apkPath, androidSerial: TARGET_PROPS.androidSerial,
|
|
2701
|
+
tree: { type: "boolean", default: false, description: "No target: return the accessibility tree of the current screen instead of a screenshot" },
|
|
2702
|
+
clearData: { type: "boolean", default: false, description: "Android: clear app data before launch" },
|
|
2703
|
+
appLaunchArgs: { type: "array", items: { type: "string" }, description: "Launch args, e.g. [\"--uitesting\"]" },
|
|
2704
|
+
appLaunchEnv: { type: "object", additionalProperties: { type: "string" }, description: "Launch env, e.g. {\"UI_TEST_BACKEND\": \"staging\"}" },
|
|
2705
|
+
maxWidth: { type: "integer", minimum: 200, maximum: 1400, default: 700, description: "Max screenshot width in px" },
|
|
3174
2706
|
},
|
|
3175
2707
|
},
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
},
|
|
3193
|
-
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
name: "tapp_run",
|
|
2711
|
+
title: "Replay a Flow, Task, contract, or Scenario",
|
|
2712
|
+
description:
|
|
2713
|
+
"Replay a committed deterministic test exactly, the same way every time — keyless, no model. Pass ONE of: flowPath or an inline " +
|
|
2714
|
+
"`flow` ({name, app|url, steps:[{tap:X},{type:{field,value}},{wait_for:S},{assert_screen:S},{assert_exists:X},…]}), taskPath " +
|
|
2715
|
+
"(.tapp/tasks/*.yml, compiled then replayed), contractPath (.tapp/contracts/*.contract.ts), or scenarioPath / inline `scenario` " +
|
|
2716
|
+
"(multi-actor, web). A failed assertion fails the run and is reported like a finding. $TEST_EMAIL/$TEST_PASSWORD come from " +
|
|
2717
|
+
"testEmail/testPassword or a configured `actor`. Use tapp_explore to find bugs; use this to prove a fix or guard a regression.",
|
|
2718
|
+
inputSchema: {
|
|
2719
|
+
type: "object",
|
|
2720
|
+
properties: {
|
|
2721
|
+
...AUTH,
|
|
2722
|
+
flowPath: { type: "string", description: "Repo-relative Flow (.yml/.json), e.g. .tapp/flows/login.yml" },
|
|
2723
|
+
flow: { type: "object", description: "Inline Flow instead of flowPath" },
|
|
2724
|
+
taskPath: { type: "string", description: "Repo-relative .tapp/tasks/*.yml Task" },
|
|
2725
|
+
inputs: { type: "object", additionalProperties: { type: "string" }, description: "Task inputs; secrets as $ENV placeholders, never plaintext" },
|
|
2726
|
+
contractPath: { type: "string", description: "Repo-relative .tapp/contracts/*.contract.ts" },
|
|
2727
|
+
scenarioPath: { type: "string", description: "Repo-relative Scenario (.yml/.json)" },
|
|
2728
|
+
scenario: { type: "object", description: "Inline Scenario instead of scenarioPath" },
|
|
2729
|
+
variables: { type: "object", additionalProperties: { type: "string" }, description: "Scenario: non-secret shared variable overrides" },
|
|
2730
|
+
platform: { ...PLATFORM, description: "Overrides platform detection" },
|
|
2731
|
+
...TARGET_PROPS,
|
|
2732
|
+
testEmail: { type: "string", description: "Value for $TEST_EMAIL" },
|
|
2733
|
+
testPassword: { type: "string", description: "Value for $TEST_PASSWORD" },
|
|
2734
|
+
actor: { type: "string", description: "Configured actor; resolves $TEST_EMAIL/$TEST_PASSWORD from its env-var bindings" },
|
|
2735
|
+
device: { type: "string", description: "Web: Playwright device profile" },
|
|
2736
|
+
viewport: { type: "string", description: "Web: viewport WIDTHxHEIGHT" },
|
|
3194
2737
|
},
|
|
3195
2738
|
},
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
},
|
|
2739
|
+
},
|
|
2740
|
+
{
|
|
2741
|
+
name: "tapp_validate",
|
|
2742
|
+
title: "Check a Flow, Task, contract, or Scenario without launching",
|
|
2743
|
+
description:
|
|
2744
|
+
"Deterministically validate a committed artifact — pass ONE of flowPath/flow, taskPath, contractPath, scenarioPath/scenario. " +
|
|
2745
|
+
"Tasks and contracts can be grounded against the UI Map (mapPath; updateMap:true records their coverage). compile:true returns the " +
|
|
2746
|
+
"expanded keyless Flow a Task or contract executes as (Tasks only need a `platform`). Nothing is launched and no model is used.",
|
|
2747
|
+
inputSchema: {
|
|
2748
|
+
type: "object",
|
|
2749
|
+
properties: {
|
|
2750
|
+
...AUTH,
|
|
2751
|
+
flowPath: { type: "string" }, flow: { type: "object" },
|
|
2752
|
+
taskPath: { type: "string" }, contractPath: { type: "string" },
|
|
2753
|
+
scenarioPath: { type: "string" }, scenario: { type: "object" },
|
|
2754
|
+
compile: { type: "boolean", default: false, description: "Task/contract: return the compiled deterministic executor form" },
|
|
2755
|
+
platform: { ...PLATFORM, description: "Implementation to validate/compile" },
|
|
2756
|
+
inputs: { type: "object", additionalProperties: { type: "string" }, description: "Task compile inputs" },
|
|
2757
|
+
mapPath: { type: "string", description: "Optional repo-relative UI Map for grounding" },
|
|
2758
|
+
updateMap: { type: "boolean", default: false, description: "Record the validated artifact's coverage in mapPath" },
|
|
2759
|
+
outPath: { type: "string", description: "compile: optional repo-relative JSON output" },
|
|
3211
2760
|
},
|
|
3212
2761
|
},
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
2762
|
+
},
|
|
2763
|
+
{
|
|
2764
|
+
name: "tapp_init",
|
|
2765
|
+
title: "Inspect a repository: application model + release plan",
|
|
2766
|
+
description:
|
|
2767
|
+
"Deterministically inspect repository targets, reviewed Tasks/contracts, actors, capabilities and the persistent UI Map, and return the " +
|
|
2768
|
+
"application model plus a compact grounded release-contract plan. `inspect` is read-only; `write` creates .tapp artifacts without " +
|
|
2769
|
+
"overwriting; `refresh` updates source evidence; `explore` builds/starts a detected target, runs the real-surface exploration, " +
|
|
2770
|
+
"merges its UI Map, then refreshes the plan. Keyless; no AI unless remote AI was explicitly enabled.",
|
|
2771
|
+
inputSchema: {
|
|
2772
|
+
type: "object",
|
|
2773
|
+
properties: {
|
|
2774
|
+
...AUTH,
|
|
2775
|
+
operation: { type: "string", enum: ["inspect", "write", "refresh", "explore"], default: "inspect" },
|
|
2776
|
+
projectDir: { type: "string", description: "Repo-relative project root; defaults to the MCP workspace root" },
|
|
2777
|
+
platform: { ...PLATFORM, description: "Optional target filter" },
|
|
2778
|
+
url: { type: "string", description: "Owned web runtime URL when already running; omit during web explore to build/start the detected target" },
|
|
2779
|
+
target: { type: "string", description: "Explore target selector: web target name/path, or iOS repo dir, Xcode container, .app, or bundle id" },
|
|
2780
|
+
appBundleId: TARGET_PROPS.appBundleId, androidAppId: TARGET_PROPS.androidAppId, apkPath: TARGET_PROPS.apkPath, androidSerial: TARGET_PROPS.androidSerial,
|
|
2781
|
+
maxActions: { type: "integer", minimum: 1, maximum: 1000, default: 40 },
|
|
2782
|
+
timeout: { type: "integer", minimum: 30, maximum: 3600, default: 600 },
|
|
2783
|
+
testEmail: { type: "string", description: "Explore: actor/login email; never persisted" },
|
|
2784
|
+
testPassword: { type: "string", description: "Explore: actor/login password; never persisted" },
|
|
2785
|
+
watch: { type: "boolean", default: false, description: "Web explore: show the controlled browser" },
|
|
2786
|
+
maxContracts: { type: "integer", minimum: 1, maximum: 50, default: 15 },
|
|
2787
|
+
outDir: { type: "string", description: "Repo-relative artifact directory; default .tapp" },
|
|
3226
2788
|
},
|
|
3227
2789
|
},
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
},
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
name: "tapp_plan",
|
|
2793
|
+
title: "The release-plan lifecycle",
|
|
2794
|
+
description:
|
|
2795
|
+
"One tool for the reviewed release plan in .tapp/release-plan.json. action: `read` (default) · `review` (approve/reject/defer items — " +
|
|
2796
|
+
"decision metadata only) · `generate` (grounded Task/contract DRAFTS under .tapp/proposals; untrusted, no AI) · `validate` (replay drafts " +
|
|
2797
|
+
"on a real target) · `promote` (move fully validated drafts into reviewed artifacts) · `pr` (deterministic PR coverage plan from " +
|
|
2798
|
+
"changedFiles) · `adopt` (append one observed PR coverage proposal) · `actor_read` / `actor_set` (named test actors; env-var NAMES only, " +
|
|
2799
|
+
"never credential values). Nothing is trusted until real deterministic replay passes and promotion is explicit.",
|
|
2800
|
+
inputSchema: {
|
|
2801
|
+
type: "object",
|
|
2802
|
+
properties: {
|
|
2803
|
+
...AUTH,
|
|
2804
|
+
action: { type: "string", enum: ["read", "review", "generate", "validate", "promote", "pr", "adopt", "actor_read", "actor_set"], default: "read" },
|
|
2805
|
+
planPath: { type: "string", description: "Repo-relative plan path; default .tapp/release-plan.json" },
|
|
2806
|
+
projectDir: { type: "string", description: "Repo-relative project root; defaults to the MCP workspace root" },
|
|
2807
|
+
approve: { type: "array", items: { type: "string" }, description: "review: item ids/names to approve" },
|
|
2808
|
+
reject: { type: "array", items: { type: "string" }, description: "review: item ids/names to reject" },
|
|
2809
|
+
defer: { type: "array", items: { type: "string" }, description: "review: item ids/names to defer" },
|
|
2810
|
+
items: { type: "array", items: { type: "string" }, description: "validate/promote: only these items" },
|
|
2811
|
+
platform: { ...PLATFORM, description: "validate/pr: target platform" },
|
|
2812
|
+
url: { type: "string", description: "validate web: already-running owned URL" },
|
|
2813
|
+
target: { type: "string", description: "validate managed web: target id/name/path" },
|
|
2814
|
+
appBundleId: TARGET_PROPS.appBundleId, androidAppId: TARGET_PROPS.androidAppId, apkPath: TARGET_PROPS.apkPath, androidSerial: TARGET_PROPS.androidSerial,
|
|
2815
|
+
timeout: { type: "integer", minimum: 30, maximum: 3600, default: 600 },
|
|
2816
|
+
changedFiles: { type: "array", minItems: 1, items: { anyOf: [{ type: "string" }, { type: "object", required: ["filename"], additionalProperties: false, properties: { filename: { type: "string" }, previous_filename: { type: "string" }, patch: { type: "string" } } }] }, description: "pr: repository-relative changed paths or provider change objects" },
|
|
2817
|
+
mapPath: { type: "string", description: "pr: project-relative UI Map; default .tapp/ui-map.json" },
|
|
2818
|
+
prPlanPath: { type: "string", description: "adopt: executed PR plan with conclusive exploration evidence" },
|
|
2819
|
+
item: { type: "string", description: "adopt: exploration target id to append" },
|
|
2820
|
+
releasePlanPath: { type: "string", description: "adopt: target plan; default .tapp/release-plan.json" },
|
|
2821
|
+
name: { type: "string", description: "actor_set: stable actor name" },
|
|
2822
|
+
role: { type: "string", description: "actor_set: product role" },
|
|
2823
|
+
session: { type: "string", enum: ["default", "isolated"], default: "default" },
|
|
2824
|
+
provisioning: { type: "string", enum: ["existing", "seeded", "api", "unknown"], default: "existing" },
|
|
2825
|
+
credentialBindings: { type: "object", additionalProperties: { type: "string", pattern: "^[A-Z_][A-Z0-9_]{0,127}$" }, description: "actor_set: credential names → environment-variable NAMES" },
|
|
2826
|
+
replace: { type: "boolean", default: false, description: "actor_set: replace an existing actor's non-secret configuration" },
|
|
3251
2827
|
},
|
|
3252
2828
|
},
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
},
|
|
2829
|
+
},
|
|
2830
|
+
{
|
|
2831
|
+
name: "tapp_map",
|
|
2832
|
+
title: "The UI Map: read, build, or diff",
|
|
2833
|
+
description:
|
|
2834
|
+
"Tapp's platform-neutral UI Map: observed screen states, semantic controls, transitions, provenance and Task/contract coverage. " +
|
|
2835
|
+
"action `read` returns one (repo .tapp/ui-map.json or a capture's); `build` merges a map from OCQA evidence; `diff` reports additions " +
|
|
2836
|
+
"and absences, calling absence a lost state only when comparableFullSweep is true. No AI.",
|
|
2837
|
+
inputSchema: {
|
|
2838
|
+
type: "object",
|
|
2839
|
+
properties: {
|
|
2840
|
+
...AUTH,
|
|
2841
|
+
action: { type: "string", enum: ["read", "build", "diff"], default: "read" },
|
|
2842
|
+
captureId: { type: "string", description: "Read/build from this capture" },
|
|
2843
|
+
mapPath: { type: "string", description: "Repo-relative map path (default .tapp/ui-map.json)" },
|
|
2844
|
+
markersPath: { type: "string", description: "build: repo-relative OCQA markers when captureId is not supplied" },
|
|
2845
|
+
beforePath: { type: "string", description: "diff: baseline map" },
|
|
2846
|
+
afterPath: { type: "string", description: "diff: current map" },
|
|
2847
|
+
platform: { ...PLATFORM, default: "ios" },
|
|
2848
|
+
target: { type: "string", description: "Bundle id, app id, or owned URL recorded as provenance" },
|
|
2849
|
+
replace: { type: "boolean", default: false, description: "build: replace rather than merge" },
|
|
2850
|
+
comparableFullSweep: { type: "boolean", default: false, description: "diff: both runs had comparable budget; permits lost-reachability classification" },
|
|
3270
2851
|
},
|
|
3271
2852
|
},
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
},
|
|
3289
|
-
|
|
2853
|
+
},
|
|
2854
|
+
{
|
|
2855
|
+
name: "tapp_ci",
|
|
2856
|
+
title: "The merge gate in CI: preview, install, baseline",
|
|
2857
|
+
description:
|
|
2858
|
+
"Set up the deterministic release gate from the application model. action `inspect` (default) renders the target-aware GitHub " +
|
|
2859
|
+
"workflow and CI manifest without writing; `install` writes both with collision protection; `baseline` imports a successful conclusive " +
|
|
2860
|
+
"gate report as the target's baseline. The gate itself runs with `npx -y @aarwitz/tapp@latest ci`. No network, commits, or AI.",
|
|
2861
|
+
inputSchema: {
|
|
2862
|
+
type: "object",
|
|
2863
|
+
properties: {
|
|
2864
|
+
...AUTH,
|
|
2865
|
+
action: { type: "string", enum: ["inspect", "install", "baseline"], default: "inspect" },
|
|
2866
|
+
projectDir: { type: "string", description: "Repo-relative project root; defaults to the MCP workspace root" },
|
|
2867
|
+
modelPath: { type: "string", description: "Repo-relative application model; default <projectDir>/.tapp/application-model.json" },
|
|
2868
|
+
actionRef: { type: "string", description: "GitHub Action reference owner/repo@tag; defaults to this release" },
|
|
2869
|
+
defaultBranch: { type: "string", default: "main" },
|
|
2870
|
+
workflowPath: { type: "string", description: "install: default .github/workflows/tapp.yml" },
|
|
2871
|
+
manifestPath: { type: "string", description: "install: default .tapp/ci.json" },
|
|
2872
|
+
allowUnresolved: { type: "boolean", default: false },
|
|
2873
|
+
replace: { type: "boolean", default: false, description: "Replace an existing workflow/manifest or baseline" },
|
|
2874
|
+
reportPath: { type: "string", description: "baseline: repo-relative successful conclusive gate JSON report" },
|
|
2875
|
+
platform: { ...PLATFORM, description: "baseline: target platform" },
|
|
2876
|
+
target: { type: "string", description: "baseline: application-model target id, name, or source path" },
|
|
2877
|
+
baselinePath: { type: "string", description: "baseline: optional project-relative output" },
|
|
3290
2878
|
},
|
|
3291
2879
|
},
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
"Use appLaunchArgs/appLaunchEnv for apps that need a backend override or login bypass. " +
|
|
3307
|
-
"When you reach a screen with input fields and don't have values for them, ASK THE USER what to type " +
|
|
3308
|
-
"(offer defaults/skip) before typing — the session does not prompt on its own.",
|
|
3309
|
-
inputSchema: {
|
|
3310
|
-
type: "object",
|
|
3311
|
-
properties: {
|
|
3312
|
-
authToken: { type: "string", description: "Required when TAPP_MCP_TOKEN is set" },
|
|
3313
|
-
appBundleId: { type: "string", description: "Bundle id of the installed app to drive" },
|
|
3314
|
-
androidAppId: { type: "string", description: "Android application id to drive (alternative to appBundleId)" },
|
|
3315
|
-
url: { type: "string", description: "Owned http(s) web app URL to drive (alternative to appBundleId/androidAppId); omit all three target identifiers to build/start an unambiguous owned web target from projectDir" },
|
|
3316
|
-
device: { type: "string", description: "Web sessions: render as a Playwright device profile (e.g. \"iPhone 13\")" },
|
|
3317
|
-
viewport: { type: "string", description: "Web sessions: explicit viewport WIDTHxHEIGHT (e.g. \"390x844\")" },
|
|
3318
|
-
target: { type: "string", description: "Optional managed-web target name/path when projectDir contains multiple browser applications" },
|
|
3319
|
-
apkPath: { type: "string", description: "Android APK to install before starting" },
|
|
3320
|
-
androidSerial: { type: "string", description: "Android adb device serial" },
|
|
3321
|
-
clearData: { type: "boolean", default: true, description: "Android: clear app data before launch" },
|
|
3322
|
-
testEmail: { type: "string", description: "Email available to the app/harness, if it has a sign-in" },
|
|
3323
|
-
testPassword: { type: "string", description: "Password available to the app/harness" },
|
|
3324
|
-
appLaunchArgs: { type: "array", items: { type: "string" }, description: "Launch arguments, e.g. [\"--uitesting\"]" },
|
|
3325
|
-
appLaunchEnv: { type: "object", additionalProperties: { type: "string" }, description: "Launch environment, e.g. {\"UI_TEST_BACKEND\": \"staging\"}" },
|
|
3326
|
-
focus: { type: "string", description: "Exact focused UI goal/control/screen to locate from repository source and reach through the shortest observed UI Map route before returning" },
|
|
3327
|
-
projectDir: { type: "string", description: "Repository root for source-connected focus; defaults to the MCP workspace" },
|
|
3328
|
-
mapPath: { type: "string", description: "Optional repository-relative UI Map for focus; defaults to .tapp/ui-map.json" },
|
|
3329
|
-
},
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
name: "tapp_report",
|
|
2883
|
+
title: "Evidence: recent runs, or one run's summary",
|
|
2884
|
+
description:
|
|
2885
|
+
"Without captureId: list recent capture runs for THIS project (other projects' captures are counted but hidden unless allProjects). " +
|
|
2886
|
+
"With captureId: that run's summary metadata. Cite only the capture a command just returned as evidence.",
|
|
2887
|
+
inputSchema: {
|
|
2888
|
+
type: "object",
|
|
2889
|
+
properties: {
|
|
2890
|
+
captureId: { type: "string", description: "Capture run id to summarise; omit to list" },
|
|
2891
|
+
runPath: { type: "string", description: "Absolute capture path override (must stay under captures/)" },
|
|
2892
|
+
limit: { type: "integer", minimum: 1, maximum: 100, default: 10 },
|
|
2893
|
+
allProjects: { type: "boolean", default: false, description: "Include other projects' and pre-provenance captures" },
|
|
3330
2894
|
},
|
|
3331
2895
|
},
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
name: "tapp_session",
|
|
2899
|
+
title: "Drive the app step by step (persistent session)",
|
|
2900
|
+
description:
|
|
2901
|
+
"A persistent interactive session: the app launches once and stays up for a tap → inspect loop. action `start` launches an installed " +
|
|
2902
|
+
"iOS/Android app, an owned web URL, or the workspace's managed web target (pass `focus` to reach a named screen first); then one action " +
|
|
2903
|
+
"per call: `login` (email+password or `actor` — fills, submits and verifies in one call; prefer it over manual typing), `tap` (id/label " +
|
|
2904
|
+
"or x/y), `type` (text, optional id — replaces the field), `swipe`, `back`, `wait` (for id/text), `tree` (re-inspect; full:true for every " +
|
|
2905
|
+
"raw element), `screenshot`; `save_flow` writes the recorded steps as a replayable Flow; `draft_flow` has a model write a Flow from `goal` " +
|
|
2906
|
+
"grounded in observed screens (untrusted proposal; needs a model backend); `end` quits the app — always call it when done. One session " +
|
|
2907
|
+
"at a time; starts from a cold launch, so plan a `login` first when the app gates on sign-in. Ask the user before typing into fields you have no values for.",
|
|
2908
|
+
inputSchema: {
|
|
2909
|
+
type: "object",
|
|
2910
|
+
required: ["action"],
|
|
2911
|
+
properties: {
|
|
2912
|
+
...AUTH,
|
|
2913
|
+
action: { type: "string", enum: ["start", "login", "tap", "type", "swipe", "back", "wait", "tree", "screenshot", "save_flow", "draft_flow", "end"] },
|
|
2914
|
+
...TARGET_PROPS,
|
|
2915
|
+
target: { type: "string", description: "start: managed-web target name/path when the workspace has several" },
|
|
2916
|
+
device: { type: "string", description: "start (web): Playwright device profile" },
|
|
2917
|
+
viewport: { type: "string", description: "start (web): viewport WIDTHxHEIGHT" },
|
|
2918
|
+
clearData: { type: "boolean", default: true, description: "start (Android): clear app data" },
|
|
2919
|
+
testEmail: { type: "string" }, testPassword: { type: "string" },
|
|
2920
|
+
appLaunchArgs: { type: "array", items: { type: "string" } },
|
|
2921
|
+
appLaunchEnv: { type: "object", additionalProperties: { type: "string" } },
|
|
2922
|
+
focus: { type: "string", description: "start: a named screen/control to reach (source + shortest observed route) before returning" },
|
|
2923
|
+
projectDir: { type: "string", description: "start: repository root for source-connected focus" },
|
|
2924
|
+
mapPath: { type: "string", description: "start: repository-relative UI Map; default .tapp/ui-map.json" },
|
|
2925
|
+
email: { type: "string", description: "login: email/username" },
|
|
2926
|
+
password: { type: "string", description: "login: password" },
|
|
2927
|
+
actor: { type: "string", description: "login: configured actor name" },
|
|
2928
|
+
id: { type: "string", description: "tap/type/wait: accessibility id or visible/partial label" },
|
|
2929
|
+
x: { type: "number" }, y: { type: "number" },
|
|
2930
|
+
text: { type: "string", description: "type: text to type · wait: text to wait for" },
|
|
2931
|
+
direction: { type: "string", enum: ["up", "down", "left", "right"] },
|
|
2932
|
+
timeoutMs: { type: "integer", minimum: 500, maximum: 60000, default: 5000 },
|
|
2933
|
+
full: { type: "boolean", default: false, description: "tree: complete raw element list with frames" },
|
|
2934
|
+
label: { type: "string", description: "screenshot: optional label" },
|
|
2935
|
+
name: { type: "string", description: "save_flow: human name for the Flow" },
|
|
2936
|
+
addFinalAssertion: { type: "boolean", default: true, description: "save_flow: append assert_screen for the final screen" },
|
|
2937
|
+
replace: { type: "boolean", default: false, description: "save_flow: replace a Flow with the same filename" },
|
|
2938
|
+
goal: { type: "string", description: "draft_flow: what the test should do, in plain English" },
|
|
2939
|
+
captureId: { type: "string", description: "draft_flow: reuse this capture's grounding instead of exploring" },
|
|
2940
|
+
maxActions: { type: "integer", minimum: 5, maximum: 200, default: 35, description: "draft_flow: exploration budget for grounding" },
|
|
2941
|
+
run: { type: "boolean", default: false, description: "draft_flow: also replay the draft" },
|
|
3347
2942
|
},
|
|
3348
2943
|
},
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
"
|
|
3364
|
-
|
|
3365
|
-
type: "
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
actor: { type: "string", description: "login: configured actor; explicit email/password override its environment bindings" },
|
|
3372
|
-
id: { type: "string", description: "Element accessibility id or visible/partial label (for tap/type/wait)" },
|
|
3373
|
-
x: { type: "number", description: "Tap X coordinate (points), if not using id" },
|
|
3374
|
-
y: { type: "number", description: "Tap Y coordinate (points), if not using id" },
|
|
3375
|
-
text: { type: "string", description: "Text to type, or the label/text to wait for" },
|
|
3376
|
-
direction: { type: "string", enum: ["up", "down", "left", "right"], description: "Swipe direction" },
|
|
3377
|
-
timeoutMs: { type: "integer", minimum: 500, maximum: 60000, default: 5000, description: "For 'wait': how long to poll for the element" },
|
|
3378
|
-
full: { type: "boolean", default: false, description: "For 'tree': return the complete raw element list (frames included) instead of the deduplicated agent-facing projection capped at 160 elements" },
|
|
3379
|
-
label: { type: "string", description: "Optional screenshot label" },
|
|
3380
|
-
},
|
|
3381
|
-
required: ["action"],
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
name: "tapp_build",
|
|
2947
|
+
title: "iOS simulator: build, install, boot",
|
|
2948
|
+
description:
|
|
2949
|
+
"action `build` (default): build the iOS app under projectDir for the simulator (auto-detects container and scheme) and install it, " +
|
|
2950
|
+
"returning the bundle id — use before tapp_explore/tapp_look when the app is not installed; `install`: build a given project/workspace + " +
|
|
2951
|
+
"scheme and install it; `simulators`: list available simulators; `boot`: boot one by udid or name.",
|
|
2952
|
+
inputSchema: {
|
|
2953
|
+
type: "object",
|
|
2954
|
+
properties: {
|
|
2955
|
+
...AUTH,
|
|
2956
|
+
action: { type: "string", enum: ["build", "install", "simulators", "boot"], default: "build" },
|
|
2957
|
+
projectDir: { type: "string", description: "build: dir to search for the .xcworkspace/.xcodeproj (default cwd)" },
|
|
2958
|
+
scheme: { type: "string", description: "Scheme (build: auto-detected; install: required)" },
|
|
2959
|
+
configuration: { type: "string", default: "Debug" },
|
|
2960
|
+
install: { type: "boolean", default: true, description: "build: install on the booted simulator afterwards" },
|
|
2961
|
+
project: { type: "string", description: "install: absolute .xcodeproj path" },
|
|
2962
|
+
workspace: { type: "string", description: "install: absolute .xcworkspace path" },
|
|
2963
|
+
cleanInstall: { type: "boolean", default: true, description: "install: uninstall first" },
|
|
2964
|
+
udid: { type: "string", description: "boot: simulator UDID" },
|
|
2965
|
+
name: { type: "string", description: "boot: simulator name, e.g. 'iPhone 16 Pro'" },
|
|
3382
2966
|
},
|
|
3383
2967
|
},
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
name: "tapp_doctor",
|
|
2971
|
+
title: "Check Tapp readiness",
|
|
2972
|
+
description: "Check the workspace and toolchain: Xcode, simulators, adb, Playwright, and what each platform can run right now.",
|
|
2973
|
+
inputSchema: { type: "object", properties: {} },
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
name: "tapp_feedback",
|
|
2977
|
+
title: "Send feedback to the tapp maintainers",
|
|
2978
|
+
description:
|
|
2979
|
+
"Draft a public GitHub issue on aarwitz/tapp about tapp itself — a bug in tapp, an idea, or a question (not a finding about the app " +
|
|
2980
|
+
"under test). Adds the tapp version, platform availability and the latest capture id, and redacts home paths and tokens. Default is a " +
|
|
2981
|
+
"DRAFT with a prefilled github.com URL; pass submit:true only after the user agreed to file a public issue (uses this machine's gh).",
|
|
2982
|
+
inputSchema: {
|
|
2983
|
+
type: "object",
|
|
2984
|
+
properties: {
|
|
2985
|
+
title: { type: "string", description: "Short, specific title" },
|
|
2986
|
+
body: { type: "string", description: "What happened, what you expected, the exact call. No secrets or private source." },
|
|
2987
|
+
type: { type: "string", enum: ["bug", "idea", "question"], description: "Default bug" },
|
|
2988
|
+
capture: { type: "string", description: "Capture id to reference, 'latest' (default) or 'none'" },
|
|
2989
|
+
submit: { type: "boolean", description: "File the issue now with gh (needs the user's consent). Default false." },
|
|
3391
2990
|
},
|
|
2991
|
+
required: ["title"],
|
|
3392
2992
|
},
|
|
3393
|
-
|
|
3394
|
-
|
|
2993
|
+
},
|
|
2994
|
+
];
|
|
3395
2995
|
|
|
3396
|
-
server.setRequestHandler(
|
|
3397
|
-
|
|
2996
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
|
2997
|
+
|
|
2998
|
+
|
|
2999
|
+
// The in-flight MCP request (progress tokens); routed and legacy calls share it.
|
|
3000
|
+
let currentRequest = null;
|
|
3001
|
+
|
|
3002
|
+
async function handleTool(name, args = {}) {
|
|
3003
|
+
const request = currentRequest || { params: { name, arguments: args, _meta: {} } };
|
|
3398
3004
|
|
|
3399
3005
|
if (name === "tapp_feedback") {
|
|
3400
3006
|
const fb = await import("./feedback.js");
|
|
@@ -4275,7 +3881,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4275
3881
|
const loaded = readProjectConfig(workspaceRoot);
|
|
4276
3882
|
if (loaded.errors.length) return errorResult(`Invalid ${loaded.relativePath}: ${loaded.errors.join("; ")}`);
|
|
4277
3883
|
const actor = loaded.config.actors?.[args.actor.trim()];
|
|
4278
|
-
if (!actor) return errorResult(`Actor '${args.actor.trim()}' is not configured in ${loaded.relativePath}`, { hint: "Configure it with
|
|
3884
|
+
if (!actor) return errorResult(`Actor '${args.actor.trim()}' is not configured in ${loaded.relativePath}`, { hint: "Configure it with tapp_plan (action actor_set) / tapp actor set first" });
|
|
4279
3885
|
// Actors store env-var NAMES only; resolve values here. Explicit testEmail/testPassword win.
|
|
4280
3886
|
for (const [credential, argName, envKey] of [["email", "testEmail", "OCQA_TEST_EMAIL"], ["password", "testPassword", "OCQA_TEST_PASSWORD"]]) {
|
|
4281
3887
|
if (isNonEmptyString(args[argName])) continue;
|
|
@@ -4450,7 +4056,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4450
4056
|
L.push("", "---", "", (rep.stdout || "").trim());
|
|
4451
4057
|
}
|
|
4452
4058
|
} else {
|
|
4453
|
-
L.push("", `Replay the proposal: \`
|
|
4059
|
+
L.push("", `Replay the proposal: \`tapp_run\` with \`flowPath: "${rel}"\`. After it passes, promote it to \`.tapp/flows/\`.`);
|
|
4454
4060
|
}
|
|
4455
4061
|
return richResult(L.join("\n"), { path: rel, proposal: true, promotePath: promotedPath, flow, groundedScreens: grounding.screens.length, ungrounded });
|
|
4456
4062
|
}
|
|
@@ -4548,7 +4154,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4548
4154
|
for (const s of list.slice(0, 20)) {
|
|
4549
4155
|
L.push(`- ${s.booted ? "🟢" : "⚪️"} **${s.name}** — ${s.runtime || "?"}${s.booted ? " · **booted**" : ""} \`${s.udid}\``);
|
|
4550
4156
|
}
|
|
4551
|
-
if (!booted.length) L.push("", "No simulator booted — `
|
|
4157
|
+
if (!booted.length) L.push("", "No simulator booted — `tapp_build (action boot)` to start one before QA.");
|
|
4552
4158
|
return richResult(L.join("\n"), sims);
|
|
4553
4159
|
}
|
|
4554
4160
|
|
|
@@ -4583,7 +4189,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4583
4189
|
const configuration = isNonEmptyString(args.configuration) ? args.configuration.trim() : "Debug";
|
|
4584
4190
|
const sims = await listSimulators();
|
|
4585
4191
|
const booted = (sims.booted || [])[0];
|
|
4586
|
-
if (!booted) return errorResult("No booted simulator. Call
|
|
4192
|
+
if (!booted) return errorResult("No booted simulator. Call tapp_build (action boot) first.");
|
|
4587
4193
|
const target = workspace || project;
|
|
4588
4194
|
if (!fs.existsSync(target)) return errorResult("Project/workspace path not found", { target });
|
|
4589
4195
|
|
|
@@ -4670,7 +4276,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4670
4276
|
const screen = agentScreenProjection(focused || r);
|
|
4671
4277
|
const text = focused
|
|
4672
4278
|
? `🎬 Session started — \`${target}\` (${platformLabel})\n\n${(await import("./focused-navigation.js")).focusedTargetSummary(focused)}\n\n${formatScreen(screen.screenTitle, screen.elements)}`
|
|
4673
|
-
: `🎬 Session started — \`${target}\` (${platformLabel})\n\n${formatScreen(screen.screenTitle, screen.elements)}\n\nDrive it with \`
|
|
4279
|
+
: `🎬 Session started — \`${target}\` (${platformLabel})\n\n${formatScreen(screen.screenTitle, screen.elements)}\n\nDrive it with \`tapp_explore (goal)\` for a named destination, or \`tapp_session\` for one action.`;
|
|
4674
4280
|
// Return the final focused screen once. Previously this duplicated the complete native tree
|
|
4675
4281
|
// inside `focus` and at top level, and retained the pre-focus web URL at top level.
|
|
4676
4282
|
const structured = focused
|
|
@@ -4742,7 +4348,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4742
4348
|
: tgt ? `${verb} \`${tgt}\`` : verb;
|
|
4743
4349
|
const detailNote = !ok && r.detail ? ` — ${r.detail}` : "";
|
|
4744
4350
|
const head = `${did} — ${ok ? "ok" : `⚠️ ${r.status}${detailNote}`} → now on **${r.screenTitle || "Unknown"}**`;
|
|
4745
|
-
const rec = typeof r.recordedSteps === "number" ? `\n\n🔴 Recording — ${r.recordedSteps} step(s). \`
|
|
4351
|
+
const rec = typeof r.recordedSteps === "number" ? `\n\n🔴 Recording — ${r.recordedSteps} step(s). \`tapp_session (action save_flow)\` to keep it as a test.` : "";
|
|
4746
4352
|
// `verbose` is the documented spelling (SESSION_ACT_ARGS.tree); `full` is the original.
|
|
4747
4353
|
// Accepting only `full` meant the documented flag silently did nothing (field issue #9).
|
|
4748
4354
|
const fullTree = action === "tree" && (args.full === true || args.verbose === true || cmd.verbose === true || cmd.full === true);
|
|
@@ -4757,7 +4363,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4757
4363
|
if (unauthorized) return unauthorized;
|
|
4758
4364
|
try {
|
|
4759
4365
|
const saved = await saveInteractiveSessionFlow({ projectDir:workspaceRoot, name:args.name, addFinalAssertion:args.addFinalAssertion !== false, replace:args.replace === true });
|
|
4760
|
-
const text = `💾 Saved flow **${saved.flow.name}** → \`${saved.path}\` (${saved.flow.steps.length} steps)\n\n\`\`\`yaml\n${saved.yaml}\n\`\`\`\n\nReplay it anytime: \`
|
|
4366
|
+
const text = `💾 Saved flow **${saved.flow.name}** → \`${saved.path}\` (${saved.flow.steps.length} steps)\n\n\`\`\`yaml\n${saved.yaml}\n\`\`\`\n\nReplay it anytime: \`tapp_run\` with \`flowPath: "${saved.path}"\`.`;
|
|
4761
4367
|
return richResult(text, { path:saved.path, flow:saved.flow });
|
|
4762
4368
|
} catch (error) {
|
|
4763
4369
|
return errorResult(error.message || String(error), error.code ? { code:error.code } : {});
|
|
@@ -4769,13 +4375,159 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
4769
4375
|
if (unauthorized) return unauthorized;
|
|
4770
4376
|
const recorded = activeSession && activeSession.recording ? activeSession.recording.length : 0;
|
|
4771
4377
|
await endSession();
|
|
4772
|
-
const hint = recorded > 0 ? ` (${recorded} recorded step(s) discarded — use
|
|
4378
|
+
const hint = recorded > 0 ? ` (${recorded} recorded step(s) discarded — use tapp_session (action save_flow) before ending to keep them)` : "";
|
|
4773
4379
|
return richResult(`🏁 Session ended.${hint}`, { ok: true, recordedStepsDiscarded: recorded });
|
|
4774
4380
|
}
|
|
4775
4381
|
|
|
4776
4382
|
return errorResult(`Unknown tool: ${name}`);
|
|
4383
|
+
}
|
|
4384
|
+
|
|
4385
|
+
// Public tool → engine handler routing (ADR-0007). Handlers keep their original names so the
|
|
4386
|
+
// engine does not change; only the surface does.
|
|
4387
|
+
const PUBLIC_TOOL_NAMES = new Set(TOOLS.map((tool) => tool.name));
|
|
4388
|
+
|
|
4389
|
+
// Every pre-0.18 tool name still answers through its original handler, plus a pointer to the
|
|
4390
|
+
// public tool that replaced it. ListTools no longer advertises these.
|
|
4391
|
+
export const LEGACY_TOOLS = Object.freeze({
|
|
4392
|
+
tapp_run_qa: { tool: "tapp_explore" },
|
|
4393
|
+
tapp_audit: { tool: "tapp_explore", hint: "readOnly: true" },
|
|
4394
|
+
tapp_focus: { tool: "tapp_explore", hint: "goal: <query>" },
|
|
4395
|
+
tapp_open_app: { tool: "tapp_look" },
|
|
4396
|
+
tapp_ui_tree: { tool: "tapp_look", hint: "tree: true" },
|
|
4397
|
+
tapp_screenshot: { tool: "tapp_look" },
|
|
4398
|
+
tapp_flow_run: { tool: "tapp_run" },
|
|
4399
|
+
tapp_scenario_run: { tool: "tapp_run" },
|
|
4400
|
+
tapp_task: { tool: "tapp_validate", hint: "taskPath (tapp_run replays it)" },
|
|
4401
|
+
tapp_release_contract: { tool: "tapp_validate", hint: "contractPath (tapp_run replays it)" },
|
|
4402
|
+
tapp_flow_generate: { tool: "tapp_session", hint: 'action: "draft_flow"' },
|
|
4403
|
+
tapp_flow_save: { tool: "tapp_session", hint: 'action: "save_flow"' },
|
|
4404
|
+
tapp_session_start: { tool: "tapp_session", hint: 'action: "start"' },
|
|
4405
|
+
tapp_session_act: { tool: "tapp_session" },
|
|
4406
|
+
tapp_session_end: { tool: "tapp_session", hint: 'action: "end"' },
|
|
4407
|
+
tapp_list_simulators: { tool: "tapp_build", hint: 'action: "simulators"' },
|
|
4408
|
+
tapp_boot_simulator: { tool: "tapp_build", hint: 'action: "boot"' },
|
|
4409
|
+
tapp_install_app: { tool: "tapp_build", hint: 'action: "install"' },
|
|
4410
|
+
tapp_health: { tool: "tapp_doctor" },
|
|
4411
|
+
tapp_release_plan: { tool: "tapp_plan" },
|
|
4412
|
+
tapp_pr_plan: { tool: "tapp_plan", hint: 'action: "pr" | "adopt"' },
|
|
4413
|
+
tapp_actor_config: { tool: "tapp_plan", hint: 'action: "actor_read" | "actor_set"' },
|
|
4414
|
+
tapp_ui_map: { tool: "tapp_map" },
|
|
4415
|
+
tapp_ci_setup: { tool: "tapp_ci" },
|
|
4416
|
+
tapp_list_captures: { tool: "tapp_report" },
|
|
4417
|
+
tapp_capture_summary: { tool: "tapp_report", hint: "captureId" },
|
|
4418
|
+
tapp_capture: { tool: "tapp_explore", hint: "(harness-era capture; explore writes the same evidence)" },
|
|
4419
|
+
tapp_parse_markers: { tool: "tapp_report", hint: "captureId" },
|
|
4777
4420
|
});
|
|
4778
4421
|
|
|
4422
|
+
async function validateArtifactTool(args) {
|
|
4423
|
+
const { compile, ...v } = args;
|
|
4424
|
+
const operation = compile === true ? "compile" : "validate";
|
|
4425
|
+
if (isNonEmptyString(v.taskPath)) return handleTool("tapp_task", { ...v, operation });
|
|
4426
|
+
if (isNonEmptyString(v.contractPath)) return handleTool("tapp_release_contract", { ...v, operation });
|
|
4427
|
+
if (v.flow || isNonEmptyString(v.flowPath)) {
|
|
4428
|
+
const { loadFlowFile, validateFlowSteps } = await import("./flow-runtime.js");
|
|
4429
|
+
let flow = v.flow;
|
|
4430
|
+
if (!flow) {
|
|
4431
|
+
const flowFile = path.resolve(workspaceRoot, v.flowPath.trim());
|
|
4432
|
+
if (!isInsideDir(workspaceRoot, flowFile)) return errorResult("flowPath must be inside the workspace");
|
|
4433
|
+
if (!fs.existsSync(flowFile)) return errorResult("Flow file not found", { flowPath: v.flowPath });
|
|
4434
|
+
try { flow = loadFlowFile(flowFile); } catch (error) { return errorResult("Could not load Flow", { detail: error.message || String(error) }); }
|
|
4435
|
+
}
|
|
4436
|
+
const errors = validateFlowSteps(flow, v.platform || undefined);
|
|
4437
|
+
if (errors.length) return errorResult(`Flow has ${errors.length} invalid step(s)`, { errors, flow: flow.name });
|
|
4438
|
+
return richResult(`✅ Valid Flow — ${flow.name || "unnamed"} · ${(flow.steps || []).length} steps`, { ok: true, flow: flow.name, steps: (flow.steps || []).length });
|
|
4439
|
+
}
|
|
4440
|
+
if (v.scenario || isNonEmptyString(v.scenarioPath)) {
|
|
4441
|
+
const { loadScenarioFile, validateScenario } = await import("./scenario-runtime.js");
|
|
4442
|
+
let scenario = v.scenario;
|
|
4443
|
+
if (!scenario) {
|
|
4444
|
+
const scenarioFile = path.resolve(workspaceRoot, v.scenarioPath.trim());
|
|
4445
|
+
if (!isInsideDir(workspaceRoot, scenarioFile)) return errorResult("scenarioPath must be inside the workspace");
|
|
4446
|
+
if (!fs.existsSync(scenarioFile)) return errorResult("Scenario file not found", { scenarioPath: v.scenarioPath });
|
|
4447
|
+
try { scenario = loadScenarioFile(scenarioFile); } catch (error) { return errorResult("Could not load Scenario", { detail: error.message || String(error) }); }
|
|
4448
|
+
}
|
|
4449
|
+
const errors = validateScenario(scenario);
|
|
4450
|
+
if (errors.length) return errorResult(`Scenario has ${errors.length} problem(s)`, { errors });
|
|
4451
|
+
return richResult(`✅ Valid Scenario — ${scenario.name || "unnamed"} · ${Object.keys(scenario.actors || {}).length} actors · ${(scenario.steps || []).length} steps`, { ok: true, scenario: scenario.name });
|
|
4452
|
+
}
|
|
4453
|
+
return errorResult("tapp_validate needs one of taskPath, contractPath, flowPath|flow, or scenarioPath|scenario");
|
|
4454
|
+
}
|
|
4455
|
+
|
|
4456
|
+
export async function routePublicTool(name, args = {}) {
|
|
4457
|
+
const { readOnly, goal, tree, action, ...rest } = args;
|
|
4458
|
+
switch (name) {
|
|
4459
|
+
case "tapp_explore":
|
|
4460
|
+
if (readOnly === true) return handleTool("tapp_audit", rest);
|
|
4461
|
+
if (isNonEmptyString(goal)) return handleTool("tapp_focus", { query: goal, projectDir: rest.projectDir, platform: rest.platform, mapPath: rest.mapPath, authToken: rest.authToken });
|
|
4462
|
+
return handleTool("tapp_explore", rest);
|
|
4463
|
+
case "tapp_look":
|
|
4464
|
+
if (isNonEmptyString(rest.appBundleId) || isNonEmptyString(rest.androidAppId)) return handleTool("tapp_open_app", rest);
|
|
4465
|
+
return handleTool(tree === true ? "tapp_ui_tree" : "tapp_screenshot", rest);
|
|
4466
|
+
case "tapp_run": {
|
|
4467
|
+
if (rest.flow || isNonEmptyString(rest.flowPath)) return handleTool("tapp_flow_run", rest);
|
|
4468
|
+
if (rest.scenario || isNonEmptyString(rest.scenarioPath)) return handleTool("tapp_scenario_run", rest);
|
|
4469
|
+
if (isNonEmptyString(rest.contractPath)) return handleTool("tapp_release_contract", { ...rest, operation: "run" });
|
|
4470
|
+
if (isNonEmptyString(rest.taskPath)) {
|
|
4471
|
+
const compiled = await handleTool("tapp_task", { operation: "compile", taskPath: rest.taskPath, platform: rest.platform, inputs: rest.inputs, authToken: rest.authToken });
|
|
4472
|
+
if (compiled.isError || !compiled.structuredContent?.flow) return compiled;
|
|
4473
|
+
const { taskPath, inputs, ...replay } = rest;
|
|
4474
|
+
return handleTool("tapp_flow_run", { ...replay, flow: compiled.structuredContent.flow });
|
|
4475
|
+
}
|
|
4476
|
+
return errorResult("tapp_run needs one of flowPath|flow, taskPath, contractPath, or scenarioPath|scenario");
|
|
4477
|
+
}
|
|
4478
|
+
case "tapp_validate":
|
|
4479
|
+
return validateArtifactTool(rest);
|
|
4480
|
+
case "tapp_plan": {
|
|
4481
|
+
const op = action || "read";
|
|
4482
|
+
if (op === "pr" || op === "adopt") return handleTool("tapp_pr_plan", { ...rest, operation: op === "pr" ? "plan" : "adopt" });
|
|
4483
|
+
if (op === "actor_read" || op === "actor_set") return handleTool("tapp_actor_config", { ...rest, operation: op === "actor_set" ? "set" : "read" });
|
|
4484
|
+
return handleTool("tapp_release_plan", { ...rest, operation: op });
|
|
4485
|
+
}
|
|
4486
|
+
case "tapp_map":
|
|
4487
|
+
return handleTool("tapp_ui_map", { ...rest, operation: action || rest.operation || "read" });
|
|
4488
|
+
case "tapp_ci":
|
|
4489
|
+
return handleTool("tapp_ci_setup", { ...rest, operation: action || rest.operation || "inspect" });
|
|
4490
|
+
case "tapp_report":
|
|
4491
|
+
if (isNonEmptyString(rest.captureId) || isNonEmptyString(rest.runPath)) return handleTool("tapp_capture_summary", { runId: rest.captureId, runPath: rest.runPath });
|
|
4492
|
+
return handleTool("tapp_list_captures", rest);
|
|
4493
|
+
case "tapp_session": {
|
|
4494
|
+
if (action === "start") return handleTool("tapp_session_start", rest);
|
|
4495
|
+
if (action === "end") return handleTool("tapp_session_end", rest);
|
|
4496
|
+
if (action === "save_flow") return handleTool("tapp_flow_save", rest);
|
|
4497
|
+
if (action === "draft_flow") return handleTool("tapp_flow_generate", { ...rest, goal });
|
|
4498
|
+
return handleTool("tapp_session_act", { ...rest, action: action || "tree" });
|
|
4499
|
+
}
|
|
4500
|
+
case "tapp_build": {
|
|
4501
|
+
if (action === "simulators") return handleTool("tapp_list_simulators", rest);
|
|
4502
|
+
if (action === "boot") return handleTool("tapp_boot_simulator", rest);
|
|
4503
|
+
if (action === "install") return handleTool("tapp_install_app", rest);
|
|
4504
|
+
return handleTool("tapp_build", rest);
|
|
4505
|
+
}
|
|
4506
|
+
case "tapp_doctor":
|
|
4507
|
+
return handleTool("tapp_health", rest);
|
|
4508
|
+
default:
|
|
4509
|
+
return handleTool(name, args);
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4512
|
+
|
|
4513
|
+
export async function dispatchTool(name, args = {}) {
|
|
4514
|
+
if (PUBLIC_TOOL_NAMES.has(name)) return routePublicTool(name, args);
|
|
4515
|
+
const legacy = LEGACY_TOOLS[name];
|
|
4516
|
+
if (!legacy) return errorResult(`Unknown tool: ${name}`);
|
|
4517
|
+
const result = await handleTool(name, args);
|
|
4518
|
+
const deprecated = `${name} is deprecated; use ${legacy.tool}${legacy.hint ? ` with ${legacy.hint}` : ""}.`;
|
|
4519
|
+
result.structuredContent = { ...(result.structuredContent || {}), deprecated };
|
|
4520
|
+
if (result.content?.[0]?.type === "text") result.content[0].text = `${result.content[0].text}\n\nℹ️ ${deprecated}`;
|
|
4521
|
+
return result;
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4524
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
4525
|
+
currentRequest = request;
|
|
4526
|
+
try { return await dispatchTool(request.params.name, request.params.arguments || {}); }
|
|
4527
|
+
finally { currentRequest = null; }
|
|
4528
|
+
});
|
|
4529
|
+
|
|
4530
|
+
|
|
4779
4531
|
export async function startMcpServer() {
|
|
4780
4532
|
const transport = new StdioServerTransport();
|
|
4781
4533
|
await server.connect(transport);
|