milieu-cli 0.4.0-rc.10 → 0.4.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 +19 -37
- package/docs/journeys.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# milieu-cli
|
|
2
2
|
|
|
3
|
+
[](https://npminsights.vercel.app/package/milieu-cli)
|
|
4
|
+
[](https://www.npmjs.com/package/milieu-cli?activeTab=versions)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/simplyarun/milieu-cli/actions/workflows/ci.yml?query=branch%3Amain+event%3Apush)
|
|
7
|
+
|
|
3
8
|
The API is the new product UI. Your customers are no longer just humans. They're AI agents, LLM pipelines, and automated workflows. These customers don't browse your marketing site or read your docs the way people do. They parse your machine-readable signals, probe your endpoints, and decide in milliseconds whether your product is usable.
|
|
4
9
|
|
|
5
10
|
As an industry, we've spent decades perfecting UI & UX design for humans. Now we need the same rigor for the interface AI agents actually see: your product's **milieu**.
|
|
@@ -12,7 +17,7 @@ Use Node.js 22.19.0 or newer. Replace the example URL with your own public site.
|
|
|
12
17
|
npx milieu-cli scan https://your-site.example
|
|
13
18
|
```
|
|
14
19
|
|
|
15
|
-
You'll get a scored report showing what agents can discover about your product. Add `--verbose` to see the individual checks. No API key is required.
|
|
20
|
+
You'll get a scored report showing what agents can discover about your product. Add `--verbose` to see the individual checks. No API key is required. To see what happens when an agent tries to use a product, try the [Journeys demo](#journeys).
|
|
16
21
|
|
|
17
22
|
## Table of contents
|
|
18
23
|
|
|
@@ -34,22 +39,22 @@ You'll get a scored report showing what agents can discover about your product.
|
|
|
34
39
|
|
|
35
40
|
**Can an agent follow your quickstart and retrieve its first catalog item?** A Journey tests a task like this against your docs and API. You define what success looks like. Milieu records the pages and responses the agent used and shows which checks passed or failed.
|
|
36
41
|
|
|
37
|
-
**Try the demo.**
|
|
42
|
+
**Try the demo.** Run a scripted agent through a sample quickstart.
|
|
38
43
|
|
|
39
44
|
```sh
|
|
40
|
-
npx
|
|
45
|
+
npx milieu-cli journey demo
|
|
41
46
|
```
|
|
42
47
|
|
|
43
|
-
Look for `catalog-quickstart / docs-missing`. The
|
|
48
|
+
`npx` fetches Milieu if needed. The demo then runs offline. Look for `catalog-quickstart / docs-missing`. The agent gets stuck because the guide omits `GET /v1/items`. The line `Direct API control: pass` tells you the endpoint works. Adding the missing instruction fixes the guide.
|
|
44
49
|
|
|
45
50
|
**Try it on your own product**
|
|
46
51
|
|
|
47
|
-
1. Create a case with `npx
|
|
52
|
+
1. Create a case with `npx milieu-cli journey init catalog.json --kind api_read`.
|
|
48
53
|
2. Edit `catalog.json`. Write the task in `prompt`. Point `targets.baseline` and `startPath` at your public test deployment and its starting page. Set the permitted paths in `scope` and the expected result in `expect`. Use synthetic data.
|
|
49
54
|
3. With [Ollama set up](docs/journeys.md#run-with-a-model), replace `YOUR_MODEL` with an installed model name and run the case. Rerun it after a docs or API change to see whether the task still passes.
|
|
50
55
|
|
|
51
56
|
```sh
|
|
52
|
-
npx
|
|
57
|
+
npx milieu-cli journey run catalog.json --target baseline --provider ollama --model YOUR_MODEL
|
|
53
58
|
```
|
|
54
59
|
|
|
55
60
|
| Journey command | Purpose and options |
|
|
@@ -133,44 +138,21 @@ GPTBot and ClaudeBot collect training material. CCBot collects material for Comm
|
|
|
133
138
|
|
|
134
139
|
## Install
|
|
135
140
|
|
|
136
|
-
|
|
137
|
-
npx milieu-cli scan https://your-site.example # one-off
|
|
138
|
-
npm install -g milieu-cli # global install
|
|
139
|
-
milieu scan https://your-site.example # installed alias
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Both `milieu` and `milieu-cli` work after global install. The unversioned npm commands use the `latest` channel.
|
|
143
|
-
|
|
144
|
-
**Install the 0.4 candidate from npm.** For `diff`, Journeys, and CI completeness checks, use the candidate. Once `npm view milieu-cli dist-tags` lists RC10 under `next`, pin it in your project.
|
|
145
|
-
|
|
146
|
-
```sh
|
|
147
|
-
npm install --save-dev --save-exact milieu-cli@0.4.0-rc.10
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**Install RC10 from GitHub.** From an empty directory, build the package at the current head of PR #15, then install its tarball in a scratch project. `npm pack` runs the production build.
|
|
141
|
+
For a one-off run, use `npx milieu-cli` as in the quick start. To use the same version for baseline scans, comparisons and CI, pin it in your project.
|
|
151
142
|
|
|
152
143
|
```sh
|
|
153
|
-
|
|
154
|
-
cd milieu-cli-source
|
|
155
|
-
git fetch origin refs/pull/15/head
|
|
156
|
-
git switch --detach FETCH_HEAD
|
|
157
|
-
npm ci --engine-strict
|
|
158
|
-
npm pack --pack-destination ..
|
|
159
|
-
cd ..
|
|
160
|
-
npm init -y
|
|
161
|
-
npm install --save-dev --engine-strict ./milieu-cli-0.4.0-rc.10.tgz
|
|
162
|
-
npx --no-install milieu --version
|
|
144
|
+
npm install --save-dev --save-exact milieu-cli@0.4.0
|
|
163
145
|
```
|
|
164
146
|
|
|
165
|
-
|
|
147
|
+
After installation, `npx milieu-cli` uses the project’s copy. Commit the package manifest and lockfile, then run `npm ci` in CI. For a global install, use `npm install -g milieu-cli`. Both `milieu` and `milieu-cli` work as commands after installation.
|
|
166
148
|
|
|
167
149
|
## CI/CD integration
|
|
168
150
|
|
|
169
|
-
|
|
151
|
+
After installing Milieu in your project, set `ORIGIN` to your public site and choose a minimum score for your product.
|
|
170
152
|
|
|
171
153
|
```bash
|
|
172
154
|
ORIGIN=https://your-site.example
|
|
173
|
-
|
|
155
|
+
./node_modules/.bin/milieu scan "$ORIGIN" --json --threshold 70 --require-complete > milieu-report.json
|
|
174
156
|
```
|
|
175
157
|
|
|
176
158
|
Add `--require-complete` to fail the job if a scan exhausts its request budget, skips a bridge, or returns a check with status `error`. A `partial` check alone does not trigger this flag. A scan exits with code 1 on an input or scan error, an unmet score threshold, or an unmet completeness requirement. A fatal reachability failure such as DNS or TLS failure also exits 1, as does a scan in which Reachability was not evaluated. JSON output retains the report for these outcomes and for unmet requirements. Individual link observations can have incomplete coverage even when this flag passes. For decisions about published routes, inspect the Separation findings and their coverage in the diff.
|
|
@@ -197,10 +179,10 @@ For a before-and-after check, run the first command before deploying your change
|
|
|
197
179
|
|
|
198
180
|
```sh
|
|
199
181
|
ORIGIN=https://your-site.example
|
|
200
|
-
npx
|
|
182
|
+
npx milieu-cli scan "$ORIGIN" --json > base.json
|
|
201
183
|
# Deploy the change to the same origin before continuing.
|
|
202
|
-
npx
|
|
203
|
-
npx
|
|
184
|
+
npx milieu-cli scan "$ORIGIN" --json > candidate.json
|
|
185
|
+
npx milieu-cli diff base.json candidate.json --json > diff.json
|
|
204
186
|
```
|
|
205
187
|
|
|
206
188
|
Findings are grouped by bridge. Where the scanner observed the same protected operation on both runs, Context compares individual authentication signals, including changes that leave the grade at `partial`. Separation reports changes in documentation links and successful fetches as inventory. Its URL evidence keeps the origin and case-sensitive path and omits user information, queries, and fragments. A linked URL may be on a different host and may never have been fetched.
|
package/docs/journeys.md
CHANGED
|
@@ -4,12 +4,12 @@ A saved Journey run links each assertion to the document or API response the act
|
|
|
4
4
|
|
|
5
5
|
## Inspect one attempt offline
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Install Milieu in your project with `npm install --save-dev --save-exact milieu-cli@0.4.0`, then save the demo output. The demo contains several runs. Extract the one whose API returned HTTP 200 without the expected array.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
node -e "const fs=require('node:fs'),cp=require('node:child_process');fs.writeFileSync('demo.json',cp.execFileSync(process.execPath,['node_modules/milieu-cli/dist/cli/index.js','journey','demo','--json']))"
|
|
11
11
|
node -e "const fs=require('node:fs');const d=JSON.parse(fs.readFileSync('demo.json','utf8').replace(/^\uFEFF/,''));const r=d.runs.find(r=>r.caseKind==='api_read'&&r.target.name==='broken');fs.writeFileSync('broken.json',JSON.stringify(r))"
|
|
12
|
-
npx
|
|
12
|
+
npx milieu-cli journey inspect broken.json --verbose
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
The `items-array` assertion shows the expected array, the missing observed value and the API event that supplied that evidence. The direct control shows its own evidence. In the `docs-missing` run, `api.docs_excerpt` fails and the control passes. A model that exhausts its one correction records `INVALID_DECISION`; inspect its final error event for the recorded reason. An inconclusive outcome means the available observations could not settle the assertion.
|
|
@@ -80,4 +80,4 @@ Cairn Ledger is a fictional product. Its sample workspace, persistent account an
|
|
|
80
80
|
| Persistent account claim | Workspace owner | [Case](examples/onboarding/account-claim.json) and [claim page](examples/onboarding/pages/account-claim.html) |
|
|
81
81
|
| Production activation | Identity review | [Case](examples/onboarding/production-activation.json) and [production page](examples/onboarding/pages/production-activation.html) |
|
|
82
82
|
|
|
83
|
-
Try `npx
|
|
83
|
+
Try `npx milieu-cli journey validate node_modules/milieu-cli/docs/examples/onboarding/account-claim.json` after installation. In the scripted verification, an actor citing the complete claim page passes with “Workspace owner.” Removing the claim sentence makes the passage assertion fail. Citing the production page leaves the required claim-page citation missing. These cases measure what the documentation says. Credential issuance, time to onboard and account activation require separate observations.
|