@aryasaatvik/motel 0.5.0 → 0.5.1
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/AGENTS.md +2 -2
- package/package.json +6 -6
- package/skills/motel-debug/references/effect.md +1 -1
- package/src/cli.ts +1 -1
- package/src/httpApi.ts +1 -1
- package/src/localServer.ts +5 -5
- package/src/mcp.ts +1 -1
- package/src/motel.ts +1 -1
- package/src/services/AsyncIngest.ts +3 -3
- package/src/services/ingestRpc.ts +2 -2
- package/src/services/telemetryWorker.ts +1 -1
- package/src/ui/aiState.ts +1 -1
- package/src/ui/atoms.ts +1 -1
- package/src/ui/serviceSelection.test.ts +1 -1
- package/web/dist/assets/index-BZhmmoqP.js +21 -0
- package/web/dist/index.html +1 -1
- package/web/dist/assets/index-BuWb6t2M.js +0 -21
package/AGENTS.md
CHANGED
|
@@ -90,7 +90,7 @@ The repo is wired up with `@effect/language-service` as a `tsconfig.json` `plugi
|
|
|
90
90
|
- `src/ui/useKeyboardNav.ts` centralises the keyboard handlers and
|
|
91
91
|
cross-pane navigation state transitions.
|
|
92
92
|
- `src/motel.ts` composes and runs the public Effect command tree; `src/cli.ts` exports typed telemetry query leaves and handlers.
|
|
93
|
-
- `src/runtime.ts` wires the Effect
|
|
93
|
+
- `src/runtime.ts` wires the Effect runtime and OTEL trace + log exporters.
|
|
94
94
|
- `src/localServer.ts` starts the local Bun OTLP/query server.
|
|
95
95
|
- `src/httpApi.ts` defines the typed Effect HttpApi surface and OpenAPI spec for the local server.
|
|
96
96
|
- `src/httpListPolicy.ts` owns pure HTTP list/search parameter decoding, bounds, cursors, and pagination metadata shaping.
|
|
@@ -118,7 +118,7 @@ The repo is wired up with `@effect/language-service` as a `tsconfig.json` `plugi
|
|
|
118
118
|
## Effect Observability Guidance
|
|
119
119
|
- Inspect the target repo’s existing Effect runtime and observability wiring before adding anything new.
|
|
120
120
|
- Prefer the repo’s existing Effect-native observability APIs if available.
|
|
121
|
-
- If `effect/
|
|
121
|
+
- If `effect/observability` is already the best fit, prefer it over adding `@effect/opentelemetry`.
|
|
122
122
|
- Only add new OpenTelemetry SDK packages when the repo already uses them or they are clearly required.
|
|
123
123
|
- Merge telemetry into the main runtime once, not per-feature.
|
|
124
124
|
- Prefer structured log annotations so fields like `sessionID`, `modelID`, `providerID`, and `tool` are queryable.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aryasaatvik/motel",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A local OpenTelemetry ingest + TUI viewer for development, backed by SQLite.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -98,10 +98,10 @@
|
|
|
98
98
|
"typescript": "^6.0.3"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@effect/atom-react": "4.0.0
|
|
102
|
-
"@effect/opentelemetry": "4.0.0
|
|
103
|
-
"@effect/platform-bun": "4.0.0
|
|
104
|
-
"@effect/platform-node-shared": "4.0.0
|
|
101
|
+
"@effect/atom-react": "4.0.0",
|
|
102
|
+
"@effect/opentelemetry": "4.0.0",
|
|
103
|
+
"@effect/platform-bun": "4.0.0",
|
|
104
|
+
"@effect/platform-node-shared": "4.0.0",
|
|
105
105
|
"@opentelemetry/api": "^1.9.0",
|
|
106
106
|
"@opentelemetry/exporter-logs-otlp-http": "^0.219.0",
|
|
107
107
|
"@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@opentelemetry/sdk-trace-node": "^2.8.0",
|
|
113
113
|
"@opentui/core": "0.4.2",
|
|
114
114
|
"@opentui/react": "0.4.2",
|
|
115
|
-
"effect": "4.0.0
|
|
115
|
+
"effect": "4.0.0",
|
|
116
116
|
"protobufjs": "7.6.4",
|
|
117
117
|
"react": "^19.2.7",
|
|
118
118
|
"scheduler": "^0.27.0"
|
|
@@ -6,7 +6,7 @@ Apply these only when the target repo already uses Effect or `@effect/*`.
|
|
|
6
6
|
|
|
7
7
|
- Inspect the existing runtime and observability wiring before adding anything new.
|
|
8
8
|
- Prefer the repo's existing Effect-native observability APIs if they already exist.
|
|
9
|
-
- If `effect/
|
|
9
|
+
- If `effect/observability` is already the best fit, prefer it over adding new OTEL packages.
|
|
10
10
|
- Merge telemetry into the main runtime once, not per feature or per request path.
|
|
11
11
|
|
|
12
12
|
## Instrumentation
|
package/src/cli.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Console, Effect, Option, References } from "effect"
|
|
2
|
-
import { Argument, Command } from "effect/
|
|
2
|
+
import { Argument, Command } from "effect/cli"
|
|
3
3
|
import { config } from "./config.js"
|
|
4
4
|
import { otelServerInstructions } from "./instructions.js"
|
|
5
5
|
import { attributeFiltersFromArgs, isAttributeFilterToken } from "./queryFilters.js"
|
package/src/httpApi.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect"
|
|
2
|
-
import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
2
|
+
import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api"
|
|
3
3
|
import {
|
|
4
4
|
AiCallSummary, AiCallDetail,
|
|
5
5
|
FacetItem, StatsItem, TraceSpanStatus,
|
package/src/localServer.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import path from "node:path"
|
|
2
2
|
import { Effect, FileSystem, Layer } from "effect"
|
|
3
3
|
import { config } from "./config.js"
|
|
4
|
-
import { HttpApiBuilder, HttpApiScalar } from "effect/
|
|
5
|
-
import * as HttpMiddleware from "effect/
|
|
6
|
-
import * as HttpRouter from "effect/
|
|
7
|
-
import * as HttpServerResponse from "effect/
|
|
8
|
-
import * as HttpStaticServer from "effect/
|
|
4
|
+
import { HttpApiBuilder, HttpApiScalar } from "effect/http-api"
|
|
5
|
+
import * as HttpMiddleware from "effect/http/HttpMiddleware"
|
|
6
|
+
import * as HttpRouter from "effect/http/HttpRouter"
|
|
7
|
+
import * as HttpServerResponse from "effect/http/HttpServerResponse"
|
|
8
|
+
import * as HttpStaticServer from "effect/http/HttpStaticServer"
|
|
9
9
|
import * as BunHttpServer from "@effect/platform-bun/BunHttpServer"
|
|
10
10
|
import { MotelHttpApi } from "./httpApi.js"
|
|
11
11
|
import { AI_LIST, LOG_LIST, LOG_STATS, SPAN_LIST, TRACE_LIST, TRACE_STATS, listMeta, logCursorArgs, paginateLogs, paginateSummaries, parseLimit, parseListParams as decodeListParams, parseLookbackMinutes, requestUrl as decodeRequestUrl, traceCursorArgs, type ListBounds, type ListParams } from "./httpListPolicy.js"
|
package/src/mcp.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { BunRuntime, BunStdio } from "@effect/platform-bun"
|
|
3
3
|
import { Effect, Layer, Logger, Schema } from "effect"
|
|
4
4
|
import { MOTEL_VERSION } from "./registry.js"
|
|
5
|
-
import { McpProtocol, McpServer, Tool, Toolkit } from "effect/
|
|
5
|
+
import { McpProtocol, McpServer, Tool, Toolkit } from "effect/ai"
|
|
6
6
|
import { TraceSpanStatus } from "./domain.js"
|
|
7
7
|
import { MotelClient, MotelClientLive } from "./motelClient.js"
|
|
8
8
|
import { Locator, LocatorLive } from "./locator.js"
|
package/src/motel.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { BunRuntime, BunServices } from "@effect/platform-bun"
|
|
4
4
|
import { Console, Effect, Layer } from "effect"
|
|
5
|
-
import { CliOutput, Command, Flag } from "effect/
|
|
5
|
+
import { CliOutput, Command, Flag } from "effect/cli"
|
|
6
6
|
import packageJson from "../package.json" with { type: "json" }
|
|
7
7
|
import { queryCommands } from "./cli.js"
|
|
8
8
|
import { applyManagedDaemonEnv } from "./daemon.js"
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
|
|
22
22
|
import * as BunWorker from "@effect/platform-bun/BunWorker"
|
|
23
23
|
import { Context, Effect, Latch, Layer, Scope, Schema } from "effect"
|
|
24
|
-
import * as RpcClient from "effect/
|
|
25
|
-
import type { RpcClientError } from "effect/
|
|
26
|
-
import type { WorkerError } from "effect/
|
|
24
|
+
import * as RpcClient from "effect/rpc/RpcClient"
|
|
25
|
+
import type { RpcClientError } from "effect/rpc/RpcClientError"
|
|
26
|
+
import type { WorkerError } from "effect/workers/WorkerError"
|
|
27
27
|
import { IngestProgress, WriterEvent, type IngestReadiness } from "../ingestReadiness.ts"
|
|
28
28
|
import { IngestRpcs } from "./ingestRpc.ts"
|
|
29
29
|
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { Schema } from "effect"
|
|
21
|
-
import * as Rpc from "effect/
|
|
22
|
-
import * as RpcGroup from "effect/
|
|
21
|
+
import * as Rpc from "effect/rpc/Rpc"
|
|
22
|
+
import * as RpcGroup from "effect/rpc/RpcGroup"
|
|
23
23
|
|
|
24
24
|
export class IngestError extends Schema.TaggedError<IngestError>()("IngestError", {
|
|
25
25
|
message: Schema.String,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { BunRuntime } from "@effect/platform-bun"
|
|
18
18
|
import * as BunWorkerRunner from "@effect/platform-bun/BunWorkerRunner"
|
|
19
19
|
import { Effect, Layer } from "effect"
|
|
20
|
-
import * as RpcServer from "effect/
|
|
20
|
+
import * as RpcServer from "effect/rpc/RpcServer"
|
|
21
21
|
import type { OtlpLogExportRequest, OtlpTraceExportRequest } from "../otlp.ts"
|
|
22
22
|
import { WriterDiagnostics, type WriterEvent } from "../ingestReadiness.ts"
|
|
23
23
|
import { IngestError, IngestRpcs } from "./ingestRpc.ts"
|
package/src/ui/aiState.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect } from "effect"
|
|
2
|
-
import * as Atom from "effect/
|
|
2
|
+
import * as Atom from "effect/reactivity/Atom"
|
|
3
3
|
import type { AiCallDetail } from "../domain.ts"
|
|
4
4
|
import { queryRuntime } from "../runtime.ts"
|
|
5
5
|
import { TelemetryStoreReadonly } from "../services/TelemetryStore.ts"
|
package/src/ui/atoms.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as Atom from "effect/
|
|
1
|
+
import * as Atom from "effect/reactivity/Atom"
|
|
2
2
|
import { config, explicitServiceName } from "../config.ts"
|
|
3
3
|
import type { LogItem, TraceItem, TraceSummaryItem } from "../domain.ts"
|
|
4
4
|
import type { ThemeName } from "./theme.ts"
|
|
@@ -20,7 +20,7 @@ describe("initial TUI service selection", () => {
|
|
|
20
20
|
|
|
21
21
|
// Fresh processes exercise import-time config and persistence without module-cache leakage.
|
|
22
22
|
const result = Bun.spawnSync([process.execPath, "--no-env-file", "--eval", `
|
|
23
|
-
import * as AtomRegistry from "effect/
|
|
23
|
+
import * as AtomRegistry from "effect/reactivity/AtomRegistry"
|
|
24
24
|
import { config } from "./src/config.ts"
|
|
25
25
|
import { selectedTraceServiceAtom } from "./src/ui/atoms.ts"
|
|
26
26
|
const registry = AtomRegistry.make()
|