@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.
Files changed (135) hide show
  1. package/dist/adapter-interface/interface.d.mts +2 -2
  2. package/dist/adapter-interface/interface.d.ts +2 -2
  3. package/dist/adapters/express.d.mts +2 -2
  4. package/dist/adapters/express.d.ts +2 -2
  5. package/dist/adapters/express.js +25 -35
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +25 -35
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/mcp.d.mts +2 -2
  10. package/dist/adapters/mcp.d.ts +2 -2
  11. package/dist/adapters/mcp.js +42 -67
  12. package/dist/adapters/mcp.js.map +1 -1
  13. package/dist/adapters/mcp.mjs +41 -66
  14. package/dist/adapters/mcp.mjs.map +1 -1
  15. package/dist/adapters/nextjs.d.mts +2 -2
  16. package/dist/adapters/nextjs.d.ts +2 -2
  17. package/dist/adapters/nextjs.js +23 -32
  18. package/dist/adapters/nextjs.js.map +1 -1
  19. package/dist/adapters/nextjs.mjs +23 -32
  20. package/dist/adapters/nextjs.mjs.map +1 -1
  21. package/dist/adapters/sdk.d.mts +2 -2
  22. package/dist/adapters/sdk.d.ts +2 -2
  23. package/dist/adapters/sdk.js +22 -126
  24. package/dist/adapters/sdk.js.map +1 -1
  25. package/dist/adapters/sdk.mjs +22 -124
  26. package/dist/adapters/sdk.mjs.map +1 -1
  27. package/dist/agent/index.d.mts +2 -2
  28. package/dist/agent/index.d.ts +2 -2
  29. package/dist/agent/index.js +1 -1
  30. package/dist/agent/index.js.map +1 -1
  31. package/dist/agent/index.mjs +1 -1
  32. package/dist/agent/index.mjs.map +1 -1
  33. package/dist/bin/astrasync-claude-hook.js +23 -31
  34. package/dist/bin/astrasync-codex-hook.js +23 -31
  35. package/dist/bin/astrasync-guard.js +23 -31
  36. package/dist/bin/astrasync.js +28 -36
  37. package/dist/browser/background.js +23 -31
  38. package/dist/browser/background.js.map +1 -1
  39. package/dist/browser/background.mjs +23 -31
  40. package/dist/browser/background.mjs.map +1 -1
  41. package/dist/browser/browser-adapter.d.mts +2 -2
  42. package/dist/browser/browser-adapter.d.ts +2 -2
  43. package/dist/claude-code/claude-code-adapter.d.mts +2 -2
  44. package/dist/claude-code/claude-code-adapter.d.ts +2 -2
  45. package/dist/cli/index.d.mts +2 -2
  46. package/dist/cli/index.d.ts +2 -2
  47. package/dist/cli/index.js +1 -1
  48. package/dist/cli/index.js.map +1 -1
  49. package/dist/cli/index.mjs +1 -1
  50. package/dist/cli/index.mjs.map +1 -1
  51. package/dist/codex/index.d.mts +2 -2
  52. package/dist/codex/index.d.ts +2 -2
  53. package/dist/codex/index.js +23 -31
  54. package/dist/codex/index.js.map +1 -1
  55. package/dist/codex/index.mjs +23 -31
  56. package/dist/codex/index.mjs.map +1 -1
  57. package/dist/cursor/cursor-adapter.d.mts +2 -2
  58. package/dist/cursor/cursor-adapter.d.ts +2 -2
  59. package/dist/cursor/extension.d.mts +2 -2
  60. package/dist/cursor/extension.d.ts +2 -2
  61. package/dist/cursor/extension.js +23 -31
  62. package/dist/cursor/extension.js.map +1 -1
  63. package/dist/cursor/extension.mjs +23 -31
  64. package/dist/cursor/extension.mjs.map +1 -1
  65. package/dist/edge-config.d.mts +1 -1
  66. package/dist/edge-config.d.ts +1 -1
  67. package/dist/edge-config.js +1 -1
  68. package/dist/edge-config.js.map +1 -1
  69. package/dist/edge-config.mjs +1 -1
  70. package/dist/edge-config.mjs.map +1 -1
  71. package/dist/edge-core/index.d.mts +12 -3
  72. package/dist/edge-core/index.d.ts +12 -3
  73. package/dist/edge-core/index.js +42 -36
  74. package/dist/edge-core/index.js.map +1 -1
  75. package/dist/edge-core/index.mjs +42 -36
  76. package/dist/edge-core/index.mjs.map +1 -1
  77. package/dist/{express-DBtPKXOL.d.mts → express-KkBZBMqi.d.mts} +1 -1
  78. package/dist/{express-D-8Ks2Uo.d.ts → express-xK8pRrmj.d.ts} +1 -1
  79. package/dist/gateway/gateway.d.mts +2 -2
  80. package/dist/gateway/gateway.d.ts +2 -2
  81. package/dist/gateway/gateway.js +23 -31
  82. package/dist/gateway/gateway.js.map +1 -1
  83. package/dist/gateway/gateway.mjs +23 -31
  84. package/dist/gateway/gateway.mjs.map +1 -1
  85. package/dist/git-trigger/git-hooks.d.mts +2 -2
  86. package/dist/git-trigger/git-hooks.d.ts +2 -2
  87. package/dist/{index-kGCGWd5x.d.mts → index-DIRzR5IS.d.mts} +1 -1
  88. package/dist/{index-DlZORQsb.d.ts → index-DLQ4Rcuc.d.ts} +1 -1
  89. package/dist/{index-CUfmJ1Dq.d.mts → index-GPDn_EGI.d.mts} +1 -1
  90. package/dist/{index-BND3kQev.d.ts → index-Hnz5VyMR.d.ts} +1 -1
  91. package/dist/index.d.mts +14 -10
  92. package/dist/index.d.ts +14 -10
  93. package/dist/index.js +44 -219
  94. package/dist/index.js.map +1 -1
  95. package/dist/index.mjs +44 -212
  96. package/dist/index.mjs.map +1 -1
  97. package/dist/local-evaluator/evaluator.d.mts +2 -2
  98. package/dist/local-evaluator/evaluator.d.ts +2 -2
  99. package/dist/local-evaluator/evaluator.js.map +1 -1
  100. package/dist/local-evaluator/evaluator.mjs.map +1 -1
  101. package/dist/{mcp-DToTlwIn.d.ts → mcp-DPpu4xQz.d.ts} +53 -52
  102. package/dist/{mcp-ZRN4kY3b.d.mts → mcp-Dju_Sr1o.d.mts} +53 -52
  103. package/dist/{nextjs-C0KASOy_.d.mts → nextjs-BuoDBN4g.d.mts} +1 -1
  104. package/dist/{nextjs-lwNvWYWT.d.ts → nextjs-rZKzY_8o.d.ts} +1 -1
  105. package/dist/registration/index.js +1 -1
  106. package/dist/registration/index.js.map +1 -1
  107. package/dist/registration/index.mjs +1 -1
  108. package/dist/registration/index.mjs.map +1 -1
  109. package/dist/sdk-CdO6TIEf.d.mts +142 -0
  110. package/dist/sdk-DxHuIJBm.d.ts +142 -0
  111. package/dist/transport/index.d.mts +2 -2
  112. package/dist/transport/index.d.ts +2 -2
  113. package/dist/transport/index.js +1 -1
  114. package/dist/transport/index.js.map +1 -1
  115. package/dist/transport/index.mjs +1 -1
  116. package/dist/transport/index.mjs.map +1 -1
  117. package/dist/{types-DhhJxKIC.d.ts → types-3UV7IZx7.d.ts} +1 -3
  118. package/dist/{types-CGPU7HLi.d.ts → types-CNBaZKxY.d.ts} +24 -50
  119. package/dist/{types-Cx9hTpKI.d.mts → types-CSHcByFX.d.mts} +24 -50
  120. package/dist/{types-CfSJLS4i.d.mts → types-CoDjpbVY.d.mts} +1 -3
  121. package/dist/ui/index.d.mts +2 -17
  122. package/dist/ui/index.d.ts +2 -17
  123. package/dist/ui/index.js +1 -43
  124. package/dist/ui/index.js.map +1 -1
  125. package/dist/ui/index.mjs +1 -42
  126. package/dist/ui/index.mjs.map +1 -1
  127. package/dist/verify.d.mts +3 -4
  128. package/dist/verify.d.ts +3 -4
  129. package/dist/verify.js +22 -30
  130. package/dist/verify.js.map +1 -1
  131. package/dist/verify.mjs +22 -30
  132. package/dist/verify.mjs.map +1 -1
  133. package/package.json +1 -1
  134. package/dist/sdk-B4aodEwj.d.ts +0 -215
  135. package/dist/sdk-B9dSwum7.d.mts +0 -215
@@ -1,4 +1,4 @@
1
- import { a as AccessLevel, j as CounterpartyType, T as TokenGuidance } from './types-CGPU7HLi.js';
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-level decisions. Setting this no longer affects access decisions
74
- * (the SDK reads `access.accessLevel` from the verify-access response).
75
- * If you need a higher gate for an endpoint, configure it server-side via
76
- * the endpoint's `trust_score_requirement`.
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 / MCP risk-tiers with
172
- * `minAccessLevel: 'none'`. Populates `req.agentVerification` and
173
- * records the verification event for the audit trail. Enforcement
174
- * still respects route / tier policy — a `none` floor still grants
175
- * regardless of access level. Default false to preserve existing
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
- * @deprecated 3.2.0 — the access-level band no longer gates.
777
- * Optional/ignored; retained for back-compat. Use `minTrustScore` to tighten.
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
- minAccessLevel?: AccessLevel;
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, VerifiedOrganization as B, 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, AccessLevel as a, AgentCredentials as b, AstraSyncCredentials as c, AttemptOutcome as d, AttemptReport as e, CommerceArtifactsPayload as f, CommerceShieldProps as g, ConsiderationItem as h, ConsiderationSet as i, CounterpartyType as j, ExpressMiddlewareOptions as k, GuidanceInfo as l, ProtocolTransport as m, RuntimeChallengeResult as n, SettlementArtifact as o, SettlementArtifactBinding as p, SettlementArtifactBindingBase as q, StablecoinSettlementBinding as r, StepUpApprovalInfo as s, StepUpApprovalStatus as t, StepUpOutcome as u, TrustLevel as v, VerificationRequest as w, VerificationResult as x, VerifiedAgent as y, VerifiedDeveloper as z };
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-level decisions. Setting this no longer affects access decisions
74
- * (the SDK reads `access.accessLevel` from the verify-access response).
75
- * If you need a higher gate for an endpoint, configure it server-side via
76
- * the endpoint's `trust_score_requirement`.
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 / MCP risk-tiers with
172
- * `minAccessLevel: 'none'`. Populates `req.agentVerification` and
173
- * records the verification event for the audit trail. Enforcement
174
- * still respects route / tier policy — a `none` floor still grants
175
- * regardless of access level. Default false to preserve existing
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
- * @deprecated 3.2.0 — the access-level band no longer gates.
777
- * Optional/ignored; retained for back-compat. Use `minTrustScore` to tighten.
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
- minAccessLevel?: AccessLevel;
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, VerifiedOrganization as B, 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, AccessLevel as a, AgentCredentials as b, AstraSyncCredentials as c, AttemptOutcome as d, AttemptReport as e, CommerceArtifactsPayload as f, CommerceShieldProps as g, ConsiderationItem as h, ConsiderationSet as i, CounterpartyType as j, ExpressMiddlewareOptions as k, GuidanceInfo as l, ProtocolTransport as m, RuntimeChallengeResult as n, SettlementArtifact as o, SettlementArtifactBinding as p, SettlementArtifactBindingBase as q, StablecoinSettlementBinding as r, StepUpApprovalInfo as s, StepUpApprovalStatus as t, StepUpOutcome as u, TrustLevel as v, VerificationRequest as w, VerificationResult as x, VerifiedAgent as y, VerifiedDeveloper as z };
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 { a as AccessLevel, j as CounterpartyType, T as TokenGuidance } from './types-Cx9hTpKI.mjs';
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) */
@@ -1,4 +1,4 @@
1
- import { V as VerificationInterstitialProps, x as VerificationResult, b as AgentCredentials, l as GuidanceInfo, v as TrustLevel } from '../types-Cx9hTpKI.mjs';
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 { AccessLevelIndicator, type AccessLevelIndicatorProps, 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 };
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 };
@@ -1,4 +1,4 @@
1
- import { V as VerificationInterstitialProps, x as VerificationResult, b as AgentCredentials, l as GuidanceInfo, v as TrustLevel } from '../types-CGPU7HLi.js';
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 { AccessLevelIndicator, type AccessLevelIndicatorProps, 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 };
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 || verificationResult.accessLevel === "none" || verificationResult.accessLevel === "restricted";
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,