@withgauge/cli 0.17.1 → 0.18.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 (3) hide show
  1. package/README.md +63 -15
  2. package/dist/index.js +1952 -1560
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -76,7 +76,7 @@ config:
76
76
  Add a /health endpoint and run the relevant app checks.
77
77
  ```
78
78
 
79
- Check your working-tree setup, then commit the files before planning and running:
79
+ Check your setup, then commit the files before planning and running with Git inputs:
80
80
 
81
81
  ```sh
82
82
  gauge evals verify # offline; includes uncommitted working-tree edits
@@ -87,7 +87,8 @@ gauge run-requests wait <request-id> -o json
87
87
  ```
88
88
 
89
89
  Cases default to `gauge-evals/**/*.md`. `--files` accepts quoted paths/globs and overrides
90
- that convention for `plan` and `run`, which read committed Git HEAD, ignoring working-tree edits.
90
+ that convention for `plan` and `run`. By default, these commands read committed Git
91
+ HEAD. With `--input`, they read your current files, including uncommitted edits.
91
92
  Each case owns its agents, models, consumer repository/ref, Persona and criteria.
92
93
  The optional `config.inputs` selects named inputs; all attach by default.
93
94
 
@@ -104,7 +105,7 @@ event filters and runtime conditions are not evaluated against a candidate PR.
104
105
  Live input delivery, artifact contents, sandbox execution, App activation, and
105
106
  account settings are outside this command's scope and do not create unknown rows.
106
107
  Exit 1 means at least one `no`; exit 0 means no definite static problem was found.
107
- No workflow code is executed. Commit files before `plan` or `run` consumes them.
108
+ No workflow code is executed.
108
109
 
109
110
  `gauge evals verify -o json` writes exactly one JSON object to stdout, including on
110
111
  validation failure. The versioned report provides:
@@ -150,15 +151,19 @@ alongside your product:
150
151
  }
151
152
  ```
152
153
 
153
- Gauge waits for the existing workflow at the pushed revision and consumes its
154
- artifacts by ID. Omit `source.artifact` to select a sole artifact, or use a name
155
- pattern when the workflow uploads several. It never triggers or performs a build. Connect the Gauge
156
- GitHub App with repository access and Actions read permission. Plan previews CI
157
- readiness; waiting requests create no sessions and incur no session debit.
158
- Each input names its workflow. Gauge captures one successful run/attempt per
159
- workflow before downloading any input. A committed org and matching GitHub App
160
- installation enable automatic same-repository PR evaluations for repositories and
161
- target branches enabled in Settings → GitHub (initially enabled for `main`).
154
+ Gauge waits for your PR build and tests its uploaded artifacts. Keep the workflow's
155
+ existing checkout settings, including GitHub's default merge checkout. Omit
156
+ `source.artifact` when the workflow uploads one artifact, or select it by name.
157
+
158
+ For automatic checks, connect the Gauge GitHub App with repository access and
159
+ Actions read permission. Set `org` and enable the repository and target branches
160
+ in **Settings → GitHub**. Waiting for inputs starts no sessions and spends no
161
+ session credits.
162
+ Fork pull requests are disabled by default. Choose **Require approval** to let
163
+ workspace members authorize an evaluation from its GitHub check. Authorization
164
+ covers one PR revision and uses workspace credits; new revisions and explicit
165
+ reruns require fresh approval. Configured inputs determine when an authorized
166
+ evaluation is ready to run.
162
167
  A failed run or absent/expired artifact returns an actionable input failure.
163
168
  Absent runs have a five-minute discovery grace period; known running or queued
164
169
  CI can continue past an hour. Abandoned requests expire after seven days. Reruns retain captured bytes. CI metadata reports a revision; it
@@ -231,7 +236,7 @@ Actions artifact (or small committed Git files):
231
236
  }
232
237
  ```
233
238
 
234
- Paths are relative to the uploaded artifact root. Build the exact candidate SHA;
239
+ Paths are relative to the uploaded artifact root. Use your normal PR build;
235
240
  for `actions/upload-artifact@v7`, use `archive: true`. Include companion files in
236
241
  `paths` and explicitly map 1–32 command names to ordinary selected files. Gauge
237
242
  validates Linux x86-64 ELF executables in its isolated artifact processor, restores
@@ -257,6 +262,49 @@ the source root. Gauge validates and extracts selected archives in isolation and
257
262
  stages the Skill in the coding agent's native discovery location. File inputs use
258
263
  `paths` to select committed files or files inside an Actions artifact.
259
264
 
265
+ Gauge tests the artifact uploaded by your PR's successful build. Keep your
266
+ existing checkout settings. The GitHub check links to the selected build;
267
+ rerun Gauge to test the latest build.
268
+
269
+ ### Run from your own CI or local build
270
+
271
+ With CLI 0.18.0 or later, supply built inputs directly to run without the GitHub App:
272
+
273
+ ```sh
274
+ gauge --org my-org evals run --input product-analytics=./dist/skill.zip --yes -o json > request.json
275
+ gauge --org my-org run-requests wait "$(jq -er '.runRequestId' request.json)" -o json > results.json
276
+ ```
277
+
278
+ Set `GAUGE_API_TOKEN` as a CI secret and replace `my-org` with your workspace slug.
279
+ This can run immediately after your build in the same CI job.
280
+
281
+ Repeat `--input name=path` for each input. Skills accept a directory containing
282
+ `SKILL.md` or a ZIP/tar.gz archive; npm inputs accept a packed `.tgz`. Files and
283
+ binary inputs accept a directory, with configured paths relative to that directory.
284
+ Use a dedicated build directory: links are rejected, and common credential files
285
+ and `node_modules` are excluded. Each input is limited to 512 MiB and 20,000 files.
286
+
287
+ With `--input`, Gauge uses your current evaluation files, including uncommitted
288
+ edits. No Git checkout is required when all selected inputs are supplied locally.
289
+ Inputs without an override keep their configured source. You can omit `source`
290
+ in `gauge.json` to default to Git; the override replaces it for this run.
291
+ Website previews and private consumer repositories still require their configured
292
+ access. Public consumer repositories and the default workspace need no GitHub App.
293
+
294
+ `wait -o json` returns the verdict, session results, criterion explanations, and
295
+ session links. It exits nonzero for failed evaluations or execution errors and
296
+ still writes the results JSON. Automatic PR checks continue to use configured
297
+ sources; disable those checks in Gauge's GitHub settings if CI owns the trigger.
298
+ Save `results.json` as a CI artifact even when the check fails.
299
+
300
+ ### Authenticated MCP servers
301
+
302
+ Connect your account in Gauge's MCP setup, completing OAuth in your browser when
303
+ required. Add the server's versioned reference to each case's `config.mcpRefs`.
304
+ Gauge manages credentials for the session; keep tokens out of prompts and Git.
305
+
306
+ ### Website previews
307
+
260
308
  Website inputs use `type: "website"` and a canonical HTTPS origin in `url`.
261
309
  The preview can come from `source: { "type": "github-deployment", "environment": "preview" }`
262
310
  or a `github-pr-comment` source with an exact `author`, literal `bodyIncludes`
@@ -268,8 +316,8 @@ They are fetched live rather than snapshotted. See the [preview source examples
268
316
  limitations](../specs/docs-web-inputs.md), including Astro's existing bot comment.
269
317
 
270
318
  Editor schemas are published at
271
- `https://agents.withgauge.com/schemas/gauge/v2.6.0/gauge.json` and
272
- `https://agents.withgauge.com/schemas/gauge/v2.6.0/case.json`. Associate them in editor
319
+ `https://agents.withgauge.com/schemas/gauge/v2.7.0/gauge.json` and
320
+ `https://agents.withgauge.com/schemas/gauge/v2.7.0/case.json`. Associate them in editor
273
321
  settings; `gauge.json` does not accept a `$schema` field. These release URLs are
274
322
  immutable. Update earlier pilot configs by moving workflows into input sources,
275
323
  replacing `use` with input `type` and `path`/`paths`, and moving cases into