@astrasyncai/verification-gateway 5.17.1 → 5.18.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 (103) hide show
  1. package/CHANGELOG.md +1849 -0
  2. package/README.md +141 -7
  3. package/dist/adapters/express.d.mts +1 -1
  4. package/dist/adapters/express.d.ts +1 -1
  5. package/dist/adapters/express.js +30 -12
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +30 -12
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/kit-express.d.mts +63 -0
  10. package/dist/adapters/kit-express.d.ts +63 -0
  11. package/dist/adapters/kit-express.js +88 -0
  12. package/dist/adapters/kit-express.js.map +1 -0
  13. package/dist/adapters/kit-express.mjs +61 -0
  14. package/dist/adapters/kit-express.mjs.map +1 -0
  15. package/dist/adapters/mcp.d.mts +1 -1
  16. package/dist/adapters/mcp.d.ts +1 -1
  17. package/dist/adapters/mcp.js +1 -1
  18. package/dist/adapters/mcp.js.map +1 -1
  19. package/dist/adapters/mcp.mjs +1 -1
  20. package/dist/adapters/mcp.mjs.map +1 -1
  21. package/dist/adapters/nextjs.d.mts +1 -1
  22. package/dist/adapters/nextjs.d.ts +1 -1
  23. package/dist/adapters/nextjs.js +18 -8
  24. package/dist/adapters/nextjs.js.map +1 -1
  25. package/dist/adapters/nextjs.mjs +18 -8
  26. package/dist/adapters/nextjs.mjs.map +1 -1
  27. package/dist/adapters/sdk.d.mts +1 -1
  28. package/dist/adapters/sdk.d.ts +1 -1
  29. package/dist/adapters/sdk.js +1 -1
  30. package/dist/adapters/sdk.js.map +1 -1
  31. package/dist/adapters/sdk.mjs +1 -1
  32. package/dist/adapters/sdk.mjs.map +1 -1
  33. package/dist/agent/index.js +1 -1
  34. package/dist/agent/index.js.map +1 -1
  35. package/dist/agent/index.mjs +1 -1
  36. package/dist/agent/index.mjs.map +1 -1
  37. package/dist/bin/astrasync-claude-hook.js +1 -1
  38. package/dist/bin/astrasync-codex-hook.js +1 -1
  39. package/dist/bin/astrasync-guard.js +3 -1
  40. package/dist/bin/astrasync.js +21 -1
  41. package/dist/browser/background.js +1 -1
  42. package/dist/browser/background.js.map +1 -1
  43. package/dist/browser/background.mjs +1 -1
  44. package/dist/browser/background.mjs.map +1 -1
  45. package/dist/cli/index.js +1 -1
  46. package/dist/cli/index.js.map +1 -1
  47. package/dist/cli/index.mjs +1 -1
  48. package/dist/cli/index.mjs.map +1 -1
  49. package/dist/codex/index.js +1 -1
  50. package/dist/codex/index.js.map +1 -1
  51. package/dist/codex/index.mjs +1 -1
  52. package/dist/codex/index.mjs.map +1 -1
  53. package/dist/cursor/extension.js +1 -1
  54. package/dist/cursor/extension.js.map +1 -1
  55. package/dist/cursor/extension.mjs +1 -1
  56. package/dist/cursor/extension.mjs.map +1 -1
  57. package/dist/edge-config.d.mts +1 -1
  58. package/dist/edge-config.d.ts +1 -1
  59. package/dist/edge-config.js +1 -1
  60. package/dist/edge-config.js.map +1 -1
  61. package/dist/edge-config.mjs +1 -1
  62. package/dist/edge-config.mjs.map +1 -1
  63. package/dist/edge-core/index.d.mts +5 -4
  64. package/dist/edge-core/index.d.ts +5 -4
  65. package/dist/edge-core/index.js +18 -8
  66. package/dist/edge-core/index.js.map +1 -1
  67. package/dist/edge-core/index.mjs +18 -8
  68. package/dist/edge-core/index.mjs.map +1 -1
  69. package/dist/gateway/gateway.js +1 -1
  70. package/dist/gateway/gateway.js.map +1 -1
  71. package/dist/gateway/gateway.mjs +1 -1
  72. package/dist/gateway/gateway.mjs.map +1 -1
  73. package/dist/git-trigger/git-hooks.d.mts +1 -1
  74. package/dist/git-trigger/git-hooks.d.ts +1 -1
  75. package/dist/index.d.mts +390 -12
  76. package/dist/index.d.ts +390 -12
  77. package/dist/index.js +766 -230
  78. package/dist/index.js.map +1 -1
  79. package/dist/index.mjs +749 -222
  80. package/dist/index.mjs.map +1 -1
  81. package/dist/registration/index.js +1 -1
  82. package/dist/registration/index.js.map +1 -1
  83. package/dist/registration/index.mjs +1 -1
  84. package/dist/registration/index.mjs.map +1 -1
  85. package/dist/transport/index.d.mts +4 -3
  86. package/dist/transport/index.d.ts +4 -3
  87. package/dist/transport/index.js +1 -1
  88. package/dist/transport/index.js.map +1 -1
  89. package/dist/transport/index.mjs +1 -1
  90. package/dist/transport/index.mjs.map +1 -1
  91. package/dist/{types-vNBvYD7Z.d.mts → types-3ObBpsnf.d.mts} +7 -0
  92. package/dist/{types-DA8LzAOB.d.ts → types-BoxZEYPS.d.ts} +7 -0
  93. package/dist/{types-DRb_plOh.d.mts → types-Cns4l8gX.d.mts} +17 -0
  94. package/dist/{types-DRb_plOh.d.ts → types-Cns4l8gX.d.ts} +17 -0
  95. package/dist/ui/index.d.mts +1 -1
  96. package/dist/ui/index.d.ts +1 -1
  97. package/dist/verify.d.mts +1 -1
  98. package/dist/verify.d.ts +1 -1
  99. package/dist/verify.js +1 -1
  100. package/dist/verify.js.map +1 -1
  101. package/dist/verify.mjs +1 -1
  102. package/dist/verify.mjs.map +1 -1
  103. package/package.json +8 -2
@@ -285,6 +285,13 @@ interface StepUpApprovalInfo {
285
285
  */
286
286
  approvalUrl?: string;
287
287
  expiresAt: string;
288
+ /**
289
+ * 5.18.0: `'consumed'` when this verification just redeemed the approval
290
+ * (the purchase may proceed); `'pending'` (or absent) while the buyer
291
+ * still has to approve; `'approved'` when the buyer approved but the
292
+ * purchase can't settle yet (e.g. no payment method) — still held.
293
+ */
294
+ status?: 'pending' | 'approved' | 'consumed';
288
295
  }
289
296
  /**
290
297
  * Lifecycle states of a step-up approval row (mirrors the backend's
@@ -285,6 +285,13 @@ interface StepUpApprovalInfo {
285
285
  */
286
286
  approvalUrl?: string;
287
287
  expiresAt: string;
288
+ /**
289
+ * 5.18.0: `'consumed'` when this verification just redeemed the approval
290
+ * (the purchase may proceed); `'pending'` (or absent) while the buyer
291
+ * still has to approve; `'approved'` when the buyer approved but the
292
+ * purchase can't settle yet (e.g. no payment method) — still held.
293
+ */
294
+ status?: 'pending' | 'approved' | 'consumed';
288
295
  }
289
296
  /**
290
297
  * Lifecycle states of a step-up approval row (mirrors the backend's
@@ -343,6 +343,13 @@ interface StepUpApprovalInfo {
343
343
  */
344
344
  approvalUrl?: string;
345
345
  expiresAt: string;
346
+ /**
347
+ * 5.18.0: `'consumed'` when this verification just redeemed the approval
348
+ * (the purchase may proceed); `'pending'` (or absent) while the buyer
349
+ * still has to approve; `'approved'` when the buyer approved but the
350
+ * purchase can't settle yet (e.g. no payment method) — still held.
351
+ */
352
+ status?: 'pending' | 'approved' | 'consumed';
346
353
  }
347
354
  /**
348
355
  * Lifecycle states of a step-up approval row (mirrors the backend's
@@ -999,6 +1006,16 @@ interface ExpressMiddlewareOptions extends GatewayConfig {
999
1006
  * owner approves once. Any deny is still refused. Default: none.
1000
1007
  */
1001
1008
  approvalHeldByRoute?: (req: unknown) => boolean;
1009
+ /**
1010
+ * 5.18.0: what happens to a request no configured route matches.
1011
+ * `'pass'` (default): it passes unevaluated — unless
1012
+ * `evaluateAlwaysIfCredentialed` is set and the caller sent an X-Astra-Id,
1013
+ * in which case it's evaluated in observe mode. `'observe'`: any caller
1014
+ * presenting AstraSync credentials (X-Astra-Id, API key or JWT) is
1015
+ * evaluated in observe mode. Observe never vetoes: the request always
1016
+ * reaches your handler, with `req.agentVerification` populated.
1017
+ */
1018
+ defaultRoutePolicy?: 'pass' | 'observe';
1002
1019
  /**
1003
1020
  * Refresh interval (ms) for the remote-fetched route policy. Default:
1004
1021
  * 5 minutes. Operators can shorten this to test policy edits faster, or
@@ -343,6 +343,13 @@ interface StepUpApprovalInfo {
343
343
  */
344
344
  approvalUrl?: string;
345
345
  expiresAt: string;
346
+ /**
347
+ * 5.18.0: `'consumed'` when this verification just redeemed the approval
348
+ * (the purchase may proceed); `'pending'` (or absent) while the buyer
349
+ * still has to approve; `'approved'` when the buyer approved but the
350
+ * purchase can't settle yet (e.g. no payment method) — still held.
351
+ */
352
+ status?: 'pending' | 'approved' | 'consumed';
346
353
  }
347
354
  /**
348
355
  * Lifecycle states of a step-up approval row (mirrors the backend's
@@ -999,6 +1006,16 @@ interface ExpressMiddlewareOptions extends GatewayConfig {
999
1006
  * owner approves once. Any deny is still refused. Default: none.
1000
1007
  */
1001
1008
  approvalHeldByRoute?: (req: unknown) => boolean;
1009
+ /**
1010
+ * 5.18.0: what happens to a request no configured route matches.
1011
+ * `'pass'` (default): it passes unevaluated — unless
1012
+ * `evaluateAlwaysIfCredentialed` is set and the caller sent an X-Astra-Id,
1013
+ * in which case it's evaluated in observe mode. `'observe'`: any caller
1014
+ * presenting AstraSync credentials (X-Astra-Id, API key or JWT) is
1015
+ * evaluated in observe mode. Observe never vetoes: the request always
1016
+ * reaches your handler, with `req.agentVerification` populated.
1017
+ */
1018
+ defaultRoutePolicy?: 'pass' | 'observe';
1002
1019
  /**
1003
1020
  * Refresh interval (ms) for the remote-fetched route policy. Default:
1004
1021
  * 5 minutes. Operators can shorten this to test policy edits faster, or
@@ -1,4 +1,4 @@
1
- import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-DRb_plOh.mjs';
1
+ import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-Cns4l8gX.mjs';
2
2
 
3
3
  /**
4
4
  * AstraSync Verification Interstitial Component
@@ -1,4 +1,4 @@
1
- import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-DRb_plOh.js';
1
+ import { V as VerificationInterstitialProps, d as VerificationResult, A as AgentCredentials, b as GuidanceInfo, T as TrustLevel } from '../types-Cns4l8gX.js';
2
2
 
3
3
  /**
4
4
  * AstraSync Verification Interstitial Component
package/dist/verify.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-vNBvYD7Z.mjs';
1
+ import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-3ObBpsnf.mjs';
2
2
  import { ObservedMetadata } from './metadata-capture.mjs';
3
3
 
4
4
  /**
package/dist/verify.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-DA8LzAOB.js';
1
+ import { A as AgentCredentials, G as GatewayConfig, a as AttemptReport, V as VerificationRequest, c as VerificationResult } from './types-BoxZEYPS.js';
2
2
  import { ObservedMetadata } from './metadata-capture.js';
3
3
 
4
4
  /**
package/dist/verify.js CHANGED
@@ -37,7 +37,7 @@ __export(verify_exports, {
37
37
  module.exports = __toCommonJS(verify_exports);
38
38
 
39
39
  // src/version.ts
40
- var SDK_VERSION = "5.17.1";
40
+ var SDK_VERSION = "5.18.0";
41
41
 
42
42
  // src/http.ts
43
43
  var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;