@auracheck-ai/cli 0.2.10 → 0.2.11

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024-present Bytedance, Inc. and its affiliates.
3
+ Copyright (c) 2026 AuraCheck
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/NOTICE ADDED
@@ -0,0 +1,33 @@
1
+ NOTICE
2
+
3
+ This package is AuraCheck's own code, licensed under the MIT License in
4
+ LICENSE (Copyright (c) 2026 AuraCheck).
5
+
6
+ Parts of it are derived from Midscene.js (https://github.com/web-infra-dev/midscene),
7
+ for example the YAML flow-item vocabulary and step rules it validates against.
8
+ Those parts remain under Midscene's original MIT License, reproduced below as
9
+ that license requires.
10
+
11
+ --------------------------------------------------------------------------------
12
+
13
+ MIT License
14
+
15
+ Copyright (c) 2024-present Bytedance, Inc. and its affiliates.
16
+
17
+ Permission is hereby granted, free of charge, to any person obtaining a copy
18
+ of this software and associated documentation files (the "Software"), to deal
19
+ in the Software without restriction, including without limitation the rights
20
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
+ copies of the Software, and to permit persons to whom the Software is
22
+ furnished to do so, subject to the following conditions:
23
+
24
+ The above copyright notice and this permission notice shall be included in all
25
+ copies or substantial portions of the Software.
26
+
27
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
+ SOFTWARE.
package/dist/bin.js CHANGED
@@ -177,6 +177,10 @@ var AuraCheckApi = class {
177
177
  const { accounts } = await this.request("GET", `/api/projects/${projectId}/test-accounts`);
178
178
  return accounts;
179
179
  }
180
+ /** GitLab #174: label (or clear) one account of a role's pool. */
181
+ async setTestAccountLabel(projectId, roleId, accountId, label) {
182
+ return this.request("PATCH", `/api/projects/${projectId}/test-accounts/${roleId}/accounts/${accountId}`, { label });
183
+ }
180
184
  async createTestAccountLink(projectId, role, addToPool) {
181
185
  return this.request("POST", `/api/projects/${projectId}/test-accounts/mcp-link`, { role, ...addToPool ? { addToPool: true } : {} });
182
186
  }
@@ -322,8 +326,8 @@ var AuraCheckApi = class {
322
326
  async getRunMemory(runId) {
323
327
  return this.request("GET", `/api/runs/${runId}/memory`);
324
328
  }
325
- async executeRun(runId) {
326
- return this.request("POST", `/api/runs/${runId}/execute`, {});
329
+ async executeRun(runId, opts = {}) {
330
+ return this.request("POST", `/api/runs/${runId}/execute`, opts.accountOverrides ? { accountOverrides: opts.accountOverrides } : {});
327
331
  }
328
332
  async cancelRun(runId) {
329
333
  return this.request("POST", `/api/runs/${runId}/cancel`, {});
@@ -1211,12 +1215,23 @@ var accountStatus = defineTool({
1211
1215
  } else if (sub?.inGrace) {
1212
1216
  lines.push(graceNotice(sub.graceEnd ?? null, ctx.renewalUrl));
1213
1217
  } else if (sub && !sub.readOnly && sub.runUsage) {
1214
- lines.push(`Trial: ${sub.daysLeft ?? "?"} days left, ${Math.max(sub.runUsage.dailyLimit - sub.runUsage.dailyCount, 0)} runs left today (${Math.max(sub.runUsage.monthlyLimit - sub.runUsage.monthlyCount, 0)} this month).`);
1218
+ const u = sub.runUsage;
1219
+ const longer = u.monthlyLimit != null && u.monthlyCount != null ? ` (${Math.max(u.monthlyLimit - u.monthlyCount, 0)} this month)` : u.totalLimit != null && u.totalCount != null ? ` (${Math.max(u.totalLimit - u.totalCount, 0)} left in the trial)` : "";
1220
+ lines.push(`Trial: ${sub.daysLeft ?? "?"} days left, ${Math.max(u.dailyLimit - u.dailyCount, 0)} runs left today${longer}.`);
1215
1221
  } else if (sub?.readOnly) {
1216
1222
  lines.push(account.adminContact ? `Your company's AuraCheck plan has ended, so new runs are paused. Please ask your admin ${account.adminContact.name ?? account.adminContact.email} (${account.adminContact.email}) to renew. Existing results are still available.` : `Your AuraCheck plan has ended, so new runs are paused. Existing results are still available. Renew here: ${ctx.renewalUrl}`);
1217
1223
  }
1218
1224
  if (account.aiRunQuotaMessage) {
1219
1225
  lines.push(account.aiRunQuotaMessage);
1226
+ } else if (account.aiRuns && account.aiRuns.limit != null) {
1227
+ const a = account.aiRuns;
1228
+ const weight = a.mobileWeight && a.mobileWeight !== 1 ? ` One Android/iOS case = ${a.mobileWeight} AI runs.` : "";
1229
+ const rerun = a.freeRerunShare != null ? ` Re-running a FAILED case within 24h is free (up to ${Math.round(a.freeRerunShare * 100)}% of the monthly allowance); re-running a passed case counts.` : "";
1230
+ lines.push(`AI runs: ${a.used} of ${a.limit} used this period, ${a.remaining ?? 0} left${a.topUpBalance > 0 ? ` (incl. ${a.topUpBalance} top-up)` : ""}; resets ${a.resetsAt}. 1 AI run = 1 test case executed by AI.${weight}${rerun} Manual results and record_result do not use AI runs.`);
1231
+ }
1232
+ const g = account.generateWithAi;
1233
+ if (g) {
1234
+ lines.push(g.limit == null ? `Generate with AI: ${g.used} this month (no monthly cap on this account); it does not use AI runs.` : `Generate with AI: ${g.used} of ${g.limit} used this month, resets ${g.resetsAt}; it does not use AI runs.${g.used >= g.limit ? " The allowance is used up: write cases yourself (create_testcase) or ask an admin to upgrade." : ""}`);
1220
1235
  }
1221
1236
  return {
1222
1237
  user: account.user,
@@ -1224,6 +1239,8 @@ var accountStatus = defineTool({
1224
1239
  isPlatformAdmin: account.isPlatformAdmin,
1225
1240
  companies: account.companies,
1226
1241
  subscription: sub,
1242
+ aiRuns: account.aiRuns ?? null,
1243
+ generateWithAi: account.generateWithAi ?? null,
1227
1244
  projects: account.projects,
1228
1245
  renewalUrl: ctx.renewalUrl,
1229
1246
  minLocalMcp: account.minLocalMcp,
@@ -1509,7 +1526,7 @@ var requestTestAccount = defineTool({
1509
1526
  var listTestAccountRoles = defineTool({
1510
1527
  name: "list_test_account_roles",
1511
1528
  title: "List test account roles",
1512
- description: "List a project's saved Test Account roles (slug, name, which of password/pin/otp are set) \u2014 never the credential values themselves. Use to check whether a role already exists before calling request_test_account, or to poll whether a person finished the secure-link setup it started.",
1529
+ description: `List a project's saved Test Account roles (slug, name, which of password/pin/otp are set, and every account in the role's pool as accounts[] {id, label, display: "label \xB7 masked login"}) \u2014 never the credential values themselves. Use to check whether a role already exists before calling request_test_account, to poll whether a person finished the secure-link setup it started, or to find the accountId for create_run/start_run/run_suite accountOverrides (sign in as a specific user).`,
1513
1530
  input: z3.object({ projectId: PROJECT_ID2 }),
1514
1531
  requires: "viewProject",
1515
1532
  billing: "read",
@@ -1525,7 +1542,35 @@ var listTestAccountRoles = defineTool({
1525
1542
  return { roles };
1526
1543
  }
1527
1544
  });
1528
- var CREDENTIAL_TOOLS = [requestTestAccount, listTestAccountRoles];
1545
+ var setTestAccountLabel = defineTool({
1546
+ name: "set_test_account_label",
1547
+ title: "Label a test account",
1548
+ description: 'Give one account in a Test Account role a short label (e.g. "User baru", "Premium", "Saldo nol") so people can choose it before a run \u2014 shown as "label \xB7 masked login". Pass an empty label to clear it. Get roleId and accountId from list_test_account_roles. Never touches the credential values.',
1549
+ input: z3.object({
1550
+ projectId: PROJECT_ID2,
1551
+ roleId: z3.string().min(1),
1552
+ accountId: z3.string().min(1),
1553
+ label: z3.string().max(60)
1554
+ }),
1555
+ requires: "manageProjectSetup",
1556
+ billing: "write",
1557
+ surfaces: ["remote", "local"],
1558
+ annotations: {
1559
+ readOnlyHint: false,
1560
+ destructiveHint: false,
1561
+ openWorldHint: false
1562
+ },
1563
+ handler: async ({ projectId, roleId, accountId, label }, ctx) => {
1564
+ const pid = requireProjectId(ctx, projectId);
1565
+ const role = await ctx.api.setTestAccountLabel(pid, roleId, accountId, label.trim() ? label : null);
1566
+ return { role };
1567
+ }
1568
+ });
1569
+ var CREDENTIAL_TOOLS = [
1570
+ requestTestAccount,
1571
+ listTestAccountRoles,
1572
+ setTestAccountLabel
1573
+ ];
1529
1574
 
1530
1575
  // ../mcp-core/dist/tools/exploration.js
1531
1576
  import { z as z4 } from "zod";
@@ -3232,6 +3277,7 @@ var RUN_LOCALLY_TOOLS = [runLocally];
3232
3277
  // ../mcp-core/dist/tools/runs.js
3233
3278
  import { z as z12 } from "zod";
3234
3279
  var PROJECT_ID10 = z12.string().optional().describe("AuraCheck project id (see list_projects). Defaults to the project set for this session.");
3280
+ var ACCOUNT_OVERRIDES = z12.record(z12.string().regex(/^[a-z][a-z0-9_]{1,39}$/, "a Test Account role slug"), z12.string().min(1)).optional().describe('Optional: sign in as a SPECIFIC Test Account per role, e.g. {"buyer": "<accountId>"} \u2014 accountId from list_test_account_roles (roles[].accounts[].id, shown as "label \xB7 masked login"). A role left out (or "auto") is Otomatis: AuraCheck picks a free account from the pool, same as before. Pinning one account makes the cases that use it run one after another. Only use when the person asked to test as a particular user (new user, premium, zero balance\u2026).');
3235
3281
  function runViewUrl3(appUrl, runId, projectId) {
3236
3282
  return projectId ? `${appUrl}/projects/${projectId}/runs/${runId}` : `${appUrl}/runs/${runId}`;
3237
3283
  }
@@ -3276,7 +3322,9 @@ var createRun = defineTool({
3276
3322
  milestoneId: z12.string().optional(),
3277
3323
  tags: z12.array(z12.string()).optional(),
3278
3324
  notes: z12.string().optional(),
3279
- browserEngine: z12.enum(["chrome", "edge"]).optional()
3325
+ browserEngine: z12.enum(["chrome", "edge"]).optional(),
3326
+ accountOverrides: ACCOUNT_OVERRIDES,
3327
+ caseExecution: z12.enum(["parallel", "sequential"]).optional().describe('"sequential" runs the cases one at a time (slower; use it when the site blocks many logins or requests at once). Default "parallel".')
3280
3328
  }),
3281
3329
  requires: "runTests",
3282
3330
  billing: "run",
@@ -3317,7 +3365,10 @@ var startRun = defineTool({
3317
3365
  localAlias: "execute_run",
3318
3366
  title: "Start run",
3319
3367
  description: "Trigger execution of an existing WEB run. Fire-and-forget: the runner state lives in AuraCheck. Use wait_for_run to await terminal status. Android/iOS runs never execute on AuraCheck's servers: for those this returns a blocked result telling the person to open the run in the desktop app and click Run on local / Run on iOS.",
3320
- input: z12.object({ runId: z12.string().min(1) }),
3368
+ input: z12.object({
3369
+ runId: z12.string().min(1),
3370
+ accountOverrides: ACCOUNT_OVERRIDES.describe(`Optional, only for a run that has not started yet: sign in as a specific Test Account per role ({"<roleSlug>": "<accountId>" | "auto"}, ids from list_test_account_roles). Omit to keep what the run was created with. A re-run always keeps the run's own choice.`)
3371
+ }),
3321
3372
  requires: "runTests",
3322
3373
  billing: "run",
3323
3374
  surfaces: ["remote", "local"],
@@ -3328,7 +3379,7 @@ var startRun = defineTool({
3328
3379
  destructiveHint: false,
3329
3380
  openWorldHint: true
3330
3381
  },
3331
- handler: async ({ runId }, ctx) => {
3382
+ handler: async ({ runId, accountOverrides }, ctx) => {
3332
3383
  try {
3333
3384
  const run = await ctx.api.getRun(runId).catch(() => null);
3334
3385
  if (run) {
@@ -3337,7 +3388,7 @@ var startRun = defineTool({
3337
3388
  if (blocked)
3338
3389
  return blocked;
3339
3390
  }
3340
- return await ctx.api.executeRun(runId);
3391
+ return await (accountOverrides ? ctx.api.executeRun(runId, { accountOverrides }) : ctx.api.executeRun(runId));
3341
3392
  } catch (err) {
3342
3393
  if (err instanceof ApiError) {
3343
3394
  const answer = runFromDesktopAnswer(err, runId) ?? // ACTIVATION-1: setup (URL/test account/login) isn't ready yet.
@@ -4358,7 +4409,8 @@ var runSuite = defineTool({
4358
4409
  projectId: PROJECT_ID13,
4359
4410
  suiteId: z16.string().optional(),
4360
4411
  caseIds: z16.array(z16.string()).optional(),
4361
- name: z16.string().optional()
4412
+ name: z16.string().optional(),
4413
+ accountOverrides: ACCOUNT_OVERRIDES
4362
4414
  }),
4363
4415
  requires: "runTests",
4364
4416
  billing: "run",
@@ -4369,7 +4421,7 @@ var runSuite = defineTool({
4369
4421
  destructiveHint: false,
4370
4422
  openWorldHint: true
4371
4423
  },
4372
- handler: async ({ projectId, suiteId, caseIds, name }, ctx) => {
4424
+ handler: async ({ projectId, suiteId, caseIds, name, accountOverrides }, ctx) => {
4373
4425
  const pid = requireProjectId(ctx, projectId);
4374
4426
  if (!suiteId && (!caseIds || caseIds.length === 0)) {
4375
4427
  throw new Error("Pass either suiteId (from design_test_suite) or a non-empty caseIds list.");
@@ -4396,7 +4448,8 @@ var runSuite = defineTool({
4396
4448
  name: name ?? `Suite run (${resolvedCaseIds.length} cases)`,
4397
4449
  testCaseIds: resolvedCaseIds,
4398
4450
  caseSelectionMode: "select",
4399
- platform: ctx.defaultPlatform ?? "web"
4451
+ platform: ctx.defaultPlatform ?? "web",
4452
+ ...accountOverrides ? { accountOverrides } : {}
4400
4453
  });
4401
4454
  runId = run.id;
4402
4455
  viewUrl = `${ctx.appUrl}/projects/${pid}/runs/${runId}`;
@@ -6057,7 +6110,7 @@ var SourceReader = class {
6057
6110
  };
6058
6111
 
6059
6112
  // src/mcp/server.ts
6060
- var CLI_VERSION = "0.2.10";
6113
+ var CLI_VERSION = "0.2.11";
6061
6114
  var LOCAL_ALL_CAPABILITIES = [
6062
6115
  "viewProject",
6063
6116
  "viewReports",
@@ -6500,7 +6553,7 @@ async function runMcpServer(overrides = {}) {
6500
6553
  }
6501
6554
 
6502
6555
  // src/bin.ts
6503
- var version = "0.2.10";
6556
+ var version = "0.2.11";
6504
6557
  function invokedCommandName() {
6505
6558
  const argv1 = process.argv[1] ?? "";
6506
6559
  const base = path5.basename(argv1).replace(/\.(c|m)?js$/, "");
@@ -169,6 +169,10 @@ var AuraCheckApi = class {
169
169
  const { accounts } = await this.request("GET", `/api/projects/${projectId}/test-accounts`);
170
170
  return accounts;
171
171
  }
172
+ /** GitLab #174: label (or clear) one account of a role's pool. */
173
+ async setTestAccountLabel(projectId, roleId, accountId, label) {
174
+ return this.request("PATCH", `/api/projects/${projectId}/test-accounts/${roleId}/accounts/${accountId}`, { label });
175
+ }
172
176
  async createTestAccountLink(projectId, role, addToPool) {
173
177
  return this.request("POST", `/api/projects/${projectId}/test-accounts/mcp-link`, { role, ...addToPool ? { addToPool: true } : {} });
174
178
  }
@@ -314,8 +318,8 @@ var AuraCheckApi = class {
314
318
  async getRunMemory(runId) {
315
319
  return this.request("GET", `/api/runs/${runId}/memory`);
316
320
  }
317
- async executeRun(runId) {
318
- return this.request("POST", `/api/runs/${runId}/execute`, {});
321
+ async executeRun(runId, opts = {}) {
322
+ return this.request("POST", `/api/runs/${runId}/execute`, opts.accountOverrides ? { accountOverrides: opts.accountOverrides } : {});
319
323
  }
320
324
  async cancelRun(runId) {
321
325
  return this.request("POST", `/api/runs/${runId}/cancel`, {});
@@ -1203,12 +1207,23 @@ var accountStatus = defineTool({
1203
1207
  } else if (sub?.inGrace) {
1204
1208
  lines.push(graceNotice(sub.graceEnd ?? null, ctx.renewalUrl));
1205
1209
  } else if (sub && !sub.readOnly && sub.runUsage) {
1206
- lines.push(`Trial: ${sub.daysLeft ?? "?"} days left, ${Math.max(sub.runUsage.dailyLimit - sub.runUsage.dailyCount, 0)} runs left today (${Math.max(sub.runUsage.monthlyLimit - sub.runUsage.monthlyCount, 0)} this month).`);
1210
+ const u = sub.runUsage;
1211
+ const longer = u.monthlyLimit != null && u.monthlyCount != null ? ` (${Math.max(u.monthlyLimit - u.monthlyCount, 0)} this month)` : u.totalLimit != null && u.totalCount != null ? ` (${Math.max(u.totalLimit - u.totalCount, 0)} left in the trial)` : "";
1212
+ lines.push(`Trial: ${sub.daysLeft ?? "?"} days left, ${Math.max(u.dailyLimit - u.dailyCount, 0)} runs left today${longer}.`);
1207
1213
  } else if (sub?.readOnly) {
1208
1214
  lines.push(account.adminContact ? `Your company's AuraCheck plan has ended, so new runs are paused. Please ask your admin ${account.adminContact.name ?? account.adminContact.email} (${account.adminContact.email}) to renew. Existing results are still available.` : `Your AuraCheck plan has ended, so new runs are paused. Existing results are still available. Renew here: ${ctx.renewalUrl}`);
1209
1215
  }
1210
1216
  if (account.aiRunQuotaMessage) {
1211
1217
  lines.push(account.aiRunQuotaMessage);
1218
+ } else if (account.aiRuns && account.aiRuns.limit != null) {
1219
+ const a = account.aiRuns;
1220
+ const weight = a.mobileWeight && a.mobileWeight !== 1 ? ` One Android/iOS case = ${a.mobileWeight} AI runs.` : "";
1221
+ const rerun = a.freeRerunShare != null ? ` Re-running a FAILED case within 24h is free (up to ${Math.round(a.freeRerunShare * 100)}% of the monthly allowance); re-running a passed case counts.` : "";
1222
+ lines.push(`AI runs: ${a.used} of ${a.limit} used this period, ${a.remaining ?? 0} left${a.topUpBalance > 0 ? ` (incl. ${a.topUpBalance} top-up)` : ""}; resets ${a.resetsAt}. 1 AI run = 1 test case executed by AI.${weight}${rerun} Manual results and record_result do not use AI runs.`);
1223
+ }
1224
+ const g = account.generateWithAi;
1225
+ if (g) {
1226
+ lines.push(g.limit == null ? `Generate with AI: ${g.used} this month (no monthly cap on this account); it does not use AI runs.` : `Generate with AI: ${g.used} of ${g.limit} used this month, resets ${g.resetsAt}; it does not use AI runs.${g.used >= g.limit ? " The allowance is used up: write cases yourself (create_testcase) or ask an admin to upgrade." : ""}`);
1212
1227
  }
1213
1228
  return {
1214
1229
  user: account.user,
@@ -1216,6 +1231,8 @@ var accountStatus = defineTool({
1216
1231
  isPlatformAdmin: account.isPlatformAdmin,
1217
1232
  companies: account.companies,
1218
1233
  subscription: sub,
1234
+ aiRuns: account.aiRuns ?? null,
1235
+ generateWithAi: account.generateWithAi ?? null,
1219
1236
  projects: account.projects,
1220
1237
  renewalUrl: ctx.renewalUrl,
1221
1238
  minLocalMcp: account.minLocalMcp,
@@ -1501,7 +1518,7 @@ var requestTestAccount = defineTool({
1501
1518
  var listTestAccountRoles = defineTool({
1502
1519
  name: "list_test_account_roles",
1503
1520
  title: "List test account roles",
1504
- description: "List a project's saved Test Account roles (slug, name, which of password/pin/otp are set) \u2014 never the credential values themselves. Use to check whether a role already exists before calling request_test_account, or to poll whether a person finished the secure-link setup it started.",
1521
+ description: `List a project's saved Test Account roles (slug, name, which of password/pin/otp are set, and every account in the role's pool as accounts[] {id, label, display: "label \xB7 masked login"}) \u2014 never the credential values themselves. Use to check whether a role already exists before calling request_test_account, to poll whether a person finished the secure-link setup it started, or to find the accountId for create_run/start_run/run_suite accountOverrides (sign in as a specific user).`,
1505
1522
  input: z3.object({ projectId: PROJECT_ID2 }),
1506
1523
  requires: "viewProject",
1507
1524
  billing: "read",
@@ -1517,7 +1534,35 @@ var listTestAccountRoles = defineTool({
1517
1534
  return { roles };
1518
1535
  }
1519
1536
  });
1520
- var CREDENTIAL_TOOLS = [requestTestAccount, listTestAccountRoles];
1537
+ var setTestAccountLabel = defineTool({
1538
+ name: "set_test_account_label",
1539
+ title: "Label a test account",
1540
+ description: 'Give one account in a Test Account role a short label (e.g. "User baru", "Premium", "Saldo nol") so people can choose it before a run \u2014 shown as "label \xB7 masked login". Pass an empty label to clear it. Get roleId and accountId from list_test_account_roles. Never touches the credential values.',
1541
+ input: z3.object({
1542
+ projectId: PROJECT_ID2,
1543
+ roleId: z3.string().min(1),
1544
+ accountId: z3.string().min(1),
1545
+ label: z3.string().max(60)
1546
+ }),
1547
+ requires: "manageProjectSetup",
1548
+ billing: "write",
1549
+ surfaces: ["remote", "local"],
1550
+ annotations: {
1551
+ readOnlyHint: false,
1552
+ destructiveHint: false,
1553
+ openWorldHint: false
1554
+ },
1555
+ handler: async ({ projectId, roleId, accountId, label }, ctx) => {
1556
+ const pid = requireProjectId(ctx, projectId);
1557
+ const role = await ctx.api.setTestAccountLabel(pid, roleId, accountId, label.trim() ? label : null);
1558
+ return { role };
1559
+ }
1560
+ });
1561
+ var CREDENTIAL_TOOLS = [
1562
+ requestTestAccount,
1563
+ listTestAccountRoles,
1564
+ setTestAccountLabel
1565
+ ];
1521
1566
 
1522
1567
  // ../mcp-core/dist/tools/exploration.js
1523
1568
  import { z as z4 } from "zod";
@@ -3224,6 +3269,7 @@ var RUN_LOCALLY_TOOLS = [runLocally];
3224
3269
  // ../mcp-core/dist/tools/runs.js
3225
3270
  import { z as z12 } from "zod";
3226
3271
  var PROJECT_ID10 = z12.string().optional().describe("AuraCheck project id (see list_projects). Defaults to the project set for this session.");
3272
+ var ACCOUNT_OVERRIDES = z12.record(z12.string().regex(/^[a-z][a-z0-9_]{1,39}$/, "a Test Account role slug"), z12.string().min(1)).optional().describe('Optional: sign in as a SPECIFIC Test Account per role, e.g. {"buyer": "<accountId>"} \u2014 accountId from list_test_account_roles (roles[].accounts[].id, shown as "label \xB7 masked login"). A role left out (or "auto") is Otomatis: AuraCheck picks a free account from the pool, same as before. Pinning one account makes the cases that use it run one after another. Only use when the person asked to test as a particular user (new user, premium, zero balance\u2026).');
3227
3273
  function runViewUrl3(appUrl, runId, projectId) {
3228
3274
  return projectId ? `${appUrl}/projects/${projectId}/runs/${runId}` : `${appUrl}/runs/${runId}`;
3229
3275
  }
@@ -3268,7 +3314,9 @@ var createRun = defineTool({
3268
3314
  milestoneId: z12.string().optional(),
3269
3315
  tags: z12.array(z12.string()).optional(),
3270
3316
  notes: z12.string().optional(),
3271
- browserEngine: z12.enum(["chrome", "edge"]).optional()
3317
+ browserEngine: z12.enum(["chrome", "edge"]).optional(),
3318
+ accountOverrides: ACCOUNT_OVERRIDES,
3319
+ caseExecution: z12.enum(["parallel", "sequential"]).optional().describe('"sequential" runs the cases one at a time (slower; use it when the site blocks many logins or requests at once). Default "parallel".')
3272
3320
  }),
3273
3321
  requires: "runTests",
3274
3322
  billing: "run",
@@ -3309,7 +3357,10 @@ var startRun = defineTool({
3309
3357
  localAlias: "execute_run",
3310
3358
  title: "Start run",
3311
3359
  description: "Trigger execution of an existing WEB run. Fire-and-forget: the runner state lives in AuraCheck. Use wait_for_run to await terminal status. Android/iOS runs never execute on AuraCheck's servers: for those this returns a blocked result telling the person to open the run in the desktop app and click Run on local / Run on iOS.",
3312
- input: z12.object({ runId: z12.string().min(1) }),
3360
+ input: z12.object({
3361
+ runId: z12.string().min(1),
3362
+ accountOverrides: ACCOUNT_OVERRIDES.describe(`Optional, only for a run that has not started yet: sign in as a specific Test Account per role ({"<roleSlug>": "<accountId>" | "auto"}, ids from list_test_account_roles). Omit to keep what the run was created with. A re-run always keeps the run's own choice.`)
3363
+ }),
3313
3364
  requires: "runTests",
3314
3365
  billing: "run",
3315
3366
  surfaces: ["remote", "local"],
@@ -3320,7 +3371,7 @@ var startRun = defineTool({
3320
3371
  destructiveHint: false,
3321
3372
  openWorldHint: true
3322
3373
  },
3323
- handler: async ({ runId }, ctx) => {
3374
+ handler: async ({ runId, accountOverrides }, ctx) => {
3324
3375
  try {
3325
3376
  const run = await ctx.api.getRun(runId).catch(() => null);
3326
3377
  if (run) {
@@ -3329,7 +3380,7 @@ var startRun = defineTool({
3329
3380
  if (blocked)
3330
3381
  return blocked;
3331
3382
  }
3332
- return await ctx.api.executeRun(runId);
3383
+ return await (accountOverrides ? ctx.api.executeRun(runId, { accountOverrides }) : ctx.api.executeRun(runId));
3333
3384
  } catch (err) {
3334
3385
  if (err instanceof ApiError) {
3335
3386
  const answer = runFromDesktopAnswer(err, runId) ?? // ACTIVATION-1: setup (URL/test account/login) isn't ready yet.
@@ -4350,7 +4401,8 @@ var runSuite = defineTool({
4350
4401
  projectId: PROJECT_ID13,
4351
4402
  suiteId: z16.string().optional(),
4352
4403
  caseIds: z16.array(z16.string()).optional(),
4353
- name: z16.string().optional()
4404
+ name: z16.string().optional(),
4405
+ accountOverrides: ACCOUNT_OVERRIDES
4354
4406
  }),
4355
4407
  requires: "runTests",
4356
4408
  billing: "run",
@@ -4361,7 +4413,7 @@ var runSuite = defineTool({
4361
4413
  destructiveHint: false,
4362
4414
  openWorldHint: true
4363
4415
  },
4364
- handler: async ({ projectId, suiteId, caseIds, name }, ctx) => {
4416
+ handler: async ({ projectId, suiteId, caseIds, name, accountOverrides }, ctx) => {
4365
4417
  const pid = requireProjectId(ctx, projectId);
4366
4418
  if (!suiteId && (!caseIds || caseIds.length === 0)) {
4367
4419
  throw new Error("Pass either suiteId (from design_test_suite) or a non-empty caseIds list.");
@@ -4388,7 +4440,8 @@ var runSuite = defineTool({
4388
4440
  name: name ?? `Suite run (${resolvedCaseIds.length} cases)`,
4389
4441
  testCaseIds: resolvedCaseIds,
4390
4442
  caseSelectionMode: "select",
4391
- platform: ctx.defaultPlatform ?? "web"
4443
+ platform: ctx.defaultPlatform ?? "web",
4444
+ ...accountOverrides ? { accountOverrides } : {}
4392
4445
  });
4393
4446
  runId = run.id;
4394
4447
  viewUrl = `${ctx.appUrl}/projects/${pid}/runs/${runId}`;
@@ -5310,7 +5363,7 @@ var SourceReader = class {
5310
5363
  };
5311
5364
 
5312
5365
  // src/mcp/server.ts
5313
- var CLI_VERSION = "0.2.10";
5366
+ var CLI_VERSION = "0.2.11";
5314
5367
  var LOCAL_ALL_CAPABILITIES = [
5315
5368
  "viewProject",
5316
5369
  "viewReports",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auracheck-ai/cli",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "AuraCheck CLI + MCP server for AI-driven whitebox testcase generation",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,22 +17,17 @@
17
17
  "claude-code",
18
18
  "ai-testing"
19
19
  ],
20
- "homepage": "https://gitlab.sprout.co.id/sixseven/sixseven-ai/tree/main/packages/cli",
21
- "repository": {
22
- "type": "git",
23
- "url": "https://gitlab.sprout.co.id/sixseven/sixseven-ai.git",
24
- "directory": "packages/cli"
25
- },
26
- "bugs": {
27
- "url": "https://gitlab.sprout.co.id/sixseven/sixseven-ai/issues"
28
- },
20
+ "homepage": "https://www.auracheck.ai.id/docs/mcp",
29
21
  "bin": {
30
22
  "auracheck": "dist/bin.js"
31
23
  },
32
24
  "files": [
33
25
  "dist",
26
+ "!dist/**/*.map",
34
27
  "README.md",
35
- "USAGE.md"
28
+ "USAGE.md",
29
+ "LICENSE",
30
+ "NOTICE"
36
31
  ],
37
32
  "publishConfig": {
38
33
  "access": "public"