@testsprite/testsprite-cli 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -156,6 +156,7 @@ Prefer to configure each step by hand (or learn the surface offline with `--dry-
156
156
  - 🤖 **Agent-shaped output.** `test failure get` returns **one bundle** — the failing step, its neighbors, screenshots, DOM snapshots, the test source, a root-cause hypothesis, and a recommended fix target — all sharing a single `snapshotId`. The CLI _refuses_ to stitch data from two different runs, so an agent never reasons over a frankenstein context.
157
157
  - ♻️ **A loop, not a one-shot.** `create → run → failure get → fix → rerun` — every pass is banked, not thrown away.
158
158
  - 📐 **Scriptable & deterministic.** Stable `--output json` contract, predictable [exit codes](./DOCUMENTATION.md#exit-codes), and a `--dry-run` that exercises the full code path offline with canned data.
159
+ - 🚦 **CI-native.** On GitHub Actions, `--wait` runs annotate the PR checks tab with one `::error::` per failure and append a results table to the job summary — automatically. Add `--report junit` for a JUnit XML sidecar, `--summary-file` for a machine summary, or `--gh-output` to preview the annotations locally. [Details →](./DOCUMENTATION.md#run-commands)
159
160
  - 🔌 **One command to onboard your agent.** `testsprite agent install claude` drops a ready-made skill file into your repo so your coding agent knows how to drive the loop on its own.
160
161
 
161
162
  ## How it works
@@ -359,6 +359,18 @@ export interface CliCreateTestResponse {
359
359
  * still succeeded.
360
360
  */
361
361
  warnings?: string[];
362
+ /**
363
+ * Server-built Portal deep link for the created test (DEV-737). Same
364
+ * presence/absence contract as `RunResponse.dashboardUrl`
365
+ * (`withRunDashboardUrl` below): PRESENT (string or falsy) on a backend
366
+ * that resolved the question at all — a falsy value means "there is no
367
+ * correct link for this test" (e.g. a V3-native create with no DynamoDB
368
+ * mirror row for the client's V2-shaped guess to land on) and must never
369
+ * be replaced by the client fallback; ABSENT on an older backend that
370
+ * predates this field, which safely reopens the client fallback via
371
+ * `resolveDashboardUrl` below. See that function's doc for the reasoning.
372
+ */
373
+ dashboardUrl?: string | null;
362
374
  }
363
375
  export declare const CLI_CREATE_PRIORITIES: readonly ["p0", "p1", "p2", "p3"];
364
376
  export type CliCreatePriority = (typeof CLI_CREATE_PRIORITIES)[number];
@@ -671,7 +683,7 @@ export interface CliCreateFromPlanResponse extends CliCreateTestResponse {
671
683
  * Caveat: the pinned tag only resolves once that version is actually
672
684
  * released — a locally-built/pre-release checkout may see a 404 until then.
673
685
  */
674
- export declare const PLAN_SCHEMA_URL = "https://raw.githubusercontent.com/TestSprite/testsprite-cli/v0.5.0/schemas/plan.schema.json";
686
+ export declare const PLAN_SCHEMA_URL = "https://raw.githubusercontent.com/TestSprite/testsprite-cli/v0.6.0/schemas/plan.schema.json";
675
687
  /**
676
688
  * The SINGLE canonical example plan. This
677
689
  * exact value (via `PLAN_TEMPLATE_TEXT` below) is:
@@ -718,6 +730,12 @@ export interface CliBatchSpecResult {
718
730
  message: string;
719
731
  field?: string;
720
732
  };
733
+ /**
734
+ * Server-built Portal deep link for this created item (DEV-737). Same
735
+ * presence/absence contract as `CliCreateTestResponse.dashboardUrl` —
736
+ * see that field's doc.
737
+ */
738
+ dashboardUrl?: string | null;
721
739
  }
722
740
  export interface CliCreateBatchResponse {
723
741
  results: CliBatchSpecResult[];
@@ -751,6 +769,13 @@ export interface CliBatchRunResult {
751
769
  message: string;
752
770
  exitCode: number;
753
771
  };
772
+ /**
773
+ * Portal deep link (R3b), threaded through from the SAME per-item
774
+ * create-time decision `test create-batch`'s own output carries — never
775
+ * recomputed at run time. Absent when unresolvable OR explicitly
776
+ * suppressed by the server (see `resolveDashboardUrl`'s doc).
777
+ */
778
+ dashboardUrl?: string;
754
779
  }
755
780
  /** Envelope emitted by `test create-batch --run` in JSON mode. */
756
781
  export interface CliCreateBatchRunResponse {
@@ -1368,6 +1393,14 @@ interface RunTestRunOptions extends CommonOptions {
1368
1393
  */
1369
1394
  timeoutIsDefault?: boolean;
1370
1395
  idempotencyKey?: string;
1396
+ /**
1397
+ * --gh-output: force the GitHub-native output layer (::error:: annotations +
1398
+ * job-summary table) even off-Actions. On the single-test `--wait` path the
1399
+ * result is reduced to a one-row CI summary (`summarizeSingleRun`).
1400
+ */
1401
+ ghOutput?: boolean;
1402
+ /** --summary-file: also write the reduced machine summary JSON to this path. */
1403
+ summaryFile?: string;
1371
1404
  /**
1372
1405
  * Per codex round-1 P1: when chained from `test create --run`, the caller
1373
1406
  * passes the create response here so `runTestRun` can emit a single merged
@@ -1449,6 +1482,13 @@ interface RunTestRerunOptions extends CommonOptions {
1449
1482
  reportFile?: string;
1450
1483
  /** --report-suite-name: optional override for the JUnit <testsuite name=...>. */
1451
1484
  reportSuiteName?: string;
1485
+ /**
1486
+ * --gh-output: force the GitHub-native output layer (::error:: annotations +
1487
+ * job-summary table) on the batch-rerun `--wait` result, even off-Actions.
1488
+ */
1489
+ ghOutput?: boolean;
1490
+ /** --summary-file: also write the reduced machine summary JSON to this path. */
1491
+ summaryFile?: string;
1452
1492
  }
1453
1493
  /**
1454
1494
  * Decide whether a testId-scoped result belongs to THIS run (vs a stale