@adcp/sdk 15.9.1 → 16.0.0-beta.2
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/bin/adcp-identity.js +74 -0
- package/bin/adcp.js +2 -0
- package/dist/lib/adapters/keyed-account-backend.d.mts +37 -0
- package/dist/lib/adapters/keyed-account-backend.d.ts +37 -0
- package/dist/lib/adapters/keyed-account-backend.js +121 -0
- package/dist/lib/adapters/keyed-account-backend.mjs +94 -0
- package/dist/lib/adapters/keyed-account-store.d.mts +28 -0
- package/dist/lib/adapters/keyed-account-store.d.ts +28 -0
- package/dist/lib/adapters/keyed-account-store.js +227 -0
- package/dist/lib/adapters/keyed-account-store.mjs +203 -0
- package/dist/lib/core/SingleAgentClient.d.mts +25 -2
- package/dist/lib/core/SingleAgentClient.d.ts +25 -2
- package/dist/lib/core/SingleAgentClient.js +280 -62
- package/dist/lib/core/SingleAgentClient.mjs +282 -57
- package/dist/lib/core/TaskExecutor.d.mts +6 -0
- package/dist/lib/core/TaskExecutor.d.ts +6 -0
- package/dist/lib/core/TaskExecutor.js +66 -5
- package/dist/lib/core/TaskExecutor.mjs +71 -5
- package/dist/lib/core/postgres-webhook-registration-store.js +32 -5
- package/dist/lib/core/postgres-webhook-registration-store.mjs +32 -5
- package/dist/lib/core/redis-webhook-registration-store.js +23 -1
- package/dist/lib/core/redis-webhook-registration-store.mjs +23 -1
- package/dist/lib/core/webhook-registration.d.mts +7 -1
- package/dist/lib/core/webhook-registration.d.ts +7 -1
- package/dist/lib/core/webhook-registration.js +24 -2
- package/dist/lib/core/webhook-registration.mjs +23 -2
- package/dist/lib/identity-3.3/generated-compat.d.mts +34 -0
- package/dist/lib/identity-3.3/generated-compat.d.ts +34 -0
- package/dist/lib/identity-3.3/generated-compat.js +16 -0
- package/dist/lib/identity-3.3/generated-compat.mjs +0 -0
- package/dist/lib/identity-3.3/index.d.mts +10 -0
- package/dist/lib/identity-3.3/index.d.ts +10 -0
- package/dist/lib/identity-3.3/index.js +79 -0
- package/dist/lib/identity-3.3/index.mjs +50 -0
- package/dist/lib/identity-3.3/lifecycle.d.mts +125 -0
- package/dist/lib/identity-3.3/lifecycle.d.ts +125 -0
- package/dist/lib/identity-3.3/lifecycle.js +294 -0
- package/dist/lib/identity-3.3/lifecycle.mjs +272 -0
- package/dist/lib/identity-3.3/revocation.d.mts +86 -0
- package/dist/lib/identity-3.3/revocation.d.ts +86 -0
- package/dist/lib/identity-3.3/revocation.js +308 -0
- package/dist/lib/identity-3.3/revocation.mjs +286 -0
- package/dist/lib/identity-3.3/schemas.draft.d.mts +2472 -0
- package/dist/lib/identity-3.3/schemas.draft.d.ts +2472 -0
- package/dist/lib/identity-3.3/schemas.draft.js +1448 -0
- package/dist/lib/identity-3.3/schemas.draft.mjs +1428 -0
- package/dist/lib/identity-3.3/server.d.mts +46 -0
- package/dist/lib/identity-3.3/server.d.ts +46 -0
- package/dist/lib/identity-3.3/server.js +279 -0
- package/dist/lib/identity-3.3/server.mjs +260 -0
- package/dist/lib/identity-3.3/store.d.mts +24 -0
- package/dist/lib/identity-3.3/store.d.ts +24 -0
- package/dist/lib/identity-3.3/store.js +191 -0
- package/dist/lib/identity-3.3/store.mjs +169 -0
- package/dist/lib/identity-3.3/trust.d.mts +155 -0
- package/dist/lib/identity-3.3/trust.d.ts +155 -0
- package/dist/lib/identity-3.3/trust.js +383 -0
- package/dist/lib/identity-3.3/trust.mjs +342 -0
- package/dist/lib/identity-3.3/types.d.mts +155 -0
- package/dist/lib/identity-3.3/types.d.ts +155 -0
- package/dist/lib/identity-3.3/types.js +16 -0
- package/dist/lib/identity-3.3/types.mjs +0 -0
- package/dist/lib/identity-3.3/validation.d.mts +2 -0
- package/dist/lib/identity-3.3/validation.d.ts +2 -0
- package/dist/lib/identity-3.3/validation.js +125 -0
- package/dist/lib/identity-3.3/validation.mjs +91 -0
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +2 -0
- package/dist/lib/protocols/index.d.mts +1 -1
- package/dist/lib/protocols/index.d.ts +1 -1
- package/dist/lib/protocols/index.js +2 -2
- package/dist/lib/protocols/index.mjs +2 -2
- package/dist/lib/reporting/azure/index.d.mts +5 -0
- package/dist/lib/reporting/azure/index.d.ts +5 -0
- package/dist/lib/reporting/azure/index.js +26 -7
- package/dist/lib/reporting/azure/index.mjs +26 -7
- package/dist/lib/reporting/bigquery/index.d.mts +39 -5
- package/dist/lib/reporting/bigquery/index.d.ts +39 -5
- package/dist/lib/reporting/bigquery/index.js +26 -20
- package/dist/lib/reporting/bigquery/index.mjs +26 -20
- package/dist/lib/reporting/gcs/adapter.d.mts +8 -1
- package/dist/lib/reporting/gcs/adapter.d.ts +8 -1
- package/dist/lib/reporting/gcs/errors.d.mts +6 -0
- package/dist/lib/reporting/gcs/errors.d.ts +6 -0
- package/dist/lib/reporting/gcs/fence.d.mts +5 -0
- package/dist/lib/reporting/gcs/fence.d.ts +5 -0
- package/dist/lib/reporting/gcs/index.d.mts +9 -0
- package/dist/lib/reporting/gcs/index.d.ts +9 -0
- package/dist/lib/reporting/gcs/reader.d.mts +27 -3
- package/dist/lib/reporting/gcs/reader.d.ts +27 -3
- package/dist/lib/reporting/gcs/row-provider.d.mts +7 -0
- package/dist/lib/reporting/gcs/row-provider.d.ts +7 -0
- package/dist/lib/reporting/gcs/row-provider.js +34 -14
- package/dist/lib/reporting/gcs/row-provider.mjs +34 -14
- package/dist/lib/reporting/ledger/change-feed.d.mts +22 -1
- package/dist/lib/reporting/ledger/change-feed.d.ts +22 -1
- package/dist/lib/reporting/ledger/index.d.mts +11 -0
- package/dist/lib/reporting/ledger/index.d.ts +11 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.mts +8 -0
- package/dist/lib/reporting/ledger/managed-postgres.d.ts +8 -0
- package/dist/lib/reporting/ledger/managed-router.d.mts +27 -2
- package/dist/lib/reporting/ledger/managed-router.d.ts +27 -2
- package/dist/lib/reporting/ledger/managed.d.mts +86 -6
- package/dist/lib/reporting/ledger/managed.d.ts +86 -6
- package/dist/lib/reporting/ledger/notification-activity.d.mts +65 -3
- package/dist/lib/reporting/ledger/notification-activity.d.ts +65 -3
- package/dist/lib/reporting/ledger/object-writes.d.mts +64 -5
- package/dist/lib/reporting/ledger/object-writes.d.ts +64 -5
- package/dist/lib/reporting/ledger/postgres.d.mts +43 -9
- package/dist/lib/reporting/ledger/postgres.d.ts +43 -9
- package/dist/lib/reporting/ledger/postgres.js +43 -27
- package/dist/lib/reporting/ledger/postgres.mjs +43 -27
- package/dist/lib/reporting/ledger/row-encoding.d.mts +92 -6
- package/dist/lib/reporting/ledger/row-encoding.d.ts +92 -6
- package/dist/lib/reporting/ledger/row-encoding.js +8 -4
- package/dist/lib/reporting/ledger/row-encoding.mjs +6 -3
- package/dist/lib/reporting/ledger/row-storage-errors.d.mts +11 -1
- package/dist/lib/reporting/ledger/row-storage-errors.d.ts +11 -1
- package/dist/lib/reporting/ledger/row-storage-migration.d.mts +19 -1
- package/dist/lib/reporting/ledger/row-storage-migration.d.ts +19 -1
- package/dist/lib/reporting/ledger/row-storage-migration.js +133 -18
- package/dist/lib/reporting/ledger/row-storage-migration.mjs +133 -18
- package/dist/lib/reporting/ledger/row-storage-object.d.mts +103 -12
- package/dist/lib/reporting/ledger/row-storage-object.d.ts +103 -12
- package/dist/lib/reporting/ledger/row-storage-object.js +106 -31
- package/dist/lib/reporting/ledger/row-storage-object.mjs +104 -31
- package/dist/lib/reporting/ledger/row-storage.d.mts +87 -20
- package/dist/lib/reporting/ledger/row-storage.d.ts +87 -20
- package/dist/lib/reporting/ledger/row-storage.js +126 -66
- package/dist/lib/reporting/ledger/row-storage.mjs +129 -67
- package/dist/lib/reporting/ledger/schedule.d.mts +13 -0
- package/dist/lib/reporting/ledger/schedule.d.ts +13 -0
- package/dist/lib/reporting/ledger/schedule.js +24 -0
- package/dist/lib/reporting/ledger/schedule.mjs +23 -0
- package/dist/lib/reporting/ledger/types.d.mts +23 -1
- package/dist/lib/reporting/ledger/types.d.ts +23 -1
- package/dist/lib/reporting/s3/index.d.mts +5 -0
- package/dist/lib/reporting/s3/index.d.ts +5 -0
- package/dist/lib/reporting/s3/index.js +37 -14
- package/dist/lib/reporting/s3/index.mjs +37 -14
- package/dist/lib/reporting/service/index.d.mts +10 -0
- package/dist/lib/reporting/service/index.d.ts +10 -0
- package/dist/lib/reporting/service/maintenance.d.mts +28 -2
- package/dist/lib/reporting/service/maintenance.d.ts +28 -2
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/account-sync-contract.d.mts +14 -0
- package/dist/lib/server/account-sync-contract.d.ts +14 -0
- package/dist/lib/server/account-sync-contract.js +225 -0
- package/dist/lib/server/account-sync-contract.mjs +197 -0
- package/dist/lib/server/adcp-server.js +5 -0
- package/dist/lib/server/adcp-server.mjs +10 -0
- package/dist/lib/server/auth-signature.d.mts +15 -0
- package/dist/lib/server/auth-signature.d.ts +15 -0
- package/dist/lib/server/auth-signature.js +72 -2
- package/dist/lib/server/auth-signature.mjs +81 -2
- package/dist/lib/server/auth.d.mts +6 -0
- package/dist/lib/server/auth.d.ts +6 -0
- package/dist/lib/server/auth.js +6 -0
- package/dist/lib/server/auth.mjs +6 -0
- package/dist/lib/server/create-adcp-server.d.mts +19 -5
- package/dist/lib/server/create-adcp-server.d.ts +19 -5
- package/dist/lib/server/create-adcp-server.js +259 -19
- package/dist/lib/server/create-adcp-server.mjs +266 -10
- package/dist/lib/server/decisioning/account.d.mts +24 -1
- package/dist/lib/server/decisioning/account.d.ts +24 -1
- package/dist/lib/server/decisioning/index.d.mts +1 -1
- package/dist/lib/server/decisioning/index.d.ts +1 -1
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +0 -50
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +0 -50
- package/dist/lib/server/decisioning/runtime/from-platform.js +61 -11
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +65 -12
- package/dist/lib/server/index.d.mts +2 -0
- package/dist/lib/server/index.d.ts +2 -0
- package/dist/lib/server/index.js +12 -0
- package/dist/lib/server/index.mjs +12 -0
- package/dist/lib/server/notification-subscriptions/runtime.js +9 -1
- package/dist/lib/server/notification-subscriptions/runtime.mjs +9 -1
- package/dist/lib/server/notification-subscriptions/types.d.mts +5 -0
- package/dist/lib/server/notification-subscriptions/types.d.ts +5 -0
- package/dist/lib/server/principal/types.d.mts +1 -1
- package/dist/lib/server/principal/types.d.ts +1 -1
- package/dist/lib/server/serve.js +5 -0
- package/dist/lib/server/serve.mjs +5 -0
- package/dist/lib/server/webhook-delivery/recovery.d.mts +1 -0
- package/dist/lib/server/webhook-delivery/recovery.d.ts +1 -0
- package/dist/lib/server/webhook-delivery/recovery.js +4 -0
- package/dist/lib/server/webhook-delivery/recovery.mjs +4 -0
- package/dist/lib/server/webhook-emitter.d.mts +10 -0
- package/dist/lib/server/webhook-emitter.d.ts +10 -0
- package/dist/lib/server/webhook-emitter.js +22 -0
- package/dist/lib/server/webhook-emitter.mjs +22 -0
- package/dist/lib/signing/agent-context.d.mts +0 -5
- package/dist/lib/signing/agent-context.d.ts +0 -5
- package/dist/lib/signing/agent-context.js +9 -1
- package/dist/lib/signing/agent-context.mjs +9 -1
- package/dist/lib/signing/agent-fetch.js +27 -2
- package/dist/lib/signing/agent-fetch.mjs +32 -2
- package/dist/lib/signing/agent-resolver/canonicalize.d.mts +10 -15
- package/dist/lib/signing/agent-resolver/canonicalize.d.ts +10 -15
- package/dist/lib/signing/agent-resolver/canonicalize.js +17 -5
- package/dist/lib/signing/agent-resolver/canonicalize.mjs +16 -5
- package/dist/lib/signing/agent-resolver/index.d.mts +1 -0
- package/dist/lib/signing/agent-resolver/index.d.ts +1 -0
- package/dist/lib/signing/agent-resolver/index.js +5 -0
- package/dist/lib/signing/agent-resolver/index.mjs +3 -0
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.mts +3 -2
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.ts +3 -2
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.js +30 -3
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.mjs +30 -3
- package/dist/lib/signing/agent-resolver/strict-json.d.mts +2 -2
- package/dist/lib/signing/agent-resolver/strict-json.d.ts +2 -2
- package/dist/lib/signing/agent-resolver/strict-json.js +5 -3
- package/dist/lib/signing/agent-resolver/strict-json.mjs +5 -3
- package/dist/lib/signing/brand-jwks.d.mts +2 -2
- package/dist/lib/signing/brand-jwks.d.ts +2 -2
- package/dist/lib/signing/brand-jwks.js +4 -4
- package/dist/lib/signing/brand-jwks.mjs +4 -4
- package/dist/lib/signing/client.d.mts +1 -0
- package/dist/lib/signing/client.d.ts +1 -0
- package/dist/lib/signing/client.js +5 -0
- package/dist/lib/signing/client.mjs +3 -0
- package/dist/lib/signing/crypto.js +8 -0
- package/dist/lib/signing/crypto.mjs +9 -1
- package/dist/lib/signing/fetch-async.js +1 -1
- package/dist/lib/signing/fetch-async.mjs +1 -1
- package/dist/lib/signing/fetch.js +1 -1
- package/dist/lib/signing/fetch.mjs +1 -1
- package/dist/lib/signing/jwks-https.d.mts +1 -1
- package/dist/lib/signing/jwks-https.d.ts +1 -1
- package/dist/lib/signing/jwks-https.js +1 -1
- package/dist/lib/signing/jwks-https.mjs +1 -1
- package/dist/lib/signing/jwks.d.mts +11 -3
- package/dist/lib/signing/jwks.d.ts +11 -3
- package/dist/lib/signing/jwks.js +1 -1
- package/dist/lib/signing/jwks.mjs +1 -1
- package/dist/lib/signing/middleware.js +9 -0
- package/dist/lib/signing/middleware.mjs +14 -0
- package/dist/lib/signing/parser.d.mts +9 -6
- package/dist/lib/signing/parser.d.ts +9 -6
- package/dist/lib/signing/parser.js +82 -64
- package/dist/lib/signing/parser.mjs +83 -65
- package/dist/lib/signing/revocation.d.mts +4 -1
- package/dist/lib/signing/revocation.d.ts +4 -1
- package/dist/lib/signing/revocation.js +36 -3
- package/dist/lib/signing/revocation.mjs +34 -2
- package/dist/lib/signing/server.d.mts +1 -1
- package/dist/lib/signing/server.d.ts +1 -1
- package/dist/lib/signing/server.js +4 -0
- package/dist/lib/signing/server.mjs +4 -0
- package/dist/lib/signing/types.d.mts +3 -0
- package/dist/lib/signing/types.d.ts +3 -0
- package/dist/lib/signing/verifier.js +1 -1
- package/dist/lib/signing/verifier.mjs +1 -1
- package/dist/lib/signing/web-bot-auth.d.mts +191 -0
- package/dist/lib/signing/web-bot-auth.d.ts +191 -0
- package/dist/lib/signing/web-bot-auth.js +837 -0
- package/dist/lib/signing/web-bot-auth.mjs +796 -0
- package/dist/lib/signing/webhook-verifier.js +1 -1
- package/dist/lib/signing/webhook-verifier.mjs +1 -1
- package/dist/lib/testing/client.d.mts +1 -4
- package/dist/lib/testing/client.d.ts +1 -4
- package/dist/lib/testing/client.js +141 -20
- package/dist/lib/testing/client.mjs +137 -19
- package/dist/lib/testing/compliance/comply.js +29 -10
- package/dist/lib/testing/compliance/comply.mjs +37 -11
- package/dist/lib/testing/storyboard/account-sync-contract.d.mts +3 -0
- package/dist/lib/testing/storyboard/account-sync-contract.d.ts +3 -0
- package/dist/lib/testing/storyboard/account-sync-contract.js +79 -0
- package/dist/lib/testing/storyboard/account-sync-contract.mjs +55 -0
- package/dist/lib/testing/storyboard/default-invariants.js +2 -0
- package/dist/lib/testing/storyboard/default-invariants.mjs +2 -0
- package/dist/lib/testing/storyboard/runner.js +23 -8
- package/dist/lib/testing/storyboard/runner.mjs +24 -8
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/adcp.d.mts +4 -0
- package/dist/lib/types/adcp.d.ts +4 -0
- package/dist/lib/types/schemas.generated.d.ts +6 -6
- package/dist/lib/utils/capabilities.d.mts +1 -0
- package/dist/lib/utils/capabilities.d.ts +1 -0
- package/dist/lib/utils/capabilities.js +5 -0
- package/dist/lib/utils/capabilities.mjs +5 -0
- package/dist/lib/v2/projection/catalog-snapshot.js +3 -1
- package/dist/lib/v2/projection/catalog-snapshot.mjs +3 -1
- package/dist/lib/v2/projection/creative-delivery.d.mts +34 -10
- package/dist/lib/v2/projection/creative-delivery.d.ts +34 -10
- package/dist/lib/v2/projection/creative-delivery.js +26 -10
- package/dist/lib/v2/projection/creative-delivery.mjs +26 -10
- package/dist/lib/v2/projection/index.d.mts +1 -1
- package/dist/lib/v2/projection/index.d.ts +1 -1
- package/dist/lib/v2/projection/index.js +2 -0
- package/dist/lib/v2/projection/index.mjs +2 -0
- package/dist/lib/v2/projection/legacy-routes.d.mts +34 -2
- package/dist/lib/v2/projection/legacy-routes.d.ts +34 -2
- package/dist/lib/v2/projection/legacy-routes.js +35 -2
- package/dist/lib/v2/projection/legacy-routes.mjs +32 -2
- package/dist/lib/validation/schema-loader.d.mts +2 -0
- package/dist/lib/validation/schema-loader.d.ts +2 -0
- package/dist/lib/validation/schema-loader.js +43 -4
- package/dist/lib/validation/schema-loader.mjs +39 -3
- 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 +2 -2
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +4 -0
- package/docs/guides/REPORTING-LEDGER-CUTOVER.md +1 -1
- package/docs/guides/REPORTING-LEDGER.md +99 -29
- package/docs/guides/REPORTING-OPERATIONS.md +29 -13
- package/docs/guides/REPORTING-STABILITY.md +76 -0
- package/docs/guides/account-resolution.md +101 -0
- package/docs/llms.txt +3 -2
- package/docs/migration-12-to-13.md +15 -0
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-agent-identity-3.3.md +494 -0
- package/docs/migration-agent-resolution-3.3.md +5 -0
- package/docs/migration-reporting-row-storage-alignment.md +137 -0
- package/examples/storyboards/account-sync-contract.yaml +57 -0
- package/package.json +17 -1
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
import { getWebBotAuthLegacyOriginGate } from "../signing/web-bot-auth.mjs";
|
|
2
|
+
import {
|
|
3
|
+
isIdentity33SchemaScope,
|
|
4
|
+
withIdentity33SchemaScope,
|
|
5
|
+
bindIdentity33SchemaScope
|
|
6
|
+
} from "../validation/schema-loader.mjs";
|
|
7
|
+
import { validateAgentOnboarding } from "../identity-3.3/lifecycle.mjs";
|
|
8
|
+
import { isIdentity33UnboundContext } from "../identity-3.3/server.mjs";
|
|
9
|
+
import {
|
|
10
|
+
WEB_BOT_AUTH_DRAFT_REVISION,
|
|
11
|
+
getWebBotAuthAuthorizationFailure,
|
|
12
|
+
webBotAuthToolFailure,
|
|
13
|
+
selectSignatureProfile,
|
|
14
|
+
verifyWebBotAuth,
|
|
15
|
+
isWebBotAuthRevocationChecked,
|
|
16
|
+
webBotAuthUnavailableResponse,
|
|
17
|
+
WebBotAuthUnavailableError,
|
|
18
|
+
deferWebBotAuthPrincipalFailure,
|
|
19
|
+
webBotAuthPrincipalFailureError,
|
|
20
|
+
WebBotAuthError
|
|
21
|
+
} from "../signing/web-bot-auth.mjs";
|
|
22
|
+
import { validateIdentity33Payload } from "../identity-3.3/validation.mjs";
|
|
23
|
+
import { IdentityAuthorizationError, TrustRecordUnavailableError } from "../identity-3.3/trust.mjs";
|
|
1
24
|
import { z } from "zod";
|
|
2
25
|
import {
|
|
3
26
|
COMPATIBLE_ADCP_VERSIONS,
|
|
@@ -752,10 +775,12 @@ function restoreSyncAccountEnvelopeErrorIndices(response, acceptedIndices) {
|
|
|
752
775
|
syncContentJsonText(restored, restored.structuredContent, mirrorsStructuredContent);
|
|
753
776
|
return restored;
|
|
754
777
|
}
|
|
755
|
-
function validateFrameworkPayload(toolName, direction, payload, version, proposalCapabilities) {
|
|
778
|
+
function validateFrameworkPayload(toolName, direction, payload, version, proposalCapabilities, identity33 = false) {
|
|
756
779
|
if (toolName === "sync_reporting_status" && direction === "request") {
|
|
757
780
|
return validateSyncReportingStatusEnvelope(payload, version);
|
|
758
781
|
}
|
|
782
|
+
if (identity33 && toolName !== "refine_proposals" && toolName !== "sync_reporting_status")
|
|
783
|
+
return validateIdentity33Payload(toolName, direction, payload, version);
|
|
759
784
|
if (toolName !== "refine_proposals") {
|
|
760
785
|
return direction === "request" ? validateRequest(toolName, payload, version) : validateResponse(toolName, payload, version);
|
|
761
786
|
}
|
|
@@ -1491,6 +1516,15 @@ function resolveEffectiveSignedRequestPolicy(signedRequests, capabilityRequestSi
|
|
|
1491
1516
|
};
|
|
1492
1517
|
}
|
|
1493
1518
|
function buildSignedRequestsPreTransport(signedRequests, effectiveRequestSigning, adcpVersion) {
|
|
1519
|
+
const legacyOriginGate = signedRequests.assertLegacyOriginAllowed ?? getWebBotAuthLegacyOriginGate(signedRequests.webBotAuth?.resolvePrincipal);
|
|
1520
|
+
if (signedRequests.webBotAuth && !legacyOriginGate)
|
|
1521
|
+
throw new Error(
|
|
1522
|
+
"Web Bot Auth requires an origin-binding migration fence; use createIdentity33PrincipalResolver or supply assertLegacyOriginAllowed"
|
|
1523
|
+
);
|
|
1524
|
+
if (signedRequests.webBotAuth && !signedRequests.webBotAuth.isRevoked && !isWebBotAuthRevocationChecked(signedRequests.webBotAuth.resolvePrincipal))
|
|
1525
|
+
throw new Error(
|
|
1526
|
+
"Web Bot Auth requires origin revocation: use createIdentity33PrincipalResolver({ revocation }) or supply isRevoked"
|
|
1527
|
+
);
|
|
1494
1528
|
const requiredFor = effectiveRequestSigning.required_for ?? [];
|
|
1495
1529
|
const verifier = createExpressVerifier({
|
|
1496
1530
|
capability: {
|
|
@@ -1512,6 +1546,66 @@ function buildSignedRequestsPreTransport(signedRequests, effectiveRequestSigning
|
|
|
1512
1546
|
return async function adcpPreTransport(req, res) {
|
|
1513
1547
|
const serveContext = getServeRequestContext(req);
|
|
1514
1548
|
const canonicalPublicUrl = serveContext?.publicUrl ? new URL(serveContext.publicUrl) : void 0;
|
|
1549
|
+
if (selectSignatureProfile({ headers: req.headers }) === "web-bot-auth") {
|
|
1550
|
+
try {
|
|
1551
|
+
if (!signedRequests.webBotAuth || !canonicalPublicUrl) throw new WebBotAuthError(403, "profile_disabled");
|
|
1552
|
+
if (req.method !== "GET" && req.rawBody === void 0) throw new WebBotAuthError(403, "raw_body_missing");
|
|
1553
|
+
const requestTarget = canonicalPublicUrl.origin + (req.url?.startsWith("/") ? req.url : "/" + (req.url ?? ""));
|
|
1554
|
+
const signers = await verifyWebBotAuth(
|
|
1555
|
+
{ method: req.method ?? "POST", url: requestTarget, headers: req.headers, body: req.rawBody ?? "" },
|
|
1556
|
+
{
|
|
1557
|
+
// Identity verification needs only key discovery and replay state;
|
|
1558
|
+
// revocation and binding belong to the principal resolver.
|
|
1559
|
+
directory: signedRequests.webBotAuth.directory,
|
|
1560
|
+
replayStore: signedRequests.replayStore,
|
|
1561
|
+
...signedRequests.webBotAuth.isRevoked && { isRevoked: signedRequests.webBotAuth.isRevoked }
|
|
1562
|
+
}
|
|
1563
|
+
);
|
|
1564
|
+
const operation = resolveRequestOperation({ rawBody: req.rawBody, method: req.method, url: req.url });
|
|
1565
|
+
let principal;
|
|
1566
|
+
let deferredFailure;
|
|
1567
|
+
try {
|
|
1568
|
+
principal = await signedRequests.webBotAuth.resolvePrincipal(signers, operation);
|
|
1569
|
+
} catch (error) {
|
|
1570
|
+
if (error instanceof WebBotAuthError || error instanceof WebBotAuthUnavailableError) throw error;
|
|
1571
|
+
if (typeof operation !== "string") throw webBotAuthPrincipalFailureError(error);
|
|
1572
|
+
const deferred = deferWebBotAuthPrincipalFailure(signers, error);
|
|
1573
|
+
principal = { principal: deferred.principal };
|
|
1574
|
+
deferredFailure = deferred.authorizationFailure;
|
|
1575
|
+
}
|
|
1576
|
+
const signer = signers[signers.length - 1];
|
|
1577
|
+
const failed = signers.find((s) => s.authorizationFailure);
|
|
1578
|
+
const guardedPrincipal = {
|
|
1579
|
+
...principal,
|
|
1580
|
+
extra: {
|
|
1581
|
+
...principal.extra,
|
|
1582
|
+
webBotAuthAuthorization: {
|
|
1583
|
+
signer: failed ?? signer,
|
|
1584
|
+
...(failed?.authorizationFailure ?? deferredFailure) && {
|
|
1585
|
+
authorizationFailure: failed?.authorizationFailure ?? deferredFailure
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
};
|
|
1590
|
+
attachVerifiedSignerAuth(req, guardedPrincipal, {
|
|
1591
|
+
keyid: signer.keyid,
|
|
1592
|
+
agent_url: signer.origin,
|
|
1593
|
+
verified_at: signer.verified_at
|
|
1594
|
+
});
|
|
1595
|
+
return false;
|
|
1596
|
+
} catch (error) {
|
|
1597
|
+
if (error instanceof WebBotAuthUnavailableError) {
|
|
1598
|
+
const outage = webBotAuthUnavailableResponse();
|
|
1599
|
+
res.writeHead(outage.status, { ...outage.headers, "Content-Type": "application/json" });
|
|
1600
|
+
res.end(JSON.stringify(outage.body));
|
|
1601
|
+
return true;
|
|
1602
|
+
}
|
|
1603
|
+
const rejected = error instanceof WebBotAuthError ? error : new WebBotAuthError(403, "identity_rejected");
|
|
1604
|
+
res.writeHead(rejected.status, { ...rejected.headers, "Content-Type": "application/json" });
|
|
1605
|
+
res.end(JSON.stringify(rejected.body));
|
|
1606
|
+
return true;
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1515
1609
|
const reqShim = {
|
|
1516
1610
|
method: req.method ?? "POST",
|
|
1517
1611
|
url: req.url ?? "/mcp",
|
|
@@ -1555,6 +1649,7 @@ function buildSignedRequestsPreTransport(signedRequests, effectiveRequestSigning
|
|
|
1555
1649
|
resolve();
|
|
1556
1650
|
};
|
|
1557
1651
|
res.once("finish", () => {
|
|
1652
|
+
verifierCompleted = true;
|
|
1558
1653
|
if (res.writableEnded) handled = true;
|
|
1559
1654
|
done();
|
|
1560
1655
|
});
|
|
@@ -1562,8 +1657,7 @@ function buildSignedRequestsPreTransport(signedRequests, effectiveRequestSigning
|
|
|
1562
1657
|
if (!verifierCompleted) handled = true;
|
|
1563
1658
|
done();
|
|
1564
1659
|
});
|
|
1565
|
-
verifier(reqShim, resShim, (err) => {
|
|
1566
|
-
verifierCompleted = true;
|
|
1660
|
+
verifier(reqShim, resShim, async (err) => {
|
|
1567
1661
|
if (err) {
|
|
1568
1662
|
const errName = err.name || "Error";
|
|
1569
1663
|
const errCode = err.code ?? "unknown";
|
|
@@ -1578,6 +1672,11 @@ function buildSignedRequestsPreTransport(signedRequests, effectiveRequestSigning
|
|
|
1578
1672
|
const verifiedSigner = reqShim.verifiedSigner;
|
|
1579
1673
|
if (!err && verifiedSigner) {
|
|
1580
1674
|
try {
|
|
1675
|
+
if (legacyOriginGate) {
|
|
1676
|
+
if (!verifiedSigner.agent_url)
|
|
1677
|
+
throw new AuthError("Legacy signer origin is required for migration fencing");
|
|
1678
|
+
await legacyOriginGate(verifiedSigner.agent_url);
|
|
1679
|
+
}
|
|
1581
1680
|
const principal = principalForVerifiedSigner(verifiedSigner, signedRequests.makePrincipal);
|
|
1582
1681
|
attachVerifiedSignerAuth(req, principal, verifiedSigner);
|
|
1583
1682
|
} catch (identityError) {
|
|
@@ -1597,6 +1696,7 @@ function buildSignedRequestsPreTransport(signedRequests, effectiveRequestSigning
|
|
|
1597
1696
|
handled = true;
|
|
1598
1697
|
}
|
|
1599
1698
|
}
|
|
1699
|
+
verifierCompleted = true;
|
|
1600
1700
|
if (res.writableEnded) handled = true;
|
|
1601
1701
|
done();
|
|
1602
1702
|
});
|
|
@@ -1929,6 +2029,11 @@ function isAuthDerivedAccountNotFound(err) {
|
|
|
1929
2029
|
return err instanceof AdcpError && err.code === "ACCOUNT_NOT_FOUND";
|
|
1930
2030
|
}
|
|
1931
2031
|
function createAdcpServer(config) {
|
|
2032
|
+
if (Boolean(config.identity33) !== isIdentity33SchemaScope())
|
|
2033
|
+
return withIdentity33SchemaScope(() => {
|
|
2034
|
+
const instance = createAdcpServer(config);
|
|
2035
|
+
return config.identity33 ? bindIdentity33SchemaScope(instance) : instance;
|
|
2036
|
+
}, Boolean(config.identity33));
|
|
1932
2037
|
const {
|
|
1933
2038
|
name,
|
|
1934
2039
|
version,
|
|
@@ -2020,7 +2125,7 @@ function createAdcpServer(config) {
|
|
|
2020
2125
|
}
|
|
2021
2126
|
const credentialPolicyPatterns = credentialPolicy === void 0 || typeof credentialPolicy === "string" ? void 0 : credentialPolicy.patterns;
|
|
2022
2127
|
const adcpVersion = resolveAdcpVersion(
|
|
2023
|
-
configuredAdcpVersion ?? (config.proposalNegotiation ? ADCP_VERSION : void 0)
|
|
2128
|
+
configuredAdcpVersion ?? (config.identity33 ? "3.3" : config.proposalNegotiation ? ADCP_VERSION : void 0)
|
|
2024
2129
|
);
|
|
2025
2130
|
const toolVersionRanges = parseToolVersionRanges(config.toolVersions);
|
|
2026
2131
|
const toolAvailableForRelease = (toolName, release) => toolIsAvailableInRelease(toolVersionRanges, toolName, release);
|
|
@@ -2093,6 +2198,23 @@ function createAdcpServer(config) {
|
|
|
2093
2198
|
})();
|
|
2094
2199
|
const protocolTaskRelease = parseAdcpRelease(protocolBundleKey);
|
|
2095
2200
|
const supportsProtocolTaskTools = protocolTaskRelease !== void 0 && (protocolTaskRelease.major > 3 || protocolTaskRelease.major === 3 && protocolTaskRelease.minor >= 1);
|
|
2201
|
+
const identityOnboarding = capConfig?.account?.agent_onboarding ?? capConfig?.account?.agentOnboarding;
|
|
2202
|
+
if (identityOnboarding) {
|
|
2203
|
+
if (!config.identity33) throw new Error("agent_onboarding requires the identity33 experiment");
|
|
2204
|
+
validateAgentOnboarding(
|
|
2205
|
+
identityOnboarding,
|
|
2206
|
+
{ sandbox: capConfig?.account?.sandbox, supported_billing: capConfig?.account?.supportedBilling },
|
|
2207
|
+
capConfig?.overrides?.experimental_features ?? []
|
|
2208
|
+
);
|
|
2209
|
+
}
|
|
2210
|
+
if (signedRequests?.webBotAuth && (!config.identity33 || !(capConfig?.overrides?.request_signing?.profiles ?? capConfig?.request_signing?.profiles)?.includes(
|
|
2211
|
+
"web-bot-auth"
|
|
2212
|
+
)))
|
|
2213
|
+
throw new Error("Web Bot Auth verifier requires identity33 and request_signing.profiles advertisement");
|
|
2214
|
+
if (config.webhooks?.signingProfile === "web-bot-auth")
|
|
2215
|
+
throw new Error("Select Web Bot Auth on each trusted webhook registration, not as a server-wide default");
|
|
2216
|
+
if (config.webhooks?.webBotAuth && !config.identity33)
|
|
2217
|
+
throw new Error("Web Bot Auth webhook signing requires the identity33 experiment");
|
|
2096
2218
|
const toolsWithErrorArm = getToolsWithErrorArm(adcpVersion);
|
|
2097
2219
|
const isProduction = process.env.NODE_ENV === "production";
|
|
2098
2220
|
const requestValidationMode = validationConfig?.requests ?? (isProduction ? "off" : "strict");
|
|
@@ -2651,6 +2773,10 @@ function createAdcpServer(config) {
|
|
|
2651
2773
|
const hasAccount = "account" in schema.shape;
|
|
2652
2774
|
const wrap = meta?.wrap ?? ((data, summary) => genericResponse(toolName, data, summary));
|
|
2653
2775
|
const toolHandler = async (params, extra) => {
|
|
2776
|
+
const authorizationFailure = getWebBotAuthAuthorizationFailure(extra?.authInfo?.extra);
|
|
2777
|
+
if (authorizationFailure) return webBotAuthToolFailure(authorizationFailure, servedAdcpVersion);
|
|
2778
|
+
if (config.identity33 && !isIdentity33SchemaScope())
|
|
2779
|
+
return withIdentity33SchemaScope(() => toolHandler(params, extra));
|
|
2654
2780
|
const callRequestValidationMode = effectiveRequestValidationMode(extra);
|
|
2655
2781
|
let notificationFailureRows = /* @__PURE__ */ new Map();
|
|
2656
2782
|
const releaseSelection = selectServedAdcpRelease(params, capConfig, adcpVersion, defaultAdcpVersion);
|
|
@@ -2705,6 +2831,22 @@ function createAdcpServer(config) {
|
|
|
2705
2831
|
})
|
|
2706
2832
|
);
|
|
2707
2833
|
}
|
|
2834
|
+
for (const field of ["push_notification_config", "reporting_webhook", "artifact_webhook"]) {
|
|
2835
|
+
const registration = params[field];
|
|
2836
|
+
if (!registration || typeof registration !== "object" || Array.isArray(registration)) continue;
|
|
2837
|
+
const selectedProfile = registration.signing_profile;
|
|
2838
|
+
if (selectedProfile === void 0) continue;
|
|
2839
|
+
const offered = capabilitiesData.webhook_signing?.profiles ?? [
|
|
2840
|
+
"adcp/webhook-signing/v1"
|
|
2841
|
+
];
|
|
2842
|
+
if (typeof selectedProfile !== "string" || !offered.includes(selectedProfile) || selectedProfile === "web-bot-auth" && (!config.identity33 || !isAdcpVersionAtLeast(requestRelease.wireVersion, "3.3")) || selectedProfile === "web-bot-auth" && registration.authentication !== void 0)
|
|
2843
|
+
return finalize(
|
|
2844
|
+
adcpError("INVALID_REQUEST", {
|
|
2845
|
+
message: "Unsupported or ambiguous webhook signing profile",
|
|
2846
|
+
field: `${field}.signing_profile`
|
|
2847
|
+
})
|
|
2848
|
+
);
|
|
2849
|
+
}
|
|
2708
2850
|
const operationIdError = pushOperationIdError(params, requestRelease);
|
|
2709
2851
|
if (operationIdError) return finalize(operationIdError);
|
|
2710
2852
|
if (toolName === "list_account_changes" && Object.hasOwn(params, "cursor") && Object.hasOwn(params, "starting_position")) {
|
|
@@ -2884,7 +3026,8 @@ function createAdcpServer(config) {
|
|
|
2884
3026
|
"request",
|
|
2885
3027
|
params,
|
|
2886
3028
|
requestRelease.validationVersion,
|
|
2887
|
-
proposalRefinementCapabilities
|
|
3029
|
+
proposalRefinementCapabilities,
|
|
3030
|
+
!!config.identity33 && isAdcpVersionAtLeast(requestRelease.wireVersion, "3.3")
|
|
2888
3031
|
);
|
|
2889
3032
|
if (!outcome.valid) {
|
|
2890
3033
|
if ("refinementError" in outcome && outcome.refinementError?.code === "UNSUPPORTED_FEATURE") {
|
|
@@ -2939,6 +3082,23 @@ function createAdcpServer(config) {
|
|
|
2939
3082
|
}
|
|
2940
3083
|
}
|
|
2941
3084
|
}
|
|
3085
|
+
if (config.identity33) {
|
|
3086
|
+
try {
|
|
3087
|
+
await config.identity33.authorize(ctx, toolName, params);
|
|
3088
|
+
} catch (error) {
|
|
3089
|
+
if (error instanceof TrustRecordUnavailableError)
|
|
3090
|
+
return finalize(adcpError("SERVICE_UNAVAILABLE", { message: error.message, recovery: "transient" }));
|
|
3091
|
+
if (error instanceof IdentityAuthorizationError)
|
|
3092
|
+
return finalize(
|
|
3093
|
+
adcpError("PERMISSION_DENIED", {
|
|
3094
|
+
message: error.message,
|
|
3095
|
+
...error.details && { details: { ...error.details } }
|
|
3096
|
+
})
|
|
3097
|
+
);
|
|
3098
|
+
if (error instanceof AdcpError) return finalize(projectThrownAdcpError(error));
|
|
3099
|
+
return finalize(adcpError("PERMISSION_DENIED", { message: "Agent authorization failed" }));
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
2942
3102
|
let unresolvedAccountPassThrough = false;
|
|
2943
3103
|
const suppliedAccountRef = hasAccount && params.account != null && !(strictAccountReferences && toolName === "list_accounts");
|
|
2944
3104
|
if (suppliedAccountRef && toolName === "list_accounts") {
|
|
@@ -3130,7 +3290,7 @@ function createAdcpServer(config) {
|
|
|
3130
3290
|
);
|
|
3131
3291
|
}
|
|
3132
3292
|
}
|
|
3133
|
-
const callerScopedResolver = toolName === "sync_agent_notification_configs" ? config.protocol?.resolveScope : toolName === "get_principal" || toolName === "sync_principal" ? config.protocol?.resolvePrincipalScope : void 0;
|
|
3293
|
+
const callerScopedResolver = config.identity33 && (toolName === "get_principal" || toolName === "sync_principal" && params.dry_run === true) && isIdentity33UnboundContext(ctx) ? void 0 : toolName === "sync_agent_notification_configs" ? config.protocol?.resolveScope : toolName === "get_principal" || toolName === "sync_principal" ? config.protocol?.resolvePrincipalScope : void 0;
|
|
3134
3294
|
if (callerScopedResolver || toolName === "report_plan_adjustment") {
|
|
3135
3295
|
if (ctx.authInfo === void 0 && ctx.agent === void 0) {
|
|
3136
3296
|
return finalize(
|
|
@@ -3334,7 +3494,18 @@ function createAdcpServer(config) {
|
|
|
3334
3494
|
if (webhookEmitter) {
|
|
3335
3495
|
const tenantScope = webhookTenantScopeForContext(ctx);
|
|
3336
3496
|
const scopedEmitter = tenantScope === void 0 ? configuredWebhookEmitter : webhookEmitter.forTenantScope(tenantScope);
|
|
3337
|
-
|
|
3497
|
+
const profileBindings = ["push_notification_config", "reporting_webhook", "artifact_webhook"].flatMap(
|
|
3498
|
+
(field) => {
|
|
3499
|
+
const value = params[field];
|
|
3500
|
+
return value?.url && value.signing_profile ? [{ url: value.url, profile: value.signing_profile }] : [];
|
|
3501
|
+
}
|
|
3502
|
+
);
|
|
3503
|
+
ctx.emitWebhook = (delivery) => scopedEmitter.emit({
|
|
3504
|
+
...delivery,
|
|
3505
|
+
...delivery.signingProfile === void 0 && profileBindings.some((binding) => binding.url === delivery.url) && {
|
|
3506
|
+
signingProfile: profileBindings.find((binding) => binding.url === delivery.url).profile
|
|
3507
|
+
}
|
|
3508
|
+
});
|
|
3338
3509
|
}
|
|
3339
3510
|
const handlerParams = notificationFailureRows.size === 0 ? params : {
|
|
3340
3511
|
...params,
|
|
@@ -3812,7 +3983,14 @@ function createAdcpServer(config) {
|
|
|
3812
3983
|
}
|
|
3813
3984
|
if (responseValidationMode !== "off" && !isErrorResponse(formatted)) {
|
|
3814
3985
|
const payload = formatted.structuredContent;
|
|
3815
|
-
const outcome = validateFrameworkPayload(
|
|
3986
|
+
const outcome = validateFrameworkPayload(
|
|
3987
|
+
toolName,
|
|
3988
|
+
"response",
|
|
3989
|
+
payload,
|
|
3990
|
+
requestRelease.validationVersion,
|
|
3991
|
+
void 0,
|
|
3992
|
+
!!config.identity33 && isAdcpVersionAtLeast(requestRelease.wireVersion, "3.3")
|
|
3993
|
+
);
|
|
3816
3994
|
if (!outcome.valid) {
|
|
3817
3995
|
logger.warn(
|
|
3818
3996
|
`Schema validation warning (response) for ${toolName}: ${formatIssues(outcome.issues, 3, { rootSchemaId: outcome.schemaId })}`,
|
|
@@ -4097,6 +4275,8 @@ function createAdcpServer(config) {
|
|
|
4097
4275
|
_meta: frameworkToolMeta
|
|
4098
4276
|
},
|
|
4099
4277
|
(async (params, extra) => {
|
|
4278
|
+
const identityError = await authorizeAuxiliaryIdentityTool("get_task_status", params, extra);
|
|
4279
|
+
if (identityError) return finalizeProtocolTaskToolResponse("get_task_status", params ?? {}, identityError);
|
|
4100
4280
|
const credentialError = taskToolCredentialPolicyError("get_task_status", params ?? {}, extra);
|
|
4101
4281
|
if (credentialError) {
|
|
4102
4282
|
return finalizeProtocolTaskToolResponse("get_task_status", params ?? {}, credentialError, {
|
|
@@ -4183,6 +4363,8 @@ function createAdcpServer(config) {
|
|
|
4183
4363
|
_meta: frameworkToolMeta
|
|
4184
4364
|
},
|
|
4185
4365
|
(async (params, extra) => {
|
|
4366
|
+
const identityError = await authorizeAuxiliaryIdentityTool("list_tasks", params, extra);
|
|
4367
|
+
if (identityError) return finalizeProtocolTaskToolResponse("list_tasks", params ?? {}, identityError);
|
|
4186
4368
|
const credentialError = taskToolCredentialPolicyError("list_tasks", params ?? {}, extra);
|
|
4187
4369
|
if (credentialError) {
|
|
4188
4370
|
return finalizeProtocolTaskToolResponse("list_tasks", params ?? {}, credentialError, { echoContext: false });
|
|
@@ -4299,6 +4481,8 @@ function createAdcpServer(config) {
|
|
|
4299
4481
|
);
|
|
4300
4482
|
};
|
|
4301
4483
|
const wrappedHandler = (async (...args) => {
|
|
4484
|
+
const identityError = await authorizeAuxiliaryIdentityTool(customName, args[0], args[args.length - 1]);
|
|
4485
|
+
if (identityError) return finalizeCustomResponse(identityError);
|
|
4302
4486
|
const params = isPlainObject(args[0]) ? args[0] : {};
|
|
4303
4487
|
const selectedRelease = selectServedAdcpRelease(params, capConfig, adcpVersion, defaultAdcpVersion);
|
|
4304
4488
|
if (isMcpToolResponse(selectedRelease)) return finalizeCustomResponse(selectedRelease);
|
|
@@ -4417,6 +4601,7 @@ function createAdcpServer(config) {
|
|
|
4417
4601
|
...capConfig.account.defaultBilling && { default_billing: capConfig.account.defaultBilling },
|
|
4418
4602
|
required_for_products: capConfig.account.requiredForProducts ?? false,
|
|
4419
4603
|
sandbox: capConfig.account.sandbox ?? false,
|
|
4604
|
+
...identityOnboarding && { agent_onboarding: identityOnboarding },
|
|
4420
4605
|
...capConfig.account.changeFeed !== void 0 && { change_feed: capConfig.account.changeFeed }
|
|
4421
4606
|
};
|
|
4422
4607
|
}
|
|
@@ -4458,7 +4643,15 @@ function createAdcpServer(config) {
|
|
|
4458
4643
|
...capabilitiesData.webhook_signing,
|
|
4459
4644
|
supported: true,
|
|
4460
4645
|
profile,
|
|
4461
|
-
algorithms: [
|
|
4646
|
+
algorithms: [
|
|
4647
|
+
.../* @__PURE__ */ new Set([
|
|
4648
|
+
algorithm,
|
|
4649
|
+
...webhooks.webBotAuth ? [
|
|
4650
|
+
("privateKey" in webhooks.webBotAuth.key ? webhooks.webBotAuth.key.privateKey.crv : webhooks.webBotAuth.key.publicKey.crv) === "P-256" ? "ecdsa-p256-sha256" : "ed25519"
|
|
4651
|
+
] : []
|
|
4652
|
+
])
|
|
4653
|
+
],
|
|
4654
|
+
...webhooks.webBotAuth && { profiles: ["adcp/webhook-signing/v1", "web-bot-auth"] },
|
|
4462
4655
|
legacy_hmac_fallback: capabilitiesData.webhook_signing?.legacy_hmac_fallback ?? false,
|
|
4463
4656
|
delivery_retry_horizon_seconds: webhooks.deliveryRetryHorizonSeconds ?? 86400
|
|
4464
4657
|
};
|
|
@@ -4504,6 +4697,36 @@ function createAdcpServer(config) {
|
|
|
4504
4697
|
];
|
|
4505
4698
|
}
|
|
4506
4699
|
capabilitiesData.library_version = `@adcp/client@${LIBRARY_VERSION}`;
|
|
4700
|
+
async function authorizeAuxiliaryIdentityTool(toolName, params, extra) {
|
|
4701
|
+
const failure = getWebBotAuthAuthorizationFailure(extra?.authInfo?.extra);
|
|
4702
|
+
if (failure) return webBotAuthToolFailure(failure, servedAdcpVersion);
|
|
4703
|
+
if (!config.identity33) return void 0;
|
|
4704
|
+
try {
|
|
4705
|
+
await config.identity33.authorize(
|
|
4706
|
+
withImmutableServedAdcpVersion(
|
|
4707
|
+
{ toolName, stateStore, authInfo: extra?.authInfo, logger },
|
|
4708
|
+
adcpVersion
|
|
4709
|
+
),
|
|
4710
|
+
toolName,
|
|
4711
|
+
params
|
|
4712
|
+
);
|
|
4713
|
+
} catch (error) {
|
|
4714
|
+
if (error instanceof TrustRecordUnavailableError)
|
|
4715
|
+
return adcpError("SERVICE_UNAVAILABLE", { message: error.message, recovery: "transient" });
|
|
4716
|
+
if (error instanceof IdentityAuthorizationError)
|
|
4717
|
+
return adcpError("PERMISSION_DENIED", {
|
|
4718
|
+
message: error.message,
|
|
4719
|
+
...error.details && { details: { ...error.details } }
|
|
4720
|
+
});
|
|
4721
|
+
if (error instanceof AdcpError) return projectThrownAdcpError(error);
|
|
4722
|
+
return adcpError("PERMISSION_DENIED", { message: "Agent authorization failed" });
|
|
4723
|
+
}
|
|
4724
|
+
return void 0;
|
|
4725
|
+
}
|
|
4726
|
+
for (const field of ["request_signing", "webhook_signing"]) {
|
|
4727
|
+
const signing = capabilitiesData[field];
|
|
4728
|
+
if (signing?.profiles?.includes("web-bot-auth")) signing.wba_draft_revision = WEB_BOT_AUTH_DRAFT_REVISION;
|
|
4729
|
+
}
|
|
4507
4730
|
server.registerTool(
|
|
4508
4731
|
"get_adcp_capabilities",
|
|
4509
4732
|
{
|
|
@@ -4512,6 +4735,10 @@ function createAdcpServer(config) {
|
|
|
4512
4735
|
_meta: frameworkToolMeta
|
|
4513
4736
|
},
|
|
4514
4737
|
(async (params, extra = {}) => {
|
|
4738
|
+
const authorizationFailure = getWebBotAuthAuthorizationFailure(extra.authInfo?.extra);
|
|
4739
|
+
if (authorizationFailure) return webBotAuthToolFailure(authorizationFailure, servedAdcpVersion);
|
|
4740
|
+
const identityError = await authorizeAuxiliaryIdentityTool("get_adcp_capabilities", params, extra);
|
|
4741
|
+
if (identityError) return identityError;
|
|
4515
4742
|
const callRequestValidationMode = effectiveRequestValidationMode(extra);
|
|
4516
4743
|
const requestParams = isPlainObject(params) ? params : {};
|
|
4517
4744
|
const releaseSelection = selectServedAdcpRelease(requestParams, capConfig, adcpVersion, defaultAdcpVersion);
|
|
@@ -4646,7 +4873,12 @@ function createAdcpServer(config) {
|
|
|
4646
4873
|
delete validationPayload.media_buy.proposal_refinement;
|
|
4647
4874
|
delete validationPayload.media_buy.lifecycle_tools;
|
|
4648
4875
|
}
|
|
4649
|
-
const responseOutcome =
|
|
4876
|
+
const responseOutcome = config.identity33 && isAdcpVersionAtLeast(release.wireVersion, "3.3") ? validateIdentity33Payload(
|
|
4877
|
+
"get_adcp_capabilities",
|
|
4878
|
+
"response",
|
|
4879
|
+
validationPayload,
|
|
4880
|
+
release.validationVersion
|
|
4881
|
+
) : validateResponse("get_adcp_capabilities", validationPayload, release.validationVersion);
|
|
4650
4882
|
if (!responseOutcome.valid) {
|
|
4651
4883
|
logger.warn(
|
|
4652
4884
|
`Schema validation warning (response) for get_adcp_capabilities: ${formatIssues(responseOutcome.issues, 3, { rootSchemaId: responseOutcome.schemaId })}`,
|
|
@@ -4872,6 +5104,30 @@ function createAdcpServer(config) {
|
|
|
4872
5104
|
protocols,
|
|
4873
5105
|
signedRequests: signedRequestsState
|
|
4874
5106
|
});
|
|
5107
|
+
if (config.identity33) {
|
|
5108
|
+
for (const method of [
|
|
5109
|
+
"initialize",
|
|
5110
|
+
"tools/list",
|
|
5111
|
+
"tools/call",
|
|
5112
|
+
"resources/list",
|
|
5113
|
+
"resources/read",
|
|
5114
|
+
"prompts/list",
|
|
5115
|
+
"prompts/get",
|
|
5116
|
+
"tasks/get",
|
|
5117
|
+
"tasks/list",
|
|
5118
|
+
"tasks/cancel",
|
|
5119
|
+
"tasks/result"
|
|
5120
|
+
])
|
|
5121
|
+
wrapSdkRequestHandler(
|
|
5122
|
+
server,
|
|
5123
|
+
method,
|
|
5124
|
+
(original, request, extra) => withIdentity33SchemaScope(() => original(request, extra))
|
|
5125
|
+
);
|
|
5126
|
+
}
|
|
5127
|
+
wrapSdkRequestHandler(server, "tools/call", (original, request, extra) => {
|
|
5128
|
+
const failure = getWebBotAuthAuthorizationFailure(extra?.authInfo?.extra);
|
|
5129
|
+
return failure ? webBotAuthToolFailure(failure, servedAdcpVersion) : original(request, extra);
|
|
5130
|
+
});
|
|
4875
5131
|
return wrapped;
|
|
4876
5132
|
}
|
|
4877
5133
|
export {
|
|
@@ -340,6 +340,8 @@ export interface ResolveContext {
|
|
|
340
340
|
* before the platform method runs; treat fields the buyer sent as
|
|
341
341
|
* authoritative, but expect framework-injected entities (e.g.
|
|
342
342
|
* hydrated product / media-buy refs) to be visible here too.
|
|
343
|
+
* Account-sync guard lookups and upsert receive independent input
|
|
344
|
+
* copies so callback normalization cannot rewrite framework checks.
|
|
343
345
|
* - **Buyer-controlled untrusted data.** Free-text fields (`brief`,
|
|
344
346
|
* `message`, creative snippets, etc.) are attacker-controlled.
|
|
345
347
|
* Don't log `ctx.input` wholesale — secret fields like
|
|
@@ -374,6 +376,18 @@ export interface AccountToolContext<TCtxMeta = Record<string, unknown>> extends
|
|
|
374
376
|
/** Resolved Account from `accounts.resolve()`. Populated by the framework before dispatch. */
|
|
375
377
|
account: Account<TCtxMeta>;
|
|
376
378
|
}
|
|
379
|
+
/** Pre-write snapshots aligned with the accepted entries passed to `upsert`. */
|
|
380
|
+
export interface AccountUpsertContext<TCtxMeta = Record<string, unknown>> extends ResolveContext {
|
|
381
|
+
/** Null for an unresolved or ID-keyed entry. Lookup uses `provisioning: false`. */
|
|
382
|
+
readonly existing?: readonly (Account<TCtxMeta> | null)[];
|
|
383
|
+
}
|
|
384
|
+
/** A sync/list contract violation, delivered only to the seller. */
|
|
385
|
+
export interface AccountSyncDiagnostic {
|
|
386
|
+
readonly code: 'ACCOUNT_SYNC_IDEMPOTENCY_VIOLATION' | 'ACCOUNT_SYNC_PAYMENT_TERMS_MISMATCH' | 'ACCOUNT_SYNC_BILLING_MISMATCH' | 'ACCOUNT_SYNC_LOOKUP_UNSUPPORTED' | 'ACCOUNT_BILLING_FIELDS_MISSING';
|
|
387
|
+
readonly toolName: 'sync_accounts' | 'list_accounts';
|
|
388
|
+
/** Original request index for sync; page index for list. */
|
|
389
|
+
readonly index: number;
|
|
390
|
+
}
|
|
377
391
|
/**
|
|
378
392
|
* Request context for tools that can omit an `account` field —
|
|
379
393
|
* `preview_creative`, `list_creative_formats` (optional since rc.7), and
|
|
@@ -469,6 +483,15 @@ export declare function normalizeAccountResolution(resolution: AccountResolution
|
|
|
469
483
|
*/
|
|
470
484
|
export declare function isAccountResolutionMode(value: unknown): value is AccountResolutionMode;
|
|
471
485
|
export interface AccountStore<TCtxMeta = Record<string, unknown>> {
|
|
486
|
+
/**
|
|
487
|
+
* Convert sync contract violations to per-row failures. Default: diagnostics only.
|
|
488
|
+
* This is post-write response validation, not a transaction or rollback.
|
|
489
|
+
* For accept-or-reject guarantees, upsert must check these contracts before
|
|
490
|
+
* committing too (createKeyedAccountStore does so for its own backend).
|
|
491
|
+
*/
|
|
492
|
+
readonly strictIdempotency?: boolean;
|
|
493
|
+
/** Server-side diagnostics; never includes credentials or account metadata. Async hooks are fire-and-forget, with failures isolated from dispatch. */
|
|
494
|
+
readonly onDiagnostic?: (diagnostic: AccountSyncDiagnostic) => void;
|
|
472
495
|
/**
|
|
473
496
|
* How buyers reference accounts on this platform. Three onboarding models,
|
|
474
497
|
* aligned with the account-reference taxonomy clarified upstream in
|
|
@@ -640,7 +663,7 @@ export interface AccountStore<TCtxMeta = Record<string, unknown>> {
|
|
|
640
663
|
* verified `agent_url` from `credential.kind === 'http_sig'` when
|
|
641
664
|
* `agentRegistry` is not configured).
|
|
642
665
|
*/
|
|
643
|
-
upsert?(refs: AccountReference[], ctx?:
|
|
666
|
+
upsert?(refs: AccountReference[], ctx?: AccountUpsertContext<TCtxMeta>): Promise<SyncAccountsHandlerResult>;
|
|
644
667
|
/**
|
|
645
668
|
* sync_governance API surface. Buyers register governance agent endpoints
|
|
646
669
|
* per-account; the seller persists the binding and consults the agents
|
|
@@ -340,6 +340,8 @@ export interface ResolveContext {
|
|
|
340
340
|
* before the platform method runs; treat fields the buyer sent as
|
|
341
341
|
* authoritative, but expect framework-injected entities (e.g.
|
|
342
342
|
* hydrated product / media-buy refs) to be visible here too.
|
|
343
|
+
* Account-sync guard lookups and upsert receive independent input
|
|
344
|
+
* copies so callback normalization cannot rewrite framework checks.
|
|
343
345
|
* - **Buyer-controlled untrusted data.** Free-text fields (`brief`,
|
|
344
346
|
* `message`, creative snippets, etc.) are attacker-controlled.
|
|
345
347
|
* Don't log `ctx.input` wholesale — secret fields like
|
|
@@ -374,6 +376,18 @@ export interface AccountToolContext<TCtxMeta = Record<string, unknown>> extends
|
|
|
374
376
|
/** Resolved Account from `accounts.resolve()`. Populated by the framework before dispatch. */
|
|
375
377
|
account: Account<TCtxMeta>;
|
|
376
378
|
}
|
|
379
|
+
/** Pre-write snapshots aligned with the accepted entries passed to `upsert`. */
|
|
380
|
+
export interface AccountUpsertContext<TCtxMeta = Record<string, unknown>> extends ResolveContext {
|
|
381
|
+
/** Null for an unresolved or ID-keyed entry. Lookup uses `provisioning: false`. */
|
|
382
|
+
readonly existing?: readonly (Account<TCtxMeta> | null)[];
|
|
383
|
+
}
|
|
384
|
+
/** A sync/list contract violation, delivered only to the seller. */
|
|
385
|
+
export interface AccountSyncDiagnostic {
|
|
386
|
+
readonly code: 'ACCOUNT_SYNC_IDEMPOTENCY_VIOLATION' | 'ACCOUNT_SYNC_PAYMENT_TERMS_MISMATCH' | 'ACCOUNT_SYNC_BILLING_MISMATCH' | 'ACCOUNT_SYNC_LOOKUP_UNSUPPORTED' | 'ACCOUNT_BILLING_FIELDS_MISSING';
|
|
387
|
+
readonly toolName: 'sync_accounts' | 'list_accounts';
|
|
388
|
+
/** Original request index for sync; page index for list. */
|
|
389
|
+
readonly index: number;
|
|
390
|
+
}
|
|
377
391
|
/**
|
|
378
392
|
* Request context for tools that can omit an `account` field —
|
|
379
393
|
* `preview_creative`, `list_creative_formats` (optional since rc.7), and
|
|
@@ -469,6 +483,15 @@ export declare function normalizeAccountResolution(resolution: AccountResolution
|
|
|
469
483
|
*/
|
|
470
484
|
export declare function isAccountResolutionMode(value: unknown): value is AccountResolutionMode;
|
|
471
485
|
export interface AccountStore<TCtxMeta = Record<string, unknown>> {
|
|
486
|
+
/**
|
|
487
|
+
* Convert sync contract violations to per-row failures. Default: diagnostics only.
|
|
488
|
+
* This is post-write response validation, not a transaction or rollback.
|
|
489
|
+
* For accept-or-reject guarantees, upsert must check these contracts before
|
|
490
|
+
* committing too (createKeyedAccountStore does so for its own backend).
|
|
491
|
+
*/
|
|
492
|
+
readonly strictIdempotency?: boolean;
|
|
493
|
+
/** Server-side diagnostics; never includes credentials or account metadata. Async hooks are fire-and-forget, with failures isolated from dispatch. */
|
|
494
|
+
readonly onDiagnostic?: (diagnostic: AccountSyncDiagnostic) => void;
|
|
472
495
|
/**
|
|
473
496
|
* How buyers reference accounts on this platform. Three onboarding models,
|
|
474
497
|
* aligned with the account-reference taxonomy clarified upstream in
|
|
@@ -640,7 +663,7 @@ export interface AccountStore<TCtxMeta = Record<string, unknown>> {
|
|
|
640
663
|
* verified `agent_url` from `credential.kind === 'http_sig'` when
|
|
641
664
|
* `agentRegistry` is not configured).
|
|
642
665
|
*/
|
|
643
|
-
upsert?(refs: AccountReference[], ctx?:
|
|
666
|
+
upsert?(refs: AccountReference[], ctx?: AccountUpsertContext<TCtxMeta>): Promise<SyncAccountsHandlerResult>;
|
|
644
667
|
/**
|
|
645
668
|
* sync_governance API surface. Buyers register governance agent endpoints
|
|
646
669
|
* per-account; the seller persists the binding and consults the agents
|
|
@@ -19,7 +19,7 @@ export type { CursorPage, CursorRequest } from './pagination.mjs';
|
|
|
19
19
|
export { publishStatusChange, setStatusChangeBus, getStatusChangeBus, createInMemoryStatusChangeBus, type StatusChange, type StatusChangeBus, type StatusChangeResourceType, type StatusChangeListener, type PublishStatusChangeOpts, } from './status-changes.mjs';
|
|
20
20
|
export type { DecisioningCapabilities, ComplianceTestingCapabilities, CreativeAgentRef, TargetingCapabilities, TargetingPostalAreaSupport, ReportingCapabilities, } from './capabilities.mjs';
|
|
21
21
|
export { normalizePostalAreaSupport, normalizeTargetingCapabilities } from './capabilities.mjs';
|
|
22
|
-
export type { Account, AccountResolutionMode, CanonicalAccountResolutionMode, AuthPrincipal, AccountStore, AccountFilter, ListAccountsPayload, ListAccountChangesPayload, SyncAccountsPayload, SyncAccountsSuccessPayload, SyncAccountsRow, SyncAccountsResultRow, SyncGovernancePayload, SyncGovernanceSuccessPayload, SyncGovernanceRow, ReportUsagePayload, GetAccountFinancialsPayload, GetAccountFinancialsSuccessPayload, ListAccountsHandlerResult, ListAccountChangesHandlerResult, SyncAccountsHandlerResult, SyncGovernanceHandlerResult, ReportUsageHandlerResult, GetAccountFinancialsHandlerResult, AdcpAccountStatus, ResolveContext, AccountToolContext, ResolvedAuthInfo, } from './account.mjs';
|
|
22
|
+
export type { Account, AccountResolutionMode, CanonicalAccountResolutionMode, AuthPrincipal, AccountStore, AccountFilter, ListAccountsPayload, ListAccountChangesPayload, SyncAccountsPayload, SyncAccountsSuccessPayload, SyncAccountsRow, SyncAccountsResultRow, SyncGovernancePayload, SyncGovernanceSuccessPayload, SyncGovernanceRow, ReportUsagePayload, GetAccountFinancialsPayload, GetAccountFinancialsSuccessPayload, ListAccountsHandlerResult, ListAccountChangesHandlerResult, SyncAccountsHandlerResult, SyncGovernanceHandlerResult, ReportUsageHandlerResult, GetAccountFinancialsHandlerResult, AdcpAccountStatus, ResolveContext, AccountUpsertContext, AccountSyncDiagnostic, AccountToolContext, ResolvedAuthInfo, } from './account.mjs';
|
|
23
23
|
export { AccountNotFoundError, isAccountResolutionMode, normalizeAccountResolution, refAccountId, refHasNaturalKey, } from './account.mjs';
|
|
24
24
|
export { createTenantStore, narrowAccountRef } from './tenant-store.mjs';
|
|
25
25
|
export type { TenantStoreConfig } from './tenant-store.mjs';
|
|
@@ -19,7 +19,7 @@ export type { CursorPage, CursorRequest } from './pagination';
|
|
|
19
19
|
export { publishStatusChange, setStatusChangeBus, getStatusChangeBus, createInMemoryStatusChangeBus, type StatusChange, type StatusChangeBus, type StatusChangeResourceType, type StatusChangeListener, type PublishStatusChangeOpts, } from './status-changes';
|
|
20
20
|
export type { DecisioningCapabilities, ComplianceTestingCapabilities, CreativeAgentRef, TargetingCapabilities, TargetingPostalAreaSupport, ReportingCapabilities, } from './capabilities';
|
|
21
21
|
export { normalizePostalAreaSupport, normalizeTargetingCapabilities } from './capabilities';
|
|
22
|
-
export type { Account, AccountResolutionMode, CanonicalAccountResolutionMode, AuthPrincipal, AccountStore, AccountFilter, ListAccountsPayload, ListAccountChangesPayload, SyncAccountsPayload, SyncAccountsSuccessPayload, SyncAccountsRow, SyncAccountsResultRow, SyncGovernancePayload, SyncGovernanceSuccessPayload, SyncGovernanceRow, ReportUsagePayload, GetAccountFinancialsPayload, GetAccountFinancialsSuccessPayload, ListAccountsHandlerResult, ListAccountChangesHandlerResult, SyncAccountsHandlerResult, SyncGovernanceHandlerResult, ReportUsageHandlerResult, GetAccountFinancialsHandlerResult, AdcpAccountStatus, ResolveContext, AccountToolContext, ResolvedAuthInfo, } from './account';
|
|
22
|
+
export type { Account, AccountResolutionMode, CanonicalAccountResolutionMode, AuthPrincipal, AccountStore, AccountFilter, ListAccountsPayload, ListAccountChangesPayload, SyncAccountsPayload, SyncAccountsSuccessPayload, SyncAccountsRow, SyncAccountsResultRow, SyncGovernancePayload, SyncGovernanceSuccessPayload, SyncGovernanceRow, ReportUsagePayload, GetAccountFinancialsPayload, GetAccountFinancialsSuccessPayload, ListAccountsHandlerResult, ListAccountChangesHandlerResult, SyncAccountsHandlerResult, SyncGovernanceHandlerResult, ReportUsageHandlerResult, GetAccountFinancialsHandlerResult, AdcpAccountStatus, ResolveContext, AccountUpsertContext, AccountSyncDiagnostic, AccountToolContext, ResolvedAuthInfo, } from './account';
|
|
23
23
|
export { AccountNotFoundError, isAccountResolutionMode, normalizeAccountResolution, refAccountId, refHasNaturalKey, } from './account';
|
|
24
24
|
export { createTenantStore, narrowAccountRef } from './tenant-store';
|
|
25
25
|
export type { TenantStoreConfig } from './tenant-store';
|
|
@@ -1,53 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build an `AdcpServer` from a `DecisioningPlatform` impl.
|
|
3
|
-
*
|
|
4
|
-
* v6.0 alpha entry point. Translates the per-specialism platform interface
|
|
5
|
-
* into the framework's existing handler-style config and delegates to
|
|
6
|
-
* `createAdcpServer()`. This means every framework primitive — idempotency,
|
|
7
|
-
* RFC 9421 signing, governance, schema validation, state store, MCP/A2A
|
|
8
|
-
* wire mapping, sandbox boundary — applies unchanged. The new code is the
|
|
9
|
-
* adapter shim, not a forked runtime.
|
|
10
|
-
*
|
|
11
|
-
* **Adopter shape (unified hybrid):** each HITL-eligible tool is a single
|
|
12
|
-
* method. The method returns the wire success arm (sync fast path) OR
|
|
13
|
-
* `ctx.handoffToTask(fn)` to promote the call to a background task (HITL
|
|
14
|
-
* slow path). Adopters branch per-call; framework detects the `TaskHandoff`
|
|
15
|
-
* marker and dispatches accordingly:
|
|
16
|
-
*
|
|
17
|
-
* - Sync path: framework awaits the return value in foreground; projects
|
|
18
|
-
* it to the wire success arm. `throw new AdcpError(...)` projects to
|
|
19
|
-
* the wire `adcp_error` envelope.
|
|
20
|
-
* - HITL path: framework detects the `TaskHandoff` marker, allocates
|
|
21
|
-
* `taskId`, returns the submitted envelope to the buyer immediately,
|
|
22
|
-
* then runs the handoff function in background. The function's return
|
|
23
|
-
* value becomes the task's terminal `result`; `taskCtx.reject(...)`
|
|
24
|
-
* becomes a business `rejected` result, and thrown `AdcpError` becomes
|
|
25
|
-
* the terminal `error`.
|
|
26
|
-
*
|
|
27
|
-
* Generic thrown errors (`Error`, `TypeError`) fall through to the
|
|
28
|
-
* framework's `SERVICE_UNAVAILABLE` mapping.
|
|
29
|
-
*
|
|
30
|
-
* **Wired surface (6.0):** `SalesPlatform` (14 tools — 3 required core +
|
|
31
|
-
* 11 optional; unified hybrid on `create_media_buy` / `sync_creatives`),
|
|
32
|
-
* `CreativeBuilderPlatform` (build_creative / sync_creatives unified
|
|
33
|
-
* hybrid, optional preview_creative sync-only, optional refineCreative),
|
|
34
|
-
* `AudiencePlatform.syncAudiences`, `SignalsPlatform` (get_signals /
|
|
35
|
-
* activate_signal), `AccountStore` (reportUsage, getAccountFinancials),
|
|
36
|
-
* `ContentStandardsPlatform`, `CampaignGovernancePlatform`,
|
|
37
|
-
* `TenantRegistry` (multi-tenant health), `createPostgresTaskRegistry`,
|
|
38
|
-
* `tasks/get` wire handler, per-server + module-level `publishStatusChange`.
|
|
39
|
-
*
|
|
40
|
-
* **Still deferred (rc.1+):** MCP Resources subscription projection for
|
|
41
|
-
* `publishStatusChange`. The no-account tool surface (`preview_creative`,
|
|
42
|
-
* `list_creative_formats`, `provide_performance_feedback`) is now typed
|
|
43
|
-
* via `NoAccountCtx<TCtxMeta>` — handlers receive `ctx.account: Account |
|
|
44
|
-
* undefined` and must narrow before reading `ctx_metadata`.
|
|
45
|
-
*
|
|
46
|
-
* Status: Preview / 6.0. Exported from the canonical `@adcp/sdk/server`
|
|
47
|
-
* entry point; the decisioning implementation remains preview until GA.
|
|
48
|
-
*
|
|
49
|
-
* @public
|
|
50
|
-
*/
|
|
51
1
|
import type { AdcpServer } from '../../adcp-server.mjs';
|
|
52
2
|
import { type AdcpServerConfig, type HandlerContext } from '../../create-adcp-server.mjs';
|
|
53
3
|
import type { DecisioningPlatform, RequiredPlatformsFor, RequiredCapabilitiesFor } from '../platform.mjs';
|