@astrasyncai/verification-gateway 5.17.0 → 5.17.2
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 +94 -18
- package/dist/adapters/express.d.mts +1 -1
- package/dist/adapters/express.d.ts +1 -1
- package/dist/adapters/express.js +33 -5
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +33 -5
- 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 +24 -5
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +24 -5
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +1 -1
- package/dist/adapters/nextjs.d.ts +1 -1
- package/dist/adapters/nextjs.js +24 -5
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +24 -5
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +1 -1
- package/dist/adapters/sdk.d.ts +1 -1
- package/dist/adapters/sdk.js +5 -1
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +5 -1
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/bin/astrasync-claude-hook.js +5 -1
- package/dist/bin/astrasync-codex-hook.js +5 -1
- package/dist/bin/astrasync-guard.js +34 -7
- package/dist/bin/astrasync.js +34 -7
- package/dist/browser/background.js +5 -1
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +5 -1
- package/dist/browser/background.mjs.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/codex/index.js +5 -1
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +5 -1
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/extension.js +5 -1
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +5 -1
- 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/edge-config.js +1 -1
- package/dist/edge-config.js.map +1 -1
- package/dist/edge-config.mjs +1 -1
- package/dist/edge-config.mjs.map +1 -1
- package/dist/edge-core/index.d.mts +1 -1
- package/dist/edge-core/index.d.ts +1 -1
- package/dist/edge-core/index.js +5 -1
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +5 -1
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/gateway/gateway.js +5 -1
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +5 -1
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +1 -1
- package/dist/git-trigger/git-hooks.d.ts +1 -1
- package/dist/index.d.mts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +33 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -5
- package/dist/index.mjs.map +1 -1
- package/dist/registration/index.js +1 -1
- package/dist/registration/index.js.map +1 -1
- package/dist/registration/index.mjs +1 -1
- package/dist/registration/index.mjs.map +1 -1
- package/dist/transport/index.js +1 -1
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs +1 -1
- package/dist/transport/index.mjs.map +1 -1
- package/dist/{types-Bm1QvGqI.d.ts → types-DA8LzAOB.d.ts} +6 -0
- package/dist/{types-Blz520bR.d.mts → types-DRb_plOh.d.mts} +14 -0
- package/dist/{types-Blz520bR.d.ts → types-DRb_plOh.d.ts} +14 -0
- package/dist/{types-DBe4hgfT.d.mts → types-vNBvYD7Z.d.mts} +6 -0
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +1 -1
- package/dist/verify.d.ts +1 -1
- package/dist/verify.js +5 -1
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +5 -1
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -717,6 +717,12 @@ interface VerificationRequest {
|
|
|
717
717
|
enableRuntimeChallenge?: boolean;
|
|
718
718
|
/** 5.16.0: the matched route's policy for verify-access to enforce. */
|
|
719
719
|
routePolicy?: RoutePolicy;
|
|
720
|
+
/**
|
|
721
|
+
* 5.17.1: the route itself holds a request that needs the owner's approval
|
|
722
|
+
* (see ExpressMiddlewareOptions.approvalHeldByRoute), so verify-access
|
|
723
|
+
* reports the hold but creates no approval of its own.
|
|
724
|
+
*/
|
|
725
|
+
approvalHeldByRoute?: boolean;
|
|
720
726
|
/** Create a verification session (returns sessionId) */
|
|
721
727
|
createSession?: boolean;
|
|
722
728
|
/** Counterparty type */
|
|
@@ -775,6 +775,12 @@ interface VerificationRequest {
|
|
|
775
775
|
enableRuntimeChallenge?: boolean;
|
|
776
776
|
/** 5.16.0: the matched route's policy for verify-access to enforce. */
|
|
777
777
|
routePolicy?: RoutePolicy;
|
|
778
|
+
/**
|
|
779
|
+
* 5.17.1: the route itself holds a request that needs the owner's approval
|
|
780
|
+
* (see ExpressMiddlewareOptions.approvalHeldByRoute), so verify-access
|
|
781
|
+
* reports the hold but creates no approval of its own.
|
|
782
|
+
*/
|
|
783
|
+
approvalHeldByRoute?: boolean;
|
|
778
784
|
/** Create a verification session (returns sessionId) */
|
|
779
785
|
createSession?: boolean;
|
|
780
786
|
/** Counterparty type */
|
|
@@ -985,6 +991,14 @@ interface ExpressMiddlewareOptions extends GatewayConfig {
|
|
|
985
991
|
recordDecisions?: boolean;
|
|
986
992
|
/** Ask for a runtime challenge on every verify-access call (default: false — opt-in, round 27.8) */
|
|
987
993
|
enableRuntimeChallenge?: boolean;
|
|
994
|
+
/**
|
|
995
|
+
* 5.17.1: return true for requests whose route asks the owner for approval
|
|
996
|
+
* itself (it creates its own hold and answers 202 while it waits). For those
|
|
997
|
+
* requests a result that only needs the owner's approval is passed to the
|
|
998
|
+
* route instead of refused, and verify-access creates no approval, so the
|
|
999
|
+
* owner approves once. Any deny is still refused. Default: none.
|
|
1000
|
+
*/
|
|
1001
|
+
approvalHeldByRoute?: (req: unknown) => boolean;
|
|
988
1002
|
/**
|
|
989
1003
|
* Refresh interval (ms) for the remote-fetched route policy. Default:
|
|
990
1004
|
* 5 minutes. Operators can shorten this to test policy edits faster, or
|
|
@@ -775,6 +775,12 @@ interface VerificationRequest {
|
|
|
775
775
|
enableRuntimeChallenge?: boolean;
|
|
776
776
|
/** 5.16.0: the matched route's policy for verify-access to enforce. */
|
|
777
777
|
routePolicy?: RoutePolicy;
|
|
778
|
+
/**
|
|
779
|
+
* 5.17.1: the route itself holds a request that needs the owner's approval
|
|
780
|
+
* (see ExpressMiddlewareOptions.approvalHeldByRoute), so verify-access
|
|
781
|
+
* reports the hold but creates no approval of its own.
|
|
782
|
+
*/
|
|
783
|
+
approvalHeldByRoute?: boolean;
|
|
778
784
|
/** Create a verification session (returns sessionId) */
|
|
779
785
|
createSession?: boolean;
|
|
780
786
|
/** Counterparty type */
|
|
@@ -985,6 +991,14 @@ interface ExpressMiddlewareOptions extends GatewayConfig {
|
|
|
985
991
|
recordDecisions?: boolean;
|
|
986
992
|
/** Ask for a runtime challenge on every verify-access call (default: false — opt-in, round 27.8) */
|
|
987
993
|
enableRuntimeChallenge?: boolean;
|
|
994
|
+
/**
|
|
995
|
+
* 5.17.1: return true for requests whose route asks the owner for approval
|
|
996
|
+
* itself (it creates its own hold and answers 202 while it waits). For those
|
|
997
|
+
* requests a result that only needs the owner's approval is passed to the
|
|
998
|
+
* route instead of refused, and verify-access creates no approval, so the
|
|
999
|
+
* owner approves once. Any deny is still refused. Default: none.
|
|
1000
|
+
*/
|
|
1001
|
+
approvalHeldByRoute?: (req: unknown) => boolean;
|
|
988
1002
|
/**
|
|
989
1003
|
* Refresh interval (ms) for the remote-fetched route policy. Default:
|
|
990
1004
|
* 5 minutes. Operators can shorten this to test policy edits faster, or
|
|
@@ -717,6 +717,12 @@ interface VerificationRequest {
|
|
|
717
717
|
enableRuntimeChallenge?: boolean;
|
|
718
718
|
/** 5.16.0: the matched route's policy for verify-access to enforce. */
|
|
719
719
|
routePolicy?: RoutePolicy;
|
|
720
|
+
/**
|
|
721
|
+
* 5.17.1: the route itself holds a request that needs the owner's approval
|
|
722
|
+
* (see ExpressMiddlewareOptions.approvalHeldByRoute), so verify-access
|
|
723
|
+
* reports the hold but creates no approval of its own.
|
|
724
|
+
*/
|
|
725
|
+
approvalHeldByRoute?: boolean;
|
|
720
726
|
/** Create a verification session (returns sessionId) */
|
|
721
727
|
createSession?: boolean;
|
|
722
728
|
/** Counterparty type */
|
package/dist/ui/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-
|
|
1
|
+
import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-DRb_plOh.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Verification Interstitial Component
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-
|
|
1
|
+
import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-DRb_plOh.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Verification Interstitial Component
|
package/dist/verify.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-
|
|
1
|
+
import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-vNBvYD7Z.mjs';
|
|
2
2
|
import { ObservedMetadata } from './metadata-capture.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/verify.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-
|
|
1
|
+
import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-DA8LzAOB.js';
|
|
2
2
|
import { ObservedMetadata } from './metadata-capture.js';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/verify.js
CHANGED
|
@@ -37,7 +37,7 @@ __export(verify_exports, {
|
|
|
37
37
|
module.exports = __toCommonJS(verify_exports);
|
|
38
38
|
|
|
39
39
|
// src/version.ts
|
|
40
|
-
var SDK_VERSION = "5.17.
|
|
40
|
+
var SDK_VERSION = "5.17.2";
|
|
41
41
|
|
|
42
42
|
// src/http.ts
|
|
43
43
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -202,6 +202,7 @@ function getCacheKey(request, counterpartyId) {
|
|
|
202
202
|
request.enableRuntimeChallenge ? "1" : "0",
|
|
203
203
|
// 5.16.0: route policy changes the verdict (owners / challenge).
|
|
204
204
|
request.routePolicy ? JSON.stringify(request.routePolicy) : "",
|
|
205
|
+
request.approvalHeldByRoute ? "1" : "0",
|
|
205
206
|
// callerMetadata fields contribute to risk model; include the ones
|
|
206
207
|
// backend reads. sourceIp/userAgent/forwardedFor change per-request
|
|
207
208
|
// so their inclusion effectively forces a re-check for any varying
|
|
@@ -415,6 +416,7 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
415
416
|
if (requestData.enableRuntimeChallenge)
|
|
416
417
|
body.enableRuntimeChallenge = requestData.enableRuntimeChallenge;
|
|
417
418
|
if (requestData.routePolicy) body.routePolicy = requestData.routePolicy;
|
|
419
|
+
if (requestData.approvalHeldByRoute) body.approvalHeldByRoute = true;
|
|
418
420
|
if (requestData.createSession) body.createSession = requestData.createSession;
|
|
419
421
|
if (requestData.durationRequired) body.durationRequired = requestData.durationRequired;
|
|
420
422
|
if (requestData.counterpartyType) body.counterpartyType = requestData.counterpartyType;
|
|
@@ -746,6 +748,8 @@ async function verify(config, request, options) {
|
|
|
746
748
|
} else if (result.recommendation === "step_up_required" && result.identityVerified) {
|
|
747
749
|
result.requiresStepUp = true;
|
|
748
750
|
result.denialReasons = serverDenialReasons ?? result.recommendationReasons ?? ["Step-up verification required"];
|
|
751
|
+
const stepUpFailures = apiResponse.access?.failures;
|
|
752
|
+
if (stepUpFailures?.length) result.failures = stepUpFailures;
|
|
749
753
|
}
|
|
750
754
|
const escalates = result.requiresStepUp === true || result.requiresApproval === true || result.recommendation === "step_up_required";
|
|
751
755
|
if (mergedConfig.cacheTtl !== 0 && result.recommendation !== "deny" && !escalates) {
|