@deslop/scope 0.1.1208 → 0.1.1222

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
@@ -1,24 +1,11 @@
1
- # @deslop/scope
1
+ # Scope
2
2
 
3
- An Effect development debugger: a private OTLP/HTTP JSON receiver on port 4318 whose traces and logs agents query through an OAuth-protected MCP endpoint on port 5000.
3
+ An Effect development debugger: a public OTLP/HTTP JSON receiver, queried by agents through an OAuth-protected MCP endpoint reached through the [gateway](../gateway/README.md), and read by people at `https://scope.mp281x.xyz`.
4
4
 
5
- ```bash
6
- npx @deslop/scope@latest # http://127.0.0.1:4318, data in ~/.deslop/scope
7
- claude mcp add --transport http scope https://scope.mp281x.xyz/mcp
8
- claude mcp login scope --no-browser
9
- codex mcp add scope --url https://scope.mp281x.xyz/mcp
10
- codex mcp login --no-browser scope
11
- ```
12
-
13
- Trusted local exporters use `http://127.0.0.1:4318/v1/traces` and `/v1/logs` with `content-type: application/json`; never publish port 4318 to the internet. The public port serves MCP and authenticated ingestion. `HOST` changes the bind address; `PORT` changes the public port. Authorization uses Deslop Auth; no pasted API keys.
14
-
15
- ## Connection diagnostics
16
-
17
- Stored OAuth credentials do not prove the MCP connection works. Check the client's MCP status and tool discovery: Scope exposes the tools below. If startup reports `OAuth authorization required`, sign in again with that client's login command above. An auth-store reset invalidates previously saved credentials.
18
-
19
- Open the printed authorization URL in a browser on the same worker as the client. Leave it waiting: it shows a QR code and a code, which you scan with a phone where you are signed in or enter at https://auth.mp281x.xyz. The worker's browser completes its localhost callback. Do not move the callback to the phone.
20
-
21
- The public `/.well-known/oauth-protected-resource/mcp` document names the authorization server. A request without credentials gets a 401 discovery challenge; a rejected bearer adds `error="invalid_token"` and requires sign-in again. An unavailable authorization server returns 503 with `Retry-After`, not a false invalid-token challenge.
5
+ - **Runs** on dev as a service; entries under `entries/` in its data directory for three days by exporter time, at most 10 MB per export.
6
+ - **Exporters**: `https://scope.mp281x.xyz/v1/traces` and `/v1/logs`, `content-type: application/json`, from any origin without credentials; apps pass `--traces https://scope.mp281x.xyz`, phones export there directly.
7
+ - **MCP and the web page** need a Deslop sign-in through [Auth](../auth/README.md); no API keys.
8
+ - **Web page**: the traces of the last three days by service, each opened as a waterfall with its spans' attributes and logs; its RPCs (`scope.services`, `scope.traces`, `scope.trace`) answer what `list_services`, `find` and `read_trace` do.
22
9
 
23
10
  | Tool | Returns |
24
11
  | ----------------- | ---------------------------------------------------------------------------------------------------------- |
@@ -27,10 +14,11 @@ The public `/.well-known/oauth-protected-resource/mcp` document names the author
27
14
  | `measure_latency` | Span count, errors and p50, p95 and max latency over the whole window |
28
15
  | `read_trace` | One stored trace whole, including earlier runs, with parent order, offsets and logs |
29
16
 
30
- Entries persist under `~/.deslop/scope/entries/` for three days, by their exporter time.
31
-
32
17
  ## Ingestion health
33
18
 
34
- Start with `list_services`. `lastEventAt` and `runStartedAt` are Unix nanoseconds from the exporter clock, not receiver arrival times; a zero run marker means the exporter supplied no valid run start. `entries` counts records from that service's latest run. A missing service has no retained telemetry, not proof that it is healthy.
19
+ Start with `list_services`.
35
20
 
36
- Rejected requests are counted on both ingestion ports by route, HTTP status and credential-header presence (`authorization`, `cookie` or `none`). These counts cannot identify the exporting app, and anonymous public visitors also produce 401s. No credentials or request bodies are kept. `since` and each rejection's `lastAt` are receiver-clock Unix milliseconds; counters reset when Scope restarts. Scope does not export its own diagnostic traffic back into itself.
21
+ - **Times**: `lastEventAt` and `runStartedAt` are exporter-clock Unix nanoseconds; a zero run marker means no valid run start was exported.
22
+ - **`entries`** counts the latest run only; a missing service has no retained telemetry, which proves nothing about its health.
23
+ - **Rejections** per route, status and credential header (`authorization`, `cookie`, `none`); they can't name the app. No credentials or bodies kept. `since` and `lastAt` are receiver-clock Unix milliseconds; counters reset on restart.
24
+ - **No self-export**: Scope's own diagnostic traffic stays out of it.
Binary file