@deslop/scope 0.1.1222 → 0.1.1227

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,13 @@
1
1
  # Scope
2
2
 
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`.
3
+ A debugger for Effect apps: it receives their traces and logs, and agents query them.
4
4
 
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.
5
+ ```bash
6
+ npm install --global @deslop/scope
7
+ scope service install --url https://scope.mp281x.xyz --auth https://auth.mp281x.xyz
8
+ ```
9
9
 
10
- | Tool | Returns |
11
- | ----------------- | ---------------------------------------------------------------------------------------------------------- |
12
- | `list_services` | Every stored service's latest run, runtime, last event time and entry count, plus rejected-export counters |
13
- | `find` | Matching traces, spans with their OTLP fields, or logs, newest or slowest first, with the total count |
14
- | `measure_latency` | Span count, errors and p50, p95 and max latency over the whole window |
15
- | `read_trace` | One stored trace whole, including earlier runs, with parent order, offsets and logs |
10
+ - **Send** telemetry by starting other apps with `--traces https://scope.mp281x.xyz`; it accepts OTLP/HTTP JSON from anywhere and keeps three days.
11
+ - **MCP** at `/mcp`: `list_services`, `find`, `read_trace`, `measure_latency`.
16
12
 
17
- ## Ingestion health
18
-
19
- Start with `list_services`.
20
-
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.
13
+ Common flags and service commands: [Deslop app runtime](https://github.com/MP281X/deslop/blob/main/packages/runtime/README.md).
package/dist/server.js CHANGED
@@ -86293,7 +86293,7 @@ function layerKeyValueStore(directory) {
86293
86293
  unwrap$7(map$5(dataDirectory, layerKeyValueStore));
86294
86294
  const layerProtocol = mergeAll$1(layerSchemaBinary(), succeed$6(MaxBodySize)(mebibytes(10)));
86295
86295
  const layerTelemetry = unwrap$7(gen(function* () {
86296
- const name = yield* appName;
86296
+ const name = (yield* packageMetadata).name;
86297
86297
  return match$8(yield* option(String$5("OTEL_URL")), {
86298
86298
  onNone: () => empty$10,
86299
86299
  onSome: (url) => layerOtlp(`${name}-server`, url, "server")
@@ -86439,17 +86439,20 @@ function systemctl(...args) {
86439
86439
  const unitDirectory = gen(function* () {
86440
86440
  return (yield* Path$1).join(yield* String$5("HOME"), ".config", "systemd", "user");
86441
86441
  });
86442
- const install = fnUntraced(function* (name, command) {
86442
+ const install = fnUntraced(function* (name, command, options) {
86443
86443
  const fs = yield* FileSystem;
86444
86444
  const path = yield* Path$1;
86445
86445
  const home = yield* String$5("HOME");
86446
86446
  const directory = yield* unitDirectory;
86447
86447
  const unit = `deslop-${name}.service`;
86448
86448
  yield* fs.makeDirectory(directory, { recursive: true });
86449
- yield* fs.writeFileString(path.join(directory, unit), `[Unit]\nDescription=Deslop ${name}\nAfter=network-online.target\n\n[Service]\nType=simple\nEnvironment=NODE_ENV=production\nEnvironment=${systemdArgument(`PATH=${home}/.vite-plus/bin:/usr/local/bin:/usr/bin:/bin`)}\nEnvironmentFile=-${systemdArgument(`${home}/.deslop/${name}.env`)}\nExecStart=${join$2(map$8(command, systemdArgument), " ")}\nRestart=on-failure\nRestartSec=3\nUMask=0077\n\n[Install]\nWantedBy=default.target\n`, { mode: 384 });
86449
+ yield* fs.writeFileString(path.join(directory, unit), `[Unit]\nDescription=Deslop ${name}\nAfter=network-online.target\n\n[Service]\nType=simple\nEnvironment=NODE_ENV=production\nEnvironment=${systemdArgument(`PATH=${home}/.vite-plus/bin:/usr/local/bin:/usr/bin:/bin`)}\nEnvironmentFile=-${replaceAll("%", "%%")(`${home}/.deslop/${name}.env`)}\nExecStart=${join$2(map$8(command, systemdArgument), " ")}\nRestart=on-failure\nRestartSec=3\nUMask=0077\n\n[Install]\nWantedBy=default.target\n`, { mode: 384 });
86450
86450
  yield* systemctl("daemon-reload");
86451
86451
  yield* systemctl("enable", unit);
86452
- yield* systemctl("restart", unit);
86452
+ yield* systemctl(match$1(options?.restart === false, {
86453
+ onFalse: () => "restart",
86454
+ onTrue: () => "start"
86455
+ }), unit);
86453
86456
  return `${unit} installed\n`;
86454
86457
  });
86455
86458
  const installUpdates = fnUntraced(function* (name, command) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deslop/scope",
3
- "version": "0.1.1222",
3
+ "version": "0.1.1227",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/MP281X/deslop",
@@ -31,5 +31,5 @@
31
31
  "engines": {
32
32
  "node": ">=26"
33
33
  },
34
- "fingerprint": "a15b13f9f48cda6e7fbe56e1cf42e57e684ab7829c517dbd4d361895804b8a7b"
34
+ "fingerprint": "f9689b8b84b7a0a2be75924eef22d9c79970ed10060bf792c678eaac3d9940af"
35
35
  }