@kya-os/checkpoint-shared 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +127 -2
- package/dist/beacon-types/index.d.mts +441 -432
- package/dist/beacon-types/index.d.mts.map +1 -0
- package/dist/beacon-types/index.d.ts +441 -432
- package/dist/beacon-types/index.d.ts.map +1 -0
- package/dist/beacon-types/index.js +198 -182
- package/dist/beacon-types/index.mjs +197 -179
- package/dist/beacon-types/index.mjs.map +1 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts +5 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts.map +1 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts +5 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts.map +1 -0
- package/dist/browser-posture-cookie.d.mts +2 -0
- package/dist/browser-posture-cookie.d.ts +2 -0
- package/dist/browser-posture-cookie.js +1 -0
- package/dist/browser-posture-cookie.mjs +2 -0
- package/dist/browser-posture-cookie.mjs.map +1 -0
- package/dist/browser-posture-report.d.mts +50 -82
- package/dist/browser-posture-report.d.mts.map +1 -0
- package/dist/browser-posture-report.d.ts +50 -82
- package/dist/browser-posture-report.d.ts.map +1 -0
- package/dist/browser-posture-report.js +1 -1
- package/dist/browser-posture-report.mjs +2 -1
- package/dist/browser-posture-report.mjs.map +1 -0
- package/dist/browser-posture.d.mts +80 -111
- package/dist/browser-posture.d.mts.map +1 -0
- package/dist/browser-posture.d.ts +80 -111
- package/dist/browser-posture.d.ts.map +1 -0
- package/dist/browser-posture.js +143 -4164
- package/dist/browser-posture.mjs +142 -4161
- package/dist/browser-posture.mjs.map +1 -0
- package/dist/browser.d.mts +323 -316
- package/dist/browser.d.mts.map +1 -0
- package/dist/browser.d.ts +323 -316
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +2 -1
- package/dist/browser.mjs.map +1 -0
- package/dist/canonical-signer/index.d.mts +38 -33
- package/dist/canonical-signer/index.d.mts.map +1 -0
- package/dist/canonical-signer/index.d.ts +38 -33
- package/dist/canonical-signer/index.d.ts.map +1 -0
- package/dist/canonical-signer/index.js +411 -181
- package/dist/canonical-signer/index.mjs +383 -175
- package/dist/canonical-signer/index.mjs.map +1 -0
- package/dist/clearance.d.mts +30 -0
- package/dist/clearance.d.mts.map +1 -0
- package/dist/clearance.d.ts +30 -0
- package/dist/clearance.d.ts.map +1 -0
- package/dist/clearance.js +120 -0
- package/dist/clearance.mjs +112 -0
- package/dist/clearance.mjs.map +1 -0
- package/dist/client-ip-1y2iXAYW.js +237 -0
- package/dist/client-ip-HOfe6ucV.mjs +215 -0
- package/dist/client-ip-HOfe6ucV.mjs.map +1 -0
- package/dist/deploy/index.d.mts +375 -810
- package/dist/deploy/index.d.mts.map +1 -0
- package/dist/deploy/index.d.ts +375 -810
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js +505 -413
- package/dist/deploy/index.mjs +504 -410
- package/dist/deploy/index.mjs.map +1 -0
- package/dist/errors/index.d.mts +101 -101
- package/dist/errors/index.d.mts.map +1 -0
- package/dist/errors/index.d.ts +101 -101
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +341 -314
- package/dist/errors/index.mjs +340 -311
- package/dist/errors/index.mjs.map +1 -0
- package/dist/external-jr_S4iSS.d.mts +4187 -0
- package/dist/external-jr_S4iSS.d.mts.map +1 -0
- package/dist/external-jr_S4iSS.d.ts +4187 -0
- package/dist/external-jr_S4iSS.d.ts.map +1 -0
- package/dist/gateway/index.d.mts +154 -550
- package/dist/gateway/index.d.mts.map +1 -0
- package/dist/gateway/index.d.ts +154 -550
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/gateway/index.js +117 -81
- package/dist/gateway/index.mjs +116 -78
- package/dist/gateway/index.mjs.map +1 -0
- package/dist/gateway-client-ip.d.mts +59 -0
- package/dist/gateway-client-ip.d.mts.map +1 -0
- package/dist/gateway-client-ip.d.ts +59 -0
- package/dist/gateway-client-ip.d.ts.map +1 -0
- package/dist/gateway-client-ip.js +149 -0
- package/dist/gateway-client-ip.mjs +139 -0
- package/dist/gateway-client-ip.mjs.map +1 -0
- package/dist/index.d.mts +15523 -38968
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +15523 -38968
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14950 -16029
- package/dist/index.mjs +14846 -15955
- package/dist/index.mjs.map +1 -0
- package/dist/mcpi/agentshield-api/index.d.mts +45 -44
- package/dist/mcpi/agentshield-api/index.d.mts.map +1 -0
- package/dist/mcpi/agentshield-api/index.d.ts +45 -44
- package/dist/mcpi/agentshield-api/index.d.ts.map +1 -0
- package/dist/mcpi/agentshield-api/index.js +0 -2
- package/dist/mcpi/agentshield-api/index.mjs +1 -1
- package/dist/mcpi/approval-grant/index.d.mts +63 -61
- package/dist/mcpi/approval-grant/index.d.mts.map +1 -0
- package/dist/mcpi/approval-grant/index.d.ts +63 -61
- package/dist/mcpi/approval-grant/index.d.ts.map +1 -0
- package/dist/mcpi/approval-grant/index.js +220 -140
- package/dist/mcpi/approval-grant/index.mjs +219 -137
- package/dist/mcpi/approval-grant/index.mjs.map +1 -0
- package/dist/mcpi/dashboard-config/index.d.mts +2395 -13915
- package/dist/mcpi/dashboard-config/index.d.mts.map +1 -0
- package/dist/mcpi/dashboard-config/index.d.ts +2395 -13915
- package/dist/mcpi/dashboard-config/index.d.ts.map +1 -0
- package/dist/mcpi/dashboard-config/index.js +605 -458
- package/dist/mcpi/dashboard-config/index.mjs +604 -455
- package/dist/mcpi/dashboard-config/index.mjs.map +1 -0
- package/dist/mcpi/multibase-ed25519.d.mts +10 -8
- package/dist/mcpi/multibase-ed25519.d.mts.map +1 -0
- package/dist/mcpi/multibase-ed25519.d.ts +10 -8
- package/dist/mcpi/multibase-ed25519.d.ts.map +1 -0
- package/dist/mcpi/multibase-ed25519.js +182 -106
- package/dist/mcpi/multibase-ed25519.mjs +181 -103
- package/dist/mcpi/multibase-ed25519.mjs.map +1 -0
- package/dist/patterns-CkRVOdtV.js +243 -0
- package/dist/patterns-DzkGy_qk.mjs +173 -0
- package/dist/patterns-DzkGy_qk.mjs.map +1 -0
- package/dist/project-verification-key-C3L5rd8a.js +41 -0
- package/dist/project-verification-key-CgSVX9_m.mjs +37 -0
- package/dist/project-verification-key-CgSVX9_m.mjs.map +1 -0
- package/dist/rolldown-runtime-iY2fYEqi.mjs +19 -0
- package/dist/schemas-BmjNLAE7.js +5677 -0
- package/dist/schemas-DxY-dk9y.mjs +5511 -0
- package/dist/schemas-DxY-dk9y.mjs.map +1 -0
- package/dist/signals/index.d.mts +125 -115
- package/dist/signals/index.d.mts.map +1 -0
- package/dist/signals/index.d.ts +125 -115
- package/dist/signals/index.d.ts.map +1 -0
- package/dist/signals/index.js +1693 -1536
- package/dist/signals/index.mjs +1692 -1533
- package/dist/signals/index.mjs.map +1 -0
- package/dist/test-fixtures/index.d.mts +124 -119
- package/dist/test-fixtures/index.d.mts.map +1 -0
- package/dist/test-fixtures/index.d.ts +124 -119
- package/dist/test-fixtures/index.d.ts.map +1 -0
- package/dist/test-fixtures/index.js +460 -228
- package/dist/test-fixtures/index.mjs +459 -225
- package/dist/test-fixtures/index.mjs.map +1 -0
- package/dist/tool-protection/index.d.mts +368 -1067
- package/dist/tool-protection/index.d.mts.map +1 -0
- package/dist/tool-protection/index.d.ts +368 -1067
- package/dist/tool-protection/index.d.ts.map +1 -0
- package/dist/tool-protection/index.js +366 -285
- package/dist/tool-protection/index.mjs +365 -282
- package/dist/tool-protection/index.mjs.map +1 -0
- package/fixtures/bot-signal-resolution.json +142 -0
- package/fixtures/browser-posture-claims.json +421 -0
- package/fixtures/browser-posture-headers.json +46 -0
- package/fixtures/detection/reason-codes.json +10 -1
- package/fixtures/kya-http/challenge.delegation.fetcher-200.json +9 -3
- package/fixtures/kya-http/challenge.delegation.full.json +9 -3
- package/fixtures/kya-http/challenge.delegation.minimal.json +9 -3
- package/fixtures/kya-http/error-codes.json +7 -2
- package/package.json +21 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,131 @@
|
|
|
1
1
|
# @kya-os/checkpoint-shared
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
Two changes below carry breaking content under a minor, the same call as
|
|
6
|
+
1.4.0 and for the same reason: every npm package depending on this one is
|
|
7
|
+
first-party and republished against it. Read both before upgrading.
|
|
8
|
+
|
|
9
|
+
### Automation evidence in the browser posture token
|
|
10
|
+
|
|
11
|
+
`BrowserPostureSchema` carries two new required booleans, `automation_disclosed`
|
|
12
|
+
and `automation_corroborated`, signed from the issuing batch's
|
|
13
|
+
`client.webdriver`/`client.headless` evidence. They mirror the Rust engine's
|
|
14
|
+
`ClientHeadlessEscalation` two-tier rule for the Java and .NET SDKs to escalate
|
|
15
|
+
on: disclosed evidence (a direct `navigator.webdriver` self-disclosure)
|
|
16
|
+
escalates a Human/IncompleteData baseline to Bot at confidence 80;
|
|
17
|
+
corroborating-only evidence (CDP/plugin/WebGL-consistency artifacts, no direct
|
|
18
|
+
disclosure) escalates to IncompleteData at confidence 40. The cross-runtime
|
|
19
|
+
posture test vectors gained two new cases covering both tiers.
|
|
20
|
+
|
|
21
|
+
### Posture config validation and the cookie-name helper
|
|
22
|
+
|
|
23
|
+
`validateBrowserPostureConfig` now refuses a `projectId` that is not the
|
|
24
|
+
project UUID. The issuer signs `project_id` as the UUID and the beacon names
|
|
25
|
+
the posture cookie after that claim, so a reader configured with the
|
|
26
|
+
project's friendly id verified nothing, silently; it now fails at startup
|
|
27
|
+
with the fix in the message. The cross-runtime posture test vectors were
|
|
28
|
+
regenerated with a UUID project id.
|
|
29
|
+
`postureCookieName` applies the same rule and now lives in a dependency-free
|
|
30
|
+
`./browser-posture-cookie` subpath (re-exported from `./browser-posture`) so
|
|
31
|
+
the beacon names the cookie through the one helper every reader uses.
|
|
32
|
+
`BeaconWorkerMessageType` gains `'posture'`, the worker-to-main relay of a
|
|
33
|
+
`202` ingest body.
|
|
34
|
+
|
|
35
|
+
## 1.4.0, Zod 4
|
|
36
|
+
|
|
37
|
+
Flips the package from Zod 3 to Zod 4.5.4 and removes the public API envelope
|
|
38
|
+
helpers that PR #4853 marked deprecated. Rebuild against the new `.d.ts` and
|
|
39
|
+
re-run any consumer that inspects `issues[].code` before adopting.
|
|
40
|
+
|
|
41
|
+
**Minor release with BREAKING changes.** Per project semver policy (see the
|
|
42
|
+
1.1.0 entry in `@kya-os/checkpoint`'s changelog for the same call) this ships
|
|
43
|
+
as a minor because the only packages on npm that depend on this one are the
|
|
44
|
+
five first-party SDKs (`@kya-os/checkpoint`, `-nextjs`, `-express`,
|
|
45
|
+
`-beacon`, `-wasm-runtime`), and all of them are republished against 1.4.0 in
|
|
46
|
+
this same release. No third-party package declares a dependency on it. Do not
|
|
47
|
+
read the minor as "safe to take blind": the version number carries no warning
|
|
48
|
+
here, so read the list below before upgrading.
|
|
49
|
+
|
|
50
|
+
### BREAKING
|
|
51
|
+
|
|
52
|
+
- `zod` moves to `^4.5.4` in `dependencies`. The published `.d.ts` now carry
|
|
53
|
+
Zod 4 types, so consumers still on Zod 3 must upgrade `zod` to `^4.5.4`
|
|
54
|
+
before taking this release.
|
|
55
|
+
- Removed `PUBLIC_API_ERROR_CODES`, `PublicApiErrorCode`,
|
|
56
|
+
`createPublicSuccessResponse`, `createPublicErrorResponse`, and
|
|
57
|
+
`createPublicPaginatedResponse` from `api/public.ts` and both barrels.
|
|
58
|
+
These were marked `@deprecated` in #4853: no consumer outside this repo.
|
|
59
|
+
Error codes live in `ERROR_CODES` (`constants/errors.ts`); response
|
|
60
|
+
envelopes are documented per route.
|
|
61
|
+
- `.uuid()` validation is now RFC 9562 strict (versions 1 through 8, plus the
|
|
62
|
+
nil and max UUIDs) everywhere it appears in this package's schemas. A
|
|
63
|
+
production probe of every id column behind a request-path `.uuid()` check
|
|
64
|
+
found zero non-conforming values, so no schema was relaxed to compensate.
|
|
65
|
+
If you generate ids outside RFC 9562, switch to a compliant generator
|
|
66
|
+
before adopting this release.
|
|
67
|
+
- Validation issue `code` values follow Zod 4's renames: `invalid_string` is
|
|
68
|
+
now `invalid_format`, `invalid_enum_value` and `invalid_literal` are both
|
|
69
|
+
now `invalid_value`, union failures are `invalid_union`, and record key
|
|
70
|
+
failures are `invalid_key`. Update any consumer that switches on
|
|
71
|
+
`issues[].code`.
|
|
72
|
+
- Default validation message text now follows Zod 4's wording (for example
|
|
73
|
+
`Invalid input: expected string, received undefined`, `Invalid UUID`,
|
|
74
|
+
`Invalid URL`). Update any consumer that matches on message text instead
|
|
75
|
+
of `code`.
|
|
76
|
+
- `.min()`, `.max()`, and `.length()` on `z.string()` now count Unicode code
|
|
77
|
+
points instead of UTF-16 code units. `z.string().min(2)` now rejects a
|
|
78
|
+
single emoji that Zod 3 accepted, and `z.string().max(1)` now accepts a
|
|
79
|
+
single emoji that Zod 3 rejected. No schema in this package changed for
|
|
80
|
+
this: it is Zod 4's own counting rule.
|
|
81
|
+
- `.datetime()` now requires seconds. `2024-01-01T00:00Z` is rejected as
|
|
82
|
+
`invalid_format`; `2024-01-01T00:00:00Z` still passes. No schema in this
|
|
83
|
+
package changed for this.
|
|
84
|
+
- `z.number()` and `z.coerce.number()` now reject `Infinity` (Zod 3 accepted
|
|
85
|
+
it, so a query param such as `?limit=1e400` coerced to `Infinity` and
|
|
86
|
+
passed before; it now fails validation with a 400), and `.int()` now
|
|
87
|
+
rejects values beyond `Number.MAX_SAFE_INTEGER`. No schema in this
|
|
88
|
+
package changed for this.
|
|
89
|
+
- `.url()` now trims surrounding whitespace from its parsed output:
|
|
90
|
+
`' https://x.com '` now parses to `'https://x.com'` instead of being
|
|
91
|
+
returned unchanged as it was on Zod 3. Internal whitespace is untouched.
|
|
92
|
+
No schema in this package changed for this.
|
|
93
|
+
- Errors thrown by this package's schemas are Zod 4 `ZodError` instances.
|
|
94
|
+
The `.errors` alias is gone: read `.issues` instead. `.flatten()` and
|
|
95
|
+
`.format()` still work but are deprecated in Zod 4.
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
|
|
99
|
+
- `ipAddressSchema` is now `z.union([z.ipv4(), z.ipv6()], { error: 'Invalid IP
|
|
100
|
+
address' })`. The accept set changed in both directions: RFC 4007
|
|
101
|
+
zone-scoped IPv6 literals (for example `fe80::1%eth0`) are no longer
|
|
102
|
+
accepted, while uncompressed embedded-IPv4 IPv6 forms (for example
|
|
103
|
+
`0:0:0:0:0:0:13.1.68.3`) are now accepted, where Zod 3's regex rejected
|
|
104
|
+
them. A failing value reports `invalid_union` with message `Invalid IP
|
|
105
|
+
address` instead of `invalid_string` / `Invalid ip`.
|
|
106
|
+
- `ProjectSchema.settings`, `PixelSchema.configuration`,
|
|
107
|
+
`ApiKeySchema.rateLimits`, and `PolicyConfigSchema.thresholds` moved from
|
|
108
|
+
`.default({})` to `.prefault({})` so their nested per-field defaults keep
|
|
109
|
+
filling in the way they did on Zod 3. No behaviour change: this kept the
|
|
110
|
+
Zod 3 fill-in, it did not add one.
|
|
111
|
+
- `CollectedDataSchema.detectionResults.wouldDetectAs` and
|
|
112
|
+
`DetectionTestResultSchema.results` (the two `IntegrationType`-keyed
|
|
113
|
+
records in the fingerprint types) now use `z.partialRecord`. The inferred
|
|
114
|
+
type is unchanged (`Partial<Record<IntegrationType, V>>`), and unknown
|
|
115
|
+
keys are still rejected, now reported as `unrecognized_keys`.
|
|
116
|
+
- The `role` field of `assignmentChangeRequestSchema`
|
|
117
|
+
(`src/types/admin.ts`) moved its custom message from Zod 3's `errorMap`
|
|
118
|
+
option to the Zod 4 `error` param. Message text is unchanged.
|
|
119
|
+
- `errors.mdx` (`apps/web` docs) is generated from this package's
|
|
120
|
+
`ERROR_CODES` registry and documents every emitted code; the registry
|
|
121
|
+
itself did not change in this release.
|
|
122
|
+
|
|
123
|
+
## 1.3.1
|
|
124
|
+
|
|
125
|
+
Both groups below shipped in 1.3.1. The published 1.3.1 tarball labels them
|
|
126
|
+
`Unreleased` because they were never retitled at publish time.
|
|
127
|
+
|
|
128
|
+
### Error registry single source of truth (#4792)
|
|
4
129
|
|
|
5
130
|
- Extended the shared `ERROR_CODES` registry with every v1 error code emitted
|
|
6
131
|
across apps/web routes: `BILLING_ERRORS`, `RESOURCE_ERRORS`,
|
|
@@ -12,7 +137,7 @@
|
|
|
12
137
|
- Added the `./errors` subpath: a pure entrypoint re-exporting only the
|
|
13
138
|
registry and picker, with no dependency on the rest of the barrel.
|
|
14
139
|
|
|
15
|
-
|
|
140
|
+
### Client-IP resolution (#4794)
|
|
16
141
|
|
|
17
142
|
- Added the runtime-agnostic client-IP normalizer and trust resolver.
|
|
18
143
|
- Added shared Vercel, Cloudflare, trusted-proxy, direct, and authenticated
|