@astrasyncai/verification-gateway 4.6.0 → 5.1.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 +25 -35
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +25 -35
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +2 -2
- package/dist/adapters/mcp.d.ts +2 -2
- package/dist/adapters/mcp.js +42 -67
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +41 -66
- 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 +23 -32
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +23 -32
- 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 -126
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +22 -124
- 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/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 +23 -31
- package/dist/bin/astrasync-codex-hook.js +23 -31
- package/dist/bin/astrasync-guard.js +23 -31
- package/dist/bin/astrasync.js +28 -36
- package/dist/browser/background.js +23 -31
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +23 -31
- 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/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.d.mts +2 -2
- package/dist/codex/index.d.ts +2 -2
- package/dist/codex/index.js +23 -31
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +23 -31
- 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 +23 -31
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +23 -31
- 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 +12 -3
- package/dist/edge-core/index.d.ts +12 -3
- package/dist/edge-core/index.js +42 -36
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +42 -36
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/{express-DBtPKXOL.d.mts → express-KkBZBMqi.d.mts} +1 -1
- package/dist/{express-D-8Ks2Uo.d.ts → express-xK8pRrmj.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 +23 -31
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +23 -31
- 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-kGCGWd5x.d.mts → index-DIRzR5IS.d.mts} +1 -1
- package/dist/{index-DlZORQsb.d.ts → index-DLQ4Rcuc.d.ts} +1 -1
- package/dist/{index-CUfmJ1Dq.d.mts → index-GPDn_EGI.d.mts} +1 -1
- package/dist/{index-BND3kQev.d.ts → index-Hnz5VyMR.d.ts} +1 -1
- package/dist/index.d.mts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +44 -219
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -212
- 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/local-evaluator/evaluator.js.map +1 -1
- package/dist/local-evaluator/evaluator.mjs.map +1 -1
- package/dist/{mcp-DToTlwIn.d.ts → mcp-DPpu4xQz.d.ts} +53 -52
- package/dist/{mcp-ZRN4kY3b.d.mts → mcp-Dju_Sr1o.d.mts} +53 -52
- package/dist/{nextjs-C0KASOy_.d.mts → nextjs-BuoDBN4g.d.mts} +1 -1
- package/dist/{nextjs-lwNvWYWT.d.ts → nextjs-rZKzY_8o.d.ts} +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/sdk-CdO6TIEf.d.mts +142 -0
- package/dist/sdk-DxHuIJBm.d.ts +142 -0
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- 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-DhhJxKIC.d.ts → types-3UV7IZx7.d.ts} +1 -3
- package/dist/{types-CGPU7HLi.d.ts → types-CNBaZKxY.d.ts} +24 -50
- package/dist/{types-Cx9hTpKI.d.mts → types-CSHcByFX.d.mts} +24 -50
- package/dist/{types-CfSJLS4i.d.mts → types-CoDjpbVY.d.mts} +1 -3
- package/dist/ui/index.d.mts +2 -17
- package/dist/ui/index.d.ts +2 -17
- package/dist/ui/index.js +1 -43
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +1 -42
- package/dist/ui/index.mjs.map +1 -1
- package/dist/verify.d.mts +3 -4
- package/dist/verify.d.ts +3 -4
- package/dist/verify.js +22 -30
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +22 -30
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/sdk-B4aodEwj.d.ts +0 -215
- package/dist/sdk-B9dSwum7.d.mts +0 -215
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as CounterpartyType, T as TokenGuidance } from './types-CNBaZKxY.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
|
|
@@ -38,8 +38,6 @@ interface AstraSyncGatewayConfig {
|
|
|
38
38
|
traceEnabled?: boolean;
|
|
39
39
|
/** Trace log directory (default: .astrasync/traces/) */
|
|
40
40
|
tracePath?: string;
|
|
41
|
-
/** Default access level for unverified requests */
|
|
42
|
-
defaultAccessLevel?: AccessLevel;
|
|
43
41
|
/** Minimum trust score for standard access (online/hybrid) */
|
|
44
42
|
minTrustScore?: number;
|
|
45
43
|
/** Minimum trust score for full access (online/hybrid) */
|
|
@@ -10,37 +10,6 @@ import { ObservedMetadata } from './metadata-capture.js';
|
|
|
10
10
|
* Trust levels assigned to agents based on their composite trust score
|
|
11
11
|
*/
|
|
12
12
|
type TrustLevel = 'BRONZE' | 'SILVER' | 'GOLD' | 'PLATINUM';
|
|
13
|
-
/**
|
|
14
|
-
* Access levels granted based on verification result. Server is the single
|
|
15
|
-
* source of truth — these values are the resolved decision the server returns
|
|
16
|
-
* in `access.accessLevel`. SDK reads them verbatim (no client-side remap).
|
|
17
|
-
*
|
|
18
|
-
* For ANONYMOUS / unverified callers, the level is determined by the
|
|
19
|
-
* endpoint's `unverifiedAgentPolicy` per the verify-access canonical flow:
|
|
20
|
-
* - deny: `none` — caller is denied + advised to register
|
|
21
|
-
* - allow_partial: `restricted` — reduced/browse-only access + advised
|
|
22
|
-
* - allow_full: `standard` — unrestricted + advised to register for next time
|
|
23
|
-
* Every branch ALWAYS emits a verification event + queues a blockchain record.
|
|
24
|
-
*
|
|
25
|
-
* For VERIFIED callers, the level is resolved server-side from the
|
|
26
|
-
* agent's live trust score plus the endpoint's `trust_score_requirement`:
|
|
27
|
-
* - none: agent below endpoint gate (denied; access.allowed=false)
|
|
28
|
-
* - restricted: 0–19 trust score (registration-prompt only, no real capability)
|
|
29
|
-
* - read-only: 20–39 trust score (browse, no mutations)
|
|
30
|
-
* - standard: 40–69 trust score (PDLSS-scoped operations)
|
|
31
|
-
* - full: 70+ trust score (PDLSS-scoped, high-trust)
|
|
32
|
-
* - internal: same-org membership, regardless of score
|
|
33
|
-
*
|
|
34
|
-
* v2.3.9 renamed the `'guidance'` band → `'restricted'`. The old name
|
|
35
|
-
* collided with the `guidance: {registrationUrl, ...}` help-payload object
|
|
36
|
-
* on VerificationResult, and the collision let denied requests pass any
|
|
37
|
-
* route gated at `'guidance'` (`hasMinimumAccess('guidance', 'guidance')
|
|
38
|
-
* === true`). Banded vocabulary stays capability-noun (none / restricted /
|
|
39
|
-
* read-only / standard / full / internal); response-shape descriptors stay
|
|
40
|
-
* nouns (guidance, advisory). Adapters additionally short-circuit on
|
|
41
|
-
* `!result.identityVerified || !result.policyAllowed` as belt-and-braces.
|
|
42
|
-
*/
|
|
43
|
-
type AccessLevel = 'none' | 'restricted' | 'read-only' | 'standard' | 'full' | 'internal';
|
|
44
13
|
/**
|
|
45
14
|
* Types of counterparties that can integrate the gateway
|
|
46
15
|
*/
|
|
@@ -66,14 +35,12 @@ interface GatewayConfig {
|
|
|
66
35
|
apiBaseUrl: string;
|
|
67
36
|
/** API key for authenticating with AstraSync. */
|
|
68
37
|
apiKey?: string;
|
|
69
|
-
/** Default access level for unverified requests */
|
|
70
|
-
defaultAccessLevel?: AccessLevel;
|
|
71
38
|
/**
|
|
72
39
|
* @deprecated Removed in v2.3.0 — server is the single source of truth for
|
|
73
|
-
* access
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
40
|
+
* access decisions (verified ID + runtime challenge + PDLSS + trust score).
|
|
41
|
+
* Setting this no longer affects access decisions. If you need a higher gate
|
|
42
|
+
* for an endpoint, configure it server-side via the endpoint's
|
|
43
|
+
* `trust_score_requirement`.
|
|
77
44
|
*/
|
|
78
45
|
minTrustScore?: number;
|
|
79
46
|
/**
|
|
@@ -168,12 +135,11 @@ interface GatewayConfig {
|
|
|
168
135
|
dashboardUrl?: string;
|
|
169
136
|
/**
|
|
170
137
|
* When true, the middleware calls verify-access for any request that presents
|
|
171
|
-
* AstraSync credentials, even on routes /
|
|
172
|
-
*
|
|
173
|
-
* records the verification event for the audit trail. Enforcement
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* behaviour.
|
|
138
|
+
* AstraSync credentials, even on `observe`-marked routes / tools that would
|
|
139
|
+
* otherwise pass through unevaluated. Populates `req.agentVerification` and
|
|
140
|
+
* records the verification event for the audit trail. Enforcement still
|
|
141
|
+
* respects the gate — an `observe` marker still passes through regardless of
|
|
142
|
+
* the server decision. Default false to preserve existing behaviour.
|
|
177
143
|
*
|
|
178
144
|
* Use this when a single endpoint serves both anonymous and verified
|
|
179
145
|
* traffic with different response shapes (e.g. anonymous catalog vs
|
|
@@ -330,6 +296,15 @@ interface GuidanceInfo {
|
|
|
330
296
|
documentationUrl: string;
|
|
331
297
|
/** Steps to get verified */
|
|
332
298
|
steps?: string[];
|
|
299
|
+
/**
|
|
300
|
+
* 5.1.0: hosted AstraSync MCP connector — the keyless, human-approved
|
|
301
|
+
* registration path for agents already operating inside an MCP host.
|
|
302
|
+
*/
|
|
303
|
+
mcp?: {
|
|
304
|
+
endpoint: string;
|
|
305
|
+
discoveryUrl?: string;
|
|
306
|
+
message?: string;
|
|
307
|
+
};
|
|
333
308
|
}
|
|
334
309
|
interface StepUpApprovalInfo {
|
|
335
310
|
approvalId: string;
|
|
@@ -428,8 +403,6 @@ interface VerificationResult {
|
|
|
428
403
|
* unverified caller's policy field is `false` by definition.
|
|
429
404
|
*/
|
|
430
405
|
policyAllowed: boolean;
|
|
431
|
-
/** Access level granted */
|
|
432
|
-
accessLevel: AccessLevel;
|
|
433
406
|
/** Verified agent info (if verified) */
|
|
434
407
|
agent?: VerifiedAgent;
|
|
435
408
|
/** Developer info (if available) */
|
|
@@ -773,10 +746,12 @@ interface RouteAccessConfig {
|
|
|
773
746
|
/** HTTP method (or * for all) */
|
|
774
747
|
method: string | '*';
|
|
775
748
|
/**
|
|
776
|
-
*
|
|
777
|
-
*
|
|
749
|
+
* Pass this route through unenforced (observe). The middleware skips gating
|
|
750
|
+
* on the server decision; with `evaluateAlwaysIfCredentialed` set it still
|
|
751
|
+
* calls verify-access for the audit trail and populates `req.agentVerification`.
|
|
752
|
+
* Replaces the old `minAccessLevel: 'none'` sentinel (SDK 5.0.0).
|
|
778
753
|
*/
|
|
779
|
-
|
|
754
|
+
observe?: boolean;
|
|
780
755
|
/** Minimum trust score required (optional) */
|
|
781
756
|
minTrustScore?: number;
|
|
782
757
|
/** Required purposes (optional, agent must declare one of these) */
|
|
@@ -952,7 +927,6 @@ interface NextJsMiddlewareOptions extends GatewayConfig {
|
|
|
952
927
|
title?: string;
|
|
953
928
|
message?: string;
|
|
954
929
|
allowGuestAccess?: boolean;
|
|
955
|
-
guestAccessLevel?: AccessLevel;
|
|
956
930
|
};
|
|
957
931
|
/** Enable runtime challenge for all verify-access calls (default: true) */
|
|
958
932
|
enableRuntimeChallenge?: boolean;
|
|
@@ -1094,4 +1068,4 @@ interface VerificationInterstitialProps {
|
|
|
1094
1068
|
/** @deprecated Renamed VerificationInterstitialProps in 4.1.0; alias removed next major. */
|
|
1095
1069
|
type CommerceShieldProps = VerificationInterstitialProps;
|
|
1096
1070
|
|
|
1097
|
-
export type { AccessFailure as A,
|
|
1071
|
+
export type { AccessFailure as A, CallerMetadata as C, EnhancedVerificationResult as E, FiatSettlementBinding as F, GatewayConfig as G, NextJsMiddlewareOptions as N, PDLSSInfo as P, RouteAccessConfig as R, SDKOptions as S, TokenGuidance as T, VerificationInterstitialProps as V, AgentCredentials as a, AstraSyncCredentials as b, AttemptOutcome as c, AttemptReport as d, CommerceArtifactsPayload as e, CommerceShieldProps as f, ConsiderationItem as g, ConsiderationSet as h, CounterpartyType as i, ExpressMiddlewareOptions as j, GuidanceInfo as k, ProtocolTransport as l, RuntimeChallengeResult as m, SettlementArtifact as n, SettlementArtifactBinding as o, SettlementArtifactBindingBase as p, StablecoinSettlementBinding as q, StepUpApprovalInfo as r, StepUpApprovalStatus as s, StepUpOutcome as t, TrustLevel as u, VerificationRequest as v, VerificationResult as w, VerifiedAgent as x, VerifiedDeveloper as y, VerifiedOrganization as z };
|
|
@@ -10,37 +10,6 @@ import { ObservedMetadata } from './metadata-capture.mjs';
|
|
|
10
10
|
* Trust levels assigned to agents based on their composite trust score
|
|
11
11
|
*/
|
|
12
12
|
type TrustLevel = 'BRONZE' | 'SILVER' | 'GOLD' | 'PLATINUM';
|
|
13
|
-
/**
|
|
14
|
-
* Access levels granted based on verification result. Server is the single
|
|
15
|
-
* source of truth — these values are the resolved decision the server returns
|
|
16
|
-
* in `access.accessLevel`. SDK reads them verbatim (no client-side remap).
|
|
17
|
-
*
|
|
18
|
-
* For ANONYMOUS / unverified callers, the level is determined by the
|
|
19
|
-
* endpoint's `unverifiedAgentPolicy` per the verify-access canonical flow:
|
|
20
|
-
* - deny: `none` — caller is denied + advised to register
|
|
21
|
-
* - allow_partial: `restricted` — reduced/browse-only access + advised
|
|
22
|
-
* - allow_full: `standard` — unrestricted + advised to register for next time
|
|
23
|
-
* Every branch ALWAYS emits a verification event + queues a blockchain record.
|
|
24
|
-
*
|
|
25
|
-
* For VERIFIED callers, the level is resolved server-side from the
|
|
26
|
-
* agent's live trust score plus the endpoint's `trust_score_requirement`:
|
|
27
|
-
* - none: agent below endpoint gate (denied; access.allowed=false)
|
|
28
|
-
* - restricted: 0–19 trust score (registration-prompt only, no real capability)
|
|
29
|
-
* - read-only: 20–39 trust score (browse, no mutations)
|
|
30
|
-
* - standard: 40–69 trust score (PDLSS-scoped operations)
|
|
31
|
-
* - full: 70+ trust score (PDLSS-scoped, high-trust)
|
|
32
|
-
* - internal: same-org membership, regardless of score
|
|
33
|
-
*
|
|
34
|
-
* v2.3.9 renamed the `'guidance'` band → `'restricted'`. The old name
|
|
35
|
-
* collided with the `guidance: {registrationUrl, ...}` help-payload object
|
|
36
|
-
* on VerificationResult, and the collision let denied requests pass any
|
|
37
|
-
* route gated at `'guidance'` (`hasMinimumAccess('guidance', 'guidance')
|
|
38
|
-
* === true`). Banded vocabulary stays capability-noun (none / restricted /
|
|
39
|
-
* read-only / standard / full / internal); response-shape descriptors stay
|
|
40
|
-
* nouns (guidance, advisory). Adapters additionally short-circuit on
|
|
41
|
-
* `!result.identityVerified || !result.policyAllowed` as belt-and-braces.
|
|
42
|
-
*/
|
|
43
|
-
type AccessLevel = 'none' | 'restricted' | 'read-only' | 'standard' | 'full' | 'internal';
|
|
44
13
|
/**
|
|
45
14
|
* Types of counterparties that can integrate the gateway
|
|
46
15
|
*/
|
|
@@ -66,14 +35,12 @@ interface GatewayConfig {
|
|
|
66
35
|
apiBaseUrl: string;
|
|
67
36
|
/** API key for authenticating with AstraSync. */
|
|
68
37
|
apiKey?: string;
|
|
69
|
-
/** Default access level for unverified requests */
|
|
70
|
-
defaultAccessLevel?: AccessLevel;
|
|
71
38
|
/**
|
|
72
39
|
* @deprecated Removed in v2.3.0 — server is the single source of truth for
|
|
73
|
-
* access
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
40
|
+
* access decisions (verified ID + runtime challenge + PDLSS + trust score).
|
|
41
|
+
* Setting this no longer affects access decisions. If you need a higher gate
|
|
42
|
+
* for an endpoint, configure it server-side via the endpoint's
|
|
43
|
+
* `trust_score_requirement`.
|
|
77
44
|
*/
|
|
78
45
|
minTrustScore?: number;
|
|
79
46
|
/**
|
|
@@ -168,12 +135,11 @@ interface GatewayConfig {
|
|
|
168
135
|
dashboardUrl?: string;
|
|
169
136
|
/**
|
|
170
137
|
* When true, the middleware calls verify-access for any request that presents
|
|
171
|
-
* AstraSync credentials, even on routes /
|
|
172
|
-
*
|
|
173
|
-
* records the verification event for the audit trail. Enforcement
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* behaviour.
|
|
138
|
+
* AstraSync credentials, even on `observe`-marked routes / tools that would
|
|
139
|
+
* otherwise pass through unevaluated. Populates `req.agentVerification` and
|
|
140
|
+
* records the verification event for the audit trail. Enforcement still
|
|
141
|
+
* respects the gate — an `observe` marker still passes through regardless of
|
|
142
|
+
* the server decision. Default false to preserve existing behaviour.
|
|
177
143
|
*
|
|
178
144
|
* Use this when a single endpoint serves both anonymous and verified
|
|
179
145
|
* traffic with different response shapes (e.g. anonymous catalog vs
|
|
@@ -330,6 +296,15 @@ interface GuidanceInfo {
|
|
|
330
296
|
documentationUrl: string;
|
|
331
297
|
/** Steps to get verified */
|
|
332
298
|
steps?: string[];
|
|
299
|
+
/**
|
|
300
|
+
* 5.1.0: hosted AstraSync MCP connector — the keyless, human-approved
|
|
301
|
+
* registration path for agents already operating inside an MCP host.
|
|
302
|
+
*/
|
|
303
|
+
mcp?: {
|
|
304
|
+
endpoint: string;
|
|
305
|
+
discoveryUrl?: string;
|
|
306
|
+
message?: string;
|
|
307
|
+
};
|
|
333
308
|
}
|
|
334
309
|
interface StepUpApprovalInfo {
|
|
335
310
|
approvalId: string;
|
|
@@ -428,8 +403,6 @@ interface VerificationResult {
|
|
|
428
403
|
* unverified caller's policy field is `false` by definition.
|
|
429
404
|
*/
|
|
430
405
|
policyAllowed: boolean;
|
|
431
|
-
/** Access level granted */
|
|
432
|
-
accessLevel: AccessLevel;
|
|
433
406
|
/** Verified agent info (if verified) */
|
|
434
407
|
agent?: VerifiedAgent;
|
|
435
408
|
/** Developer info (if available) */
|
|
@@ -773,10 +746,12 @@ interface RouteAccessConfig {
|
|
|
773
746
|
/** HTTP method (or * for all) */
|
|
774
747
|
method: string | '*';
|
|
775
748
|
/**
|
|
776
|
-
*
|
|
777
|
-
*
|
|
749
|
+
* Pass this route through unenforced (observe). The middleware skips gating
|
|
750
|
+
* on the server decision; with `evaluateAlwaysIfCredentialed` set it still
|
|
751
|
+
* calls verify-access for the audit trail and populates `req.agentVerification`.
|
|
752
|
+
* Replaces the old `minAccessLevel: 'none'` sentinel (SDK 5.0.0).
|
|
778
753
|
*/
|
|
779
|
-
|
|
754
|
+
observe?: boolean;
|
|
780
755
|
/** Minimum trust score required (optional) */
|
|
781
756
|
minTrustScore?: number;
|
|
782
757
|
/** Required purposes (optional, agent must declare one of these) */
|
|
@@ -952,7 +927,6 @@ interface NextJsMiddlewareOptions extends GatewayConfig {
|
|
|
952
927
|
title?: string;
|
|
953
928
|
message?: string;
|
|
954
929
|
allowGuestAccess?: boolean;
|
|
955
|
-
guestAccessLevel?: AccessLevel;
|
|
956
930
|
};
|
|
957
931
|
/** Enable runtime challenge for all verify-access calls (default: true) */
|
|
958
932
|
enableRuntimeChallenge?: boolean;
|
|
@@ -1094,4 +1068,4 @@ interface VerificationInterstitialProps {
|
|
|
1094
1068
|
/** @deprecated Renamed VerificationInterstitialProps in 4.1.0; alias removed next major. */
|
|
1095
1069
|
type CommerceShieldProps = VerificationInterstitialProps;
|
|
1096
1070
|
|
|
1097
|
-
export type { AccessFailure as A,
|
|
1071
|
+
export type { AccessFailure as A, CallerMetadata as C, EnhancedVerificationResult as E, FiatSettlementBinding as F, GatewayConfig as G, NextJsMiddlewareOptions as N, PDLSSInfo as P, RouteAccessConfig as R, SDKOptions as S, TokenGuidance as T, VerificationInterstitialProps as V, AgentCredentials as a, AstraSyncCredentials as b, AttemptOutcome as c, AttemptReport as d, CommerceArtifactsPayload as e, CommerceShieldProps as f, ConsiderationItem as g, ConsiderationSet as h, CounterpartyType as i, ExpressMiddlewareOptions as j, GuidanceInfo as k, ProtocolTransport as l, RuntimeChallengeResult as m, SettlementArtifact as n, SettlementArtifactBinding as o, SettlementArtifactBindingBase as p, StablecoinSettlementBinding as q, StepUpApprovalInfo as r, StepUpApprovalStatus as s, StepUpOutcome as t, TrustLevel as u, VerificationRequest as v, VerificationResult as w, VerifiedAgent as x, VerifiedDeveloper as y, VerifiedOrganization as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as CounterpartyType, T as TokenGuidance } from './types-CSHcByFX.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
|
|
@@ -38,8 +38,6 @@ interface AstraSyncGatewayConfig {
|
|
|
38
38
|
traceEnabled?: boolean;
|
|
39
39
|
/** Trace log directory (default: .astrasync/traces/) */
|
|
40
40
|
tracePath?: string;
|
|
41
|
-
/** Default access level for unverified requests */
|
|
42
|
-
defaultAccessLevel?: AccessLevel;
|
|
43
41
|
/** Minimum trust score for standard access (online/hybrid) */
|
|
44
42
|
minTrustScore?: number;
|
|
45
43
|
/** Minimum trust score for full access (online/hybrid) */
|
package/dist/ui/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerificationInterstitialProps,
|
|
1
|
+
import { V as VerificationInterstitialProps, w as VerificationResult, a as AgentCredentials, k as GuidanceInfo, u as TrustLevel } from '../types-CSHcByFX.mjs';
|
|
2
2
|
import '../metadata-capture.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -110,17 +110,6 @@ interface TrustLevelBadgeProps {
|
|
|
110
110
|
/** Custom class name */
|
|
111
111
|
className?: string;
|
|
112
112
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Access level indicator props
|
|
115
|
-
*/
|
|
116
|
-
interface AccessLevelIndicatorProps {
|
|
117
|
-
/** Current access level */
|
|
118
|
-
accessLevel: string;
|
|
119
|
-
/** Required access level */
|
|
120
|
-
requiredLevel?: string;
|
|
121
|
-
/** Custom class name */
|
|
122
|
-
className?: string;
|
|
123
|
-
}
|
|
124
113
|
/**
|
|
125
114
|
* Guidance card component
|
|
126
115
|
*/
|
|
@@ -129,10 +118,6 @@ declare function GuidanceCard({ guidance, title, compact, className, }: Guidance
|
|
|
129
118
|
* Trust level badge component
|
|
130
119
|
*/
|
|
131
120
|
declare function TrustLevelBadge({ level, score, size, className, }: TrustLevelBadgeProps): JSX.Element;
|
|
132
|
-
/**
|
|
133
|
-
* Access level indicator component
|
|
134
|
-
*/
|
|
135
|
-
declare function AccessLevelIndicator({ accessLevel, requiredLevel, className, }: AccessLevelIndicatorProps): JSX.Element;
|
|
136
121
|
/**
|
|
137
122
|
* Denial reasons list component
|
|
138
123
|
*/
|
|
@@ -142,4 +127,4 @@ interface DenialReasonsProps {
|
|
|
142
127
|
}
|
|
143
128
|
declare function DenialReasons({ reasons, className }: DenialReasonsProps): JSX.Element;
|
|
144
129
|
|
|
145
|
-
export {
|
|
130
|
+
export { VerificationInterstitial as CommerceShield, VerificationInterstitialProps as CommerceShieldProps, CredentialPrompt, type CredentialPromptProps, DenialReasons, type DenialReasonsProps, GuidanceCard, type GuidanceCardProps, TrustLevelBadge, type TrustLevelBadgeProps, VerificationInterstitial, VerificationInterstitialProps, useVerificationInterstitial as useCommerceShield, useCredentialPrompt, useVerificationInterstitial };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as VerificationInterstitialProps,
|
|
1
|
+
import { V as VerificationInterstitialProps, w as VerificationResult, a as AgentCredentials, k as GuidanceInfo, u as TrustLevel } from '../types-CNBaZKxY.js';
|
|
2
2
|
import '../metadata-capture.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -110,17 +110,6 @@ interface TrustLevelBadgeProps {
|
|
|
110
110
|
/** Custom class name */
|
|
111
111
|
className?: string;
|
|
112
112
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Access level indicator props
|
|
115
|
-
*/
|
|
116
|
-
interface AccessLevelIndicatorProps {
|
|
117
|
-
/** Current access level */
|
|
118
|
-
accessLevel: string;
|
|
119
|
-
/** Required access level */
|
|
120
|
-
requiredLevel?: string;
|
|
121
|
-
/** Custom class name */
|
|
122
|
-
className?: string;
|
|
123
|
-
}
|
|
124
113
|
/**
|
|
125
114
|
* Guidance card component
|
|
126
115
|
*/
|
|
@@ -129,10 +118,6 @@ declare function GuidanceCard({ guidance, title, compact, className, }: Guidance
|
|
|
129
118
|
* Trust level badge component
|
|
130
119
|
*/
|
|
131
120
|
declare function TrustLevelBadge({ level, score, size, className, }: TrustLevelBadgeProps): JSX.Element;
|
|
132
|
-
/**
|
|
133
|
-
* Access level indicator component
|
|
134
|
-
*/
|
|
135
|
-
declare function AccessLevelIndicator({ accessLevel, requiredLevel, className, }: AccessLevelIndicatorProps): JSX.Element;
|
|
136
121
|
/**
|
|
137
122
|
* Denial reasons list component
|
|
138
123
|
*/
|
|
@@ -142,4 +127,4 @@ interface DenialReasonsProps {
|
|
|
142
127
|
}
|
|
143
128
|
declare function DenialReasons({ reasons, className }: DenialReasonsProps): JSX.Element;
|
|
144
129
|
|
|
145
|
-
export {
|
|
130
|
+
export { VerificationInterstitial as CommerceShield, VerificationInterstitialProps as CommerceShieldProps, CredentialPrompt, type CredentialPromptProps, DenialReasons, type DenialReasonsProps, GuidanceCard, type GuidanceCardProps, TrustLevelBadge, type TrustLevelBadgeProps, VerificationInterstitial, VerificationInterstitialProps, useVerificationInterstitial as useCommerceShield, useCredentialPrompt, useVerificationInterstitial };
|
package/dist/ui/index.js
CHANGED
|
@@ -30,7 +30,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/ui/index.ts
|
|
31
31
|
var ui_exports = {};
|
|
32
32
|
__export(ui_exports, {
|
|
33
|
-
AccessLevelIndicator: () => AccessLevelIndicator,
|
|
34
33
|
CommerceShield: () => VerificationInterstitial,
|
|
35
34
|
CredentialPrompt: () => CredentialPrompt,
|
|
36
35
|
DenialReasons: () => DenialReasons,
|
|
@@ -233,7 +232,7 @@ function useVerificationInterstitial(verificationResult) {
|
|
|
233
232
|
const [dismissed, setDismissed] = import_react.default.useState(false);
|
|
234
233
|
import_react.default.useEffect(() => {
|
|
235
234
|
if (verificationResult && !dismissed) {
|
|
236
|
-
const shouldShow = !verificationResult.identityVerified || !verificationResult.policyAllowed
|
|
235
|
+
const shouldShow = !verificationResult.identityVerified || !verificationResult.policyAllowed;
|
|
237
236
|
setVisible(shouldShow);
|
|
238
237
|
}
|
|
239
238
|
}, [verificationResult, dismissed]);
|
|
@@ -725,46 +724,6 @@ function TrustLevelBadge({
|
|
|
725
724
|
}
|
|
726
725
|
);
|
|
727
726
|
}
|
|
728
|
-
function AccessLevelIndicator({
|
|
729
|
-
accessLevel,
|
|
730
|
-
requiredLevel,
|
|
731
|
-
className
|
|
732
|
-
}) {
|
|
733
|
-
const getStatus = () => {
|
|
734
|
-
if (accessLevel === "none" || accessLevel === "restricted") {
|
|
735
|
-
return "denied";
|
|
736
|
-
}
|
|
737
|
-
if (requiredLevel) {
|
|
738
|
-
const levels = ["none", "restricted", "read-only", "standard", "full", "internal"];
|
|
739
|
-
const currentIndex = levels.indexOf(accessLevel);
|
|
740
|
-
const requiredIndex = levels.indexOf(requiredLevel);
|
|
741
|
-
if (currentIndex < requiredIndex) {
|
|
742
|
-
return "limited";
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
return "allowed";
|
|
746
|
-
};
|
|
747
|
-
const status = getStatus();
|
|
748
|
-
const statusColors = {
|
|
749
|
-
allowed: styles.indicatorAllowed,
|
|
750
|
-
denied: styles.indicatorDenied,
|
|
751
|
-
limited: styles.indicatorLimited
|
|
752
|
-
};
|
|
753
|
-
const statusLabels = {
|
|
754
|
-
allowed: "Access Granted",
|
|
755
|
-
denied: "Access Denied",
|
|
756
|
-
limited: "Limited Access"
|
|
757
|
-
};
|
|
758
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: styles.indicator, className, children: [
|
|
759
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { ...styles.indicatorDot, ...statusColors[status] } }),
|
|
760
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: statusLabels[status] }),
|
|
761
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { style: { color: "#94a3b8" }, children: [
|
|
762
|
-
"(",
|
|
763
|
-
accessLevel,
|
|
764
|
-
")"
|
|
765
|
-
] })
|
|
766
|
-
] });
|
|
767
|
-
}
|
|
768
727
|
function DenialReasons({ reasons, className }) {
|
|
769
728
|
if (reasons.length === 0) {
|
|
770
729
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {});
|
|
@@ -816,7 +775,6 @@ function DenialReasons({ reasons, className }) {
|
|
|
816
775
|
}
|
|
817
776
|
// Annotate the CommonJS export names for ESM import in node:
|
|
818
777
|
0 && (module.exports = {
|
|
819
|
-
AccessLevelIndicator,
|
|
820
778
|
CommerceShield,
|
|
821
779
|
CredentialPrompt,
|
|
822
780
|
DenialReasons,
|