@astrasyncai/verification-gateway 2.3.9 → 2.4.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 +64 -9
- 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 +6 -0
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +6 -0
- 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 +44 -4
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +44 -4
- 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 +6 -0
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +6 -0
- 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 +6 -0
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +6 -0
- 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/bin/astrasync.js +348 -0
- package/dist/browser/background.js +6 -0
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +6 -0
- 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 +6 -0
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +6 -0
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/{express-BiB51d5t.d.mts → express-4Vau6x6X.d.mts} +1 -1
- package/dist/{express-D6tEDU08.d.ts → express-Nq-wWICa.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 +6 -0
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +6 -0
- 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-8DFMpITk.d.ts → index-B-EovXnY.d.ts} +1 -1
- package/dist/{index-Yt02MRyu.d.ts → index-CxwCN7AC.d.ts} +1 -1
- package/dist/{index-CAykfMWK.d.mts → index-DiToN8gh.d.mts} +1 -1
- package/dist/{index-B--6fiDp.d.mts → index-DkyPV14Y.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- 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-CpxqfQqD.d.mts → nextjs-BTR7Oix-.d.mts} +1 -1
- package/dist/{nextjs-CK5F_tVZ.d.ts → nextjs-DO_4crcp.d.ts} +1 -1
- package/dist/registration/index.d.mts +218 -0
- package/dist/registration/index.d.ts +218 -0
- package/dist/registration/index.js +212 -0
- package/dist/registration/index.js.map +1 -0
- package/dist/registration/index.mjs +172 -0
- package/dist/registration/index.mjs.map +1 -0
- package/dist/{sdk-yJjO7yzn.d.mts → sdk-DSLCyXIX.d.mts} +1 -1
- package/dist/{sdk-BMvauMgP.d.ts → sdk-TnHXD-Oh.d.ts} +1 -1
- package/dist/transport/index.d.mts +2 -2
- package/dist/transport/index.d.ts +2 -2
- package/dist/{types-UYT4GdPW.d.mts → types-BVp22KkN.d.mts} +12 -0
- package/dist/{types-UYT4GdPW.d.ts → types-BVp22KkN.d.ts} +12 -0
- package/dist/{types-ppkhdldJ.d.ts → types-DVCWReEN.d.ts} +1 -1
- package/dist/{types-CKafuHDn.d.mts → types-pU2O0BFq.d.mts} +1 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/package.json +14 -2
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
25
|
+
|
|
26
|
+
// src/registration/errors.ts
|
|
27
|
+
var AstraSyncError = class extends Error {
|
|
28
|
+
constructor(message, statusCode, code) {
|
|
29
|
+
super(message);
|
|
30
|
+
this.name = "AstraSyncError";
|
|
31
|
+
this.statusCode = statusCode;
|
|
32
|
+
this.code = code;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var KYDRequiredError = class extends AstraSyncError {
|
|
36
|
+
constructor(response) {
|
|
37
|
+
const kydUrl = response.kydUrl || "https://astrasync.ai/developer-profile";
|
|
38
|
+
super(
|
|
39
|
+
`KYD verification required before registering agents.
|
|
40
|
+
Complete your KYD profile at: ${kydUrl}`,
|
|
41
|
+
403,
|
|
42
|
+
"KYD_REQUIRED"
|
|
43
|
+
);
|
|
44
|
+
this.name = "KYDRequiredError";
|
|
45
|
+
this.kydUrl = kydUrl;
|
|
46
|
+
this.ownerNotified = response.ownerNotified || false;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var AuthenticationError = class extends AstraSyncError {
|
|
50
|
+
constructor(message) {
|
|
51
|
+
super(message, 401, "AUTH_FAILED");
|
|
52
|
+
this.name = "AuthenticationError";
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// src/registration/api.ts
|
|
57
|
+
var DEFAULT_BASE_URL = "https://astrasync.ai";
|
|
58
|
+
var AstraSync = class {
|
|
59
|
+
constructor(config = {}) {
|
|
60
|
+
this.baseUrl = (config.baseUrl || process.env.ASTRASYNC_API_URL || DEFAULT_BASE_URL).replace(
|
|
61
|
+
/\/+$/,
|
|
62
|
+
""
|
|
63
|
+
);
|
|
64
|
+
this.apiKey = config.apiKey || process.env.ASTRASYNC_API_KEY;
|
|
65
|
+
this.email = config.email;
|
|
66
|
+
this.password = config.password;
|
|
67
|
+
this.privateKey = config.privateKey;
|
|
68
|
+
if (!this.apiKey && !this.email) {
|
|
69
|
+
throw new AuthenticationError(
|
|
70
|
+
"Authentication required. Provide apiKey, or email+password. Set ASTRASYNC_API_KEY env var or pass config to constructor."
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
if (this.email && !this.password) {
|
|
74
|
+
throw new AuthenticationError("Password is required when using email authentication.");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Register a new AI agent on the AstraSync KYA Platform.
|
|
79
|
+
* Sends full payload including model, framework, PDLSS, and metadata.
|
|
80
|
+
*/
|
|
81
|
+
async register(options) {
|
|
82
|
+
const body = {
|
|
83
|
+
name: options.name,
|
|
84
|
+
...options.description && { description: options.description },
|
|
85
|
+
...options.agentType && { agentType: options.agentType },
|
|
86
|
+
...options.apiEndpoint && { apiEndpoint: options.apiEndpoint },
|
|
87
|
+
...options.model && { model: options.model },
|
|
88
|
+
...options.framework && { framework: options.framework },
|
|
89
|
+
...options.protocols && { protocols: options.protocols },
|
|
90
|
+
...options.metadata && { metadata: options.metadata },
|
|
91
|
+
...options.pdlss && { pdlss: options.pdlss }
|
|
92
|
+
};
|
|
93
|
+
return this.request("POST", "/api/agents/register", body);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Look up an agent's public profile by ASTRA ID or UUID.
|
|
97
|
+
*/
|
|
98
|
+
async verify(agentId) {
|
|
99
|
+
return this.request("GET", `/api/agents/verify/${agentId}`);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Check API health.
|
|
103
|
+
*/
|
|
104
|
+
async health() {
|
|
105
|
+
const res = await fetch(`${this.baseUrl}/api/health/`);
|
|
106
|
+
if (!res.ok) {
|
|
107
|
+
throw new AstraSyncError(`Health check failed: ${res.status}`, res.status);
|
|
108
|
+
}
|
|
109
|
+
return res.json();
|
|
110
|
+
}
|
|
111
|
+
// ── Private helpers ──────────────────────────────────────────────
|
|
112
|
+
async request(method, endpoint, body) {
|
|
113
|
+
const url = `${this.baseUrl}${endpoint}`;
|
|
114
|
+
const headers = {
|
|
115
|
+
"Content-Type": "application/json"
|
|
116
|
+
};
|
|
117
|
+
const token = await this.getAuthToken();
|
|
118
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
119
|
+
if (this.privateKey) {
|
|
120
|
+
const signature = await this.signRequest(method, endpoint, body || {});
|
|
121
|
+
headers["X-AstraSync-Signature"] = signature;
|
|
122
|
+
}
|
|
123
|
+
const res = await fetch(url, {
|
|
124
|
+
method,
|
|
125
|
+
headers,
|
|
126
|
+
...body ? { body: JSON.stringify(body) } : {}
|
|
127
|
+
});
|
|
128
|
+
if (!res.ok) {
|
|
129
|
+
const errorBody = await res.json().catch(() => ({ error: res.statusText }));
|
|
130
|
+
if (res.status === 403 && errorBody.code === "KYD_REQUIRED") {
|
|
131
|
+
throw new KYDRequiredError(errorBody);
|
|
132
|
+
}
|
|
133
|
+
throw new AstraSyncError(
|
|
134
|
+
errorBody.error || `Request failed: ${res.status}`,
|
|
135
|
+
res.status,
|
|
136
|
+
errorBody.code
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return res.json();
|
|
140
|
+
}
|
|
141
|
+
async getAuthToken() {
|
|
142
|
+
if (this.apiKey) {
|
|
143
|
+
return this.apiKey;
|
|
144
|
+
}
|
|
145
|
+
if (this.cachedJwt && this.jwtExpiresAt && Date.now() < this.jwtExpiresAt) {
|
|
146
|
+
return this.cachedJwt;
|
|
147
|
+
}
|
|
148
|
+
const res = await fetch(`${this.baseUrl}/api/auth/login`, {
|
|
149
|
+
method: "POST",
|
|
150
|
+
headers: { "Content-Type": "application/json" },
|
|
151
|
+
body: JSON.stringify({ email: this.email, password: this.password })
|
|
152
|
+
});
|
|
153
|
+
if (!res.ok) {
|
|
154
|
+
const errorBody = await res.json().catch(() => ({}));
|
|
155
|
+
throw new AuthenticationError(
|
|
156
|
+
errorBody.message || errorBody.error || "Login failed"
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
const data = await res.json();
|
|
160
|
+
this.cachedJwt = data.data.token;
|
|
161
|
+
this.jwtExpiresAt = Date.now() + 6 * 24 * 60 * 60 * 1e3;
|
|
162
|
+
return this.cachedJwt;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Sign a request using secp256k1 (ethers.js).
|
|
166
|
+
* Canonical message format: METHOD:ENDPOINT:SORTED_JSON_BODY
|
|
167
|
+
* Must match apps/backend/src/services/signature-verify.service.ts exactly.
|
|
168
|
+
*/
|
|
169
|
+
async signRequest(method, endpoint, body) {
|
|
170
|
+
const { Wallet } = await import("ethers");
|
|
171
|
+
const sorted = this.sortObjectKeys(body);
|
|
172
|
+
const canonical = `${method}:${endpoint}:${JSON.stringify(sorted)}`;
|
|
173
|
+
const wallet = new Wallet(this.privateKey);
|
|
174
|
+
return wallet.signMessage(canonical);
|
|
175
|
+
}
|
|
176
|
+
/** Recursively sort object keys for canonical JSON representation. */
|
|
177
|
+
sortObjectKeys(obj) {
|
|
178
|
+
if (obj === null || typeof obj !== "object") {
|
|
179
|
+
return obj;
|
|
180
|
+
}
|
|
181
|
+
if (Array.isArray(obj)) {
|
|
182
|
+
return obj.map((item) => this.sortObjectKeys(item));
|
|
183
|
+
}
|
|
184
|
+
const sorted = {};
|
|
185
|
+
for (const key of Object.keys(obj).sort()) {
|
|
186
|
+
sorted[key] = this.sortObjectKeys(obj[key]);
|
|
187
|
+
}
|
|
188
|
+
return sorted;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// src/bin/astrasync.ts
|
|
193
|
+
function usage() {
|
|
194
|
+
console.log(`
|
|
195
|
+
astrasync - AstraSync KYA Platform CLI
|
|
196
|
+
|
|
197
|
+
USAGE:
|
|
198
|
+
astrasync [options] <command> [args]
|
|
199
|
+
|
|
200
|
+
GLOBAL OPTIONS:
|
|
201
|
+
--api-key <key> API key (kya_ prefixed). Also reads ASTRASYNC_API_KEY env.
|
|
202
|
+
--email <email> Email for login auth
|
|
203
|
+
--password <pass> Password for login auth
|
|
204
|
+
--private-key <key> secp256k1 private key for crypto signing
|
|
205
|
+
--base-url <url> API base URL (default: https://astrasync.ai; use https://staging.astrasync.ai for staging)
|
|
206
|
+
--help Show this help message
|
|
207
|
+
|
|
208
|
+
COMMANDS:
|
|
209
|
+
register Register a new AI agent
|
|
210
|
+
verify <id> Look up an agent by ASTRA ID or UUID
|
|
211
|
+
health Check API health
|
|
212
|
+
|
|
213
|
+
REGISTER OPTIONS:
|
|
214
|
+
--name <name> Agent name (required)
|
|
215
|
+
--description <desc> Agent description
|
|
216
|
+
--agent-type <type> Agent type (default: general)
|
|
217
|
+
--api-endpoint <url> Agent API endpoint URL
|
|
218
|
+
--model-name <name> LLM model name (e.g. claude-opus-4.6)
|
|
219
|
+
--model-provider <provider> Model provider (e.g. anthropic, openai)
|
|
220
|
+
--model-type <type> Model type (default: llm)
|
|
221
|
+
--framework-name <name> Framework name (e.g. langchain, crewai)
|
|
222
|
+
--framework-version <ver> Framework version
|
|
223
|
+
|
|
224
|
+
EXAMPLES:
|
|
225
|
+
astrasync --api-key kya_xxx register --name "My Agent"
|
|
226
|
+
astrasync register --name "My Agent" --model-name gpt-4o --model-provider openai
|
|
227
|
+
astrasync verify ASTRA-abc123
|
|
228
|
+
astrasync health
|
|
229
|
+
`);
|
|
230
|
+
}
|
|
231
|
+
function parseArgs(args) {
|
|
232
|
+
const globals = {};
|
|
233
|
+
const commandArgs = {};
|
|
234
|
+
let command = "";
|
|
235
|
+
let inCommand = false;
|
|
236
|
+
for (let i = 0; i < args.length; i++) {
|
|
237
|
+
const arg = args[i];
|
|
238
|
+
if (!inCommand && !arg.startsWith("--")) {
|
|
239
|
+
command = arg;
|
|
240
|
+
inCommand = true;
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if (arg === "--help" || arg === "-h") {
|
|
244
|
+
globals["help"] = "true";
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
if (arg.startsWith("--")) {
|
|
248
|
+
const key = arg.slice(2);
|
|
249
|
+
const value = args[++i] || "";
|
|
250
|
+
if (inCommand) {
|
|
251
|
+
commandArgs[key] = value;
|
|
252
|
+
} else {
|
|
253
|
+
globals[key] = value;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return { globals, command, commandArgs };
|
|
258
|
+
}
|
|
259
|
+
async function main() {
|
|
260
|
+
const { globals, command, commandArgs } = parseArgs(process.argv.slice(2));
|
|
261
|
+
if (globals["help"] || !command) {
|
|
262
|
+
usage();
|
|
263
|
+
process.exit(command ? 0 : 1);
|
|
264
|
+
}
|
|
265
|
+
const config = {
|
|
266
|
+
apiKey: globals["api-key"],
|
|
267
|
+
email: globals["email"],
|
|
268
|
+
password: globals["password"],
|
|
269
|
+
privateKey: globals["private-key"],
|
|
270
|
+
baseUrl: globals["base-url"]
|
|
271
|
+
};
|
|
272
|
+
try {
|
|
273
|
+
if (command === "health") {
|
|
274
|
+
const client2 = new AstraSync({
|
|
275
|
+
apiKey: config.apiKey || "health-check",
|
|
276
|
+
baseUrl: config.baseUrl
|
|
277
|
+
});
|
|
278
|
+
const result = await client2.health();
|
|
279
|
+
console.log(JSON.stringify(result, null, 2));
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
const client = new AstraSync({
|
|
283
|
+
apiKey: config.apiKey,
|
|
284
|
+
email: config.email,
|
|
285
|
+
password: config.password,
|
|
286
|
+
privateKey: config.privateKey,
|
|
287
|
+
baseUrl: config.baseUrl
|
|
288
|
+
});
|
|
289
|
+
if (command === "register") {
|
|
290
|
+
const name = commandArgs["name"];
|
|
291
|
+
if (!name) {
|
|
292
|
+
console.error("Error: --name is required for register command");
|
|
293
|
+
process.exit(1);
|
|
294
|
+
}
|
|
295
|
+
const options = {
|
|
296
|
+
name,
|
|
297
|
+
...commandArgs["description"] && { description: commandArgs["description"] },
|
|
298
|
+
...commandArgs["agent-type"] && { agentType: commandArgs["agent-type"] },
|
|
299
|
+
...commandArgs["api-endpoint"] && { apiEndpoint: commandArgs["api-endpoint"] }
|
|
300
|
+
};
|
|
301
|
+
if (commandArgs["model-name"] && commandArgs["model-provider"]) {
|
|
302
|
+
options.model = {
|
|
303
|
+
modelName: commandArgs["model-name"],
|
|
304
|
+
modelProvider: commandArgs["model-provider"],
|
|
305
|
+
...commandArgs["model-type"] && {
|
|
306
|
+
modelType: commandArgs["model-type"]
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
if (commandArgs["framework-name"] && commandArgs["framework-version"]) {
|
|
311
|
+
options.framework = {
|
|
312
|
+
frameworkName: commandArgs["framework-name"],
|
|
313
|
+
frameworkVersion: commandArgs["framework-version"]
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const result = await client.register(options);
|
|
317
|
+
console.log(JSON.stringify(result, null, 2));
|
|
318
|
+
} else if (command === "verify") {
|
|
319
|
+
const agentId = commandArgs["id"] || process.argv[process.argv.length - 1];
|
|
320
|
+
if (!agentId || agentId.startsWith("--")) {
|
|
321
|
+
console.error("Error: agent ID is required for verify command");
|
|
322
|
+
process.exit(1);
|
|
323
|
+
}
|
|
324
|
+
const result = await client.verify(agentId);
|
|
325
|
+
console.log(JSON.stringify(result, null, 2));
|
|
326
|
+
} else {
|
|
327
|
+
console.error(`Unknown command: ${command}`);
|
|
328
|
+
usage();
|
|
329
|
+
process.exit(1);
|
|
330
|
+
}
|
|
331
|
+
} catch (error) {
|
|
332
|
+
if (error instanceof KYDRequiredError) {
|
|
333
|
+
console.error(`
|
|
334
|
+
Error: ${error.message}`);
|
|
335
|
+
if (error.ownerNotified) {
|
|
336
|
+
console.error("A reminder email has been sent to your registered email address.");
|
|
337
|
+
}
|
|
338
|
+
process.exit(1);
|
|
339
|
+
}
|
|
340
|
+
if (error instanceof AstraSyncError) {
|
|
341
|
+
console.error(`
|
|
342
|
+
Error [${error.code || error.statusCode}]: ${error.message}`);
|
|
343
|
+
process.exit(1);
|
|
344
|
+
}
|
|
345
|
+
throw error;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
main();
|
|
@@ -3518,6 +3518,9 @@ async function verify(config, request) {
|
|
|
3518
3518
|
verifiedAt: /* @__PURE__ */ new Date(),
|
|
3519
3519
|
// Extract sessionId so decisions can be recorded for denials too
|
|
3520
3520
|
sessionId: apiResponse.sessionId,
|
|
3521
|
+
// v2.3.10 (defect #34, round-4): anonymous traffic has no session →
|
|
3522
|
+
// correlationId is the linking key for paired local_override events.
|
|
3523
|
+
correlationId: apiResponse.correlationId,
|
|
3521
3524
|
recommendation: apiResponse.recommendation,
|
|
3522
3525
|
recommendationReasons: apiResponse.recommendationReasons
|
|
3523
3526
|
};
|
|
@@ -3558,6 +3561,9 @@ async function verify(config, request) {
|
|
|
3558
3561
|
cacheTtl: mergedConfig.cacheTtl,
|
|
3559
3562
|
// Handshake Protocol v10 enhanced fields (present when backend returns them)
|
|
3560
3563
|
sessionId: apiResponse.sessionId,
|
|
3564
|
+
// v2.3.10 (defect #34, round-4): anonymous responses surface correlationId
|
|
3565
|
+
// (no session row exists for unverified callers).
|
|
3566
|
+
correlationId: apiResponse.correlationId,
|
|
3561
3567
|
runtimeChallenge: apiResponse.runtimeChallenge,
|
|
3562
3568
|
tokenGuidance: apiResponse.tokenGuidance,
|
|
3563
3569
|
recommendation: apiResponse.recommendation,
|