@astrasyncai/verification-gateway 5.0.0 → 5.2.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.
- package/dist/adapter-interface/interface.d.mts +2 -2
- package/dist/adapter-interface/interface.d.ts +2 -2
- package/dist/adapters/express.d.mts +2 -2
- package/dist/adapters/express.d.ts +2 -2
- package/dist/adapters/express.js +20 -3
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +20 -3
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +2 -2
- package/dist/adapters/mcp.d.ts +2 -2
- package/dist/adapters/mcp.js +20 -3
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +20 -3
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +2 -2
- package/dist/adapters/nextjs.d.ts +2 -2
- package/dist/adapters/nextjs.js +20 -3
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +20 -3
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +2 -2
- package/dist/adapters/sdk.d.ts +2 -2
- package/dist/adapters/sdk.js +20 -3
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +20 -3
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.d.mts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/bin/astrasync-claude-hook.js +20 -3
- package/dist/bin/astrasync-codex-hook.js +20 -3
- package/dist/bin/astrasync-guard.js +20 -3
- package/dist/bin/astrasync.js +20 -3
- package/dist/browser/background.js +20 -3
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +20 -3
- package/dist/browser/background.mjs.map +1 -1
- package/dist/browser/browser-adapter.d.mts +2 -2
- package/dist/browser/browser-adapter.d.ts +2 -2
- package/dist/claude-code/claude-code-adapter.d.mts +2 -2
- package/dist/claude-code/claude-code-adapter.d.ts +2 -2
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/codex/index.d.mts +2 -2
- package/dist/codex/index.d.ts +2 -2
- package/dist/codex/index.js +20 -3
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +20 -3
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/cursor-adapter.d.mts +2 -2
- package/dist/cursor/cursor-adapter.d.ts +2 -2
- package/dist/cursor/extension.d.mts +2 -2
- package/dist/cursor/extension.d.ts +2 -2
- package/dist/cursor/extension.js +20 -3
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +20 -3
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.d.mts +1 -1
- package/dist/edge-config.d.ts +1 -1
- package/dist/edge-config.js +1 -1
- package/dist/edge-config.js.map +1 -1
- package/dist/edge-config.mjs +1 -1
- package/dist/edge-config.mjs.map +1 -1
- package/dist/edge-core/index.d.mts +21 -2
- package/dist/edge-core/index.d.ts +21 -2
- package/dist/edge-core/index.js +40 -7
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +40 -7
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/{express-Dm-snUuY.d.mts → express-KkBZBMqi.d.mts} +1 -1
- package/dist/{express-B5lWuemA.d.ts → express-xK8pRrmj.d.ts} +1 -1
- package/dist/gateway/gateway.d.mts +2 -2
- package/dist/gateway/gateway.d.ts +2 -2
- package/dist/gateway/gateway.js +20 -3
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +20 -3
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +2 -2
- package/dist/git-trigger/git-hooks.d.ts +2 -2
- package/dist/{index-B5k_vUmK.d.mts → index-DIRzR5IS.d.mts} +1 -1
- package/dist/{index-y8xToocF.d.ts → index-DLQ4Rcuc.d.ts} +1 -1
- package/dist/{index-BOzM6xUq.d.mts → index-GPDn_EGI.d.mts} +1 -1
- package/dist/{index-dRfxUdFA.d.ts → index-Hnz5VyMR.d.ts} +1 -1
- package/dist/index.d.mts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -3
- package/dist/index.mjs.map +1 -1
- package/dist/local-evaluator/evaluator.d.mts +2 -2
- package/dist/local-evaluator/evaluator.d.ts +2 -2
- package/dist/{mcp-OosmAcKf.d.ts → mcp-DPpu4xQz.d.ts} +1 -1
- package/dist/{mcp-DgsyQiQq.d.mts → mcp-Dju_Sr1o.d.mts} +1 -1
- package/dist/{nextjs-B1sBdEav.d.mts → nextjs-BuoDBN4g.d.mts} +1 -1
- package/dist/{nextjs-DoRmhV_Z.d.ts → nextjs-rZKzY_8o.d.ts} +1 -1
- package/dist/registration/index.js +1 -1
- package/dist/registration/index.js.map +1 -1
- package/dist/registration/index.mjs +1 -1
- package/dist/registration/index.mjs.map +1 -1
- package/dist/{sdk-B83N3xKc.d.mts → sdk-CdO6TIEf.d.mts} +1 -1
- package/dist/{sdk-H_9BTNBS.d.ts → sdk-DxHuIJBm.d.ts} +1 -1
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/transport/index.js +1 -1
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs +1 -1
- package/dist/transport/index.mjs.map +1 -1
- package/dist/{types-CXf3q4kZ.d.ts → types-3UV7IZx7.d.ts} +1 -1
- package/dist/{types-BK2POWNc.d.ts → types-CNBaZKxY.d.ts} +9 -0
- package/dist/{types-CJjZvPr9.d.mts → types-CSHcByFX.d.mts} +9 -0
- package/dist/{types-DQmop7ZW.d.mts → types-CoDjpbVY.d.mts} +1 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +1 -1
- package/dist/verify.d.ts +1 -1
- package/dist/verify.js +20 -3
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +20 -3
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.mjs';
|
|
2
|
-
import { P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-
|
|
2
|
+
import { P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-CoDjpbVY.mjs';
|
|
3
3
|
import '../gateway/gateway.mjs';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-CSHcByFX.mjs';
|
|
5
5
|
import '../metadata-capture.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.js';
|
|
2
|
-
import { P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-
|
|
2
|
+
import { P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-3UV7IZx7.js';
|
|
3
3
|
import '../gateway/gateway.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-CNBaZKxY.js';
|
|
5
5
|
import '../metadata-capture.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VSCodeAPI } from './cursor-adapter.mjs';
|
|
2
2
|
import '../adapter-interface/interface.mjs';
|
|
3
3
|
import '../gateway/gateway.mjs';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../types-
|
|
4
|
+
import '../types-CoDjpbVY.mjs';
|
|
5
|
+
import '../types-CSHcByFX.mjs';
|
|
6
6
|
import '../metadata-capture.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VSCodeAPI } from './cursor-adapter.js';
|
|
2
2
|
import '../adapter-interface/interface.js';
|
|
3
3
|
import '../gateway/gateway.js';
|
|
4
|
-
import '../types-
|
|
5
|
-
import '../types-
|
|
4
|
+
import '../types-3UV7IZx7.js';
|
|
5
|
+
import '../types-CNBaZKxY.js';
|
|
6
6
|
import '../metadata-capture.js';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/cursor/extension.js
CHANGED
|
@@ -3984,7 +3984,7 @@ function getTrustLevel(score) {
|
|
|
3984
3984
|
}
|
|
3985
3985
|
|
|
3986
3986
|
// src/version.ts
|
|
3987
|
-
var SDK_VERSION = "5.
|
|
3987
|
+
var SDK_VERSION = "5.2.0";
|
|
3988
3988
|
|
|
3989
3989
|
// src/http.ts
|
|
3990
3990
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -4136,6 +4136,14 @@ function cacheResult(request, result, configuredTtl, counterpartyId) {
|
|
|
4136
4136
|
expiresAt: Date.now() + ttlSeconds * 1e3
|
|
4137
4137
|
});
|
|
4138
4138
|
}
|
|
4139
|
+
function mcpGuidance(urls) {
|
|
4140
|
+
if (!urls?.mcpEndpoint) return void 0;
|
|
4141
|
+
return {
|
|
4142
|
+
endpoint: urls.mcpEndpoint,
|
|
4143
|
+
discoveryUrl: urls.mcpDiscoveryUrl,
|
|
4144
|
+
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."
|
|
4145
|
+
};
|
|
4146
|
+
}
|
|
4139
4147
|
function createGuidanceResponse(_config, reason, options = {}) {
|
|
4140
4148
|
const source = options.source ?? "no_credentials";
|
|
4141
4149
|
const isApiError = source === "api_error";
|
|
@@ -4162,11 +4170,17 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
4162
4170
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
4163
4171
|
documentationUrl: urls?.documentationUrl ?? "",
|
|
4164
4172
|
steps: [
|
|
4173
|
+
// MCP steering leads when the hosted bridge is advertised — the
|
|
4174
|
+
// connector is the agent-actionable path (keyless, human-approved).
|
|
4175
|
+
...urls?.mcpEndpoint ? [
|
|
4176
|
+
`Fastest path (inside an MCP host): add the AstraSync MCP connector at ${urls.mcpEndpoint} \u2014 keyless, human-approved registration`
|
|
4177
|
+
] : [],
|
|
4165
4178
|
"Register for an AstraSync account",
|
|
4166
4179
|
"Create and register your agent",
|
|
4167
4180
|
"Add your ASTRA-ID to request headers",
|
|
4168
4181
|
"Retry your request"
|
|
4169
|
-
]
|
|
4182
|
+
],
|
|
4183
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
4170
4184
|
};
|
|
4171
4185
|
return {
|
|
4172
4186
|
// Round-18 G4: createGuidanceResponse fires for unverified-agent path or
|
|
@@ -4385,7 +4399,10 @@ async function verify(config, request, options) {
|
|
|
4385
4399
|
guidance: {
|
|
4386
4400
|
message: apiResponse.access?.reason || "Access denied by PDLSS policy",
|
|
4387
4401
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
4388
|
-
documentationUrl: urls?.documentationUrl ?? ""
|
|
4402
|
+
documentationUrl: urls?.documentationUrl ?? "",
|
|
4403
|
+
// 5.1.0: anonymous callers land on this branch — steer MCP-hosted
|
|
4404
|
+
// agents to the connector (this is what the edge deny body surfaces).
|
|
4405
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
4389
4406
|
},
|
|
4390
4407
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
4391
4408
|
// Extract sessionId so decisions can be recorded for denials too
|