@astrasyncai/verification-gateway 3.11.1 → 3.12.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/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 +22 -3
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +22 -3
- 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 +22 -3
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +22 -3
- 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 +22 -3
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +22 -3
- 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 +22 -3
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +22 -3
- 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/bin/astrasync-claude-hook.js +22 -3
- package/dist/bin/astrasync-codex-hook.js +22 -3
- package/dist/bin/astrasync-guard.js +22 -3
- package/dist/bin/astrasync.js +23 -3
- package/dist/browser/background.js +22 -3
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +22 -3
- 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/claude-code/claude-code-adapter.d.mts +2 -2
- package/dist/claude-code/claude-code-adapter.d.ts +2 -2
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/codex/index.d.mts +2 -2
- package/dist/codex/index.d.ts +2 -2
- package/dist/codex/index.js +22 -3
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +22 -3
- package/dist/codex/index.mjs.map +1 -1
- 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 +22 -3
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +22 -3
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.d.mts +1 -1
- package/dist/edge-config.d.ts +1 -1
- package/dist/{express-DCXa1oqj.d.mts → express-B39o89gf.d.mts} +1 -1
- package/dist/{express-ClNtDhhc.d.ts → express-BuxKNO_q.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 +22 -3
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +22 -3
- 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-CfHurO1P.d.ts → index-BG62SXso.d.ts} +1 -1
- package/dist/{index-D2ztkumS.d.ts → index-CLHdqs2M.d.ts} +1 -1
- package/dist/{index-Dr_XiN65.d.mts → index-CqydB4ks.d.mts} +1 -1
- package/dist/{index-BrNKDmiR.d.mts → index-DME3w3lf.d.mts} +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +42 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -3
- 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-DcQIk6Zj.d.mts → nextjs-D74W7wt-.d.mts} +1 -1
- package/dist/{nextjs-CEBVBsdi.d.ts → nextjs-Ddlw_J1J.d.ts} +1 -1
- package/dist/{sdk-CZkbSOeO.d.mts → sdk-Bn6bj7kt.d.mts} +1 -1
- package/dist/{sdk-H0JCLW2y.d.ts → sdk-CT7gdkfR.d.ts} +1 -1
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-sy3tq8lp.d.mts → types-BntuzEEn.d.mts} +103 -1
- package/dist/{types-DhFPiZ3t.d.ts → types-DHu7m9HI.d.ts} +1 -1
- package/dist/{types-cQVCMeNV.d.mts → types-Djw4GLtz.d.mts} +1 -1
- package/dist/{types-9tns4wyl.d.ts → types-SDu4Llbe.d.ts} +103 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +13 -2
- package/dist/verify.d.ts +13 -2
- package/dist/verify.js +42 -3
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +41 -3
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
package/dist/edge-config.d.mts
CHANGED
package/dist/edge-config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestHandler, Request } from 'express';
|
|
2
|
-
import {
|
|
2
|
+
import { w as VerificationResult, k as ExpressMiddlewareOptions, c as AstraSyncCredentials } from './types-BntuzEEn.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* AstraSync Universal Verification Gateway - Express Middleware
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestHandler, Request } from 'express';
|
|
2
|
-
import {
|
|
2
|
+
import { w as VerificationResult, k as ExpressMiddlewareOptions, c as AstraSyncCredentials } from './types-SDu4Llbe.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* AstraSync Universal Verification Gateway - Express Middleware
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AstraSyncGatewayConfig, P as PDLSSContext, V as VerificationDecision } from '../types-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { a as AstraSyncGatewayConfig, P as PDLSSContext, V as VerificationDecision } from '../types-Djw4GLtz.mjs';
|
|
2
|
+
import '../types-BntuzEEn.mjs';
|
|
3
3
|
import '../metadata-capture.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AstraSyncGatewayConfig, P as PDLSSContext, V as VerificationDecision } from '../types-
|
|
2
|
-
import '../types-
|
|
1
|
+
import { a as AstraSyncGatewayConfig, P as PDLSSContext, V as VerificationDecision } from '../types-DHu7m9HI.js';
|
|
2
|
+
import '../types-SDu4Llbe.js';
|
|
3
3
|
import '../metadata-capture.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/gateway/gateway.js
CHANGED
|
@@ -3698,7 +3698,7 @@ function getTrustLevel(score) {
|
|
|
3698
3698
|
}
|
|
3699
3699
|
|
|
3700
3700
|
// src/version.ts
|
|
3701
|
-
var SDK_VERSION = "3.
|
|
3701
|
+
var SDK_VERSION = "3.12.0";
|
|
3702
3702
|
|
|
3703
3703
|
// src/well-known.ts
|
|
3704
3704
|
var CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
@@ -3865,6 +3865,7 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
3865
3865
|
}
|
|
3866
3866
|
] : void 0,
|
|
3867
3867
|
correlationId: options.correlationId,
|
|
3868
|
+
attemptId: options.attemptId,
|
|
3868
3869
|
verifiedAt: /* @__PURE__ */ new Date()
|
|
3869
3870
|
};
|
|
3870
3871
|
}
|
|
@@ -3894,6 +3895,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
3894
3895
|
body.runtimeChallengeOptions = requestData.runtimeChallengeOptions;
|
|
3895
3896
|
if (requestData.invocationProtocol) body.invocationProtocol = requestData.invocationProtocol;
|
|
3896
3897
|
if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
|
|
3898
|
+
if (requestData.attemptId) body.attemptId = requestData.attemptId;
|
|
3899
|
+
if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
|
|
3897
3900
|
body.sdkVersion = SDK_VERSION;
|
|
3898
3901
|
if (requestData.callerMetadata || requestData.clientIp || requestData.userAgent) {
|
|
3899
3902
|
const meta = {
|
|
@@ -3921,6 +3924,9 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
3921
3924
|
if (response.status === 410) {
|
|
3922
3925
|
return {
|
|
3923
3926
|
success: true,
|
|
3927
|
+
// 3.12.0 (Trust Record): keep the server-echoed attempt handle even on
|
|
3928
|
+
// the synthesised 410 deny shape (echoed on every branch).
|
|
3929
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
3924
3930
|
access: {
|
|
3925
3931
|
allowed: false,
|
|
3926
3932
|
accessLevel: "none",
|
|
@@ -3939,7 +3945,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
3939
3945
|
return {
|
|
3940
3946
|
success: false,
|
|
3941
3947
|
error: data.message || data.error || `API returned ${response.status}`,
|
|
3942
|
-
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0
|
|
3948
|
+
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0,
|
|
3949
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0
|
|
3943
3950
|
};
|
|
3944
3951
|
}
|
|
3945
3952
|
return data;
|
|
@@ -3973,7 +3980,13 @@ async function verify(config, request, options) {
|
|
|
3973
3980
|
if (mergedConfig.debug) {
|
|
3974
3981
|
console.log("[VerificationGateway] Returning cached result");
|
|
3975
3982
|
}
|
|
3976
|
-
|
|
3983
|
+
const hit = { ...cached };
|
|
3984
|
+
if (request.attemptId) {
|
|
3985
|
+
hit.attemptId = request.attemptId;
|
|
3986
|
+
} else {
|
|
3987
|
+
delete hit.attemptId;
|
|
3988
|
+
}
|
|
3989
|
+
return hit;
|
|
3977
3990
|
}
|
|
3978
3991
|
}
|
|
3979
3992
|
const enrichedRequest = { ...request };
|
|
@@ -3993,6 +4006,7 @@ async function verify(config, request, options) {
|
|
|
3993
4006
|
return createGuidanceResponse(mergedConfig, apiResponse.error, {
|
|
3994
4007
|
source: "api_error",
|
|
3995
4008
|
correlationId: apiResponse.correlationId,
|
|
4009
|
+
attemptId: apiResponse.attemptId,
|
|
3996
4010
|
urls
|
|
3997
4011
|
});
|
|
3998
4012
|
}
|
|
@@ -4028,6 +4042,9 @@ async function verify(config, request, options) {
|
|
|
4028
4042
|
// Anonymous traffic has no session → correlationId is the per-attempt
|
|
4029
4043
|
// linking key (the sessionId-equivalent for anonymous callers).
|
|
4030
4044
|
correlationId: apiResponse.correlationId,
|
|
4045
|
+
// 3.12.0 (Trust Record): server echoes the attempt-chain handle on
|
|
4046
|
+
// every branch — denials included (the funnel outlives one deny).
|
|
4047
|
+
attemptId: apiResponse.attemptId,
|
|
4031
4048
|
recommendation: apiResponse.recommendation,
|
|
4032
4049
|
recommendationReasons: apiResponse.recommendationReasons,
|
|
4033
4050
|
stepUpApproval: apiResponse.stepUpApproval,
|
|
@@ -4079,6 +4096,8 @@ async function verify(config, request, options) {
|
|
|
4079
4096
|
// v2.3.10 (defect #34, round-4): anonymous responses surface correlationId
|
|
4080
4097
|
// (no session row exists for unverified callers).
|
|
4081
4098
|
correlationId: apiResponse.correlationId,
|
|
4099
|
+
// 3.12.0 (Trust Record): server-echoed attempt-chain handle.
|
|
4100
|
+
attemptId: apiResponse.attemptId,
|
|
4082
4101
|
runtimeChallenge: apiResponse.runtimeChallenge,
|
|
4083
4102
|
tokenGuidance: apiResponse.tokenGuidance,
|
|
4084
4103
|
recommendation: apiResponse.recommendation,
|