From 4711102b898a17aa4dce3f0de96e0ee8ceaa9228 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 24 Oct 2026 06:39:51 +0000 Subject: [PATCH] chore: sync MCP source from the monorepo at 9c6599e Published by release/2026-10-23-001. Previous sync: a1ac39f7c15ff0be510d426b1392e4e0ff5a8797. --- README.md | 12 ++++----- mcp-server/.synced-from | 2 +- mcp-server/src/server.ts | 6 ++--- .../tools/evidence/create-evidence-links.ts | 2 +- skills/browser-evidence/SKILL.md | 18 ++++++------- skills/collect-evidence/SKILL.md | 26 +++++++++---------- .../references/instrumentation.md | 6 ++--- skills/fix-failing-tests/SKILL.md | 2 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 352e9be..727f257 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Give your AI coding agents full visibility into your CI test results. The Curren | `currents-get-context` | Call this first to find out why tests failed in CI, or to fix them: returns the errors, steps and files of the failed tests of a run, a spec file (instance) or one test — the same content as Fix in the Currents dashboard. | | `currents-get-errors-explorer` | Get aggregated error metrics for a project within a date range. | | `currents-get-test-evidence` | Collect evidence artifacts (screenshots, videos, traces, attachments) produced by tests in a CI run, with signed download URLs grouped per test. | -| `currents-create-evidence-links` | Create a shareable link to a test attempt's evidence, served from its Playwright trace, and the URLs onto it: a markdown digest of what the attempt did and what failed, a filmstrip, an animated screencast, DOM snapshots, network requests and attachments. | +| `currents-create-evidence-links` | Create a shareable trace API link to a test attempt's evidence, served from its Playwright trace, and the URLs onto it: a markdown trace summary (the `digest` URL) of what the attempt did and what failed, a filmstrip, an animated screencast, DOM snapshots, network requests and attachments. | | `currents-create-session` | Record a browser session you drove as a Currents session, so its evidence can be read and shared. | | `currents-add-attachments` | Add attachments to a session from currents-create-session (send sessionId), or to a CI run (send runId): logs for a spec file, a test, or the run itself. | | `currents-list-webhooks` | List all webhooks for a project. | @@ -63,11 +63,11 @@ Give your AI coding agents full visibility into your CI test results. The Curren Agent skills that teach AI agents multi-step Currents workflows. -| Skill | Description | -| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [`browser-evidence`](skills/browser-evidence) | Experimental: prove a change works in a browser you drove yourself, when there is no test to run. | -| [`collect-evidence`](skills/collect-evidence) | Show that work you implemented actually works, or demo it, from tests that ran in CI via Currents — a trace link whose digest, filmstrip and accessibility snapshots read inside a comment, plus screenshots, attachments and videos. | -| [`fix-failing-tests`](skills/fix-failing-tests) | Fix tests that failed in CI, using the results Currents recorded — errors, steps, traces, screenshots and console output. | +| Skill | Description | +| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [`browser-evidence`](skills/browser-evidence) | Experimental: prove a change works in a browser you drove yourself, when there is no test to run. | +| [`collect-evidence`](skills/collect-evidence) | Show that work you implemented actually works, or demo it, from tests that ran in CI via Currents — a trace API link whose trace summary, filmstrip and accessibility snapshots read inside a comment, plus screenshots, attachments and videos. | +| [`fix-failing-tests`](skills/fix-failing-tests) | Fix tests that failed in CI, using the results Currents recorded — errors, steps, traces, screenshots and console output. | The server publishes every skill as an MCP resource, so a connected agent can list and read them without a local copy: diff --git a/mcp-server/.synced-from b/mcp-server/.synced-from index 1622017..acf7507 100644 --- a/mcp-server/.synced-from +++ b/mcp-server/.synced-from @@ -1 +1 @@ -a1ac39f7c15ff0be510d426b1392e4e0ff5a8797 +9c6599eacc0a3eb3e71b6142af70c321e6fa13f5 diff --git a/mcp-server/src/server.ts b/mcp-server/src/server.ts index dbcf219..f10a44a 100644 --- a/mcp-server/src/server.ts +++ b/mcp-server/src/server.ts @@ -429,7 +429,7 @@ export const TOOL_CATALOG: CatalogTool[] = [ 'currents-get-spec-instance', { description: - "Retrieves the raw result of one spec file execution by instanceId: each test's state and attempts, and the artifact URLs. For why its tests failed, currents-get-context with run_id and instance_id returns the errors, steps and trace links ready to read.", + "Retrieves the raw result of one spec file execution by instanceId: each test's state and attempts, and the artifact URLs. For why its tests failed, currents-get-context with run_id and instance_id returns the errors, steps and trace API links ready to read.", title: 'Get Spec Execution', annotations: readOnly, }, @@ -513,8 +513,8 @@ export const TOOL_CATALOG: CatalogTool[] = [ 'currents-create-evidence-links', { description: - "Create a shareable link to a test attempt's evidence, served from its Playwright trace, and the URLs onto it: a markdown digest of what the attempt did and what failed, a filmstrip, an animated screencast, DOM snapshots, network requests and attachments. Use it to read a trace without downloading it, and to put evidence in a pull request comment or an issue — the link reads without a Currents credential and expires. Start from the digest it returns. For a session recorded with currents-create-session, send sessionId and the trace's attachmentId; for a CI test, instanceId and testId. Before posting evidence, read the workflow at skill://currents/browser-evidence/SKILL.md for a session you recorded, or skill://currents/collect-evidence/SKILL.md for a CI run.", - title: 'Create Evidence Links', + "Create a shareable trace API link to a test attempt's evidence, served from its Playwright trace, and the URLs onto it: a markdown trace summary (the `digest` URL) of what the attempt did and what failed, a filmstrip, an animated screencast, DOM snapshots, network requests and attachments. Use it to read a trace without downloading it, and to put evidence in a pull request comment or an issue — the link reads without a Currents credential and expires. Start from the trace summary it returns. For a session recorded with currents-create-session, send sessionId and the trace's attachmentId; for a CI test, instanceId and testId. Before posting evidence, read the workflow at skill://currents/browser-evidence/SKILL.md for a session you recorded, or skill://currents/collect-evidence/SKILL.md for a CI run.", + title: 'Create Trace API Link', annotations: { ...additiveWrite, openWorldHint: true }, }, createEvidenceLinksTool diff --git a/mcp-server/src/tools/evidence/create-evidence-links.ts b/mcp-server/src/tools/evidence/create-evidence-links.ts index f478385..93dfedc 100644 --- a/mcp-server/src/tools/evidence/create-evidence-links.ts +++ b/mcp-server/src/tools/evidence/create-evidence-links.ts @@ -181,7 +181,7 @@ const handler = async ({ ...data, ...traceEndpoints(data.url), docs: `${origin}/docs`, - note: 'Start with the digest. The link needs no Currents credential and stops working at expiresAt.', + note: 'Start with the trace summary, the digest URL. The link needs no Currents credential and stops working at expiresAt.', }, null, 2 diff --git a/skills/browser-evidence/SKILL.md b/skills/browser-evidence/SKILL.md index 15da17a..e0f97b5 100644 --- a/skills/browser-evidence/SKILL.md +++ b/skills/browser-evidence/SKILL.md @@ -80,7 +80,7 @@ Put both halves in one comment: - the before and after screenshots, attached to the comment itself — drag them into the body, or use the tracker's attachment API - the diff of the two accessibility snapshots — this is the part that shows what changed when the screenshots look the same -Lead with what changed for the user. Do not post trace links or storage URLs: the share link is the one that stays valid until it expires. +Lead with what changed for the user. Do not post trace API links or storage URLs: the share link is the one that stays valid until it expires. ## Troubleshooting @@ -97,7 +97,7 @@ Use this when you have a shell and the Currents MCP server but not the `currents ### Zip the trace -From the directory holding the recording, with `screencast/` in the archive — that is where the frames are, and a trace API asked for a filmstrip has nowhere else to read them from. Name the archive after the capture so the two do not overwrite each other. +From the directory holding the recording, with `screencast/` in the archive — that is where the frames are, and the filmstrip and frame URLs have nowhere else to read them from. Name the archive after the capture so the two do not overwrite each other. ```bash NAME=before @@ -134,7 +134,7 @@ rm -f "/tmp/$NAME-trace.zip" zip -qr "/tmp/$NAME-trace.zip" trace.trace trace.network screencast resources ``` -Scripts that loaded are not in the link's request count or request list; failed ones are. The trace API reads a network log of up to 64 MB decompressed. A larger one is left out: the digest names it and reports no requests, so failed requests go missing from the evidence. +Scripts that loaded are not in the trace summary's request count or the request list; failed ones are. The trace API reads a network log of up to 64 MB decompressed. A larger one is left out: the trace summary names it and reports no requests, so failed requests go missing from the evidence. ### Record the session @@ -158,9 +158,9 @@ Check each one succeeded. `--fail` is what makes curl report a refused upload; w curl --fail -X PUT -H "Content-Type: " --data-binary @ "" ``` -### Create the evidence links and read the digest +### Create the trace API link and read the trace summary -Call `currents-create-evidence-links` with the `sessionId` and the trace's `attachmentId` from the session. It returns the link and the URLs onto it — `digest`, `filmstrip`, `animation`. Fetch the `digest` URL and read it: it says what the page did and what failed, and it is how you confirm the recording captured the problem. It needs no Currents credential. +Call `currents-create-evidence-links` with the `sessionId` and the trace's `attachmentId` from the session. It returns the link and the URLs onto it — `digest`, `filmstrip`, `animation`. Fetch the `digest` URL and read the trace summary: it says what the page did and what failed, and it is how you confirm the recording captured the problem. It needs no Currents credential. ```bash curl -sL "" @@ -177,11 +177,11 @@ Then as in step 6 above. Screenshots go into the comment itself; a storage URL f - **`currents-create-session` is not in your tools**: the credential lacks `runs:write`, or is a read API key. - **403 from the session tool**: the same cause, on a connection that lists every tool (an API key whose access level the server does not know). - **`currents-create-share-link` is not in your tools**: the credential lacks `shares:write`. -- **503 `Trace links are not configured` from `currents-create-evidence-links`**: this deployment serves no trace links. Attach the trace zip and the screenshots instead, and say the trace opens at https://trace.playwright.dev. +- **503 `Trace API links are not configured` from `currents-create-evidence-links`**: this deployment serves no trace API links. Attach the trace zip and the screenshots instead, and say the trace opens at https://trace.playwright.dev. - **404 from the session tool**: the project id does not belong to this organization. - **422 from the session tool**: recording is suspended for the organization, or its subscription has expired. - **The upload URL is refused**: more than ten minutes passed since the session was recorded. Record the session again. -- **The digest says `trace.network` was not read**: the network log is over 64 MB even after the filter. Capture again with fewer steps, then zip and record a new session — the trace API caches what it read from the first upload. -- **The digest reports no frames**: the archive has no `screencast/`, or tracing ran without screenshots. +- **The trace summary says `trace.network` was not read**: the network log is over 64 MB even after the filter. Capture again with fewer steps, then zip and record a new session — the trace API caches what it read from the first upload, for every trace API link to that trace. +- **The trace summary reports no frames**: the archive has no `screencast/`, or tracing ran without screenshots. - **`No trace found`**: wrong `sessionId` or `attachmentId`, or an `artifactName` no trace carries. Creating the link never reads the file, so this is not an upload that is still in flight. -- **The digest fails with a 404 from storage**: the trace bytes are not there. Check that the upload got a 200. +- **The trace summary fails with a 404 from storage**: the trace bytes are not there. Check that the upload got a 200. diff --git a/skills/collect-evidence/SKILL.md b/skills/collect-evidence/SKILL.md index b0895f6..fa7e632 100644 --- a/skills/collect-evidence/SKILL.md +++ b/skills/collect-evidence/SKILL.md @@ -1,6 +1,6 @@ --- name: collect-evidence -description: Show that work you implemented actually works, or demo it, from tests that ran in CI via Currents — a trace link whose digest, filmstrip and accessibility snapshots read inside a comment, plus screenshots, attachments and videos. Use when asked to "collect evidence", "prove it works", "show me it works", "demo the feature", "capture a before/after", or to attach proof of a change to a PR, issue, ticket, or status update. Evidence comes from CI runs retrieved through the Currents MCP tools or REST API, not from a local run. +description: Show that work you implemented actually works, or demo it, from tests that ran in CI via Currents — a trace API link whose trace summary, filmstrip and accessibility snapshots read inside a comment, plus screenshots, attachments and videos. Use when asked to "collect evidence", "prove it works", "show me it works", "demo the feature", "capture a before/after", or to attach proof of a change to a PR, issue, ticket, or status update. Evidence comes from CI runs retrieved through the Currents MCP tools or REST API, not from a local run. --- # Collect Evidence @@ -13,7 +13,7 @@ Do not capture evidence locally: CI runs in a clean, reproducible environment, i | Evidence | Use for | Where it comes from | | ---------------------- | ------------------------------------------------- | ------------------------------------------- | -| Trace digest | What the test did and where it broke | `currents-create-evidence-links` → `digest` | +| Trace summary | What the test did and where it broke | `currents-create-evidence-links` → `digest` | | Filmstrip / animation | The whole attempt in one image | the same link | | Accessibility snapshot | A before/after diff two screenshots cannot show | the same link, `snapshots/?format=aria` | | Screenshot | Visual state, before/after UI comparison | `page.screenshot()` attached to the test | @@ -36,7 +36,7 @@ When there is no failing run, say so and lead with the after. The after then car ### A passing run has almost nothing to show -Under the usual `retain-on-failure`, a test that passes leaves no trace and no video, so the after half is screenshots and attachments. Lead the comment with the failing run — the digest, filmstrip and snapshots all come from there. +Under the usual `retain-on-failure`, a test that passes leaves no trace and no video, so the after half is screenshots and attachments. Lead the comment with the failing run — the trace summary, filmstrip and snapshots all come from there. ### Collect both halves in one sitting @@ -80,9 +80,9 @@ If `currents-get-test-evidence` is unavailable, compose primitives: `currents-fi Call `currents-create-evidence-links` with the `instanceId` and `testId` from the manifest, and `ttlSeconds` up to seven days when the link goes somewhere people come back to — the default is 24 hours. It serves the highest attempt that has a trace: under `retain-on-failure` that is the failure, but under `trace: 'on'` every attempt has one and the default is the passing retry, so pass the failing attempt's `attempt` from the manifest as `attemptIndex` (it reads `null` for a test that did not retry, so omit it there). A retried test reads as `passed` in the manifest whatever its earlier attempts did, so a second trace on it is the only sign anything failed. A trace uploaded as a named attachment rather than as a Playwright trace is found by that name alone — pass it as `artifactName`. It returns the link and the URLs onto it, none of which need a Currents login: -- `digest` (`?format=md`) first: the actions the test ran, console errors, failed requests, and the screencast frame at each failure. This is what says where it broke, and it is the part you quote in the comment. A test that timed out has no failed action — the digest counts zero — so read the end of the timeline and the console errors instead. +- `digest` (`?format=md`) first: the actions the test ran, console errors, failed requests, and the screencast frame at each failure. This is what says where it broke, and it is the part you quote in the comment. A test that timed out has no failed action — the trace summary counts zero — so read the end of the timeline and the console errors instead. - `filmstrip`: one image of the whole attempt — attach that rather than a video nobody plays. The default nine tiles at 320px are a shape, not something you can read; when the evidence is text on the page, ask for fewer and wider (`?frames=4&width=640`). `animation` is the same thing moving, and renders inline on GitHub and Linear. -- `snapshots/?format=aria`: the page's accessibility tree at that moment. Address it by a `t` from the `snapshots` catalog or from the digest timeline — the catalog names auto-captured snapshots `null`, so a timestamp is what you have. A diff of the before and after trees is what shows the change when both screenshots look identical. +- `snapshots/?format=aria`: the page's accessibility tree at that moment. Address it by a `t` from the `snapshots` catalog or from the trace summary timeline — the catalog names auto-captured snapshots `null`, so a timestamp is what you have. A diff of the before and after trees is what shows the change when both screenshots look identical. - `requests?status=failed`, and `attachments` for anything the test attached inline. ```bash @@ -96,23 +96,23 @@ Do not download `trace.zip` to put it in a comment — nobody opens one from the ### 4. Assemble and present - Lead with what changed for the user. -- **Before**: the failing run — the digest excerpt that names the failure, the filmstrip, the accessibility snapshot. +- **Before**: the failing run — the trace summary excerpt that names the failure, the filmstrip, the accessibility snapshot. - **After**: the passing run — screenshots and attachments, paired with the before by test title + attachment name. For text attachments, download both and show a diff. -- Link the whole run for readers without a Currents login: `currents-create-share-link` with the run's `run_id` and `purpose: "report"` returns a page of that run's results. It needs the `shares:write` scope and each call makes a new link. Without that scope, say which scope is missing and post the filmstrip, the digest excerpt and the downloaded screenshots in its place. -- Include each run's `dashboardUrl`. A trace link stops at `expiresAt` and the manifest's signed URLs in about three days; the dashboard link does not expire, so it is the one that has to be there. +- Link the whole run for readers without a Currents login: `currents-create-share-link` with the run's `run_id` and `purpose: "report"` returns a page of that run's results. It needs the `shares:write` scope and each call makes a new link. Without that scope, say which scope is missing and post the filmstrip, the trace summary excerpt and the downloaded screenshots in its place. +- Include each run's `dashboardUrl`. A trace API link stops at `expiresAt` and the manifest's signed URLs in about three days; the dashboard link does not expire, so it is the one that has to be there. - Attach the downloaded files to the comment itself (drag them into the body, or use the tracker's attachment API). Never paste a signed URL. -- Without a trace link: download the `trace.zip` and attach it, noting that it opens at https://trace.playwright.dev. Its manifest URL is signed like every other one, so it is not a link to paste either. +- Without a trace API link: download the `trace.zip` and attach it, noting that it opens at https://trace.playwright.dev. Its manifest URL is signed like every other one, so it is not a link to paste either. - GIF from a video, when that is the only recording: `ffmpeg -i demo.webm -vf "fps=10,scale=720:-1" demo.gif`. ## Troubleshooting -- **`currents-create-share-link` is not in your tools**: the credential is missing `shares:write`. The comment then carries the dashboard link, the filmstrip, the digest excerpt and the downloaded files, and says a share link needs that scope. +- **`currents-create-share-link` is not in your tools**: the credential is missing `shares:write`. The comment then carries the dashboard link, the filmstrip, the trace summary excerpt and the downloaded files, and says a share link needs that scope. - **`currents-create-evidence-links` is not in your tools**: the credential is missing `results:read`, and the whole evidence path is gone with it. -- **503 `Trace links are not configured`**: this deployment serves no trace links. Use the fallback in step 4: attach the `trace.zip`. +- **503 `Trace API links are not configured`**: this deployment serves no trace API links. Use the fallback in step 4: attach the `trace.zip`. - **`No trace found for this test attempt`**: the attempt recorded no trace — the ordinary case for a passing test under `retain-on-failure` — or the `instanceId` or `testId` names something else, or the trace was uploaded as an attachment and no `artifactName` was passed to match it. Creating the link never reads the file, so this is not an upload still in flight. - **`attachments` comes back empty**: the attempt attached nothing inline. Videos and screenshots the reporter uploaded separately are in the evidence manifest, and `currents-get-context` links the failure's own files. -- **The digest fails with a 404 from storage**: the trace bytes are gone. Artifact cleanup took them, which happens to a passing test's artifacts first. +- **The trace summary fails with a 404 from storage**: the trace bytes are gone. Artifact cleanup took them, which happens to a passing test's artifacts first. - **No artifacts in the manifest**: the reporter did not capture them. Check Playwright config: `screenshot: "on"`, `video: "retain-on-failure"` (or `"on"` for passing-test demos), `trace: "on"` for the evidence run. `testInfo.attach()` works regardless of these settings. - **Videos and traces missing for passing tests**: `retain-on-failure` discards them on success. For demo evidence from passing tests, set `"on"` scoped to the evidence spec via a test project — or prefer screenshots and attachments, which are cheap to keep always on. - **Run not found**: the lookup only returns completed runs, so a run still going reads the same as none. Check `currents-get-runs` for the branch before concluding the reporter never started. -- **Expired URL when downloading**: re-run the evidence tool for fresh signed URLs. An expired trace link is replaced by minting another. +- **Expired URL when downloading**: re-run the evidence tool for fresh signed URLs. An expired trace API link is replaced by minting another. diff --git a/skills/collect-evidence/references/instrumentation.md b/skills/collect-evidence/references/instrumentation.md index 8ceb378..7015365 100644 --- a/skills/collect-evidence/references/instrumentation.md +++ b/skills/collect-evidence/references/instrumentation.md @@ -100,13 +100,13 @@ export default defineConfig({ The Currents reporter uploads screenshots, videos, traces, and attachments per attempt automatically — no extra reporter config. -A trace link serves only what the attempt recorded, so a passing test needs -`trace: 'on'` for its digest, filmstrip and accessibility snapshots to exist. +A trace API link serves only what the attempt recorded, so a passing test needs +`trace: 'on'` for its trace summary, filmstrip and accessibility snapshots to exist. A failing test has them under `retain-on-failure` already. ### GIF -A trace link's `animation` endpoint renders the attempt as an animated WebP +A trace API link's `animation` endpoint renders the attempt as an animated WebP (`?format=gif` for a GIF), so a test with a trace needs nothing here. Otherwise record a video, download it from the evidence manifest, and convert: diff --git a/skills/fix-failing-tests/SKILL.md b/skills/fix-failing-tests/SKILL.md index 45e1bb4..b1b11cd 100644 --- a/skills/fix-failing-tests/SKILL.md +++ b/skills/fix-failing-tests/SKILL.md @@ -61,7 +61,7 @@ Call `currents-get-context` with `format: "md"`: Read the run first to see what failed and which failures share a cause, then one test at a time for the ones you fix. Tests that failed with the same error usually have one fix. -Open the linked files when the error alone does not say enough. The error context is the page's accessibility tree at the moment of failure; the trace is what the test did. A Playwright trace has two links: `explore trace` is a markdown digest of the actions, console and network, with links on to frames and DOM snapshots at the failure; `download trace` is the zip, for Playwright's trace viewer. Start with `explore trace`. +Open the linked files when the error alone does not say enough. The error context is the page's accessibility tree at the moment of failure; the trace is what the test did. A Playwright trace has two links: `explore trace` is the trace summary in markdown (the actions, console and network, with links on to frames and DOM snapshots at the failure); `download trace` is the zip, for Playwright's trace viewer. Start with `explore trace`. ### 3. Fix