@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.mjs';
|
|
2
|
-
import { P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-
|
|
2
|
+
import { P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-Djw4GLtz.mjs';
|
|
3
3
|
import '../gateway/gateway.mjs';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-BntuzEEn.mjs';
|
|
5
5
|
import '../metadata-capture.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.js';
|
|
2
|
-
import { P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-
|
|
2
|
+
import { P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-DHu7m9HI.js';
|
|
3
3
|
import '../gateway/gateway.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-SDu4Llbe.js';
|
|
5
5
|
import '../metadata-capture.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.mjs';
|
|
2
|
-
import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-
|
|
2
|
+
import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-Djw4GLtz.mjs';
|
|
3
3
|
import '../gateway/gateway.mjs';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-BntuzEEn.mjs';
|
|
5
5
|
import '../metadata-capture.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.js';
|
|
2
|
-
import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-
|
|
2
|
+
import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-DHu7m9HI.js';
|
|
3
3
|
import '../gateway/gateway.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-SDu4Llbe.js';
|
|
5
5
|
import '../metadata-capture.js';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/cli/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as LocalPurposeRule, d as LocalScope, c as LocalRiskThresholds, L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-
|
|
1
|
+
import { b as LocalPurposeRule, d as LocalScope, c as LocalRiskThresholds, L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-Djw4GLtz.mjs';
|
|
2
2
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.mjs';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-BntuzEEn.mjs';
|
|
4
4
|
import '../metadata-capture.mjs';
|
|
5
5
|
import '../gateway/gateway.mjs';
|
|
6
6
|
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as LocalPurposeRule, d as LocalScope, c as LocalRiskThresholds, L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-
|
|
1
|
+
import { b as LocalPurposeRule, d as LocalScope, c as LocalRiskThresholds, L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-DHu7m9HI.js';
|
|
2
2
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-SDu4Llbe.js';
|
|
4
4
|
import '../metadata-capture.js';
|
|
5
5
|
import '../gateway/gateway.js';
|
|
6
6
|
|
package/dist/codex/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.mjs';
|
|
2
|
-
import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-
|
|
2
|
+
import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-Djw4GLtz.mjs';
|
|
3
3
|
import { AstraSyncGateway } from '../gateway/gateway.mjs';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-BntuzEEn.mjs';
|
|
5
5
|
import '../metadata-capture.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/codex/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.js';
|
|
2
|
-
import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-
|
|
2
|
+
import { A as AgentAction, I as InterceptResult, P as PDLSSContext, V as VerificationDecision } from '../types-DHu7m9HI.js';
|
|
3
3
|
import { AstraSyncGateway } from '../gateway/gateway.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-SDu4Llbe.js';
|
|
5
5
|
import '../metadata-capture.js';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/codex/index.js
CHANGED
|
@@ -3985,7 +3985,7 @@ function getTrustLevel(score) {
|
|
|
3985
3985
|
}
|
|
3986
3986
|
|
|
3987
3987
|
// src/version.ts
|
|
3988
|
-
var SDK_VERSION = "3.
|
|
3988
|
+
var SDK_VERSION = "3.12.0";
|
|
3989
3989
|
|
|
3990
3990
|
// src/well-known.ts
|
|
3991
3991
|
var CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
@@ -4152,6 +4152,7 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
4152
4152
|
}
|
|
4153
4153
|
] : void 0,
|
|
4154
4154
|
correlationId: options.correlationId,
|
|
4155
|
+
attemptId: options.attemptId,
|
|
4155
4156
|
verifiedAt: /* @__PURE__ */ new Date()
|
|
4156
4157
|
};
|
|
4157
4158
|
}
|
|
@@ -4181,6 +4182,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4181
4182
|
body.runtimeChallengeOptions = requestData.runtimeChallengeOptions;
|
|
4182
4183
|
if (requestData.invocationProtocol) body.invocationProtocol = requestData.invocationProtocol;
|
|
4183
4184
|
if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
|
|
4185
|
+
if (requestData.attemptId) body.attemptId = requestData.attemptId;
|
|
4186
|
+
if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
|
|
4184
4187
|
body.sdkVersion = SDK_VERSION;
|
|
4185
4188
|
if (requestData.callerMetadata || requestData.clientIp || requestData.userAgent) {
|
|
4186
4189
|
const meta = {
|
|
@@ -4208,6 +4211,9 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4208
4211
|
if (response.status === 410) {
|
|
4209
4212
|
return {
|
|
4210
4213
|
success: true,
|
|
4214
|
+
// 3.12.0 (Trust Record): keep the server-echoed attempt handle even on
|
|
4215
|
+
// the synthesised 410 deny shape (echoed on every branch).
|
|
4216
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
4211
4217
|
access: {
|
|
4212
4218
|
allowed: false,
|
|
4213
4219
|
accessLevel: "none",
|
|
@@ -4226,7 +4232,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4226
4232
|
return {
|
|
4227
4233
|
success: false,
|
|
4228
4234
|
error: data.message || data.error || `API returned ${response.status}`,
|
|
4229
|
-
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0
|
|
4235
|
+
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0,
|
|
4236
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0
|
|
4230
4237
|
};
|
|
4231
4238
|
}
|
|
4232
4239
|
return data;
|
|
@@ -4260,7 +4267,13 @@ async function verify(config, request, options) {
|
|
|
4260
4267
|
if (mergedConfig.debug) {
|
|
4261
4268
|
console.log("[VerificationGateway] Returning cached result");
|
|
4262
4269
|
}
|
|
4263
|
-
|
|
4270
|
+
const hit = { ...cached };
|
|
4271
|
+
if (request.attemptId) {
|
|
4272
|
+
hit.attemptId = request.attemptId;
|
|
4273
|
+
} else {
|
|
4274
|
+
delete hit.attemptId;
|
|
4275
|
+
}
|
|
4276
|
+
return hit;
|
|
4264
4277
|
}
|
|
4265
4278
|
}
|
|
4266
4279
|
const enrichedRequest = { ...request };
|
|
@@ -4280,6 +4293,7 @@ async function verify(config, request, options) {
|
|
|
4280
4293
|
return createGuidanceResponse(mergedConfig, apiResponse.error, {
|
|
4281
4294
|
source: "api_error",
|
|
4282
4295
|
correlationId: apiResponse.correlationId,
|
|
4296
|
+
attemptId: apiResponse.attemptId,
|
|
4283
4297
|
urls
|
|
4284
4298
|
});
|
|
4285
4299
|
}
|
|
@@ -4315,6 +4329,9 @@ async function verify(config, request, options) {
|
|
|
4315
4329
|
// Anonymous traffic has no session → correlationId is the per-attempt
|
|
4316
4330
|
// linking key (the sessionId-equivalent for anonymous callers).
|
|
4317
4331
|
correlationId: apiResponse.correlationId,
|
|
4332
|
+
// 3.12.0 (Trust Record): server echoes the attempt-chain handle on
|
|
4333
|
+
// every branch — denials included (the funnel outlives one deny).
|
|
4334
|
+
attemptId: apiResponse.attemptId,
|
|
4318
4335
|
recommendation: apiResponse.recommendation,
|
|
4319
4336
|
recommendationReasons: apiResponse.recommendationReasons,
|
|
4320
4337
|
stepUpApproval: apiResponse.stepUpApproval,
|
|
@@ -4366,6 +4383,8 @@ async function verify(config, request, options) {
|
|
|
4366
4383
|
// v2.3.10 (defect #34, round-4): anonymous responses surface correlationId
|
|
4367
4384
|
// (no session row exists for unverified callers).
|
|
4368
4385
|
correlationId: apiResponse.correlationId,
|
|
4386
|
+
// 3.12.0 (Trust Record): server-echoed attempt-chain handle.
|
|
4387
|
+
attemptId: apiResponse.attemptId,
|
|
4369
4388
|
runtimeChallenge: apiResponse.runtimeChallenge,
|
|
4370
4389
|
tokenGuidance: apiResponse.tokenGuidance,
|
|
4371
4390
|
recommendation: apiResponse.recommendation,
|