@astrasyncai/verification-gateway 2.0.1 → 2.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 +42 -20
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +42 -20
- package/dist/adapters/express.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 +43 -20
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +43 -20
- 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 +25 -16
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +25 -16
- 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 +100 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +101 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/browser/background.js +58 -16
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +61 -16
- 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/cli/index.d.mts +2 -2
- package/dist/cli/index.d.ts +2 -2
- 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 +58 -16
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +61 -16
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/{express-CtwDIZyF.d.mts → express-C9KqJNWV.d.mts} +1 -1
- package/dist/{express-Bcl-uBUE.d.ts → express-DpwYW08E.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 +58 -16
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +61 -16
- 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-BY8yQ8N8.d.mts → index-BMZdjGT4.d.mts} +46 -3
- package/dist/index-DlsYN3Et.d.mts +1397 -0
- package/dist/{index-CtYSYwn3.d.ts → index-Dm2xA6j1.d.ts} +46 -3
- package/dist/index-gM-lgX_X.d.ts +1397 -0
- package/dist/index.d.mts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +2489 -66
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2492 -66
- 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/{nextjs-BQyMCSx_.d.mts → nextjs-BEqidT0U.d.mts} +1 -1
- package/dist/{nextjs-CEldnIJ9.d.ts → nextjs-yNzimC3a.d.ts} +1 -1
- package/dist/{sdk-BhvuJSrH.d.mts → sdk-7fa9H0qa.d.mts} +1 -1
- package/dist/{sdk-BlyVSC_S.d.ts → sdk-CP9C9Qu0.d.ts} +1 -1
- package/dist/transport/index.d.mts +3 -2
- package/dist/transport/index.d.ts +3 -2
- package/dist/transport/index.js +2384 -2
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs +2327 -1
- package/dist/transport/index.mjs.map +1 -1
- package/dist/{types-CxQwJKbd.d.mts → types-CrVMq_Td.d.mts} +30 -3
- package/dist/{types-CxQwJKbd.d.ts → types-CrVMq_Td.d.ts} +30 -3
- package/dist/{types-jJnPXStc.d.mts → types-DE0ooQJ6.d.mts} +1 -1
- package/dist/{types-79qS7aON.d.ts → types-rigu2bH3.d.ts} +1 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/package.json +17 -3
- package/dist/index-B1ThcGZl.d.mts +0 -89
- package/dist/index-DnoXfdFd.d.ts +0 -89
|
@@ -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-DE0ooQJ6.mjs';
|
|
3
3
|
import '../gateway/gateway.mjs';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-CrVMq_Td.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @astrasyncai/adapter-openclaw-browser
|
|
@@ -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-rigu2bH3.js';
|
|
3
3
|
import '../gateway/gateway.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-CrVMq_Td.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @astrasyncai/adapter-openclaw-browser
|
package/dist/cli/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as LocalPurposeRule, c as LocalScope, d as LocalRiskThresholds, L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-
|
|
1
|
+
import { a as LocalPurposeRule, c as LocalScope, d as LocalRiskThresholds, L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-DE0ooQJ6.mjs';
|
|
2
2
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.mjs';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-CrVMq_Td.mjs';
|
|
4
4
|
import '../gateway/gateway.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as LocalPurposeRule, c as LocalScope, d as LocalRiskThresholds, L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-
|
|
1
|
+
import { a as LocalPurposeRule, c as LocalScope, d as LocalRiskThresholds, L as LocalPolicy, P as PDLSSContext, V as VerificationDecision, A as AgentAction, I as InterceptResult } from '../types-rigu2bH3.js';
|
|
2
2
|
import { PlatformAdapter, AdapterConfig } from '../adapter-interface/interface.js';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-CrVMq_Td.js';
|
|
4
4
|
import '../gateway/gateway.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -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-DE0ooQJ6.mjs';
|
|
3
3
|
import '../gateway/gateway.mjs';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-CrVMq_Td.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @astrasyncai/adapter-cursor
|
|
@@ -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-rigu2bH3.js';
|
|
3
3
|
import '../gateway/gateway.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-CrVMq_Td.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @astrasyncai/adapter-cursor
|
|
@@ -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-DE0ooQJ6.mjs';
|
|
5
|
+
import '../types-CrVMq_Td.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* VS Code Extension entry point for AstraSync Local Guard (Cursor/VS Code).
|
|
@@ -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-rigu2bH3.js';
|
|
5
|
+
import '../types-CrVMq_Td.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* VS Code Extension entry point for AstraSync Local Guard (Cursor/VS Code).
|
package/dist/cursor/extension.js
CHANGED
|
@@ -3396,21 +3396,33 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
3396
3396
|
if (requestData.isSubAgentRequest) body.isSubAgentRequest = requestData.isSubAgentRequest;
|
|
3397
3397
|
if (requestData.parentAgentId) body.parentAgentId = requestData.parentAgentId;
|
|
3398
3398
|
if (requestData.subAgentDepth !== void 0) body.subAgentDepth = requestData.subAgentDepth;
|
|
3399
|
-
if (requestData.enableRuntimeChallenge)
|
|
3399
|
+
if (requestData.enableRuntimeChallenge)
|
|
3400
|
+
body.enableRuntimeChallenge = requestData.enableRuntimeChallenge;
|
|
3400
3401
|
if (requestData.createSession) body.createSession = requestData.createSession;
|
|
3401
3402
|
if (requestData.durationRequired) body.durationRequired = requestData.durationRequired;
|
|
3402
3403
|
if (requestData.counterpartyType) body.counterpartyType = requestData.counterpartyType;
|
|
3403
3404
|
if (requestData.counterpartyUrl) body.counterpartyUrl = requestData.counterpartyUrl;
|
|
3404
|
-
if (requestData.runtimeChallengeOptions)
|
|
3405
|
+
if (requestData.runtimeChallengeOptions)
|
|
3406
|
+
body.runtimeChallengeOptions = requestData.runtimeChallengeOptions;
|
|
3407
|
+
if (requestData.callerMetadata || requestData.clientIp || requestData.userAgent) {
|
|
3408
|
+
const meta = {
|
|
3409
|
+
...requestData.clientIp && { sourceIp: requestData.clientIp },
|
|
3410
|
+
...requestData.userAgent && { userAgent: requestData.userAgent },
|
|
3411
|
+
...requestData.callerMetadata
|
|
3412
|
+
};
|
|
3413
|
+
if (Object.keys(meta).length > 0) body.callerMetadata = meta;
|
|
3414
|
+
}
|
|
3405
3415
|
const headers = {
|
|
3406
3416
|
"Content-Type": "application/json",
|
|
3407
3417
|
...config.customHeaders
|
|
3408
3418
|
};
|
|
3409
|
-
if (config.apiKey) {
|
|
3410
|
-
headers["X-API-Key"] = config.apiKey;
|
|
3411
|
-
}
|
|
3412
3419
|
if (credentials.authorizationHeader) {
|
|
3413
3420
|
headers["Authorization"] = credentials.authorizationHeader;
|
|
3421
|
+
} else if (config.apiKey) {
|
|
3422
|
+
headers["Authorization"] = `Bearer ${config.apiKey}`;
|
|
3423
|
+
}
|
|
3424
|
+
if (config.apiKey) {
|
|
3425
|
+
headers["X-API-Key"] = config.apiKey;
|
|
3414
3426
|
}
|
|
3415
3427
|
try {
|
|
3416
3428
|
const response = await fetch(`${config.apiBaseUrl}/agents/verify-access`, {
|
|
@@ -3511,16 +3523,11 @@ async function verify(config, request) {
|
|
|
3511
3523
|
} : void 0;
|
|
3512
3524
|
const trustScore = agent?.trustScore || 0;
|
|
3513
3525
|
const isOrgMember = false;
|
|
3514
|
-
const accessLevel = determineAccessLevel(
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
"read-only": 20,
|
|
3520
|
-
standard: mergedConfig.minTrustScore || 40,
|
|
3521
|
-
full: mergedConfig.minTrustScoreForFull || 70
|
|
3522
|
-
}
|
|
3523
|
-
);
|
|
3526
|
+
const accessLevel = determineAccessLevel(true, trustScore, isOrgMember, {
|
|
3527
|
+
"read-only": 20,
|
|
3528
|
+
standard: mergedConfig.minTrustScore || 40,
|
|
3529
|
+
full: mergedConfig.minTrustScoreForFull || 70
|
|
3530
|
+
});
|
|
3524
3531
|
const result = {
|
|
3525
3532
|
verified: true,
|
|
3526
3533
|
accessLevel,
|
|
@@ -3542,7 +3549,9 @@ async function verify(config, request) {
|
|
|
3542
3549
|
if (result.recommendation === "deny") {
|
|
3543
3550
|
result.verified = false;
|
|
3544
3551
|
result.accessLevel = "none";
|
|
3545
|
-
result.denialReasons = result.recommendationReasons || [
|
|
3552
|
+
result.denialReasons = result.recommendationReasons || [
|
|
3553
|
+
"Access denied by AstraSync recommendation"
|
|
3554
|
+
];
|
|
3546
3555
|
if (result.runtimeChallenge) {
|
|
3547
3556
|
result.guidance = {
|
|
3548
3557
|
message: `Verification failed: ${result.runtimeChallenge.reason || "runtime challenge failed"}`,
|
|
@@ -3563,6 +3572,39 @@ async function verify(config, request) {
|
|
|
3563
3572
|
return result;
|
|
3564
3573
|
}
|
|
3565
3574
|
|
|
3575
|
+
// src/transport/rfc9421.ts
|
|
3576
|
+
var import_structured_headers = require("structured-headers");
|
|
3577
|
+
|
|
3578
|
+
// src/transport/rfc9421-verify.ts
|
|
3579
|
+
var import_http_message_signatures = require("http-message-signatures");
|
|
3580
|
+
|
|
3581
|
+
// src/transport/vi.ts
|
|
3582
|
+
var import_decode = require("@sd-jwt/decode");
|
|
3583
|
+
var import_node_crypto = require("crypto");
|
|
3584
|
+
|
|
3585
|
+
// src/transport/stripe-webhook.ts
|
|
3586
|
+
var import_node_crypto2 = require("crypto");
|
|
3587
|
+
|
|
3588
|
+
// src/transport/ap2.ts
|
|
3589
|
+
var import_decode2 = require("@sd-jwt/decode");
|
|
3590
|
+
var import_node_crypto3 = require("crypto");
|
|
3591
|
+
|
|
3592
|
+
// src/transport/mpp.ts
|
|
3593
|
+
var import_mppx = require("mppx");
|
|
3594
|
+
|
|
3595
|
+
// src/transport/mpp-verify.ts
|
|
3596
|
+
var import_mppx2 = require("mppx");
|
|
3597
|
+
|
|
3598
|
+
// src/transport/x402.ts
|
|
3599
|
+
var import_schemas = require("@x402/core/schemas");
|
|
3600
|
+
var import_utils = require("@x402/core/utils");
|
|
3601
|
+
|
|
3602
|
+
// src/transport/vi-verify.ts
|
|
3603
|
+
var import_node_crypto4 = require("crypto");
|
|
3604
|
+
|
|
3605
|
+
// src/transport/registry/visa.ts
|
|
3606
|
+
var import_jose = require("jose");
|
|
3607
|
+
|
|
3566
3608
|
// src/gateway/modes/online.ts
|
|
3567
3609
|
function toGatewayConfig(config) {
|
|
3568
3610
|
return {
|