@astrasyncai/verification-gateway 5.8.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.
- package/README.md +1 -1
- package/dist/adapters/express.d.mts +1 -1
- package/dist/adapters/express.d.ts +1 -1
- package/dist/adapters/express.js +56 -7
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +56 -7
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.d.ts +1 -1
- package/dist/adapters/mcp.js +20 -2
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +20 -2
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +1 -1
- package/dist/adapters/nextjs.d.ts +1 -1
- package/dist/adapters/nextjs.js +56 -7
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +56 -7
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +1 -1
- package/dist/adapters/sdk.d.ts +1 -1
- package/dist/adapters/sdk.js +20 -2
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +20 -2
- package/dist/adapters/sdk.mjs.map +1 -1
- 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 +32 -6
- package/dist/bin/astrasync-codex-hook.js +32 -6
- package/dist/bin/astrasync-guard.js +32 -6
- package/dist/bin/astrasync.js +33 -6
- package/dist/browser/background.js +32 -6
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +32 -6
- package/dist/browser/background.mjs.map +1 -1
- package/dist/cli/index.js +12 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +12 -4
- package/dist/cli/index.mjs.map +1 -1
- package/dist/codex/index.js +32 -6
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +32 -6
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/extension.js +32 -6
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +32 -6
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.d.mts +24 -1
- package/dist/edge-config.d.ts +24 -1
- package/dist/edge-config.js +13 -5
- package/dist/edge-config.js.map +1 -1
- package/dist/edge-config.mjs +13 -5
- package/dist/edge-config.mjs.map +1 -1
- package/dist/edge-core/index.d.mts +14 -6
- package/dist/edge-core/index.d.ts +14 -6
- package/dist/edge-core/index.js +129 -17
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +129 -17
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/gateway/gateway.js +32 -6
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +32 -6
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +1 -1
- package/dist/git-trigger/git-hooks.d.ts +1 -1
- package/dist/index.d.mts +73 -6
- package/dist/index.d.ts +73 -6
- package/dist/index.js +66 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -7
- package/dist/index.mjs.map +1 -1
- package/dist/metadata-capture.d.mts +18 -1
- package/dist/metadata-capture.d.ts +18 -1
- package/dist/metadata-capture.js +10 -0
- package/dist/metadata-capture.js.map +1 -1
- package/dist/metadata-capture.mjs +8 -0
- package/dist/metadata-capture.mjs.map +1 -1
- package/dist/platform-signatures.d.mts +1 -1
- package/dist/platform-signatures.d.ts +1 -1
- package/dist/platform-signatures.js +24 -1
- package/dist/platform-signatures.js.map +1 -1
- package/dist/platform-signatures.mjs +24 -1
- package/dist/platform-signatures.mjs.map +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/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-BK_pRNSs.d.mts → types-CTmUpNpS.d.mts} +25 -2
- package/dist/{types-BK_pRNSs.d.ts → types-CTmUpNpS.d.ts} +25 -2
- package/dist/{types-CwY5IY-0.d.ts → types-CtFXmDzm.d.ts} +17 -2
- package/dist/{types-BCmHFdkJ.d.mts → types-DQrn_kei.d.mts} +17 -2
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +13 -1
- package/dist/verify.d.ts +13 -1
- package/dist/verify.js +20 -2
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +20 -2
- package/dist/verify.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1736,16 +1736,21 @@ function requireLoader() {
|
|
|
1736
1736
|
state.result += _result;
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
1739
|
+
function chargeMergeWork(state) {
|
|
1740
|
+
state.totalMergeKeys++;
|
|
1741
|
+
if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
|
|
1742
|
+
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1739
1745
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
1740
1746
|
if (!common2.isObject(source)) {
|
|
1741
1747
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
1742
1748
|
}
|
|
1749
|
+
chargeMergeWork(state);
|
|
1743
1750
|
const sourceKeys = Object.keys(source);
|
|
1744
1751
|
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
1745
1752
|
const key = sourceKeys[index];
|
|
1746
|
-
|
|
1747
|
-
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1748
|
-
}
|
|
1753
|
+
chargeMergeWork(state);
|
|
1749
1754
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
1750
1755
|
setProperty(destination, key, source[key]);
|
|
1751
1756
|
overridableKeys[key] = true;
|
|
@@ -1773,6 +1778,9 @@ function requireLoader() {
|
|
|
1773
1778
|
}
|
|
1774
1779
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
1775
1780
|
if (Array.isArray(valueNode)) {
|
|
1781
|
+
if (valueNode.length > 100) {
|
|
1782
|
+
throwError(state, "abnormal merge sequence size");
|
|
1783
|
+
}
|
|
1776
1784
|
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
1777
1785
|
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
1778
1786
|
}
|
|
@@ -3743,7 +3751,7 @@ function getTrustLevel(score) {
|
|
|
3743
3751
|
}
|
|
3744
3752
|
|
|
3745
3753
|
// src/version.ts
|
|
3746
|
-
var SDK_VERSION = "5.
|
|
3754
|
+
var SDK_VERSION = "5.10.0";
|
|
3747
3755
|
|
|
3748
3756
|
// src/http.ts
|
|
3749
3757
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -4062,6 +4070,24 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4062
4070
|
}
|
|
4063
4071
|
};
|
|
4064
4072
|
}
|
|
4073
|
+
if (response.status === 400 && data?.error === "INVALID_AGENT_ID") {
|
|
4074
|
+
const message = typeof data?.message === "string" ? data.message : "Agent identifier must be a canonical ASTRA-* id.";
|
|
4075
|
+
return {
|
|
4076
|
+
success: true,
|
|
4077
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
4078
|
+
access: {
|
|
4079
|
+
allowed: false,
|
|
4080
|
+
reason: "invalid_agent_id",
|
|
4081
|
+
failures: [
|
|
4082
|
+
{
|
|
4083
|
+
dimension: "identity.invalid_agent_id",
|
|
4084
|
+
message,
|
|
4085
|
+
guidance: typeof data?.guidance === "string" ? data.guidance : "Present your canonical ASTRA-* id (discover it via GET /api/agents/request-registration/{requestId} after owner approval)."
|
|
4086
|
+
}
|
|
4087
|
+
]
|
|
4088
|
+
}
|
|
4089
|
+
};
|
|
4090
|
+
}
|
|
4065
4091
|
if (!response.ok) {
|
|
4066
4092
|
if (response.status === 401) {
|
|
4067
4093
|
return {
|
|
@@ -4201,7 +4227,7 @@ async function verify(config, request, options) {
|
|
|
4201
4227
|
name: apiResponse.agent.name,
|
|
4202
4228
|
trustScore: apiResponse.agent.trustScore,
|
|
4203
4229
|
trustLevel: getTrustLevel(apiResponse.agent.trustScore),
|
|
4204
|
-
|
|
4230
|
+
blockchainAnchored: apiResponse.agent.blockchainStatus === "anchored",
|
|
4205
4231
|
status: apiResponse.agent.agentStatus
|
|
4206
4232
|
} : void 0;
|
|
4207
4233
|
const developer = apiResponse.developer ? {
|
|
@@ -4290,7 +4316,7 @@ var DEFAULT_EDGE_CONFIG = Object.freeze({
|
|
|
4290
4316
|
mode: "observe",
|
|
4291
4317
|
depth: "classify",
|
|
4292
4318
|
pathRules: [],
|
|
4293
|
-
sampling: Object.freeze({ anonymousBeaconRate:
|
|
4319
|
+
sampling: Object.freeze({ anonymousBeaconRate: 1 }),
|
|
4294
4320
|
failurePosture: "open"
|
|
4295
4321
|
});
|
|
4296
4322
|
var DEFAULT_TTL_MS = 60 * 1e3;
|
|
@@ -1735,16 +1735,21 @@ function requireLoader() {
|
|
|
1735
1735
|
state.result += _result;
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
|
+
function chargeMergeWork(state) {
|
|
1739
|
+
state.totalMergeKeys++;
|
|
1740
|
+
if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
|
|
1741
|
+
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1738
1744
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
1739
1745
|
if (!common2.isObject(source)) {
|
|
1740
1746
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
1741
1747
|
}
|
|
1748
|
+
chargeMergeWork(state);
|
|
1742
1749
|
const sourceKeys = Object.keys(source);
|
|
1743
1750
|
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
1744
1751
|
const key = sourceKeys[index];
|
|
1745
|
-
|
|
1746
|
-
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1747
|
-
}
|
|
1752
|
+
chargeMergeWork(state);
|
|
1748
1753
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
1749
1754
|
setProperty(destination, key, source[key]);
|
|
1750
1755
|
overridableKeys[key] = true;
|
|
@@ -1772,6 +1777,9 @@ function requireLoader() {
|
|
|
1772
1777
|
}
|
|
1773
1778
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
1774
1779
|
if (Array.isArray(valueNode)) {
|
|
1780
|
+
if (valueNode.length > 100) {
|
|
1781
|
+
throwError(state, "abnormal merge sequence size");
|
|
1782
|
+
}
|
|
1775
1783
|
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
1776
1784
|
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
1777
1785
|
}
|
|
@@ -3742,7 +3750,7 @@ function getTrustLevel(score) {
|
|
|
3742
3750
|
}
|
|
3743
3751
|
|
|
3744
3752
|
// src/version.ts
|
|
3745
|
-
var SDK_VERSION = "5.
|
|
3753
|
+
var SDK_VERSION = "5.10.0";
|
|
3746
3754
|
|
|
3747
3755
|
// src/http.ts
|
|
3748
3756
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -4061,6 +4069,24 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4061
4069
|
}
|
|
4062
4070
|
};
|
|
4063
4071
|
}
|
|
4072
|
+
if (response.status === 400 && data?.error === "INVALID_AGENT_ID") {
|
|
4073
|
+
const message = typeof data?.message === "string" ? data.message : "Agent identifier must be a canonical ASTRA-* id.";
|
|
4074
|
+
return {
|
|
4075
|
+
success: true,
|
|
4076
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
4077
|
+
access: {
|
|
4078
|
+
allowed: false,
|
|
4079
|
+
reason: "invalid_agent_id",
|
|
4080
|
+
failures: [
|
|
4081
|
+
{
|
|
4082
|
+
dimension: "identity.invalid_agent_id",
|
|
4083
|
+
message,
|
|
4084
|
+
guidance: typeof data?.guidance === "string" ? data.guidance : "Present your canonical ASTRA-* id (discover it via GET /api/agents/request-registration/{requestId} after owner approval)."
|
|
4085
|
+
}
|
|
4086
|
+
]
|
|
4087
|
+
}
|
|
4088
|
+
};
|
|
4089
|
+
}
|
|
4064
4090
|
if (!response.ok) {
|
|
4065
4091
|
if (response.status === 401) {
|
|
4066
4092
|
return {
|
|
@@ -4200,7 +4226,7 @@ async function verify(config, request, options) {
|
|
|
4200
4226
|
name: apiResponse.agent.name,
|
|
4201
4227
|
trustScore: apiResponse.agent.trustScore,
|
|
4202
4228
|
trustLevel: getTrustLevel(apiResponse.agent.trustScore),
|
|
4203
|
-
|
|
4229
|
+
blockchainAnchored: apiResponse.agent.blockchainStatus === "anchored",
|
|
4204
4230
|
status: apiResponse.agent.agentStatus
|
|
4205
4231
|
} : void 0;
|
|
4206
4232
|
const developer = apiResponse.developer ? {
|
|
@@ -4289,7 +4315,7 @@ var DEFAULT_EDGE_CONFIG = Object.freeze({
|
|
|
4289
4315
|
mode: "observe",
|
|
4290
4316
|
depth: "classify",
|
|
4291
4317
|
pathRules: [],
|
|
4292
|
-
sampling: Object.freeze({ anonymousBeaconRate:
|
|
4318
|
+
sampling: Object.freeze({ anonymousBeaconRate: 1 }),
|
|
4293
4319
|
failurePosture: "open"
|
|
4294
4320
|
});
|
|
4295
4321
|
var DEFAULT_TTL_MS = 60 * 1e3;
|
|
@@ -1307,16 +1307,21 @@ function requireLoader() {
|
|
|
1307
1307
|
state.result += _result;
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
|
+
function chargeMergeWork(state) {
|
|
1311
|
+
state.totalMergeKeys++;
|
|
1312
|
+
if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
|
|
1313
|
+
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1310
1316
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
1311
1317
|
if (!common2.isObject(source)) {
|
|
1312
1318
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
1313
1319
|
}
|
|
1320
|
+
chargeMergeWork(state);
|
|
1314
1321
|
const sourceKeys = Object.keys(source);
|
|
1315
1322
|
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
1316
1323
|
const key = sourceKeys[index];
|
|
1317
|
-
|
|
1318
|
-
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1319
|
-
}
|
|
1324
|
+
chargeMergeWork(state);
|
|
1320
1325
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
1321
1326
|
setProperty(destination, key, source[key]);
|
|
1322
1327
|
overridableKeys[key] = true;
|
|
@@ -1344,6 +1349,9 @@ function requireLoader() {
|
|
|
1344
1349
|
}
|
|
1345
1350
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
1346
1351
|
if (Array.isArray(valueNode)) {
|
|
1352
|
+
if (valueNode.length > 100) {
|
|
1353
|
+
throwError(state, "abnormal merge sequence size");
|
|
1354
|
+
}
|
|
1347
1355
|
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
1348
1356
|
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
1349
1357
|
}
|
|
@@ -3705,7 +3713,7 @@ Policy saved to ${outputPath}`);
|
|
|
3705
3713
|
};
|
|
3706
3714
|
|
|
3707
3715
|
// src/version.ts
|
|
3708
|
-
var SDK_VERSION = "5.
|
|
3716
|
+
var SDK_VERSION = "5.10.0";
|
|
3709
3717
|
|
|
3710
3718
|
// src/http.ts
|
|
3711
3719
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -4970,6 +4978,24 @@ async function callVerifyAccessAPI(config, request2) {
|
|
|
4970
4978
|
}
|
|
4971
4979
|
};
|
|
4972
4980
|
}
|
|
4981
|
+
if (response.status === 400 && data?.error === "INVALID_AGENT_ID") {
|
|
4982
|
+
const message = typeof data?.message === "string" ? data.message : "Agent identifier must be a canonical ASTRA-* id.";
|
|
4983
|
+
return {
|
|
4984
|
+
success: true,
|
|
4985
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
4986
|
+
access: {
|
|
4987
|
+
allowed: false,
|
|
4988
|
+
reason: "invalid_agent_id",
|
|
4989
|
+
failures: [
|
|
4990
|
+
{
|
|
4991
|
+
dimension: "identity.invalid_agent_id",
|
|
4992
|
+
message,
|
|
4993
|
+
guidance: typeof data?.guidance === "string" ? data.guidance : "Present your canonical ASTRA-* id (discover it via GET /api/agents/request-registration/{requestId} after owner approval)."
|
|
4994
|
+
}
|
|
4995
|
+
]
|
|
4996
|
+
}
|
|
4997
|
+
};
|
|
4998
|
+
}
|
|
4973
4999
|
if (!response.ok) {
|
|
4974
5000
|
if (response.status === 401) {
|
|
4975
5001
|
return {
|
|
@@ -5109,7 +5135,7 @@ async function verify(config, request2, options) {
|
|
|
5109
5135
|
name: apiResponse.agent.name,
|
|
5110
5136
|
trustScore: apiResponse.agent.trustScore,
|
|
5111
5137
|
trustLevel: getTrustLevel(apiResponse.agent.trustScore),
|
|
5112
|
-
|
|
5138
|
+
blockchainAnchored: apiResponse.agent.blockchainStatus === "anchored",
|
|
5113
5139
|
status: apiResponse.agent.agentStatus
|
|
5114
5140
|
} : void 0;
|
|
5115
5141
|
const developer = apiResponse.developer ? {
|
|
@@ -5198,7 +5224,7 @@ var DEFAULT_EDGE_CONFIG = Object.freeze({
|
|
|
5198
5224
|
mode: "observe",
|
|
5199
5225
|
depth: "classify",
|
|
5200
5226
|
pathRules: [],
|
|
5201
|
-
sampling: Object.freeze({ anonymousBeaconRate:
|
|
5227
|
+
sampling: Object.freeze({ anonymousBeaconRate: 1 }),
|
|
5202
5228
|
failurePosture: "open"
|
|
5203
5229
|
});
|
|
5204
5230
|
var DEFAULT_TTL_MS = 60 * 1e3;
|
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.10.0";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -1648,16 +1648,21 @@ function requireLoader() {
|
|
|
1648
1648
|
state.result += _result;
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
|
+
function chargeMergeWork(state) {
|
|
1652
|
+
state.totalMergeKeys++;
|
|
1653
|
+
if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
|
|
1654
|
+
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1651
1657
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
1652
1658
|
if (!common2.isObject(source)) {
|
|
1653
1659
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
1654
1660
|
}
|
|
1661
|
+
chargeMergeWork(state);
|
|
1655
1662
|
const sourceKeys = Object.keys(source);
|
|
1656
1663
|
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
1657
1664
|
const key = sourceKeys[index];
|
|
1658
|
-
|
|
1659
|
-
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1660
|
-
}
|
|
1665
|
+
chargeMergeWork(state);
|
|
1661
1666
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
1662
1667
|
setProperty(destination, key, source[key]);
|
|
1663
1668
|
overridableKeys[key] = true;
|
|
@@ -1685,6 +1690,9 @@ function requireLoader() {
|
|
|
1685
1690
|
}
|
|
1686
1691
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
1687
1692
|
if (Array.isArray(valueNode)) {
|
|
1693
|
+
if (valueNode.length > 100) {
|
|
1694
|
+
throwError(state, "abnormal merge sequence size");
|
|
1695
|
+
}
|
|
1688
1696
|
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
1689
1697
|
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
1690
1698
|
}
|
|
@@ -5371,6 +5379,24 @@ async function callVerifyAccessAPI(config, request2) {
|
|
|
5371
5379
|
}
|
|
5372
5380
|
};
|
|
5373
5381
|
}
|
|
5382
|
+
if (response.status === 400 && data?.error === "INVALID_AGENT_ID") {
|
|
5383
|
+
const message = typeof data?.message === "string" ? data.message : "Agent identifier must be a canonical ASTRA-* id.";
|
|
5384
|
+
return {
|
|
5385
|
+
success: true,
|
|
5386
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
5387
|
+
access: {
|
|
5388
|
+
allowed: false,
|
|
5389
|
+
reason: "invalid_agent_id",
|
|
5390
|
+
failures: [
|
|
5391
|
+
{
|
|
5392
|
+
dimension: "identity.invalid_agent_id",
|
|
5393
|
+
message,
|
|
5394
|
+
guidance: typeof data?.guidance === "string" ? data.guidance : "Present your canonical ASTRA-* id (discover it via GET /api/agents/request-registration/{requestId} after owner approval)."
|
|
5395
|
+
}
|
|
5396
|
+
]
|
|
5397
|
+
}
|
|
5398
|
+
};
|
|
5399
|
+
}
|
|
5374
5400
|
if (!response.ok) {
|
|
5375
5401
|
if (response.status === 401) {
|
|
5376
5402
|
return {
|
|
@@ -5510,7 +5536,7 @@ async function verify(config, request2, options) {
|
|
|
5510
5536
|
name: apiResponse.agent.name,
|
|
5511
5537
|
trustScore: apiResponse.agent.trustScore,
|
|
5512
5538
|
trustLevel: getTrustLevel(apiResponse.agent.trustScore),
|
|
5513
|
-
|
|
5539
|
+
blockchainAnchored: apiResponse.agent.blockchainStatus === "anchored",
|
|
5514
5540
|
status: apiResponse.agent.agentStatus
|
|
5515
5541
|
} : void 0;
|
|
5516
5542
|
const developer = apiResponse.developer ? {
|
|
@@ -5684,7 +5710,7 @@ var init_edge_config = __esm({
|
|
|
5684
5710
|
mode: "observe",
|
|
5685
5711
|
depth: "classify",
|
|
5686
5712
|
pathRules: [],
|
|
5687
|
-
sampling: Object.freeze({ anonymousBeaconRate:
|
|
5713
|
+
sampling: Object.freeze({ anonymousBeaconRate: 1 }),
|
|
5688
5714
|
failurePosture: "open"
|
|
5689
5715
|
});
|
|
5690
5716
|
DEFAULT_TTL_MS = 60 * 1e3;
|
|
@@ -5732,6 +5758,7 @@ var init_classify = __esm({
|
|
|
5732
5758
|
var init_events = __esm({
|
|
5733
5759
|
"src/edge-core/events.ts"() {
|
|
5734
5760
|
"use strict";
|
|
5761
|
+
init_metadata_capture();
|
|
5735
5762
|
init_verify();
|
|
5736
5763
|
init_request();
|
|
5737
5764
|
}
|
|
@@ -1973,16 +1973,21 @@ function requireLoader() {
|
|
|
1973
1973
|
state.result += _result;
|
|
1974
1974
|
}
|
|
1975
1975
|
}
|
|
1976
|
+
function chargeMergeWork(state) {
|
|
1977
|
+
state.totalMergeKeys++;
|
|
1978
|
+
if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
|
|
1979
|
+
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1976
1982
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
1977
1983
|
if (!common2.isObject(source)) {
|
|
1978
1984
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
1979
1985
|
}
|
|
1986
|
+
chargeMergeWork(state);
|
|
1980
1987
|
const sourceKeys = Object.keys(source);
|
|
1981
1988
|
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
1982
1989
|
const key = sourceKeys[index];
|
|
1983
|
-
|
|
1984
|
-
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1985
|
-
}
|
|
1990
|
+
chargeMergeWork(state);
|
|
1986
1991
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
1987
1992
|
setProperty(destination, key, source[key]);
|
|
1988
1993
|
overridableKeys[key] = true;
|
|
@@ -2010,6 +2015,9 @@ function requireLoader() {
|
|
|
2010
2015
|
}
|
|
2011
2016
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
2012
2017
|
if (Array.isArray(valueNode)) {
|
|
2018
|
+
if (valueNode.length > 100) {
|
|
2019
|
+
throwError(state, "abnormal merge sequence size");
|
|
2020
|
+
}
|
|
2013
2021
|
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
2014
2022
|
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
2015
2023
|
}
|
|
@@ -3980,7 +3988,7 @@ function getTrustLevel(score) {
|
|
|
3980
3988
|
}
|
|
3981
3989
|
|
|
3982
3990
|
// src/version.ts
|
|
3983
|
-
var SDK_VERSION = "5.
|
|
3991
|
+
var SDK_VERSION = "5.10.0";
|
|
3984
3992
|
|
|
3985
3993
|
// src/http.ts
|
|
3986
3994
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -4299,6 +4307,24 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
4299
4307
|
}
|
|
4300
4308
|
};
|
|
4301
4309
|
}
|
|
4310
|
+
if (response.status === 400 && data?.error === "INVALID_AGENT_ID") {
|
|
4311
|
+
const message = typeof data?.message === "string" ? data.message : "Agent identifier must be a canonical ASTRA-* id.";
|
|
4312
|
+
return {
|
|
4313
|
+
success: true,
|
|
4314
|
+
attemptId: typeof data?.attemptId === "string" ? data.attemptId : void 0,
|
|
4315
|
+
access: {
|
|
4316
|
+
allowed: false,
|
|
4317
|
+
reason: "invalid_agent_id",
|
|
4318
|
+
failures: [
|
|
4319
|
+
{
|
|
4320
|
+
dimension: "identity.invalid_agent_id",
|
|
4321
|
+
message,
|
|
4322
|
+
guidance: typeof data?.guidance === "string" ? data.guidance : "Present your canonical ASTRA-* id (discover it via GET /api/agents/request-registration/{requestId} after owner approval)."
|
|
4323
|
+
}
|
|
4324
|
+
]
|
|
4325
|
+
}
|
|
4326
|
+
};
|
|
4327
|
+
}
|
|
4302
4328
|
if (!response.ok) {
|
|
4303
4329
|
if (response.status === 401) {
|
|
4304
4330
|
return {
|
|
@@ -4438,7 +4464,7 @@ async function verify(config, request, options) {
|
|
|
4438
4464
|
name: apiResponse.agent.name,
|
|
4439
4465
|
trustScore: apiResponse.agent.trustScore,
|
|
4440
4466
|
trustLevel: getTrustLevel(apiResponse.agent.trustScore),
|
|
4441
|
-
|
|
4467
|
+
blockchainAnchored: apiResponse.agent.blockchainStatus === "anchored",
|
|
4442
4468
|
status: apiResponse.agent.agentStatus
|
|
4443
4469
|
} : void 0;
|
|
4444
4470
|
const developer = apiResponse.developer ? {
|
|
@@ -4527,7 +4553,7 @@ var DEFAULT_EDGE_CONFIG = Object.freeze({
|
|
|
4527
4553
|
mode: "observe",
|
|
4528
4554
|
depth: "classify",
|
|
4529
4555
|
pathRules: [],
|
|
4530
|
-
sampling: Object.freeze({ anonymousBeaconRate:
|
|
4556
|
+
sampling: Object.freeze({ anonymousBeaconRate: 1 }),
|
|
4531
4557
|
failurePosture: "open"
|
|
4532
4558
|
});
|
|
4533
4559
|
var DEFAULT_TTL_MS = 60 * 1e3;
|