@adcp/sdk 14.0.0 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/adapters/implicit-account-store.d.mts +12 -7
- package/dist/lib/adapters/implicit-account-store.d.ts +12 -7
- package/dist/lib/adapters/implicit-account-store.js +69 -15
- package/dist/lib/adapters/implicit-account-store.mjs +69 -15
- package/dist/lib/core/AgentClient.d.mts +1 -0
- package/dist/lib/core/AgentClient.d.ts +1 -0
- package/dist/lib/core/AgentClient.js +3 -0
- package/dist/lib/core/AgentClient.mjs +3 -0
- package/dist/lib/core/SingleAgentClient.d.mts +35 -2
- package/dist/lib/core/SingleAgentClient.d.ts +35 -2
- package/dist/lib/core/SingleAgentClient.js +377 -36
- package/dist/lib/core/SingleAgentClient.mjs +387 -38
- package/dist/lib/core/TaskExecutor.d.mts +3 -1
- package/dist/lib/core/TaskExecutor.d.ts +3 -1
- package/dist/lib/core/TaskExecutor.js +17 -12
- package/dist/lib/core/TaskExecutor.mjs +17 -12
- package/dist/lib/core/account-key.d.mts +3 -0
- package/dist/lib/core/account-key.d.ts +3 -0
- package/dist/lib/core/account-key.js +41 -0
- package/dist/lib/core/account-key.mjs +17 -0
- package/dist/lib/core/account-resolution.d.mts +2 -0
- package/dist/lib/core/account-resolution.d.ts +2 -0
- package/dist/lib/core/buyer-account-registry.d.mts +93 -0
- package/dist/lib/core/buyer-account-registry.d.ts +93 -0
- package/dist/lib/core/buyer-account-registry.js +602 -0
- package/dist/lib/core/buyer-account-registry.mjs +578 -0
- package/dist/lib/core/product-cache.d.mts +18 -0
- package/dist/lib/core/product-cache.d.ts +18 -0
- package/dist/lib/core/product-cache.js +137 -0
- package/dist/lib/core/product-cache.mjs +112 -0
- package/dist/lib/errors/index.d.mts +40 -1
- package/dist/lib/errors/index.d.ts +40 -1
- package/dist/lib/errors/index.js +69 -3
- package/dist/lib/errors/index.mjs +64 -3
- package/dist/lib/governance/authorization.d.mts +17 -1
- package/dist/lib/governance/authorization.d.ts +17 -1
- package/dist/lib/governance/authorization.js +55 -7
- package/dist/lib/governance/authorization.mjs +59 -7
- package/dist/lib/governance/index.d.mts +2 -2
- package/dist/lib/governance/index.d.ts +2 -2
- package/dist/lib/governance/index.js +2 -0
- package/dist/lib/governance/index.mjs +3 -1
- package/dist/lib/index.d.mts +7 -4
- package/dist/lib/index.d.ts +7 -4
- package/dist/lib/index.js +29 -0
- package/dist/lib/index.mjs +31 -1
- package/dist/lib/net/agent-transport-fetch.d.mts +4 -0
- package/dist/lib/net/agent-transport-fetch.d.ts +4 -0
- package/dist/lib/net/agent-transport-fetch.js +18 -5
- package/dist/lib/net/agent-transport-fetch.mjs +17 -5
- package/dist/lib/protocols/a2a.js +9 -1
- package/dist/lib/protocols/a2a.mjs +9 -1
- package/dist/lib/protocols/index.js +9 -2
- package/dist/lib/protocols/index.mjs +9 -2
- package/dist/lib/protocols/mcp-modern.js +2 -1
- package/dist/lib/protocols/mcp-modern.mjs +2 -1
- package/dist/lib/protocols/mcp.js +5 -2
- package/dist/lib/protocols/mcp.mjs +5 -2
- package/dist/lib/protocols/rawResponseCapture.d.mts +6 -0
- package/dist/lib/protocols/rawResponseCapture.d.ts +6 -0
- package/dist/lib/protocols/rawResponseCapture.js +41 -29
- package/dist/lib/protocols/rawResponseCapture.mjs +40 -29
- package/dist/lib/protocols/signedRequestRejection.d.mts +9 -0
- package/dist/lib/protocols/signedRequestRejection.d.ts +9 -0
- package/dist/lib/protocols/signedRequestRejection.js +209 -0
- package/dist/lib/protocols/signedRequestRejection.mjs +189 -0
- package/dist/lib/protocols/transportDiagnostics.d.mts +1 -0
- package/dist/lib/protocols/transportDiagnostics.d.ts +1 -0
- package/dist/lib/protocols/transportDiagnostics.js +2 -0
- package/dist/lib/protocols/transportDiagnostics.mjs +1 -0
- package/dist/lib/registry/types.generated.d.mts +112 -45
- package/dist/lib/registry/types.generated.d.ts +112 -45
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/account-provisioning.d.mts +2 -0
- package/dist/lib/server/account-provisioning.d.ts +2 -0
- package/dist/lib/server/account-provisioning.js +30 -0
- package/dist/lib/server/account-provisioning.mjs +6 -0
- package/dist/lib/server/account-reference-warnings.d.mts +12 -0
- package/dist/lib/server/account-reference-warnings.d.ts +12 -0
- package/dist/lib/server/account-reference-warnings.js +48 -0
- package/dist/lib/server/account-reference-warnings.mjs +23 -0
- package/dist/lib/server/auth-signature.js +1 -0
- package/dist/lib/server/auth-signature.mjs +1 -0
- package/dist/lib/server/create-adcp-server.d.mts +34 -0
- package/dist/lib/server/create-adcp-server.d.ts +34 -0
- package/dist/lib/server/create-adcp-server.js +225 -14
- package/dist/lib/server/create-adcp-server.mjs +225 -14
- package/dist/lib/server/decisioning/account.d.mts +2 -0
- package/dist/lib/server/decisioning/account.d.ts +2 -0
- package/dist/lib/server/decisioning/runtime/from-platform.js +49 -10
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +49 -10
- package/dist/lib/server/index.d.mts +2 -2
- package/dist/lib/server/index.d.ts +2 -2
- package/dist/lib/server/index.js +2 -0
- package/dist/lib/server/index.mjs +3 -1
- package/dist/lib/signing/agent-resolver/consistency.d.mts +6 -13
- package/dist/lib/signing/agent-resolver/consistency.d.ts +6 -13
- package/dist/lib/signing/agent-resolver/consistency.js +0 -1
- package/dist/lib/signing/agent-resolver/consistency.mjs +0 -1
- package/dist/lib/signing/agent-resolver/errors.d.mts +3 -1
- package/dist/lib/signing/agent-resolver/errors.d.ts +3 -1
- package/dist/lib/signing/agent-resolver/errors.js +6 -0
- package/dist/lib/signing/agent-resolver/errors.mjs +6 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.d.mts +11 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.d.ts +11 -0
- package/dist/lib/signing/agent-resolver/fetch-helpers.js +37 -2
- package/dist/lib/signing/agent-resolver/fetch-helpers.mjs +40 -3
- package/dist/lib/signing/agent-resolver/jwks-set.js +24 -3
- package/dist/lib/signing/agent-resolver/jwks-set.mjs +24 -3
- package/dist/lib/signing/agent-resolver/legacy-brand.d.mts +15 -0
- package/dist/lib/signing/agent-resolver/legacy-brand.d.ts +15 -0
- package/dist/lib/signing/agent-resolver/legacy-brand.js +60 -0
- package/dist/lib/signing/agent-resolver/legacy-brand.mjs +36 -0
- package/dist/lib/signing/agent-resolver/operator-authorization.d.mts +13 -0
- package/dist/lib/signing/agent-resolver/operator-authorization.d.ts +13 -0
- package/dist/lib/signing/agent-resolver/operator-authorization.js +108 -0
- package/dist/lib/signing/agent-resolver/operator-authorization.mjs +84 -0
- package/dist/lib/signing/agent-resolver/resolve-agent.d.mts +14 -4
- package/dist/lib/signing/agent-resolver/resolve-agent.d.ts +14 -4
- package/dist/lib/signing/agent-resolver/resolve-agent.js +148 -137
- package/dist/lib/signing/agent-resolver/resolve-agent.mjs +157 -139
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.mts +7 -1
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.d.ts +7 -1
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.js +50 -17
- package/dist/lib/signing/agent-resolver/resolved-agent-jwks.mjs +50 -17
- package/dist/lib/signing/agent-resolver/select-agent.d.mts +14 -15
- package/dist/lib/signing/agent-resolver/select-agent.d.ts +14 -15
- package/dist/lib/signing/agent-resolver/select-agent.js +98 -13
- package/dist/lib/signing/agent-resolver/select-agent.mjs +95 -13
- package/dist/lib/signing/brand-jwks.d.mts +29 -75
- package/dist/lib/signing/brand-jwks.d.ts +29 -75
- package/dist/lib/signing/brand-jwks.js +120 -182
- package/dist/lib/signing/brand-jwks.mjs +120 -182
- package/dist/lib/signing/errors.d.mts +7 -3
- package/dist/lib/signing/errors.d.ts +7 -3
- package/dist/lib/signing/errors.js +7 -2
- package/dist/lib/signing/errors.mjs +7 -2
- package/dist/lib/signing/jwks-https.d.mts +7 -0
- package/dist/lib/signing/jwks-https.d.ts +7 -0
- package/dist/lib/signing/jwks-https.js +31 -8
- package/dist/lib/signing/jwks-https.mjs +31 -8
- package/dist/lib/signing/jwks.d.mts +8 -0
- package/dist/lib/signing/jwks.d.ts +8 -0
- package/dist/lib/signing/middleware.js +2 -1
- package/dist/lib/signing/middleware.mjs +2 -1
- package/dist/lib/signing/publisher-pins.d.mts +11 -0
- package/dist/lib/signing/publisher-pins.d.ts +11 -0
- package/dist/lib/signing/publisher-pins.js +125 -0
- package/dist/lib/signing/publisher-pins.mjs +101 -0
- package/dist/lib/signing/server.d.mts +1 -0
- package/dist/lib/signing/server.d.ts +1 -0
- package/dist/lib/signing/types.d.mts +5 -0
- package/dist/lib/signing/types.d.ts +5 -0
- package/dist/lib/signing/verifier.js +50 -5
- package/dist/lib/signing/verifier.mjs +50 -5
- package/dist/lib/signing/webhook-verifier.d.mts +7 -2
- package/dist/lib/signing/webhook-verifier.d.ts +7 -2
- package/dist/lib/signing/webhook-verifier.js +42 -2
- package/dist/lib/signing/webhook-verifier.mjs +42 -2
- package/dist/lib/testing/storyboard/account-policy.d.mts +2 -0
- package/dist/lib/testing/storyboard/account-policy.d.ts +2 -0
- package/dist/lib/testing/storyboard/account-policy.js +35 -0
- package/dist/lib/testing/storyboard/account-policy.mjs +11 -0
- package/dist/lib/testing/storyboard/context.js +6 -0
- package/dist/lib/testing/storyboard/context.mjs +6 -0
- package/dist/lib/testing/storyboard/request-builder.js +12 -2
- package/dist/lib/testing/storyboard/request-builder.mjs +12 -2
- package/dist/lib/testing/storyboard/runner.js +3 -2
- package/dist/lib/testing/storyboard/runner.mjs +3 -2
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/accept-proposal.d.ts +19 -1
- package/dist/lib/types/buy-products.d.ts +19 -1
- package/dist/lib/types/check-governance.d.ts +19 -1
- package/dist/lib/types/comply-test-controller.d.ts +19 -1
- package/dist/lib/types/control-media-buy.d.ts +19 -1
- package/dist/lib/types/core.generated.d.mts +14 -1
- package/dist/lib/types/core.generated.d.ts +14 -1
- package/dist/lib/types/create-media-buy.d.ts +14 -1
- package/dist/lib/types/get-media-buys.d.ts +14 -1
- package/dist/lib/types/get-products.d.ts +19 -1
- package/dist/lib/types/list-products.d.ts +19 -1
- package/dist/lib/types/refine-proposals.d.ts +19 -1
- package/dist/lib/types/request-proposals.d.ts +19 -1
- package/dist/lib/types/schemas.generated.d.ts +12 -3
- package/dist/lib/types/schemas.generated.js +4 -1
- package/dist/lib/types/schemas.generated.mjs +4 -1
- package/dist/lib/types/tools.generated.d.mts +14 -1
- package/dist/lib/types/tools.generated.d.ts +14 -1
- package/dist/lib/types/update-media-buy.d.ts +14 -1
- 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/dist/lib/webhooks/index.d.mts +24 -0
- package/dist/lib/webhooks/index.d.ts +24 -0
- package/dist/lib/webhooks/index.js +50 -24
- package/dist/lib/webhooks/index.mjs +49 -24
- package/dist/lib/wholesale-feed-sync/index.d.mts +2 -0
- package/dist/lib/wholesale-feed-sync/index.d.ts +2 -0
- package/dist/lib/wholesale-feed-sync/index.js +7 -0
- package/dist/lib/wholesale-feed-sync/index.mjs +4 -0
- package/dist/lib/wholesale-feed-sync/mirror.d.mts +97 -0
- package/dist/lib/wholesale-feed-sync/mirror.d.ts +97 -0
- package/dist/lib/wholesale-feed-sync/mirror.js +350 -0
- package/dist/lib/wholesale-feed-sync/mirror.mjs +322 -0
- package/dist/lib/wholesale-feed-sync/sync.d.mts +13 -29
- package/dist/lib/wholesale-feed-sync/sync.d.ts +13 -29
- package/dist/lib/wholesale-feed-sync/sync.js +208 -281
- package/dist/lib/wholesale-feed-sync/sync.mjs +213 -281
- package/dist/lib/wholesale-feed-sync/types.d.mts +4 -3
- package/dist/lib/wholesale-feed-sync/types.d.ts +4 -3
- package/docs/README.md +6 -0
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/BUILD-AN-AGENT.md +2 -2
- package/docs/guides/BUYER-QUICKSTART-3.2.md +2 -0
- package/docs/guides/BUYER-STORAGE.md +3 -0
- package/docs/guides/FIRST-CALL-TO-A-SELLER.md +106 -0
- package/docs/guides/SIGNING-GUIDE.md +16 -7
- package/docs/guides/account-resolution.md +132 -10
- package/docs/llms.txt +3 -2
- package/docs/migration-14.0-to-14.1.md +85 -0
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-4.x-to-5.x.md +1 -0
- package/docs/migration-agent-resolution-3.3.md +125 -0
- package/docs/recipes/verifying-inbound-webhooks.md +60 -15
- package/package.json +3 -2
- package/skills/adcp-brand.previous/SKILL.md +0 -200
- package/skills/adcp-creative.previous/SKILL.md +0 -305
- package/skills/adcp-governance.previous/SKILL.md +0 -566
- package/skills/adcp-measurement.previous/SKILL.md +0 -136
- package/skills/adcp-media-buy.previous/SKILL.md +0 -556
- package/skills/adcp-si.previous/SKILL.md +0 -206
- package/skills/adcp-signals.previous/SKILL.md +0 -204
package/dist/lib/index.d.ts
CHANGED
|
@@ -37,12 +37,12 @@ export type { GovernanceConfig, CampaignGovernanceConfig, GovernanceCheckResult,
|
|
|
37
37
|
export { GovernanceMiddleware } from './core/GovernanceMiddleware';
|
|
38
38
|
export { isGovernanceApproved, isGovernanceConditions, isGovernanceDenied, normalizeGovernanceVerdict, } from './core/GovernanceTypes';
|
|
39
39
|
export type { GovernanceDebugEntry } from './core/GovernanceMiddleware';
|
|
40
|
-
export { GOVERNANCE_AUTHORIZATION_CRITICAL_CLAIMS, GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceCommitment, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, buildGovernanceIntentRequest, buildGovernanceProposedCommitment, buildHumanReviewPlan, buildHumanOverride, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, getGovernanceEnforcementTasks, governancePurchaseTypeForTask, governanceTaskRequiresProposedCommitment, targetDeclaresGovernanceEnforcement, targetDeclaresLegacyGovernanceAwareness, validateGovernancePlan, verifyGovernanceAuthorization, REGULATED_HUMAN_REVIEW_CATEGORIES, ANNEX_III_POLICY_IDS, } from './governance';
|
|
40
|
+
export { GOVERNANCE_AUTHORIZATION_CRITICAL_CLAIMS, GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceCommitment, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, buildGovernanceIntentRequest, buildGovernanceProposedCommitment, buildHumanReviewPlan, buildHumanOverride, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, getGovernanceEnforcementTasks, governancePurchaseTypeForTask, governanceTaskRequiresProposedCommitment, targetDeclaresGovernanceEnforcement, targetDeclaresLegacyGovernanceAwareness, validateGovernancePlan, verifyGovernanceAuthorization, createGovernanceAgentJwksResolver, REGULATED_HUMAN_REVIEW_CATEGORIES, ANNEX_III_POLICY_IDS, } from './governance';
|
|
41
41
|
export { ssrfSafeFetch, decodeBodyAsJsonOrText, SSRF_TRANSIENT_CODES, SsrfRefusedError, isPrivateIp, isAlwaysBlocked, isLikelyPrivateUrl, type SsrfRefusedCode, type SsrfDnsLookup, type SsrfFetchOptions, type SsrfFetchResult, } from './net';
|
|
42
42
|
export { createCanonicalReferenceCache, createCanonicalReferenceResolver, canonicalReferenceCacheKey, resolveCanonicalReference, resolveFormatSchemaReference, resolvePlatformExtensionsReference, type CanonicalReference, type CanonicalReferenceCache, type CanonicalReferenceCacheOptions, type CanonicalReferenceError, type CanonicalReferenceErrorCode, type CanonicalReferenceFailureResult, type CanonicalReferenceKind, type CanonicalReferenceResolveOptions, type CanonicalReferenceResolvedResult, type CanonicalReferenceResolver, type CanonicalReferenceResolverOptions, type CanonicalReferenceResult, type CanonicalReferenceStatus, type ExternalRefDigestMap, type FormatSchemaReferenceResolvedResult, type FormatSchemaReferenceResult, type PlatformExtensionsReferenceResult, } from './canonical-references';
|
|
43
43
|
export { assessAcceptancePolicy, createAcceptancePolicyCatalogResolver, resolveAcceptancePolicyCatalog, resolveAcceptancePolicyProfiles, resolveVerifiedAcceptancePolicyProfiles, type AcceptancePolicyCatalog, type AcceptancePolicyCatalogErrorCode, type AcceptancePolicyCatalogFailure, type AcceptancePolicyCatalogIssue, type AcceptancePolicyCatalogResolver, type AcceptancePolicyCatalogResult, type AcceptancePolicyCatalogSuccess, type AcceptancePolicyDiscoveryCapability, type AcceptancePolicyProfile, type AcceptancePolicyProfileResolution, type AcceptancePolicyRegistryPolicy, type AcceptancePolicyRegistryResolver, type AcceptancePolicyReference, type AcceptancePolicyRequirement, type AcceptancePolicyRule, type AcceptancePolicySurface, type RegistryAcceptancePolicyProfileReference, type ResolveAcceptancePolicyCatalogOptions, type ResolveVerifiedAcceptancePolicyProfilesOptions, type ResolvedAcceptancePolicyDefault, type VerifiedAcceptancePolicyProfilesResult, type VerifiedAcceptancePolicyProfilesSuccess, } from './acceptance-policy';
|
|
44
44
|
export { type AcceptancePolicyAssessment, type AcceptancePolicyAssessmentDiagnostic, type AcceptancePolicyAssessmentDiagnosticCode, type AcceptancePolicyMatchedRule, type AcceptancePolicyOutcome, type AssessAcceptancePolicyInput, } from './acceptance-policy/evaluator';
|
|
45
|
-
export type { BuildGovernanceExecutionRequestInput, BuildGovernanceIntentRequestInput, BuildHumanReviewPlanInput, BuildHumanOverrideInput, DataSubjectContestation, GovernanceAuthorizationClaims, GovernanceAuthorizationCriticalClaim, GovernanceAuthorizationErrorCode, GovernanceAuthorizationFailure, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceEnforcementMode, GovernanceEnforcementTask, GovernancePlan, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, GovernanceValidationIssue, HumanOverride, InMemoryGovernanceReplayStoreOptions, PlanBudget, ReallocationAutonomy, VerifyGovernanceAuthorizationOptions, } from './governance';
|
|
45
|
+
export type { BuildGovernanceExecutionRequestInput, BuildGovernanceIntentRequestInput, BuildHumanReviewPlanInput, BuildHumanOverrideInput, DataSubjectContestation, GovernanceAuthorizationClaims, GovernanceAuthorizationCriticalClaim, GovernanceAuthorizationErrorCode, GovernanceAuthorizationFailure, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceEnforcementMode, GovernanceEnforcementTask, GovernancePlan, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, GovernanceValidationIssue, HumanOverride, InMemoryGovernanceReplayStoreOptions, PlanBudget, ReallocationAutonomy, VerifyGovernanceAuthorizationOptions, GovernanceBuyerIdentity, } from './governance';
|
|
46
46
|
export type { BaseTaskEvent, ProtocolRequestEvent, ProtocolResponseEvent, TaskStatusEvent, ObjectEvent, TaskEvent, TaskEventCallbacks, } from './core/TaskEventTypes';
|
|
47
47
|
export { createOperationId } from './core/TaskEventTypes';
|
|
48
48
|
export type { AsyncHandlerConfig, WebhookMetadata, Activity, NotificationMetadata, MediaBuyDeliveryNotification, CreateMediaBuyStatusChangeHandler, UpdateMediaBuyStatusChangeHandler, SyncCreativesStatusChangeHandler, GetProductsStatusChangeHandler, ListProductsStatusChangeHandler, } from './core/AsyncHandler';
|
|
@@ -53,7 +53,7 @@ export * from './handlers/types';
|
|
|
53
53
|
export type { Storage, AtomicTakeStorage, DeferredTaskStorage, BatchStorage, PatternStorage, AgentCapabilities, ConversationState, DeferredTaskState, StorageConfig, StorageFactory, StorageMiddleware, } from './storage/interfaces';
|
|
54
54
|
export { MemoryStorage, createMemoryStorage, createMemoryStorageConfig } from './storage/MemoryStorage';
|
|
55
55
|
export { ADCPError, TaskTimeoutError, MaxClarificationError, DeferredTaskError, TaskAbortedError, AgentNotFoundError, UnsupportedTaskError, ProtocolError, ValidationError as ADCPValidationError, // Rename to avoid conflict
|
|
56
|
-
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, ActionNotAllowedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors';
|
|
56
|
+
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, ActionNotAllowedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors';
|
|
57
57
|
export type { OAuthMetadataInfo, ClientPreflightAdcpErrorInfo, ClientPreflightAdcpErrorRecovery, FeatureUnsupportedErrorOptions, ProtocolFeatureUnsupportedErrorOptions, ActionNotAllowedErrorDetails, ActionNotAllowedReasonValue, ActionNotAllowedAttemptedAction, ActionNotAllowedAvailableAction, ActionNotAllowedRecovery, } from './errors';
|
|
58
58
|
export type { ActionNotAllowedDetails, ActionNotAllowedReason, AvailableActionsResult, AvailableActionsSource, DecomposedUpdateMediaBuy, DecomposedUpdateMediaBuyMutation, LegacyCoarseAction, MediaBuyActionContext, MediaBuyActionId, MediaBuyActionMode, MediaBuyAvailableAction, MediaBuyMutationDirection, MediaBuyMutationScope, MediaBuyUpdateFieldAction, MediaBuyValidAction, ModeMismatchRecovery, PreflightAllowed, PreflightDenial, PreflightDenied, BuyerPropertyPolicy, NormalizedPolicyDomain, ProductPolicyProductLike, ProductPropertyPolicyDiagnostic, ProductPropertyPolicyDiagnosticCode, ProductPropertyPolicyDiagnosticSeverity, ProductPropertyPolicyMode, ProductPropertyPolicySelectorBehavior, ProductPropertyPolicyValidationResult, PreflightResult, ResolvedAction, SLAWindow, SlaWindow, StructuredOnlyMediaBuyAction, ResolvedTargetingInput, TargetingInputFor, ValidateProductsAgainstPropertyPolicyOptions, UpdateFieldEntry, UpdateMediaBuyRequestLike, } from './media-buy';
|
|
59
59
|
export { ACTIONS_BY_FIELD, LEGACY_COARSE_ACTIONS, STRUCTURED_ONLY_MEDIA_BUY_ACTIONS, UPDATE_FIELDS_BY_ACTION, applyTargetingInput, hasTargetingClears, resolveTargetingInput, canAddPackages, canCancel, canDecreaseBudget, canExtendFlight, canIncreaseBudget, canPause, canReallocateBudget, canRemoveCreative, canRemovePackages, canReplaceCreative, canResume, canShortenFlight, canUpdateCreativeAssignments, canUpdateFlightDates, canUpdateFrequencyCaps, canUpdatePacing, canUpdateTargeting, decomposeUpdateMediaBuy, findAvailableAction, getActionForMutation, getAvailableActions, getRollupParent, ProductPropertyPolicyError, normalizeDomainForPropertyPolicy, preflightUpdateMediaBuy, recoveryForModeMismatch, validateProductsAgainstPropertyPolicy, } from './media-buy';
|
|
@@ -237,7 +237,8 @@ export { resolvePreviewAuthority, type PlacementPreviewCandidate, type PreviewAu
|
|
|
237
237
|
export { isStatusCompleted, isStatusWorking, isStatusInputRequired, isStatusSubmitted, isStatusFailed, isStatusRejected, isGetProductsCompleted, isGetProductsWorking, isGetProductsInputRequired, isGetProductsSubmitted, isGetProductsFailed, isCreateMediaBuyCompleted, isCreateMediaBuyWorking, isCreateMediaBuyInputRequired, isCreateMediaBuySubmitted, isCreateMediaBuyFailed, isUpdateMediaBuyCompleted, isUpdateMediaBuyWorking, isUpdateMediaBuyInputRequired, isUpdateMediaBuySubmitted, isUpdateMediaBuyFailed, isSyncCreativesCompleted, isSyncCreativesWorking, isSyncCreativesInputRequired, isSyncCreativesSubmitted, isSyncCreativesFailed, } from './utils/typeGuards';
|
|
238
238
|
export { getAdcpVersion, getLibraryVersion, isCompatibleWith, getCompatibleVersions, parseAdcpMajorVersion, ADCP_VERSION, ADCP_MAJOR_VERSION, LIBRARY_VERSION, COMPATIBLE_ADCP_VERSIONS, VERSION_INFO, } from './version';
|
|
239
239
|
export type { AdcpVersion } from './version';
|
|
240
|
-
export { listBundledAdcpVersions, resolveAdcpVersion } from './utils/adcp-version-config';
|
|
240
|
+
export { listBundledAdcpVersions, resolveAdcpVersion, isAdcpVersionAtLeast, sellerAdvertises31, shouldOmit31Fields, } from './utils/adcp-version-config';
|
|
241
|
+
export { redactSecrets } from './utils/redact-secrets';
|
|
241
242
|
export { getTracer, isTracingEnabled, injectTraceHeaders, withSpan, addSpanAttributes, recordSpanException, } from './observability';
|
|
242
243
|
export { Agent as LegacyAgent, AgentCollection as LegacyAgentCollection } from './agents/index.generated';
|
|
243
244
|
export { LegacyContentStandardsAdapter, type LegacyIContentStandardsAdapter, type LegacyContentEvaluationResult, LegacyContentStandardsErrorCodes, isLegacyContentStandardsError, legacyDefaultContentStandardsAdapter, PropertyListAdapter, type IPropertyListAdapter, type ResolvedProperty, PropertyListErrorCodes, isPropertyListError, defaultPropertyListAdapter, SISessionManager, AISISessionManager, type ISISessionManager, type SISession, SIErrorCodes, defaultSISessionManager, GovernanceAdapter, defaultGovernanceAdapter, type IGovernanceAdapter, type GovernanceAdapterConfig, type GovernanceAdapterErrorCode, type CommittedCheckRequest, type LegacyCommittedCheckRequest, type ModernCommittedCheckRequest, GovernanceAdapterError, GovernanceAdapterErrorCodes, isGovernanceAdapterError, InMemoryImplicitAccountStore, defaultImplicitKeyFn, type ImplicitAccountStoreOptions, createOAuthPassthroughResolver, type OAuthPassthroughResolverOptions, createRosterAccountStore, type RosterAccountStoreOptions, createDerivedAccountStore, type DerivedAccountStoreOptions, type DerivedAccountStoreBaseOptions, type DerivedSingletonAccountStoreOptions, type DerivedRosterAccountStoreOptions, } from './adapters';
|
|
@@ -272,3 +273,5 @@ export { mediaBuyActionResolver } from './server/media-buy-action-resolver';
|
|
|
272
273
|
export type { SellerActionDecision, SellerActionResolutionOptions, SellerActionResolution, } from './server/media-buy-action-resolver';
|
|
273
274
|
export * from './supply-path';
|
|
274
275
|
export type { AuthorizationCollectionSelector, ProductCollectionSelector, CollectionDistribution, DiscoveryCollection, } from './discovery/types';
|
|
276
|
+
export { BuyerAccountRegistry, type AccountPolicy, type BuyerAccountStorage, type BuyerAccountRegistryOptions, type BuyerAccountDispatch, type BuyerAccountProvisioningDispatch, type EnsureAccountOptions, type ProvisionedAccount, } from './core/buyer-account-registry';
|
|
277
|
+
export { createProductCache, ProductCache, type ProductCacheOptions } from './core/product-cache';
|
package/dist/lib/index.js
CHANGED
|
@@ -37,8 +37,12 @@ __export(index_exports, {
|
|
|
37
37
|
ANNEX_III_POLICY_IDS: () => import_governance.ANNEX_III_POLICY_IDS,
|
|
38
38
|
AUTH_DIAGNOSIS_SCHEMA_VERSION: () => import_oauth2.AUTH_DIAGNOSIS_SCHEMA_VERSION,
|
|
39
39
|
AccountAmbiguousError: () => import_errors.AccountAmbiguousError,
|
|
40
|
+
AccountNotFoundError: () => import_errors.AccountNotFoundError,
|
|
41
|
+
AccountNotProvisionedError: () => import_errors.AccountNotProvisionedError,
|
|
42
|
+
AccountPaymentRequiredError: () => import_errors.AccountPaymentRequiredError,
|
|
40
43
|
AccountPendingApprovalError: () => import_errors.AccountPendingApprovalError,
|
|
41
44
|
AccountRequiredError: () => import_errors.AccountRequiredError,
|
|
45
|
+
AccountSetupRequiredError: () => import_errors.AccountSetupRequiredError,
|
|
42
46
|
ActionNotAllowedError: () => import_errors.ActionNotAllowedError,
|
|
43
47
|
AdCPClient: () => AdCPClient,
|
|
44
48
|
AdagentsJsonSchema: () => import_wellknown_schemas.AdagentsJsonSchema,
|
|
@@ -52,7 +56,9 @@ __export(index_exports, {
|
|
|
52
56
|
BRAND_RIGHTS_TOOLS: () => import_capabilities.BRAND_RIGHTS_TOOLS,
|
|
53
57
|
BrandDomainValidationError: () => import_brand.BrandDomainValidationError,
|
|
54
58
|
BrandJsonSchema: () => import_wellknown_schemas.BrandJsonSchema,
|
|
59
|
+
BuyerAccountRegistry: () => import_buyer_account_registry.BuyerAccountRegistry,
|
|
55
60
|
BuyerRetryPolicy: () => import_buyer_retry_policy.BuyerRetryPolicy,
|
|
61
|
+
BuyerSetupError: () => import_errors.BuyerSetupError,
|
|
56
62
|
CATALOG_MACRO_VECTORS: () => import_substitution.CATALOG_MACRO_VECTORS,
|
|
57
63
|
COMMON_LOGO_SLOTS: () => import_brand.COMMON_LOGO_SLOTS,
|
|
58
64
|
COMPATIBLE_ADCP_VERSIONS: () => import_version.COMPATIBLE_ADCP_VERSIONS,
|
|
@@ -144,6 +150,7 @@ __export(index_exports, {
|
|
|
144
150
|
PostgresStateStore: () => import_server.PostgresStateStore,
|
|
145
151
|
PostgresTaskStore: () => import_server.PostgresTaskStore,
|
|
146
152
|
PreviewFetchError: () => import_substitution.PreviewFetchError,
|
|
153
|
+
ProductCache: () => import_product_cache.ProductCache,
|
|
147
154
|
ProductPropertyPolicyError: () => import_media_buy.ProductPropertyPolicyError,
|
|
148
155
|
PropertyCrawler: () => import_property_crawler.PropertyCrawler,
|
|
149
156
|
PropertyIndex: () => import_property_index.PropertyIndex,
|
|
@@ -305,6 +312,7 @@ __export(index_exports, {
|
|
|
305
312
|
createCreativeAgentClient: () => import_CreativeAgentClient.createCreativeAgentClient,
|
|
306
313
|
createDerivedAccountStore: () => import_adapters.createDerivedAccountStore,
|
|
307
314
|
createFileOAuthStorage: () => import_oauth3.createFileOAuthStorage,
|
|
315
|
+
createGovernanceAgentJwksResolver: () => import_governance.createGovernanceAgentJwksResolver,
|
|
308
316
|
createGovernanceEnforcementMiddleware: () => import_governance.createGovernanceEnforcementMiddleware,
|
|
309
317
|
createIdempotencyStore: () => import_server.createIdempotencyStore,
|
|
310
318
|
createInMemoryEstablishedProposalStore: () => import_established_proposal_store.createInMemoryEstablishedProposalStore,
|
|
@@ -316,6 +324,7 @@ __export(index_exports, {
|
|
|
316
324
|
createMemoryStorageConfig: () => import_MemoryStorage.createMemoryStorageConfig,
|
|
317
325
|
createOAuthPassthroughResolver: () => import_adapters.createOAuthPassthroughResolver,
|
|
318
326
|
createOperationId: () => import_TaskEventTypes.createOperationId,
|
|
327
|
+
createProductCache: () => import_product_cache.createProductCache,
|
|
319
328
|
createRosterAccountStore: () => import_adapters.createRosterAccountStore,
|
|
320
329
|
createSeedFixtureCache: () => import_server.createSeedFixtureCache,
|
|
321
330
|
createSessionedStore: () => import_server.createSessionedStore,
|
|
@@ -444,6 +453,7 @@ __export(index_exports, {
|
|
|
444
453
|
isADCPError: () => import_errors.isADCPError,
|
|
445
454
|
isAdcpError: () => import_utils.isAdcpError,
|
|
446
455
|
isAdcpSuccess: () => import_utils.isAdcpSuccess,
|
|
456
|
+
isAdcpVersionAtLeast: () => import_adcp_version_config.isAdcpVersionAtLeast,
|
|
447
457
|
isAgentCardPath: () => import_utils6.isAgentCardPath,
|
|
448
458
|
isAlwaysBlocked: () => import_net.isAlwaysBlocked,
|
|
449
459
|
isCPAPricing: () => import_utils7.isCPAPricing,
|
|
@@ -591,6 +601,7 @@ __export(index_exports, {
|
|
|
591
601
|
recordSpanException: () => import_observability.recordSpanException,
|
|
592
602
|
recoveryForModeMismatch: () => import_media_buy.recoveryForModeMismatch,
|
|
593
603
|
redactIdempotencyKey: () => import_idempotency.redactIdempotencyKey,
|
|
604
|
+
redactSecrets: () => import_redact_secrets.redactSecrets,
|
|
594
605
|
redisBackend: () => import_server.redisBackend,
|
|
595
606
|
redisWebhookRegistrationStore: () => import_redis_webhook_registration_store.redisWebhookRegistrationStore,
|
|
596
607
|
registerAdcpTaskTool: () => import_server.registerAdcpTaskTool,
|
|
@@ -629,7 +640,9 @@ __export(index_exports, {
|
|
|
629
640
|
scopedStore: () => import_server.scopedStore,
|
|
630
641
|
segmentIdActivationKey: () => import_activation_key_builders.segmentIdActivationKey,
|
|
631
642
|
selectLogoForSlot: () => import_brand.selectLogoForSlot,
|
|
643
|
+
sellerAdvertises31: () => import_adcp_version_config.sellerAdvertises31,
|
|
632
644
|
serve: () => import_server.serve,
|
|
645
|
+
shouldOmit31Fields: () => import_adcp_version_config.shouldOmit31Fields,
|
|
633
646
|
signalId: () => import_signal_id_builders.signalId,
|
|
634
647
|
singleBuildCreativeReturn: () => import_build_creative_return_builders.singleBuildCreativeReturn,
|
|
635
648
|
singleEnvelopedBuildCreativeReturn: () => import_build_creative_return_builders.singleEnvelopedBuildCreativeReturn,
|
|
@@ -816,6 +829,7 @@ var import_preview_authority = require('./utils/preview-authority.js');
|
|
|
816
829
|
var import_typeGuards = require('./utils/typeGuards.js');
|
|
817
830
|
var import_version = require('./version.js');
|
|
818
831
|
var import_adcp_version_config = require('./utils/adcp-version-config.js');
|
|
832
|
+
var import_redact_secrets = require('./utils/redact-secrets.js');
|
|
819
833
|
var import_observability = require('./observability/index.js');
|
|
820
834
|
var import_agents = require('./agents/index.generated.js');
|
|
821
835
|
var import_adapters = require('./adapters/index.js');
|
|
@@ -829,6 +843,8 @@ __reExport(index_exports, require('./notifications/account-change-recorded.js'),
|
|
|
829
843
|
__reExport(index_exports, require('./media-buy/actions.js'), module.exports);
|
|
830
844
|
var import_media_buy_action_resolver = require('./server/media-buy-action-resolver.js');
|
|
831
845
|
__reExport(index_exports, require('./supply-path/index.js'), module.exports);
|
|
846
|
+
var import_buyer_account_registry = require('./core/buyer-account-registry.js');
|
|
847
|
+
var import_product_cache = require('./core/product-cache.js');
|
|
832
848
|
const wireVersion = {
|
|
833
849
|
isSupported: import_protocols2.bundleSupportsAdcpVersionField,
|
|
834
850
|
normalize: import_schema_loader2.toReleasePrecisionWire,
|
|
@@ -861,8 +877,12 @@ function createAdCPClientFromEnv() {
|
|
|
861
877
|
ANNEX_III_POLICY_IDS,
|
|
862
878
|
AUTH_DIAGNOSIS_SCHEMA_VERSION,
|
|
863
879
|
AccountAmbiguousError,
|
|
880
|
+
AccountNotFoundError,
|
|
881
|
+
AccountNotProvisionedError,
|
|
882
|
+
AccountPaymentRequiredError,
|
|
864
883
|
AccountPendingApprovalError,
|
|
865
884
|
AccountRequiredError,
|
|
885
|
+
AccountSetupRequiredError,
|
|
866
886
|
ActionNotAllowedError,
|
|
867
887
|
AdCPClient,
|
|
868
888
|
AdagentsJsonSchema,
|
|
@@ -876,7 +896,9 @@ function createAdCPClientFromEnv() {
|
|
|
876
896
|
BRAND_RIGHTS_TOOLS,
|
|
877
897
|
BrandDomainValidationError,
|
|
878
898
|
BrandJsonSchema,
|
|
899
|
+
BuyerAccountRegistry,
|
|
879
900
|
BuyerRetryPolicy,
|
|
901
|
+
BuyerSetupError,
|
|
880
902
|
CATALOG_MACRO_VECTORS,
|
|
881
903
|
COMMON_LOGO_SLOTS,
|
|
882
904
|
COMPATIBLE_ADCP_VERSIONS,
|
|
@@ -968,6 +990,7 @@ function createAdCPClientFromEnv() {
|
|
|
968
990
|
PostgresStateStore,
|
|
969
991
|
PostgresTaskStore,
|
|
970
992
|
PreviewFetchError,
|
|
993
|
+
ProductCache,
|
|
971
994
|
ProductPropertyPolicyError,
|
|
972
995
|
PropertyCrawler,
|
|
973
996
|
PropertyIndex,
|
|
@@ -1129,6 +1152,7 @@ function createAdCPClientFromEnv() {
|
|
|
1129
1152
|
createCreativeAgentClient,
|
|
1130
1153
|
createDerivedAccountStore,
|
|
1131
1154
|
createFileOAuthStorage,
|
|
1155
|
+
createGovernanceAgentJwksResolver,
|
|
1132
1156
|
createGovernanceEnforcementMiddleware,
|
|
1133
1157
|
createIdempotencyStore,
|
|
1134
1158
|
createInMemoryEstablishedProposalStore,
|
|
@@ -1140,6 +1164,7 @@ function createAdCPClientFromEnv() {
|
|
|
1140
1164
|
createMemoryStorageConfig,
|
|
1141
1165
|
createOAuthPassthroughResolver,
|
|
1142
1166
|
createOperationId,
|
|
1167
|
+
createProductCache,
|
|
1143
1168
|
createRosterAccountStore,
|
|
1144
1169
|
createSeedFixtureCache,
|
|
1145
1170
|
createSessionedStore,
|
|
@@ -1268,6 +1293,7 @@ function createAdCPClientFromEnv() {
|
|
|
1268
1293
|
isADCPError,
|
|
1269
1294
|
isAdcpError,
|
|
1270
1295
|
isAdcpSuccess,
|
|
1296
|
+
isAdcpVersionAtLeast,
|
|
1271
1297
|
isAgentCardPath,
|
|
1272
1298
|
isAlwaysBlocked,
|
|
1273
1299
|
isCPAPricing,
|
|
@@ -1415,6 +1441,7 @@ function createAdCPClientFromEnv() {
|
|
|
1415
1441
|
recordSpanException,
|
|
1416
1442
|
recoveryForModeMismatch,
|
|
1417
1443
|
redactIdempotencyKey,
|
|
1444
|
+
redactSecrets,
|
|
1418
1445
|
redisBackend,
|
|
1419
1446
|
redisWebhookRegistrationStore,
|
|
1420
1447
|
registerAdcpTaskTool,
|
|
@@ -1453,7 +1480,9 @@ function createAdCPClientFromEnv() {
|
|
|
1453
1480
|
scopedStore,
|
|
1454
1481
|
segmentIdActivationKey,
|
|
1455
1482
|
selectLogoForSlot,
|
|
1483
|
+
sellerAdvertises31,
|
|
1456
1484
|
serve,
|
|
1485
|
+
shouldOmit31Fields,
|
|
1457
1486
|
signalId,
|
|
1458
1487
|
singleBuildCreativeReturn,
|
|
1459
1488
|
singleEnvelopedBuildCreativeReturn,
|
package/dist/lib/index.mjs
CHANGED
|
@@ -158,6 +158,7 @@ import {
|
|
|
158
158
|
targetDeclaresLegacyGovernanceAwareness,
|
|
159
159
|
validateGovernancePlan,
|
|
160
160
|
verifyGovernanceAuthorization,
|
|
161
|
+
createGovernanceAgentJwksResolver,
|
|
161
162
|
REGULATED_HUMAN_REVIEW_CATEGORIES,
|
|
162
163
|
ANNEX_III_POLICY_IDS
|
|
163
164
|
} from "./governance/index.mjs";
|
|
@@ -220,6 +221,11 @@ import {
|
|
|
220
221
|
AccountRequiredError,
|
|
221
222
|
AccountPendingApprovalError,
|
|
222
223
|
AccountAmbiguousError,
|
|
224
|
+
BuyerSetupError,
|
|
225
|
+
AccountNotFoundError,
|
|
226
|
+
AccountSetupRequiredError,
|
|
227
|
+
AccountPaymentRequiredError,
|
|
228
|
+
AccountNotProvisionedError,
|
|
223
229
|
SDK_ERROR_TO_PROTOCOL_ERROR_CODE,
|
|
224
230
|
VersionUnsupportedError,
|
|
225
231
|
IdempotencyConflictError,
|
|
@@ -702,7 +708,14 @@ import {
|
|
|
702
708
|
COMPATIBLE_ADCP_VERSIONS,
|
|
703
709
|
VERSION_INFO
|
|
704
710
|
} from "./version.mjs";
|
|
705
|
-
import {
|
|
711
|
+
import {
|
|
712
|
+
listBundledAdcpVersions,
|
|
713
|
+
resolveAdcpVersion,
|
|
714
|
+
isAdcpVersionAtLeast,
|
|
715
|
+
sellerAdvertises31,
|
|
716
|
+
shouldOmit31Fields
|
|
717
|
+
} from "./utils/adcp-version-config.mjs";
|
|
718
|
+
import { redactSecrets } from "./utils/redact-secrets.mjs";
|
|
706
719
|
import {
|
|
707
720
|
getTracer,
|
|
708
721
|
isTracingEnabled,
|
|
@@ -800,6 +813,10 @@ export * from "./notifications/account-change-recorded.mjs";
|
|
|
800
813
|
export * from "./media-buy/actions.mjs";
|
|
801
814
|
import { mediaBuyActionResolver } from "./server/media-buy-action-resolver.mjs";
|
|
802
815
|
export * from "./supply-path/index.mjs";
|
|
816
|
+
import {
|
|
817
|
+
BuyerAccountRegistry
|
|
818
|
+
} from "./core/buyer-account-registry.mjs";
|
|
819
|
+
import { createProductCache, ProductCache } from "./core/product-cache.mjs";
|
|
803
820
|
export {
|
|
804
821
|
A2AInvocationError,
|
|
805
822
|
A2A_CARD_PATHS,
|
|
@@ -819,8 +836,12 @@ export {
|
|
|
819
836
|
ANNEX_III_POLICY_IDS,
|
|
820
837
|
AUTH_DIAGNOSIS_SCHEMA_VERSION,
|
|
821
838
|
AccountAmbiguousError,
|
|
839
|
+
AccountNotFoundError,
|
|
840
|
+
AccountNotProvisionedError,
|
|
841
|
+
AccountPaymentRequiredError,
|
|
822
842
|
AccountPendingApprovalError,
|
|
823
843
|
AccountRequiredError,
|
|
844
|
+
AccountSetupRequiredError,
|
|
824
845
|
ActionNotAllowedError,
|
|
825
846
|
AdCPClient,
|
|
826
847
|
AdagentsJsonSchema,
|
|
@@ -834,7 +855,9 @@ export {
|
|
|
834
855
|
BRAND_RIGHTS_TOOLS,
|
|
835
856
|
BrandDomainValidationError,
|
|
836
857
|
BrandJsonSchema,
|
|
858
|
+
BuyerAccountRegistry,
|
|
837
859
|
BuyerRetryPolicy,
|
|
860
|
+
BuyerSetupError,
|
|
838
861
|
CATALOG_MACRO_VECTORS,
|
|
839
862
|
COMMON_LOGO_SLOTS,
|
|
840
863
|
COMPATIBLE_ADCP_VERSIONS,
|
|
@@ -926,6 +949,7 @@ export {
|
|
|
926
949
|
PostgresStateStore,
|
|
927
950
|
PostgresTaskStore,
|
|
928
951
|
PreviewFetchError,
|
|
952
|
+
ProductCache,
|
|
929
953
|
ProductPropertyPolicyError,
|
|
930
954
|
PropertyCrawler,
|
|
931
955
|
PropertyIndex,
|
|
@@ -1087,6 +1111,7 @@ export {
|
|
|
1087
1111
|
createCreativeAgentClient,
|
|
1088
1112
|
createDerivedAccountStore,
|
|
1089
1113
|
createFileOAuthStorage,
|
|
1114
|
+
createGovernanceAgentJwksResolver,
|
|
1090
1115
|
createGovernanceEnforcementMiddleware,
|
|
1091
1116
|
createIdempotencyStore,
|
|
1092
1117
|
createInMemoryEstablishedProposalStore,
|
|
@@ -1098,6 +1123,7 @@ export {
|
|
|
1098
1123
|
createMemoryStorageConfig,
|
|
1099
1124
|
createOAuthPassthroughResolver,
|
|
1100
1125
|
createOperationId,
|
|
1126
|
+
createProductCache,
|
|
1101
1127
|
createRosterAccountStore,
|
|
1102
1128
|
createSeedFixtureCache,
|
|
1103
1129
|
createSessionedStore,
|
|
@@ -1226,6 +1252,7 @@ export {
|
|
|
1226
1252
|
isADCPError,
|
|
1227
1253
|
isAdcpError,
|
|
1228
1254
|
isAdcpSuccess,
|
|
1255
|
+
isAdcpVersionAtLeast,
|
|
1229
1256
|
isAgentCardPath,
|
|
1230
1257
|
isAlwaysBlocked,
|
|
1231
1258
|
isCPAPricing,
|
|
@@ -1373,6 +1400,7 @@ export {
|
|
|
1373
1400
|
recordSpanException,
|
|
1374
1401
|
recoveryForModeMismatch,
|
|
1375
1402
|
redactIdempotencyKey,
|
|
1403
|
+
redactSecrets,
|
|
1376
1404
|
redisBackend,
|
|
1377
1405
|
redisWebhookRegistrationStore,
|
|
1378
1406
|
registerAdcpTaskTool,
|
|
@@ -1411,7 +1439,9 @@ export {
|
|
|
1411
1439
|
scopedStore,
|
|
1412
1440
|
segmentIdActivationKey,
|
|
1413
1441
|
selectLogoForSlot,
|
|
1442
|
+
sellerAdvertises31,
|
|
1414
1443
|
serve,
|
|
1444
|
+
shouldOmit31Fields,
|
|
1415
1445
|
signalId,
|
|
1416
1446
|
singleBuildCreativeReturn,
|
|
1417
1447
|
singleEnvelopedBuildCreativeReturn,
|
|
@@ -18,6 +18,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var agent_transport_fetch_exports = {};
|
|
20
20
|
__export(agent_transport_fetch_exports, {
|
|
21
|
+
AgentTransportPolicyError: () => AgentTransportPolicyError,
|
|
21
22
|
createAgentTransportFetch: () => createAgentTransportFetch
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(agent_transport_fetch_exports);
|
|
@@ -25,14 +26,21 @@ var import_promises = require("node:dns/promises");
|
|
|
25
26
|
var import_node_net = require("node:net");
|
|
26
27
|
var import_undici = require("undici");
|
|
27
28
|
var import_address_guards = require('./address-guards.js');
|
|
29
|
+
class AgentTransportPolicyError extends TypeError {
|
|
30
|
+
code = "agent_transport_policy_refused";
|
|
31
|
+
constructor(message) {
|
|
32
|
+
super(message);
|
|
33
|
+
this.name = "AgentTransportPolicyError";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
28
36
|
const REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
29
37
|
const SENSITIVE_REDIRECT_HEADERS = ["authorization", "cookie", "proxy-authorization", "x-adcp-auth"];
|
|
30
38
|
function createAgentTransportFetch(agentUrl, options = {}) {
|
|
31
39
|
const lookup = options.lookup ?? ((hostname) => (0, import_promises.lookup)(hostname, { all: true }));
|
|
32
40
|
const maxRedirects = options.maxRedirects ?? 5;
|
|
33
41
|
const initialUrl = new URL(agentUrl);
|
|
34
|
-
const allowPrivateEverywhere = options.allowPrivateIp === true || process.env.ADCP_ALLOW_INTERNAL_PROBES === "1" || process.env.ADCP_ALLOW_PRIVATE_AGENT_URL === "1";
|
|
35
|
-
const allowPrivateInitialOrigin = (0, import_address_guards.isLikelyPrivateUrl)(initialUrl.toString());
|
|
42
|
+
const allowPrivateEverywhere = options.allowPrivateIp === true || options.allowPrivateInitialOrigin !== false && (process.env.ADCP_ALLOW_INTERNAL_PROBES === "1" || process.env.ADCP_ALLOW_PRIVATE_AGENT_URL === "1");
|
|
43
|
+
const allowPrivateInitialOrigin = options.allowPrivateInitialOrigin !== false && (0, import_address_guards.isLikelyPrivateUrl)(initialUrl.toString());
|
|
36
44
|
const dispatchers = /* @__PURE__ */ new Map();
|
|
37
45
|
const privateIpAllowedFor = (url) => allowPrivateEverywhere || allowPrivateInitialOrigin && url.origin === initialUrl.origin;
|
|
38
46
|
const dispatcherFor = (url) => {
|
|
@@ -57,6 +65,8 @@ function createAgentTransportFetch(agentUrl, options = {}) {
|
|
|
57
65
|
const redirectMode = init?.redirect ?? request?.redirect ?? "follow";
|
|
58
66
|
for (let redirects = 0; ; redirects++) {
|
|
59
67
|
assertTransportScheme(url);
|
|
68
|
+
if (options.requireHttps && url.protocol !== "https:" && !options.allowPrivateIp)
|
|
69
|
+
throw new AgentTransportPolicyError("Signing discovery requires HTTPS.");
|
|
60
70
|
const hostname = url.hostname.replace(/^\[|\]$/g, "");
|
|
61
71
|
if ((0, import_node_net.isIP)(hostname) !== 0) assertAgentAddressAllowed(hostname, hostname, privateIpAllowedFor(url), false);
|
|
62
72
|
const headerRecord = {};
|
|
@@ -124,19 +134,22 @@ async function resolveAndCreateDispatcher(url, lookup, allowPrivateIp) {
|
|
|
124
134
|
function assertAgentAddressAllowed(address, hostname, allowPrivateIp, resolved) {
|
|
125
135
|
const relationship = resolved ? "resolves to" : "is";
|
|
126
136
|
if ((0, import_address_guards.isAlwaysBlocked)(address)) {
|
|
127
|
-
throw new
|
|
137
|
+
throw new AgentTransportPolicyError(`Agent host ${hostname} ${relationship} an always-blocked address`);
|
|
128
138
|
}
|
|
129
139
|
if (!allowPrivateIp && (0, import_address_guards.isPrivateIp)(address)) {
|
|
130
140
|
const guidance = resolved ? "set transport.allowPrivateIp=true for an explicitly trusted private agent, or provide a trustedFetchFn that enforces its own hostname address policy" : "set transport.allowPrivateIp=true for an explicitly trusted private agent";
|
|
131
|
-
throw new
|
|
141
|
+
throw new AgentTransportPolicyError(
|
|
142
|
+
`Agent host ${hostname} ${relationship} a private or loopback address; ` + guidance
|
|
143
|
+
);
|
|
132
144
|
}
|
|
133
145
|
}
|
|
134
146
|
function assertTransportScheme(url) {
|
|
135
147
|
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
136
|
-
throw new
|
|
148
|
+
throw new AgentTransportPolicyError(`Agent transport does not allow ${url.protocol} URLs`);
|
|
137
149
|
}
|
|
138
150
|
}
|
|
139
151
|
// Annotate the CommonJS export names for ESM import in node:
|
|
140
152
|
0 && (module.exports = {
|
|
153
|
+
AgentTransportPolicyError,
|
|
141
154
|
createAgentTransportFetch
|
|
142
155
|
});
|
|
@@ -2,14 +2,21 @@ import { lookup as dnsLookup } from "node:dns/promises";
|
|
|
2
2
|
import { isIP } from "node:net";
|
|
3
3
|
import { Agent, fetch as undiciFetch } from "undici";
|
|
4
4
|
import { isAlwaysBlocked, isLikelyPrivateUrl, isPrivateIp } from "./address-guards.mjs";
|
|
5
|
+
class AgentTransportPolicyError extends TypeError {
|
|
6
|
+
code = "agent_transport_policy_refused";
|
|
7
|
+
constructor(message) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "AgentTransportPolicyError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
5
12
|
const REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
6
13
|
const SENSITIVE_REDIRECT_HEADERS = ["authorization", "cookie", "proxy-authorization", "x-adcp-auth"];
|
|
7
14
|
function createAgentTransportFetch(agentUrl, options = {}) {
|
|
8
15
|
const lookup = options.lookup ?? ((hostname) => dnsLookup(hostname, { all: true }));
|
|
9
16
|
const maxRedirects = options.maxRedirects ?? 5;
|
|
10
17
|
const initialUrl = new URL(agentUrl);
|
|
11
|
-
const allowPrivateEverywhere = options.allowPrivateIp === true || process.env.ADCP_ALLOW_INTERNAL_PROBES === "1" || process.env.ADCP_ALLOW_PRIVATE_AGENT_URL === "1";
|
|
12
|
-
const allowPrivateInitialOrigin = isLikelyPrivateUrl(initialUrl.toString());
|
|
18
|
+
const allowPrivateEverywhere = options.allowPrivateIp === true || options.allowPrivateInitialOrigin !== false && (process.env.ADCP_ALLOW_INTERNAL_PROBES === "1" || process.env.ADCP_ALLOW_PRIVATE_AGENT_URL === "1");
|
|
19
|
+
const allowPrivateInitialOrigin = options.allowPrivateInitialOrigin !== false && isLikelyPrivateUrl(initialUrl.toString());
|
|
13
20
|
const dispatchers = /* @__PURE__ */ new Map();
|
|
14
21
|
const privateIpAllowedFor = (url) => allowPrivateEverywhere || allowPrivateInitialOrigin && url.origin === initialUrl.origin;
|
|
15
22
|
const dispatcherFor = (url) => {
|
|
@@ -34,6 +41,8 @@ function createAgentTransportFetch(agentUrl, options = {}) {
|
|
|
34
41
|
const redirectMode = init?.redirect ?? request?.redirect ?? "follow";
|
|
35
42
|
for (let redirects = 0; ; redirects++) {
|
|
36
43
|
assertTransportScheme(url);
|
|
44
|
+
if (options.requireHttps && url.protocol !== "https:" && !options.allowPrivateIp)
|
|
45
|
+
throw new AgentTransportPolicyError("Signing discovery requires HTTPS.");
|
|
37
46
|
const hostname = url.hostname.replace(/^\[|\]$/g, "");
|
|
38
47
|
if (isIP(hostname) !== 0) assertAgentAddressAllowed(hostname, hostname, privateIpAllowedFor(url), false);
|
|
39
48
|
const headerRecord = {};
|
|
@@ -101,18 +110,21 @@ async function resolveAndCreateDispatcher(url, lookup, allowPrivateIp) {
|
|
|
101
110
|
function assertAgentAddressAllowed(address, hostname, allowPrivateIp, resolved) {
|
|
102
111
|
const relationship = resolved ? "resolves to" : "is";
|
|
103
112
|
if (isAlwaysBlocked(address)) {
|
|
104
|
-
throw new
|
|
113
|
+
throw new AgentTransportPolicyError(`Agent host ${hostname} ${relationship} an always-blocked address`);
|
|
105
114
|
}
|
|
106
115
|
if (!allowPrivateIp && isPrivateIp(address)) {
|
|
107
116
|
const guidance = resolved ? "set transport.allowPrivateIp=true for an explicitly trusted private agent, or provide a trustedFetchFn that enforces its own hostname address policy" : "set transport.allowPrivateIp=true for an explicitly trusted private agent";
|
|
108
|
-
throw new
|
|
117
|
+
throw new AgentTransportPolicyError(
|
|
118
|
+
`Agent host ${hostname} ${relationship} a private or loopback address; ` + guidance
|
|
119
|
+
);
|
|
109
120
|
}
|
|
110
121
|
}
|
|
111
122
|
function assertTransportScheme(url) {
|
|
112
123
|
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
113
|
-
throw new
|
|
124
|
+
throw new AgentTransportPolicyError(`Agent transport does not allow ${url.protocol} URLs`);
|
|
114
125
|
}
|
|
115
126
|
}
|
|
116
127
|
export {
|
|
128
|
+
AgentTransportPolicyError,
|
|
117
129
|
createAgentTransportFetch
|
|
118
130
|
};
|
|
@@ -39,6 +39,7 @@ var import_fetch = require('../signing/fetch.js');
|
|
|
39
39
|
var import_fetch_async = require('../signing/fetch-async.js');
|
|
40
40
|
var import_redact_args = require('../utils/redact-args.js');
|
|
41
41
|
var import_rawResponseCapture = require('./rawResponseCapture.js');
|
|
42
|
+
var import_signedRequestRejection = require('./signedRequestRejection.js');
|
|
42
43
|
var import_responseSizeLimit = require('./responseSizeLimit.js');
|
|
43
44
|
var import_transportDiagnostics = require('./transportDiagnostics.js');
|
|
44
45
|
var import_abort = require('./abort.js');
|
|
@@ -322,6 +323,7 @@ function buildFetchImpl(authToken, agentUrl) {
|
|
|
322
323
|
const networkFetch = (0, import_transportDiagnostics.wrapFetchWithTransportDiagnostics)(
|
|
323
324
|
(0, import_responseSizeLimit.wrapFetchWithSizeLimit)((input, init) => pinnedFetch(input, init))
|
|
324
325
|
);
|
|
326
|
+
const rejectionFetch = signingContext ? (0, import_signedRequestRejection.wrapFetchWithSignedRequestRejection)(networkFetch, agentUrl) : networkFetch;
|
|
325
327
|
const baseFetch = async (url, options) => {
|
|
326
328
|
const context = callContextStorage.getStore();
|
|
327
329
|
const urlString = typeof url === "string" ? url : url instanceof URL ? url.toString() : url.url;
|
|
@@ -370,7 +372,11 @@ function buildFetchImpl(authToken, agentUrl) {
|
|
|
370
372
|
const response = await (0, import_abort.withAbortSignal)(
|
|
371
373
|
[context?.signal, options?.signal],
|
|
372
374
|
requestTimeoutMs,
|
|
373
|
-
(signal) =>
|
|
375
|
+
(signal) => rejectionFetch(url, {
|
|
376
|
+
...options,
|
|
377
|
+
headers,
|
|
378
|
+
signal
|
|
379
|
+
})
|
|
374
380
|
);
|
|
375
381
|
if (response.status === 401 && context) {
|
|
376
382
|
context.got401Ref.value = true;
|
|
@@ -548,6 +554,8 @@ async function callA2AToolImpl(agentUrl, toolName, parameters, authToken, debugL
|
|
|
548
554
|
message: `A2A: Authentication required for ${agentUrl}`,
|
|
549
555
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
550
556
|
});
|
|
557
|
+
const signedRejection = (0, import_signedRequestRejection.getSignedRequestRejection)(error);
|
|
558
|
+
if (signedRejection) throw signedRejection;
|
|
551
559
|
const challenge = await (0, import_authorization_required.probeAuthChallenge)(agentUrl, {
|
|
552
560
|
fetchFn: context.fetchFn,
|
|
553
561
|
allowPrivateIp: context.allowPrivateIp ?? (0, import_address_guards.isLikelyPrivateUrl)(agentUrl)
|
|
@@ -23,6 +23,7 @@ import { createSigningFetch } from "../signing/fetch.mjs";
|
|
|
23
23
|
import { createSigningFetchAsync } from "../signing/fetch-async.mjs";
|
|
24
24
|
import { redactArgsForLog } from "../utils/redact-args.mjs";
|
|
25
25
|
import { wrapFetchWithCapture } from "./rawResponseCapture.mjs";
|
|
26
|
+
import { getSignedRequestRejection, wrapFetchWithSignedRequestRejection } from "./signedRequestRejection.mjs";
|
|
26
27
|
import { wrapFetchWithSizeLimit } from "./responseSizeLimit.mjs";
|
|
27
28
|
import { wrapFetchWithTransportDiagnostics } from "./transportDiagnostics.mjs";
|
|
28
29
|
import { DEFAULT_REQUEST_TIMEOUT_MS, resolveRequestTimeoutMs, withAbortSignal } from "./abort.mjs";
|
|
@@ -306,6 +307,7 @@ function buildFetchImpl(authToken, agentUrl) {
|
|
|
306
307
|
const networkFetch = wrapFetchWithTransportDiagnostics(
|
|
307
308
|
wrapFetchWithSizeLimit((input, init) => pinnedFetch(input, init))
|
|
308
309
|
);
|
|
310
|
+
const rejectionFetch = signingContext ? wrapFetchWithSignedRequestRejection(networkFetch, agentUrl) : networkFetch;
|
|
309
311
|
const baseFetch = async (url, options) => {
|
|
310
312
|
const context = callContextStorage.getStore();
|
|
311
313
|
const urlString = typeof url === "string" ? url : url instanceof URL ? url.toString() : url.url;
|
|
@@ -354,7 +356,11 @@ function buildFetchImpl(authToken, agentUrl) {
|
|
|
354
356
|
const response = await withAbortSignal(
|
|
355
357
|
[context?.signal, options?.signal],
|
|
356
358
|
requestTimeoutMs,
|
|
357
|
-
(signal) =>
|
|
359
|
+
(signal) => rejectionFetch(url, {
|
|
360
|
+
...options,
|
|
361
|
+
headers,
|
|
362
|
+
signal
|
|
363
|
+
})
|
|
358
364
|
);
|
|
359
365
|
if (response.status === 401 && context) {
|
|
360
366
|
context.got401Ref.value = true;
|
|
@@ -532,6 +538,8 @@ async function callA2AToolImpl(agentUrl, toolName, parameters, authToken, debugL
|
|
|
532
538
|
message: `A2A: Authentication required for ${agentUrl}`,
|
|
533
539
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
534
540
|
});
|
|
541
|
+
const signedRejection = getSignedRequestRejection(error);
|
|
542
|
+
if (signedRejection) throw signedRejection;
|
|
535
543
|
const challenge = await probeAuthChallenge(agentUrl, {
|
|
536
544
|
fetchFn: context.fetchFn,
|
|
537
545
|
allowPrivateIp: context.allowPrivateIp ?? isLikelyPrivateUrl(agentUrl)
|
|
@@ -68,6 +68,7 @@ var import_oauth = require('../auth/oauth/index.js');
|
|
|
68
68
|
var import_authorization_required = require('../auth/oauth/authorization-required.js');
|
|
69
69
|
var import_provider_cache = require('../auth/oauth/provider-cache.js');
|
|
70
70
|
var import_errors = require('../errors/index.js');
|
|
71
|
+
var import_signedRequestRejection = require('./signedRequestRejection.js');
|
|
71
72
|
var import_net = require('../net/index.js');
|
|
72
73
|
var import_validation = require('../validation/index.js');
|
|
73
74
|
var import_tracing = require('../observability/tracing.js');
|
|
@@ -369,7 +370,7 @@ class ProtocolClient {
|
|
|
369
370
|
}
|
|
370
371
|
);
|
|
371
372
|
} catch (err) {
|
|
372
|
-
if (agent.oauth_client_credentials && (0, import_errors.is401Error)(err)) {
|
|
373
|
+
if (agent.oauth_client_credentials && (0, import_errors.is401Error)(err) && (0, import_signedRequestRejection.getSignedRequestRejection)(err)?.challenge?.scheme !== "signature") {
|
|
373
374
|
const ccStorage = (0, import_oauth.getAgentStorage)(agent);
|
|
374
375
|
const allowPrivateIp = transport?.allowPrivateIp ?? (0, import_net.isLikelyPrivateUrl)(agent.agent_uri);
|
|
375
376
|
await (0, import_oauth.ensureClientCredentialsTokens)(agent, {
|
|
@@ -401,6 +402,8 @@ class ProtocolClient {
|
|
|
401
402
|
}
|
|
402
403
|
);
|
|
403
404
|
} catch (retryErr) {
|
|
405
|
+
const rejection = (0, import_signedRequestRejection.getSignedRequestRejection)(retryErr) ?? ((0, import_errors.is401Error)(retryErr) ? (0, import_signedRequestRejection.getSignedRequestRejection)(err) : void 0);
|
|
406
|
+
if (rejection) throw rejection;
|
|
404
407
|
await rethrowAsNeedsAuthorization(
|
|
405
408
|
retryErr,
|
|
406
409
|
agent.agent_uri,
|
|
@@ -441,7 +444,7 @@ class ProtocolClient {
|
|
|
441
444
|
transport?.legacyCompat
|
|
442
445
|
);
|
|
443
446
|
} catch (err) {
|
|
444
|
-
if (agent.oauth_client_credentials && (0, import_errors.is401Error)(err)) {
|
|
447
|
+
if (agent.oauth_client_credentials && (0, import_errors.is401Error)(err) && (0, import_signedRequestRejection.getSignedRequestRejection)(err)?.challenge?.scheme !== "signature") {
|
|
445
448
|
const ccStorage = (0, import_oauth.getAgentStorage)(agent);
|
|
446
449
|
const allowPrivateIp = transport?.allowPrivateIp ?? (0, import_net.isLikelyPrivateUrl)(agent.agent_uri);
|
|
447
450
|
await (0, import_oauth.ensureClientCredentialsTokens)(agent, {
|
|
@@ -470,6 +473,8 @@ class ProtocolClient {
|
|
|
470
473
|
transport?.legacyCompat
|
|
471
474
|
);
|
|
472
475
|
} catch (retryErr) {
|
|
476
|
+
const rejection = (0, import_signedRequestRejection.getSignedRequestRejection)(retryErr) ?? ((0, import_errors.is401Error)(retryErr) ? (0, import_signedRequestRejection.getSignedRequestRejection)(err) : void 0);
|
|
477
|
+
if (rejection) throw rejection;
|
|
473
478
|
await rethrowAsNeedsAuthorization(
|
|
474
479
|
retryErr,
|
|
475
480
|
agent.agent_uri,
|
|
@@ -501,6 +506,8 @@ class ProtocolClient {
|
|
|
501
506
|
}
|
|
502
507
|
}
|
|
503
508
|
async function rethrowAsNeedsAuthorization(err, agentUrl, fetchFn, signal, configuredAllowPrivateIp, recoveryMode = "discover") {
|
|
509
|
+
const signedRejection = (0, import_signedRequestRejection.getSignedRequestRejection)(err);
|
|
510
|
+
if (signedRejection) throw signedRejection;
|
|
504
511
|
if (err instanceof import_oauth.NeedsAuthorizationError) throw err;
|
|
505
512
|
if (!(0, import_errors.is401Error)(err)) return;
|
|
506
513
|
if (recoveryMode === "static") {
|