@adcp/sdk 16.0.0-beta.2 → 16.0.0-beta.4
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 +54 -0
- package/dist/lib/auth/oauth/diagnose.js +3 -11
- package/dist/lib/auth/oauth/diagnose.mjs +4 -12
- package/dist/lib/auth/oauth/diagnostics.d.mts +2 -1
- package/dist/lib/auth/oauth/diagnostics.d.ts +2 -1
- package/dist/lib/auth/oauth/diagnostics.js +8 -10
- package/dist/lib/auth/oauth/diagnostics.mjs +7 -10
- package/dist/lib/core/ConversationTypes.d.mts +8 -3
- package/dist/lib/core/ConversationTypes.d.ts +8 -3
- package/dist/lib/core/SingleAgentClient.d.mts +5 -3
- package/dist/lib/core/SingleAgentClient.d.ts +5 -3
- package/dist/lib/core/TaskExecutor.js +5 -1
- package/dist/lib/core/TaskExecutor.mjs +5 -1
- package/dist/lib/errors/index.d.mts +9 -4
- package/dist/lib/errors/index.d.ts +9 -4
- package/dist/lib/index.d.mts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +8 -0
- package/dist/lib/index.mjs +14 -2
- package/dist/lib/negotiation/types.d.mts +20 -39
- package/dist/lib/negotiation/types.d.ts +20 -39
- package/dist/lib/protocols/index.d.mts +60 -24
- package/dist/lib/protocols/index.d.ts +60 -24
- package/dist/lib/protocols/index.js +9 -4
- package/dist/lib/protocols/index.mjs +3 -0
- package/dist/lib/protocols/mcp-modern.js +1 -0
- package/dist/lib/protocols/mcp-modern.mjs +2 -1
- package/dist/lib/protocols/mcp.js +1 -0
- package/dist/lib/protocols/mcp.mjs +2 -1
- package/dist/lib/protocols/responseSizeLimit.d.mts +91 -5
- package/dist/lib/protocols/responseSizeLimit.d.ts +91 -5
- package/dist/lib/protocols/responseSizeLimit.js +195 -31
- package/dist/lib/protocols/responseSizeLimit.mjs +192 -31
- package/dist/lib/reporting/consumer-runtime.js +2 -1
- package/dist/lib/reporting/consumer-runtime.mjs +2 -1
- package/dist/lib/reporting/ledger/handler.js +50 -11
- package/dist/lib/reporting/ledger/handler.mjs +50 -12
- package/dist/lib/reporting/ledger/index.d.mts +17 -14
- package/dist/lib/reporting/ledger/index.d.ts +17 -14
- package/dist/lib/reporting/ledger/index.js +32 -20
- package/dist/lib/reporting/ledger/index.mjs +21 -10
- package/dist/lib/reporting/ledger/offering-validation.d.mts +9 -0
- package/dist/lib/reporting/ledger/offering-validation.d.ts +9 -0
- package/dist/lib/reporting/{gcs/bucket-policy.js → ledger/offering-validation.js} +9 -8
- package/dist/lib/reporting/ledger/offering-validation.mjs +8 -0
- package/dist/lib/reporting/ledger/receipts.d.mts +48 -0
- package/dist/lib/reporting/ledger/receipts.d.ts +48 -0
- package/dist/lib/reporting/ledger/receipts.js +186 -0
- package/dist/lib/reporting/ledger/receipts.mjs +161 -0
- package/dist/lib/reporting/ledger/status-ingest.js +3 -3
- package/dist/lib/reporting/ledger/status-ingest.mjs +4 -5
- package/dist/lib/reporting/ledger/types.d.mts +43 -0
- package/dist/lib/reporting/ledger/types.d.ts +43 -0
- package/dist/lib/reporting/ledger/types.js +31 -2
- package/dist/lib/reporting/ledger/types.mjs +26 -1
- package/dist/lib/reporting/pagination.d.mts +6 -0
- package/dist/lib/reporting/pagination.d.ts +6 -0
- package/dist/lib/reporting/{gcs/errors.js → pagination.js} +12 -17
- package/dist/lib/reporting/pagination.mjs +12 -0
- package/dist/lib/reporting/reconciliation.d.mts +1 -0
- package/dist/lib/reporting/reconciliation.d.ts +1 -0
- package/dist/lib/reporting/reconciliation.js +3 -2
- package/dist/lib/reporting/reconciliation.mjs +3 -2
- package/dist/lib/reporting/service/index.d.mts +79 -153
- package/dist/lib/reporting/service/index.d.ts +79 -153
- package/dist/lib/reporting/service/index.js +34 -491
- package/dist/lib/reporting/service/index.mjs +36 -510
- package/dist/lib/reporting/service/scheduler-support.d.mts +43 -0
- package/dist/lib/reporting/service/scheduler-support.d.ts +43 -0
- package/dist/lib/reporting/service/scheduler-support.js +125 -0
- package/dist/lib/reporting/service/scheduler-support.mjs +96 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/signing/canonicalize.d.mts +4 -0
- package/dist/lib/signing/canonicalize.d.ts +4 -0
- package/dist/lib/signing/canonicalize.js +14 -8
- package/dist/lib/signing/canonicalize.mjs +14 -8
- package/dist/lib/signing/content-digest.d.mts +8 -0
- package/dist/lib/signing/content-digest.d.ts +8 -0
- package/dist/lib/signing/content-digest.js +11 -5
- package/dist/lib/signing/content-digest.mjs +10 -5
- package/dist/lib/signing/crypto.d.mts +15 -0
- package/dist/lib/signing/crypto.d.ts +15 -0
- package/dist/lib/signing/crypto.js +75 -3
- package/dist/lib/signing/crypto.mjs +78 -3
- package/dist/lib/signing/server.d.mts +1 -1
- package/dist/lib/signing/server.d.ts +1 -1
- package/dist/lib/signing/server.js +2 -0
- package/dist/lib/signing/server.mjs +2 -1
- package/dist/lib/signing/signer.js +11 -14
- package/dist/lib/signing/signer.mjs +13 -16
- package/dist/lib/signing/testing.js +2 -6
- package/dist/lib/signing/testing.mjs +3 -7
- package/dist/lib/signing/verifier.js +2 -2
- package/dist/lib/signing/verifier.mjs +3 -3
- package/dist/lib/signing/web-bot-auth.js +122 -43
- package/dist/lib/signing/web-bot-auth.mjs +128 -44
- package/dist/lib/signing/webhook-verifier.js +2 -2
- package/dist/lib/signing/webhook-verifier.mjs +3 -3
- package/dist/lib/substitution/compile.js +2 -1
- package/dist/lib/substitution/compile.mjs +2 -1
- package/dist/lib/substitution/consent-macros.d.mts +4 -0
- package/dist/lib/substitution/consent-macros.d.ts +4 -0
- package/dist/lib/substitution/consent-macros.js +45 -0
- package/dist/lib/substitution/consent-macros.mjs +20 -0
- package/dist/lib/substitution/index.d.mts +1 -1
- package/dist/lib/substitution/index.d.ts +1 -1
- package/dist/lib/substitution/index.js +2 -0
- package/dist/lib/substitution/index.mjs +2 -1
- package/dist/lib/substitution/translate.d.mts +15 -2
- package/dist/lib/substitution/translate.d.ts +15 -2
- package/dist/lib/substitution/translate.js +148 -26
- package/dist/lib/substitution/translate.mjs +147 -26
- package/dist/lib/testing/client.js +2 -1
- package/dist/lib/testing/client.mjs +2 -1
- package/dist/lib/testing/scenarios/capabilities.js +1 -1
- package/dist/lib/testing/scenarios/capabilities.mjs +1 -1
- package/dist/lib/testing/storyboard/junit.js +16 -3
- package/dist/lib/testing/storyboard/junit.mjs +16 -3
- package/dist/lib/testing/storyboard/request-signing/builder.js +12 -14
- package/dist/lib/testing/storyboard/request-signing/builder.mjs +13 -15
- package/dist/lib/testing/storyboard/runner.js +94 -25
- package/dist/lib/testing/storyboard/runner.mjs +94 -25
- package/dist/lib/testing/storyboard/signer-grader/grader.js +2 -7
- package/dist/lib/testing/storyboard/signer-grader/grader.mjs +2 -7
- package/dist/lib/testing/storyboard/types.d.mts +6 -0
- package/dist/lib/testing/storyboard/types.d.ts +6 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/enums.generated.d.mts +3 -0
- package/dist/lib/types/enums.generated.d.ts +3 -0
- package/dist/lib/types/enums.generated.js +9 -0
- package/dist/lib/types/enums.generated.mjs +6 -0
- package/dist/lib/validation/schema-loader.js +25 -0
- package/dist/lib/validation/schema-loader.mjs +24 -0
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +28 -5
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +3 -2
- package/docs/guides/REPORTING-GCS-FENCE.md +3 -3
- package/docs/guides/REPORTING-GCS-MANAGED.md +4 -4
- package/docs/guides/REPORTING-LEDGER-CUTOVER.md +7 -7
- package/docs/guides/REPORTING-LEDGER.md +107 -51
- package/docs/guides/REPORTING-OPERATIONS.md +66 -5
- package/docs/guides/REPORTING-STABILITY.md +36 -32
- package/docs/guides/UNIVERSAL-MACRO-COMPILATION.md +38 -0
- package/docs/guides/VALIDATE-YOUR-AGENT.md +12 -0
- package/docs/llms.txt +4 -3
- package/docs/migration-14.x-rc-worksheet.md +4 -7
- package/docs/migration-reporting-storage-package.md +186 -0
- package/examples/README.md +1 -1
- package/package.json +14 -78
- package/dist/lib/reporting/azure/index.d.mts +0 -31
- package/dist/lib/reporting/azure/index.d.ts +0 -31
- package/dist/lib/reporting/azure/index.js +0 -266
- package/dist/lib/reporting/azure/index.mjs +0 -249
- package/dist/lib/reporting/bigquery/index.d.mts +0 -246
- package/dist/lib/reporting/bigquery/index.d.ts +0 -246
- package/dist/lib/reporting/bigquery/index.js +0 -633
- package/dist/lib/reporting/bigquery/index.mjs +0 -594
- package/dist/lib/reporting/gcs/adapter.d.mts +0 -38
- package/dist/lib/reporting/gcs/adapter.d.ts +0 -38
- package/dist/lib/reporting/gcs/adapter.js +0 -342
- package/dist/lib/reporting/gcs/adapter.mjs +0 -325
- package/dist/lib/reporting/gcs/bucket-policy.d.mts +0 -3
- package/dist/lib/reporting/gcs/bucket-policy.d.ts +0 -3
- package/dist/lib/reporting/gcs/bucket-policy.mjs +0 -7
- package/dist/lib/reporting/gcs/errors.d.mts +0 -11
- package/dist/lib/reporting/gcs/errors.d.ts +0 -11
- package/dist/lib/reporting/gcs/errors.mjs +0 -16
- package/dist/lib/reporting/gcs/fence.d.mts +0 -41
- package/dist/lib/reporting/gcs/fence.d.ts +0 -41
- package/dist/lib/reporting/gcs/fence.js +0 -250
- package/dist/lib/reporting/gcs/fence.mjs +0 -230
- package/dist/lib/reporting/gcs/index.d.mts +0 -18
- package/dist/lib/reporting/gcs/index.d.ts +0 -18
- package/dist/lib/reporting/gcs/index.js +0 -44
- package/dist/lib/reporting/gcs/index.mjs +0 -14
- package/dist/lib/reporting/gcs/io.d.mts +0 -7
- package/dist/lib/reporting/gcs/io.d.ts +0 -7
- package/dist/lib/reporting/gcs/io.js +0 -95
- package/dist/lib/reporting/gcs/io.mjs +0 -69
- package/dist/lib/reporting/gcs/reader.d.mts +0 -67
- package/dist/lib/reporting/gcs/reader.d.ts +0 -67
- package/dist/lib/reporting/gcs/reader.js +0 -193
- package/dist/lib/reporting/gcs/reader.mjs +0 -169
- package/dist/lib/reporting/gcs/row-provider.d.mts +0 -39
- package/dist/lib/reporting/gcs/row-provider.d.ts +0 -39
- package/dist/lib/reporting/gcs/row-provider.js +0 -225
- package/dist/lib/reporting/gcs/row-provider.mjs +0 -208
- package/dist/lib/reporting/gcs/validation.d.mts +0 -5
- package/dist/lib/reporting/gcs/validation.d.ts +0 -5
- package/dist/lib/reporting/gcs/validation.js +0 -49
- package/dist/lib/reporting/gcs/validation.mjs +0 -25
- package/dist/lib/reporting/ledger/change-feed.d.mts +0 -69
- package/dist/lib/reporting/ledger/change-feed.d.ts +0 -69
- package/dist/lib/reporting/ledger/change-feed.js +0 -107
- package/dist/lib/reporting/ledger/change-feed.mjs +0 -80
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +0 -293
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +0 -293
- package/dist/lib/reporting/ledger/managed-postgres.js +0 -2346
- package/dist/lib/reporting/ledger/managed-postgres.mjs +0 -2332
- package/dist/lib/reporting/ledger/managed-router.d.mts +0 -148
- package/dist/lib/reporting/ledger/managed-router.d.ts +0 -148
- package/dist/lib/reporting/ledger/managed-router.js +0 -280
- package/dist/lib/reporting/ledger/managed-router.mjs +0 -258
- package/dist/lib/reporting/ledger/managed.d.mts +0 -535
- package/dist/lib/reporting/ledger/managed.d.ts +0 -535
- package/dist/lib/reporting/ledger/managed.js +0 -761
- package/dist/lib/reporting/ledger/managed.mjs +0 -729
- package/dist/lib/reporting/ledger/notification-activity.d.mts +0 -332
- package/dist/lib/reporting/ledger/notification-activity.d.ts +0 -332
- package/dist/lib/reporting/ledger/notification-activity.js +0 -1366
- package/dist/lib/reporting/ledger/notification-activity.mjs +0 -1337
- package/dist/lib/reporting/ledger/object-writes.d.mts +0 -128
- package/dist/lib/reporting/ledger/object-writes.d.ts +0 -128
- package/dist/lib/reporting/ledger/object-writes.js +0 -147
- package/dist/lib/reporting/ledger/object-writes.mjs +0 -114
- package/dist/lib/reporting/ledger/postgres.d.mts +0 -689
- package/dist/lib/reporting/ledger/postgres.d.ts +0 -689
- package/dist/lib/reporting/ledger/postgres.js +0 -4462
- package/dist/lib/reporting/ledger/postgres.mjs +0 -4462
- package/dist/lib/reporting/ledger/row-storage-migration.d.mts +0 -59
- package/dist/lib/reporting/ledger/row-storage-migration.d.ts +0 -59
- package/dist/lib/reporting/ledger/row-storage-migration.js +0 -365
- package/dist/lib/reporting/ledger/row-storage-migration.mjs +0 -339
- package/dist/lib/reporting/ledger/row-storage-object.d.mts +0 -203
- package/dist/lib/reporting/ledger/row-storage-object.d.ts +0 -203
- package/dist/lib/reporting/ledger/row-storage-object.js +0 -379
- package/dist/lib/reporting/ledger/row-storage-object.mjs +0 -335
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.mts +0 -44
- package/dist/lib/reporting/ledger/row-storage-provider-io.d.ts +0 -44
- package/dist/lib/reporting/ledger/row-storage-provider-io.js +0 -142
- package/dist/lib/reporting/ledger/row-storage-provider-io.mjs +0 -111
- package/dist/lib/reporting/ledger/row-storage.d.mts +0 -316
- package/dist/lib/reporting/ledger/row-storage.d.ts +0 -316
- package/dist/lib/reporting/ledger/row-storage.js +0 -812
- package/dist/lib/reporting/ledger/row-storage.mjs +0 -802
- package/dist/lib/reporting/s3/index.d.mts +0 -34
- package/dist/lib/reporting/s3/index.d.ts +0 -34
- package/dist/lib/reporting/s3/index.js +0 -347
- package/dist/lib/reporting/s3/index.mjs +0 -340
- package/dist/lib/reporting/service/maintenance.d.mts +0 -148
- package/dist/lib/reporting/service/maintenance.d.ts +0 -148
- package/dist/lib/reporting/service/maintenance.js +0 -185
- package/dist/lib/reporting/service/maintenance.mjs +0 -159
- package/examples/reliable-reporting-service/README.md +0 -169
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
import { encodeUnreserved } from "./rfc3986.mjs";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { isConsentMacro, isVendorScopedConsentMacro } from "./consent-macros.mjs";
|
|
3
|
+
function* macroTokens(text) {
|
|
4
|
+
const missingClosers = /* @__PURE__ */ new Set();
|
|
5
|
+
let cursor = 0;
|
|
6
|
+
while (cursor < text.length) {
|
|
7
|
+
let end = -1;
|
|
8
|
+
let native = true;
|
|
9
|
+
const close = text.startsWith("%%", cursor) ? "%%" : text.startsWith("{{", cursor) ? "}}" : text.startsWith("${", cursor) ? "}" : null;
|
|
10
|
+
if (close && !missingClosers.has(close)) {
|
|
11
|
+
const closer = text.indexOf(close, cursor + 2);
|
|
12
|
+
if (closer === -1) missingClosers.add(close);
|
|
13
|
+
else end = closer + close.length;
|
|
14
|
+
}
|
|
15
|
+
if (end === -1 && (text[cursor] === "{" || text[cursor] === "[")) {
|
|
16
|
+
let nameEnd = cursor + 1;
|
|
17
|
+
if (/[A-Z]/.test(text[nameEnd] ?? "")) {
|
|
18
|
+
nameEnd += 1;
|
|
19
|
+
while (/[A-Z0-9_]/.test(text[nameEnd] ?? "")) nameEnd += 1;
|
|
20
|
+
if (text[nameEnd] === (text[cursor] === "{" ? "}" : "]")) {
|
|
21
|
+
end = nameEnd + 1;
|
|
22
|
+
native = text[cursor] === "[";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (end === -1) {
|
|
27
|
+
cursor += 1;
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
yield { text: text.slice(cursor, end), start: cursor, end, native };
|
|
31
|
+
cursor = end;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function hasNativeTokenSyntax(value) {
|
|
35
|
+
for (const token of macroTokens(value)) {
|
|
36
|
+
const minimumLength = token.text.startsWith("${") ? 3 : token.text.startsWith("[") ? 2 : 4;
|
|
37
|
+
if (token.native && token.text.length > minimumLength) return true;
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
12
41
|
const UNSAFE_NATIVE_CHARACTER = /[\u0000-\u001F\u007F]/;
|
|
13
42
|
class UnsafeNativeMappingError extends Error {
|
|
14
43
|
code = "unsafe_native_mapping";
|
|
@@ -22,6 +51,83 @@ class UnsafeNativeMappingError extends Error {
|
|
|
22
51
|
this.macro = macro;
|
|
23
52
|
}
|
|
24
53
|
}
|
|
54
|
+
class MultipleVendorConsentMacrosError extends Error {
|
|
55
|
+
code = "multiple_vendor_consent_macros";
|
|
56
|
+
macro;
|
|
57
|
+
constructor(macro) {
|
|
58
|
+
super(`Multiple vendor-scoped consent macros; second token is ${JSON.stringify(macro)}`);
|
|
59
|
+
this.name = "MultipleVendorConsentMacrosError";
|
|
60
|
+
this.macro = macro;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function overlappingRange(ranges, candidate) {
|
|
64
|
+
let low = 0;
|
|
65
|
+
let high = ranges.length;
|
|
66
|
+
while (low < high) {
|
|
67
|
+
const middle = Math.floor((low + high) / 2);
|
|
68
|
+
if (ranges[middle].end <= candidate.start) low = middle + 1;
|
|
69
|
+
else high = middle;
|
|
70
|
+
}
|
|
71
|
+
const range = ranges[low];
|
|
72
|
+
return range && range.start < candidate.end ? range : void 0;
|
|
73
|
+
}
|
|
74
|
+
function assertSingleScopedConsent(spans, mapping) {
|
|
75
|
+
const url = spans.map((span) => span.text).join("");
|
|
76
|
+
const concrete = [];
|
|
77
|
+
const sources = [];
|
|
78
|
+
let offset = 0;
|
|
79
|
+
for (const span of spans) {
|
|
80
|
+
const range = { start: offset, end: offset + span.text.length };
|
|
81
|
+
if (span.concrete && range.start < range.end) {
|
|
82
|
+
const previous = concrete[concrete.length - 1];
|
|
83
|
+
if (previous?.end === range.start) previous.end = range.end;
|
|
84
|
+
else concrete.push(range);
|
|
85
|
+
}
|
|
86
|
+
if (span.scopedSource && span.text.length > 0) sources.push({ ...range, macro: span.scopedSource });
|
|
87
|
+
offset = range.end;
|
|
88
|
+
}
|
|
89
|
+
const occurrences = [];
|
|
90
|
+
const shells = [];
|
|
91
|
+
for (const token of macroTokens(url)) {
|
|
92
|
+
const range = { start: token.start, end: token.end };
|
|
93
|
+
shells.push(range);
|
|
94
|
+
const canonical = token.text.startsWith("${") ? token.text.slice(1) : token.text;
|
|
95
|
+
if (isVendorScopedConsentMacro(canonical)) {
|
|
96
|
+
occurrences.push({ ...range, macro: canonical });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const aliases = [];
|
|
100
|
+
for (const [macro, entry] of Object.entries(mapping)) {
|
|
101
|
+
if (!isVendorScopedConsentMacro(macro) || !("native" in entry) || entry.native.length === 0) continue;
|
|
102
|
+
let start = url.indexOf(entry.native);
|
|
103
|
+
while (start !== -1) {
|
|
104
|
+
const range = { start, end: start + entry.native.length };
|
|
105
|
+
const shell = overlappingRange(shells, range);
|
|
106
|
+
const completeShell = shell?.start === range.start && shell.end === range.end;
|
|
107
|
+
const insideShell = shell && shell.start <= range.start && range.end <= shell.end && !completeShell;
|
|
108
|
+
const data = overlappingRange(concrete, range);
|
|
109
|
+
const entirelyConcrete = data && data.start <= range.start && range.end <= data.end;
|
|
110
|
+
if (!insideShell && (completeShell || !entirelyConcrete) && !overlappingRange(occurrences, range)) {
|
|
111
|
+
aliases.push({ ...range, macro });
|
|
112
|
+
}
|
|
113
|
+
start = url.indexOf(entry.native, range.end);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
aliases.sort((a, b) => a.start - b.start || b.end - a.end);
|
|
117
|
+
const selectedAliases = [];
|
|
118
|
+
for (const alias of aliases) {
|
|
119
|
+
const previous = selectedAliases[selectedAliases.length - 1];
|
|
120
|
+
if (!previous || previous.end <= alias.start) selectedAliases.push(alias);
|
|
121
|
+
}
|
|
122
|
+
for (const alias of selectedAliases) occurrences.push(alias);
|
|
123
|
+
occurrences.sort((a, b) => a.start - b.start);
|
|
124
|
+
const unmatchedSources = sources.filter((source) => !overlappingRange(occurrences, source));
|
|
125
|
+
for (const source of unmatchedSources) occurrences.push(source);
|
|
126
|
+
occurrences.sort((a, b) => a.start - b.start);
|
|
127
|
+
const second = occurrences[1];
|
|
128
|
+
if (second) throw new MultipleVendorConsentMacrosError(second.macro);
|
|
129
|
+
return url;
|
|
130
|
+
}
|
|
25
131
|
function translateUniversalMacros(input_pixel_url, mapping) {
|
|
26
132
|
const suspect_native_values = [];
|
|
27
133
|
const suspectSeen = /* @__PURE__ */ new Set();
|
|
@@ -34,11 +140,11 @@ function translateUniversalMacros(input_pixel_url, mapping) {
|
|
|
34
140
|
}
|
|
35
141
|
continue;
|
|
36
142
|
}
|
|
37
|
-
if (
|
|
143
|
+
if (isConsentMacro(macro) && !frozenConsentSeen.has(macro)) {
|
|
38
144
|
frozenConsentSeen.add(macro);
|
|
39
145
|
frozen_consent_macros.push(macro);
|
|
40
146
|
}
|
|
41
|
-
if (
|
|
147
|
+
if (hasNativeTokenSyntax(entry.value) && !suspectSeen.has(macro)) {
|
|
42
148
|
suspectSeen.add(macro);
|
|
43
149
|
suspect_native_values.push(macro);
|
|
44
150
|
}
|
|
@@ -49,7 +155,7 @@ function translateUniversalMacros(input_pixel_url, mapping) {
|
|
|
49
155
|
const queryIdx = withoutFragment.indexOf("?");
|
|
50
156
|
if (queryIdx === -1) {
|
|
51
157
|
return {
|
|
52
|
-
url: input_pixel_url,
|
|
158
|
+
url: assertSingleScopedConsent([{ text: input_pixel_url }], mapping),
|
|
53
159
|
dropped_params: [],
|
|
54
160
|
unmapped_macros: [],
|
|
55
161
|
dropped_consent_macros: [],
|
|
@@ -69,12 +175,12 @@ function translateUniversalMacros(input_pixel_url, mapping) {
|
|
|
69
175
|
const eqIdx = rawParam.indexOf("=");
|
|
70
176
|
const key = eqIdx === -1 ? rawParam : rawParam.slice(0, eqIdx);
|
|
71
177
|
const value = eqIdx === -1 ? "" : rawParam.slice(eqIdx + 1);
|
|
72
|
-
const tokens = value.
|
|
73
|
-
if (
|
|
74
|
-
outputParts.push(rawParam);
|
|
178
|
+
const tokens = [...macroTokens(value)].filter((token) => !token.native);
|
|
179
|
+
if (tokens.length === 0) {
|
|
180
|
+
outputParts.push([{ text: rawParam }]);
|
|
75
181
|
continue;
|
|
76
182
|
}
|
|
77
|
-
const missing = tokens.filter((
|
|
183
|
+
const missing = tokens.map((token) => token.text).filter((token) => !(token in mapping));
|
|
78
184
|
if (missing.length > 0) {
|
|
79
185
|
dropped_params.push(key);
|
|
80
186
|
for (const m of missing) {
|
|
@@ -82,24 +188,38 @@ function translateUniversalMacros(input_pixel_url, mapping) {
|
|
|
82
188
|
unmappedSeen.add(m);
|
|
83
189
|
unmapped_macros.push(m);
|
|
84
190
|
}
|
|
85
|
-
if (
|
|
191
|
+
if (isConsentMacro(m) && !consentSeen.has(m)) {
|
|
86
192
|
consentSeen.add(m);
|
|
87
193
|
dropped_consent_macros.push(m);
|
|
88
194
|
}
|
|
89
195
|
}
|
|
90
196
|
continue;
|
|
91
197
|
}
|
|
92
|
-
const translated =
|
|
198
|
+
const translated = [{ text: `${key}=` }];
|
|
199
|
+
let cursor = 0;
|
|
200
|
+
for (const match of tokens) {
|
|
201
|
+
const token = match.text;
|
|
202
|
+
translated.push({ text: value.slice(cursor, match.start) });
|
|
93
203
|
const entry = mapping[token];
|
|
94
|
-
if (
|
|
95
|
-
|
|
204
|
+
if ("native" in entry) {
|
|
205
|
+
translated.push({
|
|
206
|
+
text: entry.native,
|
|
207
|
+
...isVendorScopedConsentMacro(token) ? { scopedSource: token } : {}
|
|
208
|
+
});
|
|
209
|
+
} else {
|
|
210
|
+
translated.push({ text: encodeUnreserved(entry.value), concrete: true });
|
|
96
211
|
}
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
212
|
+
cursor = match.end;
|
|
213
|
+
}
|
|
214
|
+
translated.push({ text: value.slice(cursor) });
|
|
215
|
+
outputParts.push(translated);
|
|
100
216
|
}
|
|
101
|
-
const
|
|
102
|
-
const
|
|
217
|
+
const querySpans = outputParts.flatMap((part, index) => index === 0 ? part : [{ text: "&" }, ...part]);
|
|
218
|
+
const hasQuery = querySpans.some((span) => span.text.length > 0);
|
|
219
|
+
const url = assertSingleScopedConsent(
|
|
220
|
+
[{ text: base }, ...hasQuery ? [{ text: "?" }, ...querySpans] : [], { text: fragment }],
|
|
221
|
+
mapping
|
|
222
|
+
);
|
|
103
223
|
return {
|
|
104
224
|
url,
|
|
105
225
|
dropped_params,
|
|
@@ -110,6 +230,7 @@ function translateUniversalMacros(input_pixel_url, mapping) {
|
|
|
110
230
|
};
|
|
111
231
|
}
|
|
112
232
|
export {
|
|
233
|
+
MultipleVendorConsentMacrosError,
|
|
113
234
|
UnsafeNativeMappingError,
|
|
114
235
|
translateUniversalMacros
|
|
115
236
|
};
|
|
@@ -55,6 +55,7 @@ var import_protocols = require('../protocols/index.js');
|
|
|
55
55
|
var import_node_crypto = require("node:crypto");
|
|
56
56
|
var import_node_async_hooks = require("node:async_hooks");
|
|
57
57
|
var import_client_hooks = require('../validation/client-hooks.js');
|
|
58
|
+
var import_schema_loader = require('../validation/schema-loader.js');
|
|
58
59
|
var import_error_extraction = require('../utils/error-extraction.js');
|
|
59
60
|
var import_client = require('../signing/client.js');
|
|
60
61
|
var import_storage_registry = require('../auth/oauth/storage-registry.js');
|
|
@@ -534,7 +535,7 @@ async function discoverAgentProfile(client, signal, schemaAdcpVersion) {
|
|
|
534
535
|
caps.data,
|
|
535
536
|
"strict",
|
|
536
537
|
void 0,
|
|
537
|
-
schemaAdcpVersion ?? client.getAdcpVersion()
|
|
538
|
+
(0, import_schema_loader.resolveServedValidationVersion)(caps.data, schemaAdcpVersion ?? client.getAdcpVersion())
|
|
538
539
|
);
|
|
539
540
|
if (!validation.valid) {
|
|
540
541
|
profile.capabilities_schema_issues = validation.issues.map((issue) => ({
|
|
@@ -12,6 +12,7 @@ import { normalizeTransportOptions } from "../protocols/index.mjs";
|
|
|
12
12
|
import { createHmac, hkdfSync, randomBytes } from "node:crypto";
|
|
13
13
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
14
14
|
import { validateIncomingResponse } from "../validation/client-hooks.mjs";
|
|
15
|
+
import { resolveServedValidationVersion } from "../validation/schema-loader.mjs";
|
|
15
16
|
import { extractVersionUnsupportedDetails } from "../utils/error-extraction.mjs";
|
|
16
17
|
import { buildAgentSigningContext } from "../signing/client.mjs";
|
|
17
18
|
import { bindAgentStorage } from "../auth/oauth/storage-registry.mjs";
|
|
@@ -491,7 +492,7 @@ async function discoverAgentProfile(client, signal, schemaAdcpVersion) {
|
|
|
491
492
|
caps.data,
|
|
492
493
|
"strict",
|
|
493
494
|
void 0,
|
|
494
|
-
schemaAdcpVersion ?? client.getAdcpVersion()
|
|
495
|
+
resolveServedValidationVersion(caps.data, schemaAdcpVersion ?? client.getAdcpVersion())
|
|
495
496
|
);
|
|
496
497
|
if (!validation.valid) {
|
|
497
498
|
profile.capabilities_schema_issues = validation.issues.map((issue) => ({
|
|
@@ -239,7 +239,7 @@ function crossValidateProtocolsAndTools(capabilities, tools) {
|
|
|
239
239
|
creative: import_capabilities.CREATIVE_TOOLS,
|
|
240
240
|
sponsored_intelligence: import_capabilities.SPONSORED_INTELLIGENCE_TOOLS,
|
|
241
241
|
trusted_match: import_capabilities.TRUSTED_MATCH_TOOLS,
|
|
242
|
-
|
|
242
|
+
compliance_testing: import_capabilities.COMPLIANCE_TOOLS
|
|
243
243
|
};
|
|
244
244
|
const perProtocolDiffs = {};
|
|
245
245
|
for (const protocol of capabilities.protocols) {
|
|
@@ -225,7 +225,7 @@ function crossValidateProtocolsAndTools(capabilities, tools) {
|
|
|
225
225
|
creative: CREATIVE_TOOLS,
|
|
226
226
|
sponsored_intelligence: SPONSORED_INTELLIGENCE_TOOLS,
|
|
227
227
|
trusted_match: TRUSTED_MATCH_TOOLS,
|
|
228
|
-
|
|
228
|
+
compliance_testing: COMPLIANCE_TOOLS
|
|
229
229
|
};
|
|
230
230
|
const perProtocolDiffs = {};
|
|
231
231
|
for (const protocol of capabilities.protocols) {
|
|
@@ -82,8 +82,9 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
82
82
|
const suiteGroup = options.suite_groups?.[sb.storyboard_id];
|
|
83
83
|
const suiteClassname = suiteGroup ? `${suiteGroup}.${sb.storyboard_id}` : sb.storyboard_id;
|
|
84
84
|
const suiteCases = [];
|
|
85
|
-
let suiteFailures =
|
|
85
|
+
let suiteFailures = 0;
|
|
86
86
|
let representedSkipped = 0;
|
|
87
|
+
let suiteSkipped = 0;
|
|
87
88
|
const passPhases = sb.passes?.length ? sb.passes.map((pass) => ({ label: `Pass ${pass.pass_index} \u203A `, phases: pass.phases })) : [{ label: "", phases: sb.phases }];
|
|
88
89
|
for (const pass of passPhases) {
|
|
89
90
|
for (const phase of pass.phases) {
|
|
@@ -93,6 +94,7 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
93
94
|
const time = ((step.duration_ms || 0) / 1e3).toFixed(3);
|
|
94
95
|
if (step.skipped) {
|
|
95
96
|
representedSkipped += 1;
|
|
97
|
+
suiteSkipped += 1;
|
|
96
98
|
totalSkipped += 1;
|
|
97
99
|
suiteCases.push(
|
|
98
100
|
` <testcase classname="${xmlEscape(suiteClassname)}" name="${xmlEscape(name)}" time="${time}">
|
|
@@ -102,7 +104,6 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
102
104
|
continue;
|
|
103
105
|
}
|
|
104
106
|
if (!step.passed) {
|
|
105
|
-
totalFailures += 1;
|
|
106
107
|
const failureDetails = [
|
|
107
108
|
step.error,
|
|
108
109
|
...step.validations.filter((v) => !v.passed).map(
|
|
@@ -114,6 +115,17 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
114
115
|
// report body.
|
|
115
116
|
...hintLines(step.hints)
|
|
116
117
|
].filter(Boolean).join("\n");
|
|
118
|
+
if (step.counts_toward_failure === false) {
|
|
119
|
+
suiteCases.push(
|
|
120
|
+
` <testcase classname="${xmlEscape(suiteClassname)}" name="${xmlEscape(name)}" time="${time}">
|
|
121
|
+
<system-out>${xmlEscape(`Optional phase failure; excluded from storyboard verdict.
|
|
122
|
+
${failureDetails}`)}</system-out>
|
|
123
|
+
</testcase>`
|
|
124
|
+
);
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
totalFailures += 1;
|
|
128
|
+
suiteFailures += 1;
|
|
117
129
|
const message = step.error || firstHintMessage(step) || "validation failed";
|
|
118
130
|
suiteCases.push(
|
|
119
131
|
` <testcase classname="${xmlEscape(suiteClassname)}" name="${xmlEscape(name)}" time="${time}">
|
|
@@ -136,6 +148,7 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
136
148
|
if (hasStoryboardFixtureSkip) {
|
|
137
149
|
totalTests += 1;
|
|
138
150
|
totalSkipped += 1;
|
|
151
|
+
suiteSkipped += 1;
|
|
139
152
|
suiteCases.push(
|
|
140
153
|
` <testcase classname="${xmlEscape(suiteClassname)}" name="Fixture resolution" time="0.000">
|
|
141
154
|
<skipped message="${xmlEscape(fixtureGap.detail)}"/>
|
|
@@ -159,7 +172,7 @@ ${assertion.error}` : ""}`;
|
|
|
159
172
|
totalDuration += sb.total_duration_ms || 0;
|
|
160
173
|
const suiteTests = suiteCases.length;
|
|
161
174
|
suites.push(
|
|
162
|
-
` <testsuite name="${xmlEscape(suiteGroup ? `${suiteGroup} \u203A ${sb.storyboard_title}` : sb.storyboard_title)}"${suiteGroup ? ` package="${xmlEscape(`adcp.${suiteGroup}`)}"` : ""} tests="${suiteTests}" failures="${suiteFailures}" skipped="${
|
|
175
|
+
` <testsuite name="${xmlEscape(suiteGroup ? `${suiteGroup} \u203A ${sb.storyboard_title}` : sb.storyboard_title)}"${suiteGroup ? ` package="${xmlEscape(`adcp.${suiteGroup}`)}"` : ""} tests="${suiteTests}" failures="${suiteFailures}" skipped="${suiteSkipped}" time="${((sb.total_duration_ms || 0) / 1e3).toFixed(3)}" timestamp="${sb.tested_at || (/* @__PURE__ */ new Date()).toISOString()}">
|
|
163
176
|
` + suiteCases.join("\n") + `
|
|
164
177
|
</testsuite>`
|
|
165
178
|
);
|
|
@@ -58,8 +58,9 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
58
58
|
const suiteGroup = options.suite_groups?.[sb.storyboard_id];
|
|
59
59
|
const suiteClassname = suiteGroup ? `${suiteGroup}.${sb.storyboard_id}` : sb.storyboard_id;
|
|
60
60
|
const suiteCases = [];
|
|
61
|
-
let suiteFailures =
|
|
61
|
+
let suiteFailures = 0;
|
|
62
62
|
let representedSkipped = 0;
|
|
63
|
+
let suiteSkipped = 0;
|
|
63
64
|
const passPhases = sb.passes?.length ? sb.passes.map((pass) => ({ label: `Pass ${pass.pass_index} \u203A `, phases: pass.phases })) : [{ label: "", phases: sb.phases }];
|
|
64
65
|
for (const pass of passPhases) {
|
|
65
66
|
for (const phase of pass.phases) {
|
|
@@ -69,6 +70,7 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
69
70
|
const time = ((step.duration_ms || 0) / 1e3).toFixed(3);
|
|
70
71
|
if (step.skipped) {
|
|
71
72
|
representedSkipped += 1;
|
|
73
|
+
suiteSkipped += 1;
|
|
72
74
|
totalSkipped += 1;
|
|
73
75
|
suiteCases.push(
|
|
74
76
|
` <testcase classname="${xmlEscape(suiteClassname)}" name="${xmlEscape(name)}" time="${time}">
|
|
@@ -78,7 +80,6 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
78
80
|
continue;
|
|
79
81
|
}
|
|
80
82
|
if (!step.passed) {
|
|
81
|
-
totalFailures += 1;
|
|
82
83
|
const failureDetails = [
|
|
83
84
|
step.error,
|
|
84
85
|
...step.validations.filter((v) => !v.passed).map(
|
|
@@ -90,6 +91,17 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
90
91
|
// report body.
|
|
91
92
|
...hintLines(step.hints)
|
|
92
93
|
].filter(Boolean).join("\n");
|
|
94
|
+
if (step.counts_toward_failure === false) {
|
|
95
|
+
suiteCases.push(
|
|
96
|
+
` <testcase classname="${xmlEscape(suiteClassname)}" name="${xmlEscape(name)}" time="${time}">
|
|
97
|
+
<system-out>${xmlEscape(`Optional phase failure; excluded from storyboard verdict.
|
|
98
|
+
${failureDetails}`)}</system-out>
|
|
99
|
+
</testcase>`
|
|
100
|
+
);
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
totalFailures += 1;
|
|
104
|
+
suiteFailures += 1;
|
|
93
105
|
const message = step.error || firstHintMessage(step) || "validation failed";
|
|
94
106
|
suiteCases.push(
|
|
95
107
|
` <testcase classname="${xmlEscape(suiteClassname)}" name="${xmlEscape(name)}" time="${time}">
|
|
@@ -112,6 +124,7 @@ function formatStoryboardResultsAsJUnit(results, options = {}) {
|
|
|
112
124
|
if (hasStoryboardFixtureSkip) {
|
|
113
125
|
totalTests += 1;
|
|
114
126
|
totalSkipped += 1;
|
|
127
|
+
suiteSkipped += 1;
|
|
115
128
|
suiteCases.push(
|
|
116
129
|
` <testcase classname="${xmlEscape(suiteClassname)}" name="Fixture resolution" time="0.000">
|
|
117
130
|
<skipped message="${xmlEscape(fixtureGap.detail)}"/>
|
|
@@ -135,7 +148,7 @@ ${assertion.error}` : ""}`;
|
|
|
135
148
|
totalDuration += sb.total_duration_ms || 0;
|
|
136
149
|
const suiteTests = suiteCases.length;
|
|
137
150
|
suites.push(
|
|
138
|
-
` <testsuite name="${xmlEscape(suiteGroup ? `${suiteGroup} \u203A ${sb.storyboard_title}` : sb.storyboard_title)}"${suiteGroup ? ` package="${xmlEscape(`adcp.${suiteGroup}`)}"` : ""} tests="${suiteTests}" failures="${suiteFailures}" skipped="${
|
|
151
|
+
` <testsuite name="${xmlEscape(suiteGroup ? `${suiteGroup} \u203A ${sb.storyboard_title}` : sb.storyboard_title)}"${suiteGroup ? ` package="${xmlEscape(`adcp.${suiteGroup}`)}"` : ""} tests="${suiteTests}" failures="${suiteFailures}" skipped="${suiteSkipped}" time="${((sb.total_duration_ms || 0) / 1e3).toFixed(3)}" timestamp="${sb.tested_at || (/* @__PURE__ */ new Date()).toISOString()}">
|
|
139
152
|
` + suiteCases.join("\n") + `
|
|
140
153
|
</testsuite>`
|
|
141
154
|
);
|
|
@@ -24,6 +24,8 @@ __export(builder_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(builder_exports);
|
|
26
26
|
var import_crypto = require("crypto");
|
|
27
|
+
var import_structured_headers = require("structured-headers");
|
|
28
|
+
var import_crypto2 = require('../../../signing/crypto.js');
|
|
27
29
|
var import_signing = require('../../../signing/index.js');
|
|
28
30
|
var import_vector_loader = require('./vector-loader.js');
|
|
29
31
|
function buildPositiveRequest(vector, keys, options = {}) {
|
|
@@ -560,22 +562,18 @@ function refreshContentDigest(shaped, vector, shape) {
|
|
|
560
562
|
});
|
|
561
563
|
}
|
|
562
564
|
function formatParamsWithOmissions(components, params, override) {
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
return
|
|
565
|
+
const omitted = /* @__PURE__ */ new Set([
|
|
566
|
+
...override.omitExpires ? ["expires"] : [],
|
|
567
|
+
...override.omitNonce ? ["nonce"] : []
|
|
568
|
+
]);
|
|
569
|
+
const pairs = /* @__PURE__ */ new Map();
|
|
570
|
+
for (const key of ["created", "expires", "nonce", "keyid", "alg", "tag"]) {
|
|
571
|
+
if (!omitted.has(key) && params[key] !== void 0) pairs.set(key, params[key]);
|
|
572
|
+
}
|
|
573
|
+
return (0, import_structured_headers.serializeInnerList)([components.map((c) => [c, /* @__PURE__ */ new Map()]), pairs]);
|
|
572
574
|
}
|
|
573
575
|
function produceSignature(key, data) {
|
|
574
|
-
|
|
575
|
-
if (key.alg === "ed25519") {
|
|
576
|
-
return new Uint8Array((0, import_crypto.sign)(null, data, privateKey));
|
|
577
|
-
}
|
|
578
|
-
return new Uint8Array((0, import_crypto.sign)("sha256", data, { key: privateKey, dsaEncoding: "ieee-p1363" }));
|
|
576
|
+
return (0, import_crypto2.signWithPrivateJwk)(key.alg, key.privateKey, data);
|
|
579
577
|
}
|
|
580
578
|
function signerKeyFor(vector, keys) {
|
|
581
579
|
const kid = vector.jwks_ref?.[0];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { createHash,
|
|
1
|
+
import { createHash, randomBytes, randomUUID } from "crypto";
|
|
2
|
+
import { serializeInnerList } from "structured-headers";
|
|
3
|
+
import { signWithPrivateJwk } from "../../../signing/crypto.mjs";
|
|
2
4
|
import {
|
|
3
5
|
buildSignatureBase,
|
|
4
6
|
computeContentDigest,
|
|
@@ -543,22 +545,18 @@ function refreshContentDigest(shaped, vector, shape) {
|
|
|
543
545
|
});
|
|
544
546
|
}
|
|
545
547
|
function formatParamsWithOmissions(components, params, override) {
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
return
|
|
548
|
+
const omitted = /* @__PURE__ */ new Set([
|
|
549
|
+
...override.omitExpires ? ["expires"] : [],
|
|
550
|
+
...override.omitNonce ? ["nonce"] : []
|
|
551
|
+
]);
|
|
552
|
+
const pairs = /* @__PURE__ */ new Map();
|
|
553
|
+
for (const key of ["created", "expires", "nonce", "keyid", "alg", "tag"]) {
|
|
554
|
+
if (!omitted.has(key) && params[key] !== void 0) pairs.set(key, params[key]);
|
|
555
|
+
}
|
|
556
|
+
return serializeInnerList([components.map((c) => [c, /* @__PURE__ */ new Map()]), pairs]);
|
|
555
557
|
}
|
|
556
558
|
function produceSignature(key, data) {
|
|
557
|
-
|
|
558
|
-
if (key.alg === "ed25519") {
|
|
559
|
-
return new Uint8Array(nodeSign(null, data, privateKey));
|
|
560
|
-
}
|
|
561
|
-
return new Uint8Array(nodeSign("sha256", data, { key: privateKey, dsaEncoding: "ieee-p1363" }));
|
|
559
|
+
return signWithPrivateJwk(key.alg, key.privateKey, data);
|
|
562
560
|
}
|
|
563
561
|
function signerKeyFor(vector, keys) {
|
|
564
562
|
const kid = vector.jwks_ref?.[0];
|