diff --git a/README.md b/README.md index 747c20d..903bac2 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ A pass is historical evidence, not authorization or a guarantee of future accura ## Library usage ```sh -npm install github:gbesse/autonomy-meter#v0.1.0 +npm install github:gbesse/autonomy-meter#v0.1.1 ``` ```js @@ -86,6 +86,10 @@ Collect labels independently and sample automatic decisions too, not only escala The HTML contains aggregated results only, not original observations. Group labels are HTML-escaped. The CLI sends no telemetry and never calls a model. +## Shareable demo report + +Run `npm run demo:report` to capture this repository’s bundled example as one JSON object with the project purpose, version and complete demo output. The command fails if the demo fails, so the report is useful when sharing a reproducible first look or reporting unexpected behavior. The bundled demo’s data and safety boundaries still apply. + ## Boundaries This alpha reads data into memory and scans exact tuning thresholds; use modest datasets diff --git a/examples/demo-report.mjs b/examples/demo-report.mjs new file mode 100644 index 0000000..6966a41 --- /dev/null +++ b/examples/demo-report.mjs @@ -0,0 +1,23 @@ +// Purpose: Capture the bundled demo as one shareable JSON report. +import { spawnSync } from 'node:child_process'; +import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; + +const root = new URL('../', import.meta.url); +const packageInfo = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')); +const run = spawnSync(process.execPath, [fileURLToPath(new URL('examples/demo.mjs', root))], { + cwd: fileURLToPath(root), + encoding: 'utf8', + timeout: 60_000, +}); +if (run.error || run.status !== 0) { + const detail = run.error?.message ?? (run.stderr.trim() || `exit code ${run.status}`); + throw new Error(`demo failed: ${detail}`); +} +console.log(JSON.stringify({ + project: packageInfo.name, + version: packageInfo.version, + purpose: packageInfo.description, + command: 'npm run demo', + output: run.stdout.trim(), +}, null, 2)); diff --git a/package-lock.json b/package-lock.json index 291f1ae..4168a0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gbesse/autonomy-meter", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gbesse/autonomy-meter", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "bin": { "autonomy-meter": "bin/autonomy-meter.mjs" diff --git a/package.json b/package.json index 96a955e..6446789 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gbesse/autonomy-meter", - "version": "0.1.0", + "version": "0.1.1", "description": "Measure selective automation on labeled decisions, with held-out evaluation and uncertainty bounds.", "type": "module", "exports": { @@ -28,7 +28,8 @@ "test": "node --test", "check": "node scripts/check.mjs", "demo": "node examples/demo.mjs", - "typecheck": "tsc --noEmit --strict --target ES2022 --module NodeNext docs/public-api-types.mts" + "typecheck": "tsc --noEmit --strict --target ES2022 --module NodeNext docs/public-api-types.mts", + "demo:report": "node examples/demo-report.mjs" }, "engines": { "node": ">=22"