@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,8 +1,8 @@
|
|
|
1
1
|
import { VSCodeAPI } from './cursor-adapter.mjs';
|
|
2
2
|
import '../adapter-interface/interface.mjs';
|
|
3
3
|
import '../gateway/gateway.mjs';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../types-
|
|
4
|
+
import '../types-Djw4GLtz.mjs';
|
|
5
|
+
import '../types-BntuzEEn.mjs';
|
|
6
6
|
import '../metadata-capture.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VSCodeAPI } from './cursor-adapter.js';
|
|
2
2
|
import '../adapter-interface/interface.js';
|
|
3
3
|
import '../gateway/gateway.js';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../types-
|
|
4
|
+
import '../types-DHu7m9HI.js';
|
|
5
|
+
import '../types-SDu4Llbe.js';
|
|
6
6
|
import '../metadata-capture.js';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/cursor/extension.js
CHANGED
|
@@ -3942,7 +3942,7 @@ function getTrustLevel(score) {
|
|
|
3942
3942
|
}
|
|
3943
3943
|
|
|
3944
3944
|
// src/version.ts
|
|
3945
|
-
var SDK_VERSION = "3.
|
|
3945
|
+
var SDK_VERSION = "3.12.0";
|
|
3946
3946
|
|
|
3947
3947
|
// src/well-known.ts
|
|
3948
3948
|
var CACHE_TTL_MS = 60 * 60 * 1e3;
|
|
@@ -4109,6 +4109,7 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
4109
4109
|
}
|
|
4110
4110
|
] : void 0,
|
|
4111
4111
|
correlationId: options.correlationId,
|
|
4112
|
+
attemptId: options.attemptId,
|
|
4112
4113
|
verifiedAt: /* @__PURE__ */ new Date()
|
|
4113
4114
|
};
|
|
4114
4115
|
}
|
|
@@ -4138,6 +4139,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4138
4139
|
body.runtimeChallengeOptions = requestData.runtimeChallengeOptions;
|
|
4139
4140
|
if (requestData.invocationProtocol) body.invocationProtocol = requestData.invocationProtocol;
|
|
4140
4141
|
if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
|
|
4142
|
+
if (requestData.attemptId) body.attemptId = requestData.attemptId;
|
|
4143
|
+
if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
|
|
4141
4144
|
body.sdkVersion = SDK_VERSION;
|
|
4142
4145
|
if (requestData.callerMetadata || requestData.clientIp || requestData.userAgent) {
|
|
4143
4146
|
const meta = {
|
|
@@ -4165,6 +4168,9 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4165
4168
|
if (response.status === 410) {
|
|
4166
4169
|
return {
|
|
4167
4170
|
success: true,
|
|
4171
|
+
// 3.12.0 (Trust Record): keep the server-echoed attempt handle even on
|
|
4172
|
+
// the synthesised 410 deny shape (echoed on every branch).
|
|
4173
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
4168
4174
|
access: {
|
|
4169
4175
|
allowed: false,
|
|
4170
4176
|
accessLevel: "none",
|
|
@@ -4183,7 +4189,8 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4183
4189
|
return {
|
|
4184
4190
|
success: false,
|
|
4185
4191
|
error: data.message || data.error || `API returned ${response.status}`,
|
|
4186
|
-
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0
|
|
4192
|
+
correlationId: typeof data?.correlationId === "string" ? data.correlationId : void 0,
|
|
4193
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0
|
|
4187
4194
|
};
|
|
4188
4195
|
}
|
|
4189
4196
|
return data;
|
|
@@ -4217,7 +4224,13 @@ async function verify(config, request, options) {
|
|
|
4217
4224
|
if (mergedConfig.debug) {
|
|
4218
4225
|
console.log("[VerificationGateway] Returning cached result");
|
|
4219
4226
|
}
|
|
4220
|
-
|
|
4227
|
+
const hit = { ...cached };
|
|
4228
|
+
if (request.attemptId) {
|
|
4229
|
+
hit.attemptId = request.attemptId;
|
|
4230
|
+
} else {
|
|
4231
|
+
delete hit.attemptId;
|
|
4232
|
+
}
|
|
4233
|
+
return hit;
|
|
4221
4234
|
}
|
|
4222
4235
|
}
|
|
4223
4236
|
const enrichedRequest = { ...request };
|
|
@@ -4237,6 +4250,7 @@ async function verify(config, request, options) {
|
|
|
4237
4250
|
return createGuidanceResponse(mergedConfig, apiResponse.error, {
|
|
4238
4251
|
source: "api_error",
|
|
4239
4252
|
correlationId: apiResponse.correlationId,
|
|
4253
|
+
attemptId: apiResponse.attemptId,
|
|
4240
4254
|
urls
|
|
4241
4255
|
});
|
|
4242
4256
|
}
|
|
@@ -4272,6 +4286,9 @@ async function verify(config, request, options) {
|
|
|
4272
4286
|
// Anonymous traffic has no session → correlationId is the per-attempt
|
|
4273
4287
|
// linking key (the sessionId-equivalent for anonymous callers).
|
|
4274
4288
|
correlationId: apiResponse.correlationId,
|
|
4289
|
+
// 3.12.0 (Trust Record): server echoes the attempt-chain handle on
|
|
4290
|
+
// every branch — denials included (the funnel outlives one deny).
|
|
4291
|
+
attemptId: apiResponse.attemptId,
|
|
4275
4292
|
recommendation: apiResponse.recommendation,
|
|
4276
4293
|
recommendationReasons: apiResponse.recommendationReasons,
|
|
4277
4294
|
stepUpApproval: apiResponse.stepUpApproval,
|
|
@@ -4323,6 +4340,8 @@ async function verify(config, request, options) {
|
|
|
4323
4340
|
// v2.3.10 (defect #34, round-4): anonymous responses surface correlationId
|
|
4324
4341
|
// (no session row exists for unverified callers).
|
|
4325
4342
|
correlationId: apiResponse.correlationId,
|
|
4343
|
+
// 3.12.0 (Trust Record): server-echoed attempt-chain handle.
|
|
4344
|
+
attemptId: apiResponse.attemptId,
|
|
4326
4345
|
runtimeChallenge: apiResponse.runtimeChallenge,
|
|
4327
4346
|
tokenGuidance: apiResponse.tokenGuidance,
|
|
4328
4347
|
recommendation: apiResponse.recommendation,
|