@beignet/devtools 0.0.2 → 0.0.4

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +117 -71
  3. package/dist/events.d.ts +16 -4
  4. package/dist/events.d.ts.map +1 -1
  5. package/dist/events.js +1 -0
  6. package/dist/events.js.map +1 -1
  7. package/dist/index.d.ts +13 -15
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +11 -13
  10. package/dist/index.js.map +1 -1
  11. package/dist/persistence.d.ts +1 -1
  12. package/dist/persistence.d.ts.map +1 -1
  13. package/dist/provider-instrumentation.d.ts +1 -1
  14. package/dist/provider-instrumentation.d.ts.map +1 -1
  15. package/dist/provider.d.ts +5 -5
  16. package/dist/provider.d.ts.map +1 -1
  17. package/dist/provider.js +10 -5
  18. package/dist/provider.js.map +1 -1
  19. package/dist/redaction.d.ts +1 -1
  20. package/dist/redaction.d.ts.map +1 -1
  21. package/dist/redaction.js +1 -0
  22. package/dist/redaction.js.map +1 -1
  23. package/dist/routes.d.ts +2 -2
  24. package/dist/routes.d.ts.map +1 -1
  25. package/dist/routes.js +3 -3
  26. package/dist/routes.js.map +1 -1
  27. package/dist/ui-model.d.ts +38 -0
  28. package/dist/ui-model.d.ts.map +1 -0
  29. package/dist/ui-model.js +1039 -0
  30. package/dist/ui-model.js.map +1 -0
  31. package/dist/ui.d.ts +1 -1
  32. package/dist/ui.d.ts.map +1 -1
  33. package/dist/ui.js +314 -163
  34. package/dist/ui.js.map +1 -1
  35. package/dist/watchers.d.ts +2 -2
  36. package/dist/watchers.d.ts.map +1 -1
  37. package/dist/watchers.js +18 -2
  38. package/dist/watchers.js.map +1 -1
  39. package/package.json +22 -2
  40. package/src/events.ts +32 -2
  41. package/src/index.ts +13 -15
  42. package/src/persistence.ts +1 -1
  43. package/src/provider-instrumentation.ts +1 -1
  44. package/src/provider.ts +12 -7
  45. package/src/redaction.ts +2 -1
  46. package/src/routes.ts +4 -4
  47. package/src/ui-model.ts +1233 -0
  48. package/src/ui.ts +314 -163
  49. package/src/watchers.ts +20 -3
  50. package/dist/audit.d.ts +0 -31
  51. package/dist/audit.d.ts.map +0 -1
  52. package/dist/audit.js +0 -55
  53. package/dist/audit.js.map +0 -1
  54. package/dist/instrumentation.d.ts +0 -114
  55. package/dist/instrumentation.d.ts.map +0 -1
  56. package/dist/instrumentation.js +0 -303
  57. package/dist/instrumentation.js.map +0 -1
  58. package/dist/trace-context.d.ts +0 -80
  59. package/dist/trace-context.d.ts.map +0 -1
  60. package/dist/trace-context.js +0 -92
  61. package/dist/trace-context.js.map +0 -1
  62. package/src/audit.ts +0 -92
  63. package/src/instrumentation.ts +0 -491
  64. package/src/trace-context.ts +0 -166
package/CHANGELOG.md CHANGED
@@ -1,5 +1,102 @@
1
1
  # @beignet/devtools
2
2
 
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 8bcb31f: Mark package READMEs with Beignet's experimental alpha status and 0.0.x stability expectations.
8
+ - 31c7e66: Deepen DB, outbox, and jobs devtools panels with domain-specific metrics, correlation fields, attempt/retry context, and richer row details. Provider instrumentation now adds provider names to typed provider events so those panels can group provider work consistently.
9
+ - d137044: Declare `@beignet/core` as a peer dependency with a lockstep version range in
10
+ every integration and provider package instead of a regular `"*"` dependency.
11
+ Installs now always resolve a single shared copy of core, so `instanceof`
12
+ checks such as `isContractError` and upload error identity keep working, and
13
+ mixed Beignet versions fail loudly at install time instead of at runtime.
14
+
15
+ If your package manager does not install peer dependencies automatically, add
16
+ `@beignet/core` to your app alongside these packages. `@beignet/nuqs` now also
17
+ declares `@beignet/react-query` as a peer dependency, and
18
+ `@beignet/provider-storage-s3` now expects you to install
19
+ `@aws-sdk/client-s3` and `@aws-sdk/s3-request-presigner` yourself, matching
20
+ how other providers treat their SDKs.
21
+
22
+ - 2da5a05: Report installed-but-unregistered optional providers as informational doctor
23
+ hints. Provider packages can declare `registration.severity: "hint"` in their
24
+ `beignet.provider` manifest metadata, and `@beignet/devtools` now uses it, so
25
+ removing `createDevtoolsProvider()` from `server/providers.ts` no longer fails
26
+ `beignet doctor --strict`.
27
+ - 1a79090: Emit Node-compatible ESM: all relative imports in published packages now carry explicit .js extensions, fixing ERR_MODULE_NOT_FOUND when running the CLI or importing package dist files under plain Node.
28
+ - 89390fe: Harden `createRateLimitHooks(...)` against client-controlled inputs. The
29
+ denial response details no longer include the bucket key — clients now see
30
+ only `scope`, `retryAfterSeconds`, and `resetAt` — and each denial emits a
31
+ `rateLimit.denied` instrumentation event with the key, scope, limit, and
32
+ window so operators keep bucket visibility through the devtools `rateLimit`
33
+ watcher. `ip`-scoped limits now default to the last `x-forwarded-for` entry
34
+ (the address appended by the platform's trusted proxy) instead of the
35
+ client-controlled first entry. The new `ipSource` option selects
36
+ `"x-forwarded-for-last"` (default), `"x-forwarded-for-first"`, or a custom
37
+ resolver function, replacing the previous `getClientIp` option.
38
+ - bff6ecf: Group devtools errors by owner, show request/trace correlation in subsystem panels, and inherit active request correlation for provider events when runtime async context is available.
39
+ - 80dc33e: Finish focused devtools subsystem panels for cache, storage, uploads, mail,
40
+ notifications, auth, audit, rate limits, and schedules, backed by a shared
41
+ panel model that the dashboard and tests both use.
42
+ - 44f1192: Move first-party provider diagnostics to package-owned `beignet.provider`
43
+ manifest metadata and have doctor read installed provider package manifests.
44
+ - 2aa77ca: Add static provider metadata and provider wiring diagnostics for generated apps.
45
+ - 89390fe: Decouple devtools from app code with server-owned instrumentation.
46
+
47
+ - `@beignet/core/tracing` is a new dependency-free subpath with the W3C trace
48
+ primitives (`TraceContext`, `createTraceContext`, `createChildTraceContext`,
49
+ `parseTraceparent`, `createTraceparent`, `createTraceId`, `createSpanId`).
50
+ App context types now use `Partial<TraceContext>` instead of importing
51
+ `DevtoolsTraceContext` from `@beignet/devtools`.
52
+ - `createServer(...)` owns request instrumentation through a new
53
+ `instrumentation` option (`ServerInstrumentationOptions | false`). The server
54
+ resolves request IDs and trace context before user hooks and context
55
+ creation, passes them to context factories as `requestId` and `trace`,
56
+ writes `x-request-id`/`traceparent` response headers by default, and records
57
+ request/error events into the instrumentation port resolved from final ports
58
+ (`ports.instrumentation`, then `ports.devtools`). The ambient request
59
+ context (`enterActiveRequestContext` and friends) moved into
60
+ `@beignet/core/server`.
61
+ - `createUseCase(...)` instruments runs by default, resolving the
62
+ instrumentation port from `ctx.ports` per run; opt out with
63
+ `instrumentation: false`. App `onRun` observers run in addition.
64
+ - `createInstrumentedAuditLog({ audit, instrumentation })` in
65
+ `@beignet/core/ports` replaces `createDevtoolsAuditLog`.
66
+ - `createServer(...)` gains `validateResponses` (default `true`) to skip
67
+ route-owned response validation, mirroring the client option.
68
+ - Removed from `@beignet/devtools`: `createDevtoolsHooks`,
69
+ `createDevtoolsUseCaseObserver`, `createDevtoolsAuditLog`, and the
70
+ trace/request-context modules. Apps now only need `createDevtoolsProvider()`
71
+ plus the devtools route; deleting both leaves the rest of the app compiling
72
+ and running unchanged.
73
+ - `@beignet/next` cron and upload helpers resolve their instrumentation sink
74
+ with `resolveProviderInstrumentationPort(ctx.ports)` instead of hardcoding
75
+ `ports.devtools`.
76
+ - `beignet create` templates generate the decoupled shape.
77
+
78
+ - 7b0f708: Add first-class outbox instrumentation and devtools visibility for delivered, retried, and dead-lettered messages.
79
+ - 4b4e909: Add structured request lifecycle details, response ownership metadata, and redaction visibility to the devtools dashboard.
80
+ - 8063d38: Rename the contract front door to `defineContract`/`defineContractGroup`, rename operational commands to tasks (`@beignet/core/tasks`, `defineTasks`, `runTask`, `beignet task run`, `beignet make task`, `server/tasks.ts`, `features/<feature>/tasks/`, `paths.tasks`), and standardize context binding: context-free declarations stay top-level (`defineEvent`), while context-bound definitions come from per-capability factories (`createListeners`, `createJobs`, `createSchedules`, `createNotifications`, `createTasks`) called once in `lib/`. Top-level context-generic `defineListener`, `defineJob`, `defineSchedule`, and `defineNotification` are removed.
81
+
82
+ ## 0.0.3
83
+
84
+ ### Patch Changes
85
+
86
+ - 4cb1784: Add first-class upload router primitives, a typed browser upload client, a
87
+ React upload adapter, Next.js upload route helper, S3-compatible direct upload
88
+ signing, devtools upload watcher support, an upload generator, and a
89
+ first-class `beignet make feature` command with optional policy, event, job,
90
+ and upload artifacts for the standard vertical slice. Add first-class job retry
91
+ helpers, outbox retry policy integration, and job retry/dead-letter devtools
92
+ events. Add a Next.js outbox drain route helper and doctor warnings for
93
+ serverless background-work footguns.
94
+ - Updated dependencies [3160184]
95
+ - Updated dependencies [254ef6d]
96
+ - Updated dependencies [4cb1784]
97
+ - Updated dependencies [8bd9085]
98
+ - @beignet/core@0.0.3
99
+
3
100
  ## 0.0.2
4
101
 
5
102
  ### Patch Changes
package/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # @beignet/devtools
2
2
 
3
+ > [!CAUTION]
4
+ > Beignet is experimental alpha software. The `0.0.x` package line is for early
5
+ > evaluation, and APIs may change between releases while the framework settles.
6
+
3
7
  Development-time event timeline for Beignet apps. It records HTTP requests,
4
- errors, use case runs, domain events, jobs, scheduled tasks, and provider
8
+ errors, use case runs, domain events, jobs, outbox delivery, schedules, and provider
5
9
  activity in a bounded in-memory buffer, then serves a live dashboard from your
6
10
  app.
7
11
 
@@ -11,31 +15,40 @@ production unless you explicitly enable it.
11
15
  ## Install
12
16
 
13
17
  ```bash
14
- bun add @beignet/devtools
18
+ bun add @beignet/devtools @beignet/core
15
19
  ```
16
20
 
17
21
  ## Next.js setup
18
22
 
19
- Register the provider and server hook:
23
+ Register the provider:
20
24
 
21
25
  ```typescript
22
- import {
23
- createDevtoolsHooks,
24
- createDevtoolsProvider,
25
- } from "@beignet/devtools";
26
+ import { createDevtoolsProvider } from "@beignet/devtools";
26
27
  import { createNextServer } from "@beignet/next";
27
28
 
28
29
  export const server = await createNextServer({
29
30
  ports,
30
31
  providers: [createDevtoolsProvider(), ...providers],
31
- hooks: [createDevtoolsHooks()],
32
- createContext: ({ req, ports }) => ({
33
- requestId: req.headers.get("x-request-id") ?? crypto.randomUUID(),
32
+ context: ({ ports, requestId, trace }) => ({
33
+ requestId,
34
+ ...trace,
34
35
  ports,
35
36
  }),
36
37
  });
37
38
  ```
38
39
 
40
+ The provider is the only devtools wiring the server needs. Request and error
41
+ events are recorded by the server's built-in instrumentation, which resolves
42
+ the provider instrumentation port from final ports (`ports.instrumentation`,
43
+ then `ports.devtools`). Configure headers, ignored paths, redaction, and
44
+ capture decisions with the `instrumentation` option on `createServer(...)` /
45
+ `createNextServer(...)`.
46
+
47
+ Registering the provider is optional. If `@beignet/devtools` is installed but
48
+ `createDevtoolsProvider()` is not registered, the server runs without devtools
49
+ and `beignet doctor` reports an informational hint that does not fail
50
+ `doctor --strict`.
51
+
39
52
  Add a catch-all route:
40
53
 
41
54
  ```typescript
@@ -52,20 +65,48 @@ Open `/api/devtools`.
52
65
 
53
66
  The dashboard connects to the event stream with Server-Sent Events and falls
54
67
  back to polling when `EventSource` is unavailable. It includes tabs for the
55
- timeline, requests, use cases, errors, domain events, jobs, schedules, providers, and
56
- provider-owned events such as database/cache/storage/core/mail/auth/audit/rate limit
68
+ timeline, requests, use cases, errors, domain events, jobs, outbox delivery, schedules, providers, and
69
+ provider-owned events such as database/cache/storage/uploads/mail/notifications/auth/audit/rate limit
57
70
  activity, and custom events.
58
- Request rows expand into correlated events that share the same `traceId` or
71
+ Request rows expand into an end-to-end lifecycle view. The detail view groups
72
+ route match, contract name, request ID, trace ID, method, path, status,
73
+ duration, response ownership, use case spans, correlated provider events, side
74
+ effects, errors, and redaction status for events that share the same `traceId` or
59
75
  `requestId`.
60
76
 
61
77
  Use the toolbar to search across event summaries, paths, messages, names,
62
78
  watchers, IDs, and details. The dashboard also includes method, status, and
63
79
  watcher filters for narrowing noisy timelines.
64
80
 
65
- Provider-owned tabs render focused panels with subsystem metrics and rows. For
66
- example, database shows query/provider context, cache shows hit and failure
67
- counts, auth shows authenticated versus guest activity, audit shows durable
68
- activity records, and rate limits show allowed versus blocked checks.
81
+ The Errors tab groups failures by owner: route, framework, provider, job,
82
+ schedule, outbox, client-side, devtools, or unknown. Each row shows the
83
+ message, owner, related route/status, request ID, trace ID, and nearby
84
+ correlated events so you can see whether a failure belongs to application code,
85
+ the framework boundary, provider work, or background execution.
86
+
87
+ Focused panels render subsystem metrics, row summaries, and drill-down fields
88
+ for each Beignet workflow primitive. Database shows query counts, failures,
89
+ inferred table names, redaction status, provider name, port, parameter count,
90
+ and request/trace IDs when the runtime can preserve active request context.
91
+ Outbox shows delivered/retry/dead-letter counts, message name/kind, attempts,
92
+ retry timing, and related request/trace context. Jobs and schedules show
93
+ lifecycle status, provider, retry/error details, cron metadata, and request
94
+ context. Cache, storage, uploads, mail, notifications, auth, audit, and rate
95
+ limits show domain-specific metrics such as hits/misses, missing objects, file
96
+ counts, recipients, channels, session state, durable audit actors/resources,
97
+ and allowed versus blocked checks.
98
+
99
+ Use the request lifecycle view first when debugging a route. It shows whether
100
+ the response was route-owned or framework-owned, which use cases ran, which
101
+ correlated provider events were recorded, which jobs/outbox/schedule/domain
102
+ events were triggered, and whether stored metadata was redacted.
103
+
104
+ The public example app has a server integration acceptance test for this graph.
105
+ It drives real HTTP write and error requests, reads the devtools events
106
+ endpoint, and verifies request rows, use-case spans, durable audit-port side
107
+ effects, and route-owned errors remain correlated by request metadata. The same
108
+ scenario also checks that Drizzle provider queries and durable outbox writes are
109
+ visible in the timeline.
69
110
 
70
111
  ## Local persistence
71
112
 
@@ -98,9 +139,10 @@ The file store writes JSONL and compacts to the most recent configured events.
98
139
  ## Trace context
99
140
 
100
141
  Devtools is OpenTelemetry-compatible without depending on the OpenTelemetry SDK.
101
- `createDevtoolsHooks()` reads incoming W3C `traceparent` headers, creates a
102
- local span when one is missing, exposes the current `traceparent` response
103
- header, and adds trace fields to captured events.
142
+ The trace primitives live in `@beignet/core/tracing`: the server reads incoming
143
+ W3C `traceparent` headers, creates a local span when one is missing, exposes
144
+ the current `traceparent` response header, and adds trace fields to captured
145
+ events.
104
146
 
105
147
  All captured events can include:
106
148
 
@@ -109,8 +151,8 @@ All captured events can include:
109
151
  - `parentSpanId`: parent span ID when the event is nested
110
152
  - `traceparent`: W3C header value for the current span
111
153
 
112
- For object contexts, the hook also adds these fields before the handler runs so
113
- use case instrumentation can attach nested spans to the request trace.
154
+ Spread the `trace` context argument into your app context so use case
155
+ instrumentation can attach nested spans to the request trace.
114
156
 
115
157
  ## Watchers
116
158
 
@@ -124,11 +166,13 @@ Built-in watchers:
124
166
  - `useCases` records application command and query execution.
125
167
  - `eventBus` records domain event publishing.
126
168
  - `jobs` records background job lifecycle events.
127
- - `schedules` records scheduled task execution.
169
+ - `outbox` records durable outbox delivery, retries, and dead letters.
170
+ - `schedules` records schedule execution.
128
171
  - `providers` records provider setup, start, and stop activity.
129
172
  - `db` records database diagnostics from first-party providers.
130
173
  - `cache` records cache diagnostics from first-party providers.
131
174
  - `storage` records storage diagnostics from first-party providers.
175
+ - `uploads` records upload preparation, signing, and completion.
132
176
  - `mail` records mail diagnostics from first-party providers.
133
177
  - `notifications` records notification intent and channel delivery.
134
178
  - `auth` records auth diagnostics from first-party providers.
@@ -145,6 +189,7 @@ createDevtoolsProvider({
145
189
  useCases: true,
146
190
  eventBus: false,
147
191
  jobs: false,
192
+ outbox: true,
148
193
  schedules: true,
149
194
  db: true,
150
195
  },
@@ -175,21 +220,19 @@ whether they are stored.
175
220
 
176
221
  ## Use case instrumentation
177
222
 
178
- Bridge the application package's `onRun` hook once in your shared use case
179
- factory:
223
+ `createUseCase(...)` from `@beignet/core/application` instruments every run by
224
+ default — no devtools-specific wiring is needed:
180
225
 
181
226
  ```typescript
182
227
  import { createUseCase } from "@beignet/core/application";
183
- import { createDevtoolsUseCaseObserver } from "@beignet/devtools";
184
228
 
185
- export const useCase = createUseCase<AppContext>({
186
- onRun: createDevtoolsUseCaseObserver<AppContext>(),
187
- });
229
+ export const useCase = createUseCase<AppContext>();
188
230
  ```
189
231
 
190
- The observer reads `ctx.ports.devtools`, `ctx.requestId`, and trace context
191
- fields by default. Use case `start`, `end`, and `error` phases share the same
192
- span when they run with the same request context.
232
+ Each run resolves the instrumentation port from `ctx.ports`
233
+ (`ports.instrumentation`, then `ports.devtools`) and reads `ctx.requestId` and
234
+ trace context fields. Use case `start`, `end`, and `error` phases share the
235
+ same span. Pass `instrumentation: false` to opt out.
193
236
 
194
237
  ## Provider instrumentation
195
238
 
@@ -200,6 +243,13 @@ instrumentation port, records through `record()`, and adds provider metadata to
200
243
  custom events. `@beignet/devtools` implements that instrumentation port
201
244
  when `createDevtoolsProvider()` is registered.
202
245
 
246
+ When provider instrumentation records an event during an active request, the
247
+ runtime preserves async request context, and the event does not already include
248
+ correlation fields, devtools adds the active `requestId`, `traceId`, and
249
+ `traceparent`. This keeps provider work correlated with the route, hook, and
250
+ use-case timeline without making providers depend on app-specific context
251
+ types.
252
+
203
253
  ```typescript
204
254
  import {
205
255
  createProvider,
@@ -244,21 +294,21 @@ integrations.
244
294
  ## Audit activity
245
295
 
246
296
  Durable audit logs should still be written through your app's `AuditLogPort`.
247
- Use `createDevtoolsAuditLog()` when you also want sanitized audit activity in
248
- the local devtools timeline:
297
+ Use `createInstrumentedAuditLog()` from `@beignet/core/ports` when you also
298
+ want sanitized audit activity in the local devtools timeline:
249
299
 
250
300
  ```typescript
251
- import { createDevtoolsAuditLog } from "@beignet/devtools";
301
+ import { createInstrumentedAuditLog } from "@beignet/core/ports";
252
302
 
253
- const audit = createDevtoolsAuditLog({
303
+ const audit = createInstrumentedAuditLog({
254
304
  audit: durableAudit,
255
- devtools: ports.devtools,
305
+ instrumentation: ports,
256
306
  });
257
307
  ```
258
308
 
259
- The wrapper records the durable audit entry first, then emits a custom devtools
260
- event owned by the `audit` watcher. Devtools remains a local diagnostic view;
261
- it is not the durable audit store.
309
+ The wrapper records the durable audit entry first, then emits a custom event
310
+ owned by the `audit` watcher into the resolved instrumentation port. Devtools
311
+ remains a local diagnostic view; it is not the durable audit store.
262
312
 
263
313
  When an audit port is transaction-scoped, emit the devtools mirror only after
264
314
  the transaction commits. Keeping the transaction-scoped audit port durable-only
@@ -338,17 +388,22 @@ events are stored. Sensitive keys such as `authorization`, `cookie`,
338
388
  `set-cookie`, `x-api-key`, `token`, `password`, `secret`, and `credentials` are
339
389
  replaced with `[redacted]`.
340
390
 
341
- Request hooks record request headers for debugging, but do not record request or
342
- response bodies by default.
391
+ Server request instrumentation records request headers for debugging, but does
392
+ not record request or response bodies by default. The dashboard marks request
393
+ lifecycle details when sensitive fields were redacted and warns if
394
+ secret-shaped metadata keys remain visible in stored events.
343
395
 
344
- You can add a custom redactor:
396
+ You can add a custom redactor through the server's `instrumentation` option:
345
397
 
346
398
  ```typescript
347
- createDevtoolsHooks({
348
- redact: (event) => ({
349
- ...event,
350
- details: scrub(event.details),
351
- }),
399
+ const server = await createNextServer({
400
+ // ...
401
+ instrumentation: {
402
+ redact: (event) => ({
403
+ ...event,
404
+ details: scrub(event.details),
405
+ }),
406
+ },
352
407
  });
353
408
  ```
354
409
 
@@ -393,15 +448,6 @@ function createProviderInstrumentation(
393
448
  ): ProviderInstrumentation;
394
449
  ```
395
450
 
396
- ```typescript
397
- function createDevtoolsAuditLog(options: {
398
- audit: AuditLogPort;
399
- devtools?: DevtoolsPort;
400
- emit?: boolean;
401
- redact?: (entry: AuditLogEntry) => AuditLogEntry;
402
- }): AuditLogPort;
403
- ```
404
-
405
451
  ```typescript
406
452
  type DevtoolsEvent =
407
453
  | RequestEvent
@@ -418,24 +464,24 @@ All events include `id`, `timestamp`, optional `requestId`, optional `watcher`,
418
464
  optional `traceId`, optional `spanId`, optional `parentSpanId`, optional
419
465
  `traceparent`, and optional redacted `details`.
420
466
 
421
- `createDevtoolsHooks()` accepts:
467
+ Request/error capture is configured on the server, not in this package. See
468
+ the `instrumentation` option on `createServer(...)` in `@beignet/core/server`:
422
469
 
423
470
  ```typescript
424
- type DevtoolsHooksOptions<Ctx> = {
425
- basePath?: string;
426
- requestIdHeader?: string | false;
427
- traceContextHeader?: string | false;
428
- getRequestId?: (args: {
429
- req: HttpRequestLike;
430
- ctx?: Ctx;
431
- response?: HttpResponseLike;
432
- }) => string | undefined;
433
- getTraceContext?: (args: {
471
+ type ServerInstrumentationOptions<Ctx> = {
472
+ requestIdHeader?: string | false; // default "x-request-id"
473
+ traceContextHeader?: string | false; // default "traceparent"
474
+ ignorePaths?: readonly string[]; // default ["/api/devtools"]
475
+ redact?: (
476
+ event: ProviderInstrumentationEventInput,
477
+ ) => ProviderInstrumentationEventInput;
478
+ shouldCapture?: (args: {
434
479
  req: HttpRequestLike;
435
480
  ctx?: Ctx;
436
- response?: HttpResponseLike;
437
- }) => DevtoolsTraceContextInput | string | undefined;
438
- redact?: DevtoolsRedactor;
481
+ contract: HttpContractConfig;
482
+ response: HttpResponseLike;
483
+ error?: unknown;
484
+ }) => boolean;
439
485
  };
440
486
  ```
441
487
 
package/dist/events.d.ts CHANGED
@@ -57,6 +57,7 @@ export interface RequestEvent extends BaseDevtoolsEvent {
57
57
  method: string;
58
58
  path: string;
59
59
  contractName?: string;
60
+ responseOwner?: "route" | "framework" | "transport" | "unknown";
60
61
  status?: number;
61
62
  durationMs?: number;
62
63
  summary?: string;
@@ -70,6 +71,7 @@ export interface ErrorEvent extends BaseDevtoolsEvent {
70
71
  stack?: string;
71
72
  contractName?: string;
72
73
  useCaseName?: string;
74
+ owner?: "route" | "framework" | "provider" | "job" | "schedule" | "outbox" | "client" | "devtools" | "unknown";
73
75
  }
74
76
  /**
75
77
  * Logged when a use case runs.
@@ -96,10 +98,20 @@ export interface EventBusEvent extends BaseDevtoolsEvent {
96
98
  export interface JobEvent extends BaseDevtoolsEvent {
97
99
  type: "job";
98
100
  jobName: string;
99
- status: "scheduled" | "started" | "completed" | "failed";
101
+ status: "scheduled" | "started" | "completed" | "failed" | "retryScheduled" | "deadLettered";
100
102
  }
101
103
  /**
102
- * Logged when a scheduled task starts, completes, or fails.
104
+ * Logged when a durable outbox message is delivered, retried, or dead-lettered.
105
+ */
106
+ export interface OutboxEvent extends BaseDevtoolsEvent {
107
+ type: "outbox";
108
+ messageId: string;
109
+ messageKind: "event" | "job";
110
+ messageName: string;
111
+ status: "delivered" | "retryScheduled" | "deadLettered";
112
+ }
113
+ /**
114
+ * Logged when a schedule starts, completes, or fails.
103
115
  */
104
116
  export interface ScheduleEvent extends BaseDevtoolsEvent {
105
117
  type: "schedule";
@@ -128,7 +140,7 @@ export interface CustomDevtoolsEvent extends BaseDevtoolsEvent {
128
140
  /**
129
141
  * Union type of all devtools events.
130
142
  */
131
- export type DevtoolsEvent = RequestEvent | ErrorEvent | UseCaseEvent | EventBusEvent | JobEvent | ScheduleEvent | ProviderEvent | CustomDevtoolsEvent;
143
+ export type DevtoolsEvent = RequestEvent | ErrorEvent | UseCaseEvent | EventBusEvent | JobEvent | OutboxEvent | ScheduleEvent | ProviderEvent | CustomDevtoolsEvent;
132
144
  /**
133
145
  * Input accepted by `createDevtoolsEvent(...)`.
134
146
  */
@@ -153,7 +165,7 @@ export type DevtoolsListener = (event: DevtoolsSubscriptionEvent) => void;
153
165
  /**
154
166
  * All built-in devtools event types.
155
167
  */
156
- export declare const DEVTOOLS_EVENT_TYPES: readonly ["request", "error", "usecase", "eventBus", "job", "schedule", "provider", "custom"];
168
+ export declare const DEVTOOLS_EVENT_TYPES: readonly ["request", "error", "usecase", "eventBus", "job", "outbox", "schedule", "provider", "custom"];
157
169
  /**
158
170
  * Check whether a string is a built-in devtools event type.
159
171
  */
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IAC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IACE,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,oBAAoB,yGAUoB,CAAC;AAEtD;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GACZ,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,CAEhC"}
package/dist/events.js CHANGED
@@ -13,6 +13,7 @@ export const DEVTOOLS_EVENT_TYPES = [
13
13
  "usecase",
14
14
  "eventBus",
15
15
  "job",
16
+ "outbox",
16
17
  "schedule",
17
18
  "provider",
18
19
  "custom",
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwLH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS;IACT,OAAO;IACP,SAAS;IACT,UAAU;IACV,KAAK;IACL,UAAU;IACV,UAAU;IACV,QAAQ;CAC2C,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAa;IAEb,OAAO,oBAAoB,CAAC,QAAQ,CAAC,KAA8B,CAAC,CAAC;AACvE,CAAC"}
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqNH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,SAAS;IACT,OAAO;IACP,SAAS;IACT,UAAU;IACV,KAAK;IACL,QAAQ;IACR,UAAU;IACV,UAAU;IACV,QAAQ;CAC2C,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAa;IAEb,OAAO,oBAAoB,CAAC,QAAQ,CAAC,KAA8B,CAAC,CAAC;AACvE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * Development-time devtools for the Beignet server.
5
5
  * Provides an in-memory event buffer and HTTP handlers to expose
6
- * framework activity (requests, use cases, errors, events, jobs, schedules, providers).
6
+ * framework activity (requests, use cases, errors, events, jobs, outbox,
7
+ * schedules, providers).
7
8
  *
8
9
  * This package is intended for development and debugging only.
9
10
  * It should not be used in production environments.
@@ -29,8 +30,8 @@
29
30
  * ```
30
31
  */
31
32
  import type { ProviderInstrumentationPort } from "@beignet/core/providers";
32
- import type { DevtoolsEvent, DevtoolsEventInput, DevtoolsListener } from "./events";
33
- import type { DevtoolsWatcher, DevtoolsWatcherName } from "./watchers";
33
+ import type { DevtoolsEvent, DevtoolsEventInput, DevtoolsListener } from "./events.js";
34
+ import type { DevtoolsWatcher, DevtoolsWatcherName } from "./watchers.js";
34
35
  /**
35
36
  * Filter options for querying devtools events.
36
37
  */
@@ -99,16 +100,13 @@ export interface DevtoolsPort extends ProviderInstrumentationPort<DevtoolsEventI
99
100
  */
100
101
  isWatcherEnabled(name: DevtoolsWatcherName): boolean;
101
102
  }
102
- export * from "./access";
103
- export * from "./audit";
104
- export * from "./events";
105
- export * from "./instrumentation";
106
- export * from "./persistence";
107
- export * from "./provider";
108
- export * from "./provider-instrumentation";
109
- export * from "./redaction";
110
- export * from "./routes";
111
- export * from "./trace-context";
112
- export * from "./ui";
113
- export * from "./watchers";
103
+ export * from "./access.js";
104
+ export * from "./events.js";
105
+ export * from "./persistence.js";
106
+ export * from "./provider.js";
107
+ export * from "./provider-instrumentation.js";
108
+ export * from "./redaction.js";
109
+ export * from "./routes.js";
110
+ export * from "./ui.js";
111
+ export * from "./watchers.js";
114
112
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAA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GAAG,OAAO,CAAC;CACtD;AAGD,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * Development-time devtools for the Beignet server.
5
5
  * Provides an in-memory event buffer and HTTP handlers to expose
6
- * framework activity (requests, use cases, errors, events, jobs, schedules, providers).
6
+ * framework activity (requests, use cases, errors, events, jobs, outbox,
7
+ * schedules, providers).
7
8
  *
8
9
  * This package is intended for development and debugging only.
9
10
  * It should not be used in production environments.
@@ -29,16 +30,13 @@
29
30
  * ```
30
31
  */
31
32
  // Re-export everything
32
- export * from "./access";
33
- export * from "./audit";
34
- export * from "./events";
35
- export * from "./instrumentation";
36
- export * from "./persistence";
37
- export * from "./provider";
38
- export * from "./provider-instrumentation";
39
- export * from "./redaction";
40
- export * from "./routes";
41
- export * from "./trace-context";
42
- export * from "./ui";
43
- export * from "./watchers";
33
+ export * from "./access.js";
34
+ export * from "./events.js";
35
+ export * from "./persistence.js";
36
+ export * from "./provider.js";
37
+ export * from "./provider-instrumentation.js";
38
+ export * from "./redaction.js";
39
+ export * from "./routes.js";
40
+ export * from "./ui.js";
41
+ export * from "./watchers.js";
44
42
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AA8FH,uBAAuB;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,MAAM,CAAC;AACrB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AA8FH,uBAAuB;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { DevtoolsEvent } from "./events";
1
+ import type { DevtoolsEvent } from "./events.js";
2
2
  /**
3
3
  * Persistence interface for devtools event stores.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../src/persistence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,IAAI,aAAa,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACpD;;OAEG;IACH,MAAM,CAAC,CACL,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAgDD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,wBAA6B,GACrC,kBAAkB,CA8EpB"}
1
+ {"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../src/persistence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,IAAI,aAAa,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACpD;;OAEG;IACH,MAAM,CAAC,CACL,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,SAAS,aAAa,EAAE,GAC/B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAgDD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,wBAA6B,GACrC,kBAAkB,CA8EpB"}
@@ -1,5 +1,5 @@
1
1
  import { type ProviderCustomInstrumentationEventInput, type ProviderInstrumentation, type ProviderInstrumentationOptions } from "@beignet/core/providers";
2
- import type { DevtoolsPort } from "./index";
2
+ import type { DevtoolsPort } from "./index.js";
3
3
  /**
4
4
  * Provider devtools instrumentation options.
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"provider-instrumentation.d.ts","sourceRoot":"","sources":["../src/provider-instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,uCAAuC,EAC5C,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACpC,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAC1C,uCAAuC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEvD;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAUpE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CAa7E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,uBAAuB,GAC/B,gBAAgB,CAKlB"}
1
+ {"version":3,"file":"provider-instrumentation.d.ts","sourceRoot":"","sources":["../src/provider-instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,uCAAuC,EAC5C,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACpC,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAC1C,uCAAuC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEvD;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,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