metergraph-cli 0.1.0 → 0.2.0-preview.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 +488 -22
- package/assets/skill/SKILL.md +17 -1
- package/assets/skill/manifest.json +3 -3
- package/package.json +2 -2
- package/src/args.js +323 -17
- package/src/auth-binding.js +202 -0
- package/src/auth-browser.js +74 -0
- package/src/auth-callback.js +177 -0
- package/src/auth-login.js +410 -0
- package/src/auth-oauth.js +462 -0
- package/src/auth-session.js +174 -0
- package/src/auth-store.js +397 -0
- package/src/cli.js +78 -2
- package/src/constants.js +99 -4
- package/src/deployment-credential.js +207 -0
- package/src/deployment-route.js +449 -0
- package/src/doctor.js +10 -0
- package/src/http.js +1 -1
- package/src/output.js +454 -2
- package/src/read-contract.js +601 -0
- package/src/read-output.js +216 -0
- package/src/read.js +325 -0
- package/src/setup-deployment.js +178 -0
- package/src/setup-env-acl.js +99 -0
- package/src/setup-env-git.js +103 -0
- package/src/setup-env-parse.js +169 -0
- package/src/setup-env.js +685 -0
- package/src/setup-state.js +141 -0
- package/src/setup.js +317 -0
- package/src/skill-bundle.js +1 -1
- package/src/trace-contract.js +129 -0
- package/src/trace-open.js +36 -0
- package/src/transport.js +171 -0
- package/src/verify-output.js +36 -0
- package/src/verify.js +120 -0
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# metergraph-cli
|
|
2
2
|
|
|
3
|
-
The Metergraph command line tool. This is a **development preview
|
|
3
|
+
The Metergraph command line tool. This checkout is a **development preview**, version
|
|
4
|
+
`0.2.0-preview.0`, which has not been published.
|
|
4
5
|
|
|
5
|
-
Install the preview channel with npm or run it directly:
|
|
6
|
+
Install the released preview channel with npm or run it directly:
|
|
6
7
|
|
|
7
8
|
```sh
|
|
8
9
|
npx --yes metergraph-cli@next --help
|
|
@@ -10,18 +11,46 @@ npx --yes metergraph-cli@next doctor --json
|
|
|
10
11
|
npm install -g metergraph-cli@next
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
The installed command is `metergraph`. Pin `metergraph-cli@0.1.0`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
The installed command is `metergraph`. Pin `metergraph-cli@0.1.0` for that exact preview.
|
|
15
|
+
|
|
16
|
+
**Availability:**
|
|
17
|
+
|
|
18
|
+
- The published package, `metergraph-cli@0.1.0`, contains only `doctor` and
|
|
19
|
+
`skill install` / `skill update`. It has no sign in commands.
|
|
20
|
+
- `login` and `logout`, described below, exist only in this checkout. They are an
|
|
21
|
+
upcoming preview: run them from a checkout or a locally packed tarball (see
|
|
22
|
+
[Development](#development)). Do not expect them from `npx metergraph-cli` until a
|
|
23
|
+
release that includes them is announced.
|
|
24
|
+
- They also need a Metergraph service that offers Metadata-only CLI sign in and grant
|
|
25
|
+
revocation. A service without them is reported as unsupported, and the CLI never
|
|
26
|
+
falls back to broader access.
|
|
27
|
+
- The read commands `status`, `context`, `capabilities`, `usage`, `routes` and `traces`
|
|
28
|
+
also exist only in this checkout and are part of the same unpublished upcoming preview.
|
|
29
|
+
They need a project signed in with `login`.
|
|
30
|
+
- `setup` also exists only in this checkout. It guides sign in and workspace choice,
|
|
31
|
+
then requires the deployment's separate ingest bootstrap API and browser approval
|
|
32
|
+
by a member of that workspace.
|
|
33
|
+
- `verify` also exists only in this checkout. It checks one exact trace identity in an
|
|
34
|
+
explicit invocation window using Metadata access. It never sends application data.
|
|
35
|
+
|
|
36
|
+
This checkout includes:
|
|
17
37
|
|
|
18
38
|
- `doctor` checks whether a Metergraph service is reachable, healthy and supported.
|
|
19
39
|
- `skill install` and `skill update` copy the Metergraph agent skill bundled with the
|
|
20
40
|
CLI into one coding agent's project skill directory.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
- `login` and `logout` (checkout only) sign a project in to one workspace through your
|
|
42
|
+
browser with a delegated, Metadata-only grant, and sign it out again.
|
|
43
|
+
- The read commands (checkout only) use that grant to read bounded workspace Metadata:
|
|
44
|
+
connection status, workspace context, capabilities, daily usage, routes and one page
|
|
45
|
+
of trace metadata.
|
|
46
|
+
- `setup` (checkout only) guides browser sign in and workspace choice, asks for
|
|
47
|
+
ingest-only approval, writes a private project env file, confirms delivery, and
|
|
48
|
+
installs the selected client skill.
|
|
49
|
+
- `verify` (checkout only) polls for one exact processed trace in a bounded window.
|
|
50
|
+
It does not infer application provenance from a Metadata match.
|
|
51
|
+
|
|
52
|
+
It does not read retained content, replay traces, call model providers or send
|
|
53
|
+
application data. Setup does not prove that the application sent a trace.
|
|
25
54
|
|
|
26
55
|
## Requirements
|
|
27
56
|
|
|
@@ -41,10 +70,38 @@ metergraph doctor [--url ORIGIN] [--timeout-ms N] [--json]
|
|
|
41
70
|
metergraph help skill [--json]
|
|
42
71
|
metergraph skill install --client CLIENT --runtime RUNTIME [--project DIR] [--json]
|
|
43
72
|
metergraph skill update --client CLIENT --runtime RUNTIME [--project DIR] [--json]
|
|
73
|
+
metergraph help login [--json]
|
|
74
|
+
metergraph login --runtime local [--url ORIGIN] [--workspace UUID] [--project DIR] [--config-dir DIR] [--timeout-ms N] [--signup] [--no-browser] [--reconnect] [--json]
|
|
75
|
+
metergraph logout [--project DIR] [--config-dir DIR] [--json]
|
|
76
|
+
metergraph setup --runtime local (--client codex|claude|cursor | --skip-skill) [--deployment managed|customer-local|byoc|oss] [--url ORIGIN] [--workspace UUID] [--confirm-prerequisites] [--agent-token-file FILE] [--project DIR] [--config-dir DIR] [--env-file .env] [--timeout-ms N] [--signup] [--reconnect] [--no-browser] [--repair] [--json]
|
|
77
|
+
metergraph status [--project DIR] [--config-dir DIR] [--timeout-ms N] [--json]
|
|
78
|
+
metergraph context [--project DIR] [--config-dir DIR] [--timeout-ms N] [--json]
|
|
79
|
+
metergraph capabilities [--project DIR] [--config-dir DIR] [--timeout-ms N] [--json]
|
|
80
|
+
metergraph usage [--days N] [--limit N] [--project DIR] [--config-dir DIR] [--timeout-ms N] [--json]
|
|
81
|
+
metergraph routes [--limit N] [--project DIR] [--config-dir DIR] [--timeout-ms N] [--json]
|
|
82
|
+
metergraph traces [--days N] [--limit N] [--route NAME] [--status success|error] [--cursor CURSOR] [--project DIR] [--config-dir DIR] [--timeout-ms N] [--json]
|
|
83
|
+
metergraph verify (--trace-id ID | --request-id ID) --since TIME --until TIME [--source application|synthetic|demo|import|unspecified] [--days N] [--timeout-ms N] [--poll-ms N] [--max-attempts N] [--open] [--no-browser] [--project DIR] [--config-dir DIR] [--json]
|
|
44
84
|
```
|
|
45
85
|
|
|
46
86
|
`--help`, `--version` and the `skill` commands work offline and make no network
|
|
47
|
-
requests.
|
|
87
|
+
requests. `login`, `logout`, `setup`, `verify` and the read commands are not in the published `0.1.0`
|
|
88
|
+
package.
|
|
89
|
+
|
|
90
|
+
### Exact trace verification
|
|
91
|
+
|
|
92
|
+
After an application invocation, pass its exact trace ID or request ID and the
|
|
93
|
+
invocation start and end timestamps to `verify`. The optional `--source` label is a
|
|
94
|
+
caller assertion. A matching Metadata row proves a processed trace is visible in the
|
|
95
|
+
bound workspace, but does not independently prove that it came from your application.
|
|
96
|
+
The result therefore keeps `application_traffic_verified: false` until a separate
|
|
97
|
+
application instrumentation check supplies that evidence. A missing, ambiguous, stale
|
|
98
|
+
or wrong-workspace result fails closed. The command neither creates an ingest key nor
|
|
99
|
+
sends a test event.
|
|
100
|
+
|
|
101
|
+
`--open` launches only a server-provided link carrying the exact trace and the
|
|
102
|
+
verified workspace ID. The dashboard must check that ID against its signed-in
|
|
103
|
+
workspace before displaying traces. Older links without a workspace remain a
|
|
104
|
+
manual handoff; a conflicting workspace or unsafe link is refused.
|
|
48
105
|
|
|
49
106
|
### doctor
|
|
50
107
|
|
|
@@ -148,9 +205,315 @@ does not match. It never downloads the skill or runs a remote script. A new skil
|
|
|
148
205
|
revision ships only in a new CLI release; `skill update` then upgrades projects that
|
|
149
206
|
hold an unchanged earlier revision.
|
|
150
207
|
|
|
208
|
+
### login and logout (checkout only, unreleased)
|
|
209
|
+
|
|
210
|
+
`login` binds a project directory to one Metergraph workspace. Your browser does the
|
|
211
|
+
sign in, sign up, invitation and workspace consent on the service's own pages and
|
|
212
|
+
keeps its own session. The CLI receives only a delegated OAuth grant limited to the
|
|
213
|
+
Metadata scope, `agent:metadata`, checks it with the service and saves it privately.
|
|
214
|
+
|
|
215
|
+
```sh
|
|
216
|
+
metergraph login --runtime local --url https://metergraph.example.com
|
|
217
|
+
metergraph logout
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
| Option | Default | Notes |
|
|
221
|
+
| --- | --- | --- |
|
|
222
|
+
| `--runtime RUNTIME` | required | `local`: the browser runs on this machine. `cloud` and `cloud-no-shell` get a handoff to the [connection guide](https://www.metergraph.dev/docs/guides/agent-access/) with exit code 6. |
|
|
223
|
+
| `--url ORIGIN` | `https://app.metergraph.dev` | Bare origin only, see [Safe origins](#safe-origins). |
|
|
224
|
+
| `--workspace UUID` | none | The workspace you expect. Sign in fails unless the browser grants exactly this one. Without it, the workspace you choose in the browser is used after the service confirms it. |
|
|
225
|
+
| `--project DIR` | current directory | Existing project directory to bind. |
|
|
226
|
+
| `--config-dir DIR` | see below | Private per-user directory for the saved grant. |
|
|
227
|
+
| `--timeout-ms N` | `300000` | How long to wait for the browser, 1000 to 900000. |
|
|
228
|
+
| `--signup` | off | Start at the hosted sign up page, which returns to the same authorization request. Managed service only; other profiles exit 6. |
|
|
229
|
+
| `--no-browser` | off | Print the authorization URL on stderr for you to open on this machine, then wait. Not with `--json`. |
|
|
230
|
+
| `--reconnect` | off | Allow replacing a binding to a different origin or workspace. |
|
|
231
|
+
| `--json` | off | Print exactly one JSON line on stdout and nothing on stderr. |
|
|
232
|
+
|
|
233
|
+
What `login` does, in order:
|
|
234
|
+
|
|
235
|
+
1. Refuses cloud runtimes, SSH sessions, cloud development environments and CI (by the
|
|
236
|
+
presence of variables such as `SSH_CONNECTION`, `CODESPACES` or `CI`; values are
|
|
237
|
+
never read into output) before any request, listener or file write.
|
|
238
|
+
2. Reads the project binding. A project bound to another origin or workspace is refused
|
|
239
|
+
with exit code 8 unless you pass `--reconnect`. A project that is already signed in
|
|
240
|
+
and still verified is left as it is, with no browser and no new client.
|
|
241
|
+
3. Runs the same checks as `doctor`, then reads the service's OAuth metadata from the
|
|
242
|
+
same origin. Every endpoint must be a fixed path on that origin, and the service must
|
|
243
|
+
offer `agent:metadata`, PKCE with `S256`, public clients and revocation.
|
|
244
|
+
4. Registers a public client named `Metergraph CLI` for one loopback redirect,
|
|
245
|
+
`http://127.0.0.1:PORT/callback` on an ephemeral port, creates a random state and
|
|
246
|
+
PKCE verifier, and arms the callback listener and its timeout before the browser
|
|
247
|
+
opens.
|
|
248
|
+
5. Opens the authorization URL with the operating system's launcher (no shell). The
|
|
249
|
+
listener accepts one `GET` with the exact host, path and state. Other requests get a
|
|
250
|
+
fixed page and do not end the wait.
|
|
251
|
+
6. Exchanges the code and accepts only a Bearer grant for exactly `agent:metadata` whose
|
|
252
|
+
claims name this issuer, resource, client and one workspace. The claims are a sanity
|
|
253
|
+
check; the CLI does not verify token signatures.
|
|
254
|
+
7. Asks the service, with the new token, for `/v1/agent/workspace` and
|
|
255
|
+
`/v1/agent/capabilities`. The workspace ID, its provenance and the token must agree,
|
|
256
|
+
the deployment profile must match step 3, the access scopes must be exactly
|
|
257
|
+
`agent:metadata`, and content, evidence and replay capabilities must be unavailable.
|
|
258
|
+
Nothing else is read.
|
|
259
|
+
8. Saves the grant in the config directory and writes `.metergraph/project.json`.
|
|
260
|
+
|
|
261
|
+
Once the token response has been validated and holds a usable refresh token, a grant
|
|
262
|
+
the CLI decides not to keep (a workspace other than the one expected or bound, failed
|
|
263
|
+
verification, cancellation) is sent to the revocation endpoint before the command
|
|
264
|
+
exits. If the grant cannot be saved or the binding cannot be written, the saved grant
|
|
265
|
+
is removed, revocation is requested the same way, and the command exits 9. This is best
|
|
266
|
+
effort: the service may not answer or may not confirm, and the CLI does not retry. A
|
|
267
|
+
token response that fails validation is dropped without a revocation request, because
|
|
268
|
+
the CLI cannot safely use anything in it; a server-side grant may remain active until it
|
|
269
|
+
expires or is revoked from the service.
|
|
270
|
+
|
|
271
|
+
The config directory is `--config-dir`, else `METERGRAPH_CONFIG_DIR` (an absolute
|
|
272
|
+
path), else `~/.config/metergraph` on Linux and macOS or `AppData\Roaming\Metergraph` in
|
|
273
|
+
your Windows profile. It holds `credentials/SLOT.json`:
|
|
274
|
+
|
|
275
|
+
- On Linux and macOS the directories must be `0700` and the file `0600`, all owned by
|
|
276
|
+
you. Existing paths with other permissions, other owners or symbolic links are
|
|
277
|
+
refused and never changed.
|
|
278
|
+
- On Windows the grant is encrypted with DPAPI for the current user before it is
|
|
279
|
+
written. File permissions alone are not relied on there.
|
|
280
|
+
|
|
281
|
+
`.metergraph/project.json` holds the origin, workspace ID, deployment profile and the
|
|
282
|
+
name of the credential slot. It holds no token, user name or absolute path, so it is
|
|
283
|
+
safe to commit. Other files in `.metergraph`, such as the skill receipt, are kept.
|
|
284
|
+
|
|
285
|
+
Access tokens near expiry are refreshed once, under a lock, and the new refresh token
|
|
286
|
+
is saved before it is used. If a refresh request may have reached the service but its
|
|
287
|
+
result was not saved (a timeout after sending, a dropped connection, a server error or
|
|
288
|
+
an unusable answer), the old refresh token is never sent again: the next use asks you
|
|
289
|
+
to run `login` again. A revoked grant or lost workspace access fails closed with exit
|
|
290
|
+
code 12.
|
|
291
|
+
|
|
292
|
+
`logout` asks the service to revoke the project's grant through its revocation
|
|
293
|
+
endpoint, then removes the saved grant and `.metergraph/project.json`. Other credential
|
|
294
|
+
slots and project files are kept. A `200` from the service means it accepted the
|
|
295
|
+
revocation request. If it does not answer `200`, local sign out still happens and the
|
|
296
|
+
command exits 13 with `revocation: "unconfirmed"`. A project that is not signed in
|
|
297
|
+
exits 0 without any request.
|
|
298
|
+
|
|
299
|
+
### setup (checkout only, unreleased)
|
|
300
|
+
|
|
301
|
+
Run setup once from a project directory, choosing the coding client that will use
|
|
302
|
+
the skill:
|
|
303
|
+
|
|
304
|
+
```sh
|
|
305
|
+
metergraph setup --runtime local --client codex --project /path/to/project
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
For a customer-local bundle, point setup at its installed origin and exact
|
|
309
|
+
workspace:
|
|
310
|
+
|
|
311
|
+
```sh
|
|
312
|
+
metergraph setup --runtime local --deployment customer-local --url http://localhost:8080 --workspace 11111111-1111-4111-8111-111111111111 --confirm-prerequisites --client codex
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
`--confirm-prerequisites` records the operator's attestation that the released
|
|
316
|
+
signed bundle, registry invitation, local admin, and separate Metadata access
|
|
317
|
+
prerequisites are ready. It is not proof of bundle publication or registry
|
|
318
|
+
access. Setup checks the live deployment profile before login. BYOC uses
|
|
319
|
+
`--deployment byoc` and an explicit HTTPS private origin; its provisioning,
|
|
320
|
+
network, and identity prerequisites remain the operator's work. An optional
|
|
321
|
+
`--agent-token-file` can verify a separate Metadata credential for either
|
|
322
|
+
route. OSS uses separate `MG_TOKENS` ingestion and `MG_AGENT_TOKENS` read
|
|
323
|
+
credentials; `--deployment oss` verifies its Metadata route with a private
|
|
324
|
+
agent token file and hands ingest configuration to the operator. It does not
|
|
325
|
+
try hosted login or ingest bootstrap against OSS. Remote runtimes are handed
|
|
326
|
+
off to a local machine, with no implicit tunnel or credential forwarding.
|
|
327
|
+
|
|
328
|
+
If the project has no usable Metadata sign in, `setup` opens the deployment's
|
|
329
|
+
browser sign in and workspace choice. `--signup` starts at hosted sign up;
|
|
330
|
+
`--workspace UUID` requires that exact workspace. An existing binding to a
|
|
331
|
+
different origin or workspace requires explicit `--reconnect`. The selected
|
|
332
|
+
deployment must advertise `metergraph.cli-setup/v1` on its own origin. Setup
|
|
333
|
+
refuses reconnecting an existing ingest family to another workspace; its
|
|
334
|
+
original workspace must be restored before that family can be reused. Setup
|
|
335
|
+
checks the env file and Git state, then opens the deployment's consent page. An
|
|
336
|
+
owner or member of the verified workspace approves an ingest-only key. The CLI
|
|
337
|
+
redeems the single-use receipt, writes `METERGRAPH_APP_TOKEN` and
|
|
338
|
+
`METERGRAPH_INGEST_URL` into `.env`, checks the new key with the service, and
|
|
339
|
+
acknowledges delivery. It then installs the bundled skill for `codex`, `claude`
|
|
340
|
+
or `cursor`. Use `--skip-skill` only if you intentionally want to install it
|
|
341
|
+
later. Neither sign in nor setup requests Debug or Replay access. The browser
|
|
342
|
+
page shows the workspace and the consequence of approval. A signed-in browser
|
|
343
|
+
on another workspace must switch in Metergraph and rerun; the CLI does not
|
|
344
|
+
switch it automatically.
|
|
345
|
+
|
|
346
|
+
The env file must be a project-relative `.env`, `.env.<name>` or `<name>.env`
|
|
347
|
+
(`--env-file` selects another). The writer refuses tracked files, links,
|
|
348
|
+
ambiguous dotenv syntax and unsafe paths. It adds a project `.gitignore` rule
|
|
349
|
+
when needed and makes the env file private; Windows uses a user-only ACL.
|
|
350
|
+
The env token is never printed, read from argv or stdin, or copied to the
|
|
351
|
+
project's setup state file. An already working key is checked and reused without
|
|
352
|
+
another browser approval.
|
|
353
|
+
|
|
354
|
+
`.metergraph/setup.json` holds a family UUID, its current key ID and fixed state,
|
|
355
|
+
but no credential. It is written before approval. If the redemption response is
|
|
356
|
+
lost, a rerun asks for a new browser approval for that same family. The server
|
|
357
|
+
resolves the request to creation if no key was issued or replacement of that
|
|
358
|
+
family's pending key if one exists; the old receipt is not retried. If an
|
|
359
|
+
acknowledged key no longer verifies or its env file was lost, use `--repair`
|
|
360
|
+
to explicitly approve replacement of that exact key.
|
|
361
|
+
An unsafe or changed state file is refused. If the earlier approval never
|
|
362
|
+
reached redemption, rerun the command; the `create` intent is still safe.
|
|
363
|
+
|
|
364
|
+
The JSON result includes a secret-free `receipt` with the origin, workspace ID,
|
|
365
|
+
deployment profile, selected client, and completed and pending steps. A skill
|
|
366
|
+
conflict leaves the delivered key in place and reports `credential_ready_skill_pending`;
|
|
367
|
+
resolve the skill file conflict and rerun setup without another approval.
|
|
368
|
+
Success means the key was delivered and the project is ready to instrument.
|
|
369
|
+
It does **not** mean application traffic has arrived. Run your application and
|
|
370
|
+
verify one exact trace afterward. This checkout and the matching server slice
|
|
371
|
+
are development work; neither their availability on a deployed service nor a
|
|
372
|
+
published package has been established by these local tests.
|
|
373
|
+
|
|
374
|
+
### Read commands (checkout only, unreleased)
|
|
375
|
+
|
|
376
|
+
The read commands use the grant `login` saved for this project. They never open a
|
|
377
|
+
browser, never sign in on their own and never request another scope. Each one:
|
|
378
|
+
|
|
379
|
+
- reads `.metergraph/project.json` and the saved grant, and refreshes the grant at most
|
|
380
|
+
once, under the same lock and rules as `login` (an interrupted refresh is never
|
|
381
|
+
retried with a possibly used token);
|
|
382
|
+
- asks the service for `/v1/agent/workspace` and `/v1/agent/capabilities` and checks,
|
|
383
|
+
as `login` does, that the workspace, deployment profile and `agent:metadata` scope
|
|
384
|
+
still match the binding and that content, evidence and replay are unavailable;
|
|
385
|
+
- sends only `GET` requests to fixed paths on the bound origin, follows no redirects and
|
|
386
|
+
reads at most 1 MiB of a response;
|
|
387
|
+
- runs every request, including a refresh and any wait for another command that is
|
|
388
|
+
refreshing the same grant, within one total `--timeout-ms` deadline (1000 to 60000,
|
|
389
|
+
default 15000), which is never reset per request or page. A deadline exits 4
|
|
390
|
+
(`timeout`) and Ctrl+C exits 17, also while waiting for that lock; a lock held by
|
|
391
|
+
another process is never removed or taken over;
|
|
392
|
+
- prints only fields it validated. Unknown response fields are ignored and never named.
|
|
393
|
+
A metadata row that holds a field such as `prompt`, `messages`, `tool_calls` or
|
|
394
|
+
`access_token` is refused as a whole (exit 11). Names that contain control or
|
|
395
|
+
formatting characters are shown as `null`. Service warning and error text is not
|
|
396
|
+
printed. If any printed value, such as a workspace name, route name, cursor or
|
|
397
|
+
provenance source, contains a token the CLI holds for this project, nothing is
|
|
398
|
+
printed and the command exits 11 with `credential_in_metadata_response`.
|
|
399
|
+
|
|
400
|
+
Read commands do not change workspace configuration or telemetry, send no ingest data
|
|
401
|
+
and call no model provider. They are not side-effect free on the service: a command may
|
|
402
|
+
refresh its own saved grant, and the service may update its audit records and last used
|
|
403
|
+
times for the grant.
|
|
404
|
+
|
|
405
|
+
| Command | Request | What it prints |
|
|
406
|
+
| --- | --- | --- |
|
|
407
|
+
| `status` | `GET /healthz` and `GET /v1/deployment` (no credentials, checked as `doctor` does), then the two checks above | `configured`, `reachable`, `healthy`, `authenticated`, the bound (`intended`) and verified (`actual`) workspace, the bound deployment profile and `deployment_profile_verified`, scopes and capability flags. A `/v1/deployment` profile that differs from the binding exits 11 with `profile_mismatch` before the grant is used. `application_traffic_verified` is always `false`: a signed in project, existing data or a configured SDK does not prove that your application sends traffic. |
|
|
408
|
+
| `context` | the two checks above | Workspace ID, slug, name and creation time, Metadata retention days, whether the workspace captures content (never included here) and the access scope. |
|
|
409
|
+
| `capabilities` | the two checks above | Each known agent capability with `available`, `privacy_class`, `required_scope` and flags, and the service's bounds. Privacy class descriptions are not printed. |
|
|
410
|
+
| `usage` | `GET /v1/agent/usage?days=N&limit=N` | Daily rows per route: calls, errors, cost, tokens and latency (latency may be `null`), the window, evidence completeness, warning codes and totals of the returned rows. |
|
|
411
|
+
| `routes` | `GET /v1/agent/routes` | Route name, calls, replay eligible calls, evaluation contract version and hash, and whether a description or contract exists. |
|
|
412
|
+
| `traces` | `GET /v1/agent/traces?days=N&limit=N[&route=&status=&cursor=]` | One page of trace metadata: IDs, name, status, times, span count, tokens, cost (may be `null`), routes, providers and models, plus `next_cursor`. |
|
|
413
|
+
|
|
414
|
+
Bounds and honesty rules:
|
|
415
|
+
|
|
416
|
+
- `--days` is 1 to 90 (default 7) and `--limit` 1 to 200 (default 50, or 20 for
|
|
417
|
+
`traces`). Values outside these ranges exit 2. A value above the service's own
|
|
418
|
+
advertised `max_days` or `max_rows` exits 6 with `exceeds_service_bounds`; it is never
|
|
419
|
+
reduced silently.
|
|
420
|
+
- `usage` and `traces` report `truncated` and `complete`. Totals are sums of the
|
|
421
|
+
returned rows only; when `complete` is `false` they are not workspace totals. An
|
|
422
|
+
empty window is a successful result with `empty: true`.
|
|
423
|
+
- `GET /v1/agent/routes` takes no limit or window. The CLI validates every returned row,
|
|
424
|
+
keeps the first `--limit`, and reports `server_rows`, `truncated` and
|
|
425
|
+
`truncation: "local"`. Route descriptions, constraints and evaluation contract bodies
|
|
426
|
+
are never printed; `omitted_fields` lists them.
|
|
427
|
+
- `traces` fetches exactly one page. When more exist it returns `next_cursor`; pass it
|
|
428
|
+
back with `--cursor` to read the next page. The cursor is opaque and at most 512
|
|
429
|
+
printable characters. A page whose `limit` differs from the request, or rows that do
|
|
430
|
+
not match `--status` or `--route`, exit 11. Free-text filter values are not printed
|
|
431
|
+
back.
|
|
432
|
+
- The `traces` listing prints no trace links; each row has `link: null` and the
|
|
433
|
+
page reports `link_status: "server_link_unavailable"`. Exact-trace
|
|
434
|
+
`verify --open` uses a server link only when it includes the verified
|
|
435
|
+
workspace binding.
|
|
436
|
+
- `--environment`, `--workload`, `--since`, `--until`, `--sql`, `--query`, `--content`,
|
|
437
|
+
`--include-content`, `--debug` and `--replay` are recognized and refused with exit 6
|
|
438
|
+
before any request. The agent access contract has no environment selector or
|
|
439
|
+
absolute time range, and these commands never read content or replay. `--workload`
|
|
440
|
+
is refused by this CLI version because the returned trace rows do not show which
|
|
441
|
+
workload they belong to, so a filtered page could not be verified.
|
|
442
|
+
- A capability the service does not offer to this grant exits 14 without a read. A
|
|
443
|
+
refused read exits 15 (`insufficient_scope` or `forbidden`), rate limiting exits 16
|
|
444
|
+
with `retry_after_seconds` when the service sends a whole number of seconds, and a
|
|
445
|
+
token refused during the read exits 12. Nothing is retried. Ctrl+C exits 17.
|
|
446
|
+
|
|
447
|
+
A successful `usage`, shortened:
|
|
448
|
+
|
|
449
|
+
```json
|
|
450
|
+
{
|
|
451
|
+
"schema_version": 1,
|
|
452
|
+
"command": "usage",
|
|
453
|
+
"ok": true,
|
|
454
|
+
"outcome": "ok",
|
|
455
|
+
"exit_code": 0,
|
|
456
|
+
"data": {
|
|
457
|
+
"origin": "https://metergraph.example.com",
|
|
458
|
+
"workspace": { "id": "0b5c7c1e-1a2b-4c3d-8e4f-5a6b7c8d9e01" },
|
|
459
|
+
"deployment_profile": "managed",
|
|
460
|
+
"authenticated": true,
|
|
461
|
+
"scopes": ["agent:metadata"],
|
|
462
|
+
"result": {
|
|
463
|
+
"provenance": {
|
|
464
|
+
"deployment_profile": "managed",
|
|
465
|
+
"workspace_id": "0b5c7c1e-1a2b-4c3d-8e4f-5a6b7c8d9e01",
|
|
466
|
+
"generated_at": "2026-01-08T12:00:00Z",
|
|
467
|
+
"source": "example-source"
|
|
468
|
+
},
|
|
469
|
+
"window": { "days": 7, "since": "2026-01-01T12:00:00Z", "until": "2026-01-08T12:00:00Z" },
|
|
470
|
+
"evidence": { "sources": ["telemetry"], "rows": 1, "complete": true },
|
|
471
|
+
"warnings": [],
|
|
472
|
+
"content_included": false,
|
|
473
|
+
"truncated": false,
|
|
474
|
+
"complete": true,
|
|
475
|
+
"empty": false,
|
|
476
|
+
"rows": 1,
|
|
477
|
+
"items": [
|
|
478
|
+
{
|
|
479
|
+
"date": "2026-01-02",
|
|
480
|
+
"route": "checkout-summary",
|
|
481
|
+
"calls": 40,
|
|
482
|
+
"error_calls": 2,
|
|
483
|
+
"cost_usd": 0.0125,
|
|
484
|
+
"input_tokens": 12000,
|
|
485
|
+
"output_tokens": 3400,
|
|
486
|
+
"avg_latency_ms": 820,
|
|
487
|
+
"p95_latency_ms": null
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
"totals": {
|
|
491
|
+
"scope": "returned_rows",
|
|
492
|
+
"complete": true,
|
|
493
|
+
"calls": 40,
|
|
494
|
+
"error_calls": 2,
|
|
495
|
+
"cost_usd": 0.0125,
|
|
496
|
+
"input_tokens": 12000,
|
|
497
|
+
"output_tokens": 3400
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"retry_after_seconds": null,
|
|
501
|
+
"notices": [],
|
|
502
|
+
"next_action": null
|
|
503
|
+
},
|
|
504
|
+
"error": null
|
|
505
|
+
}
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
On failure `result` is `null`, `authenticated` says whether the grant was verified
|
|
509
|
+
before the failure, and `notices` lists fixed tokens such as `rows_truncated`,
|
|
510
|
+
`evidence_incomplete`, `routes_truncated_locally`, `unsafe_text_omitted` or
|
|
511
|
+
`trace_links_unavailable`.
|
|
512
|
+
|
|
151
513
|
## Exit codes
|
|
152
514
|
|
|
153
|
-
Exit codes are stable. Changing one is a breaking change.
|
|
515
|
+
Exit codes are stable. Changing one is a breaking change. Codes 10 to 17 exist only in
|
|
516
|
+
this checkout.
|
|
154
517
|
|
|
155
518
|
| Code | Outcome | Meaning |
|
|
156
519
|
| --- | --- | --- |
|
|
@@ -160,10 +523,18 @@ Exit codes are stable. Changing one is a breaking change.
|
|
|
160
523
|
| 3 | `authentication_required` | Service is reachable, healthy and supported, and requires authentication. No workspace is connected. |
|
|
161
524
|
| 4 | `connection_failed` | The origin could not be reached, the connection failed, or the probe timed out. |
|
|
162
525
|
| 5 | `unhealthy` | The service answered but reported that it is not healthy, or answered with a server error. |
|
|
163
|
-
| 6 | `unsupported` | The service answered with a response, deployment profile or status this CLI does not support, or the skill client or runtime cannot use project skill files. Nothing was written. |
|
|
526
|
+
| 6 | `unsupported` | The service answered with a response, deployment profile or status this CLI does not support, or the skill client or runtime cannot use project skill files, or sign in cannot run in this environment. Nothing was written. |
|
|
164
527
|
| 7 | `redirect_rejected` | The service answered with a redirect. Redirects are never followed. |
|
|
165
|
-
| 8 | `conflict` | The skill target is not owned by this CLI, was modified, is unsafe, is locked or needs an explicit update. Nothing was changed. |
|
|
166
|
-
| 9 | `filesystem_error` | Project files could not be read or written. Partial changes were rolled back unless the message says otherwise. |
|
|
528
|
+
| 8 | `conflict` | The skill target is not owned by this CLI, was modified, is unsafe, is locked or needs an explicit update, or the project is bound to a different origin or workspace. Nothing was changed. |
|
|
529
|
+
| 9 | `filesystem_error` | Project or credential files could not be read or written. Partial changes were rolled back unless the message says otherwise. |
|
|
530
|
+
| 10 | `authorization_failed` | Browser authorization did not finish: it was denied, cancelled, timed out or returned an invalid callback. Nothing was saved. |
|
|
531
|
+
| 11 | `verification_failed` | The service issued a grant that does not match the requested origin, workspace, client, resource or Metadata scope. Nothing was saved. |
|
|
532
|
+
| 12 | `login_required` | No usable sign in for this project: none was saved, it expired, was revoked, lost access or could not be refreshed safely. Run login again. |
|
|
533
|
+
| 13 | `revocation_unconfirmed` | Local credentials were removed, but the service did not confirm that the grant was revoked. |
|
|
534
|
+
| 14 | `capability_unavailable` | The service does not make this read available to the project's Metadata grant. No data was read. |
|
|
535
|
+
| 15 | `permission_denied` | The service refused this read for the signed in grant, for example for a missing scope or permission. |
|
|
536
|
+
| 16 | `rate_limited` | The service asked the CLI to slow down. Nothing was retried. Try again later. |
|
|
537
|
+
| 17 | `cancelled` | A read command was interrupted before it finished. Read commands never change workspace configuration or telemetry. |
|
|
167
538
|
|
|
168
539
|
## JSON output
|
|
169
540
|
|
|
@@ -226,8 +597,8 @@ A successful `skill install`:
|
|
|
226
597
|
"status": "installed",
|
|
227
598
|
"source": {
|
|
228
599
|
"name": "metergraph",
|
|
229
|
-
"revision": "sha256-
|
|
230
|
-
"sha256": "
|
|
600
|
+
"revision": "sha256-57b920677adf",
|
|
601
|
+
"sha256": "57b920677adf62759c7221629327192a2d16b7e6034f7948ffd96cee402d4891"
|
|
231
602
|
},
|
|
232
603
|
"discovery": "pending",
|
|
233
604
|
"authenticated": false,
|
|
@@ -247,7 +618,57 @@ A successful `skill install`:
|
|
|
247
618
|
`receipt_invalid`, `locked`, `invalid_project`, `client_not_supported`,
|
|
248
619
|
`write_failed` or `bundled_skill_invalid`.
|
|
249
620
|
|
|
621
|
+
A successful `login` (checkout only):
|
|
622
|
+
|
|
623
|
+
```json
|
|
624
|
+
{
|
|
625
|
+
"schema_version": 1,
|
|
626
|
+
"command": "login",
|
|
627
|
+
"ok": true,
|
|
628
|
+
"outcome": "ok",
|
|
629
|
+
"exit_code": 0,
|
|
630
|
+
"data": {
|
|
631
|
+
"origin": "https://metergraph.example.com",
|
|
632
|
+
"runtime": "local",
|
|
633
|
+
"deployment_profile": "managed",
|
|
634
|
+
"workspace": { "id": "0b5c7c1e-1a2b-4c3d-8e4f-5a6b7c8d9e01" },
|
|
635
|
+
"scopes": ["agent:metadata"],
|
|
636
|
+
"authenticated": true,
|
|
637
|
+
"configured": true,
|
|
638
|
+
"status": "signed_in",
|
|
639
|
+
"binding": ".metergraph/project.json",
|
|
640
|
+
"credential_protection": "owner_only_file",
|
|
641
|
+
"previous_grant_revocation": null,
|
|
642
|
+
"next_action": {
|
|
643
|
+
"kind": "connected",
|
|
644
|
+
"message": "This project is signed in with Metadata access. Run \"metergraph logout\" to sign out."
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
"error": null
|
|
648
|
+
}
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
- `status` is `signed_in`, `reused` (already signed in and verified, nothing changed)
|
|
652
|
+
or `reconnected` (a new grant replaced the previous one; `previous_grant_revocation`
|
|
653
|
+
is then `accepted`, `unconfirmed` or `not_attempted`).
|
|
654
|
+
- `credential_protection` is `owner_only_file` or `dpapi`.
|
|
655
|
+
- On failure `authenticated` and `configured` are `false`, `scopes` is empty, and
|
|
656
|
+
`next_action` is `null` or a handoff such as `connection_guide`, `reconnect`,
|
|
657
|
+
`run_in_terminal` or `no_browser`.
|
|
658
|
+
- The schema version `1` is the version of this CLI's own JSON output. It is unrelated
|
|
659
|
+
to the service's agent access contract version, `metergraph.agent-access/v1`.
|
|
660
|
+
- `login` and `logout` never print tokens, the authorization code, the PKCE verifier,
|
|
661
|
+
user names, email addresses, workspace names, absolute paths or server text. The
|
|
662
|
+
read commands never print tokens, email addresses, absolute paths or server error
|
|
663
|
+
text either; `context` prints the workspace slug and name, and the read commands
|
|
664
|
+
print validated route, trace, provider and model names, as described above.
|
|
665
|
+
|
|
666
|
+
`logout` prints `local_credentials` (`removed` or `none`), `binding` (`removed`,
|
|
667
|
+
`kept` or `none`) and `revocation` (`accepted`, `unconfirmed` or `not_attempted`).
|
|
668
|
+
|
|
250
669
|
Without `--json`, results are printed as text on stdout and usage errors go to stderr.
|
|
670
|
+
`login` prints progress lines, and with `--no-browser` the authorization URL, on
|
|
671
|
+
stderr.
|
|
251
672
|
|
|
252
673
|
## Safe origins
|
|
253
674
|
|
|
@@ -259,7 +680,7 @@ Without `--json`, results are printed as text on stdout and usage errors go to s
|
|
|
259
680
|
Usernames, passwords, paths, queries and fragments are rejected before any request is
|
|
260
681
|
made. Invalid values and unknown arguments are not printed back, because a mistyped
|
|
261
682
|
argument can contain a credential. An accepted origin is printed in the output and sent
|
|
262
|
-
to the network, so do not put secrets in a hostname. See [
|
|
683
|
+
to the network, so do not put secrets in a hostname. See [Security](#security).
|
|
263
684
|
|
|
264
685
|
## Deployment profiles
|
|
265
686
|
|
|
@@ -287,6 +708,36 @@ CLI never assumes such a server is hosted.
|
|
|
287
708
|
- It does not claim a client has loaded the skill. `discovery` stays `pending`.
|
|
288
709
|
- It never prints file contents, absolute paths or raw error text.
|
|
289
710
|
|
|
711
|
+
## What login does not do
|
|
712
|
+
|
|
713
|
+
- It never asks for Debug (`agent:read`) or Replay (`agent:replay`) access, and never
|
|
714
|
+
falls back to them when the service does not offer `agent:metadata`.
|
|
715
|
+
- It never copies browser cookies or the browser's sign in.
|
|
716
|
+
- It does not create an application ingest key, and no manual API key is required. The
|
|
717
|
+
service records the grant as an OAuth connection on its own side; that connection
|
|
718
|
+
can only use `agent:metadata`, is separate from any API or ingest key you manage, and
|
|
719
|
+
is what `logout` asks the service to revoke.
|
|
720
|
+
- It reads no telemetry, retained content or traces, and makes no model provider calls.
|
|
721
|
+
- It sends the grant only to the origin it came from, follows no redirects and reads
|
|
722
|
+
bounded responses within fixed time limits.
|
|
723
|
+
- It accepts no credential on the command line, in the environment or on stdin.
|
|
724
|
+
|
|
725
|
+
## What the read commands do not do
|
|
726
|
+
|
|
727
|
+
- They never sign in, open a browser, create a grant or change the project binding.
|
|
728
|
+
The only file they may write is the saved grant, when a refresh rotates it.
|
|
729
|
+
- They never request `agent:read` or `agent:replay`, never read retained content,
|
|
730
|
+
evidence or replays, and never call a model provider.
|
|
731
|
+
- They make only `GET` requests to the read endpoints (a grant refresh, when needed, is
|
|
732
|
+
the only `POST`). They send no ingest data and change no evaluations, provider
|
|
733
|
+
settings, workspace configuration or telemetry. The service may still record the
|
|
734
|
+
access, for example audit entries and the grant's last used time.
|
|
735
|
+
- They never print a token the CLI holds, even inside an otherwise valid name.
|
|
736
|
+
- They never follow a cursor or page on their own, and never widen a request: an
|
|
737
|
+
unsupported option, an out of range value or a capability the grant lacks fails
|
|
738
|
+
instead.
|
|
739
|
+
- They accept no credential on the command line, in the environment or on stdin.
|
|
740
|
+
|
|
290
741
|
## Development
|
|
291
742
|
|
|
292
743
|
```sh
|
|
@@ -295,13 +746,20 @@ npm run test:package # npm pack into a temporary directory, clean install,
|
|
|
295
746
|
node bin/metergraph.js --help
|
|
296
747
|
node bin/metergraph.js doctor --url http://127.0.0.1:8080 --json
|
|
297
748
|
node bin/metergraph.js skill install --client claude --runtime local --project /path/to/project --json
|
|
749
|
+
node bin/metergraph.js login --runtime local --url http://127.0.0.1:8080 --project /path/to/project
|
|
298
750
|
```
|
|
299
751
|
|
|
752
|
+
The sign in and read command tests run against a synthetic loopback service and a
|
|
753
|
+
test-only browser stand-in loaded with `--import`. They prove the protocol, file
|
|
754
|
+
handling and output rules, not the real service, a real browser, real workspace
|
|
755
|
+
consent or real workspace data. The Windows DPAPI round trip
|
|
756
|
+
runs only on the Windows CI runner.
|
|
757
|
+
|
|
300
758
|
To try a packed artifact without publishing:
|
|
301
759
|
|
|
302
760
|
```sh
|
|
303
761
|
npm pack --pack-destination "$(mktemp -d)"
|
|
304
|
-
npx --yes --package=/path/to/metergraph-cli-0.
|
|
762
|
+
npx --yes --package=/path/to/metergraph-cli-0.2.0-preview.0.tgz -- metergraph --version
|
|
305
763
|
```
|
|
306
764
|
|
|
307
765
|
Do not commit tarballs or other generated files.
|
|
@@ -310,8 +768,10 @@ Do not commit tarballs or other generated files.
|
|
|
310
768
|
|
|
311
769
|
The source of truth is the public repository
|
|
312
770
|
[github.com/metergraph/cli](https://github.com/metergraph/cli), licensed Apache-2.0.
|
|
313
|
-
The first preview uses the `next` npm tag.
|
|
314
|
-
|
|
771
|
+
The first preview uses the `next` npm tag. `0.1.0` is the only published version.
|
|
772
|
+
This checkout's `0.2.0-preview.0` is not published and must not be published until
|
|
773
|
+
the service side of sign in and the Metadata read endpoints are released. Subsequent releases must pass the checks
|
|
774
|
+
below before publication.
|
|
315
775
|
|
|
316
776
|
Releases are manual. The `Release CLI` workflow (`.github/workflows/release.yml`) runs
|
|
317
777
|
only when a maintainer starts it from `main`. It does not run on tags, pushes or a
|
|
@@ -404,7 +864,13 @@ Releases from the workflow should show a provenance attestation that names
|
|
|
404
864
|
|
|
405
865
|
## Security
|
|
406
866
|
|
|
407
|
-
|
|
867
|
+
Report security issues privately through
|
|
868
|
+
[GitHub private vulnerability reporting](https://github.com/metergraph/cli/security/advisories/new)
|
|
869
|
+
for `metergraph/cli`. Do not open a public issue, and do not include real credentials,
|
|
870
|
+
tokens or customer data in a report. The security policy and the CLI's security
|
|
871
|
+
properties are in `SECURITY.md` in the
|
|
872
|
+
[source repository](https://github.com/metergraph/cli); it is not shipped in the npm
|
|
873
|
+
package.
|
|
408
874
|
|
|
409
875
|
## License
|
|
410
876
|
|
package/assets/skill/SKILL.md
CHANGED
|
@@ -12,22 +12,38 @@ Connection and troubleshooting: https://www.metergraph.dev/docs/guides/agent-acc
|
|
|
12
12
|
|
|
13
13
|
Ask for or confirm these non-secret choices. Do not guess from the agent brand:
|
|
14
14
|
|
|
15
|
-
1. Client: Claude Desktop, Claude Code, ChatGPT or
|
|
15
|
+
1. Client: Claude Desktop, Claude Code, ChatGPT, Codex or Cursor.
|
|
16
16
|
2. Execution runtime: customer machine or cloud. Codex local app/CLI/IDE is distinct from cloud execution. Claude Desktop remote connectors execute in Anthropic's cloud; Desktop local MCP is a separate mechanism. ChatGPT MCP apps execute in the cloud.
|
|
17
17
|
3. Deployment: Metergraph hosted cloud, the signed commercial customer-local bundle, a customer-owned AWS installation (`byoc-core`), or the open-source self-hosted server. These have different addresses, accounts and credentials. Staging is not a customer setup path.
|
|
18
18
|
4. Fresh workspace/installation or connecting an existing workspace. Ask for the intended workspace name and deployment origin, never a token.
|
|
19
19
|
|
|
20
20
|
Use the routing below with those four choices. Follow the matching credential and client configuration instructions in the connection guide.
|
|
21
21
|
|
|
22
|
+
For a first application trace, check the installed CLI's version and help before
|
|
23
|
+
using it. `metergraph-cli@0.1.0` supports `doctor` and project skill
|
|
24
|
+
installation; later versions may also offer `login`, `setup` and `verify`.
|
|
25
|
+
Use those commands only if the installed package lists them. Use the [first
|
|
26
|
+
trace guide](https://www.metergraph.dev/docs/start/first-trace/) for steps the
|
|
27
|
+
package does not support. A CLI login or health probe alone does not prove
|
|
28
|
+
application traffic. Verification needs an exact trace or request ID from an
|
|
29
|
+
application invocation, its time window and the intended workspace.
|
|
30
|
+
|
|
22
31
|
## Route honestly
|
|
23
32
|
|
|
24
33
|
| Client and runtime | Hosted | Customer-local bundle | Customer AWS | Open source self-hosted |
|
|
25
34
|
| --- | --- | --- | --- | --- |
|
|
26
35
|
| Claude Code or Codex on the customer machine | Keyed HTTP at `https://app.metergraph.dev/v1/agent/mcp` | Keyed HTTP at the installed local address, normally `http://127.0.0.1:8080/v1/agent/mcp` | Keyed HTTP at the customer's reachable installation address | Static `MG_AGENT_TOKENS` bearer at the OSS server address, normally `http://localhost:8787/v1/agent/mcp` |
|
|
36
|
+
| Cursor on the customer machine | Project skill supported; MCP connection not validated in this guide | Project skill supported; MCP connection not validated in this guide | Project skill supported; MCP connection not validated in this guide | Project skill supported; MCP connection not validated in this guide |
|
|
27
37
|
| Claude Desktop remote connector on an individual account | Custom connector with a scoped bearer key if Request headers are available for the account; verify tools before claiming success | Cannot reach localhost from Anthropic's cloud | Default private installation is unreachable from Anthropic's cloud; no validated public route in this guide | Cannot reach localhost from Anthropic's cloud |
|
|
28
38
|
| Claude Desktop local MCP | Separate local extension required; not supported by this guide | Docker does not install a host extension | Separate local extension required; not supported by this guide | Docker does not install a host extension |
|
|
29
39
|
| ChatGPT MCP app or cloud execution | Separate cloud client configuration; not supported by this guide | Cannot reach localhost | Default private installation is unreachable | Cannot reach localhost |
|
|
30
40
|
|
|
41
|
+
For Cursor, the published CLI can install a project skill with
|
|
42
|
+
`metergraph skill install --client cursor --runtime local` when installed.
|
|
43
|
+
Confirm Cursor discovers the skill. This does not configure MCP or sign in.
|
|
44
|
+
Use the first trace guide for instrumentation, and report the read connection
|
|
45
|
+
as unverified until a supported Cursor MCP route is tested.
|
|
46
|
+
|
|
31
47
|
For hosted Claude Desktop on an individual account, guide the human through Customize → Connectors → Add custom connector with `https://app.metergraph.dev/v1/agent/mcp`. They create a coding-agent key in the intended hosted workspace. If Request headers are available, choose No sign-in and enter a required header named `Authorization` with value `Bearer <key>` in the connector's private settings, never in chat. Request headers are in beta and may be unavailable for the account; do not claim the route works without them. They must enable the connector in a conversation. Team and Enterprise connectors may share fixed credentials across users, so do not put one person's workspace key in a shared connector. Do not present OAuth server code, a tool listing, local CLI installation or a saved configuration as connection success. Do not invent a released plugin, extension, tunnel or signup path. If a route is blocked, name the blocker and offer the customer-machine Claude Code/Codex keyed HTTP route or hosted deployment as appropriate. Do not expose localhost publicly or disable authentication as a workaround.
|
|
32
48
|
|
|
33
49
|
For a fresh hosted workspace, first ask whether the human already has a Metergraph account and workspace. Direct them to https://app.metergraph.dev/ and the signup, invitation or sign-in flow actually offered. The hosted UI can offer "Get a free API key" for self-service signup, but do not assume that button or a workspace invitation is available to everyone. If access is unavailable, direct them to their workspace owner or Metergraph. Confirm the workspace before creating a coding-agent key.
|