statelyai 0.16.0 → 0.17.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
@@ -24,25 +24,26 @@ npm install --global statelyai
24
24
 
25
25
  <!-- command capabilities and side effects from src/cli.ts#COMMANDS -->
26
26
 
27
- | Goal | Command | Writes |
28
- | ----------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- |
29
- | Calibrate reviewed behavior | `statelyai behavior calibrate --config config.json --output .scratch/calibration` | Native setup receipt awaiting inspected adoption |
30
- | Run deterministic behavior evidence | `statelyai behavior check --config config.json --output .scratch/run` | Fresh local run artifact; checked baseline unchanged |
31
- | Adopt inspected red or green evidence | `statelyai behavior adopt .scratch/run --config config.json` | Immutable checked state and exact config baseline |
32
- | Test an application against a model | `statelyai test ./feature.campaign.mjs` | Local code execution, report and optional replay fixture |
33
- | Process a saved verification report | `statelyai verify --from-report report.json` | Local report file |
34
- | List local machines | `statelyai scan` | Nothing |
35
- | Edit local machines visually | `statelyai open [file]` | Local source, when you save in the editor |
36
- | Set up local discovery | `statelyai init --local --scan` | Local `statelyai.json` |
37
- | Set up project sync | `statelyai init --scan` | Remote project and local `statelyai.json` |
38
- | Inspect project machines | `statelyai status` | Nothing |
39
- | Connect to a Studio project | `statelyai link --project <id>` | Project association in `statelyai.json` |
40
- | Associate an existing machine | `statelyai link <file> --machine <id>` | Selected source machine ID comment |
41
- | Preview project uploads | `statelyai push --dry-run` | Nothing |
42
- | Upload local machines | `statelyai push [file]` | Remote machines and local `@statelyai` IDs |
43
- | Download project machines | `statelyai pull` | Linked local files and new files under `newMachinesDir` |
44
- | Compare two machines | `statelyai diff <source> <target>` | Nothing |
45
- | Fail on differences in CI | `statelyai diff <source> <target> --fail-on-changes` | Nothing |
27
+ | Goal | Command | Writes |
28
+ | ------------------------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------- |
29
+ | Calibrate reviewed behavior | `statelyai behavior calibrate --config config.json --output .scratch/calibration` | Native setup receipt awaiting inspected adoption |
30
+ | Run deterministic behavior evidence | `statelyai behavior check --config config.json --output .scratch/run` | Fresh local run artifact; checked baseline unchanged |
31
+ | Adopt inspected red or green evidence | `statelyai behavior adopt .scratch/run --config config.json` | Immutable checked state and exact config baseline |
32
+ | Measure source transition outcomes | `statelyai coverage model.ts --execute --cases cases.json` | Coverage report and optional Viz graph |
33
+ | Test an application against a model | `statelyai test ./feature.campaign.mjs` | Local code execution, report and optional replay fixture |
34
+ | Process a saved verification report | `statelyai verify --from-report report.json` | Local report file |
35
+ | List local machines | `statelyai scan` | Nothing |
36
+ | Edit local machines visually | `statelyai open [file]` | Local source, when you save in the editor |
37
+ | Set up local discovery | `statelyai init --local --scan` | Local `statelyai.json` |
38
+ | Set up project sync | `statelyai init --scan` | Remote project and local `statelyai.json` |
39
+ | Inspect project machines | `statelyai status` | Nothing |
40
+ | Connect to a Studio project | `statelyai link --project <id>` | Project association in `statelyai.json` |
41
+ | Associate an existing machine | `statelyai link <file> --machine <id>` | Selected source machine ID comment |
42
+ | Preview project uploads | `statelyai push --dry-run` | Nothing |
43
+ | Upload local machines | `statelyai push [file]` | Remote machines and local `@statelyai` IDs |
44
+ | Download project machines | `statelyai pull` | Linked local files and new files under `newMachinesDir` |
45
+ | Compare two machines | `statelyai diff <source> <target>` | Nothing |
46
+ | Fail on differences in CI | `statelyai diff <source> <target> --fail-on-changes` | Nothing |
46
47
 
47
48
  ## Test application behavior
48
49
 
@@ -301,6 +302,12 @@ writes an evidence artifact. `adopt <artifact-directory> --config <path>`
301
302
  validates inspected red/green evidence and advances the exact checked baseline.
302
303
  See [Behavior evidence in CI](#behavior-evidence-in-ci) for setup and exit codes.
303
304
 
305
+ ### `coverage`
306
+
307
+ Extract source outcomes without executing the model, or add `--execute --cases
308
+ cases.json` to search and replay witnesses. See [Source transition
309
+ coverage](#source-transition-coverage) for dependency requirements and outputs.
310
+
304
311
  ### `login`
305
312
 
306
313
  Store an OAuth credential or API key.
@@ -649,6 +656,25 @@ dependency scope, not complete transitive coverage. Core execution remains
649
656
  reported; review identity is unavailable. CI requires clean bound inputs and
650
657
  actual HEAD equal to `GITHUB_SHA`; environment metadata alone is not remote proof.
651
658
 
659
+ ## Source transition coverage
660
+
661
+ <!-- coverage execution, dependencies, deadlines, and output ownership from src/sourceCoverageCommand.ts and src/sourceCoverageRunner.ts -->
662
+
663
+ `statelyai coverage model.ts` extracts a JSON obligation manifest without
664
+ executing application code. Add `--execute --cases cases.json` to search for
665
+ witnesses using the model project's v6 runtime, source-coverage graph planner and
666
+ `@xstate/test` adapter. `--replay report.json` rechecks retained witnesses;
667
+ `--graph coverage.graph.json` writes a source-linked Viz coverage graph.
668
+ Execution runs trusted local code with ordinary permissions in a worker with a
669
+ deadline. It requires project releases containing the new graph and test APIs.
670
+ Execution supports ESM imports, top-level await and the source project's
671
+ TypeScript path aliases. Both extraction and execution use `--timeout`, which
672
+ defaults to 120 seconds. After output paths pass alias checks, a failed run
673
+ replaces the report with an error and removes any previous coverage graph.
674
+
675
+ See [source transition coverage](../../docs/sdk/source-coverage.md) for examples,
676
+ exit codes, supported source forms and coverage criteria.
677
+
652
678
  ## Self-hosting
653
679
 
654
680
  <!-- self-host auth and URL behavior from LoginCommand, baseUrlFlags, OpenCommand, credential resolution, and projectConfig.ts -->
package/dist/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as run } from "./cli-CqVcBAPG.mjs";
2
+ import { C as run } from "./cli-BBG--n3O.mjs";
3
3
 
4
4
  //#region src/bin.ts
5
5
  run();