@astrasyncai/verification-gateway 5.4.0 → 5.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/dist/adapter-interface/interface.d.mts +2 -3
  2. package/dist/adapter-interface/interface.d.ts +2 -3
  3. package/dist/adapters/express.d.mts +63 -4
  4. package/dist/adapters/express.d.ts +63 -4
  5. package/dist/adapters/express.js +9 -2
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +9 -2
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/mcp.d.mts +396 -4
  10. package/dist/adapters/mcp.d.ts +396 -4
  11. package/dist/adapters/mcp.js +9 -2
  12. package/dist/adapters/mcp.js.map +1 -1
  13. package/dist/adapters/mcp.mjs +9 -2
  14. package/dist/adapters/mcp.mjs.map +1 -1
  15. package/dist/adapters/nextjs.d.mts +22 -4
  16. package/dist/adapters/nextjs.d.ts +22 -4
  17. package/dist/adapters/nextjs.js +9 -2
  18. package/dist/adapters/nextjs.js.map +1 -1
  19. package/dist/adapters/nextjs.mjs +9 -2
  20. package/dist/adapters/nextjs.mjs.map +1 -1
  21. package/dist/adapters/sdk.d.mts +157 -3
  22. package/dist/adapters/sdk.d.ts +157 -3
  23. package/dist/adapters/sdk.js +35 -15
  24. package/dist/adapters/sdk.js.map +1 -1
  25. package/dist/adapters/sdk.mjs +35 -15
  26. package/dist/adapters/sdk.mjs.map +1 -1
  27. package/dist/agent/index.d.mts +224 -3
  28. package/dist/agent/index.d.ts +224 -3
  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 +9 -2
  34. package/dist/bin/astrasync-codex-hook.js +9 -2
  35. package/dist/bin/astrasync-guard.js +9 -2
  36. package/dist/bin/astrasync.js +9 -2
  37. package/dist/browser/background.js +9 -2
  38. package/dist/browser/background.js.map +1 -1
  39. package/dist/browser/background.mjs +9 -2
  40. package/dist/browser/background.mjs.map +1 -1
  41. package/dist/browser/browser-adapter.d.mts +1 -5
  42. package/dist/browser/browser-adapter.d.ts +1 -5
  43. package/dist/claude-code/claude-code-adapter.d.mts +1 -5
  44. package/dist/claude-code/claude-code-adapter.d.ts +1 -5
  45. package/dist/cli/index.d.mts +1 -5
  46. package/dist/cli/index.d.ts +1 -5
  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 +1 -5
  52. package/dist/codex/index.d.ts +1 -5
  53. package/dist/codex/index.js +9 -2
  54. package/dist/codex/index.js.map +1 -1
  55. package/dist/codex/index.mjs +9 -2
  56. package/dist/codex/index.mjs.map +1 -1
  57. package/dist/cursor/cursor-adapter.d.mts +1 -5
  58. package/dist/cursor/cursor-adapter.d.ts +1 -5
  59. package/dist/cursor/extension.d.mts +1 -5
  60. package/dist/cursor/extension.d.ts +1 -5
  61. package/dist/cursor/extension.js +9 -2
  62. package/dist/cursor/extension.js.map +1 -1
  63. package/dist/cursor/extension.mjs +9 -2
  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 +1 -1
  72. package/dist/edge-core/index.d.ts +1 -1
  73. package/dist/edge-core/index.js +9 -2
  74. package/dist/edge-core/index.js.map +1 -1
  75. package/dist/edge-core/index.mjs +9 -2
  76. package/dist/edge-core/index.mjs.map +1 -1
  77. package/dist/gateway/gateway.d.mts +2 -3
  78. package/dist/gateway/gateway.d.ts +2 -3
  79. package/dist/gateway/gateway.js +9 -2
  80. package/dist/gateway/gateway.js.map +1 -1
  81. package/dist/gateway/gateway.mjs +9 -2
  82. package/dist/gateway/gateway.mjs.map +1 -1
  83. package/dist/git-trigger/git-hooks.d.mts +253 -3
  84. package/dist/git-trigger/git-hooks.d.ts +253 -3
  85. package/dist/index.d.mts +4506 -42
  86. package/dist/index.d.ts +4506 -42
  87. package/dist/index.js +35 -15
  88. package/dist/index.js.map +1 -1
  89. package/dist/index.mjs +35 -15
  90. package/dist/index.mjs.map +1 -1
  91. package/dist/interface-q1WrMsB1.d.mts +365 -0
  92. package/dist/interface-q1WrMsB1.d.ts +365 -0
  93. package/dist/local-evaluator/evaluator.d.mts +2 -3
  94. package/dist/local-evaluator/evaluator.d.ts +2 -3
  95. package/dist/registration/index.js +1 -1
  96. package/dist/registration/index.js.map +1 -1
  97. package/dist/registration/index.mjs +1 -1
  98. package/dist/registration/index.mjs.map +1 -1
  99. package/dist/transport/index.d.mts +1324 -4
  100. package/dist/transport/index.d.ts +1324 -4
  101. package/dist/transport/index.js +1 -1
  102. package/dist/transport/index.js.map +1 -1
  103. package/dist/transport/index.mjs +1 -1
  104. package/dist/transport/index.mjs.map +1 -1
  105. package/dist/{types-DGh2akuh.d.ts → types-BRz2U0Pn.d.ts} +2 -2
  106. package/dist/{types-76TB0fxW.d.ts → types-BU04qAAR.d.mts} +59 -213
  107. package/dist/{types-CD1F9fmp.d.mts → types-BU04qAAR.d.ts} +59 -213
  108. package/dist/types-Bd2O3eX1.d.mts +769 -0
  109. package/dist/types-BfILnheI.d.mts +189 -0
  110. package/dist/types-BfILnheI.d.ts +189 -0
  111. package/dist/{types-z_RNjHWm.d.mts → types-CfBpm3w5.d.mts} +2 -2
  112. package/dist/types-DMChboN_.d.ts +769 -0
  113. package/dist/ui/index.d.mts +1 -2
  114. package/dist/ui/index.d.ts +1 -2
  115. package/dist/verify.d.mts +1 -1
  116. package/dist/verify.d.ts +1 -1
  117. package/dist/verify.js +9 -2
  118. package/dist/verify.js.map +1 -1
  119. package/dist/verify.mjs +9 -2
  120. package/dist/verify.mjs.map +1 -1
  121. package/package.json +1 -1
  122. package/dist/express-BIAT2pe0.d.mts +0 -69
  123. package/dist/express-D3Tf-b23.d.ts +0 -69
  124. package/dist/index-BVJkTyIF.d.mts +0 -248
  125. package/dist/index-By021oSN.d.mts +0 -1469
  126. package/dist/index-DaMXZabg.d.ts +0 -248
  127. package/dist/index-iJ9_DdLk.d.ts +0 -1469
  128. package/dist/mcp-BqfTDZLh.d.mts +0 -397
  129. package/dist/mcp-OrVOrH-s.d.ts +0 -397
  130. package/dist/nextjs-DGJXzWst.d.mts +0 -28
  131. package/dist/nextjs-xM-jdNrX.d.ts +0 -28
  132. package/dist/sdk-C1IOA5LE.d.ts +0 -173
  133. package/dist/sdk-C6_-6D-9.d.mts +0 -173
@@ -1,173 +0,0 @@
1
- import { v as TrustLevel, S as SDKOptions, x as VerificationResult, w as VerificationRequest } from './types-CD1F9fmp.mjs';
2
-
3
- /**
4
- * AstraSync Universal Verification Gateway — Trust Level helpers.
5
- *
6
- * SDK 5.0.0: the `accessLevel` band (`none`/`restricted`/`read-only`/`standard`/
7
- * `full`/`internal`) was removed entirely — it never gated the access decision
8
- * (the server does, from a verified ID + runtime challenge + PDLSS match + trust
9
- * score). What remains here is the coarse trust-level badge derived from the
10
- * numeric trust score, used only for display.
11
- */
12
-
13
- /**
14
- * Trust level score ranges
15
- */
16
- declare const TRUST_LEVEL_RANGES: Record<TrustLevel, {
17
- min: number;
18
- max: number;
19
- }>;
20
- /**
21
- * Determine trust level from score
22
- */
23
- declare function getTrustLevel(score: number): TrustLevel;
24
-
25
- /**
26
- * AstraSync Universal Verification Gateway - SDK Adapter
27
- *
28
- * Direct SDK for verifying agents in any JavaScript/TypeScript environment.
29
- * Useful for agent-to-agent verification, serverless functions, or custom integrations.
30
- *
31
- * @example
32
- * ```typescript
33
- * import { createClient } from '@astrasyncai/verification-gateway/sdk';
34
- *
35
- * const gateway = createClient({
36
- * apiBaseUrl: 'https://astrasync.ai/api',
37
- * });
38
- *
39
- * // Verify another agent before interacting
40
- * const result = await gateway.verify({
41
- * astraId: 'ASTRA-abc123',
42
- * purpose: 'data-exchange',
43
- * });
44
- *
45
- * if (result.identityVerified && result.policyAllowed) {
46
- * // Safe to interact with this agent
47
- * }
48
- * ```
49
- */
50
-
51
- /**
52
- * Verification Gateway SDK Client
53
- */
54
- declare class VerificationGatewayClient {
55
- private config;
56
- private timeout;
57
- private retryConfig;
58
- constructor(options: SDKOptions);
59
- /**
60
- * Full verification with all details
61
- */
62
- verify(options: {
63
- astraId?: string;
64
- apiKey?: string;
65
- jwt?: string;
66
- purpose?: string;
67
- action?: string;
68
- resourceType?: string;
69
- resource?: string;
70
- jurisdiction?: string;
71
- transactionValue?: number;
72
- currency?: string;
73
- isSubAgentRequest?: boolean;
74
- parentAgentId?: string;
75
- subAgentDepth?: number;
76
- counterpartyUrl?: string;
77
- counterpartyType?: string;
78
- }): Promise<VerificationResult>;
79
- /**
80
- * 5.4.0 (astra-pay): confirm-leg of a checkout — the ONLY call that may fire
81
- * first-party charge-at-redeem (server-side settlement on the owner's saved
82
- * instrument). This is the supported public surface for the confirm leg;
83
- * `verify()` deliberately does not expose the checkout fields, so settlement
84
- * can never fire by accident from a generic verify.
85
- *
86
- * Sends `commercePhase: 'confirm'` plus the checkout session id (per-cart
87
- * idempotency) and line items (order/receipt plane), and identifies the
88
- * merchant via `counterpartyUrl`/`counterpartyType` (required — the backend
89
- * only settles a merchant-mediated grant against a first-party storefront).
90
- * `purpose`/`action` default to the canonical shopping pair.
91
- *
92
- * Returns the full `VerificationResult`: read `.settlementOutcome` for the
93
- * settled/failed/requires_action/no_instrument outcome (+ `orderId`), and the
94
- * identity/policy/`failures` fields for a denial. On any non-`confirm`/first-
95
- * party path `settlementOutcome` is simply absent — no money moves.
96
- */
97
- confirmCheckout(options: {
98
- astraId?: string;
99
- apiKey?: string;
100
- jwt?: string;
101
- purpose?: string;
102
- action?: string;
103
- transactionValue?: number;
104
- currency?: string;
105
- checkoutSessionId?: string;
106
- checkoutItems?: VerificationRequest['checkoutItems'];
107
- counterpartyUrl?: string;
108
- counterpartyType?: string;
109
- }): Promise<VerificationResult>;
110
- /**
111
- * Quick verification — checks credentials and policy in one call.
112
- *
113
- * The return shape mirrors `VerificationResult`'s identity/policy
114
- * split. Map to HTTP status the same way: `!identityVerified` → 401,
115
- * `identityVerified && !policyAllowed` → 403.
116
- */
117
- quickVerify(credentials: {
118
- astraId?: string;
119
- apiKey?: string;
120
- jwt?: string;
121
- }): Promise<{
122
- identityVerified: boolean;
123
- policyAllowed: boolean;
124
- reason?: string;
125
- }>;
126
- /**
127
- * Verify a specific ASTRA-ID
128
- */
129
- verifyAstraId(astraId: string, options?: {
130
- purpose?: string;
131
- action?: string;
132
- }): Promise<VerificationResult>;
133
- /**
134
- * Verify using an API key
135
- */
136
- verifyApiKey(apiKey: string, options?: {
137
- purpose?: string;
138
- action?: string;
139
- }): Promise<VerificationResult>;
140
- /**
141
- * Clear the verification cache
142
- */
143
- clearCache(): void;
144
- /**
145
- * Execute a function with retry logic
146
- */
147
- private executeWithRetry;
148
- }
149
- /**
150
- * Create a new SDK client
151
- */
152
- declare function createClient(options: SDKOptions): VerificationGatewayClient;
153
- /**
154
- * One-shot verification without creating a client
155
- */
156
- declare function verifyOnce(options: SDKOptions & {
157
- astraId?: string;
158
- apiKey?: string;
159
- jwt?: string;
160
- purpose?: string;
161
- action?: string;
162
- }): Promise<VerificationResult>;
163
-
164
- type sdk_VerificationGatewayClient = VerificationGatewayClient;
165
- declare const sdk_VerificationGatewayClient: typeof VerificationGatewayClient;
166
- declare const sdk_createClient: typeof createClient;
167
- declare const sdk_getTrustLevel: typeof getTrustLevel;
168
- declare const sdk_verifyOnce: typeof verifyOnce;
169
- declare namespace sdk {
170
- export { sdk_VerificationGatewayClient as VerificationGatewayClient, sdk_createClient as createClient, sdk_getTrustLevel as getTrustLevel, sdk_verifyOnce as verifyOnce };
171
- }
172
-
173
- export { TRUST_LEVEL_RANGES as T, VerificationGatewayClient as V, createClient as c, getTrustLevel as g, sdk as s, verifyOnce as v };