@astrasyncai/verification-gateway 3.4.0 → 3.6.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 (84) hide show
  1. package/README.md +102 -0
  2. package/dist/adapter-interface/interface.d.mts +2 -2
  3. package/dist/adapter-interface/interface.d.ts +2 -2
  4. package/dist/adapters/express.d.mts +2 -2
  5. package/dist/adapters/express.d.ts +2 -2
  6. package/dist/adapters/express.js +113 -20
  7. package/dist/adapters/express.js.map +1 -1
  8. package/dist/adapters/express.mjs +113 -20
  9. package/dist/adapters/express.mjs.map +1 -1
  10. package/dist/adapters/mcp.d.mts +1 -1
  11. package/dist/adapters/mcp.d.ts +1 -1
  12. package/dist/adapters/mcp.js +96 -20
  13. package/dist/adapters/mcp.js.map +1 -1
  14. package/dist/adapters/mcp.mjs +96 -20
  15. package/dist/adapters/mcp.mjs.map +1 -1
  16. package/dist/adapters/nextjs.d.mts +2 -2
  17. package/dist/adapters/nextjs.d.ts +2 -2
  18. package/dist/adapters/nextjs.js +101 -20
  19. package/dist/adapters/nextjs.js.map +1 -1
  20. package/dist/adapters/nextjs.mjs +101 -20
  21. package/dist/adapters/nextjs.mjs.map +1 -1
  22. package/dist/adapters/sdk.d.mts +2 -2
  23. package/dist/adapters/sdk.d.ts +2 -2
  24. package/dist/adapters/sdk.js +19 -16
  25. package/dist/adapters/sdk.js.map +1 -1
  26. package/dist/adapters/sdk.mjs +19 -16
  27. package/dist/adapters/sdk.mjs.map +1 -1
  28. package/dist/agent/index.d.mts +2 -2
  29. package/dist/agent/index.d.ts +2 -2
  30. package/dist/browser/background.js +22 -16
  31. package/dist/browser/background.js.map +1 -1
  32. package/dist/browser/background.mjs +22 -16
  33. package/dist/browser/background.mjs.map +1 -1
  34. package/dist/browser/browser-adapter.d.mts +2 -2
  35. package/dist/browser/browser-adapter.d.ts +2 -2
  36. package/dist/cli/index.d.mts +2 -2
  37. package/dist/cli/index.d.ts +2 -2
  38. package/dist/cursor/cursor-adapter.d.mts +2 -2
  39. package/dist/cursor/cursor-adapter.d.ts +2 -2
  40. package/dist/cursor/extension.d.mts +2 -2
  41. package/dist/cursor/extension.d.ts +2 -2
  42. package/dist/cursor/extension.js +22 -16
  43. package/dist/cursor/extension.js.map +1 -1
  44. package/dist/cursor/extension.mjs +22 -16
  45. package/dist/cursor/extension.mjs.map +1 -1
  46. package/dist/{express-CeFvNWDD.d.mts → express-BnMO-H3y.d.mts} +1 -1
  47. package/dist/{express-RIh05wW2.d.ts → express-DQhDzNAt.d.ts} +1 -1
  48. package/dist/gateway/gateway.d.mts +2 -2
  49. package/dist/gateway/gateway.d.ts +2 -2
  50. package/dist/gateway/gateway.js +22 -16
  51. package/dist/gateway/gateway.js.map +1 -1
  52. package/dist/gateway/gateway.mjs +22 -16
  53. package/dist/gateway/gateway.mjs.map +1 -1
  54. package/dist/git-trigger/git-hooks.d.mts +2 -2
  55. package/dist/git-trigger/git-hooks.d.ts +2 -2
  56. package/dist/{index-DgVBEiwI.d.mts → index-BT_aRn-I.d.mts} +1 -1
  57. package/dist/{index-BYu1FKMy.d.ts → index-D8-dvUFA.d.ts} +1 -1
  58. package/dist/{index-Bw4FeHMY.d.mts → index-WHKq2v17.d.mts} +5 -1
  59. package/dist/{index-C-K0WCrk.d.ts → index-rftma0ln.d.ts} +5 -1
  60. package/dist/index.d.mts +55 -9
  61. package/dist/index.d.ts +55 -9
  62. package/dist/index.js +184 -34
  63. package/dist/index.js.map +1 -1
  64. package/dist/index.mjs +182 -34
  65. package/dist/index.mjs.map +1 -1
  66. package/dist/local-evaluator/evaluator.d.mts +2 -2
  67. package/dist/local-evaluator/evaluator.d.ts +2 -2
  68. package/dist/{nextjs-xciaMpsZ.d.mts → nextjs-DFKYhxe6.d.mts} +1 -1
  69. package/dist/{nextjs--xR9zbSJ.d.ts → nextjs-DPj7ZNlq.d.ts} +1 -1
  70. package/dist/{sdk-FP7xT9F8.d.ts → sdk-CAcHgB5x.d.ts} +1 -1
  71. package/dist/{sdk-CJYCLMI0.d.mts → sdk-Cy3wAmDt.d.mts} +1 -1
  72. package/dist/transport/index.d.mts +2 -2
  73. package/dist/transport/index.d.ts +2 -2
  74. package/dist/transport/index.js +22 -4
  75. package/dist/transport/index.js.map +1 -1
  76. package/dist/transport/index.mjs +22 -4
  77. package/dist/transport/index.mjs.map +1 -1
  78. package/dist/{types-Cj92yKeA.d.mts → types-B-ubjHER.d.mts} +1 -1
  79. package/dist/{types-DOeL-dIw.d.ts → types-Bgn5gxHQ.d.ts} +1 -1
  80. package/dist/{types-Cwrvo30g.d.mts → types-CKe8O0lR.d.mts} +65 -3
  81. package/dist/{types-Cwrvo30g.d.ts → types-CKe8O0lR.d.ts} +65 -3
  82. package/dist/ui/index.d.mts +1 -1
  83. package/dist/ui/index.d.ts +1 -1
  84. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { AstraSyncGateway } from '../gateway/gateway.mjs';
2
- import { V as VerificationDecision, P as PDLSSContext } from '../types-Cj92yKeA.mjs';
3
- import '../types-Cwrvo30g.mjs';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-B-ubjHER.mjs';
3
+ import '../types-CKe8O0lR.mjs';
4
4
 
5
5
  /**
6
6
  * Git Trigger — Enterprise git push / PR verification
@@ -1,6 +1,6 @@
1
1
  import { AstraSyncGateway } from '../gateway/gateway.js';
2
- import { V as VerificationDecision, P as PDLSSContext } from '../types-DOeL-dIw.js';
3
- import '../types-Cwrvo30g.js';
2
+ import { V as VerificationDecision, P as PDLSSContext } from '../types-Bgn5gxHQ.js';
3
+ import '../types-CKe8O0lR.js';
4
4
 
5
5
  /**
6
6
  * Git Trigger — Enterprise git push / PR verification
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, g as ProtocolTransport, G as GatewayConfig } from './types-Cwrvo30g.mjs';
1
+ import { c as AstraSyncCredentials, g as ProtocolTransport, G as GatewayConfig } from './types-CKe8O0lR.mjs';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, g as ProtocolTransport, G as GatewayConfig } from './types-Cwrvo30g.js';
1
+ import { c as AstraSyncCredentials, g as ProtocolTransport, G as GatewayConfig } from './types-CKe8O0lR.js';
2
2
 
3
3
  /**
4
4
  * AgentClient — Credential Presentation
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, g as ProtocolTransport } from './types-Cwrvo30g.mjs';
1
+ import { c as AstraSyncCredentials, g as ProtocolTransport } from './types-CKe8O0lR.mjs';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
@@ -96,6 +96,10 @@ interface TransactionValueContext {
96
96
  amount: number;
97
97
  currency: string;
98
98
  source: string;
99
+ /** When true, the amount is in raw atomic/minor units and could NOT be
100
+ * converted to major units (unknown token decimals). The limit engine
101
+ * must fail-closed — never compare raw units against major-unit limits. */
102
+ rawUnits?: boolean;
99
103
  }
100
104
  declare function extractUCPTransactionValue(input: {
101
105
  totals?: Array<{
@@ -1,4 +1,4 @@
1
- import { c as AstraSyncCredentials, g as ProtocolTransport } from './types-Cwrvo30g.js';
1
+ import { c as AstraSyncCredentials, g as ProtocolTransport } from './types-CKe8O0lR.js';
2
2
  import { JWK } from 'jose';
3
3
 
4
4
  /**
@@ -96,6 +96,10 @@ interface TransactionValueContext {
96
96
  amount: number;
97
97
  currency: string;
98
98
  source: string;
99
+ /** When true, the amount is in raw atomic/minor units and could NOT be
100
+ * converted to major units (unknown token decimals). The limit engine
101
+ * must fail-closed — never compare raw units against major-unit limits. */
102
+ rawUnits?: boolean;
99
103
  }
100
104
  declare function extractUCPTransactionValue(input: {
101
105
  totals?: Array<{
package/dist/index.d.mts CHANGED
@@ -1,12 +1,12 @@
1
- import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, V as VerificationRequest, l as VerificationResult, E as EnhancedVerificationResult, A as AccessFailure, j as StepUpApprovalInfo } from './types-Cwrvo30g.mjs';
2
- export { c as AstraSyncCredentials, C as CommerceShieldProps, d as CounterpartyType, e as ExpressMiddlewareOptions, f as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, g as ProtocolTransport, R as RouteAccessConfig, h as RuntimeChallengeResult, S as SDKOptions, i as SettlementArtifact, T as TokenGuidance, k as TrustLevel, m as VerifiedAgent, n as VerifiedDeveloper, o as VerifiedOrganization } from './types-Cwrvo30g.mjs';
3
- export { A as ACCESS_LEVEL_DESCRIPTIONS, a as ACCESS_LEVEL_HIERARCHY, b as AccessCapabilities, D as DEFAULT_TRUST_THRESHOLDS, T as TRUST_LEVEL_RANGES, d as determineAccessLevel, g as getAccessLevelForScore, e as getCapabilities, f as getTrustLevel, h as hasMinimumAccess, s as sdk } from './sdk-CJYCLMI0.mjs';
4
- export { e as express } from './express-CeFvNWDD.mjs';
5
- export { n as nextjs } from './nextjs-xciaMpsZ.mjs';
6
- export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-Bw4FeHMY.mjs';
1
+ import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, V as VerificationRequest, n as VerificationResult, j as StepUpApprovalInfo, l as StepUpOutcome, k as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-CKe8O0lR.mjs';
2
+ export { c as AstraSyncCredentials, C as CommerceShieldProps, d as CounterpartyType, e as ExpressMiddlewareOptions, f as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, g as ProtocolTransport, R as RouteAccessConfig, h as RuntimeChallengeResult, S as SDKOptions, i as SettlementArtifact, T as TokenGuidance, m as TrustLevel, o as VerifiedAgent, p as VerifiedDeveloper, q as VerifiedOrganization } from './types-CKe8O0lR.mjs';
3
+ export { A as ACCESS_LEVEL_DESCRIPTIONS, a as ACCESS_LEVEL_HIERARCHY, b as AccessCapabilities, D as DEFAULT_TRUST_THRESHOLDS, T as TRUST_LEVEL_RANGES, d as determineAccessLevel, g as getAccessLevelForScore, e as getCapabilities, f as getTrustLevel, h as hasMinimumAccess, s as sdk } from './sdk-Cy3wAmDt.mjs';
4
+ export { e as express } from './express-BnMO-H3y.mjs';
5
+ export { n as nextjs } from './nextjs-DFKYhxe6.mjs';
6
+ export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-WHKq2v17.mjs';
7
7
  export { McpMiddlewareOptions, ToolGateConfig, createMcpMiddleware } from './adapters/mcp.mjs';
8
8
  export { AgentProtocol, AgentRecord, AstraSync, AstraSyncConfig, AstraSyncError, AuthenticationError, BuildGuidanceParams, FrameworkConfig, GuidanceEnvelope, HealthResponse, KYDRequiredError, ModelConfig, PDLSSConfig, PDLSSDuration, PDLSSLimits, PDLSSPurpose, PDLSSScope, PDLSSSelfInstantiation, PendingRegistrationResponse, PollRegistrationResult, RegisterOptions, RegisterResult, RegistrationDeniedError, RegistrationExpiredError, RegistrationResponse, RegistrationTimeoutError, VerifyResponse, WaitForApprovalOptions, buildGuidance } from './registration/index.mjs';
9
- export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-DgVBEiwI.mjs';
9
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-BT_aRn-I.mjs';
10
10
  import 'express';
11
11
  import 'next/server';
12
12
  import 'jose';
@@ -30,10 +30,23 @@ declare function extractCredentials(headers: Record<string, string | string[] |
30
30
  * Check if credentials are present
31
31
  */
32
32
  declare function hasCredentials(credentials: AgentCredentials): boolean;
33
+ /**
34
+ * Options for a single verify() call (as opposed to GatewayConfig, which is
35
+ * per-gateway). Mirrors the Java SDK's `verify(request, bypassCache)`.
36
+ */
37
+ interface VerifyOptions {
38
+ /**
39
+ * Skip the cache READ for this call so the request is guaranteed to reach
40
+ * the backend (the result is still written to the cache if cacheable).
41
+ * Used by the step-up hold-and-poll retry: the re-verify after an approval
42
+ * must hit the server to redeem the single-use approval.
43
+ */
44
+ bypassCache?: boolean;
45
+ }
33
46
  /**
34
47
  * Main verification function
35
48
  */
36
- declare function verify(config: GatewayConfig, request: VerificationRequest): Promise<VerificationResult>;
49
+ declare function verify(config: GatewayConfig, request: VerificationRequest, options?: VerifyOptions): Promise<VerificationResult>;
37
50
  /**
38
51
  * Quick verification — checks credentials and policy in one call.
39
52
  *
@@ -50,6 +63,39 @@ declare function quickVerify(config: GatewayConfig, credentials: AgentCredential
50
63
  reason?: string;
51
64
  }>;
52
65
 
66
+ /**
67
+ * Step-up hold-and-poll (3.6.0) — the synchronous half of the MFA-style gate,
68
+ * mirroring the Java SDK's `awaitStepUpApproval` / `pollStepUpStatus`.
69
+ *
70
+ * A verify() that comes back step_up_required carries a `stepUpApproval`
71
+ * handle: `{ approvalId, pollUrl, expiresAt }`. The adapter HOLDS the original
72
+ * request, polls the approval status, and on 'approved' re-verifies the same
73
+ * request once (cache-bypassed) so the backend redeems the single-use approval
74
+ * and returns a grant. Any other terminal outcome falls into the adapter's
75
+ * normal fail-closed deny path.
76
+ *
77
+ * The poll endpoint is deliberately unauthenticated (it sits above the
78
+ * backend router's `authenticate` middleware): the unguessable UUIDv4
79
+ * approvalId is the capability token, and the route is rate-limited
80
+ * (60/min/IP). No Authorization header is sent.
81
+ */
82
+
83
+ /**
84
+ * One GET of the approval's poll endpoint. Returns the status string, or
85
+ * null on any error / non-2xx / unparsable body — the hold loop treats null
86
+ * as transient and just polls again.
87
+ */
88
+ declare function pollStepUpStatus(config: GatewayConfig, approval: StepUpApprovalInfo): Promise<StepUpApprovalStatus | null>;
89
+ /**
90
+ * Block until a pending step-up approval reaches a terminal state or the wait
91
+ * budget runs out. Returns the terminal status, or 'timeout'.
92
+ *
93
+ * Unknown non-pending statuses (a future backend state) still terminate the
94
+ * hold — they are returned as-is and land in the deny path, which is the safe
95
+ * reading of "not approved".
96
+ */
97
+ declare function awaitStepUpApproval(config: GatewayConfig, approval: StepUpApprovalInfo): Promise<StepUpOutcome>;
98
+
53
99
  /**
54
100
  * Settlement authorization — the value-aware, FAIL-CLOSED gate a direct merchant
55
101
  * MUST call before settling a priced cart (post-#447 partner round, finding #1).
@@ -156,4 +202,4 @@ declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCom
156
202
 
157
203
  declare const VERSION = "3.4.0";
158
204
 
159
- export { AccessLevel, AgentCredentials, EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, VERSION, VerificationRequest, VerificationResult, type WellKnownAgenticCommerce, authorizeSettlement, clearCache, extractCredentials, getCachedWellKnownUrls, getWellKnownUrls, hasCredentials, prefetchWellKnown, quickVerify, verify };
205
+ export { AccessLevel, AgentCredentials, EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, VERSION, VerificationRequest, VerificationResult, type VerifyOptions, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, clearCache, extractCredentials, getCachedWellKnownUrls, getWellKnownUrls, hasCredentials, pollStepUpStatus, prefetchWellKnown, quickVerify, verify };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, V as VerificationRequest, l as VerificationResult, E as EnhancedVerificationResult, A as AccessFailure, j as StepUpApprovalInfo } from './types-Cwrvo30g.js';
2
- export { c as AstraSyncCredentials, C as CommerceShieldProps, d as CounterpartyType, e as ExpressMiddlewareOptions, f as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, g as ProtocolTransport, R as RouteAccessConfig, h as RuntimeChallengeResult, S as SDKOptions, i as SettlementArtifact, T as TokenGuidance, k as TrustLevel, m as VerifiedAgent, n as VerifiedDeveloper, o as VerifiedOrganization } from './types-Cwrvo30g.js';
3
- export { A as ACCESS_LEVEL_DESCRIPTIONS, a as ACCESS_LEVEL_HIERARCHY, b as AccessCapabilities, D as DEFAULT_TRUST_THRESHOLDS, T as TRUST_LEVEL_RANGES, d as determineAccessLevel, g as getAccessLevelForScore, e as getCapabilities, f as getTrustLevel, h as hasMinimumAccess, s as sdk } from './sdk-FP7xT9F8.js';
4
- export { e as express } from './express-RIh05wW2.js';
5
- export { n as nextjs } from './nextjs--xR9zbSJ.js';
6
- export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-C-K0WCrk.js';
1
+ import { b as AgentCredentials, G as GatewayConfig, a as AccessLevel, V as VerificationRequest, n as VerificationResult, j as StepUpApprovalInfo, l as StepUpOutcome, k as StepUpApprovalStatus, E as EnhancedVerificationResult, A as AccessFailure } from './types-CKe8O0lR.js';
2
+ export { c as AstraSyncCredentials, C as CommerceShieldProps, d as CounterpartyType, e as ExpressMiddlewareOptions, f as GuidanceInfo, N as NextJsMiddlewareOptions, P as PDLSSInfo, g as ProtocolTransport, R as RouteAccessConfig, h as RuntimeChallengeResult, S as SDKOptions, i as SettlementArtifact, T as TokenGuidance, m as TrustLevel, o as VerifiedAgent, p as VerifiedDeveloper, q as VerifiedOrganization } from './types-CKe8O0lR.js';
3
+ export { A as ACCESS_LEVEL_DESCRIPTIONS, a as ACCESS_LEVEL_HIERARCHY, b as AccessCapabilities, D as DEFAULT_TRUST_THRESHOLDS, T as TRUST_LEVEL_RANGES, d as determineAccessLevel, g as getAccessLevelForScore, e as getCapabilities, f as getTrustLevel, h as hasMinimumAccess, s as sdk } from './sdk-CAcHgB5x.js';
4
+ export { e as express } from './express-DQhDzNAt.js';
5
+ export { n as nextjs } from './nextjs-DPj7ZNlq.js';
6
+ export { aR as extractMcpCredentials, bg as setMcpMeta, b1 as transport } from './index-rftma0ln.js';
7
7
  export { McpMiddlewareOptions, ToolGateConfig, createMcpMiddleware } from './adapters/mcp.js';
8
8
  export { AgentProtocol, AgentRecord, AstraSync, AstraSyncConfig, AstraSyncError, AuthenticationError, BuildGuidanceParams, FrameworkConfig, GuidanceEnvelope, HealthResponse, KYDRequiredError, ModelConfig, PDLSSConfig, PDLSSDuration, PDLSSLimits, PDLSSPurpose, PDLSSScope, PDLSSSelfInstantiation, PendingRegistrationResponse, PollRegistrationResult, RegisterOptions, RegisterResult, RegistrationDeniedError, RegistrationExpiredError, RegistrationResponse, RegistrationTimeoutError, VerifyResponse, WaitForApprovalOptions, buildGuidance } from './registration/index.js';
9
- export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-BYu1FKMy.js';
9
+ export { A as AgentClient, C as ChallengeHandler, i as agent, r as recordDecision } from './index-D8-dvUFA.js';
10
10
  import 'express';
11
11
  import 'next/server';
12
12
  import 'jose';
@@ -30,10 +30,23 @@ declare function extractCredentials(headers: Record<string, string | string[] |
30
30
  * Check if credentials are present
31
31
  */
32
32
  declare function hasCredentials(credentials: AgentCredentials): boolean;
33
+ /**
34
+ * Options for a single verify() call (as opposed to GatewayConfig, which is
35
+ * per-gateway). Mirrors the Java SDK's `verify(request, bypassCache)`.
36
+ */
37
+ interface VerifyOptions {
38
+ /**
39
+ * Skip the cache READ for this call so the request is guaranteed to reach
40
+ * the backend (the result is still written to the cache if cacheable).
41
+ * Used by the step-up hold-and-poll retry: the re-verify after an approval
42
+ * must hit the server to redeem the single-use approval.
43
+ */
44
+ bypassCache?: boolean;
45
+ }
33
46
  /**
34
47
  * Main verification function
35
48
  */
36
- declare function verify(config: GatewayConfig, request: VerificationRequest): Promise<VerificationResult>;
49
+ declare function verify(config: GatewayConfig, request: VerificationRequest, options?: VerifyOptions): Promise<VerificationResult>;
37
50
  /**
38
51
  * Quick verification — checks credentials and policy in one call.
39
52
  *
@@ -50,6 +63,39 @@ declare function quickVerify(config: GatewayConfig, credentials: AgentCredential
50
63
  reason?: string;
51
64
  }>;
52
65
 
66
+ /**
67
+ * Step-up hold-and-poll (3.6.0) — the synchronous half of the MFA-style gate,
68
+ * mirroring the Java SDK's `awaitStepUpApproval` / `pollStepUpStatus`.
69
+ *
70
+ * A verify() that comes back step_up_required carries a `stepUpApproval`
71
+ * handle: `{ approvalId, pollUrl, expiresAt }`. The adapter HOLDS the original
72
+ * request, polls the approval status, and on 'approved' re-verifies the same
73
+ * request once (cache-bypassed) so the backend redeems the single-use approval
74
+ * and returns a grant. Any other terminal outcome falls into the adapter's
75
+ * normal fail-closed deny path.
76
+ *
77
+ * The poll endpoint is deliberately unauthenticated (it sits above the
78
+ * backend router's `authenticate` middleware): the unguessable UUIDv4
79
+ * approvalId is the capability token, and the route is rate-limited
80
+ * (60/min/IP). No Authorization header is sent.
81
+ */
82
+
83
+ /**
84
+ * One GET of the approval's poll endpoint. Returns the status string, or
85
+ * null on any error / non-2xx / unparsable body — the hold loop treats null
86
+ * as transient and just polls again.
87
+ */
88
+ declare function pollStepUpStatus(config: GatewayConfig, approval: StepUpApprovalInfo): Promise<StepUpApprovalStatus | null>;
89
+ /**
90
+ * Block until a pending step-up approval reaches a terminal state or the wait
91
+ * budget runs out. Returns the terminal status, or 'timeout'.
92
+ *
93
+ * Unknown non-pending statuses (a future backend state) still terminate the
94
+ * hold — they are returned as-is and land in the deny path, which is the safe
95
+ * reading of "not approved".
96
+ */
97
+ declare function awaitStepUpApproval(config: GatewayConfig, approval: StepUpApprovalInfo): Promise<StepUpOutcome>;
98
+
53
99
  /**
54
100
  * Settlement authorization — the value-aware, FAIL-CLOSED gate a direct merchant
55
101
  * MUST call before settling a priced cart (post-#447 partner round, finding #1).
@@ -156,4 +202,4 @@ declare function getCachedWellKnownUrls(apiBaseUrl: string): WellKnownAgenticCom
156
202
 
157
203
  declare const VERSION = "3.4.0";
158
204
 
159
- export { AccessLevel, AgentCredentials, EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, VERSION, VerificationRequest, VerificationResult, type WellKnownAgenticCommerce, authorizeSettlement, clearCache, extractCredentials, getCachedWellKnownUrls, getWellKnownUrls, hasCredentials, prefetchWellKnown, quickVerify, verify };
205
+ export { AccessLevel, AgentCredentials, EnhancedVerificationResult, GatewayConfig, type SettlementDecision, type SettlementRequest, StepUpApprovalInfo, StepUpApprovalStatus, StepUpOutcome, VERSION, VerificationRequest, VerificationResult, type VerifyOptions, type WellKnownAgenticCommerce, authorizeSettlement, awaitStepUpApproval, clearCache, extractCredentials, getCachedWellKnownUrls, getWellKnownUrls, hasCredentials, pollStepUpStatus, prefetchWellKnown, quickVerify, verify };