<!-- Generated by `pnpm changelog:generate` from the "## Release notes" sections of merged pull requests. Do not edit this file by hand: change the PR's release notes and regenerate. -->

# @kya-os/checkpoint-wasm-runtime

## 1.17.0 - 2026-11-19

### Added

- a host whose `browserPosture` turns on `allowLoopbackOrigins` logs one warning (`console.warn`) that the option is for development only, so the Express and Next.js middleware warn too. (#8113)
- with a loopback-only `browserPosture` (no `origin`), the browser-integrity step-up challenge names the verified page origin as its audience. (#8113)

### Changed

- Network failures and HTTP 5xx responses that cause detection reports to be dropped are logged only when debug mode is enabled. (#7961)
- The engines carry a refreshed OpenAI signing-key record (the same key, valid for longer), so a process that has not applied the signed key feed yet still verifies ChatGPT agent signatures. (#8154)

### Fixed

- Detection reporting warns once per API key and reporting endpoint in each process when the dashboard rejects a key. (#7961)
- When a bundler rewrites the URL the Node engine reads its `.wasm` from, as Next.js does in a Server Component or a Server Function, `EngineLoadError` now says to install `@kya-os/checkpoint-wasm-runtime` as a direct dependency and add it to `serverExternalPackages`, instead of telling you to check the deployment. (#7984)

## 1.16.0 - 2026-11-16

### Breaking changes

- Changed: `makeCheckpointPipeline` throws in enforce mode when it would read the project's policy and `apiKey` is missing, since the policy API refuses a read without the project's key.
  It used to build, read the policy on every request and answer 503.
  In observe mode it reads nothing, serves every request on the engine's decision, and logs one warning at startup. (#6973)
- Changed: Because browser posture needs `projectId`, an enforce-mode configuration with `browserPosture` and no `apiKey` also throws when the pipeline is built. (#6973)

### Added

- The engine (0.8.0) marks an unsigned browser request Human at confidence 85, with `detection_basis` `client_interaction`, when its client reports interaction and nothing points the other way. A failed host nonce check (`clientIntegrity.nonceFailed`) makes the request a bot at 96. An automation tool's default 800x600 viewport, with reported behaviour and no interaction, makes it a bot at 70. (#6825)
- `clientIntegrity` on plain-HTTP requests, `keyEvents` and `touchEvents` in behavioural signals, and the engine settings `clientInteractionHuman` and `clientViewportTell` (both on by default). (#6825)
- On a Node host without a resolution warmer, the pipeline reads the project's policy once when it is built, so a refused key or an unreachable origin is logged before the first request; the first requests wait for that read. (#6973)
- an optional `clientAddressShadow` on the detection reporter's context, carried to the dashboard unchanged. (#7115)
- optional `ipRoutingType` on `NetworkContext` (the type comes from checkpoint-shared). The engine does not read or echo it. (#7368)
- `NetworkContext` gains an optional `ipReputation` whose `attackSource` and `spamSource` are optional, and the `IpReputation` type is exported from the engine entry points. (#7384)
- `hasKyaSignatureMember`, which reports whether a request's `Signature` and `Signature-Input` headers carry a KYA signature member. (#7397)
- `VerifyRequestOpts.httpDelegation` lets a host pass the engine its resource-owned HTTP agent-lane requirements (resource DID and required scopes) in the Node and edge orchestrators. Hosts that omit it behave as before. (#7409)
- `telemetryBatchSize` and `telemetryFlushIntervalMs` on `DetectionReporterConfig` and `CheckpointHostConfig`, `flushDetectionReports()` to send waiting reports before a service exits, and `makeReportSender` for hosts that report their own payloads. (#7338)
- `VerifyResult.vendorKeyMiss`, the vendor key miss a verify raised, as `{ keyid, reason }` with reason `unknown-key` or `expired-key`, in the shape `feedNoteMiss` takes; absent when the verify raised none. A Tier 1 failure's `detectionDetail.metadata` also names the keyid the signature declared, as `tier1_failure_keyid`. (#7691)

### Changed

- A disclosed `client.automationTag` classifies the request as a headless browser, as `client.webdriver` does. A request with more than one user-agent header is read consistently: every check reads the last one, the one the classifier scores. (#6825)
- The detection reporter warns about a refused API key (HTTP 401 or 403) at most once a minute, with the number of reports dropped since the previous warning, instead of once per report. (#6973)
- `verifyRequest` in the bundler, Node and edge orchestrators returns the engine's verdict for a presented KYA credential as it is, with no host-side check after it. The engine blocks a presented credential it cannot verify, with the `kyaos/*` code as the block reason, and the presented-credential parity tests hold every runtime to that, so decisions are unchanged. (#7126)
- Load trusted roots while translating a request after the detection engine is ready, preserving the policy startup gate. (#7294)
- The detection reporter sends reports in batches instead of one request each: up to `telemetryBatchSize` (default 200, at most 500) per gzip POST, or whatever has gathered after `telemetryFlushIntervalMs` (default 2000); the first report after a quiet window is sent at once. Every request is still reported, humans included, now with the time it was reported in `context.timestamp` and, once a response has shown how far the host's clock is from the server, that offset in whole minutes in `X-Checkpoint-Clock-Offset`; reports the dashboard refuses as `clock_skew` are resent once with the offset that refusal's `Date` header shows. Set `telemetryBatchSize: 1` to send each report on its own. (#7338)
- Seven scripted HTTP clients are now classified as the bot `HTTP Client` instead of going unclassified: `python-httpx`, `Python-urllib`, `urllib3`, `node`, `Ktor client`, `req` and `goutils.ghttpclient`. A rule that acts on bots now applies to them, including a site's own services that send one of these default user agents. (#7350)

### Fixed

- The detection reporter that Express and Next.js use no longer loses a report when the dashboard has a brief failure. Each report carries an `eventId`, and the reporter sends it again after a 429, 502, 503 or 504, a network error or a timeout. It makes at most three attempts, honouring `Retry-After` up to 5 seconds, and the dashboard stores a report it receives more than once only once. Other 4xx and 5xx responses are not retried, and the request never waits on the report. A report that is still dropped is logged once at warn level, without its payload, whether or not `debug` is set. (#6896)
- The detection reporter sends `isAgent` by the detection class, as the dashboard stores it: a bot (an AI crawler, a search bot, a headless browser or a tool) is reported as an agent, where it was reported `isAgent: false` and corrected at ingest. `detectionDetail.isAgent`, which `onResult` reads, is unchanged. The dashboard keeps the reported flag with each detection, so these rows now read as agents in the public detections API (`GET /api/v1/projects/{id}/detections`, its `isAgent` field and `botType` filter) and the bot-detection dashboard; rows stored before this release keep `isAgent: false` there. (#6913)
- In observe mode, a project policy that cannot be read (the policy API is down or refuses the key) or cannot be evaluated no longer refuses the request: the engine's decision stands, and the first such fault is warned once per process.
  Enforce mode still answers 503. (#6973)
- the bundled engines no longer flag DuckDuckGo browser, Sogou Mobile Browser, TikTok in-app webview and Android users whose phone model contains a word like bot or agent as automation, and now flag the Google-CWS and meta-externalads crawlers. (#7251)
- the bundled engines no longer raise bot confidence for missing browser headers on their own, and weigh a browser claim that conflicts with the connection only beside other evidence. (#7291)
- the bundled engines count a Cloudflare bot score once when a scanner hint repeats it. (#7387)
- The engine's compiled OpenAI signing key is re-stamped. The compiled copy had expired on 2026-10-29, so an engine that had not yet applied the vendor key feed refused ChatGPT's signatures as `key_expired`. (#7691)

## 1.15.0 - 2026-10-22

### Added

- `HttpSignedRequest` gains `body` (the engine field already existed). The orchestrator fills it only for a
  `kya=` signature; the vendor `sig1` path is unchanged. (#6147)
- `IncomingHttpLike` gains `rawBody`: the body bytes exactly as received. Hosts that hold the wire bytes should
  set it. Without it the orchestrator falls back to `body` (exact for a Buffer or string; a parsed object, or a bare
  `false`, `true` or number from a non-strict JSON parser, is re-serialised as compact JSON, which verifies only if the
  client sent compact JSON; `null` means the host never read the body). A parsed object is never turned into bytes
  when the request's `Content-Length` and `Transfer-Encoding` declare no body, so Express body-parser's `{}` on a
  signed GET is not mistaken for a body. (#6147)

### Changed

- The engines are rebuilt; detection is unchanged, and `EngineInfo.rulesetHash`'s t2 slot moves because the engine now compiles its own copy of the vendor IP ranges. (#6729)

### Fixed

- `verifyRequest` and `verifyRequestEdge` never gave the engine the body of a kya-http/2 signed request. The
  engine checks the signed `Content-Digest` against that body, so every kya-http/2 request with a body was refused as
  `kyaos/invalid-signature`. Present since the KYA HTTP Binding landed (#2869), including 1.10.0. (#6147)

### Security

- A kya-http/2 request that declares a body (`Content-Length` above 0, or `Transfer-Encoding` with bytes)
  that the engine never received is refused with `kyaos/profile-violation` (403), the engine's own answer for an
  unsigned body; an engine Block stands unchanged. Before, the engine treated a request as having a body only when it
  got body bytes or saw `Content-Digest`, so a signer that sent a body without `Content-Digest` (so never signed it)
  was permitted whenever the host could not supply the bytes. Both orchestrators now refuse it, including requests
  relayed to a metadata-only endpoint. HTTP/2 can carry a body with neither header; a host that can read the body
  must pass its bytes. An empty body the host read (a 0-byte `rawBody`) under `Transfer-Encoding` alone is an empty
  chunked body and is not refused; under a `Content-Length` above 0 it still is. (#6147)

## 1.14.0 - 2026-10-22

### Breaking changes

- Changed: `verifyRequest` and `verifyRequestEdge` verify in engine-directed mode: the engine names the DID documents and status lists a request needs and the orchestrator fetches only those, through a resolution host. A status list that cannot be fetched or verified is now answered by the engine as `kyaos/status-pending` (503, `Retry-After: 1`) instead of an error the orchestrator throws. (#6600)
- Removed: `didResolver` and `statusListCache` from `VerifyRequestOpts` and `EngineDefaults`, and `warmer` from `VerifyRequestOpts`. Pass a `resolutionHost` (`makeResolutionHost`) instead; the default is one inline host per process. (#6600)
- Changed: `makeResolutionWarmer` takes the orchestrator entry's `resolutionEngine` and an optional `fetch` instead of `resolve`, and exposes its cache-only `host` for `resolutionHost`; `tryGetDidDoc` is gone. (#6600)
- Removed: `verifyRequestEdge`'s `didResolver`, `statusListCache` and `warmer` options, and the edge path that read them; the edge orchestrator answers the engine's needs with a resolution host. (#6647)
- Removed: `decodeDidKey`, `DidResolverOpts`, `StatusListCacheOpts`, `MAX_STATUS_LIST_BODY_BYTES`, `MAX_STATUS_LIST_TTL_MS`, the DID resolver and status-list error classes (`DidNotFound`, `DidResolverError`, `DidResolverTimeout`, `MalformedDid`, `UnsupportedDidMethod`, `UnsupportedKeyType`, `MalformedStatusList`, `StatusListTimeout`, `StatusListUnavailable`) and the deprecated `ResolutionWarmer` interface. (#6647)
- Removed: `DidDocument.keyPurposes`, which only the removed DID resolver set. (#6647)
- Removed: `policyEvaluator` and `reputationBaseline` from `VerifyRequestOpts` and `EngineDefaults`, `adapters.policyEvaluator` and `reputationBaseline` from `EngineDefaultsOptions` and `CheckpointHostConfig`, and the `TenantPolicy` and `PolicyEvaluatorOpts` types. The orchestrators hand the engine a Permit tenant decision, so no TS code produces a Block; a tenant's rules are Cedar. A host that still passes either option has it ignored. (#6678)

### Added

- `makeResolutionHost` and `ResolutionCall`, the `resolutionEngine` export on every orchestrator entry, `engineRootNeeds` on the engine entries, the engine-directed wire types, and `safeGet`, `makeSafeLookup` and `isBlockedIpAddress` from `./adapters`. (#6600)
- `./pipeline`, the request pipeline Express and Next.js share: `makeCheckpointPipeline`, `logPipelineFailure` and the `CheckpointHostConfig` configuration type. (#6650)
- `makeResolutionHost` takes a `store` (`ResolutionStore`, `StoredResource`): a cache-only host reads a resource it has never tried from the store first and puts each fetched resource there with its fetch time; a stored status list is verified again before it is used. (#6647)
- `ResolutionCall.waitUntil`: a cache-only host runs its background fetches under it, and `verifyRequestEdge` passes its `waitUntil` through. (#6647)

### Changed

- `IncomingHttpLike.body` is typed `Uint8Array | string | object | null`. A Node `Buffer` is a `Uint8Array`, so Node callers are unchanged, and the types no longer need `@types/node`. (#6589)
- `@kya-os/checkpoint-express` 1.11.x keeps verifying on this release, but its resolution warmer no longer primes, so DID documents and status lists are fetched on the request path; upgrade Express to the release that ships with this one to get the warmer back. (#6600)
- a cache-only host with a `store` brings an entry past its refresh point up to date from a newer stored copy before it fetches it, in `answer` and in `refresh`. (#6647)
- The engines carry a refreshed OpenAI signing-key record (the same key, valid for longer). (#6652)

### Deprecated

- `makeDidResolver`, `makeStatusListCache`, `DidResolverAdapter` and `StatusListCacheAdapter`: `verifyRequest` ignores the `didResolver` and `statusListCache` options, and what the factories build only rejects (logged once per process); use `makeResolutionHost`. (#6647)
- `makePolicyEvaluator`, `PolicyEvaluatorAdapter` and `PolicyEvalInput`. What `makePolicyEvaluator` builds permits every request and reads no remote policy, and the deprecation is logged once per process; they stay exported for `@kya-os/checkpoint-express` 1.6.0 to 1.10.0 and will be removed. (#6678)
- `tenantHost` on `VerifyRequestOpts`, `EngineDefaultsOptions` and `CheckpointHostConfig` is optional; it is no longer used and will be removed. (#6678)

### Removed

- `verifyResultToAuthorizeInput` no longer special-cases the `mcp_i_handshake` and `kyaos_handshake` verification methods, which no engine since 0.4.0 emits, and no longer treats them as verified delegation. (#6592)

### Fixed

- The bundled engine (0.5.0), in engine-directed resolution, uses only the keys a DID document authorises for each purpose: `authentication` keys for request signatures, `assertionMethod` keys for credentials and propagation proofs, controlled by the DID itself. (#6576)
- A delegation credential whose status-list index is outside the list is refused (`kyaos/chain-broken`). (#6609)
- On Cloudflare Workers without `nodejs_compat`, a request with a body and a kya-http bearer delegation no longer throw `ReferenceError: Buffer is not defined`. (#6589)
- A kya-http/2 request signed by a did:web DID that is not a trusted root verifies on a host with trusted roots configured, instead of being refused as `kyaos/did-unresolvable` on every request. (#6600)
- a Web Bot Auth request verified against OpenAI's key directory is named `ChatGPT`, as Tier 3 names the same agent, instead of `openai`, so a policy that names ChatGPT matches it verified or not. `openai` stays in `metadata.verified_vendor` and `detected_agent.vendor`. (#6652)

### Other merged changes

- chore(rules): refresh AI vendor IPs 2026-10-21 (#6506)

## 1.13.0 - 2026-10-21

### Breaking changes

- Removed: The bundled engine (0.4.0) no longer verifies MCP-I envelopes or the legacy Layer 2 delegation headers (`KYA-OS-Delegation-Credential`, `KYA-OS-Delegation-Proof`) outside the native propagation lane. Both are refused with `kyaos/unsupported-carriage` (403); send the delegation with kya-http/2 native propagation or the agent credential lane instead. (#6544)
- Removed: `extractCredentialStatusUrl` is no longer exported from `./orchestrator`, `./orchestrator/node` or `./orchestrator/edge`. (#6544)

### Changed

- `verifyRequest` and `verifyRequestEdge` look up and fetch nothing for a request carrying either retired carriage. (#6544)

### Security

- Verify each signature only with keys the signer's DID document authorises for that use (`assertionMethod` for credentials, `authentication` for kya-http/2 request signatures), and use a did:web document only when its `id` is the DID that was requested. (#6558)

## 1.12.0 - 2026-10-21

### Breaking changes

- Changed: `./engine/node` and the `./orchestrator` Node entries run on one ESM Node build of the engine (`wasm/kya-os-engine-node-esm/`), which bundlers such as Turbopack can trace, so a process holds one engine and the vendor keys and feed state either one adopts are the other's too. `require()` of `./engine/node` needs Node ^20.19 or >=22.12, the package's engines floor. (#6334)
- Removed: the CommonJS nodejs build (`wasm/kya-os-engine/`) and its `./wasm/kya-os-engine/kya_os_engine_bg.wasm` export; use `./wasm/kya-os-engine-node-esm/kya_os_engine_bg.wasm`. (#6334)

### Added

- The engine names the claim a host makes to use an accepted signed request once: `detectionDetail.metadata` carries the new `kya_request_claim_scope` (a resource DID, or `authority:<host[:port]>`) with `kya_request_keyid`, `kya_request_nonce` and `kya_request_expires`, on every signed request that needs a claim. (#6408)
- `EngineLoadError` (`code: 'engine_load_failed'`, with the load failure as its `cause`), exported from the Node `./orchestrator` entry. (#6334)
- `RequestClaimStore`, `createLocalRequestClaimStore`, `createPlatformRequestClaimStore`, `requestClaimOf` and `applyRequestClaim` on `./composed-policy`, for using an accepted signed request once. (#6422)
- The bundled engine (0.3.0) can direct its own DID document and status list resolution. With `resolution: "engine-directed"` in the context, `verify` and `verifyDelegation` return the resources a request needs until the host answers them in `resources`, and `rootNeeds` lists the trusted roots' DID documents. Every trust gate runs before a resource is named. During an issuer host outage, a key removed from a DID document can keep verifying for up to 24 h; revocation through status lists is unaffected. Without the option nothing changes. (#6466)

### Changed

- the `./orchestrator` Node entries load the engine on first use, so a missing or broken engine fails verifications with `EngineLoadError` (hosts answer 503) instead of failing the import; `renderDecisionAsResponse` needs the engine loaded by a `verifyRequest` or `initEngine` first. (#6334)
- The engine warms itself once per instance as it loads (one verify of a browser page load, with no network and no reporting). On the Node and bundler orchestrators `initEngine()` now runs this warm-up, so a host that awaits it at startup no longer has its first request pay the engine's first-verify cost of about 20 ms. (#6432)
- The engine's WebAssembly bindings are built with wasm-bindgen 0.2.129, and the engines in each release are reproducible byte for byte from its source commit; verdicts are unchanged. (#6448)
- The engines carry a refreshed OpenAI signing-key record (the same key, valid for longer), so a process that has not applied the signed key feed yet still verifies ChatGPT agent signatures. (#6482)

### Removed

- `wasm/kya-os-engine-node-esm/kya_os_engine_bg.js`, which wasm-bindgen 0.2.129 folds into `kya_os_engine.js`, and an unused leftover `wasm/kya-os-engine-web/kya_os_engine_bg.js`. (#6448)

### Fixed

- `wasm/kya-os-engine-web/kya_os_engine.d.ts` declares the engine's current exports; it had been left over from an older build. (#6448)

### Other merged changes

- fix(wasm-runtime): stop bundling the cedar engine into every edge bundle (#6272)
- perf(wasm-runtime): start the vendor-key feed round after the response (#6263)
- feat(wasm-runtime): render node and bundler verdicts through the engine (#6252)
- perf(wasm-runtime): import checkpoint-shared lean entries on the request path (#6279)
- fix(wasm-runtime): load the edge engine only from the module the host passes (#6297)
- fix(wasm-runtime): let each build choose when a vendor-key round starts (#6290)
- refactor(wasm-runtime): add make engine defaults and share it across the sdks (#6303)
- perf(engine): build the user-agent pattern tables without a prefilter (#6282)
- feat(wasm-runtime): run edge detection and cedar on one cedar-web module (#6315)
- fix(wasm-runtime): keep the engine's ruleset hash in sdk detection reports (#6324)
- fix(wasm-runtime): stop fetching a tenant policy that does not exist (#6301)
- fix(sdk): raise the node floor to the versions that can require an es module (#6293)
- fix(engine): keep request signals when a signature cannot be verified (#6352)
- refactor(wasm-runtime): one composed-policy context for express and next.js (#6360)

### a reported bearer delegation carries its credential id (#5887)

- `bearerDelegationIdentity.jti`, reported as `identity.delegation.jti`, is now the credential's handle: `vc.id`, else
  its `jti` claim. An org-issued delegation carries one credential id per delegation as `vc.id` and no `jti`, so
  before this change it was reported without a handle.

### an McpI proof's status list is fetched only after the proof verifies, and only from its issuer's host (#6156)

- **Security fix (ORD-74):** `verifyRequest` and `verifyRequestEdge` fetched the status list an McpI proof names in
  its `vc` claim from any host. The agent signs that claim itself, and no issuer
  the engine checks against the roots signs it, so a fresh `did:key` proof could make the host request any URL. The
  list is now fetched only when its issuer (`vc.issuer`, which must sign it) is the proof `iss` or a configured
  trusted root, and the list is on that issuer's own `did:web` host and port. Fetching a list also fetches its
  issuer's DID document, so both requests stay on a DID document the request already loads (the `iss`'s) or a
  configured root's. Otherwise nothing is fetched and the engine refuses the proof as `Block(Revoked)`: 403, no
  `Retry-After`, the same terminal answer it gives any McpI proof whose declared list it was not given.
- **Security fix (ORD-74):** the list is fetched only after the engine has verified the proof's signature. Before, the
  host fetched it next to the `iss` DID document, so a forged proof naming `did:web:<any host>` as `iss` made the host
  request any path and query on that host before the engine answered `InvalidSignature`. Now the engine runs once
  without the list; only when its trace shows the signature passed does the host fetch the list and run the engine
  again with it. A forged proof fetches only the `iss` DID document and stays `Block(InvalidSignature)`.
- Cost: the second engine run, and the wait for the first one before the list fetch, happen only for an McpI proof
  whose `vc` names a status list and that verifies. No first-party producer sends one, so every other request runs
  the engine once, as before.
- **Behavior change:** an McpI proof whose `vc` names a status list but no issuer is now a terminal 403
  `Block(Revoked)` with no fetch. Before, the status-list cache threw `StatusListUnavailable` for it, which the hosts
  answer with a 503 and `Retry-After`, so a client retried a list that could never be verified forever.
- A skipped list is logged through the `logger` option (default `console.warn`) with the reason and the list's host
  and port, for a proof that verified. The full URL is never logged, since its path and query can carry tokens. A
  forged proof logs nothing: the engine refuses its signature, not its list.
- An McpI proof's status is now read only from `vc.credentialStatus`, the one place the engine reads it. A top-level
  `credentialStatus` on the proof payload is ignored instead of fetched.
- Unchanged: a proof with no `vc` claim makes no status-list fetch, a pinned list is fetched and checked as before,
  and an outage on its host still throws `StatusListUnavailable` (the hosts' fail-closed 503).
- **Upgrade note:** an operator whose McpI agents carry status lists issued by some other org must add that org as a
  trusted delegation root, or those proofs are refused.

## 1.11.0 - 2026-10-20

### Other merged changes

- fix(detection): classify zero-evidence requests as unknown instead of human (#5886)
- feat(engine): deny-list observed non-browser tls cipher hashes [tls-7] (#5941)
- fix(engine): reject unsupported critical JWS headers (#5713)
- fix(engine): re-stamp the openai signing key seed and rebuild the engines on it (#5974)
- fix: fail closed on the delegation and posture trust boundary (#5652)
- fix(detection): separate proxy assertions from hosting (#6186)
- chore(release): set shared 1.6.0, wasm-runtime 1.11.0 and checkpoint 1.4.0 (#6244)
- fix(wasm-runtime): gunzip status lists without node:zlib so edge bundles load (#6255)
- fix(wasm-runtime): decode base64url with atob so did:web keys load without nodejs_compat (#6261)
- fix(engine): re-stamp the openai signing key seed and rebuild every engine (#6260)

### a block consent can fix renders the consent challenge when registered context is supplied (#5968)

- `renderDecisionAsResponse` renders a `Block` whose result carries `consent_remediable: true` as the same registered Delegation challenge a first-contact `Challenge` gets, when the host passes `delegationChallenge`. `bodyReadable200` selects the 200 envelope exactly as it does for `Challenge`. The engine sets `consent_remediable: true` in `detectionDetail.metadata` only for a block a fresh consent can fix: a scope shortfall against the scopes the host requires (bearer and native agent delegations), a delegation whose own `exp` has passed, or one whose status list says it is revoked. It never sets it for a scope the agent claimed (an MCP-I `aud`, or a KYA L2 `action` in the request body), an expired request signature, a missing or invalid `exp`, a not-yet-valid `nbf`, a replayed MCP-I proof, or an unavailable or failing status list (`kyaos/status-pending`).
- The response keeps `X-Checkpoint-Reason` (`OutOfScope`, `Expired` or `Revoked`), sets `X-Checkpoint-Decision: challenge` and sets `X-Checkpoint-Challenge` to the challenge `sid`. The challenge carries the context's `requiredScopes`, which the host takes from its route configuration, never from `reason.requested` or the scopes the old credential held.
- Without `delegationChallenge`, or without the flag, every block renders as before. Only an `OutOfScope`, `Expired` or `Revoked` block re-challenges, so a block a policy produced stays a block even when the flag is set.
- `isConsentRemediableBlock(result)` (from `@kya-os/checkpoint-wasm-runtime/composed-policy`) reads the flag; the renderer and the Express and Next.js middleware share it.
- The engine's `render` export (`engineRender`, `engine_render_json`) renders the same response, so every runtime agrees.

### an MCP-I proof outside its replay window is refused even when its credential carries exp (#5949)

- **Security fix:** the engine verifying an MCP-I proof skipped the 300-second `ts` replay window (and the 60-second
  future-skew bound) whenever the embedded delegation credential carried `exp`, so a captured proof verified again for
  the credential's whole lifetime. The window now applies to every MCP-I proof, and an expired credential is still
  refused as before. A proof outside the window blocks as `Expired` and is never re-challenged, even when its credential has also expired.

### a bearer delegation from an untrusted issuer makes no outbound request (#6092)

- **Security fix (#3331):** `verifyRequest` and `verifyRequestEdge` fetched the `did:web` document of a bearer
  DelegationCredential's issuer (and its status list) before checking that issuer against `trustedDelegationRoots`.
  The issuer is whatever the caller wrote, so any request could make the host fetch a URL of the caller's choosing.
  A bearer credential (`Authorization: Bearer` or `KYA-Delegation`) whose `iss` is not a configured root now gets no
  DID lookup and no status-list fetch. The engine still refuses it: `kyaos/chain-broken` when no roots are configured,
  `kyaos/did-unresolvable` when the issuer is outside them (the code the warmer path already returned).
- A trusted issuer resolves exactly as before, through the warmer cache when one is wired. The McpI proof `iss` and the
  kya-http/2 signer are the agent's own DID and are not pinned to the roots.
- **#3331 item 4:** a forged bearer credential can name a trusted root (root DIDs are public) and point its status list
  at any host. A bearer credential's status list is now fetched only when its host and port are the issuer's own
  `did:web` host, which is where every real issuer serves it. Otherwise nothing is fetched and the request is refused
  for good: `kyaos/invalid-signature` for a forgery, `kyaos/chain-broken` (403, no `Retry-After`) for a genuine
  credential, never a Permit with its revocation unchecked. The engine reports that list as cold
  (`kyaos/status-pending`, 503 with `Retry-After`), but it will never be fetched, so both orchestrators turn that one
  answer into the terminal code the engine uses for a malformed status entry. A same-host list stays `status-pending`.
- **Not covered here:** this closes the bearer form only. An McpI proof or a kya-http/2 request still makes the host
  resolve the caller-chosen agent DID (the McpI `iss`, the kya-http/2 signer) and fetch its credential's status list
  before any signature check. Making those fetches safe is left to #6094's outbound-URL hardening (no redirects, port
  443 only, body caps, connect-time address checks).

### did:web and status-list fetches refuse redirects, other ports, large bodies and private addresses (#6094)

- **Security fix (#3331):** `makeDidResolver` and `makeStatusListCache` fetch a URL taken from the request before any
  trust check (the agent's own DID is resolved by design and is not pinned to the trusted roots). Both now:
  - refuse any redirect: a 3xx fails the fetch (`fetch` runs with `redirect: 'manual'`);
  - allow https on port 443 only. **Behavior change:** `assertSafeHttpsUrl` refuses any other explicit port, so
    `did:web:host%3A8443` no longer resolves, and an A2A agent card origin on another port is refused too;
  - cap the body at 64 KiB and stop reading once over. The decompressed status-list bitstring is capped at 256 KiB
    (2,097,152 entries, 16 times the W3C minimum), so a gzip bomb fails as `MalformedStatusList`;
  - on Node 20.16+ and 22.3+, connect only to a checked address: `https.get` runs every A/AAAA answer through a
    `lookup` that refuses the host when any answer is private, loopback, link-local, CGNAT, cloud metadata or
    otherwise reserved, and the socket connects to the address that lookup returned (no DNS rebinding window).
    Edge runtimes, Cloudflare Workers, Bun and Deno have no connect hook, so there this step is skipped and global
    `fetch` applies the other rules.
- **BREAKING:** `engines.node` is now `^20.16.0 || >=22.3.0` (was `>=18.0.0`), so installing on older Node warns.
  Node 18 and Node 20 before 20.16 are end of life and have no `process.getBuiltinModule`, so the address check cannot
  run there. Those hosts refuse did:web and status-list fetches instead of fetching unchecked, and log one warning per
  process naming the Node version. Pass your own `fetch` to opt out.
- **BREAKING for hosts whose only route out is a proxy:** on Node the default fetch is `https.get` with
  `agent: false`. That ignores an undici global dispatcher (`setGlobalDispatcher(new ProxyAgent(...))`) and Node 24's
  `NODE_USE_ENV_PROXY`, which global `fetch` honoured before, so such a host fails every did:web and status-list
  fetch (the Express and Next.js middleware answer 503). Workaround: `makeDidResolver({ fetch: proxiedFetch })` and
  `makeStatusListCache({ fetch: proxiedFetch })`, passed to the middleware as `adapters.didResolver` and
  `adapters.statusListCache`. Redirects, ports and size stay checked, but the connect-time address check is then the
  caller's job.
- Every did:web and status-list GET sends the same two headers on Node, Edge and Workers:
  `User-Agent: kya-checkpoint-resolver (+https://github.com/Know-That-Ai/checkpoint)` and
  `Accept: application/json, */*;q=0.8`. Node's `https.get` sends neither on its own, so a host behind a WAF that
  refuses a request with no User-Agent would have answered 403 on Node only.
- On Node the body is decoded per `Content-Encoding` (gzip, x-gzip, deflate, br) before it is parsed, as `fetch` does,
  so a did.json or status list stored gzipped (S3 object metadata, a precompressed CDN object) still resolves. The
  64 KiB cap counts decoded bytes, so a compression bomb stops there. An unknown or stacked encoding is refused.
- The fetch timeout (default 3 seconds) now also bounds the status-list body read.
- A `fetch` passed in the options is used as-is with the redirect and size rules; connect-time checks are then the
  caller's job.
- `assertSafeHttpsUrl` also blocks 192.0.0.0/24 (Oracle Cloud metadata at 192.0.0.192).

### did:web documents with JsonWebKey2020 or Multikey Ed25519 keys resolve (#6146)

- **Fix:** `makeDidResolver` kept only `Ed25519VerificationKey2020` and `Ed25519VerificationKey2018` methods. A
  did:web document in the common W3C shape (`type: "JsonWebKey2020"` with an OKP/Ed25519 `publicKeyJwk`, the shape the
  shared kya-http vectors publish) resolved with no keys, so its signed requests failed `kyaos/did-unresolvable`.
- `JsonWebKey2020` is accepted only for `kty: "OKP"`, `crv: "Ed25519"` and an `x` of exactly 43 canonical base64url
  characters (32 bytes, no padding). EC, RSA and X25519 JWKs, a missing or malformed `x`, and any JWK carrying a
  private `d` are ignored; the rest of the document still resolves.
- `Multikey` is accepted only for a `z` base58btc `publicKeyMultibase` with the Ed25519 multicodec (`z6Mk...`).
- **Behavior change:** the same JWK rules now apply to an `Ed25519VerificationKey2018/2020` method that carries a
  `publicKeyJwk`, so a padded or standard-alphabet `x`, or a JWK with `d`, is no longer accepted there either.

### a kya-http/2 delegation credential's status list is fetched only after its issuer is trusted (#6144)

- **Security fix (#3331):** on a kya-http/2 signed request, `verifyRequest` and `verifyRequestEdge` fetched the status
  list named by the `KYA-OS-Delegation-Credential` before anything checked that credential's `iss`. The engine reads
  that list only after it has checked the `iss` against `trustedDelegationRoots` and the credential's signature, so the
  fetch bought nothing and let any caller make the host request a URL of their choosing. The bearer rule now covers
  this credential too: no status-list fetch when its `iss` is not a configured root, and none when the list is not on
  the issuer's own `did:web` host. A genuine credential with an off-host list is refused for good
  (`kyaos/chain-broken`, 403, no `Retry-After`); a forgery stays `kyaos/invalid-signature`.
- Unchanged: a trusted issuer's same-host list is fetched as before, and the request signer's DID (the agent's own) is
  still resolved. Every engine verdict for an untrusted issuer is the same as before; only the fetch is gone.
- **Not covered here:** an McpI proof's status list. The McpI `vc` claim is signed by the agent, not by an issuer the
  engine checks against the roots, so there is no trust check to put the fetch behind.

### one orchestrator API in every build; the pre-engine detector API is removed (breaking) (#6084)

Every `./orchestrator` build (bundler, Node and edge) now exports the same `verifyRequest` and `initEngine`, so a host imports `./orchestrator` and the export conditions pick the engine build.
The package no longer ships a detector of its own: detection goes through `kya-os-engine`.
Shipped under a minor because nothing consumes the removed exports yet.

#### Added

- `verifyRequest` and `initEngine(wasmModule?)` on the edge `./orchestrator` build, as aliases of `verifyRequestEdge` and `initEngineEdge`.
- `initEngine(wasmModule?)` on the bundler and Node `./orchestrator` builds.
  Those builds load the engine at import, so there it resolves at once.
- `initEngineEdge` takes an optional module.
  Pass the imported `.wasm` module on Cloudflare Workers, which can't compile WebAssembly from bytes at runtime.
- The `EngineWasmSource` type, from `./orchestrator`.

#### BREAKING, removal

- **The pre-engine detector API:** `createDetector`, `createNodeDetector`, `createEdgeDetector`, `createFallbackDetector`, `WasmDetector`, `StaticWasmLoader` and `createStaticLoader`, `DynamicWasmLoader` and `createDynamicLoader`, `RulesDetector` and `createRulesDetector`, `PolicyLoader`, `createPolicyLoader` and `PolicyLoadError`, `extractInputFromRequest`, `extractInputFromExpressRequest`, `CONFIDENCE`, and their types (`IDetector`, `IDetectionInput`, `IDetectionResult` and the rest).
  It ran the retired `agentshield_wasm` engine.
  On Node, `createDetector().detect()` threw "Could not find WASM module" on every call, because no package shipped that binary.
  **Migration path:** `verifyRequest` from `@kya-os/checkpoint-wasm-runtime/orchestrator`, or `detectAgent` from `@kya-os/checkpoint` for a verdict without enforcement.
- **The `DetectionClass`, `VerificationMethod` and `ForgeabilityRisk` type re-exports.**
  **Migration path:** import them from `@kya-os/checkpoint-shared`.
- **The `./edge` and `./node` entries**, which only carried that API.
  **Migration path:** `./orchestrator`, `./engine` or `.`; their export conditions pick the edge or Node build.
- **The no-op vendor-key shims:** `createOpenAiKeyProvider`, `createVendorKeyRefresher`, `createRuleBundleUpdater`, `OPENAI_DIRECTORY_URL` and their types, and `engineReinstateVendorKeys` and `engineReinstateVendorKeysEdge` from `./engine`.
  **Migration path:** the signed vendor key feed, `configureVendorKeyFeed`.

RELEASE ORDER: publish after `@kya-os/checkpoint-shared`, and before `@kya-os/checkpoint` and `@kya-os/checkpoint-nextjs`, which need these exports.

### browser posture applies the automation flags and the detection claim (#5783)

### zero-evidence requests are `IncompleteData`, not `Human` (breaking wire change) (#5060)

- **Behavior change:** the embedded engine no longer classifies a request that carries no evidence as `Human`. For
  that request `detectionDetail.detectionClass.type` is now `IncompleteData` and `detectionDetail.riskLevel` is
  `medium` instead of `low`. `isAgent` stays false.
- The engine marks that verdict with `detectionDetail.metadata.detection_basis = "no_evidence"`. It is the only thing
  that separates a zero-evidence request from other `IncompleteData` verdicts, and the composed-policy projection reads
  it to give the visitor the category `no_evidence`.
- A request with suspicious headers is still `IncompleteData` (the engine's internal Unknown class), but its
  `detectionDetail.verificationMethod` is now `none` instead of `pattern`.
- Composed rules aimed at all agents now exempt only `human` and `no_evidence` visitors, so any other `incomplete_data`
  visitor is matched by them. A forged `mcp_i_handshake` or `kyaos_handshake` envelope that the engine blocks projects
  as category `unknown`, not `incomplete_data`.
- For a zero-evidence request `detectionDetail.isBot` and `detectionDetail.isAiCrawler` are now absent; they were `false`.
  Read a missing value as false. Its `reasons` now read `Request did not carry enough signal to classify confidently`
  where they read `No known agent indicators matched`.
- A deployed rule that does not compare the category to `no_evidence` reads it as `human` because the composed-policy
  compile rewrites the policy text (`withNoEvidenceExclusion` in `@kya-os/checkpoint-shared`). The dashboard serves the
  stored text, so a release that predates the rewrite reads it, `@scopes` included, exactly as before.
- `evaluateComposedPolicy` now applies that same rewrite to the policy text inside the compile, so Express and
  Next.js read `no_evidence` as `human` whichever fetcher supplied the text, including a custom `PolicyFetcher`. The
  compile cache is keyed on the raw text, so the rewrite runs once per distinct policy text on a cache miss and not on
  a request that hits the cache. Text that already carries the rewrite is unchanged. Apart from computed reads, a statement is skipped only when it
  compares the category to the literal `"no_evidence"`, and a `like` pattern counts only when a segment spells the whole
  name and the pattern can match it. The rewrite takes a direct read of the category: dot or bracket access, a
  parenthesized principal and a bracket key written with escapes. A statement that reads the category through a computed value holding the principal, such as an `if` or a
  record that carries `principal`, is left as written and sees `no_evidence`, and a `principal` that is an attribute
  name or record key is never rewritten. Whitespace between tokens is the 25 Unicode
  `White_Space` characters and a `//` comment ends at a line feed or a lone carriage return, as in the Cedar lexer.
  If the engine rejects the rewritten text as invalid Cedar, the cache compiles the authored text instead, still reads a `no_evidence` visitor
  as `human` for that policy, and reports it once per policy text through the new optional `logger.warn` in
  `ComposedPolicyCacheOptions`; any other compile failure propagates as
  before and is not cached.
- A policy nested deeper than 32 levels (parentheses, brackets, braces and `if` expressions) is refused as invalid
  Cedar before the engine compiles it, because deeper nesting can trap the Cedar engine and break every later compile
  in the process.
- A browser posture upgrade of a zero-evidence verdict rewrites `detection_basis` to `posture_evidence`, so the
  composed-policy projection stops giving it the category `no_evidence` and the reporter sends `posture_evidence`.
- `engineInfo.version` and `engineInfo.rulesetVersion` are now `0.2.1` (they were `0.2.0`). `engineInfo.rulesetHash` is
  unchanged: it hashes the bundled vendor keys, vendor feeds and user-agent pattern table, and none of them changed.
- `makeDetectionReporter` now sends `detection.detectionBasis` in the `POST /api/v1/log-detection` body, copied from
  `detectionDetail.metadata.detection_basis` when that is a string. The dashboard stores it as `metadata.detection_basis`
  on the detection only for an `incomplete_data` row, and a dashboard that predates the field ignores it. The dashboard
  accepts only `no_evidence` and `posture_evidence` and drops any other value.
- `verifyRequest` and `verifyRequestEdge` never return `Human` now. That class comes only from the older detectors in
  this package: `WasmDetector` (including its `detection_failed` default result) and `RulesDetector`.

## 1.10.2: OpenAI key feed, browser posture, client IP and the key refresh (not published, included in 1.11.0)

### browser posture applies the automation flags and the detection claim

- The posture reader now applies, over a human or incomplete-data baseline and first match first: the token's
  `detection` claim (the beacon's final verdict, for example `Meta Muse`), then `automation_disclosed` (bot
  `Automation Tools` at 80), then an `agent-driven` verdict, then `automation_corroborated` (incomplete data at 40, not
  an agent). A webdriver-disclosed session therefore upgrades to a bot, so a policy that blocks bots now blocks it.
- Needs a `@kya-os/checkpoint-shared` release that exports `postureUpgrade`.
- The embedded engine classifies Meta's Muse agent as the AI agent `Meta Muse` when the beacon reports a Chromium-only brand list and ARM hardware under an x86_64 Linux user agent together with Muse's hardware profile, classifies a `HeadlessChrome` brand under a normal user agent as `Automation Tools`, and reads a new `httpProtocol` transport field. A browser user agent over HTTP/1.x adds weak Noisy-OR evidence only.

### OpenAI signing keys arrive from a controlled feed, on demand

- The engine now adopts the full OpenAI signing key set from the signed rule bundle, and the
  verify path drives the fetch itself. After each verify, `verifyRequest` and `verifyRequestEdge`
  ask the engine whether the feed is wanted (first request, a request signed by an unknown or
  expired key, or a feed nearing expiry) and fetch
  `https://feeds.kya-os.ai/rules/v1/bundle.json` only then. A request that hit the missing
  or expired key is answered at once with the verdict it already has (Tier 1 falls through to
  Tier 2), the fetch runs in the background (`waitUntil` on the edge entries, a detached promise
  in Node), and the next request uses the new keys. No request waits on the fetch and there is no timer in
  the feed: the host bounds a stalled connection itself, and a new round supersedes a previous round only when
  that round made no progress (no response headers and no body bytes) since the previous re-demand, so a slow
  healthy download is never cancelled and there is never more than one live download.
- Customer step: allow outbound HTTPS from the host running the orchestrator to
  `feeds.kya-os.ai`. Point `KYA_VENDOR_KEY_FEED_URL` (or `configureVendorKeyFeed({ url })`) at
  an https mirror if egress to that host is not possible. Watch feed health with
  `configureVendorKeyFeed({ onEvent })` or `getDefaultVendorKeyFeed(bindings).getStatus()`.
- New: `createVendorKeyFeed`, `getDefaultVendorKeyFeed`, `configureVendorKeyFeed`,
  `VENDOR_KEY_FEED_URL`, and the `engineFeedDemand`, `engineFeedAttemptFinished` and
  `engineFeedStatus` bindings (plus `...Edge` variants).
- New: hosts that verify OpenAI signatures in their own code can read the engine's adopted key set with `engineVendorKeys` and `vendorKeysEdge` (which also ticks the default edge feed in the background, without delaying the keys, and hands that background work to an optional `{ waitUntil }` so Cloudflare Workers keep it alive after the response, so a retired key still ages out through feed-aging demand), and raise their own key miss into the same demand machine with `engineFeedNoteMiss` and `reportVendorKeyMissEdge`, which resolves `{ retry }` once a new bundle has been applied.
- New: `verifyRequestEdge`, `vendorKeysEdge` and `reportVendorKeyMissEdge` accept an optional `waitUntil` (`VendorKeyEdgeOptions`) that receives every background feed round they start, so Cloudflare Workers do not cancel a round when the response is sent.
- Fixed: `configureVendorKeyFeed` now stores its url and `onEvent` in one holder on `globalThis`, so a configuration set through one built entry point reaches hosts that verify through another.
- New: the feed emits a `finished` event with the round's outcome (`applied`, `current` or `failed`) exactly once per round, after the engine's `feedAttemptFinished` step has completed, so host tests can await it.
- Fixed: a request whose key missed is now verified again when another request's feed round applied a new feed while it was still verifying; the feed counts applied rounds (`generation()`) and the orchestrators compare the count read before the verify.
- Deprecated: `createVendorKeyRefresher`, `createOpenAiKeyProvider`, `createRuleBundleUpdater`,
  `OPENAI_DIRECTORY_URL`, `engineReinstateVendorKeys`, `engineReinstateVendorKeysEdge` and the
  `Reinstate*` and `RuleBundle*` updater types keep their names and signatures as compatibility
  shims, so a host on 1.10.x keeps compiling and running. They no longer fetch or call the engine,
  because the engine now adopts keys from the signed feed: the refresher reports a cached empty
  result, the key provider reports `embedded-fallback`, the rule bundle updater reports
  `compiled-in` and still rejects a non-https url, and the reinstate bindings return an empty list.
  Hosts should delete that wiring and rely on the verify hook, or on `getDefaultVendorKeyFeed` and
  `configureVendorKeyFeed` to configure and watch the feed. The `keyOutcomes` of an applied bundle
  are now `added`, `extended`, `shortened`, `unchanged` or `retired`; the rejection codes
  `invalid-key-set` and `invalid-delegation` are new and `invalid-key-expiry` is gone.
- Needs the engine wasm rebuilt from this change; the new bindings call exports the previous
  artifacts do not have.

### OpenAI RFC 9421 vendor key refresh (2026-10-05)

Rebuilds the embedded `kya-os-engine` WASM against a refreshed OpenAI signing
key pin: kid `ArwjqcCqtA5oxEWkzXGC-To_0A9whHmajCHtfe8I9aY`, expiring 2026-10-12T15:47:41.000Z. The refresh itself changes no source in this
package; the binaries are the deliverable. See
`docs/architecture/tier1-key-management.md`.

### OpenAI RFC 9421 vendor key refresh (2026-10-12)

Rebuilds the embedded `kya-os-engine` WASM against a re-stamped OpenAI signing
key pin: kid `ArwjqcCqtA5oxEWkzXGC-To_0A9whHmajCHtfe8I9aY` unchanged, now expiring
2026-10-19T20:58:41.000Z. It replaces the pin named in the entry above. The pin
is only the fallback until the host applies the signed bundle at
`https://feeds.kya-os.ai/rules/v1/bundle.json`. No source change in this
package; the binaries are the deliverable. See
`docs/architecture/tier1-key-management.md`.

### posture verification outcome on detection reports

- `postureHandlerView(result)` and `postureOutcomeView(outcome)` (from
  `@kya-os/checkpoint-wasm-runtime/composed-policy`) build the `{ status, reason?, posture? }`
  view a host hands to application handlers, as a frozen copy, with `posture` (the verified
  claims) only when the status is `verified`. `postureHandlerView` reads the outcome recorded
  on a verify result (and is `undefined` when none was recorded); `postureOutcomeView` takes a
  verification directly. The Express SDK exposes the first and the Next.js SDK the second as
  `getCheckpointPostureOutcome`.
- `applyBrowserPosture` records the verification outcome (`verified`, `absent`,
  or `rejected` with a reason) and the reporter sends it as `postureOutcome`
  next to `browserIntegrity`, so a verifier that rejects every token (wrong
  key, origin or session) is visible in the dashboard instead of looking like
  a page that sent no token. Publish it after `@kya-os/checkpoint-shared`
  1.5.2, which also accepts `browserPosture.origins`.

### the engine no longer derives the client IP from forwarded headers

- When an HTTP-signed request fails signature verification and detection falls
  through to Stage 1, the engine now uses only the host-resolved remote IP
  (`IncomingHttpLike.remoteAddress`). Before, with no remote IP supplied, it
  took `x-real-ip` or the first `x-forwarded-for` entry. Both are
  attacker-supplied on a request whose signature just failed, so a forged
  vendor address next to a junk signature could pass the vendor IP feed
  cross-match.
- This changes decisions a host already gets. A host that passes no remote IP
  now loses the `vendor_ip_feed` match, the Tier-4 cloud check and the
  IP-keyed reputation lookup whenever a signature fails, so a verified
  vendor whose signature fails (for example on a stale vendor key during a
  rotation) is no longer recognized by its IP. Resolve the client IP through
  your trust policy and pass it as `remoteAddress`. Hosts built on
  `@kya-os/checkpoint-nextjs` or `@kya-os/checkpoint-express` do this by setting
  `clientIpPolicy`.

## 1.10.1: OpenAI RFC 9421 vendor key refresh (2026-09-27) (not published, included in 1.11.0)

Rebuilds the embedded `kya-os-engine` WASM against a refreshed OpenAI signing
key pin: kid `ArwjqcCqtA5oxEWkzXGC-To_0A9whHmajCHtfe8I9aY`, expiring 2026-10-04T22:49:53.000Z. No source change in this
package; the binaries are the deliverable. See
`docs/architecture/tier1-key-management.md`.

This release also carries the sections below. It imports
`KYA_HTTP_ERROR_STATUS` and `postureFromRequest` from
`@kya-os/checkpoint-shared`, which `@kya-os/checkpoint-shared` 1.5.1 does not
export, so publish `@kya-os/checkpoint-shared` first and this package after it.

### Signed rule bundles

- New engine export `applyRuleBundle(bundleJson, nowUnix)` and host helper
  `createRuleBundleUpdater({ url, apply })`. A bundle signed in CI updates
  the vendor IP ranges and extends the pinned OpenAI key expiry in a running
  process, with no SDK release. The engine verifies an Ed25519 signature
  against public keys compiled into the artifact, enforces a monotonic
  version and expiry, and applies nothing unless every check passes. Bind
  `apply` to `engineApplyRuleBundle` (node, bundler) or
  `engineApplyRuleBundleEdge` (edge).
- The engine trust root ships empty, so every bundle is refused until a
  release carries the signing public key. Ranges and keys fall back to the
  compiled-in values on any failure.

### The engine ships an embedded Noisy-Or calibration curve

- The host-confirmed proxy signal (`signals[].source === 'ip_intelligence'`)
  now carries `weight` 0.1 instead of 0.4. Under the embedded curve a lone
  proxy flag at the maximum confidence used to calibrate a clean human from
  0.05 to 99.94; it now calibrates to about 2, and crosses 70 only beside
  independent evidence. Only requests whose `signals.network.proxy.isProxy`
  is true are affected.
- `applyBrowserPosture` also reads posture from the `KYA-Posture` and
  `KYA-Posture-Session` request headers: its second argument accepts a
  `PostureRequest` (`postureRequestFromHeaders`) as well as the bare `Cookie`
  header string it took before. Needs `@kya-os/checkpoint-shared` with
  `postureFromRequest`.
- `EngineConfig.noisyOrCalibration` now defaults to an embedded,
  production-fitted Platt curve (`EMBEDDED_NOISY_OR_CALIBRATION` in the
  engine's `context.rs`: `a = -41.6866`, `b = 11.7396`, midpoint at raw
  score 28.2) instead of `undefined`. Combined with the `Live` default
  below, **a host that omits the curve now scores `detectionDetail.confidence`
  off the calibrated Noisy-Or combiner**, not the static first-match-wins
  table. This is the live cutover: verdicts move. Measured on 24h of
  production across 16 projects: 4 of 27,195 human rows cross 70, every
  bot population lands at 99+.
- Opt-out is an explicit `noisyOrCalibration: null` (the type is widened to
  `CalibrationCurve | null`), which fails closed to the static table and
  stamps `shadow_calibration_curve_missing: true`. Omitting the field is no
  longer the opt-out. `noisyOrShadow: 'shadow'` or `'off'` still keep the
  static verdict as before.
- A host-supplied curve overrides the embedded one.

### Other engine and runtime changes merged since 1.10.0

- #5244: `session_velocity_escalation` and `scanner_misclassification_hint` now default on in the engine.
- #5243: optional `cnf.jkt` browser posture binding, with DPoP proof verification.
- #5370: the engine exports `render` and `engineInfo`; nothing calls them yet.
- #5119, #5224, #5258 and #5278 also changed engine or runtime source. See each PR for detail.

### The reporter forwards the engine's shadow keys

- `buildLogDetectionPayload` now sends the engine's `shadow_*` keys as
  `detection.shadowMetadata`, capped at the 32 keys and scalar value shapes
  `/api/v1/log-detection` accepts (numbers, booleans, and strings up to 128
  characters). Rows reported by the TS SDKs now carry the raw and calibrated
  Noisy-Or scores and the `risk_score` column, the way the .NET and Java
  reporters already do. Nothing is sent when the engine stamped no shadow keys.

### Three new Noisy-Or combiner-only signals

- A forged `Chrome/` desktop User-Agent token on a WebKit build Chrome never
  shipped now feeds a `ua_engine_token_mismatch` signal into the Noisy-Or
  combiner. Verdict-neutral under `Off`/`Shadow` and under `Live` with no
  curve; moves a verdict only through a published calibration curve.
- The `client_headless_escalation` corroborating-only evidence tier (no
  direct `navigator.webdriver` disclosure) now weighs 0.70 in the Noisy-Or
  combiner, up from the 0.40 it shares with the static-table/classification
  confidence. **Visible `DetectionSignalDetail` change**: the wire
  `signals[].confidence` for this signal now reads 70 while
  `DetectionResult.confidence` (driven by the static table under
  `Off`/`Shadow`, or by `Live` with the curve opted out) stays 40 for the
  same request; the two numbers are expected to disagree now. No web or gateway reader
  consumes this field today, but any SDK consumer reading `signals[]`
  directly will see the new value.
- Three beacon-collected client attributes the engine previously never
  read at all (`client.cdpStackAccessed`, `client.pluginMimeTypesConsistent`,
  `client.webglUaConsistent` -- documented in `beacon-signals.ts` as too
  weak to ever assert `client.headless`) now feed a
  `stealth_automation_evidence` signal into the Noisy-Or combiner when
  **two or more** agree. A lone `client.cdpStackAccessed` tell does NOT
  fire on its own -- it can also mean the visitor simply has DevTools open
  (`automation-probes.ts`'s own doc comment), so it needs corroboration
  from at least one of the other two tells. Confidence scales with tell
  count (0.55/0.65 for two/three tells), both strictly below the
  `client_headless_escalation` corroborating tier's 0.70. Never touches
  `agent_class`/`classification.confidence` under any mode, same as the
  other two signals above -- but unlike them, this signal's raw-score
  contribution was added AFTER the embedded calibration curve was fitted,
  so under the engine's actual default (`Live` with that curve) its effect
  on real `confidence` for traffic where it fires is unvalidated against
  production, not just unbacked by a repro. No production repro backs this
  one at all: it closes a code-level gap (evidence collected and
  documented as classification-unsafe, but structurally dead), not an
  observed incident.

### Noisy-Or combiner defaults to live scoring

- `EngineConfig.noisyOrCalibration` changes meaning for any host already
  passing one: it was preview-only input under the engine's old `Shadow`
  default and is now verdict input, since the embedded engine's own default
  is `Live`. A host that supplies a curve without also setting
  `noisyOrShadow: 'shadow'`/`'off'` now has that curve driving `confidence`
  directly. Omitting a curve is NOT unaffected: see the embedded-curve
  entry above.
- Every host also gets a new `detectionDetail.metadata` key surface: the
  combiner's `shadow_*` keys are stamped on `Live` as well as `Shadow` now
  (previously `Shadow`-only).

## 1.10.0

Minor, not patch: the embedded engine gains new behaviour (proof rejection,
signal reweighting, A2A agent-card verification, session velocity) and the
`./wasm` export that never resolved is gone. The three entries below were
written as the work landed; the first is new to this release.

### OpenAI RFC 9421 vendor key refresh (2026-09-20)

OpenAI rotated its signing key material for the first time (kid
`otMqcjr1...` to `ArwjqcCq...`), not just the rolling expiry. Published
1.9.0 was built on 2026-09-08 and carries the old pin, so its embedded
fallback has been expired since 2026-09-20 14:07 UTC. This release rebuilds
every wasm target against the refreshed manifest (#5150). Hosts that can
reach `chatgpt.com` were never affected: the live JWKS fetch runs first and
the pin is only the offline fallback. Hosts that cannot were verifying
ChatGPT signatures against a dead key.

### KYA HTTP proof rejection

The embedded engine rejects invalid presented KYA proofs instead of falling
through to unsigned detection and tenant policy.
Failed delegation propagation and an incomplete propagation pair also reject.
Node and Edge now route a `kya` member in either signature header to the engine,
including a Signature-only presentation that previously appeared anonymous.
Other signature labels and KYA-OS envelope precedence remain independent.
In enforce mode, the malformed proof produces a denial; observe mode preserves
pass-through and reports the rejected verdict in would-have-been headers.
The same request is tested through both actual Node and Edge engines and the
HTTP renderer in both modes.
Clients must send the complete current KYA HTTP profile; this entry does not
publish a new package or update separately installed hosts.

### Engine: proxy signal reweight (#4995)

Rebuilds the embedded `kya-os-engine` WASM. `signals[].weight` for source
`ip_intelligence` (confirmed-proxy detections) drops from `1` to `0.4` on the
`enforce` payload — a proxy verdict is evidence about how a connection is
routed, not who is making it, so it no longer carries identity-level
certainty on its own once a host opts a project into `noisyOrShadow: "live"`.
**The `weight` value on the payload changes in every mode** — no effect on
`confidence` under the default `"off"` shadow mode, since only the `Live`
mode reads a signal's weight into the live verdict. This package stays at
`1.9.0` — the version is not bumped here, so this entry documents the change
ahead of the release that ships it.

## 1.9.0: Zod 4 through `@kya-os/checkpoint-shared` (#4963)

No source change in this package. The only delta is the dependency range:
`@kya-os/checkpoint-shared` moves from `^1.3.0` to `^1.4.0`, which is the
Zod 4 flip. See shared's 1.4.0 entry for the validation and error-shape
changes that come with it.

This package's public surface stays clear of Zod. `src/engine/types.ts`
re-exports `DetectionDetail`, `McpIPayload`, and `TraceStep` from shared as
`export type` only, and type-only re-exports erase at compile time, so no Zod
object reaches a consumer's `.d.ts` from here. Consumers that import those
three types directly from shared are still subject to shared's changes.

## 1.8.2 — policy-driven client-IP resolution and Flow Lab identity reporting (#4794, #4905)

- Node and edge request extraction now uses the shared bounded IP normalizer
  and explicit direct policy by default.
- Removed raw forwarding-header precedence from runtime request adapters.
- `HttpSignedRequest` now carries an optional `remoteIp`, mirroring
  `PlainHttpRequest`. `buildHttpSigned` sets it from the host's already
  policy-resolved `remoteAddress`, so a Tier-1 signature fail/skip falling
  through to Stage 1 detection uses that value instead of the engine's own
  unauthenticated `x-real-ip`/`x-forwarded-for` guess. Rebuilds the embedded
  WASM (`kya-os-engine` #4794 follow-through) — no other behavior change.
- Detection reports now carry an optional `identity` block
  (`identity.delegation.sid`/`result`/`verifiedBy`, `identity.agent.did`) built
  from the engine's verified delegation metadata, so Express and Next.js
  projects populate the customer dashboard's Flow Lab stage 5 timeline for a
  verified bearer-delegation or kya-http/2-signed presentation.

## 1.8.1 — engine: rfc9421 verifier fix (#3474)

**Patch — engine rebuild only.** Picks up the RFC-9421 HTTP-message-signature
verifier fix in `kya-os-engine` from #3474 (delegation persistence: anchor the
read-back on grant + session id). No package API change. Cross-runtime parity
was green on #3474 with no fixture changes, so verify decisions are unchanged —
this republishes the package so the rebuilt WASM ships to consumers.

## 1.8.0 — reporter: SDK self-identification (version-gating)

**Minor release — additive.** The detection reporter now accepts an optional
`sdk: { name, version, runtime }` on its config and emits it **top-level** in the
`/api/v1/log-detection` payload (not inside `engine`, so it survives the
`sanitizeEngineInfo` engine-field drop). The engine WASM reports the same
`engine.name` (`checkpoint-engine-wasm`) for Express / Next.js-node /
Next.js-edge, so the host wrapper self-reports its package + version + runtime —
letting the dashboard version-gate "composed policy enforces here" on the actual
installed SDK (and show Next.js-edge as opt-in). New export: `ReporterSdkInfo`.
Omitting `sdk` is the legacy/anonymous path (unchanged behaviour).

## 1.7.1 — composed-policy: structural compile contract

**Patch.** The `./composed-policy` compile + cache contract now references a
structural `CompiledPolicy` interface (`{ authorize, free }`) instead of the
nominal `PolicyEvaluatorRuntime` class. The class carries a `private` member, so
its Node (`./policy`) and edge (`./policy-edge`) declarations are nominally
distinct across subpaths — a cross-subpath consumer (the Next.js middleware,
which injects `createPolicyEvaluator` into the core's cache) failed to type-check
against the class. Both runtimes' evaluators satisfy the structural surface, so
this is behaviourally identical and unblocks `@kya-os/checkpoint-nextjs@1.5.0`.
New export: `CompiledPolicy`.

## 1.7.0 — `./composed-policy` core (@Policy middleware-Cedar)

**Minor release** — adds the shared composed-policy (`/policy-compose` Cedar)
evaluation core, the SSOT for in-process enforcement across the SDK runtimes
(DNS Gateway worker, `@kya-os/checkpoint-express`, `@kya-os/checkpoint-nextjs`).
Before this, each runtime hand-rolled the same orchestration against its own
detection shape, risking edge-vs-in-process divergence.

### Added — `./composed-policy` subpath

Runtime-neutral (types + `globalThis.crypto.subtle` + an injected compile fn —
no WASM import, no `node:*`), so it loads identically on Node and edge:

- **`verifyResultToAuthorizeInput(result, ctx)`** — projects a canonical
  `VerifyResult` into the engine `AuthorizeInput`. The parity SSOT: category
  mapping, the verified-delegation allowlist (`mcp_i_handshake` / `signature`),
  and the `mcp_i_handshake` optimistic-detail override (a forged envelope that
  the engine blocked never reaches Cedar as a verified agent).
- **`makeComposedPolicyCache({ compile, cacheMax })`** — compile-once /
  evaluate-many LRU keyed by `projectId:sha256(source)`, single-flight on the
  in-flight promise, drop-reference eviction (GC + FinalizationRegistry reclaims
  WASM). `compile` injected so Node passes `createPolicyEvaluator` (via
  `./policy`) and edge passes `evaluatePolicy` (via `./policy-edge`).
- **`evaluateComposedPolicy(args)`** — empty-Cedar deny-all guard +
  language-agnostic routing + compile + authorize + act-gate
  (`engineEnforcementEnabled && enabled`) + divergence, returning a tagged
  `{ no-policy | error | shadow | acting }` outcome. Never throws — a fault
  returns `error` so the host fails OPEN to the baseline.

Consumed by `@kya-os/checkpoint-express` and `@kya-os/checkpoint-nextjs`; the
DNS Gateway worker migrates to it next (replacing its inline copy).

## 1.6.0 — 2026-05-26 — `./reporter` subpath

**Minor release** — adds the detection reporter consumed by the
engine-backed host wrappers in `@kya-os/checkpoint-express@1.4.0` and
`@kya-os/checkpoint-nextjs@1.4.0`.

### Added

- **`./reporter` subpath** exports `makeDetectionReporter(config)` and
  `buildLogDetectionPayload(result, ctx)`. The reporter is a
  fire-and-forget POST to `${baseUrl}/api/v1/log-detection` (default
  `https://kya.vouched.id`) with `Authorization: Bearer ${apiKey}`.
  Maps the engine's `VerifyResult` into the dashboard's
  `LogDetectionRequestSchema` (detection + context + source=middleware
  - enforcement + engine). Errors are swallowed unless `debug: true`.
- Runtime-agnostic (uses global `fetch` + `AbortController`); works
  under Node 18+ and the Edge runtime without polyfills.

### Why

The two engine-backed host wrappers (`withCheckpoint` in express +
nextjs) ran verification locally via WASM but had no path to ship the
`VerifyResult` back to the dashboard. Customers installed the SDK,
deployed, and the onboarding "Verify connection" check failed forever
because the `detections` table never received a row. The reporter
closes that loop without re-introducing the legacy gateway round-trip.

### Phase-D.9b.1 — `initEngineEdge` switched to `--target bundler`

**Production-incident hotfix (2026-05-24).** `initEngineEdge()` previously
loaded the `wasm-pack --target web` artifact, which falls back to
`new URL('<wasm>', import.meta.url)` when no `moduleOrPath` is passed.
Cloudflare Workers don't materialise `import.meta.url` the way browsers do,
so the URL construction threw `TypeError: Invalid URL string` at engine
init — taking down the post-D.9b production gateway deploy twice in ~1h
(rolled back via `wrangler rollback` both times; captured in dev tail
run 26352287112).

Fix: switch `engine/edge.ts` to import the `--target bundler` artifact
(`@kya-os/checkpoint-wasm-runtime/wasm/kya-os-engine-bundler/kya_os_engine.js`).
The bundler target embeds the WASM inline via the host bundler's `.wasm`
import mechanism + initialises synchronously on module load. No URL
construction, no `import.meta.url` dependency, no `default()` init call.

#### Behaviour change (no API surface change)

- `moduleOrPath` parameter is now reserved/ignored. The bundler target
  loads the WASM at module-load time via the host bundler, so the
  caller has no opportunity to inject a pre-fetched `WebAssembly.Module`.
  Parameter retained in the signature for type-compat; the value is
  intentionally unused.
- The `engine-edge.smoke.test.ts` "failed init recovery" regression
  test was skipped (with a TODO for re-expressing the rejection-
  caching guard via a dynamic-import mock) since the bundler target
  can't be made to fail on caller input. The cache-clearing logic in
  `ensureReady` is unchanged + still protects the same shape for OTHER
  failure modes (e.g., dynamic import errors).

#### Consumer compatibility

All known `initEngineEdge` consumers run inside a bundler that supports
`.wasm` imports — `@kya-os/gateway-worker` (wrangler), `@kya-os/checkpoint-
nextjs/middleware-edge` (webpack), `@kya-os/checkpoint-wasm-runtime/src/
engine/orchestrator/verify-request-edge` (consumed by both above). No
browser-direct consumer exists, so switching off the web target is safe.

#### Version

Workspace-internal change; npm publish deferred until the next
coordinated cut. Workspace consumers (gateway worker, checkpoint-nextjs)
pick up the fix immediately via `pnpm` symlinks.

### Phase-D.9b — engine-only publish path

Internal-only change (no consumer-visible API removal). The
`rust/crates/agentshield-wasm` Rust crate was deleted as part of
Phase-D.9b after the Cloudflare gateway worker migrated onto
`./orchestrator/edge`. Build/publish plumbing follows:

- **Removed `copy-wasm` script** from `package.json`. The
  `prepublishOnly` chain no longer copies the legacy
  `agentshield_wasm_bg.wasm` artifact from the now-deleted crate —
  publishing 1.4.4 against this tree would have failed at that step.
- **Removed `./wasm/agentshield_wasm_bg.wasm` subpath export.** The
  legacy artifact is no longer shipped with the npm package.
- **Removed `wasm/agentshield_wasm*` files** from the package's `wasm/`
  directory. Only the three `kya-os-engine*` artifact directories
  (Node, web, bundler targets) remain.

#### Orchestrator legacy header parser — compact-JWS shape accepted

`tryBuildMcpIFromLegacyHeader` (`engine/orchestrator/build-agent-request.ts`)
now accepts **two** wire shapes in the `KYA-Delegation` header when
`legacyEnvelopeFallback: true`:

1. JSON envelope `{"protected":"…","payload":"…","signature":"…"}`
   (the pre-Envelope-1 TS bouncer form). Unchanged behavior.
2. Compact JWS `<protected>.<payload>.<signature>` (the form
   consumed by the legacy `agentshield-wasm` `verify_mcp_i_proof`
   function on the gateway worker). New in this release.

Why: the gateway-worker cutover in Phase-D.9b moves MCP-I parsing
from `verify_mcp_i_proof` (compact-JWS only) onto the orchestrator
(JSON-envelope only pre-this-release). Third-party agents or custom
integrations shipping compact JWS in the header would have silently
fallen through to PlainHttp post-cutover; this extension preserves
the parse path so they keep producing `McpI` agent requests.

JSON parse runs first because a compact JWS is never valid JSON.
A JSON object that's not envelope-shaped does NOT fall through to
the compact-JWS branch — it's unambiguously a malformed envelope
attempt, returns null. Coverage: 4 new fixtures in
`build-agent-request.test.ts` (19/19 pass).

The package's runtime API surface is unchanged. The legacy
`./edge` entry (`StaticWasmLoader`, `WasmDetector`,
`src/wasm-bindgen/agentshield_wasm.{js,d.ts}`) is still present in
source — its upstream consumers (`@kya-os/checkpoint-nextjs/edge`,
`@kya-os/checkpoint/wasm/loader-factory`) are throw-stubbed at the
public API layer, so the legacy WASM glue never executes at runtime.
A future cleanup will delete those source files; this release just
unblocks deleting the underlying Rust crate.

Phase-D.9b PR adds a structural deletion gate
(`packages/checkpoint-nextjs/src/__tests__/d9b-deletion-gate.test.ts`)
that re-asserts these conditions on every test run.

## 1.5.1 — 2026-05-20

**Tier 1 verification is now observable from the wire.** Closes the
diagnostic gap Bench-Detection-Delta V3 (2026-05-20) surfaced: although
Tier 1 RFC 9421 cryptographic verification was engaging correctly in
1.5.0, the response headers only exposed `Decision`-level info — operators
couldn't tell whether the engine had verified the request OR what tier
fired. Required a bench-side `onResult` callback to see
`detectionDetail.metadata.verified_*`. This patch surfaces the same
information on the wire.

Patch bump (not minor) because both changes are additive observability
improvements — no public API surface change, no behavior change for any
existing consumer:

| Change                                                                                                 | Type     | Consumer impact                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `X-Checkpoint-Verified-Tier` / `-Vendor` / `-Protocol` response headers                                | Additive | New headers only emitted when `detectionDetail.metadata.verified_*` populated. No existing consumer parsed these (they didn't exist).                                                                                                                                                                                  |
| `ruleset_hash` `t1:` slot now populates with vendor-keys SHA-256 (`t1:<64-hex>` instead of `t1:unset`) | Additive | The structured format documented `unset` / `disabled` / `<64-hex>` as valid slot values per [[Engine-Tier-Ruleset-Hash-1]]. Operators pinning on the literal `t1:unset` string would see breakage — but doing so was always against the documented contract (the slot was documented as a placeholder pending wiring). |

### Added

- **`X-Checkpoint-Verified-Tier` response header.** Emitted when
  `detectionDetail.metadata.verified_tier` is a finite number or non-empty
  string. Value is the stringified tier (`"1"` for Tier 1 RFC 9421 today;
  `"2"` reserved for Tier 2 IP+UA cross-match attribution when that path
  populates `verified_*`).
- **`X-Checkpoint-Verified-Vendor` response header.** Emitted when
  `detectionDetail.metadata.verified_vendor` is a non-empty string.
  Today: `openai` (the only Tier 1 vendor with a bundled JWK). Future
  Anthropic / Google RFC 9421 signers will add `anthropic` / `google`
  values without a SemVer event.
- **`X-Checkpoint-Verified-Protocol` response header.** Emitted when
  `detectionDetail.metadata.verified_protocol` is a non-empty string.
  Today: `rfc9421` (HTTP Message Signatures). Future MCP-I JWS envelope
  verifications will emit `mcp-i` / `did-jws`.
- **`X-Checkpoint-Ruleset-Hash`'s `t1:` slot now populates.** Computed
  at engine build time as SHA-256 of the canonical concat of every
  `data/vendor-keys/*.json` file (sorted by filename, `\n--\n`
  separator). Build-time panic gate on empty dir / empty file prevents
  shipping a misleading empty-input hash (mirrors Tier 2/3 discipline).
  The `cargo:rustc-env=KYA_OS_ENGINE_TIER1_KEYS_SHA256` producer in
  `kya-os-engine/build.rs` is the single source of truth; `api.rs`
  consumes via `env!()`.

### Defensive guards (PR #2718 reviewer feedback)

- `X-Checkpoint-Verified-Tier` number path uses `Number.isFinite` to
  reject `NaN` / `±Infinity` (`typeof NaN === 'number'` is true in JS,
  so a plain typeof check would emit `Verified-Tier: NaN`).
- `X-Checkpoint-Verified-Tier` string path requires `length > 0`
  (mirrors `Verified-Vendor` / `Verified-Protocol` defensive guards).

### Tests

- New Rust drift gate `ruleset_hash_tier1_slot_resolves_to_vendor_keys_sha`
  re-reads `data/vendor-keys/*.json` at test time + asserts the `t1:`
  slot matches the computed SHA. Mirrors the existing Tier 2 YAML drift
  gate. 96/96 lib tests pass.
- 6 new vitest cases on `render-decision.test.ts` cover the
  `Verified-*` header emission (presence, absence, partial metadata,
  Block-path co-emission, observe-mode co-emission, empty-string +
  NaN + ±Infinity defensive guards, number-vs-string acceptance).
  26/26 render-decision tests pass.

### What this DOESN'T change

- Engine verify-dispatch behavior — unchanged. Tier 1 was already
  engaging in 1.5.0; this release only makes that visible.
- Public API surface — unchanged. No new exports, no new types, no
  removed exports.
- Existing response headers — unchanged. `X-Checkpoint-Decision`,
  `-Reason`, `-Engine`, `-Engine-Version` emit exactly as before.
- Ruleset-hash format — unchanged. The structured-prefix format
  pinned by `ruleset_hash_matches_structured_per_tier_format` still
  matches `sha256:t1:<slot>:t2:<slot>:t3:<slot>:t4:<slot>` where
  each slot is one of `unset`/`disabled`/`[0-9a-f]{64}`. Only the
  `t1:` slot's runtime value changed from `unset` to `<64-hex>`.

### Pin guidance

- Customers pinning `^1.5.0` (caret) → auto-pick up 1.5.1 on next
  install. No action needed.
- Customers pinning `~1.5.0` (tilde) → auto-pick up 1.5.1 on next
  install. No action needed.
- Customers pinning `1.5.0` (exact) → no auto-pickup. Bump to
  `^1.5.1` to see Tier 1 attribution on the wire.

## 1.5.0 — 2026-05-19

**Formal announcement of HTTP-Sig-Verifier-1 — Tier 1 RFC 9421 HTTP
Message Signature verification (PR #2642).** Engine cryptographically
verifies OpenAI's `ChatGPT-Agent` signed traffic at 0.99 confidence
with vendor attribution on `detection_detail.metadata.verified_*`.
Pin `^1.5.0` if your dashboard / handler consumes the new Tier 1
metadata or the failure/skip-reason taxonomy.

### Honest note on what 1.5.0 actually is

The Tier 1 code first rode along in 1.4.3 + 1.4.4 because the publish
workflow rebuilds wasm from `main` HEAD and #2642 had already merged.
But both releases shipped under publish-mechanic CHANGELOG entries
(`workspace:*` leaks, `.gitignore` poison) and were never advertised
as the Tier 1 ship. 1.5.0 corrects the SemVer label: Tier 1 adds a
new `AgentRequest::HttpSigned` enum variant + new `verified_*`
metadata fields + new failure-reason taxonomy strings. That's
additive public API surface → minor bump, not patch. 1.4.4 is not
broken and stays on the registry, but new consumers should pin
`^1.5.0` for clarity of intent.

### Added (Tier 1 RFC 9421 verification)

- **`AgentRequest::HttpSigned` variant** wired through `verify`
  dispatch. Verified signatures short-circuit to a high-confidence
  `Permit` Decision; failed / skipped verification falls through to
  the existing plain-HTTP pipeline with `tier1_failure_reason` /
  `tier1_skipped_reason` preserved on the detection metadata.
- **`detection_detail.metadata.verified_*` attribution** when Tier 1
  succeeds: `verified_tier` (1), `verified_protocol` (`rfc9421`),
  `verified_vendor` (e.g. `openai`), `key_id`, `covered_components`.
  F-18 dual-write contract: these fields are byte-stable.
- **Embedded OpenAI JWK manifest** (`data/vendor-keys/openai.json`)
  loaded via `include_str!` into a lazy `VendorKeyRegistry`. Resilient
  to packaging failure (engine still runs without Tier 1 if the
  manifest is absent or malformed).
- **Failure-reason taxonomy (byte-stable):** `bad_signature`,
  `replay_expires_violation`, `replay_window_violation`, `alg_mismatch`,
  `unknown_keyid_with_signature_agent`, `signature_agent_mismatch`,
  `malformed_header`, `unsupported_covered_component`,
  `missing_covered_header`, `key_expired`, `key_not_yet_valid`.
- **Skip-reason taxonomy (byte-stable):** `no_signature_header`,
  `unsupported_alg`, `unknown_signature_agent_no_matching_keyid`.
- **Cross-runtime parity:** 13 fixtures × 3 runtimes (Rust + WASM
  Node + WASM Edge) green, including 2 new `HttpSigned` fixtures
  covering skip + fail paths.
- **`serde-wasm-bindgen` `Serializer::json_compatible()` fix** so
  `BTreeMap<String, Value>` metadata survives `JSON.stringify` across
  the WASM boundary. Was silently collapsing to `{}` before; Tier 1
  is the first real emit site for metadata so the bug surfaced now.

### Operator surface

- `scripts/refresh-openai-signing-keys.ts` — runnable today; fetches
  `https://chatgpt.com/.well-known/http-message-signatures-directory`,
  diffs against the embedded manifest, applies 4 sanity gates (>50%
  removal block, >10× growth block, Ed25519-only alg whitelist,
  per-kid expiry regression block) + `--ack-vendor` one-shot override.
  GitHub Actions cron wrapper lands in a follow-up.

### Verification gates active on this release

All four publish-workflow gates from 1.4.4 still apply:

1. Sanity gate — all three wasm-pack targets produce non-trivial
   `.wasm` binaries on disk.
2. Tarball-content gate — `tar -tz` listing must contain every
   required wasm artifact path. (1.4.1/1.4.2 failure mode.)
3. Manifest gate — packed `package.json` must contain zero
   `workspace:` substrings in any dependency field. (1.4.3 failure
   mode.)
4. Post-publish re-fetch gate — fetches the published tarball from
   the registry and re-runs gates 2 + 3.

### Adobe pitch narrative upgrade

Pre-1.5.0: "MCP-I cryptographic verification + Tier 2 vendor IP+UA
cross-match + Tier 3 UA pattern fallback (Monitor)." Post-1.5.0:
"Same engine; same `Decision` output shape; also verifies RFC 9421
signed traffic from OpenAI's ChatGPT-Agent at 0.99 confidence today,
plus any vendor that adopts the same protocol tomorrow. No vendor
adoption of MCP-I required for verification to work." DataDome /
Cloudflare / Kasada ceiling at Tier 3 heuristics; this release puts
KYA-OS one tier above the field for any vendor that signs.

### Follow-ups (not in this release)

- Real ChatGPT-Agent traffic fixture (synthetic-signed fixtures cover
  dispatch + crypto today).
- GitHub Actions cron + PR template + vitest coverage + architecture
  doc for the JWK refresh script.
- Phase 2 crypto (RSA-PSS-SHA512 + ECDSA-P256-SHA256) — when a
  second vendor adopts RFC 9421.

## 1.4.4 — 2026-05-18

**Third recovery release. Do NOT use 1.4.3 — the published manifest
shipped `@kya-os/checkpoint-shared: "workspace:*"` instead of the
resolved version. Consumers can't install with any package manager
(pnpm errors with `ERR_PNPM_WORKSPACE_PKG_NOT_FOUND`; npm/yarn try to
fetch `workspace:*` from the registry and fail).**

### What 1.4.3 got wrong (and 1.4.4 fixes)

The new publish workflow (#2675/#2676) uses `npm pack --ignore-scripts`
so it can skip `prepublishOnly` (which would re-introduce the wasm-pack
`.gitignore` poison that broke 1.4.1/1.4.2). The trade-off we missed:
`pnpm publish` and `pnpm pack` rewrite the `workspace:` protocol to
concrete versions at pack-time; `npm pack` does NOT. So the new
workflow shipped a manifest that no package manager outside the source
workspace could resolve.

Fix in this release:

1. **Pre-pack substitution step** in `pack-and-verify-tarball`: reads
   `@kya-os/checkpoint-shared`'s actual version from the workspace and
   rewrites `workspace:*` → `1.1.0` (or whatever the workspace publishes)
   in the wasm-runtime manifest before `npm pack` runs.
2. **New `MANIFEST GATE`** in the same job: extracts the packed
   `package.json` from the tarball and asserts zero `workspace:`
   substrings in any dependency field. The 1.4.3 publish would have
   failed at this gate.

Two artifact-shape gates (1.4.1/1.4.2 failure) + two manifest gates
(1.4.3 failure) + a post-publish re-fetch gate now stand between any
future publish and a broken registry entry.

## 1.4.3 — 2026-05-18 — DEPRECATED (workspace:\* leak)

**Second recovery release. Do NOT use 1.4.1 OR 1.4.2 — both shipped
broken tarballs missing `wasm/kya-os-engine/*` (nodejs target) and
`wasm/kya-os-engine-web/*` (web target). Consumers crash on import
with `ERR_MODULE_NOT_FOUND` (or `FUNCTION_INVOCATION_FAILED` on
Vercel).**

### What 1.4.2 got wrong (and 1.4.3 fixes)

The 1.4.2 recovery was supposed to fix the missing-artifact bug from
1.4.1 by building all three wasm targets before publish. The local
build DID produce all the artifact files on disk — but the tarball
still shipped only `README.md` in those subdirs.

Root cause: **`wasm-pack build` writes a `.gitignore` containing `*`
into every `--out-dir`.** `pnpm pack` (and `npm pack`) honour nested
`.gitignore` patterns when filtering tarball contents, so every just-
built `.wasm` + `.js` + `.d.ts` gets filtered OUT of the tarball at
pack time. Only `README.md` survives because npm has a hardcoded rule
to always include READMEs. The 1.4.2 publish flow had no gate that
inspected tarball contents post-pack, so the broken state shipped
silently for a second time.

### What 1.4.3 ships

Same TS + Rust changes as 1.4.1/1.4.2 (no code regression). New
defenses:

- `rust/scripts/build-engine-wasm.sh` now `rm -f`s the wasm-pack-
  generated `.gitignore` from each `--out-dir` post-build. The poison
  files can't reach `pnpm pack` from a clean local-dev publish.
- `packages/checkpoint-wasm-runtime` `copy-engine-wasm-bundler` npm
  script chains a matching `rm -f` for the bundler target.
- New CI workflow `.github/workflows/publish-wasm-runtime.yml`:
  builds all three targets in-runner, defuses the `.gitignore` poison
  before pack, packs the tarball, **asserts the required `.wasm` +
  `.js` paths are inside the tarball before publish**, and **re-
  fetches the published tarball from npm post-publish and re-runs the
  same assertions** to catch registry-side mutations. After a
  successful publish, the workflow dispatches a `repository_dispatch`
  event to `checkpoint-customers` so its bench fixture's lockfile can
  be auto-bumped.

This is the gate 1.4.1 + 1.4.2 would have failed. Future broken
tarballs can't reach the registry.

### Migration

Upgrade `@kya-os/checkpoint-wasm-runtime` from `1.4.1` or `1.4.2` to
`1.4.3`. Both poisoned versions will be deprecated on npm with a
"Broken tarball — upgrade to 1.4.3" message after this release lands.

---

## 1.4.2 — 2026-05-18

**Recovery release. Do NOT use 1.4.1 — it was published with a broken
tarball that ships only `wasm/kya-os-engine-bundler/*` and is missing
`wasm/kya-os-engine/*` (nodejs target) + `wasm/kya-os-engine-web/*`
(web target) entirely. Consumers using the `./engine`,
`./engine/node`, `./orchestrator`, or `./orchestrator/node` subpaths
crash on import with `ERR_MODULE_NOT_FOUND` (or
`FUNCTION_INVOCATION_FAILED` on Vercel).**

### What 1.4.1 should have shipped

1.4.1 was a patch release bundling two fixes on top of 1.4.0:

- **#2659** — split anthropic vendor pattern into 3 per-bot entries
  (`anthropic_claude_user`, `anthropic_claudebot`,
  `anthropic_claude_web`). Updates the Tier-3 ruleset hash.
- **#2663** — `httpStatusForBlockReason` + `blockResponseBody`
  switches gained `Tier3UAMatch` and `AgentAttribution` cases (were
  falling through to `undefined` status → Express default 500
  error page). Adds the matching variants to the TS `BlockReason`
  union (with snake_case `pattern_id` / `pattern_kind` matching the
  Rust serde wire format).

### Root cause of the broken 1.4.1 tarball

`prepublishOnly` chains `copy-engine-wasm` (nodejs target) +
`copy-engine-wasm-web` (web target) + `copy-engine-wasm-bundler`
(bundler target). Each script `cp`s from `rust/crates/kya-os-engine/
pkg{,-web,-bundler}/` into `packages/checkpoint-wasm-runtime/wasm/`.
The publish was invoked from a fresh `git reset --hard origin/main`
state with **only `wasm-pack build --target bundler`** run before
publish — `pkg/` (nodejs) and `pkg-web/` (web) were empty. The cp
commands silently produced empty target dirs (`wasm/kya-os-engine/`

- `wasm/kya-os-engine-web/`) populated only with the git-committed
  `README.md` placeholders, and the tarball shipped that state.

### What 1.4.2 ships

Identical TS + Rust changes to 1.4.1 (no code regression) but with
the full wasm artifact set (`wasm/kya-os-engine/`,
`wasm/kya-os-engine-web/`, `wasm/kya-os-engine-bundler/`) verified
present before publish.

### Hardening (separate dylan-todo to follow)

`prepublishOnly` should fail-fast when any of the three artifact
dirs is missing rather than producing an empty-but-existing dir.
Filing as `Engine-WASM-Publish-Sanity-Gate-1` so the next regen
can't ship the same shape of partial tarball silently.

---

## 1.4.0 — 2026-05-18

**Minor release** consolidating SDK-Next.js-Integration-Audit-1
([#2640](https://github.com/Know-That-Ai/agent-shield/pull/2640)) and
Engine-Tier3-Monitor-Default
([#2653](https://github.com/Know-That-Ai/agent-shield/pull/2653)).

### Behavioral defaults — Tier-3 now Monitor by default

**`EngineConfig.tier3_action` defaults to `'monitor'`.** Engine emits
Stage 1 classification signals but does NOT short-circuit known-agent
UAs with `Block { Tier3UAMatch }` of its own — the tenant
`PolicyEvaluator` is the arbiter. Preserves the 1.3.0 behaviour
(tenant policy decides). Prevents the day-1 customer-onboarding
regression a 1.3.1-style hard-coded Block would have caused.

**Opt into Block via `tier3_action: 'block'`** when the host wants
the engine-default block before the tenant policy seam (the bench
harness + customers who've reviewed their traffic):

```ts
import { engineVerify } from '@kya-os/checkpoint-wasm-runtime/engine';

const result = engineVerify(input, {
  ...ctxSpec,
  config: { tier3Action: 'block' },
});
```

**No breaking change from 1.3.0.** The new `BlockReason::Tier3UAMatch`
variant + the `EngineConfig` / `Tier3Action` API are additive. The
1.3.1 patch shipped the Block-default behaviour; 1.4.0 replaces that
default with Monitor + adds the explicit opt-in. **Do not use 1.3.0
or 1.3.1; upgrade to 1.4.0.**

### Added

- wasm-bindgen `--target bundler` artifact at
  `wasm/kya-os-engine-bundler/` for Turbopack / Vite / esbuild
  consumers. Exposed via `./engine` (default) + `./orchestrator`.
- `./engine/node` subpath — explicit nodejs-target safety net for
  Webpack-without-`asyncWebAssembly` consumers. Companion to the
  existing `./orchestrator/node`.
- `EngineConfig` + `Tier3Action` TS types exported from `./engine`.
- `wasm:rebuild` npm script that runs the canonical
  `rust/scripts/build-engine-wasm.sh` regen flow.

### Changed

- `verify-request.ts` is engine-agnostic — exports
  `createVerifyRequestApi(defaultEngine)` factory; the two entry
  barrels (`./orchestrator/index.ts`, `./orchestrator/node.ts`)
  inject their own engine bridges so `orchestrator-node.mjs` no
  longer transitively imports the bundler artifact's `.wasm`.
- WASM artifacts (nodejs + web + bundler) rebuilt from post-#2653
  engine source.

### Removed

- Dead `onSuccess` wasm-copy in `tsup.config.ts`'s
  `nodeFallbackEntries` — the nodejs glue is now an external import.
- `dynamic-loader.ts` `eval()` runtime-detection probes — the
  bundler-target artifact handles runtime detection natively.

---

## 1.3.1 — 2026-05-18

**Patch release on top of 1.3.0** — do NOT use 1.3.0; it was published
during Engine-Tier3-Ruleset-Wiring-1 review and shipped with three
issues caught in CI:

1. **Hash format pre-coordination.** 1.3.0 shipped a 2-slot
   `sha256:<t2-data-version>:<t3-pattern-sha256>` placeholder
   convention. Engineer A's [#2639](https://github.com/Know-That-Ai/agent-shield/pull/2639)
   merged on main with the canonical 4-slot
   `sha256:t1:<slot>:t2:<slot>:t3:<slot>:t4:<slot>` format. 1.3.1 is
   rebased on that merge — drops this PR's own `TIER3_PATTERN_SHA256`
   const + `tier3_pattern_sha_matches_file` test and consumes
   Engineer A's `build.rs`-emitted `AIVF1_TIER3_PATTERNS_SHA256` env
   var via `TIER3_RULESET_HASH = env!(...)`. Today's value (1.3.1):
   `sha256:t1:unset:t2:<yaml-sha>:t3:<patterns-sha>:t4:unset`.

2. **`sfv = "0.14"` leaked into `kya-os-engine`'s `[dependencies]`**
   (literally with a "Temporary measurement dep — DO NOT COMMIT"
   comment), carried in from an unrelated HTTP-Sig-Verifier-1 work
   tree via a stash apply. The crate is not referenced in source, so
   the WASM binary is unaffected, but it adds an unused transitive
   to the dependency graph. Removed in 1.3.1.
3. **`BlockReason::Tier3UAMatch.confidence` was `f32`**, which round-
   trips through JS `Number` (always f64) with rounding error —
   Rust serialized `0.95` while WASM serialized `0.949999988079071`.
   The cross-runtime parity gate caught this as JSON-string
   divergence even though the underlying f32 bit pattern was
   identical. Fixed in 1.3.1 by quantizing to `u32` percent (0–100)
   at the engine boundary, matching the existing
   `DetectionDetail.confidence` convention.

**Wire-format change between 1.3.0 and 1.3.1:**

```diff
- { "kind": "Tier3UAMatch", "confidence": 0.95 }
+ { "kind": "Tier3UAMatch", "confidence": 95 }
```

Any consumer that pinned 1.3.0 must update — `confidence` is now a
percent integer, not a float. The cross-runtime stability is the
load-bearing reason; see the Tier3UAMatch docstring.

## 1.3.0 — 2026-05-18 (DEPRECATED — see 1.3.1)

**Engine-Tier3-Ruleset-Wiring-1.** Replaces the
`phase-1-d-impl-placeholder` ruleset hash with a real Tier 3 UA
pattern table, wired into the engine's Stage 1b default policy. The
engine now Blocks known agent UAs even with an empty tenant policy.

Conforms to `dylan-todos/Engine-Tier-Ordering-1.md` contract:
`Tier 1 (signed) > Tier 2 (IP+UA) > Tier 3 (UA only) > Tier 4 (IP only)`.
This release ships Tier 3.

### Added

- `BlockReason::Tier3UAMatch { pattern_id, pattern_kind, confidence }`
  — additive variant, priority 8 (lowest). Fires only on the PlainHttp
  path when Stage 1 classifies the request as a known agent.
- Stage 1b default policy in `verify_plain_http`: if Stage 1 classifies
  the request as `KnownAiAgent`, `AiCrawler`, or `HeadlessBrowser`,
  the engine short-circuits with `Decision::Block { Tier3UAMatch }`
  BEFORE handing off to tenant policy. Calibrated defaults that don't
  expose customers to the threshold-knob footgun.
- `SearchBot` is **exempted** from Tier 3 default per architect
  precedent (`tests/cross_runtime_baselines.rs` line 175-178: "search-
  engine indexing is generally permitted by tenant policy"). Googlebot
  / Bingbot / Applebot / DuckDuckBot still flow through to tenant
  policy.

### Changed

- `EngineInfo.ruleset_hash` is now `sha256:<t2>:<t3_sha256>` where
  `<t3_sha256>` is the SHA-256 of `patterns_generated.rs` (real
  identity, not placeholder). `<t2>` is `t2-unset` until Engineer A's
  reputation/IP-feed schema commits its own identity hash.
- Drift gate: unit test `tier3_pattern_sha_matches_file` recomputes
  the SHA at test time and fails with a copy-paste-ready new SHA if
  `patterns_generated.rs` drifts.

### Breaking change in default behavior

Consumers who deployed the engine with an **empty tenant policy** and
expected permit-by-default for unsigned traffic now get Block on any
known agent UA. This is the architectural intent — calibrated defaults
that don't require every customer to write their own bot-blocking
policy. Mitigation: deploy a tenant policy that explicitly permits the
agent classes you want to allow.

### Test coverage added

- 5 new tests in `stage1_classification.rs` covering each blocking
  class + SearchBot allowlist + real-human permit.
- Existing baseline tests in `cross_runtime_baselines.rs` updated to
  assert `Tier3UAMatch` instead of the supplanted `PolicyDenied` path.
- 173/173 TS tests (including cross-runtime parity) still green.

### Followups

- **Engine-Pattern-Codegen-Retirement-1** (filed): replace
  `patterns_generated.rs` (legacy YAML codegen) with a build-time JSON
  export of `KNOWN_AGENT_PATTERNS` from `@kya-os/checkpoint-shared`,
  with the same drift-prevention pattern as #2599. Current PR uses
  the existing `patterns_generated.rs` data as the Tier 3 source; the
  followup makes the TS-side `KNOWN_AGENT_PATTERNS` the engine's SSOT.
- **Tier 2 data version coordination** (Engineer A): substitute
  `t2-unset` once the reputation/IP-feed schema commits its identity.

---

## 1.2.0 — 2026-05-18

Phase-D.8b engine-surface expansion.

### Added

- `VerifyResult.detectionDetail`, emitted by `kya-os-engine` in the same
  pass as `decision`. This preserves the rich detection shape (`isAgent`,
  `detectedAgent`, `agentType`, `verificationMethod`, `riskLevel`,
  `reasons`) without forcing consumers to reconstruct it from
  `decision.signals`.
- Cross-runtime parity now compares `detectionDetail` across Rust,
  Node-WASM, and Edge-WASM fixtures.

### Changed

- `verifyRequest()` and `verifyRequestEdge()` now return the richer
  `VerifyResult` shape consistently for normal results and parse-error
  fallbacks.

## 1.1.3 — 2026-05-17

**Critical runtime fix for Express on Vercel.** 1.1.2 still failed at
deploy time on `@vercel/node`-hosted Express functions with:

```
Error: Dynamic require of "fs" is not supported
  at .../dist/orchestrator-node.mjs:14:9
  at wasm/kya-os-engine/kya_os_engine.js (...:454:21)
```

### Root cause

The wasm-bindgen `--target nodejs` glue contains literal
`require('fs').readFileSync(...)` to load the .wasm artifact. esbuild
rewrites that to its `__require('fs')` helper. The helper checks
`typeof require !== "undefined"` — in a pure ESM context (.mjs at
runtime) there is no global `require`, so the helper falls through
to its `throw Error('Dynamic require of "X" is not supported')`.

`shims: true` injects `__dirname` / `__filename` shims but does **not**
inject a `require` shim. The two are separate concerns in tsup.

### Fix

Format-aware tsup `banner` injects
`const require = createRequire(import.meta.url);` at the top of every
ESM (.mjs) Node-target bundle. esbuild's `__require` helper then
finds `require` in scope and uses it for the .wasm load. CJS bundles
are unchanged (they already have a real `require` global). Edge
bundles are unchanged (separate tsup config, no banner — Edge runtimes
do not support `node:module`).

### Why the previous "pivot to Express" path didn't escape this

The architect's earlier verdict (close [#2616](https://github.com/Know-That-Ai/agent-shield/pull/2616),
pivot bench to Express) was made under the assumption that Express's
direct Node import flow would bypass the bundler-interop layers that
broke Next.js Turbopack. Empirically, `@vercel/node` compiles the
function entry into a CJS→ESM hybrid that loads
`dist/orchestrator-node.mjs` through `loadESMFromCJS` — which executes
the .mjs in pure ESM context. Same require-less environment, same
failure. Express was not an escape.

### Followup

[SDK-Next.js-Integration-Audit-1 (#2618)](https://github.com/Know-That-Ai/agent-shield/issues/2618)
Option B (wasm-bindgen `--target bundler`) remains the proper long-term
fix — it generates wasm-bindgen glue that does not require runtime CJS
globals. Until that lands, the createRequire banner is the minimal
defense for all Node-host runtimes.

### Surfaced by

Bench-Before-After-1 §3.8 — `bench-new-express` deployment on Vercel
returned `FUNCTION_INVOCATION_FAILED` with the stack trace above. The
stack proved the failure persists past the Express pivot, requiring
the wasm-runtime fix to be re-opened.

---

## 1.1.2 — 2026-05-17

Fourth in the SDK-WASM-Bundler-Loader sequence. The 1.1.1 fix made
`engineVerify` reference the real wasm binding, but Node's strict
ESM loader at Vercel runtime still failed with:

```
ReferenceError: __dirname is not defined in ES module scope
```

The wasm-bindgen `--target nodejs` glue uses CJS-only globals
(`__dirname`, `__require`) which don't exist in ESM scope. When
tsup inlines that CJS code into the .mjs bundle, ESM execution
breaks.

### Fix

`shims: true` in tsup config. Injects the standard polyfills at the
top of every ESM output:

```javascript
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const require = createRequire(import.meta.url);
```

Bundle proof:

```
var getFilename, getDirname, __dirname$1;
getFilename = () => fileURLToPath(import.meta.url);
__dirname$1 = getDirname();
// ...
var wasmPath = `${__dirname$1}/kya_os_engine_bg.wasm`;
```

### Edge bundle caveat

`shims: true` applies to ALL ESM outputs, including the Edge entry.
The Edge bundle now has `import 'path'` + `import 'url'` at the top.
`path` is not available in Vercel Edge runtime — could be an issue
for Edge consumers. Bench-new uses Node runtime so this doesn't
affect the immediate measurement, but a follow-up should split the
tsup build into per-runtime configs (Node-only entries get shims;
Edge entries don't). Filing as SDK-WASM-Bundler-Loader-4.

### Consumers

No package.json changes needed in `@kya-os/checkpoint-{nextjs,express}` —
both already use `workspace:^` to depend on `^1.1.0`, so fresh
installs automatically pull 1.1.2 transitively. Bench-new needs
a lockfile bump + redeploy.

---

## 1.1.1 — 2026-05-17

**Critical runtime fix.** 1.1.0 (and all prior versions back to 1.0.0)
shipped with `engineVerify` tree-shaken to a broken stub —
`function engineVerify(input, ctx) { const result = (void 0)(input, ctx); return result; }`.
The wasm-bindgen `verify` import was removed by tsup at build time
because `"sideEffects": false` told the bundler the whole package was
side-effect-free, but the wasm-bindgen `--target nodejs` JS file binds
its exports as a side-effect of loading (`module.exports = ...` runs
at import time + the WASM instance writes its symbols into that
exports object).

Why this didn't surface before SDK-WASM-Bundler-Loader-1 (#2600):
Next.js consumers couldn't reach `engineVerify` at all because the
Web-target WASM URL trick failed bundler analysis first. Once #2600
unblocked the build, every request started fail-opening with
`(void 0) is not a function (TypeError)`. Express consumers likely
hit the same bug but it manifested differently (verification just
silently failed) and went unreported.

### Fix

Four coordinated changes — each addresses a different layer of the
wasm-bindgen-meets-modern-bundler problem:

1. **Source: namespace import + lazy property access**
   (`src/engine/index.ts`). Static named imports of CJS exports
   (`import { verify }`) get tree-shaken to `(void 0)` by esbuild
   because it can't see runtime-assigned `exports.verify`. Reading
   `wasmModule.verify` inside the function body keeps the access as
   a runtime member lookup that survives esbuild's static analysis.

2. **Per-engine `wasm/<target>/package.json`** — pins each subdir to
   `"type": "commonjs"` (Node target) or `"type": "module"` (Edge
   target). The parent `wasm/package.json` declares `"type": "module"`
   for the older `agentshield_wasm.js` ESM file; without these
   per-subdir overrides, Node mis-classifies the CJS Node-target file
   as ESM and throws `ERR_REQUIRE_ESM` in test environments.

3. **`sideEffects: ["./wasm/**/\*.js"]`** in package.json (was `false`).
   Defense in depth — preserves wasm-bindgen modules' load-time
   binding side effects even if future tsup config changes loosen
   the explicit safeguards above.

4. **tsup `onSuccess` copies `wasm/.../kya_os_engine_bg.wasm` to
   `dist/`** so the inlined wasm-bindgen glue's
   `__dirname + '/<name>_bg.wasm'` lookup finds the artifact next
   to the bundled JS (otherwise ENOENT — `__dirname` resolves to
   `dist/` when bundled, not the original `wasm/` source location).
   Adds ~1.2 MB to the bundle dir but the file was already in the
   published tarball; it's now in two places. Acceptable for a binary.

### Bundle verification

Before (broken):

```
function engineVerify(input, ctx) {
  const result = (void 0)(input, ctx);   # ✗ wasmVerify tree-shaken
  return result;
}
```

After (this PR):

```
var wasmModule = __toESM(require_kya_os_engine());
function engineVerify(input, ctx) {
  const verify2 = wasmModule.verify;     # ✓ runtime property access
  return verify2(input, ctx);
}
```

### Test verification

- `@kya-os/checkpoint-wasm-runtime`: 173/173 tests pass
- `@kya-os/checkpoint-nextjs`: 141/141 tests pass (was 109 in 1.1.0)
- `@kya-os/checkpoint-express`: 21/21 tests pass

### Consumers

No package.json changes needed in `@kya-os/checkpoint-{nextjs,express}`
— both already use `workspace:^` to depend on `^1.1.0`, so fresh
installs (including Vercel + Lambda redeploys) automatically pull
1.1.1 transitively.

### Coordinated release context

Third in the SDK-WASM-Bundler-Loader sequence:

- 1.0.0 → 1.1.0: SDK-WASM-Bundler-Loader-1 (#2600) — Node-only orchestrator entry
- 1.1.0 → **1.1.1**: this — `sideEffects` config preserves wasm-bindgen binding
- Future: SDK-WASM-Bundler-Loader-2 (#2605) — explicit init API for custom runtimes

---

## 1.1.0 — 2026-05-17

**SDK-WASM-Bundler-Loader-1 fix.** Surfaced during Bench-Before-After-1
sub-phase 3 follow-up: the `./orchestrator` barrel bundled both the
Node-target and Web-target wasm-bindgen outputs, and the Web-target's
`new URL("kya_os_engine_bg.wasm", import.meta.url)` browser-style
fallback failed static analysis in Next.js 16's Turbopack (and
webpack ≥5) even when the runtime branch was unreachable. Net result:
`@kya-os/checkpoint-nextjs`'s `withCheckpoint` couldn't be deployed
under Next.js's Node runtime at all — middleware imports died at
build time.

### New (additive, zero customer-visible change)

- **`./orchestrator/node` subpath export** — Node-only orchestrator
  entry that omits the Edge-variant import chain. Re-exports the same
  `verifyRequest`, `buildAgentRequest`, `renderDecisionAsResponse`,
  and types as the main barrel. No URL trick in the bundle.
- **`"node"` export condition** on the `./orchestrator` entry — routes
  Node-runtime bundlers (Next.js Node runtime, Express, AWS Lambda,
  long-lived Node servers) to `orchestrator-node.mjs` automatically.
  Edge consumers continue routing to `orchestrator-edge.mjs` via
  the pre-existing `"edge-runtime"` and `"browser"` conditions.

### What this means for consumers

**Zero migration required.** Existing imports of
`@kya-os/checkpoint-wasm-runtime/orchestrator` route to the correct
per-runtime variant via the package's `exports` map. The runtime
selection is invisible at the call site:

```typescript
// Unchanged — runtime-conditional resolution happens at bundle time
import { verifyRequest } from '@kya-os/checkpoint-wasm-runtime/orchestrator';
```

Power users who want to lock to a specific variant can import
explicitly:

```typescript
import { verifyRequest } from '@kya-os/checkpoint-wasm-runtime/orchestrator/node';
// or
import { verifyRequestEdge } from '@kya-os/checkpoint-wasm-runtime/orchestrator/edge';
```

### Bundle verification

```
$ grep -c 'kya_os_engine_bg.wasm' dist/orchestrator-node.mjs   # 0
$ grep -c 'kya_os_engine_bg.wasm' dist/orchestrator.mjs        # 1 (barrel — unchanged for back-compat)
$ grep -c 'kya_os_engine_bg.wasm' dist/orchestrator-edge.mjs   # 1 (Edge — expected, runtime handles URL)
```

### Coordinated release

Shipped alongside `@kya-os/checkpoint-{nextjs,express}@1.1.x` to
unblock the `withCheckpoint` factory's Next.js Node-runtime deploy
path. See `docs/benchmarks/bench-before-after-1.md` §3.7 + the
SDK-Envelope-Plumbing-1 ticket (#2594) for the surfacing context.

### Why this wasn't caught earlier

No Next.js end-to-end CI for `withCheckpoint` — the package's unit
tests mock `verifyRequest`, so the wasm-runtime import chain never
actually loads in the test harness. The factory contract is tested;
the bundled artifact's bundler behavior isn't. Adding a sites-driven
build-CI gate is filed as a follow-up.

---

## 1.0.0 — 2026-05-15

E-tracks Phase D — package rename + orchestrator edge variant. **BREAKING.**

### BREAKING CHANGES

- **Package renamed** from `@kya-os/agentshield-wasm-runtime` to
  `@kya-os/checkpoint-wasm-runtime` per architect Q1 + Rename-2 (#2483).
  0-day hard cutover; the legacy `@kya-os/agentshield-wasm-runtime@0.1.6`
  is published with npm's `deprecated` field pointing here. Migrate by
  swapping the import path:
  `from '@kya-os/agentshield-wasm-runtime'` → `from '@kya-os/checkpoint-wasm-runtime'`.

### Added (Edge-WASM-2 folded into Phase D)

- `./orchestrator/edge` subpath — async-init equivalent of `./orchestrator`
  for Vercel Edge / Cloudflare Workers / browser embedding. Mirrors the
  Node orchestrator surface (`verifyRequestEdge`, `initEngineEdge`) and
  consumes the Edge-WASM-1 `engineVerifyEdge` engine bridge.
- `edge-runtime` + `browser` conditions on the `./orchestrator` subpath —
  bundlers targeting edge runtimes automatically route to the async-init
  variant without an explicit subpath.
- `./adapters` subpath barrel — re-exports the 5 DI adapters
  (DidResolver, StatusListCache, ReputationOracle, PolicyEvaluator, Clock)
  for Phase D / E host wrappers.

### Migration

```diff
- "@kya-os/agentshield-wasm-runtime": "^0.1.6"
+ "@kya-os/checkpoint-wasm-runtime": "^1.0.0"
```

```diff
- import { verifyRequest } from '@kya-os/agentshield-wasm-runtime/orchestrator';
+ import { verifyRequest } from '@kya-os/checkpoint-wasm-runtime/orchestrator';
```

For edge runtimes:

```ts
import {
  verifyRequestEdge,
  initEngineEdge,
} from '@kya-os/checkpoint-wasm-runtime/orchestrator/edge';
```

No other API changes. All Phase A/B/C exports — `engineVerify`,
`engineVerifyEdge`, 5 DI adapters, `verifyRequest`,
`renderDecisionAsResponse`, types — preserved under the new package name.

## 0.1.6 — 2026-05-15

Edge-WASM-1 — `--target web` build of `kya-os-engine` shipped alongside
the Node target. See `@kya-os/agentshield-wasm-runtime` (legacy name)
git history for prior phases.
