@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
|
@@ -3258,7 +3258,7 @@ function verifyLocal(evaluator, context) {
|
|
|
3258
3258
|
// src/access-levels.ts
|
|
3259
3259
|
var ACCESS_LEVEL_HIERARCHY = {
|
|
3260
3260
|
none: 0,
|
|
3261
|
-
|
|
3261
|
+
restricted: 1,
|
|
3262
3262
|
"read-only": 2,
|
|
3263
3263
|
standard: 3,
|
|
3264
3264
|
full: 4,
|
|
@@ -3274,7 +3274,11 @@ function getTrustLevel(score) {
|
|
|
3274
3274
|
// src/verify.ts
|
|
3275
3275
|
var DEFAULT_CONFIG = {
|
|
3276
3276
|
apiBaseUrl: "https://astrasync.ai/api",
|
|
3277
|
-
|
|
3277
|
+
// v2.3.9 (defect #30): default for unconfigured callers is `'none'` (no
|
|
3278
|
+
// access). Pre-rename this defaulted to `'guidance'`, which combined with
|
|
3279
|
+
// a route gated at `'guidance'` to silently let unverified traffic
|
|
3280
|
+
// through (`hasMinimumAccess('guidance', 'guidance') === true`).
|
|
3281
|
+
defaultAccessLevel: "none",
|
|
3278
3282
|
// minTrustScore + minTrustScoreForFull deprecated in v2.3.0 — server decides.
|
|
3279
3283
|
cacheTtl: 300,
|
|
3280
3284
|
// 5 minutes
|
|
@@ -3339,7 +3343,12 @@ function createGuidanceResponse(config, reason) {
|
|
|
3339
3343
|
};
|
|
3340
3344
|
return {
|
|
3341
3345
|
verified: false,
|
|
3342
|
-
|
|
3346
|
+
// v2.3.9 (defect #30): denials grant `'none'`, NEVER a positive band.
|
|
3347
|
+
// Adapters additionally short-circuit on `verified === false` before
|
|
3348
|
+
// the gate check, but the access level still has to be honest at the
|
|
3349
|
+
// data layer so downstream consumers (SDK adapters in other languages,
|
|
3350
|
+
// custom integrations) inherit the correct semantics.
|
|
3351
|
+
accessLevel: "none",
|
|
3343
3352
|
guidance,
|
|
3344
3353
|
denialReasons: reason ? [reason] : ["No valid agent credentials provided"],
|
|
3345
3354
|
verifiedAt: /* @__PURE__ */ new Date()
|
|
@@ -3466,7 +3475,14 @@ async function verify(config, request) {
|
|
|
3466
3475
|
const aggregatedFailures = apiResponse.access?.failures;
|
|
3467
3476
|
const result2 = {
|
|
3468
3477
|
verified: false,
|
|
3469
|
-
|
|
3478
|
+
// v2.3.9 (defect #30): denials grant `'none'`, NEVER a positive band.
|
|
3479
|
+
// Pre-rename this hardcoded `'guidance'`, which conflated with the
|
|
3480
|
+
// colocated `guidance: {...}` help-payload object below and let
|
|
3481
|
+
// denied requests pass any route gated at `'guidance'` because
|
|
3482
|
+
// `hasMinimumAccess('guidance', 'guidance') === true`. Adapters now
|
|
3483
|
+
// ALSO short-circuit on `verified === false` before the gate check —
|
|
3484
|
+
// belt-and-braces.
|
|
3485
|
+
accessLevel: "none",
|
|
3470
3486
|
denialReasons: aggregatedFailures && aggregatedFailures.length > 0 ? aggregatedFailures.map((f) => f.message) : apiResponse.access?.reason ? [apiResponse.access.reason] : ["Access denied"],
|
|
3471
3487
|
failures: aggregatedFailures,
|
|
3472
3488
|
requiresStepUp: apiResponse.access?.requiresStepUp,
|
|
@@ -3479,6 +3495,9 @@ async function verify(config, request) {
|
|
|
3479
3495
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
3480
3496
|
// Extract sessionId so decisions can be recorded for denials too
|
|
3481
3497
|
sessionId: apiResponse.sessionId,
|
|
3498
|
+
// v2.3.10 (defect #34, round-4): anonymous traffic has no session →
|
|
3499
|
+
// correlationId is the linking key for paired local_override events.
|
|
3500
|
+
correlationId: apiResponse.correlationId,
|
|
3482
3501
|
recommendation: apiResponse.recommendation,
|
|
3483
3502
|
recommendationReasons: apiResponse.recommendationReasons
|
|
3484
3503
|
};
|
|
@@ -3519,6 +3538,9 @@ async function verify(config, request) {
|
|
|
3519
3538
|
cacheTtl: mergedConfig.cacheTtl,
|
|
3520
3539
|
// Handshake Protocol v10 enhanced fields (present when backend returns them)
|
|
3521
3540
|
sessionId: apiResponse.sessionId,
|
|
3541
|
+
// v2.3.10 (defect #34, round-4): anonymous responses surface correlationId
|
|
3542
|
+
// (no session row exists for unverified callers).
|
|
3543
|
+
correlationId: apiResponse.correlationId,
|
|
3522
3544
|
runtimeChallenge: apiResponse.runtimeChallenge,
|
|
3523
3545
|
tokenGuidance: apiResponse.tokenGuidance,
|
|
3524
3546
|
recommendation: apiResponse.recommendation,
|