@astrasyncai/verification-gateway 5.9.0 → 5.10.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 (71) hide show
  1. package/dist/adapters/express.js +19 -1
  2. package/dist/adapters/express.js.map +1 -1
  3. package/dist/adapters/express.mjs +19 -1
  4. package/dist/adapters/express.mjs.map +1 -1
  5. package/dist/adapters/mcp.js +19 -1
  6. package/dist/adapters/mcp.js.map +1 -1
  7. package/dist/adapters/mcp.mjs +19 -1
  8. package/dist/adapters/mcp.mjs.map +1 -1
  9. package/dist/adapters/nextjs.js +19 -1
  10. package/dist/adapters/nextjs.js.map +1 -1
  11. package/dist/adapters/nextjs.mjs +19 -1
  12. package/dist/adapters/nextjs.mjs.map +1 -1
  13. package/dist/adapters/sdk.js +19 -1
  14. package/dist/adapters/sdk.js.map +1 -1
  15. package/dist/adapters/sdk.mjs +19 -1
  16. package/dist/adapters/sdk.mjs.map +1 -1
  17. package/dist/agent/index.js +1 -1
  18. package/dist/agent/index.js.map +1 -1
  19. package/dist/agent/index.mjs +1 -1
  20. package/dist/agent/index.mjs.map +1 -1
  21. package/dist/bin/astrasync-claude-hook.js +19 -1
  22. package/dist/bin/astrasync-codex-hook.js +19 -1
  23. package/dist/bin/astrasync-guard.js +19 -1
  24. package/dist/bin/astrasync.js +19 -1
  25. package/dist/browser/background.js +19 -1
  26. package/dist/browser/background.js.map +1 -1
  27. package/dist/browser/background.mjs +19 -1
  28. package/dist/browser/background.mjs.map +1 -1
  29. package/dist/cli/index.js +1 -1
  30. package/dist/cli/index.js.map +1 -1
  31. package/dist/cli/index.mjs +1 -1
  32. package/dist/cli/index.mjs.map +1 -1
  33. package/dist/codex/index.js +19 -1
  34. package/dist/codex/index.js.map +1 -1
  35. package/dist/codex/index.mjs +19 -1
  36. package/dist/codex/index.mjs.map +1 -1
  37. package/dist/cursor/extension.js +19 -1
  38. package/dist/cursor/extension.js.map +1 -1
  39. package/dist/cursor/extension.mjs +19 -1
  40. package/dist/cursor/extension.mjs.map +1 -1
  41. package/dist/edge-config.js +1 -1
  42. package/dist/edge-config.js.map +1 -1
  43. package/dist/edge-config.mjs +1 -1
  44. package/dist/edge-config.mjs.map +1 -1
  45. package/dist/edge-core/index.js +20 -2
  46. package/dist/edge-core/index.js.map +1 -1
  47. package/dist/edge-core/index.mjs +20 -2
  48. package/dist/edge-core/index.mjs.map +1 -1
  49. package/dist/gateway/gateway.js +19 -1
  50. package/dist/gateway/gateway.js.map +1 -1
  51. package/dist/gateway/gateway.mjs +19 -1
  52. package/dist/gateway/gateway.mjs.map +1 -1
  53. package/dist/index.d.mts +2 -2
  54. package/dist/index.d.ts +2 -2
  55. package/dist/index.js +19 -1
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.mjs +19 -1
  58. package/dist/index.mjs.map +1 -1
  59. package/dist/registration/index.js +1 -1
  60. package/dist/registration/index.js.map +1 -1
  61. package/dist/registration/index.mjs +1 -1
  62. package/dist/registration/index.mjs.map +1 -1
  63. package/dist/transport/index.js +1 -1
  64. package/dist/transport/index.js.map +1 -1
  65. package/dist/transport/index.mjs +1 -1
  66. package/dist/transport/index.mjs.map +1 -1
  67. package/dist/verify.js +19 -1
  68. package/dist/verify.js.map +1 -1
  69. package/dist/verify.mjs +19 -1
  70. package/dist/verify.mjs.map +1 -1
  71. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -4832,7 +4832,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
4832
4832
  * silently (never throwing), so this is a no-op there — which is correct:
4833
4833
  * in a browser the page's real UA is the honest identity.
4834
4834
  */
4835
- declare const SDK_USER_AGENT = "astrasync-sdk/5.9.0";
4835
+ declare const SDK_USER_AGENT = "astrasync-sdk/5.10.0";
4836
4836
  declare const sdkFetch: typeof fetch;
4837
4837
 
4838
4838
  /**
@@ -4853,6 +4853,6 @@ declare const sdkFetch: typeof fetch;
4853
4853
  * is fine — bumping both in the release-ceremony commit keeps them
4854
4854
  * lockstep.
4855
4855
  */
4856
- declare const SDK_VERSION = "5.9.0";
4856
+ declare const SDK_VERSION = "5.10.0";
4857
4857
 
4858
4858
  export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, clearCache, createMcpMiddleware, degradeToObserve, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, normalizeDeclaredSource, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, verify };
package/dist/index.d.ts CHANGED
@@ -4832,7 +4832,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
4832
4832
  * silently (never throwing), so this is a no-op there — which is correct:
4833
4833
  * in a browser the page's real UA is the honest identity.
4834
4834
  */
4835
- declare const SDK_USER_AGENT = "astrasync-sdk/5.9.0";
4835
+ declare const SDK_USER_AGENT = "astrasync-sdk/5.10.0";
4836
4836
  declare const sdkFetch: typeof fetch;
4837
4837
 
4838
4838
  /**
@@ -4853,6 +4853,6 @@ declare const sdkFetch: typeof fetch;
4853
4853
  * is fine — bumping both in the release-ceremony commit keeps them
4854
4854
  * lockstep.
4855
4855
  */
4856
- declare const SDK_VERSION = "5.9.0";
4856
+ declare const SDK_VERSION = "5.10.0";
4857
4857
 
4858
4858
  export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, clearCache, createMcpMiddleware, degradeToObserve, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, normalizeDeclaredSource, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, verify };
package/dist/index.js CHANGED
@@ -114,7 +114,7 @@ function getTrustLevel(score) {
114
114
  }
115
115
 
116
116
  // src/version.ts
117
- var SDK_VERSION = "5.9.0";
117
+ var SDK_VERSION = "5.10.0";
118
118
 
119
119
  // src/http.ts
120
120
  var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
@@ -525,6 +525,24 @@ async function callVerifyAccessAPI(config, request) {
525
525
  }
526
526
  };
527
527
  }
528
+ if (response.status === 400 && data?.error === "INVALID_AGENT_ID") {
529
+ const message = typeof data?.message === "string" ? data.message : "Agent identifier must be a canonical ASTRA-* id.";
530
+ return {
531
+ success: true,
532
+ attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
533
+ access: {
534
+ allowed: false,
535
+ reason: "invalid_agent_id",
536
+ failures: [
537
+ {
538
+ dimension: "identity.invalid_agent_id",
539
+ message,
540
+ guidance: typeof data?.guidance === "string" ? data.guidance : "Present your canonical ASTRA-* id (discover it via GET /api/agents/request-registration/{requestId} after owner approval)."
541
+ }
542
+ ]
543
+ }
544
+ };
545
+ }
528
546
  if (!response.ok) {
529
547
  if (response.status === 401) {
530
548
  return {