metergraph-cli 0.2.0 → 0.2.2

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
@@ -13,7 +13,7 @@ token and route metadata back. Every command has stable `--json` output and exit
13
13
  so agents can run it as well as people.
14
14
 
15
15
  ```sh
16
- npx --yes metergraph-cli --help
16
+ npx --yes metergraph-cli@latest --help
17
17
  ```
18
18
 
19
19
  Published on npm as `latest`. See the [changelog](https://github.com/metergraph/cli/blob/main/CHANGELOG.md).
@@ -21,12 +21,13 @@ Published on npm as `latest`. See the [changelog](https://github.com/metergraph/
21
21
  ## Quickstart
22
22
 
23
23
  **1. Set up the project.** Run this in your project directory. It opens your browser to
24
- sign in and choose a workspace, asks a workspace member to approve an ingest-only key,
24
+ sign in and choose a workspace, asks a workspace member to approve an ingest-only key
25
+ (on the same page as sign in, where the service supports it),
25
26
  writes `METERGRAPH_APP_TOKEN` and `METERGRAPH_INGEST_URL` to a private `.env`, and
26
27
  installs the skill for your coding agent.
27
28
 
28
29
  ```sh
29
- npx --yes metergraph-cli setup --runtime local --client claude
30
+ npx --yes metergraph-cli@latest setup --runtime local --client claude
30
31
  ```
31
32
 
32
33
  Use `--client codex` or `--client cursor` for the other agents.
@@ -39,19 +40,20 @@ ID or request ID and when the call started and ended.
39
40
  exact trace is visible in your workspace.
40
41
 
41
42
  ```sh
42
- npx --yes metergraph-cli verify --trace-id TRACE_ID \
43
+ npx --yes metergraph-cli@latest verify --trace-id TRACE_ID \
43
44
  --since 2026-01-08T12:00:00Z --until 2026-01-08T12:00:05Z
44
45
  ```
45
46
 
46
47
  Then read what Metergraph has recorded:
47
48
 
48
49
  ```sh
49
- npx --yes metergraph-cli usage --days 7 # calls, errors, cost and tokens per route per day
50
- npx --yes metergraph-cli traces --limit 20 # one page of trace metadata
50
+ npx --yes metergraph-cli@latest usage --days 7 # calls, errors, cost and tokens per route per day
51
+ npx --yes metergraph-cli@latest usage --group-by route --today # most expensive route today (UTC)
52
+ npx --yes metergraph-cli@latest traces --limit 20 # one page of trace metadata
51
53
  ```
52
54
 
53
- To install it globally instead, run `npm install -g metergraph-cli`. The command is
54
- `metergraph`. Pin an exact version, such as `metergraph-cli@0.2.0`, when a
55
+ To install it globally instead, run `npm install -g metergraph-cli@latest`. The command is
56
+ `metergraph`. Pin an exact version, such as `metergraph-cli@0.2.2`, when a
55
57
  script must not change with the `latest` tag. Previews use the `next` tag.
56
58
 
57
59
  ## Requirements
@@ -67,8 +69,11 @@ Sign in needs a service that offers Metadata-only CLI grants and grant revocatio
67
69
  service without them is reported as unsupported, and the CLI never falls back to
68
70
  broader access. `setup` also needs the deployment's ingest bootstrap API and approval by
69
71
  a workspace member. Sign in needs a browser on the same machine. From SSH sessions,
70
- cloud development environments and CI, `login` and `setup` hand off to a local machine
71
- instead (exit 6).
72
+ cloud development environments and CI, `login` and `setup` exit 6 with a structured
73
+ `next_action`: a person creates a coding-agent key with Metadata access on the Keys
74
+ page and saves it as the secret `METERGRAPH_AGENT_TOKEN`, and the read commands use it
75
+ after verifying the origin, workspace, scope and capabilities. Ingest setup still runs
76
+ on a local machine.
72
77
 
73
78
  ## Using it with a coding agent
74
79
 
@@ -79,7 +84,7 @@ The CLI is built to be run by Codex, Claude Code and Cursor as well as by people
79
84
  network access:
80
85
 
81
86
  ```sh
82
- npx --yes metergraph-cli skill install --client codex
87
+ npx --yes metergraph-cli@latest skill install --client codex
83
88
  ```
84
89
 
85
90
  Python users can run `pip install metergraph-skills` and
@@ -93,7 +98,7 @@ The CLI is built to be run by Codex, Claude Code and Cursor as well as by people
93
98
  the `metergraph/skills` plugin marketplace instead.
94
99
 
95
100
  ```sh
96
- npx --yes metergraph-cli skills install --client claude
101
+ npx --yes metergraph-cli@latest skills install --client claude
97
102
  ```
98
103
 
99
104
  `--runtime` defaults to `local`. Pass `--runtime cloud` when the client runs in a
@@ -120,7 +125,7 @@ The CLI is built to be run by Codex, Claude Code and Cursor as well as by people
120
125
  Suggested `AGENTS.md` or `CLAUDE.md` lines for a project that uses Metergraph:
121
126
 
122
127
  ```md
123
- - Metergraph CLI: `npx --yes metergraph-cli <command> --json`. Check exit codes;
128
+ - Metergraph CLI: `npx --yes metergraph-cli@latest <command> --json`. Check exit codes;
124
129
  follow `data.next_action` on failure.
125
130
  - After changing instrumented code, run the app once and confirm the trace with
126
131
  `metergraph verify` before reporting that tracing works.
@@ -132,8 +137,8 @@ Suggested `AGENTS.md` or `CLAUDE.md` lines for a project that uses Metergraph:
132
137
  | --- | --- | --- |
133
138
  | `setup` | Sign in, choose a workspace, write the ingest key to `.env`, record the repository, install the skill | Yes |
134
139
  | `verify` | Confirm that one exact trace, by trace ID or request ID, reached the workspace | Yes |
135
- | `usage` | Daily calls, errors, cost, tokens and latency per route | Yes |
136
- | `traces` | One page of trace metadata, with a cursor for the next page | Yes |
140
+ | `usage` | Daily calls, errors, cost, tokens and latency per route, or cost grouped by provider, model, route or UTC day with exact filters, rankings and a prior-period comparison; filtered by exact metadata or grouped by one metadata key | Yes |
141
+ | `traces` | One page of trace metadata, filtered by route, status or exact metadata, with a cursor for the next page | Yes |
137
142
  | `routes` | Routes with call counts and evaluation contract status | Yes |
138
143
  | `status` | Whether the project is signed in, and to which workspace | Yes |
139
144
  | `context` | Workspace details and retention | Yes |
@@ -170,7 +175,7 @@ Exit codes are stable. Changing one is a breaking change. Codes 10 to 18 are not
170
175
  | 13 | `revocation_unconfirmed` | Local credentials were removed, but the service did not confirm that the grant was revoked. |
171
176
  | 14 | `capability_unavailable` | The service does not make this read available to the project's Metadata grant. No data was read. |
172
177
  | 15 | `permission_denied` | The service refused this read for the signed in grant, for example for a missing scope or permission. |
173
- | 16 | `rate_limited` | The service asked the CLI to slow down. Nothing was retried. Try again later. |
178
+ | 16 | `rate_limited` | The service asked the CLI to slow down. Try again later. Only setup retries, after a short Retry-After, to keep its approval. |
174
179
  | 17 | `cancelled` | A read command was interrupted before it finished. Read commands never change workspace configuration or telemetry. |
175
180
  | 18 | `action_required` | A person must act before the command can finish; `data.next_action` says what to do. `login` and `setup` with `--json --no-browser` exit with this as soon as an approval URL exists (`next_action.kind: "open_url"`), while a background process waits for the approval until `--timeout-ms`. After approval, run the same command again to continue. |
176
181
 
@@ -57,6 +57,53 @@ pass the same `--workspace` UUID each time, and give each repository its own
57
57
  identity. The SDK warning that repository identity is not configured does not
58
58
  stop capture.
59
59
 
60
+ ## Pick the CLI path for where the agent runs
61
+
62
+ Check `metergraph --help` first. If the read commands' help lists
63
+ `--agent-token-file`, the CLI also accepts a coding-agent key with Metadata
64
+ access from the `METERGRAPH_AGENT_TOKEN` environment variable. Use one sequence:
65
+
66
+ | Where the agent runs | Sequence |
67
+ |---|---|
68
+ | Local shell, hosted, new workspace | `metergraph setup --runtime local --client <client> --json --no-browser`, rerun after each approval, then `metergraph status --json`. Add `--signup` for a person with no hosted account. |
69
+ | Local shell, hosted, existing workspace | `metergraph login --runtime local --workspace <uuid> --json --no-browser`, then `metergraph status --json`. |
70
+ | Local shell, customer-local or customer-owned AWS | `metergraph setup --runtime local --client <client> --deployment customer-local` (or `byoc`) `--url <origin> --workspace <uuid> --json --no-browser`. Follow its `next_action` for each prerequisite, and add `--confirm-prerequisites` only after the person confirms them. Then `metergraph status --json`. Without `--deployment`, setup and login go to the hosted service. |
71
+ | Local container (Docker, local dev container) | As a local shell. If the browser cannot reach the container's sign in callback, use the key sequence below. |
72
+ | SSH, Codespaces, Gitpod, Cloud Shell, remote dev container, CI: hosted, customer-local or customer-owned AWS | The person signs in (or signs up, on the hosted service only) on their own device, opens the Keys page of the deployment and workspace the agent should read, creates a coding-agent key with Metadata access, and saves it in this environment's secret settings, or as a CI secret, named `METERGRAPH_AGENT_TOKEN`. Then run `metergraph status --json` and `metergraph usage --json`. Add `--workspace <uuid>` to make a key for another workspace fail. For a non-hosted deployment, pass `--url <origin>` (or set `METERGRAPH_URL`) with its address. |
73
+ | Any runtime: open-source self-hosted server | The CLI read commands do not support the open-source server; use its MCP route (below). There are no accounts and no Keys page: the operator gives the person one of the server's `MG_AGENT_TOKENS` values for the client's private MCP settings. |
74
+ | Has a Metadata key but no saved sign in | The same key sequence. If the project has a `.metergraph/project.json`, it pins the origin and workspace the key must match. |
75
+
76
+ `.metergraph/project.json` names the deployment origin and workspace ID. In a
77
+ public repository, keep it untracked (for example in `.gitignore`) and do not
78
+ commit it: that would publish the workspace ID. In CI for a public repository,
79
+ the read commands' JSON includes workspace IDs and per-route usage: write it to a file or
80
+ a masked step instead of the public job log, and print only what the person
81
+ needs.
82
+
83
+ Before answering a cost question from the CLI, confirm the workspace and what
84
+ it offers: `metergraph status --json` (the verified workspace must be the one
85
+ the person means) and `metergraph capabilities --json`. Then run the smallest
86
+ bounded `usage` read that answers it. Grouped usage needs a CLI that has it:
87
+ run `metergraph help usage` first, and use `--group-by` only when that help
88
+ lists it (for example `metergraph usage --group-by route --today --json` for
89
+ the most expensive route today). An older CLI has only
90
+ `metergraph usage --days N --json` (cost per route and day); say that grouping
91
+ by provider, model or metadata needs a newer CLI or the
92
+ `metergraph_get_usage_aggregates` tool, and do not invent flags. Grouped
93
+ usage windows are UTC days; plain `usage --days N` is the last N x 24 hours,
94
+ rolling. `metergraph-investigate` covers the rest. A deployment without grouped
95
+ usage exits 14 with a `next_action` that names the read it supports.
96
+
97
+ When `login`, `setup` or a read cannot finish where it runs, it prints
98
+ `data.next_action`. Follow it: `use_agent_key` lists the person's steps and the
99
+ commands to run afterwards; `replace_agent_key`, `use_metadata_only_key` and
100
+ `use_workspace_key` mean the key was refused, was broader than Metadata, or
101
+ belongs to another workspace. Never ask the person to paste the key into chat or
102
+ a command, and never put it in a project file. Ingest setup cannot run over SSH,
103
+ in a cloud workspace or in CI; it runs on the person's machine. The Metadata key
104
+ is separate from the application's ingest key and never replaces it. Debug and
105
+ Replay keys are refused by the CLI, not reduced.
106
+
60
107
  ## Route honestly
61
108
 
62
109
  | Client and runtime | Hosted | Customer-local bundle | Customer AWS | Open source self-hosted |
@@ -103,10 +150,12 @@ rather than improvising the analysis steps.
103
150
 
104
151
  ## When already connected: bounded investigation
105
152
 
106
- 1. Call `metergraph_get_workspace_context` and `metergraph_get_capabilities` first. Verify the intended workspace, deployment profile, available tools, required scopes and privacy classes. Stop on wrong workspace, unavailable capabilities or failed authorization.
107
- 2. Confirm the question, route and explicit time window. Choose the smallest available tool: bounded usage/route metadata for aggregate questions, incidents for known anomalies, or `metergraph_query_traces` with a small limit (start with 1) for a failed/anomalous trace. Follow cursors only within the agreed bound. Never request generic SQL or unbounded data.
153
+ Read through the `metergraph` CLI first when it is installed and can read the workspace: it returns the same Metadata evidence as the MCP tools in far fewer tokens. Use the MCP tools for what the CLI does not cover (incidents, ingestion health, reports, retained content and replay) and in clients with no shell. Being connected means either one; stop for setup only when neither can read the workspace.
154
+
155
+ 1. Confirm the workspace and what it offers. With the CLI: `metergraph status --json` (continue when `data.authenticated` is true and `data.workspace.match` is true. When `match` is null because no workspace was pinned, name `data.workspace.actual` and continue only after the person confirms it is the one they mean. Otherwise follow `data.next_action`) and `metergraph capabilities --json`. With MCP: `metergraph_get_workspace_context`, then `metergraph_get_capabilities`. Verify the intended workspace, deployment profile, available reads, required scopes and privacy classes. A wrong workspace or failed authorization on one path is a reason to use the other path when it can read the intended workspace; stop when neither can, or when the capability the question needs is unavailable.
156
+ 2. Confirm the question, route and explicit UTC time window. Choose the smallest available read, and always pass `--json` to the CLI: grouped usage (`metergraph usage --group-by ... --json`, or `metergraph_get_usage_aggregates`) or `metergraph usage --days N --json` / route metadata for aggregate questions, `metergraph traces --days N --limit 1 --json` with `--route` when known and `--status error` only for a failed trace (or `metergraph_query_traces` with a small limit, which also takes an exact trace or request ID) for a failed or anomalous trace, and the incidents tool for known anomalies. Check that `metergraph help <command>` lists an option before using it, and use the matching MCP tool when it does not. Follow cursors only within the agreed bound. Never request generic SQL or unbounded data.
108
157
  3. Start with metadata. Retained-content debugging and report evidence are separate content-bearing tools; confirm the user's content intent and capability before calling them. Replay is a separate scope and can send data to a provider and spend money. Obtain explicit bounded execution/data-egress authority before any replay. Read access grants no eval-write, analysis-run or production-mutation authority.
109
- 4. Explain the failure or anomaly using only returned evidence. Cite workspace, time window, provenance, trace/report IDs, completeness/coverage, warnings and working app links when returned. Do not fabricate links. Distinguish no data, incomplete evidence, unavailable capability, classification pending, stale/mismatched identity, failed analysis and missing report. An empty result alone does not prove absence of traffic.
158
+ 4. Explain the failure or anomaly using only returned evidence. Cite workspace, time window, provenance, trace/report IDs, completeness/coverage, warnings and working app links when returned. Do not fabricate links. Distinguish no data, incomplete evidence, unavailable capability, classification pending, stale/mismatched identity, failed analysis and missing report. An empty result alone does not prove absence of traffic. Never conclude that a commit, deploy or config change did or did not change cost from source code or a git diff alone; a diff is a hypothesis until bounded usage reads for the same route before and after the change reached production agree, with completeness and warnings cited.
110
159
  5. An optional approved replay must be eligible, bounded and non-persistent. Do not claim that it changed production telemetry or fixed the application. Refuse autonomous dashboard mutations or production configuration changes.
111
160
 
112
- For an empty workspace, use https://www.metergraph.dev/docs/agents/instrument-a-repo/. If `metergraph setup` already ran in this project, it delivered the ingest credential: the project's `.env` holds `METERGRAPH_APP_TOKEN` and `METERGRAPH_INGEST_URL`. Use them; do not ask for or create another key, and never print their values. The SDK reads the process environment, not `.env`, so load it when you run the application (for example `set -a; . ./.env; set +a`, python-dotenv or `node --env-file=.env`). Otherwise confirm the ingestion destination and obtain a separate ingest credential securely. Ask before running anything that calls a paid model provider, and do not initiate provider calls or paid work merely to validate setup. Confirm the exact trace with `metergraph verify`; if the CLI is not installed, or `metergraph --version` lacks `verify`, use `npx --yes metergraph-cli@next verify`. Ingestion accepted, processed, retained content, classification readiness and analysis readiness are distinct states. Label synthetic/demo fixtures; they do not prove a first real application trace.
161
+ For an empty workspace, use https://www.metergraph.dev/docs/agents/instrument-a-repo/. If `metergraph setup` already ran in this project, it delivered the ingest credential: the project's `.env` holds `METERGRAPH_APP_TOKEN` and `METERGRAPH_INGEST_URL`. Use them; do not ask for or create another key, and never print their values. The SDK reads the process environment, not `.env`, so load it when you run the application (for example `set -a; . ./.env; set +a`, python-dotenv or `node --env-file=.env`). Otherwise confirm the ingestion destination and obtain a separate ingest credential securely. Ask before running anything that calls a paid model provider, and do not initiate provider calls or paid work merely to validate setup. Confirm the exact trace with `metergraph verify`; if the CLI is not installed, or `metergraph --version` lacks `verify`, use `npx --yes metergraph-cli@latest verify`. Ingestion accepted, processed, retained content, classification readiness and analysis readiness are distinct states. Label synthetic/demo fixtures; they do not prove a first real application trace.
@@ -3,7 +3,7 @@
3
3
  "name": "metergraph",
4
4
  "file": "SKILL.md",
5
5
  "source_url": "https://www.metergraph.dev/SKILL.md",
6
- "sha256": "e7fc4eb7a22eeb16c357bede9d0a080ad3b415aaab1d9c72f164d5350d48c4b1",
7
- "size": 13664,
8
- "revision": "sha256-e7fc4eb7a22e"
6
+ "sha256": "ebf784673eff0280d85974504f93c683a1dabfb54156c9d27e091131462e9d5f",
7
+ "size": 19764,
8
+ "revision": "sha256-ebf784673eff"
9
9
  }
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "manifest_version": 1,
3
3
  "repository": "metergraph/skills",
4
- "commit": "dda4d5f130448f12a7fb2549ed264503d8b51d8d",
4
+ "commit": "39411ce1eceed6929ab3e5c4c20649f02e8eabb4",
5
5
  "skills": [
6
6
  {
7
7
  "name": "metergraph-analyze",
8
- "sha256": "e8bf1debf62aa7d33d3dd363e5d95d8f781e8ca23cde4619b5bb4133dd47a7a5",
9
- "size": 9360,
10
- "revision": "sha256-e8bf1debf62a"
8
+ "sha256": "c45756ad1d33a360c7c845ca299d8c1ab1e2b8162865f635bc25c78358c2a1e6",
9
+ "size": 12148,
10
+ "revision": "sha256-c45756ad1d33"
11
11
  },
12
12
  {
13
13
  "name": "metergraph-candidates",
@@ -23,9 +23,9 @@
23
23
  },
24
24
  {
25
25
  "name": "metergraph-investigate",
26
- "sha256": "775dbe7ca1100b17638d0905302ef1324694a60b90372c6c3df7b598a8f70438",
27
- "size": 6091,
28
- "revision": "sha256-775dbe7ca110"
26
+ "sha256": "470579faf9e8b5f1a562060d51ec5a71d1b9c47213403a2447dd40af56a74869",
27
+ "size": 19331,
28
+ "revision": "sha256-470579faf9e8"
29
29
  },
30
30
  {
31
31
  "name": "metergraph-iterate",
@@ -35,9 +35,9 @@
35
35
  },
36
36
  {
37
37
  "name": "metergraph-local-bundle",
38
- "sha256": "692cd8952a8a8896ec2c06091b329a7a01912e261e87d62a9458452172a7c9b0",
39
- "size": 12245,
40
- "revision": "sha256-692cd8952a8a"
38
+ "sha256": "c31286b7ee6dd8fc228e81565662ebaf4b0faf2ae92229602baf7c809202491b",
39
+ "size": 12265,
40
+ "revision": "sha256-c31286b7ee6d"
41
41
  },
42
42
  {
43
43
  "name": "metergraph-model-swap",
@@ -47,15 +47,15 @@
47
47
  },
48
48
  {
49
49
  "name": "metergraph-onboarding",
50
- "sha256": "6e6f418933f37b34437035ab3171344d43f37dee3770815b19f97efb62e5f1d1",
51
- "size": 10267,
52
- "revision": "sha256-6e6f418933f3"
50
+ "sha256": "409d105f3b042514fd347a1fffc5489a94c01d1bc8aac55800e8c9f13a66a2c1",
51
+ "size": 10751,
52
+ "revision": "sha256-409d105f3b04"
53
53
  },
54
54
  {
55
55
  "name": "metergraph-report",
56
- "sha256": "58add8f6a32191e6fc01ca533a700e190a8e6da412e619bca38c65a481ea9fb5",
57
- "size": 4521,
58
- "revision": "sha256-58add8f6a321"
56
+ "sha256": "0cdbeb684c4f7f87932784db832f376cff984fe0220a1167f1a73edd550450b7",
57
+ "size": 5471,
58
+ "revision": "sha256-0cdbeb684c4f"
59
59
  },
60
60
  {
61
61
  "name": "metergraph-workloads",
@@ -116,14 +116,72 @@ restate what you are starting and proceed. Otherwise ask and wait.
116
116
  the returned run instead of starting another. On `precondition_failed`,
117
117
  report the `reason` and stop.
118
118
  4. Poll `metergraph_get_analysis_run` with the `run_id` at a modest interval
119
- (about every 30 to 60 seconds) and tell the user the status as it changes.
120
- Do not restart a run because it is slow. Stop polling when the status is
121
- final, and say if it failed, with its `error_code`.
119
+ (about every 30 to 60 seconds). Do not restart a run because it is slow.
120
+ Stop polling when the status is final, and say if it failed, with its
121
+ `error_code`.
122
+ 5. After the start and after every poll, write a progress report in the
123
+ shape shown under "Show run progress" before you wait, set a timer or
124
+ schedule the next check. The start response already carries
125
+ `run.stages`, so the reply that starts the run has one too. A one-line
126
+ status such as "The run is exporting; I'll check again in a minute" is
127
+ not a progress report. The graphic is required every time.
128
+
129
+ ## Show run progress
130
+
131
+ Draw the stages from `run.stages.items`, in the order returned. Use each
132
+ item's `state` exactly as given. Never decide a stage's state from `status`,
133
+ trace names or the report.
134
+
135
+ Render one line with a marker per state: `✓` completed, `●` current, `✗`
136
+ failed, `–` skipped, `○` not started. For example:
137
+
138
+ ```
139
+ ✓ queued → ✓ exporting → ✓ analyzing → ● classified → ○ importing → ○ completed
140
+ ```
141
+
142
+ If the client can draw a richer inline graphic, you may use one. Keep the
143
+ same order and states, and make the states distinct without relying on
144
+ colour alone.
145
+
146
+ Under the graphic, always write a plain-text line that says the same thing:
147
+ the stages that are done, the current stage, and the stages still to come.
148
+
149
+ Every check-in, including the reply that starts the run, has this shape:
150
+
151
+ ````
152
+ Run 3f2a… at 19:34 UTC:
153
+
154
+ ```
155
+ ✓ queued → ✓ exporting → ✓ analyzing → ● classified → ○ importing → ○ completed
156
+ ```
157
+ Done: queued, exporting, analyzing. Now: classified, since 19:23 UTC
158
+ (11 minutes, unchanged since the last check). Still to come: importing,
159
+ completed. No error, no report yet. Next check in about a minute.
160
+ ````
161
+
162
+ - **Time in the current stage.** Take it from the current item's
163
+ `entered_at` and the response's `provenance.generated_at`, which is the
164
+ check time. Say when you last checked, and say plainly when the stage has
165
+ not changed since the last check. Never give a percentage, an ETA or a
166
+ time remaining. The run data supports neither.
167
+ - **Finished.** On `completed`, draw the items as returned, like any other
168
+ check: the stages the run passed through are `✓`, and a stage it never
169
+ entered stays `–` skipped. When `report.available` is true, read the
170
+ report (step 6) and give any link it returns exactly as given. When it is
171
+ false, say plainly that no report exists yet.
172
+ - **Failed.** On `failed`, mark the stage it stopped in with `✗`, give the
173
+ `error_code`, and leave the later stages `○`.
174
+ - **No stage data.** When `run.stages.available` is false, or `stages` is
175
+ missing, show no graphic. Say the stage breakdown is unavailable for this
176
+ run (`unavailable_reason`, when present). Report the `status`, the
177
+ timestamps, the `error_code` if the run failed, and whether a report
178
+ exists. Never mark stages complete by inference.
122
179
 
123
180
  ## 6. Read the report and recommend
124
181
 
125
182
  When `report.available` is true, call `metergraph_get_report` with
126
- `report.analysis_id`. Use the summary format and report link in
183
+ `report.analysis_id`. While it is false, do not look for a report under
184
+ another or guessed ID. Use the summary format and report link in
127
185
  `metergraph-report` when it is installed. Present:
128
186
 
129
187
  - the report `outcome`: `opportunities`, `no_opportunities`,