@astrasyncai/verification-gateway 5.0.0 → 5.1.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 (107) hide show
  1. package/dist/adapter-interface/interface.d.mts +2 -2
  2. package/dist/adapter-interface/interface.d.ts +2 -2
  3. package/dist/adapters/express.d.mts +2 -2
  4. package/dist/adapters/express.d.ts +2 -2
  5. package/dist/adapters/express.js +19 -2
  6. package/dist/adapters/express.js.map +1 -1
  7. package/dist/adapters/express.mjs +19 -2
  8. package/dist/adapters/express.mjs.map +1 -1
  9. package/dist/adapters/mcp.d.mts +2 -2
  10. package/dist/adapters/mcp.d.ts +2 -2
  11. package/dist/adapters/mcp.js +19 -2
  12. package/dist/adapters/mcp.js.map +1 -1
  13. package/dist/adapters/mcp.mjs +19 -2
  14. package/dist/adapters/mcp.mjs.map +1 -1
  15. package/dist/adapters/nextjs.d.mts +2 -2
  16. package/dist/adapters/nextjs.d.ts +2 -2
  17. package/dist/adapters/nextjs.js +19 -2
  18. package/dist/adapters/nextjs.js.map +1 -1
  19. package/dist/adapters/nextjs.mjs +19 -2
  20. package/dist/adapters/nextjs.mjs.map +1 -1
  21. package/dist/adapters/sdk.d.mts +2 -2
  22. package/dist/adapters/sdk.d.ts +2 -2
  23. package/dist/adapters/sdk.js +19 -2
  24. package/dist/adapters/sdk.js.map +1 -1
  25. package/dist/adapters/sdk.mjs +19 -2
  26. package/dist/adapters/sdk.mjs.map +1 -1
  27. package/dist/agent/index.d.mts +2 -2
  28. package/dist/agent/index.d.ts +2 -2
  29. package/dist/bin/astrasync-claude-hook.js +19 -2
  30. package/dist/bin/astrasync-codex-hook.js +19 -2
  31. package/dist/bin/astrasync-guard.js +19 -2
  32. package/dist/bin/astrasync.js +19 -2
  33. package/dist/browser/background.js +19 -2
  34. package/dist/browser/background.js.map +1 -1
  35. package/dist/browser/background.mjs +19 -2
  36. package/dist/browser/background.mjs.map +1 -1
  37. package/dist/browser/browser-adapter.d.mts +2 -2
  38. package/dist/browser/browser-adapter.d.ts +2 -2
  39. package/dist/claude-code/claude-code-adapter.d.mts +2 -2
  40. package/dist/claude-code/claude-code-adapter.d.ts +2 -2
  41. package/dist/cli/index.d.mts +2 -2
  42. package/dist/cli/index.d.ts +2 -2
  43. package/dist/codex/index.d.mts +2 -2
  44. package/dist/codex/index.d.ts +2 -2
  45. package/dist/codex/index.js +19 -2
  46. package/dist/codex/index.js.map +1 -1
  47. package/dist/codex/index.mjs +19 -2
  48. package/dist/codex/index.mjs.map +1 -1
  49. package/dist/cursor/cursor-adapter.d.mts +2 -2
  50. package/dist/cursor/cursor-adapter.d.ts +2 -2
  51. package/dist/cursor/extension.d.mts +2 -2
  52. package/dist/cursor/extension.d.ts +2 -2
  53. package/dist/cursor/extension.js +19 -2
  54. package/dist/cursor/extension.js.map +1 -1
  55. package/dist/cursor/extension.mjs +19 -2
  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-core/index.d.mts +12 -1
  60. package/dist/edge-core/index.d.ts +12 -1
  61. package/dist/edge-core/index.js +36 -3
  62. package/dist/edge-core/index.js.map +1 -1
  63. package/dist/edge-core/index.mjs +36 -3
  64. package/dist/edge-core/index.mjs.map +1 -1
  65. package/dist/{express-Dm-snUuY.d.mts → express-KkBZBMqi.d.mts} +1 -1
  66. package/dist/{express-B5lWuemA.d.ts → express-xK8pRrmj.d.ts} +1 -1
  67. package/dist/gateway/gateway.d.mts +2 -2
  68. package/dist/gateway/gateway.d.ts +2 -2
  69. package/dist/gateway/gateway.js +19 -2
  70. package/dist/gateway/gateway.js.map +1 -1
  71. package/dist/gateway/gateway.mjs +19 -2
  72. package/dist/gateway/gateway.mjs.map +1 -1
  73. package/dist/git-trigger/git-hooks.d.mts +2 -2
  74. package/dist/git-trigger/git-hooks.d.ts +2 -2
  75. package/dist/{index-B5k_vUmK.d.mts → index-DIRzR5IS.d.mts} +1 -1
  76. package/dist/{index-y8xToocF.d.ts → index-DLQ4Rcuc.d.ts} +1 -1
  77. package/dist/{index-BOzM6xUq.d.mts → index-GPDn_EGI.d.mts} +1 -1
  78. package/dist/{index-dRfxUdFA.d.ts → index-Hnz5VyMR.d.ts} +1 -1
  79. package/dist/index.d.mts +12 -8
  80. package/dist/index.d.ts +12 -8
  81. package/dist/index.js +19 -2
  82. package/dist/index.js.map +1 -1
  83. package/dist/index.mjs +19 -2
  84. package/dist/index.mjs.map +1 -1
  85. package/dist/local-evaluator/evaluator.d.mts +2 -2
  86. package/dist/local-evaluator/evaluator.d.ts +2 -2
  87. package/dist/{mcp-OosmAcKf.d.ts → mcp-DPpu4xQz.d.ts} +1 -1
  88. package/dist/{mcp-DgsyQiQq.d.mts → mcp-Dju_Sr1o.d.mts} +1 -1
  89. package/dist/{nextjs-B1sBdEav.d.mts → nextjs-BuoDBN4g.d.mts} +1 -1
  90. package/dist/{nextjs-DoRmhV_Z.d.ts → nextjs-rZKzY_8o.d.ts} +1 -1
  91. package/dist/{sdk-B83N3xKc.d.mts → sdk-CdO6TIEf.d.mts} +1 -1
  92. package/dist/{sdk-H_9BTNBS.d.ts → sdk-DxHuIJBm.d.ts} +1 -1
  93. package/dist/transport/index.d.mts +2 -2
  94. package/dist/transport/index.d.ts +2 -2
  95. package/dist/{types-CXf3q4kZ.d.ts → types-3UV7IZx7.d.ts} +1 -1
  96. package/dist/{types-BK2POWNc.d.ts → types-CNBaZKxY.d.ts} +9 -0
  97. package/dist/{types-CJjZvPr9.d.mts → types-CSHcByFX.d.mts} +9 -0
  98. package/dist/{types-DQmop7ZW.d.mts → types-CoDjpbVY.d.mts} +1 -1
  99. package/dist/ui/index.d.mts +1 -1
  100. package/dist/ui/index.d.ts +1 -1
  101. package/dist/verify.d.mts +1 -1
  102. package/dist/verify.d.ts +1 -1
  103. package/dist/verify.js +19 -2
  104. package/dist/verify.js.map +1 -1
  105. package/dist/verify.mjs +19 -2
  106. package/dist/verify.mjs.map +1 -1
  107. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { RequestHandler, Request } from 'express';
2
- import { w as VerificationResult, j as ExpressMiddlewareOptions, b as AstraSyncCredentials } from './types-CJjZvPr9.mjs';
2
+ import { w as VerificationResult, j as ExpressMiddlewareOptions, b as AstraSyncCredentials } from './types-CSHcByFX.mjs';
3
3
 
4
4
  /**
5
5
  * AstraSync Universal Verification Gateway - Express Middleware
@@ -1,5 +1,5 @@
1
1
  import { RequestHandler, Request } from 'express';
2
- import { w as VerificationResult, j as ExpressMiddlewareOptions, b as AstraSyncCredentials } from './types-BK2POWNc.js';
2
+ import { w as VerificationResult, j as ExpressMiddlewareOptions, b as AstraSyncCredentials } from './types-CNBaZKxY.js';
3
3
 
4
4
  /**
5
5
  * AstraSync Universal Verification Gateway - Express Middleware
@@ -1,5 +1,5 @@
1
- import { a as AstraSyncGatewayConfig, P as PDLSSContext, V as VerificationDecision } from '../types-DQmop7ZW.mjs';
2
- import '../types-CJjZvPr9.mjs';
1
+ import { a as AstraSyncGatewayConfig, P as PDLSSContext, V as VerificationDecision } from '../types-CoDjpbVY.mjs';
2
+ import '../types-CSHcByFX.mjs';
3
3
  import '../metadata-capture.mjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { a as AstraSyncGatewayConfig, P as PDLSSContext, V as VerificationDecision } from '../types-CXf3q4kZ.js';
2
- import '../types-BK2POWNc.js';
1
+ import { a as AstraSyncGatewayConfig, P as PDLSSContext, V as VerificationDecision } from '../types-3UV7IZx7.js';
2
+ import '../types-CNBaZKxY.js';
3
3
  import '../metadata-capture.js';
4
4
 
5
5
  /**
@@ -3892,6 +3892,14 @@ function cacheResult(request, result, configuredTtl, counterpartyId) {
3892
3892
  expiresAt: Date.now() + ttlSeconds * 1e3
3893
3893
  });
3894
3894
  }
3895
+ function mcpGuidance(urls) {
3896
+ if (!urls?.mcpEndpoint) return void 0;
3897
+ return {
3898
+ endpoint: urls.mcpEndpoint,
3899
+ discoveryUrl: urls.mcpDiscoveryUrl,
3900
+ message: "If you are operating inside an MCP-capable host (Claude, ChatGPT, Cursor, or any MCP client), add the AstraSync MCP connector instead of integrating these URLs by hand: registration through the connector is KEYLESS and HUMAN-APPROVED \u2014 your human approves in an in-chat card, and you never see, hold, or transmit an API key, password, or private key."
3901
+ };
3902
+ }
3895
3903
  function createGuidanceResponse(_config, reason, options = {}) {
3896
3904
  const source = options.source ?? "no_credentials";
3897
3905
  const isApiError = source === "api_error";
@@ -3918,11 +3926,17 @@ function createGuidanceResponse(_config, reason, options = {}) {
3918
3926
  registrationUrl: urls?.registrationUrl ?? "",
3919
3927
  documentationUrl: urls?.documentationUrl ?? "",
3920
3928
  steps: [
3929
+ // MCP steering leads when the hosted bridge is advertised — the
3930
+ // connector is the agent-actionable path (keyless, human-approved).
3931
+ ...urls?.mcpEndpoint ? [
3932
+ `Fastest path (inside an MCP host): add the AstraSync MCP connector at ${urls.mcpEndpoint} \u2014 keyless, human-approved registration`
3933
+ ] : [],
3921
3934
  "Register for an AstraSync account",
3922
3935
  "Create and register your agent",
3923
3936
  "Add your ASTRA-ID to request headers",
3924
3937
  "Retry your request"
3925
- ]
3938
+ ],
3939
+ ...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
3926
3940
  };
3927
3941
  return {
3928
3942
  // Round-18 G4: createGuidanceResponse fires for unverified-agent path or
@@ -4141,7 +4155,10 @@ async function verify(config, request, options) {
4141
4155
  guidance: {
4142
4156
  message: apiResponse.access?.reason || "Access denied by PDLSS policy",
4143
4157
  registrationUrl: urls?.registrationUrl ?? "",
4144
- documentationUrl: urls?.documentationUrl ?? ""
4158
+ documentationUrl: urls?.documentationUrl ?? "",
4159
+ // 5.1.0: anonymous callers land on this branch — steer MCP-hosted
4160
+ // agents to the connector (this is what the edge deny body surfaces).
4161
+ ...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
4145
4162
  },
4146
4163
  verifiedAt: /* @__PURE__ */ new Date(),
4147
4164
  // Extract sessionId so decisions can be recorded for denials too