@muggleai/works 5.39.0-staging.366 → 5.39.0-staging.367
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/marketplace.json +1 -1
- package/dist/{chunk-SPTMLR5Z.js → chunk-KVOQUMGB.js} +293 -29
- package/dist/{chunk-RNRNBDIX.js → chunk-QB4WZI2I.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/.codex-mcp.json +1 -1
- package/dist/plugin/.codex-plugin/plugin.json +1 -1
- package/dist/plugin/.cursor-plugin/plugin.json +1 -1
- package/dist/plugin/.mcp.json +1 -1
- package/dist/plugin/agents/acceptance-tester.md +4 -4
- package/dist/plugin/skills/muggle/SKILL.md +1 -0
- package/dist/plugin/skills/muggle-test/SKILL.md +9 -2
- package/dist/plugin/skills/muggle-test/ios.md +36 -0
- package/dist/release-manifest.json +3 -3
- package/dist/{src-BKZUICKO.js → src-TO2HGAQY.js} +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-mcp.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.cursor-plugin/plugin.json +1 -1
- package/plugin/.mcp.json +1 -1
- package/plugin/agents/acceptance-tester.md +4 -4
- package/plugin/skills/muggle/SKILL.md +1 -0
- package/plugin/skills/muggle-test/SKILL.md +9 -2
- package/plugin/skills/muggle-test/ios.md +36 -0
|
@@ -812,14 +812,14 @@ function getPlatformKey() {
|
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
async function calculateFileChecksum(filePath) {
|
|
815
|
-
return new Promise((
|
|
815
|
+
return new Promise((resolve9, reject) => {
|
|
816
816
|
const hash = crypto.createHash("sha256");
|
|
817
817
|
const stream = fs4.createReadStream(filePath);
|
|
818
818
|
stream.on("data", (data) => {
|
|
819
819
|
hash.update(data);
|
|
820
820
|
});
|
|
821
821
|
stream.on("end", () => {
|
|
822
|
-
|
|
822
|
+
resolve9(hash.digest("hex"));
|
|
823
823
|
});
|
|
824
824
|
stream.on("error", (error) => {
|
|
825
825
|
reject(error);
|
|
@@ -897,7 +897,7 @@ function getOpenCommand(url) {
|
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
async function openBrowserUrl(options) {
|
|
900
|
-
return new Promise((
|
|
900
|
+
return new Promise((resolve9) => {
|
|
901
901
|
try {
|
|
902
902
|
const command = getOpenCommand(options.url);
|
|
903
903
|
logger2.debug("[Browser] Opening URL", { url: options.url, command });
|
|
@@ -907,13 +907,13 @@ async function openBrowserUrl(options) {
|
|
|
907
907
|
url: options.url,
|
|
908
908
|
error: error.message
|
|
909
909
|
});
|
|
910
|
-
|
|
910
|
+
resolve9({
|
|
911
911
|
opened: false,
|
|
912
912
|
error: error.message
|
|
913
913
|
});
|
|
914
914
|
} else {
|
|
915
915
|
logger2.info("[Browser] URL opened successfully", { url: options.url });
|
|
916
|
-
|
|
916
|
+
resolve9({ opened: true });
|
|
917
917
|
}
|
|
918
918
|
});
|
|
919
919
|
} catch (error) {
|
|
@@ -922,7 +922,7 @@ async function openBrowserUrl(options) {
|
|
|
922
922
|
url: options.url,
|
|
923
923
|
error: errorMessage
|
|
924
924
|
});
|
|
925
|
-
|
|
925
|
+
resolve9({
|
|
926
926
|
opened: false,
|
|
927
927
|
error: errorMessage
|
|
928
928
|
});
|
|
@@ -2559,9 +2559,9 @@ function resetAuthService() {
|
|
|
2559
2559
|
serviceInstance2 = null;
|
|
2560
2560
|
}
|
|
2561
2561
|
function sleep(params) {
|
|
2562
|
-
return new Promise((
|
|
2562
|
+
return new Promise((resolve9) => {
|
|
2563
2563
|
setTimeout(() => {
|
|
2564
|
-
|
|
2564
|
+
resolve9();
|
|
2565
2565
|
}, params.durationMs);
|
|
2566
2566
|
});
|
|
2567
2567
|
}
|
|
@@ -3471,13 +3471,13 @@ var lookUpCheckoutPullRequest = async (cwd) => {
|
|
|
3471
3471
|
return pullRequest;
|
|
3472
3472
|
};
|
|
3473
3473
|
function runGhPrView(cwd) {
|
|
3474
|
-
return new Promise((
|
|
3474
|
+
return new Promise((resolve9) => {
|
|
3475
3475
|
execFile(
|
|
3476
3476
|
"gh",
|
|
3477
3477
|
["pr", "view", "--json", "number,url,createdAt,state"],
|
|
3478
3478
|
{ cwd, timeout: PR_LOOKUP_TIMEOUT_MS, windowsHide: true, encoding: "utf-8" },
|
|
3479
3479
|
(error, stdout) => {
|
|
3480
|
-
|
|
3480
|
+
resolve9(error ? null : stdout);
|
|
3481
3481
|
}
|
|
3482
3482
|
);
|
|
3483
3483
|
});
|
|
@@ -4227,7 +4227,7 @@ async function executeElectronAppAsync(params) {
|
|
|
4227
4227
|
capturedStderr: ""
|
|
4228
4228
|
};
|
|
4229
4229
|
activeProcesses.set(params.runId, processInfo);
|
|
4230
|
-
return await new Promise((
|
|
4230
|
+
return await new Promise((resolve9, reject) => {
|
|
4231
4231
|
const finalize = (result) => {
|
|
4232
4232
|
if (processInfo.hasSettled) {
|
|
4233
4233
|
return;
|
|
@@ -4244,7 +4244,7 @@ async function executeElectronAppAsync(params) {
|
|
|
4244
4244
|
void ensureTempDir().then((tempDir) => removeStopRequestFileAsync({ tempDir, runId: params.runId }));
|
|
4245
4245
|
}
|
|
4246
4246
|
if (result.ok) {
|
|
4247
|
-
|
|
4247
|
+
resolve9(result.payload);
|
|
4248
4248
|
} else {
|
|
4249
4249
|
reject(result.payload);
|
|
4250
4250
|
}
|
|
@@ -4794,13 +4794,13 @@ var BRANCH_CREATION_REFLOG_PREFIX = "branch: Created from ";
|
|
|
4794
4794
|
var SHORT_SHA_LENGTH = 7;
|
|
4795
4795
|
var MAX_LISTED_INHERITED_COMMITS = 20;
|
|
4796
4796
|
var GIT_COMMAND_TIMEOUT_MS = 3e4;
|
|
4797
|
-
var runGitCommand = (args, cwd) => new Promise((
|
|
4797
|
+
var runGitCommand = (args, cwd) => new Promise((resolve9) => {
|
|
4798
4798
|
execFile(
|
|
4799
4799
|
"git",
|
|
4800
4800
|
args,
|
|
4801
4801
|
{ cwd, timeout: GIT_COMMAND_TIMEOUT_MS, windowsHide: true, encoding: "utf-8" },
|
|
4802
4802
|
(error, stdout) => {
|
|
4803
|
-
|
|
4803
|
+
resolve9(error ? null : stdout.trim());
|
|
4804
4804
|
}
|
|
4805
4805
|
);
|
|
4806
4806
|
});
|
|
@@ -5060,9 +5060,9 @@ function isValid2(value) {
|
|
|
5060
5060
|
function readReleaseManifest2() {
|
|
5061
5061
|
if (cachedManifest2 !== void 0)
|
|
5062
5062
|
return cachedManifest2;
|
|
5063
|
-
const
|
|
5063
|
+
const path29 = MANIFEST_PATH2;
|
|
5064
5064
|
try {
|
|
5065
|
-
const raw = readFileSync(
|
|
5065
|
+
const raw = readFileSync(path29, "utf8");
|
|
5066
5066
|
const parsed = JSON.parse(raw);
|
|
5067
5067
|
cachedManifest2 = isValid2(parsed) ? parsed : DEV_MANIFEST2;
|
|
5068
5068
|
return cachedManifest2;
|
|
@@ -6108,7 +6108,7 @@ function isProcessAlive(pid) {
|
|
|
6108
6108
|
}
|
|
6109
6109
|
}
|
|
6110
6110
|
async function sleep2(ms) {
|
|
6111
|
-
await new Promise((
|
|
6111
|
+
await new Promise((resolve9) => setTimeout(resolve9, ms));
|
|
6112
6112
|
}
|
|
6113
6113
|
|
|
6114
6114
|
// packages/mcps/src/shared/service-stack/port-listener-constants.ts
|
|
@@ -6190,18 +6190,18 @@ async function readPosixPortListener(port) {
|
|
|
6190
6190
|
return { isReadable: true, listener };
|
|
6191
6191
|
}
|
|
6192
6192
|
function runListenerTool(command, args) {
|
|
6193
|
-
return new Promise((
|
|
6193
|
+
return new Promise((resolve9) => {
|
|
6194
6194
|
execFile(
|
|
6195
6195
|
command,
|
|
6196
6196
|
args,
|
|
6197
6197
|
{ timeout: PORT_LISTENER_COMMAND_TIMEOUT_MS, windowsHide: true, encoding: "utf-8" },
|
|
6198
6198
|
(error, stdout) => {
|
|
6199
6199
|
if (error === null) {
|
|
6200
|
-
|
|
6200
|
+
resolve9({ exitCode: 0, stdout });
|
|
6201
6201
|
} else if (typeof error.code === "number" && !error.killed) {
|
|
6202
|
-
|
|
6202
|
+
resolve9({ exitCode: error.code, stdout });
|
|
6203
6203
|
} else {
|
|
6204
|
-
|
|
6204
|
+
resolve9(null);
|
|
6205
6205
|
}
|
|
6206
6206
|
}
|
|
6207
6207
|
);
|
|
@@ -6220,8 +6220,8 @@ async function stopProcessTree(pid) {
|
|
|
6220
6220
|
}
|
|
6221
6221
|
}
|
|
6222
6222
|
function runStopCommand(command, args) {
|
|
6223
|
-
return new Promise((
|
|
6224
|
-
execFile(command, args, { timeout: SERVICE_STOP_COMMAND_TIMEOUT_MS, windowsHide: true }, () =>
|
|
6223
|
+
return new Promise((resolve9) => {
|
|
6224
|
+
execFile(command, args, { timeout: SERVICE_STOP_COMMAND_TIMEOUT_MS, windowsHide: true }, () => resolve9());
|
|
6225
6225
|
});
|
|
6226
6226
|
}
|
|
6227
6227
|
|
|
@@ -6815,7 +6815,7 @@ function shortSha2(sha) {
|
|
|
6815
6815
|
return sha.slice(0, 7);
|
|
6816
6816
|
}
|
|
6817
6817
|
async function sleep3(ms) {
|
|
6818
|
-
await new Promise((
|
|
6818
|
+
await new Promise((resolve9) => setTimeout(resolve9, ms));
|
|
6819
6819
|
}
|
|
6820
6820
|
|
|
6821
6821
|
// packages/mcps/src/shared/service-stack/stack-mismatch-description.ts
|
|
@@ -7387,6 +7387,83 @@ var TasteProfileDeleteInputSchema = z.object({
|
|
|
7387
7387
|
projectId: z.string().min(1).optional().describe("Delete only this project's section; omit to delete the whole uploaded profile.")
|
|
7388
7388
|
});
|
|
7389
7389
|
|
|
7390
|
+
// packages/mcps/src/mcp/e2e/contracts/ios-pool-types.ts
|
|
7391
|
+
var IosArtifactProducerEnum = /* @__PURE__ */ ((IosArtifactProducerEnum2) => {
|
|
7392
|
+
IosArtifactProducerEnum2["DashboardUpload"] = "dashboard_upload";
|
|
7393
|
+
IosArtifactProducerEnum2["CiPush"] = "ci_push";
|
|
7394
|
+
return IosArtifactProducerEnum2;
|
|
7395
|
+
})(IosArtifactProducerEnum || {});
|
|
7396
|
+
var IosRunStatusEnum = /* @__PURE__ */ ((IosRunStatusEnum2) => {
|
|
7397
|
+
IosRunStatusEnum2["Queued"] = "queued";
|
|
7398
|
+
IosRunStatusEnum2["Claimed"] = "claimed";
|
|
7399
|
+
IosRunStatusEnum2["Running"] = "running";
|
|
7400
|
+
IosRunStatusEnum2["Completed"] = "completed";
|
|
7401
|
+
IosRunStatusEnum2["InfraError"] = "infra_error";
|
|
7402
|
+
IosRunStatusEnum2["TimedOut"] = "timed_out";
|
|
7403
|
+
IosRunStatusEnum2["Cancelled"] = "cancelled";
|
|
7404
|
+
return IosRunStatusEnum2;
|
|
7405
|
+
})(IosRunStatusEnum || {});
|
|
7406
|
+
var IosRunVerdictEnum = /* @__PURE__ */ ((IosRunVerdictEnum2) => {
|
|
7407
|
+
IosRunVerdictEnum2["Passed"] = "passed";
|
|
7408
|
+
IosRunVerdictEnum2["Failed"] = "failed";
|
|
7409
|
+
IosRunVerdictEnum2["GoalUnachievable"] = "goal_unachievable";
|
|
7410
|
+
return IosRunVerdictEnum2;
|
|
7411
|
+
})(IosRunVerdictEnum || {});
|
|
7412
|
+
|
|
7413
|
+
// packages/mcps/src/mcp/e2e/contracts/ios-pool-constants.ts
|
|
7414
|
+
var FINISHED_IOS_RUN_STATUSES = [
|
|
7415
|
+
"completed" /* Completed */,
|
|
7416
|
+
"infra_error" /* InfraError */,
|
|
7417
|
+
"timed_out" /* TimedOut */,
|
|
7418
|
+
"cancelled" /* Cancelled */
|
|
7419
|
+
];
|
|
7420
|
+
var IOS_BUILD_ARCHIVE_MAX_BYTES = 512 * 1024 * 1024;
|
|
7421
|
+
var IOS_BUILD_ARCHIVE_EXTENSION = ".zip";
|
|
7422
|
+
var IOS_BUILD_ARCHIVE_CONTENT_TYPE = "application/octet-stream";
|
|
7423
|
+
var IOS_BUILD_DIGEST_READ_CHUNK_BYTES = 1024 * 1024;
|
|
7424
|
+
var IOS_BUILD_UPLOAD_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
7425
|
+
var DEFAULT_IOS_RUN_MAX_STEPS = 60;
|
|
7426
|
+
var DEFAULT_IOS_RUN_STEP_TIMEOUT_MS = 2 * 60 * 1e3;
|
|
7427
|
+
var DEFAULT_IOS_RUN_TIMEOUT_MS = 30 * 60 * 1e3;
|
|
7428
|
+
var IOS_RUN_MAX_STEPS_LIMIT = 500;
|
|
7429
|
+
var IOS_RUN_STEP_TIMEOUT_LIMIT_MS = 10 * 60 * 1e3;
|
|
7430
|
+
var IOS_RUN_TIMEOUT_LIMIT_MS = 2 * 3600 * 1e3;
|
|
7431
|
+
|
|
7432
|
+
// packages/mcps/src/mcp/e2e/contracts/ios-pool-schemas.ts
|
|
7433
|
+
var IosProjectIdSchema = z.string().min(1).describe("Muggle project ID (UUID) the iOS build or run belongs to");
|
|
7434
|
+
var IosBuildDigestSchema = z.string().regex(/^[a-f0-9]{64}$/, "must be the lowercase hex sha256 digest muggle-remote-ios-build-upload returned").describe("sha256 digest of an uploaded build (artifact.digest from muggle-remote-ios-build-upload or -list)");
|
|
7435
|
+
var IosBuildUploadInputSchema = z.object({
|
|
7436
|
+
projectId: IosProjectIdSchema,
|
|
7437
|
+
appZipPath: z.string().min(1).describe(
|
|
7438
|
+
`Absolute path on this machine of the zipped .app simulator build (${IOS_BUILD_ARCHIVE_EXTENSION}, at most ${IOS_BUILD_ARCHIVE_MAX_BYTES / (1024 * 1024)} MB). Streamed from disk; never read it yourself.`
|
|
7439
|
+
),
|
|
7440
|
+
bundleId: z.string().min(1).describe("The app's bundle identifier, e.g. com.example.app"),
|
|
7441
|
+
targetRuntime: z.string().min(1).describe("Simulator runtime the build targets, e.g. iOS-17-5"),
|
|
7442
|
+
branch: z.string().min(1).describe("Git branch the build was made from"),
|
|
7443
|
+
commit: z.string().min(1).describe("Git commit SHA the build was made from"),
|
|
7444
|
+
producer: z.nativeEnum(IosArtifactProducerEnum).default("ci_push" /* CiPush */).describe("Who is uploading: ci_push for an automated pipeline or agent (default); dashboard_upload only for a person's manual upload")
|
|
7445
|
+
});
|
|
7446
|
+
var IosBuildListInputSchema = z.object({
|
|
7447
|
+
projectId: IosProjectIdSchema
|
|
7448
|
+
});
|
|
7449
|
+
var IosRunCreateInputSchema = z.object({
|
|
7450
|
+
projectId: IosProjectIdSchema,
|
|
7451
|
+
artifactDigest: IosBuildDigestSchema,
|
|
7452
|
+
task: z.string().min(1).optional().describe("Plain-language goal for the agent to verify in the app"),
|
|
7453
|
+
useCaseId: z.string().min(1).optional().describe("Existing use case to run instead of a free-form task"),
|
|
7454
|
+
testCaseId: z.string().min(1).optional().describe("Existing test case to run instead of a free-form task"),
|
|
7455
|
+
deviceType: z.string().min(1).describe("Simulator device type to run on, e.g. iPhone-15"),
|
|
7456
|
+
secretRefs: z.array(z.string().min(1)).default([]).describe("Names of project secrets the host resolves at claim time, such as a login password; never the secret values"),
|
|
7457
|
+
maxSteps: z.number().int().positive().max(IOS_RUN_MAX_STEPS_LIMIT).default(DEFAULT_IOS_RUN_MAX_STEPS).describe("Most agent steps before the run stops with a machinery status"),
|
|
7458
|
+
stepTimeoutMs: z.number().int().positive().max(IOS_RUN_STEP_TIMEOUT_LIMIT_MS).default(DEFAULT_IOS_RUN_STEP_TIMEOUT_MS).describe("Per-step timeout in milliseconds"),
|
|
7459
|
+
runTimeoutMs: z.number().int().positive().max(IOS_RUN_TIMEOUT_LIMIT_MS).default(DEFAULT_IOS_RUN_TIMEOUT_MS).describe("Whole-run timeout in milliseconds")
|
|
7460
|
+
}).refine((runInput) => Boolean(runInput.task || runInput.useCaseId || runInput.testCaseId), {
|
|
7461
|
+
message: "Pass one of task, useCaseId, or testCaseId."
|
|
7462
|
+
});
|
|
7463
|
+
var IosRunReadInputSchema = z.object({
|
|
7464
|
+
runId: z.string().min(1).describe("iOS run ID (run.runId from muggle-remote-ios-run-create)")
|
|
7465
|
+
});
|
|
7466
|
+
|
|
7390
7467
|
// packages/mcps/src/mcp/e2e/contracts/index.ts
|
|
7391
7468
|
var PaginationInputSchema = z.object({
|
|
7392
7469
|
page: z.number().int().positive().default(1).describe("Page number, 1-based. Defaults to 1 (the first page)."),
|
|
@@ -7968,6 +8045,7 @@ var ALLOWED_UPSTREAM_PREFIXES = [
|
|
|
7968
8045
|
"/v1/protected/wallet/",
|
|
7969
8046
|
"/v1/protected/api-keys",
|
|
7970
8047
|
"/v1/protected/actionScript/",
|
|
8048
|
+
"/v1/protected/ios-pool/",
|
|
7971
8049
|
BUG_REPORTS_PATH,
|
|
7972
8050
|
// Only the caller's own membership read: the organization admin routes stay out of an agent's reach.
|
|
7973
8051
|
"/v1/protected/organizations/my-organizations"
|
|
@@ -7991,17 +8069,17 @@ var PromptServiceClient = class {
|
|
|
7991
8069
|
* @param path - Path to validate.
|
|
7992
8070
|
* @throws GatewayError if path is not allowed.
|
|
7993
8071
|
*/
|
|
7994
|
-
validatePath(
|
|
7995
|
-
const isAllowed = PUBLIC_UPSTREAM_PATHS.includes(
|
|
8072
|
+
validatePath(path29) {
|
|
8073
|
+
const isAllowed = PUBLIC_UPSTREAM_PATHS.includes(path29) || ALLOWED_UPSTREAM_PREFIXES.some((prefix) => path29.startsWith(prefix));
|
|
7996
8074
|
if (!isAllowed) {
|
|
7997
8075
|
const logger7 = getLogger();
|
|
7998
8076
|
logger7.error("Path not in allowlist", {
|
|
7999
|
-
path:
|
|
8077
|
+
path: path29,
|
|
8000
8078
|
allowedPrefixes: ALLOWED_UPSTREAM_PREFIXES
|
|
8001
8079
|
});
|
|
8002
8080
|
throw new GatewayError({
|
|
8003
8081
|
code: "FORBIDDEN" /* FORBIDDEN */,
|
|
8004
|
-
message: `Path '${
|
|
8082
|
+
message: `Path '${path29}' is not allowed`
|
|
8005
8083
|
});
|
|
8006
8084
|
}
|
|
8007
8085
|
}
|
|
@@ -8155,7 +8233,15 @@ var PromptServiceClient = class {
|
|
|
8155
8233
|
headers,
|
|
8156
8234
|
timeout
|
|
8157
8235
|
};
|
|
8158
|
-
if (call.
|
|
8236
|
+
if (call.fileBody) {
|
|
8237
|
+
requestConfig.data = fs4.createReadStream(call.fileBody.filePath);
|
|
8238
|
+
requestConfig.headers = {
|
|
8239
|
+
...headers,
|
|
8240
|
+
"Content-Type": call.fileBody.contentType,
|
|
8241
|
+
"Content-Length": String(call.fileBody.sizeBytes)
|
|
8242
|
+
};
|
|
8243
|
+
requestConfig.maxBodyLength = Infinity;
|
|
8244
|
+
} else if (call.multipartFormData) {
|
|
8159
8245
|
requestConfig.data = this.buildMultipartBody(call.multipartFormData);
|
|
8160
8246
|
} else if (call.body && ["POST", "PUT", "PATCH"].includes(call.method)) {
|
|
8161
8247
|
requestConfig.data = call.body;
|
|
@@ -8273,6 +8359,7 @@ var REPLAY_WORKFLOW_RUNTIME_ID_REFERENCE_FIELD = {
|
|
|
8273
8359
|
// packages/mcps/src/mcp/tools/e2e/upstream-route-constants.ts
|
|
8274
8360
|
var MUGGLE_TEST_PREFIX = "/v1/protected/muggle-test";
|
|
8275
8361
|
var TASTE_PROFILE_PATH = `${MUGGLE_TEST_PREFIX}/taste-profile`;
|
|
8362
|
+
var IOS_POOL_PREFIX = "/v1/protected/ios-pool";
|
|
8276
8363
|
|
|
8277
8364
|
// packages/mcps/src/mcp/tools/e2e/entity-reference-resolver.ts
|
|
8278
8365
|
async function resolveEntityReferencesAsync(params) {
|
|
@@ -8409,6 +8496,123 @@ function buildBugReportReplyCall(toolInput) {
|
|
|
8409
8496
|
}
|
|
8410
8497
|
};
|
|
8411
8498
|
}
|
|
8499
|
+
function rejectBuildArchive(appZipPath, reason) {
|
|
8500
|
+
throw new GatewayError({
|
|
8501
|
+
code: "INVALID_ARGUMENT" /* INVALID_ARGUMENT */,
|
|
8502
|
+
message: `Build archive ${appZipPath} ${reason}`
|
|
8503
|
+
});
|
|
8504
|
+
}
|
|
8505
|
+
function computeFileSha256Hex(filePath) {
|
|
8506
|
+
const hash = crypto.createHash("sha256");
|
|
8507
|
+
const readBuffer = Buffer.alloc(IOS_BUILD_DIGEST_READ_CHUNK_BYTES);
|
|
8508
|
+
const fileDescriptor = fs4.openSync(filePath, "r");
|
|
8509
|
+
try {
|
|
8510
|
+
let bytesRead = fs4.readSync(fileDescriptor, readBuffer, 0, readBuffer.length, null);
|
|
8511
|
+
while (bytesRead > 0) {
|
|
8512
|
+
hash.update(readBuffer.subarray(0, bytesRead));
|
|
8513
|
+
bytesRead = fs4.readSync(fileDescriptor, readBuffer, 0, readBuffer.length, null);
|
|
8514
|
+
}
|
|
8515
|
+
} finally {
|
|
8516
|
+
fs4.closeSync(fileDescriptor);
|
|
8517
|
+
}
|
|
8518
|
+
return hash.digest("hex");
|
|
8519
|
+
}
|
|
8520
|
+
function buildIosBuildUploadCall(toolInput) {
|
|
8521
|
+
const resolvedPath = path17.resolve(toolInput.appZipPath);
|
|
8522
|
+
if (path17.extname(resolvedPath).toLowerCase() !== IOS_BUILD_ARCHIVE_EXTENSION) {
|
|
8523
|
+
rejectBuildArchive(toolInput.appZipPath, `is not a ${IOS_BUILD_ARCHIVE_EXTENSION} file; zip the .app bundle first.`);
|
|
8524
|
+
}
|
|
8525
|
+
let archiveStats;
|
|
8526
|
+
try {
|
|
8527
|
+
archiveStats = fs4.statSync(resolvedPath);
|
|
8528
|
+
} catch {
|
|
8529
|
+
rejectBuildArchive(toolInput.appZipPath, "was not found.");
|
|
8530
|
+
}
|
|
8531
|
+
if (!archiveStats.isFile()) {
|
|
8532
|
+
rejectBuildArchive(toolInput.appZipPath, "is not a file.");
|
|
8533
|
+
}
|
|
8534
|
+
if (archiveStats.size === 0) {
|
|
8535
|
+
rejectBuildArchive(toolInput.appZipPath, "is empty.");
|
|
8536
|
+
}
|
|
8537
|
+
if (archiveStats.size > IOS_BUILD_ARCHIVE_MAX_BYTES) {
|
|
8538
|
+
rejectBuildArchive(toolInput.appZipPath, `is larger than ${IOS_BUILD_ARCHIVE_MAX_BYTES / (1024 * 1024)} MB.`);
|
|
8539
|
+
}
|
|
8540
|
+
return {
|
|
8541
|
+
method: "POST",
|
|
8542
|
+
path: `${IOS_POOL_PREFIX}/projects/${encodeURIComponent(toolInput.projectId)}/artifacts`,
|
|
8543
|
+
queryParams: {
|
|
8544
|
+
digest: computeFileSha256Hex(resolvedPath),
|
|
8545
|
+
bundleId: toolInput.bundleId,
|
|
8546
|
+
targetRuntime: toolInput.targetRuntime,
|
|
8547
|
+
branch: toolInput.branch,
|
|
8548
|
+
commit: toolInput.commit,
|
|
8549
|
+
sizeBytes: archiveStats.size,
|
|
8550
|
+
producer: toolInput.producer
|
|
8551
|
+
},
|
|
8552
|
+
fileBody: {
|
|
8553
|
+
filePath: resolvedPath,
|
|
8554
|
+
contentType: IOS_BUILD_ARCHIVE_CONTENT_TYPE,
|
|
8555
|
+
sizeBytes: archiveStats.size
|
|
8556
|
+
},
|
|
8557
|
+
timeoutMs: IOS_BUILD_UPLOAD_TIMEOUT_MS
|
|
8558
|
+
};
|
|
8559
|
+
}
|
|
8560
|
+
function buildIosRunCreateCall(toolInput) {
|
|
8561
|
+
return {
|
|
8562
|
+
method: "POST",
|
|
8563
|
+
path: `${IOS_POOL_PREFIX}/runs`,
|
|
8564
|
+
body: {
|
|
8565
|
+
projectId: toolInput.projectId,
|
|
8566
|
+
artifactDigest: toolInput.artifactDigest,
|
|
8567
|
+
task: toolInput.task,
|
|
8568
|
+
useCaseId: toolInput.useCaseId,
|
|
8569
|
+
testCaseId: toolInput.testCaseId,
|
|
8570
|
+
deviceType: toolInput.deviceType,
|
|
8571
|
+
secretRefs: toolInput.secretRefs,
|
|
8572
|
+
caps: {
|
|
8573
|
+
maxSteps: toolInput.maxSteps,
|
|
8574
|
+
stepTimeoutMs: toolInput.stepTimeoutMs,
|
|
8575
|
+
runTimeoutMs: toolInput.runTimeoutMs
|
|
8576
|
+
}
|
|
8577
|
+
}
|
|
8578
|
+
};
|
|
8579
|
+
}
|
|
8580
|
+
|
|
8581
|
+
// packages/mcps/src/mcp/tools/e2e/ios-run-transform.ts
|
|
8582
|
+
function mapIosRun(response) {
|
|
8583
|
+
const runView = response.data?.run;
|
|
8584
|
+
const runRequest = runView?.record?.request;
|
|
8585
|
+
const runStatus = runView?.state?.status;
|
|
8586
|
+
if (!runView?.record?.runId || !runRequest?.projectId || !runStatus) {
|
|
8587
|
+
throw new GatewayError({
|
|
8588
|
+
code: "UPSTREAM_ERROR" /* UPSTREAM_ERROR */,
|
|
8589
|
+
message: "iOS run response carried no run with an id, project and status.",
|
|
8590
|
+
statusCode: response.statusCode
|
|
8591
|
+
});
|
|
8592
|
+
}
|
|
8593
|
+
const runResult = runView.result ?? void 0;
|
|
8594
|
+
return {
|
|
8595
|
+
run: {
|
|
8596
|
+
runId: runView.record.runId,
|
|
8597
|
+
projectId: runRequest.projectId,
|
|
8598
|
+
artifactDigest: runRequest.artifactDigest ?? "",
|
|
8599
|
+
deviceType: runRequest.deviceType ?? "",
|
|
8600
|
+
...runRequest.task && { task: runRequest.task },
|
|
8601
|
+
...runRequest.useCaseId && { useCaseId: runRequest.useCaseId },
|
|
8602
|
+
...runRequest.testCaseId && { testCaseId: runRequest.testCaseId },
|
|
8603
|
+
status: runStatus,
|
|
8604
|
+
isFinished: FINISHED_IOS_RUN_STATUSES.includes(runStatus),
|
|
8605
|
+
verdict: runResult?.verdict ?? null,
|
|
8606
|
+
...runResult?.summary && { summary: runResult.summary },
|
|
8607
|
+
...runResult?.evidence && { evidence: runResult.evidence },
|
|
8608
|
+
...runResult?.stepCount !== void 0 && { stepCount: runResult.stepCount },
|
|
8609
|
+
attemptCount: runView.state?.attemptCount,
|
|
8610
|
+
maxAttempts: runView.state?.maxAttempts,
|
|
8611
|
+
createdAtMs: runView.record.createdAtMs,
|
|
8612
|
+
statusUpdatedAtMs: runView.state?.statusUpdatedAtMs
|
|
8613
|
+
}
|
|
8614
|
+
};
|
|
8615
|
+
}
|
|
8412
8616
|
|
|
8413
8617
|
// packages/mcps/src/mcp/tools/e2e/dashboard-link-targets.ts
|
|
8414
8618
|
function readStringField(source, key) {
|
|
@@ -11207,6 +11411,58 @@ var authTools = [
|
|
|
11207
11411
|
}
|
|
11208
11412
|
}
|
|
11209
11413
|
];
|
|
11414
|
+
var iosPoolTools = [
|
|
11415
|
+
{
|
|
11416
|
+
name: "muggle-remote-ios-build-upload",
|
|
11417
|
+
description: "Upload a zipped .app iOS simulator build to a project from a path on this machine. The archive is hashed and streamed from disk; returns the stored artifact, whose digest muggle-remote-ios-run-create takes.",
|
|
11418
|
+
inputSchema: IosBuildUploadInputSchema,
|
|
11419
|
+
mapToUpstream: (input) => buildIosBuildUploadCall(input)
|
|
11420
|
+
},
|
|
11421
|
+
{
|
|
11422
|
+
name: "muggle-remote-ios-build-list",
|
|
11423
|
+
description: "List the iOS simulator builds stored for a project, newest first, with digest, bundle id, branch and commit.",
|
|
11424
|
+
inputSchema: IosBuildListInputSchema,
|
|
11425
|
+
mapToUpstream: (input) => {
|
|
11426
|
+
const toolInput = input;
|
|
11427
|
+
return {
|
|
11428
|
+
method: "GET",
|
|
11429
|
+
path: `${IOS_POOL_PREFIX}/projects/${encodeURIComponent(toolInput.projectId)}/artifacts`
|
|
11430
|
+
};
|
|
11431
|
+
}
|
|
11432
|
+
},
|
|
11433
|
+
{
|
|
11434
|
+
name: "muggle-remote-ios-run-create",
|
|
11435
|
+
description: "Queue an iOS acceptance run of an uploaded build on a simulator: a plain-language task, or an existing use case or test case. Returns the queued run; poll muggle-remote-ios-run-get until isFinished.",
|
|
11436
|
+
inputSchema: IosRunCreateInputSchema,
|
|
11437
|
+
mapToUpstream: (input) => buildIosRunCreateCall(input),
|
|
11438
|
+
mapFromUpstream: mapIosRun
|
|
11439
|
+
},
|
|
11440
|
+
{
|
|
11441
|
+
name: "muggle-remote-ios-run-get",
|
|
11442
|
+
description: "Read an iOS run: its machinery status (queued, running, completed, infra_error, timed_out, cancelled) and, separately, its test verdict (passed, failed, goal_unachievable; null until published).",
|
|
11443
|
+
inputSchema: IosRunReadInputSchema,
|
|
11444
|
+
mapToUpstream: (input) => {
|
|
11445
|
+
const toolInput = input;
|
|
11446
|
+
return {
|
|
11447
|
+
method: "GET",
|
|
11448
|
+
path: `${IOS_POOL_PREFIX}/runs/${encodeURIComponent(toolInput.runId)}`
|
|
11449
|
+
};
|
|
11450
|
+
},
|
|
11451
|
+
mapFromUpstream: mapIosRun
|
|
11452
|
+
},
|
|
11453
|
+
{
|
|
11454
|
+
name: "muggle-remote-ios-run-steps-get",
|
|
11455
|
+
description: "Read an iOS run's step events in order: what the agent did at each step, its outcome, and a screenshot URL when one was taken.",
|
|
11456
|
+
inputSchema: IosRunReadInputSchema,
|
|
11457
|
+
mapToUpstream: (input) => {
|
|
11458
|
+
const toolInput = input;
|
|
11459
|
+
return {
|
|
11460
|
+
method: "GET",
|
|
11461
|
+
path: `${IOS_POOL_PREFIX}/runs/${encodeURIComponent(toolInput.runId)}/steps`
|
|
11462
|
+
};
|
|
11463
|
+
}
|
|
11464
|
+
}
|
|
11465
|
+
];
|
|
11210
11466
|
var allQaToolDefinitions = [
|
|
11211
11467
|
...projectTools,
|
|
11212
11468
|
...useCaseTools,
|
|
@@ -11226,6 +11482,7 @@ var allQaToolDefinitions = [
|
|
|
11226
11482
|
...userFeedbackTools,
|
|
11227
11483
|
...bugReportTools,
|
|
11228
11484
|
...tasteProfileTools,
|
|
11485
|
+
...iosPoolTools,
|
|
11229
11486
|
...authTools
|
|
11230
11487
|
];
|
|
11231
11488
|
function getQaToolByName(name) {
|
|
@@ -12649,6 +12906,13 @@ __export(e2e_exports2, {
|
|
|
12649
12906
|
FanOutPlanInputSchema: () => FanOutPlanInputSchema,
|
|
12650
12907
|
GatewayError: () => GatewayError,
|
|
12651
12908
|
IdSchema: () => IdSchema,
|
|
12909
|
+
IosArtifactProducerEnum: () => IosArtifactProducerEnum,
|
|
12910
|
+
IosBuildListInputSchema: () => IosBuildListInputSchema,
|
|
12911
|
+
IosBuildUploadInputSchema: () => IosBuildUploadInputSchema,
|
|
12912
|
+
IosRunCreateInputSchema: () => IosRunCreateInputSchema,
|
|
12913
|
+
IosRunReadInputSchema: () => IosRunReadInputSchema,
|
|
12914
|
+
IosRunStatusEnum: () => IosRunStatusEnum,
|
|
12915
|
+
IosRunVerdictEnum: () => IosRunVerdictEnum,
|
|
12652
12916
|
LocalExecutionContextInputSchema: () => LocalExecutionContextInputSchema,
|
|
12653
12917
|
LocalRunUploadInputSchema: () => LocalRunUploadInputSchema,
|
|
12654
12918
|
McpErrorCode: () => McpErrorCode,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __export, getLogger, TelemetryEnvironment, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, initTelemetry, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, buildLlmSourcePlan, describeLlmSourceStatus, resolveLlmSourceStatus, e2e_exports, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, buildElectronAppChecksumsUrl, OnboardingBlanketChoice, PreferenceKey, LlmSource, applyLlmSourceSelection, describeStackMismatch, local_exports, ELECTRON_APP_CHECKSUMS_ASSET_NAME, getDataDir, isTelemetryEnabled, isInitialized, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, WatchQosSignal, WatchQosDetector, AgentHost, getInstallId } from './chunk-
|
|
1
|
+
import { __export, getLogger, TelemetryEnvironment, getConfig, createChildLogger, buildElectronAppReleaseAssetUrl, getActiveRuntimeTarget, getAuthService, hasApiKey, getElectronAppVersion, getElectronAppDir, getPlatformKey, reconcileProjectPreferences, getDataDir2, PREFERENCES_FILE_NAME, isFirstRun, writePreferences, DEFAULT_PREFERENCES, isElectronAppInstalled, getElectronAppChecksums, getChecksumForPlatform, getElectronAppSignedFromVersion, getReleaseSignerIdentityUri, verifyFileChecksum, resolveElectronAppExecutablePath, calculateFileChecksum, Surface, ServiceName, track, EventName, getQaTools, getLocalQaTools, performLogout, assertDeviceCodeClientProvisioned, performLogin, getActiveElectronAppReleaseStream, buildToolInputJsonSchema, toolRequiresAuth, getCallerCredentials, parseElectronAppDirName, getElectronAppReleaseTagPrefix, hasShownDisclosure, markDisclosureShown, initTelemetry, getBundledElectronAppVersion, getElectronAppVersionSource, getCredentialsFilePath, ElectronAppReleaseStream, __require, getDisclosureCopy, buildOnboardingPlan, applyOnboardingAnswers, needsOnboarding, buildLlmSourcePlan, describeLlmSourceStatus, resolveLlmSourceStatus, e2e_exports, readRunView, RunViewError, renderRunViewText, writeRunViewHtml, openBrowserUrl, evaluateCheckoutFreshness, runGitCommand, BLOCKING_FRESHNESS_VERDICTS, claimServiceStack, BUSY_EXIT_CODE, checkServiceStack, releaseServiceStack, readServiceStackStatus, resolvePreferences, buildElectronAppChecksumsUrl, OnboardingBlanketChoice, PreferenceKey, LlmSource, applyLlmSourceSelection, describeStackMismatch, local_exports, ELECTRON_APP_CHECKSUMS_ASSET_NAME, getDataDir, isTelemetryEnabled, isInitialized, DEFAULT_LOCAL_LLM_BASE_URL, isValidLocalBaseUrl, WatchQosSignal, WatchQosDetector, AgentHost, getInstallId } from './chunk-KVOQUMGB.js';
|
|
2
2
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
3
3
|
import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
@@ -1375,7 +1375,7 @@ async function resolveGsScreenshotUrls(report, opts) {
|
|
|
1375
1375
|
if (gsUrls.length === 0) {
|
|
1376
1376
|
return report;
|
|
1377
1377
|
}
|
|
1378
|
-
const mcps = await import('./src-
|
|
1378
|
+
const mcps = await import('./src-TO2HGAQY.js');
|
|
1379
1379
|
const credentials = await mcps.getCallerCredentialsAsync();
|
|
1380
1380
|
if (!credentials.bearerToken && !credentials.apiKey) {
|
|
1381
1381
|
stderrWrite(
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-
|
|
2
|
-
export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-
|
|
1
|
+
export { src_exports as commands, createUnifiedMcpServer, server_exports as server } from './chunk-QB4WZI2I.js';
|
|
2
|
+
export { createChildLogger, e2e_exports as e2e, getConfig, getLocalQaTools, getLogger, getQaTools, local_exports as localQa, mcp_exports as mcp, e2e_exports as qa, src_exports as shared } from './chunk-KVOQUMGB.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
4
|
-
"version": "5.39.0-staging.
|
|
4
|
+
"version": "5.39.0-staging.367",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
5
|
-
"version": "5.39.0-staging.
|
|
5
|
+
"version": "5.39.0-staging.367",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/dist/plugin/.mcp.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: acceptance-tester
|
|
3
|
-
description: "
|
|
3
|
+
description: "Picky, Muggle AI's acceptance test agent — runs real-browser tests against web apps and simulator tests against iOS app builds, and reports structured results with blocking issues and suggested fixes. Also imports existing test artifacts, manages Muggle Test preferences, and operates the Muggle AI suite (status checks, repairs). Dispatch this agent when the team needs acceptance test feedback, test coverage for a feature, or Muggle Test suite operations."
|
|
4
4
|
model: sonnet
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Picky
|
|
8
8
|
|
|
9
|
-
You are
|
|
9
|
+
You are Picky, Muggle AI's acceptance test agent. You run end-to-end tests using Muggle AI — real-browser tests against web apps, simulator tests against iOS app builds — and report structured results that coding agents can act on. You also manage test artifacts, user preferences, and the Muggle Test installation itself.
|
|
10
10
|
|
|
11
11
|
You operate through skills — never call raw MCP tools directly.
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ You operate through skills — never call raw MCP tools directly.
|
|
|
14
14
|
|
|
15
15
|
| Skill | When to use |
|
|
16
16
|
|-------|-------------|
|
|
17
|
-
| `muggle-test` | Run acceptance tests. Auto-routes between local (Electron browser on localhost)
|
|
17
|
+
| `muggle-test` | Run acceptance tests. Auto-routes between local (Electron browser on localhost), remote (cloud execution on preview/staging URL), and iOS (a zipped `.app` simulator build run on the cloud iOS pool, per [`muggle-test/ios.md`](../skills/muggle-test/ios.md), each run's verdict reported apart from its machinery status). Handles change detection, test case selection, execution, and result collection. |
|
|
18
18
|
| `muggle-test-import` | Import existing test artifacts into Muggle Test — Playwright specs, Cypress tests, PRDs, Gherkin feature files, test plan documents. |
|
|
19
19
|
| `muggle-preferences` | View, set, or reset the 12 preference knobs that control Muggle Test behavior. |
|
|
20
20
|
| `muggle-repair` | Diagnose and fix broken Muggle Test installation components. |
|
|
@@ -45,6 +45,7 @@ If the user intent clearly matches one command, route directly — no menu neede
|
|
|
45
45
|
- create an account/register/sign up for muggle → `muggle-register`
|
|
46
46
|
- test my changes/acceptance test my work/test before push/post E2E acceptance results to PR/test on staging/test on preview → `muggle-test`
|
|
47
47
|
- test localhost/validate single feature/test a feature → `muggle-test-feature-local`
|
|
48
|
+
- test my iOS app/iPhone app/simulator build/upload an iOS build → `muggle-test` (Mode C)
|
|
48
49
|
- build/implement from request/end-to-end → `muggle-do`
|
|
49
50
|
- post results to PR/attach walkthrough/visual evidence on PR → `muggle-pr-visual-walkthrough`
|
|
50
51
|
- watch my PR for reviews/follow up on PR reviews/babysit PR review thread → `muggle-pr-followup`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test
|
|
3
|
-
description: "Change-driven E2E acceptance testing: detects the user's recent changes
|
|
3
|
+
description: "Change-driven E2E acceptance testing: detects the user's recent changes, maps them to the user flows they affect, and runs real-browser tests on localhost, a preview/staging URL, or an iOS simulator build. Use whenever the user wants their own work validated before it ships — \"make sure I didn't break anything\", \"did my recent commits break any user flows?\", \"test before I push\" — the pre-merge acceptance gate. The signal is validation tied to a commit, push, PR, merge, or release; it holds even when the request never says E2E or browser. Invoke it first, before reading the diff or running anything: finding what changed and what it affects is this skill's own first step, and unit tests, a build, or eyeballing the diff do not substitute for the acceptance run the user asked for. Unstated scope (a chunk of work, a refactor, a sprint, a deploy preview) is its input, not a reason to investigate first. One named flow: muggle-test-feature-local; importing spec files: muggle-test-import."
|
|
4
4
|
mandatoryStages:
|
|
5
5
|
- ../_shared/failure-mode-handling.md
|
|
6
6
|
- ../_shared/debug-failed-run.md
|
|
@@ -65,7 +65,7 @@ Gates run per `preference-gates/README.md`.
|
|
|
65
65
|
|
|
66
66
|
## Step 1: Confirm Scope of Work (Always First)
|
|
67
67
|
|
|
68
|
-
Parse the user's query and explicitly confirm their expectation. There are
|
|
68
|
+
Parse the user's query and explicitly confirm their expectation. There are two web modes, plus Mode C for an iOS build:
|
|
69
69
|
|
|
70
70
|
### Mode A: Local Test Generation (default for PRs)
|
|
71
71
|
> Test impacted use cases/test cases against **localhost** using the Electron browser.
|
|
@@ -81,6 +81,13 @@ Signs the user wants this: mentions "localhost", "local", "my machine", "dev ser
|
|
|
81
81
|
|
|
82
82
|
Signs the user wants this: mentions "preview", "staging", "deployed", "preview URL", "test on preview", "test the deployment", or provides an actual **deployed** preview/staging URL (e.g. `*.vercel.app`, `staging.foo.com`, custom preview domains). GitHub PR URLs do **not** count — see Mode A.
|
|
83
83
|
|
|
84
|
+
### Mode C: iOS Build
|
|
85
|
+
> Upload a zipped `.app` simulator build and run it on the Muggle iOS pool.
|
|
86
|
+
>
|
|
87
|
+
> Procedure: [`ios.md`](ios.md)
|
|
88
|
+
|
|
89
|
+
Signs the user wants this: mentions an iOS app, iPhone app, Xcode, a simulator build, or a `.app` bundle or its zip, or the repo is an Xcode project with no web front end. Mode C is never the default and skips the picker below.
|
|
90
|
+
|
|
84
91
|
### Confirming (gated by `defaultExecutionMode`)
|
|
85
92
|
|
|
86
93
|
Gate `defaultExecutionMode` (per `preference-gates/README.md`). Uses `local`/`remote`/`ask`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Mode C: iOS Build
|
|
2
|
+
|
|
3
|
+
Tests an iOS simulator build on the Muggle iOS pool: Mac hosts that install the build on a simulator and drive it with an agent toward a plain-language goal. Every call goes through the `muggle-remote-ios-*` tools; Steps 2 and 5–10 of [`SKILL.md`](SKILL.md) do not apply.
|
|
4
|
+
|
|
5
|
+
## Status and verdict
|
|
6
|
+
|
|
7
|
+
A run carries two separate fields; never merge them.
|
|
8
|
+
|
|
9
|
+
| Field | Values | Says |
|
|
10
|
+
| :---- | :----- | :--- |
|
|
11
|
+
| `status` | `queued`, `claimed`, `running`, `completed`, `infra_error`, `timed_out`, `cancelled` | Whether the pool finished running it |
|
|
12
|
+
| `verdict` | `passed`, `failed`, `goal_unachievable`, or `null` | Whether the app did what the task asked; set only on a `completed` run |
|
|
13
|
+
|
|
14
|
+
A run that ends `infra_error`, `timed_out` or `cancelled` is a machinery failure: report it as **inconclusive**, never as a failed test.
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
1. **Authenticate and pick the project** per Steps 3 and 4 of [`SKILL.md`](SKILL.md).
|
|
19
|
+
2. **Build.** Reuse a stored build when `muggle-remote-ios-build-list` has one for the current commit. Otherwise build for the simulator and zip the bundle:
|
|
20
|
+
```bash
|
|
21
|
+
xcodebuild -scheme <Scheme> -sdk iphonesimulator -configuration Debug -derivedDataPath build
|
|
22
|
+
ditto -c -k --keepParent build/Build/Products/Debug-iphonesimulator/<App>.app <App>.app.zip
|
|
23
|
+
```
|
|
24
|
+
Read the bundle id with `/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' <App>.app/Info.plist`. Building needs macOS with Xcode; on any other machine, ask the user for the zip's path.
|
|
25
|
+
3. **Upload.** `muggle-remote-ios-build-upload` with the zip's absolute path, bundle id, target runtime, `git rev-parse --abbrev-ref HEAD` and `git rev-parse HEAD`. Pass the path only; the tool hashes and streams the file itself. Keep the returned `artifact.digest`.
|
|
26
|
+
4. **Queue.** One `muggle-remote-ios-run-create` per behavior to verify, each `task` naming one atomic, observable goal ("Add a note titled Groceries and see it in the list"). Map the change summary to those behaviors the way Step 2 of [`SKILL.md`](SKILL.md) maps a diff to flows. Pass login credentials as `secretRefs` naming project secrets (create them with `muggle-remote-secret-create`), never as values in the task. Queue several runs in one message; the pool runs them in parallel.
|
|
27
|
+
5. **Wait.** Poll `muggle-remote-ios-run-get` about every 15 seconds until `isFinished`. If a run is still `queued` after 10 minutes, no simulator host is free: stop polling, report it as inconclusive with its `runId`, and tell the user they can check it later with `muggle-remote-ios-run-get`.
|
|
28
|
+
6. **Evidence.** For every finished run, read `muggle-remote-ios-run-steps-get` and keep each step's description, outcome and `screenshotUrl`.
|
|
29
|
+
7. **Report.** `passed` counts as passed; `failed` and `goal_unachievable` count as failed, each with the step where it went wrong and that step's screenshot; machinery failures count as inconclusive. The PR walkthrough renders web runs only, so report iOS results in the conversation, or in the acceptance-tester's Test Summary when dispatched by it.
|
|
30
|
+
|
|
31
|
+
## Guardrails
|
|
32
|
+
|
|
33
|
+
- Never read, base64 or paste the build archive; the upload tool streams it from disk.
|
|
34
|
+
- Never put a secret value in a task or a tool argument; reference it by name in `secretRefs`.
|
|
35
|
+
- Never report a machinery status as a test failure, or a missing verdict as a pass.
|
|
36
|
+
- Never retry a run that ended `failed` as if it were flaky; a failed verdict is the app's result.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release": "5.39.0-staging.
|
|
3
|
-
"buildId": "run-
|
|
4
|
-
"commitSha": "
|
|
2
|
+
"release": "5.39.0-staging.367",
|
|
3
|
+
"buildId": "run-367-1",
|
|
4
|
+
"commitSha": "d58d735d7723b911d10777aac8e60ac9372602e8",
|
|
5
5
|
"buildTime": "2026-11-12T07:45:22Z",
|
|
6
6
|
"serviceName": "muggle-ai-works-mcp"
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CLAUDE_CODE_AUTH_STATUS_ARGS, CLAUDE_CODE_CHECK_TIMEOUT_MS, CLAUDE_CODE_EXECUTABLE, CLAUDE_CODE_EXECUTABLE_NOT_FOUND_CODE, CLAUDE_CODE_SESSION_LINK_ENV_VARS, CLAUDE_CODE_VERSION_ARGS, CheckoutFreshnessVerdict, ClaudeCodeReadiness, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_CHECKSUMS_ASSET_NAME, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ELECTRON_APP_RESOURCES_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, StackCheckVerdict, StackClaimVerdict, StackLeaseEndReason, StackMismatchKind, StackPortAction, StudioJobPriorityEnum, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, compareQueuePlaces, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackReap, decideStackRelease, decideStackRunEnd, decideStackRunStart, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, describeStackMismatch, e2e_exports as e2e, evaluateCheckoutFreshness, findVacatedNeeds, finishStackRun, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, lookUpCheckoutPullRequest, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reapServiceStack, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveElectronAppResourcesDir, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, startStackRun, stopVacatedServices, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-
|
|
1
|
+
export { ACTION_SCRIPT_FILE_NAME, BASE_REMOTE_NAME, BLOCKING_FRESHNESS_VERDICTS, BRANCH_CREATION_REFLOG_PREFIX, BUSY_EXIT_CODE, CLAUDE_CODE_AUTH_STATUS_ARGS, CLAUDE_CODE_CHECK_TIMEOUT_MS, CLAUDE_CODE_EXECUTABLE, CLAUDE_CODE_EXECUTABLE_NOT_FOUND_CODE, CLAUDE_CODE_SESSION_LINK_ENV_VARS, CLAUDE_CODE_VERSION_ARGS, CheckoutFreshnessVerdict, ClaudeCodeReadiness, DEFAULT_LOCAL_LLM_BASE_URL, DEFAULT_PREFERENCES, ELECTRON_APP_CHECKSUMS_ASSET_NAME, ELECTRON_APP_EXECUTABLE_PATH_SEGMENTS, ELECTRON_APP_RESOURCES_PATH_SEGMENTS, ElectronAppPlatform, ElectronAppReleaseStream, HTML_VIEW_OFFER_LINE, LLM_CREDENTIALS_FILE_MODE, LLM_CREDENTIALS_FILE_NAME, LLM_SOURCE_HEADER, LLM_SOURCE_OPTIONS, LLM_SOURCE_OWNED_ENV_NAMES, LLM_SOURCE_PROMPT, LLM_SOURCE_SCOPE_NOTE, LlmSource, MASKED_API_KEY_PREFIX, MASKED_API_KEY_VISIBLE_CHARS, MAX_LISTED_INHERITED_COMMITS, ONBOARDING_BLANKET_OPTIONS, ONBOARDING_CHOICE_GROUPS, ONBOARDING_MAX_OFFERS, ONBOARDING_PRIMER_BULLETS, ONBOARDING_PRIMER_HEADLINE, ONBOARDING_TOGGLE_GROUPS, ONBOARDING_TOGGLE_PROMPT, ONBOARDING_UNSELECTED_TOGGLE_VALUE, OnboardingBlanketChoice, OnboardingGroupKind, PREFERENCES_FILE_NAME, PREFERENCES_PROJECT_DIR_NAME, PREFERENCES_SCHEMA, PREFERENCES_VERSION, PREFERENCE_ALLOWED_VALUES, PreferenceKey, PreferenceValue, ProjectPreferencesReconcileOutcome, RUN_SESSIONS_DIR_NAME, RUN_VIEW_DASHBOARD_LINK_LABEL, RunViewError, RuntimeTarget, SCREENSHOT_DIR_RELATIVE_PATH, SCREENSHOT_FILE_EXTENSION, StackCheckVerdict, StackClaimVerdict, StackLeaseEndReason, StackMismatchKind, StackPortAction, StudioJobPriorityEnum, WATCHER_LIFETIME_SECONDS, WATCHER_LIFETIME_UNBOUNDED_SECONDS, applyLlmSourceSelection, applyOnboardingAnswers, assertDeviceCodeClientProvisioned, buildElectronAppChecksumsUrl, buildElectronAppDirName, buildElectronAppReleaseAssetUrl, buildElectronAppReleaseTag, buildLlmSourcePlan, buildOnboardingPlan, buildToolInputJsonSchema, calculateFileChecksum, checkServiceStack, claimServiceStack, compareQueuePlaces, completeOnboarding, createApiKeyWithToken, createChildLogger, decideStackClaim, decideStackReap, decideStackRelease, decideStackRunEnd, decideStackRunStart, deleteApiKeyData, deleteCredentials, describeLlmSourceStatus, describeStackMismatch, e2e_exports as e2e, evaluateCheckoutFreshness, findVacatedNeeds, finishStackRun, formatPreferencesOneLiner, getActiveElectronAppReleaseStream, getActiveRuntimeTarget, getApiKey, getApiKeyFilePath, getAuthService, getBundledElectronAppVersion, getCallerCredentials, getCallerCredentialsAsync, getChecksumForPlatform, getConfig, getCredentialsFilePath, getDashboardBaseUrl, getDataDir2 as getDataDir, getDownloadBaseUrl, getElectronAppChecksums, getElectronAppDir, getElectronAppReleaseTagPrefix, getElectronAppSignedFromVersion, getElectronAppVersion, getElectronAppVersionSource, getLlmSourceOption, getLocalQaTools, getLogger, getOnboardingToggleKeys, getPlatformKey, getQaTools, getReleaseSignerIdentityUri, getRunSessionsDir, getValidApiKeyData, getValidCredentials, hasApiKey, isElectronAppInstalled, isElectronAppPlatform, isFirstRun, isValidLocalBaseUrl, loadApiKeyData, loadCredentials, local_exports as localQa, lookUpCheckoutPullRequest, markOnboardingCompleted, maskLlmApiKey, mcp_exports as mcp, needsConflict, needsOnboarding, openBrowserUrl, parseElectronAppDirName, performLogin, performLogout, pollDeviceCode, portOfUrl, e2e_exports as qa, readPreferencesMetadata, readRunView, readServiceStackStatus, reapServiceStack, reconcileProjectPreferences, recordOnboardingSkip, releaseServiceStack, renderRunViewHtml, renderRunViewText, resetConfig, resetLogger, resetPreference, resolveActiveProfile, resolveActiveReleaseStream, resolveActiveReleaseTagPrefix, resolveBlanketPreferences, resolveElectronAppExecutablePath, resolveElectronAppPathOrNull, resolveElectronAppResourcesDir, resolveLlmSourceStatus, resolveOnboardingAnswers, resolvePreferences, resolveRunSessionPath, resolveRuntimeTarget, resolveTogglePreferences, runGitCommand, saveApiKey, saveApiKeyData, saveCredentials, startDeviceCodeFlow, startStackRun, stopVacatedServices, toDisplayRef, toolRequiresAuth, validatePreference, verifyFileChecksum, writeLlmEnvBlock, writePreferences, writePreferencesWithMetadata, writeRunViewHtml } from './chunk-KVOQUMGB.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muggleai/works",
|
|
3
3
|
"mcpName": "io.github.multiplex-ai/muggleai",
|
|
4
|
-
"version": "5.39.0-staging.
|
|
4
|
+
"version": "5.39.0-staging.367",
|
|
5
5
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
4
|
-
"version": "5.39.0-staging.
|
|
4
|
+
"version": "5.39.0-staging.367",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Muggle AI",
|
|
7
7
|
"email": "support@muggle-ai.com"
|
package/plugin/.codex-mcp.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "muggle",
|
|
3
3
|
"displayName": "Muggle AI",
|
|
4
4
|
"description": "Acceptance test agent for coding agents: real-browser tests, with screenshots on the PR.",
|
|
5
|
-
"version": "5.39.0-staging.
|
|
5
|
+
"version": "5.39.0-staging.367",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Muggle AI",
|
|
8
8
|
"email": "support@muggle-ai.com"
|
package/plugin/.mcp.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: acceptance-tester
|
|
3
|
-
description: "
|
|
3
|
+
description: "Picky, Muggle AI's acceptance test agent — runs real-browser tests against web apps and simulator tests against iOS app builds, and reports structured results with blocking issues and suggested fixes. Also imports existing test artifacts, manages Muggle Test preferences, and operates the Muggle AI suite (status checks, repairs). Dispatch this agent when the team needs acceptance test feedback, test coverage for a feature, or Muggle Test suite operations."
|
|
4
4
|
model: sonnet
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Picky
|
|
8
8
|
|
|
9
|
-
You are
|
|
9
|
+
You are Picky, Muggle AI's acceptance test agent. You run end-to-end tests using Muggle AI — real-browser tests against web apps, simulator tests against iOS app builds — and report structured results that coding agents can act on. You also manage test artifacts, user preferences, and the Muggle Test installation itself.
|
|
10
10
|
|
|
11
11
|
You operate through skills — never call raw MCP tools directly.
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ You operate through skills — never call raw MCP tools directly.
|
|
|
14
14
|
|
|
15
15
|
| Skill | When to use |
|
|
16
16
|
|-------|-------------|
|
|
17
|
-
| `muggle-test` | Run acceptance tests. Auto-routes between local (Electron browser on localhost)
|
|
17
|
+
| `muggle-test` | Run acceptance tests. Auto-routes between local (Electron browser on localhost), remote (cloud execution on preview/staging URL), and iOS (a zipped `.app` simulator build run on the cloud iOS pool, per [`muggle-test/ios.md`](../skills/muggle-test/ios.md), each run's verdict reported apart from its machinery status). Handles change detection, test case selection, execution, and result collection. |
|
|
18
18
|
| `muggle-test-import` | Import existing test artifacts into Muggle Test — Playwright specs, Cypress tests, PRDs, Gherkin feature files, test plan documents. |
|
|
19
19
|
| `muggle-preferences` | View, set, or reset the 12 preference knobs that control Muggle Test behavior. |
|
|
20
20
|
| `muggle-repair` | Diagnose and fix broken Muggle Test installation components. |
|
|
@@ -45,6 +45,7 @@ If the user intent clearly matches one command, route directly — no menu neede
|
|
|
45
45
|
- create an account/register/sign up for muggle → `muggle-register`
|
|
46
46
|
- test my changes/acceptance test my work/test before push/post E2E acceptance results to PR/test on staging/test on preview → `muggle-test`
|
|
47
47
|
- test localhost/validate single feature/test a feature → `muggle-test-feature-local`
|
|
48
|
+
- test my iOS app/iPhone app/simulator build/upload an iOS build → `muggle-test` (Mode C)
|
|
48
49
|
- build/implement from request/end-to-end → `muggle-do`
|
|
49
50
|
- post results to PR/attach walkthrough/visual evidence on PR → `muggle-pr-visual-walkthrough`
|
|
50
51
|
- watch my PR for reviews/follow up on PR reviews/babysit PR review thread → `muggle-pr-followup`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: muggle-test
|
|
3
|
-
description: "Change-driven E2E acceptance testing: detects the user's recent changes
|
|
3
|
+
description: "Change-driven E2E acceptance testing: detects the user's recent changes, maps them to the user flows they affect, and runs real-browser tests on localhost, a preview/staging URL, or an iOS simulator build. Use whenever the user wants their own work validated before it ships — \"make sure I didn't break anything\", \"did my recent commits break any user flows?\", \"test before I push\" — the pre-merge acceptance gate. The signal is validation tied to a commit, push, PR, merge, or release; it holds even when the request never says E2E or browser. Invoke it first, before reading the diff or running anything: finding what changed and what it affects is this skill's own first step, and unit tests, a build, or eyeballing the diff do not substitute for the acceptance run the user asked for. Unstated scope (a chunk of work, a refactor, a sprint, a deploy preview) is its input, not a reason to investigate first. One named flow: muggle-test-feature-local; importing spec files: muggle-test-import."
|
|
4
4
|
mandatoryStages:
|
|
5
5
|
- ../_shared/failure-mode-handling.md
|
|
6
6
|
- ../_shared/debug-failed-run.md
|
|
@@ -65,7 +65,7 @@ Gates run per `preference-gates/README.md`.
|
|
|
65
65
|
|
|
66
66
|
## Step 1: Confirm Scope of Work (Always First)
|
|
67
67
|
|
|
68
|
-
Parse the user's query and explicitly confirm their expectation. There are
|
|
68
|
+
Parse the user's query and explicitly confirm their expectation. There are two web modes, plus Mode C for an iOS build:
|
|
69
69
|
|
|
70
70
|
### Mode A: Local Test Generation (default for PRs)
|
|
71
71
|
> Test impacted use cases/test cases against **localhost** using the Electron browser.
|
|
@@ -81,6 +81,13 @@ Signs the user wants this: mentions "localhost", "local", "my machine", "dev ser
|
|
|
81
81
|
|
|
82
82
|
Signs the user wants this: mentions "preview", "staging", "deployed", "preview URL", "test on preview", "test the deployment", or provides an actual **deployed** preview/staging URL (e.g. `*.vercel.app`, `staging.foo.com`, custom preview domains). GitHub PR URLs do **not** count — see Mode A.
|
|
83
83
|
|
|
84
|
+
### Mode C: iOS Build
|
|
85
|
+
> Upload a zipped `.app` simulator build and run it on the Muggle iOS pool.
|
|
86
|
+
>
|
|
87
|
+
> Procedure: [`ios.md`](ios.md)
|
|
88
|
+
|
|
89
|
+
Signs the user wants this: mentions an iOS app, iPhone app, Xcode, a simulator build, or a `.app` bundle or its zip, or the repo is an Xcode project with no web front end. Mode C is never the default and skips the picker below.
|
|
90
|
+
|
|
84
91
|
### Confirming (gated by `defaultExecutionMode`)
|
|
85
92
|
|
|
86
93
|
Gate `defaultExecutionMode` (per `preference-gates/README.md`). Uses `local`/`remote`/`ask`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Mode C: iOS Build
|
|
2
|
+
|
|
3
|
+
Tests an iOS simulator build on the Muggle iOS pool: Mac hosts that install the build on a simulator and drive it with an agent toward a plain-language goal. Every call goes through the `muggle-remote-ios-*` tools; Steps 2 and 5–10 of [`SKILL.md`](SKILL.md) do not apply.
|
|
4
|
+
|
|
5
|
+
## Status and verdict
|
|
6
|
+
|
|
7
|
+
A run carries two separate fields; never merge them.
|
|
8
|
+
|
|
9
|
+
| Field | Values | Says |
|
|
10
|
+
| :---- | :----- | :--- |
|
|
11
|
+
| `status` | `queued`, `claimed`, `running`, `completed`, `infra_error`, `timed_out`, `cancelled` | Whether the pool finished running it |
|
|
12
|
+
| `verdict` | `passed`, `failed`, `goal_unachievable`, or `null` | Whether the app did what the task asked; set only on a `completed` run |
|
|
13
|
+
|
|
14
|
+
A run that ends `infra_error`, `timed_out` or `cancelled` is a machinery failure: report it as **inconclusive**, never as a failed test.
|
|
15
|
+
|
|
16
|
+
## Steps
|
|
17
|
+
|
|
18
|
+
1. **Authenticate and pick the project** per Steps 3 and 4 of [`SKILL.md`](SKILL.md).
|
|
19
|
+
2. **Build.** Reuse a stored build when `muggle-remote-ios-build-list` has one for the current commit. Otherwise build for the simulator and zip the bundle:
|
|
20
|
+
```bash
|
|
21
|
+
xcodebuild -scheme <Scheme> -sdk iphonesimulator -configuration Debug -derivedDataPath build
|
|
22
|
+
ditto -c -k --keepParent build/Build/Products/Debug-iphonesimulator/<App>.app <App>.app.zip
|
|
23
|
+
```
|
|
24
|
+
Read the bundle id with `/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' <App>.app/Info.plist`. Building needs macOS with Xcode; on any other machine, ask the user for the zip's path.
|
|
25
|
+
3. **Upload.** `muggle-remote-ios-build-upload` with the zip's absolute path, bundle id, target runtime, `git rev-parse --abbrev-ref HEAD` and `git rev-parse HEAD`. Pass the path only; the tool hashes and streams the file itself. Keep the returned `artifact.digest`.
|
|
26
|
+
4. **Queue.** One `muggle-remote-ios-run-create` per behavior to verify, each `task` naming one atomic, observable goal ("Add a note titled Groceries and see it in the list"). Map the change summary to those behaviors the way Step 2 of [`SKILL.md`](SKILL.md) maps a diff to flows. Pass login credentials as `secretRefs` naming project secrets (create them with `muggle-remote-secret-create`), never as values in the task. Queue several runs in one message; the pool runs them in parallel.
|
|
27
|
+
5. **Wait.** Poll `muggle-remote-ios-run-get` about every 15 seconds until `isFinished`. If a run is still `queued` after 10 minutes, no simulator host is free: stop polling, report it as inconclusive with its `runId`, and tell the user they can check it later with `muggle-remote-ios-run-get`.
|
|
28
|
+
6. **Evidence.** For every finished run, read `muggle-remote-ios-run-steps-get` and keep each step's description, outcome and `screenshotUrl`.
|
|
29
|
+
7. **Report.** `passed` counts as passed; `failed` and `goal_unachievable` count as failed, each with the step where it went wrong and that step's screenshot; machinery failures count as inconclusive. The PR walkthrough renders web runs only, so report iOS results in the conversation, or in the acceptance-tester's Test Summary when dispatched by it.
|
|
30
|
+
|
|
31
|
+
## Guardrails
|
|
32
|
+
|
|
33
|
+
- Never read, base64 or paste the build archive; the upload tool streams it from disk.
|
|
34
|
+
- Never put a secret value in a task or a tool argument; reference it by name in `secretRefs`.
|
|
35
|
+
- Never report a machinery status as a test failure, or a missing verdict as a pass.
|
|
36
|
+
- Never retry a run that ended `failed` as if it were flaky; a failed verdict is the app's result.
|