@testsprite/testsprite-cli 0.14.0 → 0.16.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.
Files changed (61) hide show
  1. package/README.md +27 -17
  2. package/dist/commands/agent.js +7 -2
  3. package/dist/commands/auth.js +7 -3
  4. package/dist/commands/ci.d.ts +66 -17
  5. package/dist/commands/ci.js +486 -122
  6. package/dist/commands/completion.js +2 -1
  7. package/dist/commands/doctor.d.ts +3 -0
  8. package/dist/commands/doctor.js +52 -10
  9. package/dist/commands/init.js +25 -5
  10. package/dist/commands/project-env.js +39 -17
  11. package/dist/commands/project-sign-in.js +9 -4
  12. package/dist/commands/project.js +43 -22
  13. package/dist/commands/schedule.js +24 -15
  14. package/dist/commands/test.d.ts +105 -36
  15. package/dist/commands/test.js +1494 -847
  16. package/dist/commands/testlist.js +13 -3
  17. package/dist/commands/tunnel.js +23 -25
  18. package/dist/commands/usage.js +1 -0
  19. package/dist/index.js +14 -7
  20. package/dist/lib/agent-targets.d.ts +8 -3
  21. package/dist/lib/agent-targets.js +15 -4
  22. package/dist/lib/ci-run.d.ts +11 -0
  23. package/dist/lib/ci-run.js +34 -0
  24. package/dist/lib/client-factory.d.ts +23 -0
  25. package/dist/lib/client-factory.js +7 -6
  26. package/dist/lib/config.d.ts +1 -0
  27. package/dist/lib/config.js +1 -1
  28. package/dist/lib/conflict-reason.d.ts +24 -3
  29. package/dist/lib/conflict-reason.js +33 -2
  30. package/dist/lib/credentials.d.ts +0 -1
  31. package/dist/lib/credentials.js +51 -14
  32. package/dist/lib/deprecate.d.ts +22 -0
  33. package/dist/lib/deprecate.js +26 -0
  34. package/dist/lib/dry-run/samples.js +56 -5
  35. package/dist/lib/environment-tunnel.d.ts +2 -1
  36. package/dist/lib/environment-tunnel.js +1 -4
  37. package/dist/lib/first-suite-hint.d.ts +55 -0
  38. package/dist/lib/first-suite-hint.js +101 -0
  39. package/dist/lib/gh-output.d.ts +62 -4
  40. package/dist/lib/gh-output.js +149 -7
  41. package/dist/lib/github-context.d.ts +21 -0
  42. package/dist/lib/github-context.js +153 -0
  43. package/dist/lib/http.d.ts +10 -1
  44. package/dist/lib/http.js +29 -3
  45. package/dist/lib/junit-report.d.ts +3 -0
  46. package/dist/lib/junit-report.js +8 -1
  47. package/dist/lib/output.d.ts +11 -1
  48. package/dist/lib/output.js +17 -2
  49. package/dist/lib/plans.types.d.ts +1 -1
  50. package/dist/lib/response-schemas.d.ts +5 -1
  51. package/dist/lib/response-schemas.js +57 -0
  52. package/dist/lib/runs.types.d.ts +122 -0
  53. package/dist/lib/telemetry.d.ts +26 -2
  54. package/dist/lib/telemetry.js +47 -4
  55. package/dist/version.d.ts +1 -1
  56. package/dist/version.js +1 -1
  57. package/package.json +3 -3
  58. package/schemas/plan.schema.json +2 -2
  59. package/skills/testsprite-ci.skill.md +154 -0
  60. package/skills/testsprite-verify.codex.md +7 -7
  61. package/skills/testsprite-verify.skill.md +24 -21
@@ -233,10 +233,9 @@ export async function runDelete(opts, deps = {}) {
233
233
  error: {
234
234
  code: 'VALIDATION_ERROR',
235
235
  message: 'Refusing to delete without --confirm.',
236
- nextAction: 'This removes the schedule and its run history, and stops it firing (no ' +
237
- 'restore window — recreating it starts a fresh schedule). The CLI convention ' +
238
- 'is explicit confirmation for destructive operations. Re-run with --confirm. ' +
239
- '(--dry-run also works without --confirm.)',
236
+ nextAction: 'This removes the schedule and stops it firing; past runs are kept but no longer ' +
237
+ 'listed under it (no restore window). Re-run with --confirm ' +
238
+ '(--dry-run also works without it).',
240
239
  requestId: 'local',
241
240
  details: { field: 'confirm', reason: 'required for destructive operation' },
242
241
  },
@@ -472,9 +471,12 @@ function localValidationError(message) {
472
471
  // Wiring
473
472
  // ---------------------------------------------------------------------------
474
473
  export function createScheduleCommand(deps = {}) {
475
- const schedule = new Command('schedule').description('Manage TestSprite schedules');
474
+ const schedule = new Command('schedule')
475
+ .summary('Manage schedules (V3 workspace)')
476
+ .description('Manage TestSprite schedules. Needs a V3 workspace and an API key with the read:schedules / write:schedules scopes.');
476
477
  schedule
477
478
  .command('list')
479
+ .summary('List schedules visible to the API key')
478
480
  .description('List schedules visible to the API key\n' +
479
481
  '\nExit codes:\n' +
480
482
  ' 0 success\n' +
@@ -494,6 +496,7 @@ export function createScheduleCommand(deps = {}) {
494
496
  });
495
497
  schedule
496
498
  .command('get <schedule-id>')
499
+ .summary('Get a schedule by id')
497
500
  .description('Get a schedule by id\n' +
498
501
  '\nExit codes:\n' +
499
502
  ' 0 success\n' +
@@ -508,7 +511,9 @@ export function createScheduleCommand(deps = {}) {
508
511
  });
509
512
  schedule
510
513
  .command('create')
511
- .description('Create a schedule\n' +
514
+ .summary('Create a schedule (starts enabled; runs spend credits)')
515
+ .description('Create a schedule. It starts enabled and each run spends credits (an estimate is printed);\n' +
516
+ 'pause it with `schedule update <id> --pause`.\n' +
512
517
  '\nExit codes:\n' +
513
518
  ' 0 success\n' +
514
519
  ' 3 auth error\n' +
@@ -523,10 +528,9 @@ export function createScheduleCommand(deps = {}) {
523
528
  .option('--target-type <project|testList>', 'what to run (required)')
524
529
  .option('--target-id <id>', 'project id or test-list id (required)')
525
530
  .option('--env <name>', "Pin this project schedule to an environment; omit to always use the project's default environment")
526
- .option('--cron <expr>', 'standard 5-field cron (minute hour day-of-month month day-of-week), ' +
527
- 'e.g. "0 3 * * *". Day-of-week is 0-7, with both 0 and 7 = Sunday. ' +
528
- 'Constrain ' +
529
- 'day-of-month or day-of-week, not both. (required)')
531
+ .option('--cron <expr>', 'standard 5-field cron (minute hour day-of-month month day-of-week), e.g. "0 3 * * *". ' +
532
+ 'Day-of-week 0-7 (0 and 7 = Sunday). Constrain day-of-month or day-of-week, not both. ' +
533
+ 'Numeric fields only (* n a-b */n, lists); no names, ?, L, W or #. (required)')
530
534
  .option('--timezone <tz>', 'IANA timezone (default UTC)')
531
535
  .option('--start <iso>', 'ISO 8601 start instant (default: a few minutes from now)')
532
536
  .option('--end <iso>', 'ISO 8601 end instant (default: open-ended)')
@@ -550,6 +554,7 @@ export function createScheduleCommand(deps = {}) {
550
554
  });
551
555
  schedule
552
556
  .command('update <schedule-id>')
557
+ .summary('Update a schedule, or pause/resume it')
553
558
  .description('Update a schedule, or pause/resume it\n' +
554
559
  '\nExit codes:\n' +
555
560
  ' 0 success\n' +
@@ -562,9 +567,9 @@ export function createScheduleCommand(deps = {}) {
562
567
  ' 10 transport/network failure (UNAVAILABLE) — retry the command\n' +
563
568
  ' 13 not available on your plan')
564
569
  .option('--name <name>', 'new schedule name')
565
- .option('--env <name>', "Pin this project schedule to an environment; omit to always use the project's default environment")
566
- .option('--cron <expr>', 'new standard 5-field cron, as printed by `schedule get`. Day-of-week is ' +
567
- '0-7, with both 0 and 7 = Sunday. Constrain day-of-month or day-of-week, not both.')
570
+ .option('--env <name>', 'Pin this project schedule to an environment; omit to leave the current pin unchanged')
571
+ .option('--cron <expr>', 'new standard 5-field cron, as printed by `schedule get`. Day-of-week 0-7 (0 and 7 = Sunday). ' +
572
+ 'Constrain day-of-month or day-of-week, not both. Numeric fields only (no names, ?, L, W or #).')
568
573
  .option('--timezone <tz>', 'new IANA timezone')
569
574
  .option('--start <iso>', 'new ISO 8601 start instant')
570
575
  .option('--end <iso>', 'new ISO 8601 end instant')
@@ -591,7 +596,9 @@ export function createScheduleCommand(deps = {}) {
591
596
  });
592
597
  schedule
593
598
  .command('delete <schedule-id>')
594
- .description('Delete a schedule and its run history. Requires --confirm.\n' +
599
+ .summary('Delete a schedule (requires --confirm)')
600
+ .description('Delete a schedule and stop it firing. Past runs are kept but no longer listed under it.\n' +
601
+ 'Requires --confirm.\n' +
595
602
  '\nExit codes:\n' +
596
603
  ' 0 success\n' +
597
604
  ' 3 auth error\n' +
@@ -615,7 +622,9 @@ export function createScheduleCommand(deps = {}) {
615
622
  const run = schedule.command('run').description("Inspect a schedule's runs");
616
623
  run
617
624
  .command('list <schedule-id>')
618
- .description("List a schedule's past runs\n" +
625
+ .summary("List a schedule's most recent runs")
626
+ .description("List a schedule's most recent runs (up to 100, within your plan's history window;\n" +
627
+ 'JSON `meta.hiddenCount` shows how many are hidden)\n' +
619
628
  '\nExit codes:\n' +
620
629
  ' 0 success\n' +
621
630
  ' 3 auth error\n' +
@@ -6,10 +6,11 @@ import { type JUnitReportFormat, type JUnitTestResult } from '../lib/junit-repor
6
6
  import { ApiError, InterruptError } from '../lib/errors.js';
7
7
  import { type ShutdownHandle } from '../lib/interrupt.js';
8
8
  import type { FetchImpl } from '../lib/http.js';
9
+ import { type DeprecationEntry } from '../lib/deprecate.js';
9
10
  import { type Page } from '../lib/pagination.js';
10
11
  import { type WaitTimeoutTelemetry } from '../lib/telemetry.js';
11
12
  import type { CliGetPlansResponse, CliGenerationStage } from '../lib/plans.types.js';
12
- import type { RunResponse, RunStatus, TriggerRunResponse, RerunResponse, BatchRerunResponse, ListRunsResponse, RunSource, BatchRunFreshResponse, CancelRunResponse, RunEnvironmentRef } from '../lib/runs.types.js';
13
+ import type { RunResponse, RunStatus, TriggerRunResponse, RerunResponse, BatchRerunResponse, ListRunsResponse, RunSource, BatchRunFreshResponse, CancelRunResponse, CiGithubTrigger, RunEnvironmentRef } from '../lib/runs.types.js';
13
14
  import { type LoopbackHost } from '../lib/local-target.js';
14
15
  import { type TunnelClientHandle } from '../lib/tunnel-session.js';
15
16
  import { type TunnelClientOptions } from '../vendor/tunnel-client/index.js';
@@ -49,6 +50,11 @@ export interface CliTest {
49
50
  projectName?: string | null;
50
51
  name: string;
51
52
  type: 'frontend' | 'backend';
53
+ /**
54
+ * Assembled integration test (backend). Absent on older backends — treated
55
+ * as false. Listed as `backend/int` so it is not mistaken for a plain test.
56
+ */
57
+ isIntegration?: boolean;
52
58
  createdFrom: 'portal' | 'mcp' | 'cli';
53
59
  status: CliPublicStatus;
54
60
  statusByEnvironment?: Array<{
@@ -85,7 +91,7 @@ export interface CliTest {
85
91
  */
86
92
  details?: Partial<CliTestStatusDetails>;
87
93
  /**
88
- * G1a — test priority label, e.g. "p0" | "p1" | "p2" | "p3".
94
+ * G1a — test priority label as stored ("High" | "Medium" | "Low").
89
95
  * Optional on the wire: pre-G1a backends omit the field; `null` means
90
96
  * no priority has been set. Text mode surfaces it only when truthy.
91
97
  */
@@ -368,6 +374,12 @@ export interface TestDeps {
368
374
  * `sleep` / `fetchImpl` / `shutdown`.
369
375
  */
370
376
  createTunnelClient?: (options: TunnelClientOptions) => TunnelClientHandle;
377
+ /**
378
+ * Deprecation entries surfaced as a trailing `deprecations` key on JSON
379
+ * object payloads. Set only by the deprecated commands' actions; every
380
+ * `Output` built from these deps picks it up, so no print site changes.
381
+ */
382
+ deprecations?: readonly DeprecationEntry[];
371
383
  }
372
384
  /**
373
385
  * How a `--local` run's wait ended while the run was still non-terminal.
@@ -456,6 +468,14 @@ export interface CliCreateTestResponse {
456
468
  }
457
469
  export declare const CLI_CREATE_PRIORITIES: readonly ["p0", "p1", "p2", "p3"];
458
470
  export type CliCreatePriority = (typeof CLI_CREATE_PRIORITIES)[number];
471
+ /** Priority spellings accepted as input; reads return High/Medium/Low. */
472
+ export declare const CLI_PRIORITY_INPUTS: readonly ["p0", "p1", "p2", "p3", "high", "medium", "low"];
473
+ /**
474
+ * Normalise a priority input (p0-p3 or high/medium/low, any case) to the
475
+ * p0/p1/p2 wire value every backend accepts; p3 folds into p2 (Low).
476
+ * Returns undefined for anything else.
477
+ */
478
+ export declare function normalizePriority(raw: unknown): 'p0' | 'p1' | 'p2' | undefined;
459
479
  interface CreateOptions extends CommonOptions {
460
480
  noWait?: boolean;
461
481
  environment?: string;
@@ -463,7 +483,7 @@ interface CreateOptions extends CommonOptions {
463
483
  type: 'frontend' | 'backend';
464
484
  name: string;
465
485
  description?: string;
466
- priority?: CliCreatePriority;
486
+ priority?: string;
467
487
  /** Per-test timeout applied by the execution engine to every step. */
468
488
  stepTimeoutMs?: number;
469
489
  /** Source path to the test code. Read into memory; capped at 350 KB. */
@@ -544,6 +564,12 @@ interface PlanPutOptions extends CommonOptions {
544
564
  * `codeVersion`, so this is the only consistency knob.
545
565
  */
546
566
  expectedStepCount?: number;
567
+ /**
568
+ * Replace even when the server would drop structured fields
569
+ * (action / selector / inputValue) from steps whose text changed. Also
570
+ * skips the default step-count fence.
571
+ */
572
+ force?: boolean;
547
573
  /** Caller-supplied idempotency token; UUIDv4 minted client-side if absent. */
548
574
  idempotencyKey?: string;
549
575
  /**
@@ -567,10 +593,9 @@ interface PlanPutOptions extends CommonOptions {
567
593
  * trip and matches the piece-6 spec's "server-side routing" decision.
568
594
  *
569
595
  * Concurrency: FE has no `codeVersion`, so updates are last-writer-
570
- * wins by default. Pass `--expected-step-count <N>` to set
571
- * `If-Match-Step-Count`; the server rejects with 412 if the current
572
- * array length differs. Useful for defensive callers who want to
573
- * detect concurrent edits without a separate read.
596
+ * wins unless `--expected-step-count <N>` is passed, which sets
597
+ * `If-Match-Step-Count`; the server rejects with 412 if the array length
598
+ * differs.
574
599
  *
575
600
  * Idempotency: `cli-plan-put-<uuid>` is the default key, surfaced to
576
601
  * stderr so a transport retry can pin it.
@@ -594,7 +619,7 @@ interface UpdateOptions extends CommonOptions {
594
619
  /** Optional new description (`null` is reserved for "clear"; CLI surfaces both). */
595
620
  description?: string;
596
621
  /** Optional new priority. Enum-validated CLI-side. */
597
- priority?: CliCreatePriority;
622
+ priority?: string;
598
623
  /** Set the per-test timeout applied by the execution engine to every step. */
599
624
  stepTimeoutMs?: number;
600
625
  /** Clear the per-test step timeout and restore execution engine defaults. */
@@ -721,6 +746,15 @@ export declare function runDeleteBatch(opts: DeleteBatchOptions, deps?: TestDeps
721
746
  export interface CliPlanStep {
722
747
  type: 'action' | 'assertion';
723
748
  description: string;
749
+ /**
750
+ * Read-only view fields: structured steps carry the engine-level action
751
+ * the Portal recorded. Optional because older backends omit them; they are
752
+ * never part of a create / `plan put` request body.
753
+ */
754
+ action?: string;
755
+ selector?: string;
756
+ inputValue?: string;
757
+ structured?: boolean;
724
758
  }
725
759
  /**
726
760
  * Plan-from input file shape. Mirrors the body the controller accepts
@@ -737,7 +771,7 @@ export interface CliPlanInput {
737
771
  type: 'frontend' | 'backend';
738
772
  name: string;
739
773
  description?: string;
740
- priority?: CliCreatePriority;
774
+ priority?: string;
741
775
  planSteps: CliPlanStep[];
742
776
  }
743
777
  /**
@@ -775,7 +809,7 @@ export interface CliCreateFromPlanResponse extends CliCreateTestResponse {
775
809
  * Caveat: the pinned tag only resolves once that version is actually
776
810
  * released — a locally-built/pre-release checkout may see a 404 until then.
777
811
  */
778
- export declare const PLAN_SCHEMA_URL = "https://raw.githubusercontent.com/TestSprite/testsprite-cli/v0.14.0/schemas/plan.schema.json";
812
+ export declare const PLAN_SCHEMA_URL = "https://raw.githubusercontent.com/TestSprite/testsprite-cli/v0.16.0/schemas/plan.schema.json";
779
813
  /**
780
814
  * The SINGLE canonical example plan. This
781
815
  * exact value (via `PLAN_TEMPLATE_TEXT` below) is:
@@ -895,22 +929,6 @@ export interface CliCreateBatchRunResponse {
895
929
  export declare const DEFAULT_BATCH_RUN_CONCURRENCY = 50;
896
930
  /** Hard upper bound for --max-concurrency. Values above this are rejected with exit 5 (VALIDATION_ERROR). */
897
931
  export declare const MAX_BATCH_CONCURRENCY = 100;
898
- /**
899
- * The server's DEFAULT in-flight run cap. Runs from every source count
900
- * toward it (CLI, portal, schedules, CI), but only CLI run triggers are
901
- * refused on it; a portal or schedule run over the cap is not. Exceeding it
902
- * answers RATE_LIMITED with `details.reason: "inflight_cap"`, whose details
903
- * carry the account's real `cap` and `current`.
904
- *
905
- * Quoted in help text only — the server owns the real number and rejects on
906
- * its own value, so this is documentation, never a client-side gate.
907
- *
908
- * Distinct from `--max-concurrency`, whose meaning differs per command: on
909
- * `create --run` it bounds in-flight triggers, and with `--wait` a slot is
910
- * held until that run finishes, so lowering it there does bound how many runs
911
- * are in flight. On `run --all` it bounds the `--wait` poll fan-out only.
912
- */
913
- export declare const SERVER_INFLIGHT_RUN_CAP = 50;
914
932
  /** Client-side run-trigger throttle: 50 triggers per 60-second rolling window per key (sits just under the server's 60/min/key cap). */
915
933
  export declare const BATCH_RUN_RATE_LIMIT = 50;
916
934
  /** Rolling window duration (ms) for the client-side trigger rate throttle. */
@@ -948,15 +966,6 @@ export declare const WAIT_POLL_RATE_MAX_OUTER_RETRIES = 3;
948
966
  */
949
967
  export declare function sleepUntilOrInterrupt(ms: number, signal: AbortSignal | undefined, sleep: (ms: number, signal?: AbortSignal) => Promise<void>): Promise<void>;
950
968
  export declare function resolveRateLimitRetryMs(err: ApiError): number;
951
- /**
952
- * D3: max automatic retry attempts for deferred tests under `--wait`.
953
- * Each attempt is preceded by a Retry-After-aware sleep (server value if
954
- * present, else 61s default), clamped to the remaining `--timeout` budget.
955
- * Only active under `--wait`; the non-wait path is unchanged.
956
- */
957
- export declare const MAX_DEFERRED_RETRIES = 3;
958
- /** D3: default deferred-retry sleep when no Retry-After is available (ms). */
959
- export declare const DEFERRED_RETRY_DEFAULT_SLEEP_MS = 61000;
960
969
  /**
961
970
  * Returns `true` when a `RATE_LIMITED` error is the **transient per-minute**
962
971
  * rate limit from `RunRateLimiterGuard` — the one worth retrying.
@@ -1515,6 +1524,8 @@ interface RunTestRunOptions extends CommonOptions {
1515
1524
  * `TriggerRunBody.autoHeal` for why an explicit `true` is never sent.
1516
1525
  */
1517
1526
  autoHeal?: false;
1527
+ /** BE only: run just the named test without expanding the producer/teardown closure. */
1528
+ skipDependencies?: boolean;
1518
1529
  /**
1519
1530
  * Skip the pre-charge --target-url reachability preflight (zero
1520
1531
  * network calls). Also set by a delegating caller (`runCreate`/
@@ -1725,6 +1736,17 @@ export declare function makeBackendWaitFallback(args: {
1725
1736
  resolveNotBefore: (run: RunResponse) => string | undefined;
1726
1737
  onResolved?: (testId: string, status: CliPublicStatus) => void;
1727
1738
  }): (run: RunResponse, elapsedMs: number, signal: AbortSignal) => Promise<RunResponse | null>;
1739
+ /**
1740
+ * Render a `RunResponse` to human-readable text. JSON mode callers get
1741
+ * the wire envelope via `out.print`.
1742
+ *
1743
+ * Pass `isBackend: true` to suppress the per-step breakdown (BE tests are
1744
+ * atomic — no per-step breakdown exists; showing `0/0 (passed=0, failed=0)`
1745
+ * reads like a no-op rather than a passing/failing atomic result).
1746
+ */
1747
+ export declare function renderRunResponseText(run: RunResponse, { isBackend }?: {
1748
+ isBackend?: boolean;
1749
+ }): string;
1728
1750
  export declare function runTestRun(opts: RunTestRunOptions, deps?: TestDeps): Promise<TriggerRunResponse | RunResponse>;
1729
1751
  /** One row of the `test wait <run-id...>` multi-run payload. */
1730
1752
  export interface CliMultiWaitResult {
@@ -1812,7 +1834,7 @@ export declare function createTestCancelCommand(deps: TestDeps): Command;
1812
1834
  * codes match the `--wait` behavior matrix in the spec.
1813
1835
  */
1814
1836
  export declare function runTestWait(opts: RunTestWaitOptions, deps?: TestDeps): Promise<RunResponse>;
1815
- interface RunTestRunAllOptions extends CommonOptions {
1837
+ export interface RunTestRunAllOptions extends CommonOptions {
1816
1838
  environmentResolutionComplete?: boolean;
1817
1839
  cancelOnInterrupt?: boolean;
1818
1840
  timeoutIsDefault?: boolean;
@@ -1822,12 +1844,22 @@ interface RunTestRunAllOptions extends CommonOptions {
1822
1844
  projectId?: string;
1823
1845
  /** --filter <substr>: only run tests whose name contains this substring (case-insensitive). */
1824
1846
  nameFilter?: string;
1847
+ /** --status <list>: only run tests whose status (in `environment`, when set) is one of these. */
1848
+ statusFilter?: string;
1825
1849
  /** --wait: block until terminal or --timeout. */
1826
1850
  wait: boolean;
1827
1851
  /** Polling / overall deadline in seconds. Default 600, max 3600. */
1828
1852
  timeoutSeconds: number;
1829
1853
  /** --max-concurrency: bounds the --wait poll fan-out. */
1830
1854
  maxConcurrency: number;
1855
+ /** Internal CI policy. The public `ci run` entry point always enables wait. */
1856
+ ci?: {
1857
+ failOnSkipped?: boolean;
1858
+ /** How long `ci run` waits for the execution report before falling back to the local table. */
1859
+ executionReportTimeoutSeconds?: number;
1860
+ /** `--no-execution-report`: never read the report; the job summary is the local table. */
1861
+ executionReport?: boolean;
1862
+ };
1831
1863
  /** Caller-supplied idempotency token; auto-minted if absent. */
1832
1864
  idempotencyKey?: string;
1833
1865
  /** --report junit: write a JUnit XML sidecar after batch --wait completes. */
@@ -1853,14 +1885,41 @@ interface RunTestRunAllOptions extends CommonOptions {
1853
1885
  environment?: string;
1854
1886
  /** Per-run URL override for every frontend test in the batch. */
1855
1887
  targetUrl?: string;
1888
+ /**
1889
+ * `ci run`: `'all'` asks the server to seed every selected case into one
1890
+ * execution and pace dispatch itself, so a CI run is one execution (and,
1891
+ * with `previewName`, one environment row) instead of a first batch plus a
1892
+ * client-side retry. A backend that read the field echoes it; a missing
1893
+ * echo is refused the way an unconfirmed `targetUrl` is.
1894
+ */
1895
+ admission?: 'budget' | 'all';
1896
+ /** `ci run` in a pull request: run in a temporary clone of `environment` at `targetUrl`. */
1897
+ previewName?: string;
1898
+ /** `ci run` in GitHub Actions: where the run came from, for the Portal's PR link. */
1899
+ githubTrigger?: CiGithubTrigger;
1856
1900
  /** Skip the pre-charge target URL reachability probe. */
1857
1901
  skipPreflight?: boolean;
1902
+ /** See `RunTestRunOptions.skipDependencies`; sent on every dispatch leg. */
1903
+ skipDependencies?: boolean;
1904
+ /**
1905
+ * Run exactly these tests (`test run <id> <id> ...`) instead of a whole project.
1906
+ * Each id's project is read first and the ids are dispatched per project.
1907
+ */
1908
+ testIds?: string[];
1909
+ /** Tests whose type/project the caller already read, so the resolver does not read them again. */
1910
+ knownTests?: ReadonlyMap<string, Pick<CliTest, 'type' | 'projectId'>>;
1911
+ /**
1912
+ * Set by the explicit-ids resolver: each test's own project, for dashboard
1913
+ * links and the JUnit classname of a batch that spans several projects.
1914
+ */
1915
+ projectIdByTestId?: ReadonlyMap<string, string>;
1858
1916
  }
1859
1917
  export declare function writeBatchJUnitReportIfRequested(opts: {
1860
1918
  report?: JUnitReportFormat;
1861
1919
  reportFile?: string;
1862
1920
  reportSuiteName?: string;
1863
1921
  projectId?: string;
1922
+ projectIdByTestId?: ReadonlyMap<string, string>;
1864
1923
  }, results: readonly (JUnitTestResult & {
1865
1924
  createdAt?: string | null;
1866
1925
  startedAt?: string | null;
@@ -1885,6 +1944,7 @@ interface RunTestRunLocalBatchOptions extends CommonOptions {
1885
1944
  all: boolean;
1886
1945
  projectId?: string;
1887
1946
  nameFilter?: string;
1947
+ statusFilter?: string;
1888
1948
  localPort?: number;
1889
1949
  localHost?: LoopbackHost;
1890
1950
  skipPreflight: boolean;
@@ -1901,6 +1961,10 @@ interface RunTestRunLocalBatchOptions extends CommonOptions {
1901
1961
  allowEmpty: boolean;
1902
1962
  autoHeal?: false;
1903
1963
  environment?: string;
1964
+ /** See `RunTestRunOptions.skipDependencies`; forwarded to every dispatch. */
1965
+ skipDependencies?: boolean;
1966
+ /** `--timeout` was not given: a batch run that needs no tunnel uses the ordinary default. */
1967
+ timeoutIsDefault?: boolean;
1904
1968
  }
1905
1969
  /** One bounded trigger-and-wait pool shares one local tunnel for its full lifetime. */
1906
1970
  export declare function runTestRunLocalBatch(opts: RunTestRunLocalBatchOptions, deps?: TestDeps): Promise<void>;
@@ -1988,6 +2052,11 @@ export declare function resolveWaitRequestTimeoutMs(opts: {
1988
2052
  }): number | undefined;
1989
2053
  /** A presigned `code` body is any `https://` URL — never anything else. */
1990
2054
  export declare function isPresignedCodeUrl(code: string): boolean;
2055
+ export declare function renderTestListText(page: Page<CliTest>, options?: {
2056
+ columns?: string;
2057
+ noHeader?: boolean;
2058
+ environment?: string;
2059
+ }): string;
1991
2060
  interface PlanGenerateOptions extends CommonOptions {
1992
2061
  projectId?: string;
1993
2062
  timeoutSeconds: number;