Conversation
- Add validateThresholds() to createMiddleware() in all 4 packages so standalone usage validates thresholds at creation time - Add loadProbeScript() utility to all 4 packages, extracting probe bundle loading from createDeviceRouter() into a reusable export - Refactor createDeviceRouter() to use loadProbeScript() internally - Add standalone API docs (option tables, examples, quickstart) to all 4 framework API docs and package READMEs - Fix test thresholds that became invalid with eager validation
Return raw hooks from createDeviceRouter() instead of a fastify-plugin wrapped plugin. Users now wire up middleware with addHook() like every other framework adapter.
Aligns connection tier vocabulary with CPU, memory, and GPU tiers which all use 'low' | 'mid' | 'high'.
* Narrow classify() and deriveHints() to accept StoredSignals Neither function uses userAgent or viewport, which are stripped before storage. Accepting RawSignals made the API claim those fields were relevant when they never were. StoredSignals is the honest contract. * Narrow profile:store event to StoredSignals The event emitted the raw probe payload (with userAgent/viewport) but is named 'profile:store' — it should carry what was actually stored. Endpoints now emit storedSignals, and the event type matches. * Test that profile:store event strips userAgent and viewport Verifies all four middleware endpoints emit StoredSignals (without userAgent/viewport) in the profile:store event, not the raw probe payload.
Self-documenting name before 1.0 locks the cookie in. Also removes redundant `new` from `RegExp()` call in probe to stay within the 1 KB gzipped size budget.
) * Remove disableAutoplay rendering hint Redundant with deferHeavyComponents — both triggered on identical conditions (isLowEnd || isSlowConnection || isBatteryConstrained). * Normalize ConnectionThresholds field names Rename downlink2gUpperBound/downlink3gUpperBound/downlink4gUpperBound to lowUpperBound/midUpperBound/highUpperBound, matching the pattern used by CpuThresholds and MemoryThresholds.
* Add 6 additive pre-1.0 features StorageAdapter: - Add clear() to interface, implement on Memory + Redis - Add count(), keys(), has() introspection methods Events: - Add durationMs to bot:reject event for timing visibility - Add errorMessage to error events + extractErrorMessage() helper Rendering hints: - Add limitVideoQuality, useSystemFonts, disablePrefetch Probe: - Add runProbeWithRetry() with exponential backoff + jitter (ESM only, IIFE bundle unchanged at 1022 bytes) * Add .ckb/ to .gitignore * Fix PR #34 review issues: remove has(), add SCAN, fix retry on 5xx - Remove redundant has() from StorageAdapter (pure alias for exists()) - Replace Redis KEYS with SCAN-based iteration, fall back to KEYS - Fix runProbeWithRetry to retry on 5xx (was silently returning) - Extract shared probe internals to _internal.ts to eliminate duplication - Move Hono validationStart before JSON parse for consistency - Add JSDoc to durationMs fields clarifying measurement semantics - Improve extractErrorMessage to handle plain objects with .message - Add tests for 5xx retry, SCAN operations, extractErrorMessage - Update CHANGELOG with has() breaking change and migration guide
Bumps the prod-deps group with 3 updates: [hono](https://github.com/honojs/hono), [koa](https://github.com/koajs/koa) and [ioredis](https://github.com/luin/ioredis). Updates `hono` from 4.12.2 to 4.12.3 - [Release notes](https://github.com/honojs/hono/releases) - [Commits](honojs/hono@v4.12.2...v4.12.3) Updates `koa` from 3.1.1 to 3.1.2 - [Release notes](https://github.com/koajs/koa/releases) - [Changelog](https://github.com/koajs/koa/blob/master/History.md) - [Commits](koajs/koa@v3.1.1...v3.1.2) Updates `ioredis` from 5.9.3 to 5.10.0 - [Release notes](https://github.com/luin/ioredis/releases) - [Changelog](https://github.com/redis/ioredis/blob/main/CHANGELOG.md) - [Commits](redis/ioredis@v5.9.3...v5.10.0) --- updated-dependencies: - dependency-name: hono dependency-version: 4.12.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod-deps - dependency-name: koa dependency-version: 3.1.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prod-deps - dependency-name: ioredis dependency-version: 5.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prod-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the dev-deps group with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node). Updates `@types/node` from 25.3.0 to 25.3.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 25.3.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-deps ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Add publint + attw CI job to catch packaging issues - Add e2e smoke test CI job with launch helper - Widen middleware-koa peer dep to koa ^2.0.0 || ^3.0.0 - Remove obsolete DeviceRouter_PRD.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dr_sessiontodevice-router-session(Rename default cookie from dr_session to device-router-session #32)classify()andderiveHints()toStoredSignals(Narrow classify() and deriveHints() to StoredSignals #31)fasttohigh(Rename ConnectionTier value 'fast' to 'high' #30)^2.0.0 || ^3.0.0Included PRs
#28, #29, #30, #31, #32, #33, #34, #36, #37