@testsprite/testsprite-cli 0.14.0 → 0.15.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 (40) hide show
  1. package/README.md +3 -1
  2. package/dist/commands/ci.d.ts +66 -17
  3. package/dist/commands/ci.js +466 -104
  4. package/dist/commands/doctor.d.ts +3 -0
  5. package/dist/commands/doctor.js +50 -9
  6. package/dist/commands/init.js +17 -3
  7. package/dist/commands/project.js +15 -1
  8. package/dist/commands/test.d.ts +74 -11
  9. package/dist/commands/test.js +579 -112
  10. package/dist/index.js +5 -1
  11. package/dist/lib/agent-targets.d.ts +8 -3
  12. package/dist/lib/agent-targets.js +15 -4
  13. package/dist/lib/ci-run.d.ts +11 -0
  14. package/dist/lib/ci-run.js +34 -0
  15. package/dist/lib/client-factory.d.ts +23 -0
  16. package/dist/lib/client-factory.js +7 -6
  17. package/dist/lib/config.d.ts +1 -0
  18. package/dist/lib/config.js +1 -1
  19. package/dist/lib/credentials.d.ts +0 -1
  20. package/dist/lib/credentials.js +51 -14
  21. package/dist/lib/dry-run/samples.js +42 -1
  22. package/dist/lib/first-suite-hint.d.ts +55 -0
  23. package/dist/lib/first-suite-hint.js +101 -0
  24. package/dist/lib/gh-output.d.ts +62 -4
  25. package/dist/lib/gh-output.js +149 -7
  26. package/dist/lib/github-context.d.ts +21 -0
  27. package/dist/lib/github-context.js +153 -0
  28. package/dist/lib/http.d.ts +10 -1
  29. package/dist/lib/http.js +9 -1
  30. package/dist/lib/plans.types.d.ts +1 -1
  31. package/dist/lib/response-schemas.d.ts +5 -1
  32. package/dist/lib/response-schemas.js +54 -0
  33. package/dist/lib/runs.types.d.ts +106 -0
  34. package/dist/lib/telemetry.d.ts +25 -1
  35. package/dist/lib/telemetry.js +45 -4
  36. package/dist/version.d.ts +1 -1
  37. package/dist/version.js +1 -1
  38. package/package.json +1 -1
  39. package/schemas/plan.schema.json +2 -2
  40. package/skills/testsprite-ci.skill.md +154 -0
@@ -16,6 +16,7 @@
16
16
  */
17
17
  import { Command } from 'commander';
18
18
  import { type CommonOptions as FactoryCommonOptions } from '../lib/client-factory.js';
19
+ import { loadConfig } from '../lib/config.js';
19
20
  import type { FetchImpl } from '../lib/http.js';
20
21
  export type DoctorStatus = 'ok' | 'warn' | 'fail';
21
22
  export interface DoctorCheck {
@@ -44,6 +45,8 @@ export interface DoctorDeps {
44
45
  nodeVersion?: string;
45
46
  existsSync?: (p: string) => boolean;
46
47
  readFileSync?: (p: string) => string;
48
+ /** Config resolver. Defaults to `loadConfig`; injectable for tests. */
49
+ loadConfigFn?: typeof loadConfig;
47
50
  }
48
51
  type CommonOptions = FactoryCommonOptions;
49
52
  export declare function runDoctor(opts: CommonOptions, deps?: DoctorDeps): Promise<DoctorReport>;
@@ -16,7 +16,7 @@
16
16
  */
17
17
  import { Command } from 'commander';
18
18
  import { assertValidEndpointUrl, makeHttpClient, } from '../lib/client-factory.js';
19
- import { loadConfig, resolveProfileName } from '../lib/config.js';
19
+ import { loadConfig, resolveProfileName, DEFAULT_API_URL, normalizeEnvVar, } from '../lib/config.js';
20
20
  import { ApiError, CLIError, InterruptError, RequestTimeoutError, localValidationError, } from '../lib/errors.js';
21
21
  import { globalShutdown } from '../lib/interrupt.js';
22
22
  import { formatOrgBinding, formatOrgsSummary, formatPersonalScopeHint } from '../lib/org-render.js';
@@ -31,25 +31,46 @@ export async function runDoctor(opts, deps = {}) {
31
31
  const env = deps.env ?? process.env;
32
32
  const cwd = deps.cwd ?? process.cwd();
33
33
  const nodeVersion = deps.nodeVersion ?? process.versions.node;
34
- const config = loadConfig({
35
- profile: opts.profile,
36
- endpointUrl: opts.endpointUrl,
37
- env,
38
- credentialsPath: deps.credentialsPath,
39
- });
34
+ const loadConfigFn = deps.loadConfigFn ?? loadConfig;
35
+ let config;
36
+ // Set when the credentials file exists but the OS refuses the read (e.g. a
37
+ // Windows ACL locked out by an affected CLI version): degrade, don't crash.
38
+ let credentialsReadError;
39
+ try {
40
+ config = loadConfigFn({
41
+ profile: opts.profile,
42
+ endpointUrl: opts.endpointUrl,
43
+ env,
44
+ credentialsPath: deps.credentialsPath,
45
+ });
46
+ }
47
+ catch (error) {
48
+ if (!isFsPermissionError(error))
49
+ throw error;
50
+ credentialsReadError = error.code;
51
+ config = {
52
+ profile: resolveProfileName(opts.profile, env),
53
+ apiUrl: opts.endpointUrl ?? normalizeEnvVar(env.TESTSPRITE_API_URL) ?? DEFAULT_API_URL,
54
+ apiKey: normalizeEnvVar(env.TESTSPRITE_API_KEY),
55
+ };
56
+ }
40
57
  const endpointCheck = checkEndpoint(config.apiUrl);
41
58
  const hasKey = Boolean(config.apiKey);
42
59
  const stderr = deps.stderr ?? ((line) => process.stderr.write(`${line}\n`));
43
60
  const connectivity = await checkConnectivity(opts, deps, {
44
61
  hasKey,
45
62
  endpointOk: endpointCheck.status === 'ok',
63
+ // Pass the already-resolved config down so the client below never re-reads
64
+ // the credentials file — with an ACL-bricked file a second read throws the
65
+ // same EPERM and surfaces as a bogus Connectivity failure.
66
+ config,
46
67
  });
47
68
  const checks = [
48
69
  { name: 'CLI version', status: 'ok', detail: VERSION },
49
70
  checkNodeVersion(nodeVersion),
50
71
  { name: 'Profile', status: 'ok', detail: config.profile },
51
72
  endpointCheck,
52
- checkCredentials(hasKey, config.profile, opts.dryRun ?? false),
73
+ checkCredentials(hasKey, config.profile, opts.dryRun ?? false, credentialsReadError),
53
74
  connectivity.check,
54
75
  ];
55
76
  // Informational routing line, only when the backend reported it (no new call).
@@ -81,6 +102,7 @@ export async function runDoctor(opts, deps = {}) {
81
102
  checks.push(await checkLocalTunnel(opts, deps, {
82
103
  hasKey,
83
104
  endpointOk: endpointCheck.status === 'ok',
105
+ config,
84
106
  }));
85
107
  checks.push(checkSkill(cwd, deps));
86
108
  const failures = checks.filter(check => check.status === 'fail').length;
@@ -98,6 +120,14 @@ export async function runDoctor(opts, deps = {}) {
98
120
  }
99
121
  return report;
100
122
  }
123
+ /** True for EPERM/EACCES fs errors — the signature of an unreadable credentials file. */
124
+ function isFsPermissionError(error) {
125
+ return (typeof error === 'object' &&
126
+ error !== null &&
127
+ 'code' in error &&
128
+ (error.code === 'EPERM' ||
129
+ error.code === 'EACCES'));
130
+ }
101
131
  function checkNodeVersion(nodeVersion) {
102
132
  // Reuse the CLI runtime guard so doctor and startup enforce and describe the same range.
103
133
  const rejected = shouldRejectNodeVersion(nodeVersion);
@@ -122,7 +152,16 @@ function checkEndpoint(apiUrl) {
122
152
  };
123
153
  }
124
154
  }
125
- function checkCredentials(hasKey, profile, dryRun) {
155
+ function checkCredentials(hasKey, profile, dryRun, readError) {
156
+ if (readError) {
157
+ return {
158
+ name: 'Credentials',
159
+ status: hasKey ? 'warn' : 'fail',
160
+ detail: `credentials file exists but cannot be read (${readError}); its ACL may be locked out ` +
161
+ 'by an earlier CLI version — delete the file and re-run `testsprite setup`' +
162
+ (hasKey ? ' (TESTSPRITE_API_KEY is set, so commands still work)' : ''),
163
+ };
164
+ }
126
165
  if (hasKey) {
127
166
  // Never print any part of the key (security). Confirm presence only.
128
167
  return {
@@ -167,6 +206,7 @@ async function checkConnectivity(opts, deps, ctx) {
167
206
  credentialsPath: deps.credentialsPath,
168
207
  fetchImpl: deps.fetchImpl,
169
208
  stderr: deps.stderr,
209
+ config: ctx.config,
170
210
  shutdownSignal: deps.shutdownSignal,
171
211
  });
172
212
  const me = await client.get('/me', { schema: ME_IDENTITY_SCHEMA });
@@ -238,6 +278,7 @@ async function checkLocalTunnel(opts, deps, ctx) {
238
278
  credentialsPath: deps.credentialsPath,
239
279
  fetchImpl: deps.fetchImpl,
240
280
  stderr: deps.stderr,
281
+ config: ctx.config,
241
282
  // The retry sleeper listens to the client shutdown signal. Compose
242
283
  // the probe deadline with process shutdown so either aborts the fetch.
243
284
  shutdownSignal: controller.signal,
@@ -501,7 +501,11 @@ function renderInitText(data) {
501
501
  lines.push('');
502
502
  if (s.agent) {
503
503
  lines.push(' # 2. Generate tests: ask your coding agent (the testsprite-onboard skill is installed),');
504
- lines.push(' # or create one yourself, then run them (use the projectId from step 1):');
504
+ lines.push(' # or have TestSprite propose them directly (uses credits), review them, then accept:');
505
+ lines.push(' testsprite test plan generate --project <projectId>');
506
+ lines.push(' testsprite test plan accept --project <projectId>');
507
+ lines.push('');
508
+ lines.push(' # 3. Run them (use the projectId from step 1):');
505
509
  lines.push(' testsprite test run --all --project <projectId>');
506
510
  lines.push('');
507
511
  lines.push(' # Manage installed agent skills');
@@ -509,8 +513,18 @@ function renderInitText(data) {
509
513
  lines.push(' testsprite agent install --target=<t> # re-install or install additional targets');
510
514
  }
511
515
  else {
512
- lines.push(' # 2. Create a test, then run it (use the projectId from step 1):');
513
- lines.push(' testsprite test create --project <projectId> ...');
516
+ // Without an agent, this is the only place a new user learns that
517
+ // TestSprite can propose the first suite. Printing this runs and charges
518
+ // nothing; generating does use credits, which the line says. The
519
+ // hand-authored path stays visible as the fallback.
520
+ lines.push(' # 2. Let TestSprite propose your first tests (uses credits), review them, then accept:');
521
+ lines.push(' # Backend project? Upload your API spec first:');
522
+ lines.push(' # testsprite project docs upload ./openapi.yaml --project <projectId>');
523
+ lines.push(' testsprite test plan generate --project <projectId>');
524
+ lines.push(' testsprite test plan accept --project <projectId>');
525
+ lines.push(' # Prefer to write one yourself: testsprite test create --plan-template');
526
+ lines.push('');
527
+ lines.push(' # 3. Run them (use the projectId from step 1):');
514
528
  lines.push(' testsprite test run --all --project <projectId>');
515
529
  lines.push(' # Tip: `testsprite agent install` sets up the onboarding skill for your coding agent');
516
530
  lines.push('');
@@ -6,6 +6,7 @@ import { Command, Option } from 'commander';
6
6
  import { emitDryRunBanner, makeHttpClient, parseRequestTimeoutFlag, resolveRequestTimeoutMs, } from '../lib/client-factory.js';
7
7
  import { resolveProfileName } from '../lib/config.js';
8
8
  import { ApiError, InterruptError, RequestTimeoutError } from '../lib/errors.js';
9
+ import { firstSuiteNextSteps } from '../lib/first-suite-hint.js';
9
10
  import { globalShutdown } from '../lib/interrupt.js';
10
11
  import { assertStoredLocalTargetListening, buildLocalTargetUrl, parseStoredLocalTarget, } from '../lib/local-target.js';
11
12
  import { GLOBAL_OPTS_HINT, Output, resolveOutputMode } from '../lib/output.js';
@@ -252,6 +253,15 @@ export async function runCreate(opts, deps = {}) {
252
253
  `no-target-resolvable until one is set. Fix: testsprite project update ` +
253
254
  `${resolvedId ?? '<project-id>'} --url <url>`);
254
255
  }
256
+ // A new project with no tests is where activation stalls. Point at
257
+ // the generate -> accept path (text mode only: a JSON caller already holds
258
+ // the id; --dry-run returned above, its id is the canned sample). Printed
259
+ // after the URL advisory so a fix-first warning is never buried below it.
260
+ // A --local project is skipped: its record above already ends with the
261
+ // hand-written-plan next steps.
262
+ if (opts.output !== 'json' && resolvedId !== undefined && !localTarget) {
263
+ stderr(firstSuiteNextSteps(resolvedId, opts.type));
264
+ }
255
265
  return created;
256
266
  }
257
267
  /** Resolve the updated project's id regardless of which field name the backend used. */
@@ -1366,7 +1376,11 @@ function renderCreateProjectText(p, localTarget) {
1366
1376
  if (localTarget) {
1367
1377
  const projectId = resolveCreatedProjectId(p) ?? '<project-id>';
1368
1378
  const url = buildLocalTargetUrl(localTarget.host, localTarget.port);
1369
- lines.push(`Local project: TestSprite will reach ${url} only through a tunnel from this machine.`, 'Next: write a plan and run it locally:', ` In plan.json, set projectId to ${projectId}.`, ` testsprite test create --project ${projectId} --plan-from plan.json`, ' testsprite test run <test-id>', `Portal runs of this project stay blocked (free) until you set a public URL with: testsprite project update ${projectId} --url https://...`);
1379
+ lines.push(`Local project: TestSprite will reach ${url} only through a tunnel from this machine.`, 'Next: write a plan and run it locally:',
1380
+ // The only next step a --local project gets (it has no first-suite hint),
1381
+ // so it names how to get a plan file. `--plan-from` takes the project from
1382
+ // the file and ignores `--project`, hence "set projectId" and no flag.
1383
+ ' testsprite test create --plan-template > plan.json', ` In plan.json, set projectId to ${projectId} and edit the steps.`, ' testsprite test create --plan-from plan.json', ' testsprite test run <test-id>', `Portal runs of this project stay blocked (free) until you set a public URL with: testsprite project update ${projectId} --url https://...`);
1370
1384
  }
1371
1385
  return lines.join('\n');
1372
1386
  }
@@ -9,7 +9,7 @@ import type { FetchImpl } from '../lib/http.js';
9
9
  import { type Page } from '../lib/pagination.js';
10
10
  import { type WaitTimeoutTelemetry } from '../lib/telemetry.js';
11
11
  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';
12
+ import type { RunResponse, RunStatus, TriggerRunResponse, RerunResponse, BatchRerunResponse, ListRunsResponse, RunSource, BatchRunFreshResponse, CancelRunResponse, CiGithubTrigger, RunEnvironmentRef } from '../lib/runs.types.js';
13
13
  import { type LoopbackHost } from '../lib/local-target.js';
14
14
  import { type TunnelClientHandle } from '../lib/tunnel-session.js';
15
15
  import { type TunnelClientOptions } from '../vendor/tunnel-client/index.js';
@@ -49,6 +49,11 @@ export interface CliTest {
49
49
  projectName?: string | null;
50
50
  name: string;
51
51
  type: 'frontend' | 'backend';
52
+ /**
53
+ * Assembled integration test (backend). Absent on older backends — treated
54
+ * as false. Listed as `backend/int` so it is not mistaken for a plain test.
55
+ */
56
+ isIntegration?: boolean;
52
57
  createdFrom: 'portal' | 'mcp' | 'cli';
53
58
  status: CliPublicStatus;
54
59
  statusByEnvironment?: Array<{
@@ -85,7 +90,7 @@ export interface CliTest {
85
90
  */
86
91
  details?: Partial<CliTestStatusDetails>;
87
92
  /**
88
- * G1a — test priority label, e.g. "p0" | "p1" | "p2" | "p3".
93
+ * G1a — test priority label as stored ("High" | "Medium" | "Low").
89
94
  * Optional on the wire: pre-G1a backends omit the field; `null` means
90
95
  * no priority has been set. Text mode surfaces it only when truthy.
91
96
  */
@@ -456,6 +461,14 @@ export interface CliCreateTestResponse {
456
461
  }
457
462
  export declare const CLI_CREATE_PRIORITIES: readonly ["p0", "p1", "p2", "p3"];
458
463
  export type CliCreatePriority = (typeof CLI_CREATE_PRIORITIES)[number];
464
+ /** Priority spellings accepted as input; reads return High/Medium/Low. */
465
+ export declare const CLI_PRIORITY_INPUTS: readonly ["p0", "p1", "p2", "p3", "high", "medium", "low"];
466
+ /**
467
+ * Normalise a priority input (p0-p3 or high/medium/low, any case) to the
468
+ * p0/p1/p2 wire value every backend accepts; p3 folds into p2 (Low).
469
+ * Returns undefined for anything else.
470
+ */
471
+ export declare function normalizePriority(raw: unknown): 'p0' | 'p1' | 'p2' | undefined;
459
472
  interface CreateOptions extends CommonOptions {
460
473
  noWait?: boolean;
461
474
  environment?: string;
@@ -463,7 +476,7 @@ interface CreateOptions extends CommonOptions {
463
476
  type: 'frontend' | 'backend';
464
477
  name: string;
465
478
  description?: string;
466
- priority?: CliCreatePriority;
479
+ priority?: string;
467
480
  /** Per-test timeout applied by the execution engine to every step. */
468
481
  stepTimeoutMs?: number;
469
482
  /** Source path to the test code. Read into memory; capped at 350 KB. */
@@ -544,6 +557,12 @@ interface PlanPutOptions extends CommonOptions {
544
557
  * `codeVersion`, so this is the only consistency knob.
545
558
  */
546
559
  expectedStepCount?: number;
560
+ /**
561
+ * Replace even when the server would drop structured fields
562
+ * (action / selector / inputValue) from steps whose text changed. Also
563
+ * skips the default step-count fence.
564
+ */
565
+ force?: boolean;
547
566
  /** Caller-supplied idempotency token; UUIDv4 minted client-side if absent. */
548
567
  idempotencyKey?: string;
549
568
  /**
@@ -567,10 +586,9 @@ interface PlanPutOptions extends CommonOptions {
567
586
  * trip and matches the piece-6 spec's "server-side routing" decision.
568
587
  *
569
588
  * 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.
589
+ * wins unless `--expected-step-count <N>` is passed, which sets
590
+ * `If-Match-Step-Count`; the server rejects with 412 if the array length
591
+ * differs.
574
592
  *
575
593
  * Idempotency: `cli-plan-put-<uuid>` is the default key, surfaced to
576
594
  * stderr so a transport retry can pin it.
@@ -594,7 +612,7 @@ interface UpdateOptions extends CommonOptions {
594
612
  /** Optional new description (`null` is reserved for "clear"; CLI surfaces both). */
595
613
  description?: string;
596
614
  /** Optional new priority. Enum-validated CLI-side. */
597
- priority?: CliCreatePriority;
615
+ priority?: string;
598
616
  /** Set the per-test timeout applied by the execution engine to every step. */
599
617
  stepTimeoutMs?: number;
600
618
  /** Clear the per-test step timeout and restore execution engine defaults. */
@@ -721,6 +739,15 @@ export declare function runDeleteBatch(opts: DeleteBatchOptions, deps?: TestDeps
721
739
  export interface CliPlanStep {
722
740
  type: 'action' | 'assertion';
723
741
  description: string;
742
+ /**
743
+ * Read-only view fields: structured steps carry the engine-level action
744
+ * the Portal recorded. Optional because older backends omit them; they are
745
+ * never part of a create / `plan put` request body.
746
+ */
747
+ action?: string;
748
+ selector?: string;
749
+ inputValue?: string;
750
+ structured?: boolean;
724
751
  }
725
752
  /**
726
753
  * Plan-from input file shape. Mirrors the body the controller accepts
@@ -737,7 +764,7 @@ export interface CliPlanInput {
737
764
  type: 'frontend' | 'backend';
738
765
  name: string;
739
766
  description?: string;
740
- priority?: CliCreatePriority;
767
+ priority?: string;
741
768
  planSteps: CliPlanStep[];
742
769
  }
743
770
  /**
@@ -775,7 +802,7 @@ export interface CliCreateFromPlanResponse extends CliCreateTestResponse {
775
802
  * Caveat: the pinned tag only resolves once that version is actually
776
803
  * released — a locally-built/pre-release checkout may see a 404 until then.
777
804
  */
778
- export declare const PLAN_SCHEMA_URL = "https://raw.githubusercontent.com/TestSprite/testsprite-cli/v0.14.0/schemas/plan.schema.json";
805
+ export declare const PLAN_SCHEMA_URL = "https://raw.githubusercontent.com/TestSprite/testsprite-cli/v0.15.0/schemas/plan.schema.json";
779
806
  /**
780
807
  * The SINGLE canonical example plan. This
781
808
  * exact value (via `PLAN_TEMPLATE_TEXT` below) is:
@@ -1725,6 +1752,17 @@ export declare function makeBackendWaitFallback(args: {
1725
1752
  resolveNotBefore: (run: RunResponse) => string | undefined;
1726
1753
  onResolved?: (testId: string, status: CliPublicStatus) => void;
1727
1754
  }): (run: RunResponse, elapsedMs: number, signal: AbortSignal) => Promise<RunResponse | null>;
1755
+ /**
1756
+ * Render a `RunResponse` to human-readable text. JSON mode callers get
1757
+ * the wire envelope via `out.print`.
1758
+ *
1759
+ * Pass `isBackend: true` to suppress the per-step breakdown (BE tests are
1760
+ * atomic — no per-step breakdown exists; showing `0/0 (passed=0, failed=0)`
1761
+ * reads like a no-op rather than a passing/failing atomic result).
1762
+ */
1763
+ export declare function renderRunResponseText(run: RunResponse, { isBackend }?: {
1764
+ isBackend?: boolean;
1765
+ }): string;
1728
1766
  export declare function runTestRun(opts: RunTestRunOptions, deps?: TestDeps): Promise<TriggerRunResponse | RunResponse>;
1729
1767
  /** One row of the `test wait <run-id...>` multi-run payload. */
1730
1768
  export interface CliMultiWaitResult {
@@ -1812,7 +1850,7 @@ export declare function createTestCancelCommand(deps: TestDeps): Command;
1812
1850
  * codes match the `--wait` behavior matrix in the spec.
1813
1851
  */
1814
1852
  export declare function runTestWait(opts: RunTestWaitOptions, deps?: TestDeps): Promise<RunResponse>;
1815
- interface RunTestRunAllOptions extends CommonOptions {
1853
+ export interface RunTestRunAllOptions extends CommonOptions {
1816
1854
  environmentResolutionComplete?: boolean;
1817
1855
  cancelOnInterrupt?: boolean;
1818
1856
  timeoutIsDefault?: boolean;
@@ -1828,6 +1866,14 @@ interface RunTestRunAllOptions extends CommonOptions {
1828
1866
  timeoutSeconds: number;
1829
1867
  /** --max-concurrency: bounds the --wait poll fan-out. */
1830
1868
  maxConcurrency: number;
1869
+ /** Internal CI policy. The public `ci run` entry point always enables wait. */
1870
+ ci?: {
1871
+ failOnSkipped?: boolean;
1872
+ /** How long `ci run` waits for the execution report before falling back to the local table. */
1873
+ executionReportTimeoutSeconds?: number;
1874
+ /** `--no-execution-report`: never read the report; the job summary is the local table. */
1875
+ executionReport?: boolean;
1876
+ };
1831
1877
  /** Caller-supplied idempotency token; auto-minted if absent. */
1832
1878
  idempotencyKey?: string;
1833
1879
  /** --report junit: write a JUnit XML sidecar after batch --wait completes. */
@@ -1853,6 +1899,18 @@ interface RunTestRunAllOptions extends CommonOptions {
1853
1899
  environment?: string;
1854
1900
  /** Per-run URL override for every frontend test in the batch. */
1855
1901
  targetUrl?: string;
1902
+ /**
1903
+ * `ci run`: `'all'` asks the server to seed every selected case into one
1904
+ * execution and pace dispatch itself, so a CI run is one execution (and,
1905
+ * with `previewName`, one environment row) instead of a first batch plus a
1906
+ * client-side retry. A backend that read the field echoes it; a missing
1907
+ * echo is refused the way an unconfirmed `targetUrl` is.
1908
+ */
1909
+ admission?: 'budget' | 'all';
1910
+ /** `ci run` in a pull request: run in a temporary clone of `environment` at `targetUrl`. */
1911
+ previewName?: string;
1912
+ /** `ci run` in GitHub Actions: where the run came from, for the Portal's PR link. */
1913
+ githubTrigger?: CiGithubTrigger;
1856
1914
  /** Skip the pre-charge target URL reachability probe. */
1857
1915
  skipPreflight?: boolean;
1858
1916
  }
@@ -1988,6 +2046,11 @@ export declare function resolveWaitRequestTimeoutMs(opts: {
1988
2046
  }): number | undefined;
1989
2047
  /** A presigned `code` body is any `https://` URL — never anything else. */
1990
2048
  export declare function isPresignedCodeUrl(code: string): boolean;
2049
+ export declare function renderTestListText(page: Page<CliTest>, options?: {
2050
+ columns?: string;
2051
+ noHeader?: boolean;
2052
+ environment?: string;
2053
+ }): string;
1991
2054
  interface PlanGenerateOptions extends CommonOptions {
1992
2055
  projectId?: string;
1993
2056
  timeoutSeconds: number;