@astrasyncai/verification-gateway 1.1.0 → 2.0.1

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 (113) hide show
  1. package/dist/adapter-interface/interface.d.mts +71 -0
  2. package/dist/adapter-interface/interface.d.ts +71 -0
  3. package/dist/adapter-interface/interface.js +36 -0
  4. package/dist/adapter-interface/interface.js.map +1 -0
  5. package/dist/adapter-interface/interface.mjs +10 -0
  6. package/dist/adapter-interface/interface.mjs.map +1 -0
  7. package/dist/adapter-interface/purpose-mapping.d.mts +28 -0
  8. package/dist/adapter-interface/purpose-mapping.d.ts +28 -0
  9. package/dist/adapter-interface/purpose-mapping.js +117 -0
  10. package/dist/adapter-interface/purpose-mapping.js.map +1 -0
  11. package/dist/adapter-interface/purpose-mapping.mjs +89 -0
  12. package/dist/adapter-interface/purpose-mapping.mjs.map +1 -0
  13. package/dist/adapters/express.d.mts +2 -2
  14. package/dist/adapters/express.d.ts +2 -2
  15. package/dist/adapters/express.js +123 -11
  16. package/dist/adapters/express.js.map +1 -1
  17. package/dist/adapters/express.mjs +123 -11
  18. package/dist/adapters/express.mjs.map +1 -1
  19. package/dist/adapters/nextjs.d.mts +2 -2
  20. package/dist/adapters/nextjs.d.ts +2 -2
  21. package/dist/adapters/nextjs.js +192 -14
  22. package/dist/adapters/nextjs.js.map +1 -1
  23. package/dist/adapters/nextjs.mjs +192 -14
  24. package/dist/adapters/nextjs.mjs.map +1 -1
  25. package/dist/adapters/sdk.d.mts +2 -2
  26. package/dist/adapters/sdk.d.ts +2 -2
  27. package/dist/adapters/sdk.js +7 -2
  28. package/dist/adapters/sdk.js.map +1 -1
  29. package/dist/adapters/sdk.mjs +7 -2
  30. package/dist/adapters/sdk.mjs.map +1 -1
  31. package/dist/agent/index.d.mts +2 -0
  32. package/dist/agent/index.d.ts +2 -0
  33. package/dist/agent/index.js +354 -0
  34. package/dist/agent/index.js.map +1 -0
  35. package/dist/agent/index.mjs +323 -0
  36. package/dist/agent/index.mjs.map +1 -0
  37. package/dist/browser/background.d.mts +2 -0
  38. package/dist/browser/background.d.ts +2 -0
  39. package/dist/browser/background.js +4090 -0
  40. package/dist/browser/background.js.map +1 -0
  41. package/dist/browser/background.mjs +4088 -0
  42. package/dist/browser/background.mjs.map +1 -0
  43. package/dist/browser/browser-adapter.d.mts +110 -0
  44. package/dist/browser/browser-adapter.d.ts +110 -0
  45. package/dist/browser/browser-adapter.js +297 -0
  46. package/dist/browser/browser-adapter.js.map +1 -0
  47. package/dist/browser/browser-adapter.mjs +269 -0
  48. package/dist/browser/browser-adapter.mjs.map +1 -0
  49. package/dist/cli/index.d.mts +241 -0
  50. package/dist/cli/index.d.ts +241 -0
  51. package/dist/cli/index.js +3734 -0
  52. package/dist/cli/index.js.map +1 -0
  53. package/dist/cli/index.mjs +3688 -0
  54. package/dist/cli/index.mjs.map +1 -0
  55. package/dist/cursor/cursor-adapter.d.mts +91 -0
  56. package/dist/cursor/cursor-adapter.d.ts +91 -0
  57. package/dist/cursor/cursor-adapter.js +273 -0
  58. package/dist/cursor/cursor-adapter.js.map +1 -0
  59. package/dist/cursor/cursor-adapter.mjs +246 -0
  60. package/dist/cursor/cursor-adapter.mjs.map +1 -0
  61. package/dist/cursor/extension.d.mts +27 -0
  62. package/dist/cursor/extension.d.ts +27 -0
  63. package/dist/cursor/extension.js +4057 -0
  64. package/dist/cursor/extension.js.map +1 -0
  65. package/dist/cursor/extension.mjs +4029 -0
  66. package/dist/cursor/extension.mjs.map +1 -0
  67. package/dist/{express-BGZiLINd.d.ts → express-Bcl-uBUE.d.ts} +1 -1
  68. package/dist/{express-BoayLpqq.d.mts → express-CtwDIZyF.d.mts} +1 -1
  69. package/dist/gateway/gateway.d.mts +70 -0
  70. package/dist/gateway/gateway.d.ts +70 -0
  71. package/dist/gateway/gateway.js +3726 -0
  72. package/dist/gateway/gateway.js.map +1 -0
  73. package/dist/gateway/gateway.mjs +3699 -0
  74. package/dist/gateway/gateway.mjs.map +1 -0
  75. package/dist/git-trigger/git-hooks.d.mts +69 -0
  76. package/dist/git-trigger/git-hooks.d.ts +69 -0
  77. package/dist/git-trigger/git-hooks.js +243 -0
  78. package/dist/git-trigger/git-hooks.js.map +1 -0
  79. package/dist/git-trigger/git-hooks.mjs +213 -0
  80. package/dist/git-trigger/git-hooks.mjs.map +1 -0
  81. package/dist/index-B1ThcGZl.d.mts +89 -0
  82. package/dist/index-BY8yQ8N8.d.mts +206 -0
  83. package/dist/index-CtYSYwn3.d.ts +206 -0
  84. package/dist/index-DnoXfdFd.d.ts +89 -0
  85. package/dist/index.d.mts +8 -295
  86. package/dist/index.d.ts +8 -295
  87. package/dist/index.js +215 -27
  88. package/dist/index.js.map +1 -1
  89. package/dist/index.mjs +215 -27
  90. package/dist/index.mjs.map +1 -1
  91. package/dist/local-evaluator/evaluator.d.mts +55 -0
  92. package/dist/local-evaluator/evaluator.d.ts +55 -0
  93. package/dist/local-evaluator/evaluator.js +272 -0
  94. package/dist/local-evaluator/evaluator.js.map +1 -0
  95. package/dist/local-evaluator/evaluator.mjs +244 -0
  96. package/dist/local-evaluator/evaluator.mjs.map +1 -0
  97. package/dist/{nextjs-BNbHm5Ui.d.mts → nextjs-BQyMCSx_.d.mts} +1 -1
  98. package/dist/{nextjs-DTCS5Sw8.d.ts → nextjs-CEldnIJ9.d.ts} +1 -1
  99. package/dist/{sdk-VAFRmdt7.d.mts → sdk-BhvuJSrH.d.mts} +3 -1
  100. package/dist/{sdk-9TKZzhxE.d.ts → sdk-BlyVSC_S.d.ts} +3 -1
  101. package/dist/transport/index.d.mts +2 -0
  102. package/dist/transport/index.d.ts +2 -0
  103. package/dist/transport/index.js +211 -0
  104. package/dist/transport/index.js.map +1 -0
  105. package/dist/transport/index.mjs +176 -0
  106. package/dist/transport/index.mjs.map +1 -0
  107. package/dist/types-79qS7aON.d.ts +153 -0
  108. package/dist/{types-cA_xfFU7.d.mts → types-CxQwJKbd.d.mts} +17 -2
  109. package/dist/{types-cA_xfFU7.d.ts → types-CxQwJKbd.d.ts} +17 -2
  110. package/dist/types-jJnPXStc.d.mts +153 -0
  111. package/dist/ui/index.d.mts +1 -1
  112. package/dist/ui/index.d.ts +1 -1
  113. package/package.json +48 -2
@@ -0,0 +1,153 @@
1
+ import { a as AccessLevel, C as CounterpartyType, T as TokenGuidance } from './types-CxQwJKbd.js';
2
+
3
+ /**
4
+ * AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
5
+ */
6
+ type GatewayMode = 'online' | 'local' | 'hybrid';
7
+ /**
8
+ * Posture controls whether the gateway actively blocks or just monitors.
9
+ * - active: Evaluate and enforce decisions (block/allow/review)
10
+ * - passive: Evaluate and log but never block (telemetry-only mode)
11
+ */
12
+ type GatewayPosture = 'active' | 'passive';
13
+ interface AstraSyncGatewayConfig {
14
+ mode: GatewayMode;
15
+ /** Enforcement posture: 'active' blocks actions, 'passive' logs only (default: 'active') */
16
+ posture?: GatewayPosture;
17
+ /** AstraSync API base URL (required for online/hybrid modes) */
18
+ apiBaseUrl?: string;
19
+ /** API key for authenticating with AstraSync (required for online/hybrid modes) */
20
+ apiKey?: string;
21
+ /** Path to local PDLSS policy YAML file (required for local/hybrid modes) */
22
+ policyFile?: string;
23
+ /** Inline policy object (alternative to policyFile) */
24
+ policy?: LocalPolicy;
25
+ /** Sync interval in seconds for hybrid mode (default: 3600) */
26
+ syncInterval?: number;
27
+ /** Cache verification results TTL in seconds (default: 300) */
28
+ cacheTtl?: number;
29
+ /** Enable debug logging */
30
+ debug?: boolean;
31
+ /** Enable trace logging to .astrasync/traces/ (default: false) */
32
+ traceEnabled?: boolean;
33
+ /** Trace log directory (default: .astrasync/traces/) */
34
+ tracePath?: string;
35
+ /** Default access level for unverified requests */
36
+ defaultAccessLevel?: AccessLevel;
37
+ /** Minimum trust score for standard access (online/hybrid) */
38
+ minTrustScore?: number;
39
+ /** Minimum trust score for full access (online/hybrid) */
40
+ minTrustScoreForFull?: number;
41
+ /** Custom headers to send with API requests */
42
+ customHeaders?: Record<string, string>;
43
+ /** Counterparty URL for analytics */
44
+ counterpartyUrl?: string;
45
+ /** Counterparty type for analytics */
46
+ counterpartyType?: CounterpartyType;
47
+ }
48
+ interface PDLSSContext {
49
+ /** Purpose category (e.g. email.send, shell.exec, file.read) */
50
+ purpose: string;
51
+ /** Specific action within purpose */
52
+ action: string;
53
+ /** Target resource, recipient, or counterparty */
54
+ target: string;
55
+ /** Types of data access (read, write, delete) */
56
+ dataAccess?: string[];
57
+ /** Network domains/IPs being accessed */
58
+ networkAccess?: string[];
59
+ /** Resource type (customer, order, file, directory, process) */
60
+ resourceType?: string;
61
+ /** Risk factors for this action */
62
+ riskFactors?: RiskFactor[];
63
+ /** Transaction value (if financial) */
64
+ transactionValue?: number;
65
+ /** Currency for transaction */
66
+ currency?: string;
67
+ /** Additional metadata */
68
+ metadata?: Record<string, unknown>;
69
+ }
70
+ interface RiskFactor {
71
+ type: 'financial' | 'data_sensitivity' | 'privilege_escalation' | 'network_scope' | 'destructive';
72
+ severity: 'low' | 'medium' | 'high' | 'critical';
73
+ detail: string;
74
+ }
75
+ interface VerificationDecision {
76
+ recommendation: 'ALLOW' | 'DENY' | 'MANUAL_REVIEW';
77
+ reason: string;
78
+ trustScore?: number;
79
+ tokenGuidance?: TokenGuidance;
80
+ sessionId?: string;
81
+ /** PDLSS dimensions that were evaluated */
82
+ evaluatedDimensions?: {
83
+ purpose: boolean;
84
+ scope: boolean;
85
+ limits: boolean;
86
+ riskThresholds: boolean;
87
+ };
88
+ }
89
+ interface LocalPolicy {
90
+ version: string;
91
+ name: string;
92
+ description?: string;
93
+ purposes: LocalPurposeRule[];
94
+ scope?: LocalScope;
95
+ limits?: LocalLimits;
96
+ riskThresholds?: LocalRiskThresholds;
97
+ selfInstantiation?: LocalSelfInstantiation;
98
+ }
99
+ interface LocalPurposeRule {
100
+ id: string;
101
+ allowed: boolean;
102
+ targets?: string[];
103
+ blockedPatterns?: string[];
104
+ requiresApproval?: boolean;
105
+ }
106
+ interface LocalScope {
107
+ allowedDomains?: string[];
108
+ blockedDomains?: string[];
109
+ blockedResources?: string[];
110
+ }
111
+ interface LocalLimits {
112
+ maxTransactionAmount?: number;
113
+ maxRequestsPerHour?: number;
114
+ currency?: string;
115
+ }
116
+ interface LocalRiskThresholds {
117
+ autoAllow: {
118
+ min: number;
119
+ max: number;
120
+ };
121
+ requireApproval: {
122
+ min: number;
123
+ max: number;
124
+ };
125
+ autoBlock: {
126
+ min: number;
127
+ max: number;
128
+ };
129
+ }
130
+ interface LocalSelfInstantiation {
131
+ /** Whether sub-agent spawning is allowed */
132
+ allowed: boolean;
133
+ /** Maximum depth of sub-agent chain */
134
+ maxDepth?: number;
135
+ }
136
+ interface AgentAction {
137
+ /** Raw action data from the platform */
138
+ raw: unknown;
139
+ /** Platform identifier (e.g. 'openclaw-cli', 'cursor', 'browser') */
140
+ platform: string;
141
+ /** Timestamp of the action */
142
+ timestamp: Date;
143
+ }
144
+ interface InterceptResult {
145
+ /** Whether the action was intercepted */
146
+ intercepted: boolean;
147
+ /** Extracted PDLSS context (if intercepted) */
148
+ context?: PDLSSContext;
149
+ /** Reason for not intercepting (if not intercepted) */
150
+ skipReason?: string;
151
+ }
152
+
153
+ export type { AgentAction as A, InterceptResult as I, LocalPolicy as L, PDLSSContext as P, VerificationDecision as V, LocalPurposeRule as a, AstraSyncGatewayConfig as b, LocalScope as c, LocalRiskThresholds as d };
@@ -208,6 +208,8 @@ interface VerificationRequest {
208
208
  counterpartyType?: CounterpartyType;
209
209
  /** Counterparty URL */
210
210
  counterpartyUrl?: string;
211
+ /** Requested session duration in seconds (from agent's X-Astra-Duration header) */
212
+ durationRequired?: number;
211
213
  /** Runtime challenge options */
212
214
  runtimeChallengeOptions?: {
213
215
  timeoutOverride?: number;
@@ -225,8 +227,17 @@ interface RouteAccessConfig {
225
227
  minAccessLevel: AccessLevel;
226
228
  /** Minimum trust score required (optional) */
227
229
  minTrustScore?: number;
228
- /** Required purposes (optional) */
230
+ /** Required purposes (optional, agent must declare one of these) */
229
231
  requiredPurposes?: string[];
232
+ /** Counterparty-defined PDLSS maximums — agent requests exceeding these are rejected before calling AstraSync */
233
+ /** Maximum session duration in seconds the counterparty will allow */
234
+ maxDuration?: number;
235
+ /** Whitelist of allowed purposes — agent's declared purpose must be in this list */
236
+ allowedPurposes?: string[];
237
+ /** Whitelist of allowed jurisdictions */
238
+ allowedJurisdictions?: string[];
239
+ /** Maximum transaction value for this route */
240
+ maxTransactionValue?: number;
230
241
  }
231
242
  /**
232
243
  * Express middleware options
@@ -244,6 +255,8 @@ interface ExpressMiddlewareOptions extends GatewayConfig {
244
255
  onDenied?: (result: VerificationResult, req: unknown, res: unknown) => void;
245
256
  /** Automatically create sessions and record grant/deny decisions (default: true) */
246
257
  recordDecisions?: boolean;
258
+ /** Enable runtime challenge for all verify-access calls (default: true) */
259
+ enableRuntimeChallenge?: boolean;
247
260
  }
248
261
  /**
249
262
  * Next.js middleware options
@@ -262,6 +275,8 @@ interface NextJsMiddlewareOptions extends GatewayConfig {
262
275
  allowGuestAccess?: boolean;
263
276
  guestAccessLevel?: AccessLevel;
264
277
  };
278
+ /** Enable runtime challenge for all verify-access calls (default: true) */
279
+ enableRuntimeChallenge?: boolean;
265
280
  }
266
281
  /**
267
282
  * SDK function options
@@ -364,4 +379,4 @@ interface CommerceShieldProps {
364
379
  className?: string;
365
380
  }
366
381
 
367
- export type { AgentCredentials as A, CommerceShieldProps as C, EnhancedVerificationResult as E, GatewayConfig as G, NextJsMiddlewareOptions as N, ProtocolTransport as P, RouteAccessConfig as R, SDKOptions as S, TokenGuidance as T, VerificationRequest as V, AccessLevel as a, VerificationResult as b, AstraSyncCredentials as c, CounterpartyType as d, ExpressMiddlewareOptions as e, GuidanceInfo as f, PDLSSInfo as g, RuntimeChallengeResult as h, TrustLevel as i, VerifiedAgent as j, VerifiedDeveloper as k, VerifiedOrganization as l };
382
+ export type { AstraSyncCredentials as A, CounterpartyType as C, ExpressMiddlewareOptions as E, GatewayConfig as G, NextJsMiddlewareOptions as N, PDLSSInfo as P, RouteAccessConfig as R, SDKOptions as S, TokenGuidance as T, VerificationResult as V, AccessLevel as a, AgentCredentials as b, VerificationRequest as c, CommerceShieldProps as d, EnhancedVerificationResult as e, GuidanceInfo as f, ProtocolTransport as g, RuntimeChallengeResult as h, TrustLevel as i, VerifiedAgent as j, VerifiedDeveloper as k, VerifiedOrganization as l };
@@ -208,6 +208,8 @@ interface VerificationRequest {
208
208
  counterpartyType?: CounterpartyType;
209
209
  /** Counterparty URL */
210
210
  counterpartyUrl?: string;
211
+ /** Requested session duration in seconds (from agent's X-Astra-Duration header) */
212
+ durationRequired?: number;
211
213
  /** Runtime challenge options */
212
214
  runtimeChallengeOptions?: {
213
215
  timeoutOverride?: number;
@@ -225,8 +227,17 @@ interface RouteAccessConfig {
225
227
  minAccessLevel: AccessLevel;
226
228
  /** Minimum trust score required (optional) */
227
229
  minTrustScore?: number;
228
- /** Required purposes (optional) */
230
+ /** Required purposes (optional, agent must declare one of these) */
229
231
  requiredPurposes?: string[];
232
+ /** Counterparty-defined PDLSS maximums — agent requests exceeding these are rejected before calling AstraSync */
233
+ /** Maximum session duration in seconds the counterparty will allow */
234
+ maxDuration?: number;
235
+ /** Whitelist of allowed purposes — agent's declared purpose must be in this list */
236
+ allowedPurposes?: string[];
237
+ /** Whitelist of allowed jurisdictions */
238
+ allowedJurisdictions?: string[];
239
+ /** Maximum transaction value for this route */
240
+ maxTransactionValue?: number;
230
241
  }
231
242
  /**
232
243
  * Express middleware options
@@ -244,6 +255,8 @@ interface ExpressMiddlewareOptions extends GatewayConfig {
244
255
  onDenied?: (result: VerificationResult, req: unknown, res: unknown) => void;
245
256
  /** Automatically create sessions and record grant/deny decisions (default: true) */
246
257
  recordDecisions?: boolean;
258
+ /** Enable runtime challenge for all verify-access calls (default: true) */
259
+ enableRuntimeChallenge?: boolean;
247
260
  }
248
261
  /**
249
262
  * Next.js middleware options
@@ -262,6 +275,8 @@ interface NextJsMiddlewareOptions extends GatewayConfig {
262
275
  allowGuestAccess?: boolean;
263
276
  guestAccessLevel?: AccessLevel;
264
277
  };
278
+ /** Enable runtime challenge for all verify-access calls (default: true) */
279
+ enableRuntimeChallenge?: boolean;
265
280
  }
266
281
  /**
267
282
  * SDK function options
@@ -364,4 +379,4 @@ interface CommerceShieldProps {
364
379
  className?: string;
365
380
  }
366
381
 
367
- export type { AgentCredentials as A, CommerceShieldProps as C, EnhancedVerificationResult as E, GatewayConfig as G, NextJsMiddlewareOptions as N, ProtocolTransport as P, RouteAccessConfig as R, SDKOptions as S, TokenGuidance as T, VerificationRequest as V, AccessLevel as a, VerificationResult as b, AstraSyncCredentials as c, CounterpartyType as d, ExpressMiddlewareOptions as e, GuidanceInfo as f, PDLSSInfo as g, RuntimeChallengeResult as h, TrustLevel as i, VerifiedAgent as j, VerifiedDeveloper as k, VerifiedOrganization as l };
382
+ export type { AstraSyncCredentials as A, CounterpartyType as C, ExpressMiddlewareOptions as E, GatewayConfig as G, NextJsMiddlewareOptions as N, PDLSSInfo as P, RouteAccessConfig as R, SDKOptions as S, TokenGuidance as T, VerificationResult as V, AccessLevel as a, AgentCredentials as b, VerificationRequest as c, CommerceShieldProps as d, EnhancedVerificationResult as e, GuidanceInfo as f, ProtocolTransport as g, RuntimeChallengeResult as h, TrustLevel as i, VerifiedAgent as j, VerifiedDeveloper as k, VerifiedOrganization as l };
@@ -0,0 +1,153 @@
1
+ import { a as AccessLevel, C as CounterpartyType, T as TokenGuidance } from './types-CxQwJKbd.mjs';
2
+
3
+ /**
4
+ * AstraSync Gateway - Types for gateway modes, local evaluation, and adapter interface.
5
+ */
6
+ type GatewayMode = 'online' | 'local' | 'hybrid';
7
+ /**
8
+ * Posture controls whether the gateway actively blocks or just monitors.
9
+ * - active: Evaluate and enforce decisions (block/allow/review)
10
+ * - passive: Evaluate and log but never block (telemetry-only mode)
11
+ */
12
+ type GatewayPosture = 'active' | 'passive';
13
+ interface AstraSyncGatewayConfig {
14
+ mode: GatewayMode;
15
+ /** Enforcement posture: 'active' blocks actions, 'passive' logs only (default: 'active') */
16
+ posture?: GatewayPosture;
17
+ /** AstraSync API base URL (required for online/hybrid modes) */
18
+ apiBaseUrl?: string;
19
+ /** API key for authenticating with AstraSync (required for online/hybrid modes) */
20
+ apiKey?: string;
21
+ /** Path to local PDLSS policy YAML file (required for local/hybrid modes) */
22
+ policyFile?: string;
23
+ /** Inline policy object (alternative to policyFile) */
24
+ policy?: LocalPolicy;
25
+ /** Sync interval in seconds for hybrid mode (default: 3600) */
26
+ syncInterval?: number;
27
+ /** Cache verification results TTL in seconds (default: 300) */
28
+ cacheTtl?: number;
29
+ /** Enable debug logging */
30
+ debug?: boolean;
31
+ /** Enable trace logging to .astrasync/traces/ (default: false) */
32
+ traceEnabled?: boolean;
33
+ /** Trace log directory (default: .astrasync/traces/) */
34
+ tracePath?: string;
35
+ /** Default access level for unverified requests */
36
+ defaultAccessLevel?: AccessLevel;
37
+ /** Minimum trust score for standard access (online/hybrid) */
38
+ minTrustScore?: number;
39
+ /** Minimum trust score for full access (online/hybrid) */
40
+ minTrustScoreForFull?: number;
41
+ /** Custom headers to send with API requests */
42
+ customHeaders?: Record<string, string>;
43
+ /** Counterparty URL for analytics */
44
+ counterpartyUrl?: string;
45
+ /** Counterparty type for analytics */
46
+ counterpartyType?: CounterpartyType;
47
+ }
48
+ interface PDLSSContext {
49
+ /** Purpose category (e.g. email.send, shell.exec, file.read) */
50
+ purpose: string;
51
+ /** Specific action within purpose */
52
+ action: string;
53
+ /** Target resource, recipient, or counterparty */
54
+ target: string;
55
+ /** Types of data access (read, write, delete) */
56
+ dataAccess?: string[];
57
+ /** Network domains/IPs being accessed */
58
+ networkAccess?: string[];
59
+ /** Resource type (customer, order, file, directory, process) */
60
+ resourceType?: string;
61
+ /** Risk factors for this action */
62
+ riskFactors?: RiskFactor[];
63
+ /** Transaction value (if financial) */
64
+ transactionValue?: number;
65
+ /** Currency for transaction */
66
+ currency?: string;
67
+ /** Additional metadata */
68
+ metadata?: Record<string, unknown>;
69
+ }
70
+ interface RiskFactor {
71
+ type: 'financial' | 'data_sensitivity' | 'privilege_escalation' | 'network_scope' | 'destructive';
72
+ severity: 'low' | 'medium' | 'high' | 'critical';
73
+ detail: string;
74
+ }
75
+ interface VerificationDecision {
76
+ recommendation: 'ALLOW' | 'DENY' | 'MANUAL_REVIEW';
77
+ reason: string;
78
+ trustScore?: number;
79
+ tokenGuidance?: TokenGuidance;
80
+ sessionId?: string;
81
+ /** PDLSS dimensions that were evaluated */
82
+ evaluatedDimensions?: {
83
+ purpose: boolean;
84
+ scope: boolean;
85
+ limits: boolean;
86
+ riskThresholds: boolean;
87
+ };
88
+ }
89
+ interface LocalPolicy {
90
+ version: string;
91
+ name: string;
92
+ description?: string;
93
+ purposes: LocalPurposeRule[];
94
+ scope?: LocalScope;
95
+ limits?: LocalLimits;
96
+ riskThresholds?: LocalRiskThresholds;
97
+ selfInstantiation?: LocalSelfInstantiation;
98
+ }
99
+ interface LocalPurposeRule {
100
+ id: string;
101
+ allowed: boolean;
102
+ targets?: string[];
103
+ blockedPatterns?: string[];
104
+ requiresApproval?: boolean;
105
+ }
106
+ interface LocalScope {
107
+ allowedDomains?: string[];
108
+ blockedDomains?: string[];
109
+ blockedResources?: string[];
110
+ }
111
+ interface LocalLimits {
112
+ maxTransactionAmount?: number;
113
+ maxRequestsPerHour?: number;
114
+ currency?: string;
115
+ }
116
+ interface LocalRiskThresholds {
117
+ autoAllow: {
118
+ min: number;
119
+ max: number;
120
+ };
121
+ requireApproval: {
122
+ min: number;
123
+ max: number;
124
+ };
125
+ autoBlock: {
126
+ min: number;
127
+ max: number;
128
+ };
129
+ }
130
+ interface LocalSelfInstantiation {
131
+ /** Whether sub-agent spawning is allowed */
132
+ allowed: boolean;
133
+ /** Maximum depth of sub-agent chain */
134
+ maxDepth?: number;
135
+ }
136
+ interface AgentAction {
137
+ /** Raw action data from the platform */
138
+ raw: unknown;
139
+ /** Platform identifier (e.g. 'openclaw-cli', 'cursor', 'browser') */
140
+ platform: string;
141
+ /** Timestamp of the action */
142
+ timestamp: Date;
143
+ }
144
+ interface InterceptResult {
145
+ /** Whether the action was intercepted */
146
+ intercepted: boolean;
147
+ /** Extracted PDLSS context (if intercepted) */
148
+ context?: PDLSSContext;
149
+ /** Reason for not intercepting (if not intercepted) */
150
+ skipReason?: string;
151
+ }
152
+
153
+ export type { AgentAction as A, InterceptResult as I, LocalPolicy as L, PDLSSContext as P, VerificationDecision as V, LocalPurposeRule as a, AstraSyncGatewayConfig as b, LocalScope as c, LocalRiskThresholds as d };
@@ -1,4 +1,4 @@
1
- import { C as CommerceShieldProps, b as VerificationResult, A as AgentCredentials, f as GuidanceInfo, i as TrustLevel } from '../types-cA_xfFU7.mjs';
1
+ import { d as CommerceShieldProps, V as VerificationResult, b as AgentCredentials, f as GuidanceInfo, i as TrustLevel } from '../types-CxQwJKbd.mjs';
2
2
 
3
3
  /**
4
4
  * AstraSync Commerce Shield Component
@@ -1,4 +1,4 @@
1
- import { C as CommerceShieldProps, b as VerificationResult, A as AgentCredentials, f as GuidanceInfo, i as TrustLevel } from '../types-cA_xfFU7.js';
1
+ import { d as CommerceShieldProps, V as VerificationResult, b as AgentCredentials, f as GuidanceInfo, i as TrustLevel } from '../types-CxQwJKbd.js';
2
2
 
3
3
  /**
4
4
  * AstraSync Commerce Shield Component
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrasyncai/verification-gateway",
3
- "version": "1.1.0",
3
+ "version": "2.0.1",
4
4
  "description": "Universal Verification Gateway for AstraSync KYA Platform - verify AI agents across any counterparty type",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -30,6 +30,51 @@
30
30
  "types": "./dist/ui/index.d.ts",
31
31
  "import": "./dist/ui/index.mjs",
32
32
  "require": "./dist/ui/index.js"
33
+ },
34
+ "./agent": {
35
+ "types": "./dist/agent/index.d.ts",
36
+ "import": "./dist/agent/index.mjs",
37
+ "require": "./dist/agent/index.js"
38
+ },
39
+ "./transport": {
40
+ "types": "./dist/transport/index.d.ts",
41
+ "import": "./dist/transport/index.mjs",
42
+ "require": "./dist/transport/index.js"
43
+ },
44
+ "./gateway": {
45
+ "types": "./dist/gateway/gateway.d.ts",
46
+ "import": "./dist/gateway/gateway.mjs",
47
+ "require": "./dist/gateway/gateway.js"
48
+ },
49
+ "./local-evaluator": {
50
+ "types": "./dist/local-evaluator/evaluator.d.ts",
51
+ "import": "./dist/local-evaluator/evaluator.mjs",
52
+ "require": "./dist/local-evaluator/evaluator.js"
53
+ },
54
+ "./adapter-interface": {
55
+ "types": "./dist/adapter-interface/interface.d.ts",
56
+ "import": "./dist/adapter-interface/interface.mjs",
57
+ "require": "./dist/adapter-interface/interface.js"
58
+ },
59
+ "./cli": {
60
+ "types": "./dist/cli/index.d.ts",
61
+ "import": "./dist/cli/index.mjs",
62
+ "require": "./dist/cli/index.js"
63
+ },
64
+ "./cursor": {
65
+ "types": "./dist/cursor/cursor-adapter.d.ts",
66
+ "import": "./dist/cursor/cursor-adapter.mjs",
67
+ "require": "./dist/cursor/cursor-adapter.js"
68
+ },
69
+ "./browser": {
70
+ "types": "./dist/browser/browser-adapter.d.ts",
71
+ "import": "./dist/browser/browser-adapter.mjs",
72
+ "require": "./dist/browser/browser-adapter.js"
73
+ },
74
+ "./git-trigger": {
75
+ "types": "./dist/git-trigger/git-hooks.d.ts",
76
+ "import": "./dist/git-trigger/git-hooks.mjs",
77
+ "require": "./dist/git-trigger/git-hooks.js"
33
78
  }
34
79
  },
35
80
  "files": [
@@ -43,7 +88,8 @@
43
88
  "typecheck": "tsc --noEmit",
44
89
  "test": "vitest run",
45
90
  "test:watch": "vitest watch",
46
- "clean": "rm -rf dist"
91
+ "clean": "rm -rf dist extensions",
92
+ "package:extensions": "bash scripts/package-extensions.sh"
47
93
  },
48
94
  "keywords": [
49
95
  "astrasync",