@astrasyncai/verification-gateway 2.3.8 → 2.3.10
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/README.md +93 -10
- package/dist/adapter-interface/interface.d.mts +2 -2
- package/dist/adapter-interface/interface.d.ts +2 -2
- package/dist/adapters/express.d.mts +2 -2
- package/dist/adapters/express.d.ts +2 -2
- package/dist/adapters/express.js +45 -6
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +45 -6
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.d.ts +1 -1
- package/dist/adapters/mcp.js +93 -11
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +93 -11
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +2 -2
- package/dist/adapters/nextjs.d.ts +2 -2
- package/dist/adapters/nextjs.js +27 -5
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +27 -5
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +2 -2
- package/dist/adapters/sdk.d.ts +2 -2
- package/dist/adapters/sdk.js +27 -5
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +27 -5
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.d.mts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/browser/background.js +26 -4
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +26 -4
- package/dist/browser/background.mjs.map +1 -1
- package/dist/browser/browser-adapter.d.mts +2 -2
- package/dist/browser/browser-adapter.d.ts +2 -2
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/cursor/cursor-adapter.d.mts +2 -2
- package/dist/cursor/cursor-adapter.d.ts +2 -2
- package/dist/cursor/extension.d.mts +2 -2
- package/dist/cursor/extension.d.ts +2 -2
- package/dist/cursor/extension.js +26 -4
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +26 -4
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/{express-BNWqDVIz.d.mts → express-4Vau6x6X.d.mts} +1 -1
- package/dist/{express-BYup_4Jg.d.ts → express-Nq-wWICa.d.ts} +1 -1
- package/dist/gateway/gateway.d.mts +2 -2
- package/dist/gateway/gateway.d.ts +2 -2
- package/dist/gateway/gateway.js +26 -4
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +26 -4
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +2 -2
- package/dist/git-trigger/git-hooks.d.ts +2 -2
- package/dist/{index-DN3ztP2d.d.ts → index-B-EovXnY.d.ts} +1 -1
- package/dist/{index-CSMpOcxV.d.ts → index-CxwCN7AC.d.ts} +1 -1
- package/dist/{index-CK4lNLVn.d.mts → index-DiToN8gh.d.mts} +1 -1
- package/dist/{index-BHXa2WTO.d.mts → index-DkyPV14Y.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +51 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +51 -12
- package/dist/index.mjs.map +1 -1
- package/dist/local-evaluator/evaluator.d.mts +2 -2
- package/dist/local-evaluator/evaluator.d.ts +2 -2
- package/dist/{nextjs-Bzdfu8Eg.d.mts → nextjs-BTR7Oix-.d.mts} +1 -1
- package/dist/{nextjs-C4h_MpgK.d.ts → nextjs-DO_4crcp.d.ts} +1 -1
- package/dist/{sdk-Tzsn6s-O.d.ts → sdk-DSLCyXIX.d.mts} +9 -2
- package/dist/{sdk-CDdD7EcJ.d.mts → sdk-TnHXD-Oh.d.ts} +9 -2
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-D_tmbDA_.d.mts → types-BVp22KkN.d.mts} +27 -3
- package/dist/{types-D_tmbDA_.d.ts → types-BVp22KkN.d.ts} +27 -3
- package/dist/{types-Bzp1SMaD.d.ts → types-DVCWReEN.d.ts} +1 -1
- package/dist/{types-z-QVnG4b.d.mts → types-pU2O0BFq.d.mts} +1 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +3 -3
- package/dist/ui/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3279,7 +3279,7 @@ function verifyLocal(evaluator, context) {
|
|
|
3279
3279
|
// src/access-levels.ts
|
|
3280
3280
|
var ACCESS_LEVEL_HIERARCHY = {
|
|
3281
3281
|
none: 0,
|
|
3282
|
-
|
|
3282
|
+
restricted: 1,
|
|
3283
3283
|
"read-only": 2,
|
|
3284
3284
|
standard: 3,
|
|
3285
3285
|
full: 4,
|
|
@@ -3295,7 +3295,11 @@ function getTrustLevel(score) {
|
|
|
3295
3295
|
// src/verify.ts
|
|
3296
3296
|
var DEFAULT_CONFIG = {
|
|
3297
3297
|
apiBaseUrl: "https://astrasync.ai/api",
|
|
3298
|
-
|
|
3298
|
+
// v2.3.9 (defect #30): default for unconfigured callers is `'none'` (no
|
|
3299
|
+
// access). Pre-rename this defaulted to `'guidance'`, which combined with
|
|
3300
|
+
// a route gated at `'guidance'` to silently let unverified traffic
|
|
3301
|
+
// through (`hasMinimumAccess('guidance', 'guidance') === true`).
|
|
3302
|
+
defaultAccessLevel: "none",
|
|
3299
3303
|
// minTrustScore + minTrustScoreForFull deprecated in v2.3.0 — server decides.
|
|
3300
3304
|
cacheTtl: 300,
|
|
3301
3305
|
// 5 minutes
|
|
@@ -3360,7 +3364,12 @@ function createGuidanceResponse(config, reason) {
|
|
|
3360
3364
|
};
|
|
3361
3365
|
return {
|
|
3362
3366
|
verified: false,
|
|
3363
|
-
|
|
3367
|
+
// v2.3.9 (defect #30): denials grant `'none'`, NEVER a positive band.
|
|
3368
|
+
// Adapters additionally short-circuit on `verified === false` before
|
|
3369
|
+
// the gate check, but the access level still has to be honest at the
|
|
3370
|
+
// data layer so downstream consumers (SDK adapters in other languages,
|
|
3371
|
+
// custom integrations) inherit the correct semantics.
|
|
3372
|
+
accessLevel: "none",
|
|
3364
3373
|
guidance,
|
|
3365
3374
|
denialReasons: reason ? [reason] : ["No valid agent credentials provided"],
|
|
3366
3375
|
verifiedAt: /* @__PURE__ */ new Date()
|
|
@@ -3487,7 +3496,14 @@ async function verify(config, request) {
|
|
|
3487
3496
|
const aggregatedFailures = apiResponse.access?.failures;
|
|
3488
3497
|
const result2 = {
|
|
3489
3498
|
verified: false,
|
|
3490
|
-
|
|
3499
|
+
// v2.3.9 (defect #30): denials grant `'none'`, NEVER a positive band.
|
|
3500
|
+
// Pre-rename this hardcoded `'guidance'`, which conflated with the
|
|
3501
|
+
// colocated `guidance: {...}` help-payload object below and let
|
|
3502
|
+
// denied requests pass any route gated at `'guidance'` because
|
|
3503
|
+
// `hasMinimumAccess('guidance', 'guidance') === true`. Adapters now
|
|
3504
|
+
// ALSO short-circuit on `verified === false` before the gate check —
|
|
3505
|
+
// belt-and-braces.
|
|
3506
|
+
accessLevel: "none",
|
|
3491
3507
|
denialReasons: aggregatedFailures && aggregatedFailures.length > 0 ? aggregatedFailures.map((f) => f.message) : apiResponse.access?.reason ? [apiResponse.access.reason] : ["Access denied"],
|
|
3492
3508
|
failures: aggregatedFailures,
|
|
3493
3509
|
requiresStepUp: apiResponse.access?.requiresStepUp,
|
|
@@ -3500,6 +3516,9 @@ async function verify(config, request) {
|
|
|
3500
3516
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
3501
3517
|
// Extract sessionId so decisions can be recorded for denials too
|
|
3502
3518
|
sessionId: apiResponse.sessionId,
|
|
3519
|
+
// v2.3.10 (defect #34, round-4): anonymous traffic has no session →
|
|
3520
|
+
// correlationId is the linking key for paired local_override events.
|
|
3521
|
+
correlationId: apiResponse.correlationId,
|
|
3503
3522
|
recommendation: apiResponse.recommendation,
|
|
3504
3523
|
recommendationReasons: apiResponse.recommendationReasons
|
|
3505
3524
|
};
|
|
@@ -3540,6 +3559,9 @@ async function verify(config, request) {
|
|
|
3540
3559
|
cacheTtl: mergedConfig.cacheTtl,
|
|
3541
3560
|
// Handshake Protocol v10 enhanced fields (present when backend returns them)
|
|
3542
3561
|
sessionId: apiResponse.sessionId,
|
|
3562
|
+
// v2.3.10 (defect #34, round-4): anonymous responses surface correlationId
|
|
3563
|
+
// (no session row exists for unverified callers).
|
|
3564
|
+
correlationId: apiResponse.correlationId,
|
|
3543
3565
|
runtimeChallenge: apiResponse.runtimeChallenge,
|
|
3544
3566
|
tokenGuidance: apiResponse.tokenGuidance,
|
|
3545
3567
|
recommendation: apiResponse.recommendation,
|