@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
|
@@ -3743,7 +3743,7 @@ function getTrustLevel(score) {
|
|
|
3743
3743
|
}
|
|
3744
3744
|
|
|
3745
3745
|
// src/version.ts
|
|
3746
|
-
var SDK_VERSION = "5.
|
|
3746
|
+
var SDK_VERSION = "5.2.0";
|
|
3747
3747
|
|
|
3748
3748
|
// src/http.ts
|
|
3749
3749
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -3895,6 +3895,14 @@ function cacheResult(request, result, configuredTtl, counterpartyId) {
|
|
|
3895
3895
|
expiresAt: Date.now() + ttlSeconds * 1e3
|
|
3896
3896
|
});
|
|
3897
3897
|
}
|
|
3898
|
+
function mcpGuidance(urls) {
|
|
3899
|
+
if (!urls?.mcpEndpoint) return void 0;
|
|
3900
|
+
return {
|
|
3901
|
+
endpoint: urls.mcpEndpoint,
|
|
3902
|
+
discoveryUrl: urls.mcpDiscoveryUrl,
|
|
3903
|
+
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."
|
|
3904
|
+
};
|
|
3905
|
+
}
|
|
3898
3906
|
function createGuidanceResponse(_config, reason, options = {}) {
|
|
3899
3907
|
const source = options.source ?? "no_credentials";
|
|
3900
3908
|
const isApiError = source === "api_error";
|
|
@@ -3921,11 +3929,17 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
3921
3929
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
3922
3930
|
documentationUrl: urls?.documentationUrl ?? "",
|
|
3923
3931
|
steps: [
|
|
3932
|
+
// MCP steering leads when the hosted bridge is advertised — the
|
|
3933
|
+
// connector is the agent-actionable path (keyless, human-approved).
|
|
3934
|
+
...urls?.mcpEndpoint ? [
|
|
3935
|
+
`Fastest path (inside an MCP host): add the AstraSync MCP connector at ${urls.mcpEndpoint} \u2014 keyless, human-approved registration`
|
|
3936
|
+
] : [],
|
|
3924
3937
|
"Register for an AstraSync account",
|
|
3925
3938
|
"Create and register your agent",
|
|
3926
3939
|
"Add your ASTRA-ID to request headers",
|
|
3927
3940
|
"Retry your request"
|
|
3928
|
-
]
|
|
3941
|
+
],
|
|
3942
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
3929
3943
|
};
|
|
3930
3944
|
return {
|
|
3931
3945
|
// Round-18 G4: createGuidanceResponse fires for unverified-agent path or
|
|
@@ -4144,7 +4158,10 @@ async function verify(config, request, options) {
|
|
|
4144
4158
|
guidance: {
|
|
4145
4159
|
message: apiResponse.access?.reason || "Access denied by PDLSS policy",
|
|
4146
4160
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
4147
|
-
documentationUrl: urls?.documentationUrl ?? ""
|
|
4161
|
+
documentationUrl: urls?.documentationUrl ?? "",
|
|
4162
|
+
// 5.1.0: anonymous callers land on this branch — steer MCP-hosted
|
|
4163
|
+
// agents to the connector (this is what the edge deny body surfaces).
|
|
4164
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
4148
4165
|
},
|
|
4149
4166
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
4150
4167
|
// Extract sessionId so decisions can be recorded for denials too
|
|
@@ -3742,7 +3742,7 @@ function getTrustLevel(score) {
|
|
|
3742
3742
|
}
|
|
3743
3743
|
|
|
3744
3744
|
// src/version.ts
|
|
3745
|
-
var SDK_VERSION = "5.
|
|
3745
|
+
var SDK_VERSION = "5.2.0";
|
|
3746
3746
|
|
|
3747
3747
|
// src/http.ts
|
|
3748
3748
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -3894,6 +3894,14 @@ function cacheResult(request, result, configuredTtl, counterpartyId) {
|
|
|
3894
3894
|
expiresAt: Date.now() + ttlSeconds * 1e3
|
|
3895
3895
|
});
|
|
3896
3896
|
}
|
|
3897
|
+
function mcpGuidance(urls) {
|
|
3898
|
+
if (!urls?.mcpEndpoint) return void 0;
|
|
3899
|
+
return {
|
|
3900
|
+
endpoint: urls.mcpEndpoint,
|
|
3901
|
+
discoveryUrl: urls.mcpDiscoveryUrl,
|
|
3902
|
+
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."
|
|
3903
|
+
};
|
|
3904
|
+
}
|
|
3897
3905
|
function createGuidanceResponse(_config, reason, options = {}) {
|
|
3898
3906
|
const source = options.source ?? "no_credentials";
|
|
3899
3907
|
const isApiError = source === "api_error";
|
|
@@ -3920,11 +3928,17 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
3920
3928
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
3921
3929
|
documentationUrl: urls?.documentationUrl ?? "",
|
|
3922
3930
|
steps: [
|
|
3931
|
+
// MCP steering leads when the hosted bridge is advertised — the
|
|
3932
|
+
// connector is the agent-actionable path (keyless, human-approved).
|
|
3933
|
+
...urls?.mcpEndpoint ? [
|
|
3934
|
+
`Fastest path (inside an MCP host): add the AstraSync MCP connector at ${urls.mcpEndpoint} \u2014 keyless, human-approved registration`
|
|
3935
|
+
] : [],
|
|
3923
3936
|
"Register for an AstraSync account",
|
|
3924
3937
|
"Create and register your agent",
|
|
3925
3938
|
"Add your ASTRA-ID to request headers",
|
|
3926
3939
|
"Retry your request"
|
|
3927
|
-
]
|
|
3940
|
+
],
|
|
3941
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
3928
3942
|
};
|
|
3929
3943
|
return {
|
|
3930
3944
|
// Round-18 G4: createGuidanceResponse fires for unverified-agent path or
|
|
@@ -4143,7 +4157,10 @@ async function verify(config, request, options) {
|
|
|
4143
4157
|
guidance: {
|
|
4144
4158
|
message: apiResponse.access?.reason || "Access denied by PDLSS policy",
|
|
4145
4159
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
4146
|
-
documentationUrl: urls?.documentationUrl ?? ""
|
|
4160
|
+
documentationUrl: urls?.documentationUrl ?? "",
|
|
4161
|
+
// 5.1.0: anonymous callers land on this branch — steer MCP-hosted
|
|
4162
|
+
// agents to the connector (this is what the edge deny body surfaces).
|
|
4163
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
4147
4164
|
},
|
|
4148
4165
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
4149
4166
|
// Extract sessionId so decisions can be recorded for denials too
|
|
@@ -3705,7 +3705,7 @@ Policy saved to ${outputPath}`);
|
|
|
3705
3705
|
};
|
|
3706
3706
|
|
|
3707
3707
|
// src/version.ts
|
|
3708
|
-
var SDK_VERSION = "5.
|
|
3708
|
+
var SDK_VERSION = "5.2.0";
|
|
3709
3709
|
|
|
3710
3710
|
// src/http.ts
|
|
3711
3711
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -4803,6 +4803,14 @@ function cacheResult(request2, result, configuredTtl, counterpartyId) {
|
|
|
4803
4803
|
expiresAt: Date.now() + ttlSeconds * 1e3
|
|
4804
4804
|
});
|
|
4805
4805
|
}
|
|
4806
|
+
function mcpGuidance(urls) {
|
|
4807
|
+
if (!urls?.mcpEndpoint) return void 0;
|
|
4808
|
+
return {
|
|
4809
|
+
endpoint: urls.mcpEndpoint,
|
|
4810
|
+
discoveryUrl: urls.mcpDiscoveryUrl,
|
|
4811
|
+
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."
|
|
4812
|
+
};
|
|
4813
|
+
}
|
|
4806
4814
|
function createGuidanceResponse(_config, reason, options = {}) {
|
|
4807
4815
|
const source = options.source ?? "no_credentials";
|
|
4808
4816
|
const isApiError = source === "api_error";
|
|
@@ -4829,11 +4837,17 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
4829
4837
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
4830
4838
|
documentationUrl: urls?.documentationUrl ?? "",
|
|
4831
4839
|
steps: [
|
|
4840
|
+
// MCP steering leads when the hosted bridge is advertised — the
|
|
4841
|
+
// connector is the agent-actionable path (keyless, human-approved).
|
|
4842
|
+
...urls?.mcpEndpoint ? [
|
|
4843
|
+
`Fastest path (inside an MCP host): add the AstraSync MCP connector at ${urls.mcpEndpoint} \u2014 keyless, human-approved registration`
|
|
4844
|
+
] : [],
|
|
4832
4845
|
"Register for an AstraSync account",
|
|
4833
4846
|
"Create and register your agent",
|
|
4834
4847
|
"Add your ASTRA-ID to request headers",
|
|
4835
4848
|
"Retry your request"
|
|
4836
|
-
]
|
|
4849
|
+
],
|
|
4850
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
4837
4851
|
};
|
|
4838
4852
|
return {
|
|
4839
4853
|
// Round-18 G4: createGuidanceResponse fires for unverified-agent path or
|
|
@@ -5052,7 +5066,10 @@ async function verify(config, request2, options) {
|
|
|
5052
5066
|
guidance: {
|
|
5053
5067
|
message: apiResponse.access?.reason || "Access denied by PDLSS policy",
|
|
5054
5068
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
5055
|
-
documentationUrl: urls?.documentationUrl ?? ""
|
|
5069
|
+
documentationUrl: urls?.documentationUrl ?? "",
|
|
5070
|
+
// 5.1.0: anonymous callers land on this branch — steer MCP-hosted
|
|
5071
|
+
// agents to the connector (this is what the edge deny body surfaces).
|
|
5072
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
5056
5073
|
},
|
|
5057
5074
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
5058
5075
|
// Extract sessionId so decisions can be recorded for denials too
|
package/dist/bin/astrasync.js
CHANGED
|
@@ -36,7 +36,7 @@ var SDK_VERSION;
|
|
|
36
36
|
var init_version = __esm({
|
|
37
37
|
"src/version.ts"() {
|
|
38
38
|
"use strict";
|
|
39
|
-
SDK_VERSION = "5.
|
|
39
|
+
SDK_VERSION = "5.2.0";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -5204,6 +5204,14 @@ function cacheResult(request2, result, configuredTtl, counterpartyId) {
|
|
|
5204
5204
|
expiresAt: Date.now() + ttlSeconds * 1e3
|
|
5205
5205
|
});
|
|
5206
5206
|
}
|
|
5207
|
+
function mcpGuidance(urls) {
|
|
5208
|
+
if (!urls?.mcpEndpoint) return void 0;
|
|
5209
|
+
return {
|
|
5210
|
+
endpoint: urls.mcpEndpoint,
|
|
5211
|
+
discoveryUrl: urls.mcpDiscoveryUrl,
|
|
5212
|
+
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."
|
|
5213
|
+
};
|
|
5214
|
+
}
|
|
5207
5215
|
function createGuidanceResponse(_config, reason, options = {}) {
|
|
5208
5216
|
const source = options.source ?? "no_credentials";
|
|
5209
5217
|
const isApiError = source === "api_error";
|
|
@@ -5230,11 +5238,17 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
5230
5238
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
5231
5239
|
documentationUrl: urls?.documentationUrl ?? "",
|
|
5232
5240
|
steps: [
|
|
5241
|
+
// MCP steering leads when the hosted bridge is advertised — the
|
|
5242
|
+
// connector is the agent-actionable path (keyless, human-approved).
|
|
5243
|
+
...urls?.mcpEndpoint ? [
|
|
5244
|
+
`Fastest path (inside an MCP host): add the AstraSync MCP connector at ${urls.mcpEndpoint} \u2014 keyless, human-approved registration`
|
|
5245
|
+
] : [],
|
|
5233
5246
|
"Register for an AstraSync account",
|
|
5234
5247
|
"Create and register your agent",
|
|
5235
5248
|
"Add your ASTRA-ID to request headers",
|
|
5236
5249
|
"Retry your request"
|
|
5237
|
-
]
|
|
5250
|
+
],
|
|
5251
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
5238
5252
|
};
|
|
5239
5253
|
return {
|
|
5240
5254
|
// Round-18 G4: createGuidanceResponse fires for unverified-agent path or
|
|
@@ -5453,7 +5467,10 @@ async function verify(config, request2, options) {
|
|
|
5453
5467
|
guidance: {
|
|
5454
5468
|
message: apiResponse.access?.reason || "Access denied by PDLSS policy",
|
|
5455
5469
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
5456
|
-
documentationUrl: urls?.documentationUrl ?? ""
|
|
5470
|
+
documentationUrl: urls?.documentationUrl ?? "",
|
|
5471
|
+
// 5.1.0: anonymous callers land on this branch — steer MCP-hosted
|
|
5472
|
+
// agents to the connector (this is what the edge deny body surfaces).
|
|
5473
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
5457
5474
|
},
|
|
5458
5475
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
5459
5476
|
// Extract sessionId so decisions can be recorded for denials too
|
|
@@ -3980,7 +3980,7 @@ function getTrustLevel(score) {
|
|
|
3980
3980
|
}
|
|
3981
3981
|
|
|
3982
3982
|
// src/version.ts
|
|
3983
|
-
var SDK_VERSION = "5.
|
|
3983
|
+
var SDK_VERSION = "5.2.0";
|
|
3984
3984
|
|
|
3985
3985
|
// src/http.ts
|
|
3986
3986
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -4132,6 +4132,14 @@ function cacheResult(request, result, configuredTtl, counterpartyId) {
|
|
|
4132
4132
|
expiresAt: Date.now() + ttlSeconds * 1e3
|
|
4133
4133
|
});
|
|
4134
4134
|
}
|
|
4135
|
+
function mcpGuidance(urls) {
|
|
4136
|
+
if (!urls?.mcpEndpoint) return void 0;
|
|
4137
|
+
return {
|
|
4138
|
+
endpoint: urls.mcpEndpoint,
|
|
4139
|
+
discoveryUrl: urls.mcpDiscoveryUrl,
|
|
4140
|
+
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."
|
|
4141
|
+
};
|
|
4142
|
+
}
|
|
4135
4143
|
function createGuidanceResponse(_config, reason, options = {}) {
|
|
4136
4144
|
const source = options.source ?? "no_credentials";
|
|
4137
4145
|
const isApiError = source === "api_error";
|
|
@@ -4158,11 +4166,17 @@ function createGuidanceResponse(_config, reason, options = {}) {
|
|
|
4158
4166
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
4159
4167
|
documentationUrl: urls?.documentationUrl ?? "",
|
|
4160
4168
|
steps: [
|
|
4169
|
+
// MCP steering leads when the hosted bridge is advertised — the
|
|
4170
|
+
// connector is the agent-actionable path (keyless, human-approved).
|
|
4171
|
+
...urls?.mcpEndpoint ? [
|
|
4172
|
+
`Fastest path (inside an MCP host): add the AstraSync MCP connector at ${urls.mcpEndpoint} \u2014 keyless, human-approved registration`
|
|
4173
|
+
] : [],
|
|
4161
4174
|
"Register for an AstraSync account",
|
|
4162
4175
|
"Create and register your agent",
|
|
4163
4176
|
"Add your ASTRA-ID to request headers",
|
|
4164
4177
|
"Retry your request"
|
|
4165
|
-
]
|
|
4178
|
+
],
|
|
4179
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
4166
4180
|
};
|
|
4167
4181
|
return {
|
|
4168
4182
|
// Round-18 G4: createGuidanceResponse fires for unverified-agent path or
|
|
@@ -4381,7 +4395,10 @@ async function verify(config, request, options) {
|
|
|
4381
4395
|
guidance: {
|
|
4382
4396
|
message: apiResponse.access?.reason || "Access denied by PDLSS policy",
|
|
4383
4397
|
registrationUrl: urls?.registrationUrl ?? "",
|
|
4384
|
-
documentationUrl: urls?.documentationUrl ?? ""
|
|
4398
|
+
documentationUrl: urls?.documentationUrl ?? "",
|
|
4399
|
+
// 5.1.0: anonymous callers land on this branch — steer MCP-hosted
|
|
4400
|
+
// agents to the connector (this is what the edge deny body surfaces).
|
|
4401
|
+
...mcpGuidance(urls) && { mcp: mcpGuidance(urls) }
|
|
4385
4402
|
},
|
|
4386
4403
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
4387
4404
|
// Extract sessionId so decisions can be recorded for denials too
|