@adcp/sdk 16.0.0 → 16.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.
Files changed (85) hide show
  1. package/README.md +52 -0
  2. package/bin/adcp-identity.js +3 -2
  3. package/dist/lib/client/core.d.mts +1 -1
  4. package/dist/lib/client/core.d.ts +1 -1
  5. package/dist/lib/core/AgentClient.d.mts +8 -1
  6. package/dist/lib/core/AgentClient.d.ts +8 -1
  7. package/dist/lib/core/AgentClient.js +10 -0
  8. package/dist/lib/core/AgentClient.mjs +10 -0
  9. package/dist/lib/core/AsyncHandler.d.mts +2 -0
  10. package/dist/lib/core/AsyncHandler.d.ts +2 -0
  11. package/dist/lib/core/AsyncHandler.js +1 -1
  12. package/dist/lib/core/AsyncHandler.mjs +1 -1
  13. package/dist/lib/core/ConversationTypes.d.mts +32 -0
  14. package/dist/lib/core/ConversationTypes.d.ts +32 -0
  15. package/dist/lib/core/SingleAgentClient.d.mts +11 -1
  16. package/dist/lib/core/SingleAgentClient.d.ts +11 -1
  17. package/dist/lib/core/SingleAgentClient.js +25 -6
  18. package/dist/lib/core/SingleAgentClient.mjs +26 -7
  19. package/dist/lib/core/TaskExecutor.d.mts +3 -1
  20. package/dist/lib/core/TaskExecutor.d.ts +3 -1
  21. package/dist/lib/core/TaskExecutor.js +127 -34
  22. package/dist/lib/core/TaskExecutor.mjs +127 -34
  23. package/dist/lib/core/task-deadline.d.mts +2 -0
  24. package/dist/lib/core/task-deadline.d.ts +2 -0
  25. package/dist/lib/core/task-deadline.js +20 -2
  26. package/dist/lib/core/task-deadline.mjs +19 -2
  27. package/dist/lib/governance/authorization.d.mts +66 -0
  28. package/dist/lib/governance/authorization.d.ts +66 -0
  29. package/dist/lib/governance/authorization.js +181 -37
  30. package/dist/lib/governance/authorization.mjs +183 -36
  31. package/dist/lib/governance/index.d.mts +2 -2
  32. package/dist/lib/governance/index.d.ts +2 -2
  33. package/dist/lib/governance/index.js +4 -2
  34. package/dist/lib/governance/index.mjs +3 -1
  35. package/dist/lib/identity-3.3/index.d.mts +1 -0
  36. package/dist/lib/identity-3.3/index.d.ts +1 -0
  37. package/dist/lib/identity-3.3/index.js +3 -1
  38. package/dist/lib/identity-3.3/index.mjs +1 -0
  39. package/dist/lib/identity-3.3/jws-artifacts.d.mts +147 -0
  40. package/dist/lib/identity-3.3/jws-artifacts.d.ts +147 -0
  41. package/dist/lib/identity-3.3/jws-artifacts.js +258 -0
  42. package/dist/lib/identity-3.3/jws-artifacts.mjs +234 -0
  43. package/dist/lib/identity-3.3/revocation.d.mts +7 -0
  44. package/dist/lib/identity-3.3/revocation.d.ts +7 -0
  45. package/dist/lib/identity-3.3/revocation.js +13 -0
  46. package/dist/lib/identity-3.3/revocation.mjs +13 -0
  47. package/dist/lib/identity-3.3/schemas.draft.js +1 -1
  48. package/dist/lib/identity-3.3/schemas.draft.mjs +1 -1
  49. package/dist/lib/identity-3.3/trust.d.mts +8 -0
  50. package/dist/lib/identity-3.3/trust.d.ts +8 -0
  51. package/dist/lib/identity-3.3/trust.js +41 -12
  52. package/dist/lib/identity-3.3/trust.mjs +40 -12
  53. package/dist/lib/index.d.mts +3 -3
  54. package/dist/lib/index.d.ts +3 -3
  55. package/dist/lib/index.js +2 -0
  56. package/dist/lib/index.mjs +2 -0
  57. package/dist/lib/registry/types.generated.d.mts +24 -1
  58. package/dist/lib/registry/types.generated.d.ts +24 -1
  59. package/dist/lib/server/account-sync-contract.js +4 -1
  60. package/dist/lib/server/account-sync-contract.mjs +4 -1
  61. package/dist/lib/server/decisioning/runtime/from-platform.js +22 -17
  62. package/dist/lib/server/decisioning/runtime/from-platform.mjs +22 -17
  63. package/dist/lib/server/index.d.mts +2 -2
  64. package/dist/lib/server/index.d.ts +2 -2
  65. package/dist/lib/server/index.js +2 -0
  66. package/dist/lib/server/index.mjs +2 -0
  67. package/dist/lib/signing/web-bot-auth.js +25 -5
  68. package/dist/lib/signing/web-bot-auth.mjs +25 -6
  69. package/dist/lib/testing/storyboard/validations.d.mts +1 -1
  70. package/dist/lib/testing/storyboard/validations.d.ts +1 -1
  71. package/dist/lib/v2/projection/catalog.d.mts +6 -0
  72. package/dist/lib/v2/projection/catalog.d.ts +6 -0
  73. package/dist/lib/v2/projection/catalog.js +5 -0
  74. package/dist/lib/v2/projection/catalog.mjs +4 -0
  75. package/dist/lib/v2/projection/v1-to-v2.js +3 -2
  76. package/dist/lib/v2/projection/v1-to-v2.mjs +4 -3
  77. package/dist/lib/version.d.mts +3 -3
  78. package/dist/lib/version.d.ts +3 -3
  79. package/dist/lib/version.js +3 -3
  80. package/dist/lib/version.mjs +3 -3
  81. package/docs/TYPE-SUMMARY.md +12 -2
  82. package/docs/llms.txt +3 -3
  83. package/docs/migration-14.x-rc-worksheet.md +4 -4
  84. package/docs/migration-agent-identity-3.3.md +72 -19
  85. package/package.json +6 -4
@@ -4314,6 +4314,12 @@ export interface components {
4314
4314
  severity: string;
4315
4315
  message: string;
4316
4316
  }[];
4317
+ /** @description Advisory AdCP 4.0 readiness from the latest non-dry-run compliance run, graded against universal/v4-compatibility.yaml. Does not affect 3.x verification or conformance. Null when the latest run predates the report. */
4318
+ v4_readiness?: {
4319
+ registry_version: string;
4320
+ target_version: string;
4321
+ checks: components["schemas"]["V4ReadinessCheck"][];
4322
+ } | null;
4317
4323
  /** @description Owner-scoped: the agent owner's membership tier. Populated only when the authenticated viewer owns the agent; null otherwise. Field is always present so response shape doesn't reveal ownership. */
4318
4324
  membership_tier?: string | null;
4319
4325
  /** @description Owner-scoped: human-readable label for membership_tier (e.g. 'Builder'). Null for non-owners. */
@@ -4388,6 +4394,23 @@ export interface components {
4388
4394
  /** Format: uri */
4389
4395
  reference_url?: string;
4390
4396
  };
4397
+ V4ReadinessCheck: {
4398
+ /** @description Stable check id from universal/v4-compatibility.yaml. */
4399
+ id: string;
4400
+ /** @enum {string} */
4401
+ status: "passed" | "failing" | "not_observable";
4402
+ /**
4403
+ * @description Why a not_observable check could not be graded. Null for passed and failing.
4404
+ * @enum {string|null}
4405
+ */
4406
+ reason: "storyboard_not_run" | "step_not_run" | "step_skipped" | "not_graded" | "notice_absent" | "not_observed_by_suite" | null;
4407
+ issue: number | null;
4408
+ change: string | null;
4409
+ detection: string;
4410
+ fix: string;
4411
+ /** @description Migration guide anchor for the check. */
4412
+ guide_url: string | null;
4413
+ };
4391
4414
  /** @description Owner-scoped membership leg of badge eligibility. Non-owners receive eligible: null and an empty blocker list. */
4392
4415
  OwnerComplianceEligibility: {
4393
4416
  criteria_version: string;
@@ -4405,7 +4428,7 @@ export interface components {
4405
4428
  adcp_version: string;
4406
4429
  verified_at: string;
4407
4430
  /** @description Specialisms demonstrably passed (enums/specialism.json). Preview specialisms are excluded from stable badges. */
4408
- verified_specialisms: ("audience-sync" | "brand-rights" | "buyer-activation" | "buyer-discovery" | "buyer-monitoring" | "buyer-negotiation" | "buyer-recovery" | "collection-lists" | "content-standards" | "creative-ad-server" | "creative-generative" | "creative-template" | "creative-transformers" | "governance-aware-seller" | "governance-delivery-monitor" | "governance-spend-authority" | "property-lists" | "sales-broadcast-tv" | "sales-catalog-driven" | "sales-dooh" | "sales-exchange" | "sales-guaranteed" | "sales-non-guaranteed" | "sales-proposal-mode" | "sales-retail-media" | "sales-streaming-tv" | "sales-social" | "signal-marketplace" | "orchestrator-multi-agent" | "signal-owned" | "signed-requests" | "sponsored-intelligence")[];
4431
+ verified_specialisms: ("audience-sync" | "brand-rights" | "buyer-activation" | "buyer-discovery" | "buyer-monitoring" | "buyer-negotiation" | "buyer-recovery" | "collection-lists" | "content-standards" | "creative-ad-server" | "creative-generative" | "creative-template" | "creative-transformers" | "governance-aware-seller" | "governance-delivery-monitor" | "governance-spend-authority" | "property-lists" | "sales-broadcast-tv" | "sales-catalog-driven" | "sales-dooh" | "sales-exchange" | "sales-fixed-rate" | "sales-guaranteed" | "sales-non-guaranteed" | "sales-proposal-mode" | "sales-retail-media" | "sales-streaming-tv" | "sales-social" | "signal-marketplace" | "orchestrator-multi-agent" | "signal-owned" | "signed-requests" | "sponsored-intelligence")[];
4409
4432
  /** @description Evidence modes earned. 'spec' = AdCP storyboards were exercised; 'live' = production traffic was observed. Independent of grading_profile and always non-empty when a badge is present. */
4410
4433
  verification_modes: ("spec" | "live")[];
4411
4434
  /**
@@ -4314,6 +4314,12 @@ export interface components {
4314
4314
  severity: string;
4315
4315
  message: string;
4316
4316
  }[];
4317
+ /** @description Advisory AdCP 4.0 readiness from the latest non-dry-run compliance run, graded against universal/v4-compatibility.yaml. Does not affect 3.x verification or conformance. Null when the latest run predates the report. */
4318
+ v4_readiness?: {
4319
+ registry_version: string;
4320
+ target_version: string;
4321
+ checks: components["schemas"]["V4ReadinessCheck"][];
4322
+ } | null;
4317
4323
  /** @description Owner-scoped: the agent owner's membership tier. Populated only when the authenticated viewer owns the agent; null otherwise. Field is always present so response shape doesn't reveal ownership. */
4318
4324
  membership_tier?: string | null;
4319
4325
  /** @description Owner-scoped: human-readable label for membership_tier (e.g. 'Builder'). Null for non-owners. */
@@ -4388,6 +4394,23 @@ export interface components {
4388
4394
  /** Format: uri */
4389
4395
  reference_url?: string;
4390
4396
  };
4397
+ V4ReadinessCheck: {
4398
+ /** @description Stable check id from universal/v4-compatibility.yaml. */
4399
+ id: string;
4400
+ /** @enum {string} */
4401
+ status: "passed" | "failing" | "not_observable";
4402
+ /**
4403
+ * @description Why a not_observable check could not be graded. Null for passed and failing.
4404
+ * @enum {string|null}
4405
+ */
4406
+ reason: "storyboard_not_run" | "step_not_run" | "step_skipped" | "not_graded" | "notice_absent" | "not_observed_by_suite" | null;
4407
+ issue: number | null;
4408
+ change: string | null;
4409
+ detection: string;
4410
+ fix: string;
4411
+ /** @description Migration guide anchor for the check. */
4412
+ guide_url: string | null;
4413
+ };
4391
4414
  /** @description Owner-scoped membership leg of badge eligibility. Non-owners receive eligible: null and an empty blocker list. */
4392
4415
  OwnerComplianceEligibility: {
4393
4416
  criteria_version: string;
@@ -4405,7 +4428,7 @@ export interface components {
4405
4428
  adcp_version: string;
4406
4429
  verified_at: string;
4407
4430
  /** @description Specialisms demonstrably passed (enums/specialism.json). Preview specialisms are excluded from stable badges. */
4408
- verified_specialisms: ("audience-sync" | "brand-rights" | "buyer-activation" | "buyer-discovery" | "buyer-monitoring" | "buyer-negotiation" | "buyer-recovery" | "collection-lists" | "content-standards" | "creative-ad-server" | "creative-generative" | "creative-template" | "creative-transformers" | "governance-aware-seller" | "governance-delivery-monitor" | "governance-spend-authority" | "property-lists" | "sales-broadcast-tv" | "sales-catalog-driven" | "sales-dooh" | "sales-exchange" | "sales-guaranteed" | "sales-non-guaranteed" | "sales-proposal-mode" | "sales-retail-media" | "sales-streaming-tv" | "sales-social" | "signal-marketplace" | "orchestrator-multi-agent" | "signal-owned" | "signed-requests" | "sponsored-intelligence")[];
4431
+ verified_specialisms: ("audience-sync" | "brand-rights" | "buyer-activation" | "buyer-discovery" | "buyer-monitoring" | "buyer-negotiation" | "buyer-recovery" | "collection-lists" | "content-standards" | "creative-ad-server" | "creative-generative" | "creative-template" | "creative-transformers" | "governance-aware-seller" | "governance-delivery-monitor" | "governance-spend-authority" | "property-lists" | "sales-broadcast-tv" | "sales-catalog-driven" | "sales-dooh" | "sales-exchange" | "sales-fixed-rate" | "sales-guaranteed" | "sales-non-guaranteed" | "sales-proposal-mode" | "sales-retail-media" | "sales-streaming-tv" | "sales-social" | "signal-marketplace" | "orchestrator-multi-agent" | "signal-owned" | "signed-requests" | "sponsored-intelligence")[];
4409
4432
  /** @description Evidence modes earned. 'spec' = AdCP storyboards were exercised; 'live' = production traffic was observed. Independent of grading_profile and always non-empty when a badge is present. */
4410
4433
  verification_modes: ("spec" | "live")[];
4411
4434
  /**
@@ -28,6 +28,7 @@ module.exports = __toCommonJS(account_sync_contract_exports);
28
28
  var import_account_key = require('../core/account-key.js');
29
29
  var import_account = require('./decisioning/account.js');
30
30
  var import_async_outcome = require('./decisioning/async-outcome.js');
31
+ const NATURAL_KEY_FIELDS = ["brand", "operator", "operator_unit", "currency", "timezone", "sandbox"];
31
32
  function isolateAccountCallbackInput(ctx) {
32
33
  const descriptors = Object.getOwnPropertyDescriptors(ctx);
33
34
  delete descriptors.input;
@@ -58,7 +59,9 @@ function naturalRef(entry) {
58
59
  const ref = entry.account ?? entry;
59
60
  if (!ref || "account_id" in ref || !("brand" in ref) || !ref.brand || typeof ref.operator !== "string")
60
61
  return void 0;
61
- return ref;
62
+ return Object.fromEntries(
63
+ NATURAL_KEY_FIELDS.filter((field) => ref[field] !== void 0).map((field) => [field, ref[field]])
64
+ );
62
65
  }
63
66
  async function lookup(accounts, ref, ctx, onUnsupported) {
64
67
  try {
@@ -1,6 +1,7 @@
1
1
  import { accountReferenceKey } from "../core/account-key.mjs";
2
2
  import { AccountNotFoundError, toWireAccount } from "./decisioning/account.mjs";
3
3
  import { AdcpError } from "./decisioning/async-outcome.mjs";
4
+ const NATURAL_KEY_FIELDS = ["brand", "operator", "operator_unit", "currency", "timezone", "sandbox"];
4
5
  function isolateAccountCallbackInput(ctx) {
5
6
  const descriptors = Object.getOwnPropertyDescriptors(ctx);
6
7
  delete descriptors.input;
@@ -31,7 +32,9 @@ function naturalRef(entry) {
31
32
  const ref = entry.account ?? entry;
32
33
  if (!ref || "account_id" in ref || !("brand" in ref) || !ref.brand || typeof ref.operator !== "string")
33
34
  return void 0;
34
- return ref;
35
+ return Object.fromEntries(
36
+ NATURAL_KEY_FIELDS.filter((field) => ref[field] !== void 0).map((field) => [field, ref[field]])
37
+ );
35
38
  }
36
39
  async function lookup(accounts, ref, ctx, onUnsupported) {
37
40
  try {
@@ -1009,23 +1009,28 @@ function jsonValuesEqual(left, right) {
1009
1009
  return leftKeys.length === rightKeys.length && leftKeys.every((key) => Object.hasOwn(rightRecord, key) && jsonValuesEqual(leftRecord[key], rightRecord[key]));
1010
1010
  }
1011
1011
  function matchLegacyRefToDeclaration(declaration, ref, ownerId, legacyFormatConverter) {
1012
- const projected = (0, import_v1_to_v2.projectV1ProductToV2)(
1013
- {
1014
- product_id: ownerId,
1015
- name: ownerId,
1016
- description: ownerId,
1017
- format_ids: [ref]
1018
- },
1019
- { legacyFormatConverter }
1020
- );
1021
- if (projected.diagnostics.length > 0 || projected.v2.format_options.length !== 1) return "unresolved";
1022
- const expected = projected.v2.format_options[0];
1023
- if (declaration.format_kind !== expected.format_kind) return "kind_mismatch";
1024
- const params = declaration.params !== null && typeof declaration.params === "object" && !Array.isArray(declaration.params) ? declaration.params : {};
1025
- for (const [key, expectedValue] of Object.entries(expected.params)) {
1026
- if (!Object.hasOwn(params, key) || !jsonValuesEqual(params[key], expectedValue)) return "params_mismatch";
1027
- }
1028
- return "match";
1012
+ const compare = (authoritativeOnly) => {
1013
+ const projected = (0, import_v1_to_v2.projectV1ProductToV2)(
1014
+ {
1015
+ product_id: ownerId,
1016
+ name: ownerId,
1017
+ description: ownerId,
1018
+ format_ids: [ref]
1019
+ },
1020
+ { legacyFormatConverter, _authoritativeOnly: authoritativeOnly }
1021
+ );
1022
+ if (projected.diagnostics.length > 0 || projected.v2.format_options.length !== 1) return "unresolved";
1023
+ const expected = projected.v2.format_options[0];
1024
+ if (declaration.format_kind !== expected.format_kind) return "kind_mismatch";
1025
+ const params = declaration.params !== null && typeof declaration.params === "object" && !Array.isArray(declaration.params) ? declaration.params : {};
1026
+ for (const [key, expectedValue] of Object.entries(expected.params)) {
1027
+ if (!Object.hasOwn(params, key) || !jsonValuesEqual(params[key], expectedValue)) return "params_mismatch";
1028
+ }
1029
+ return "match";
1030
+ };
1031
+ const authoritative = compare(true);
1032
+ if (authoritative !== "unresolved") return authoritative;
1033
+ return compare(false) === "match" ? "match" : "unresolved";
1029
1034
  }
1030
1035
  function validateLegacyRefNarrowing(declaration, ref, ownerId, field, legacyFormatConverter) {
1031
1036
  const match = matchLegacyRefToDeclaration(declaration, ref, ownerId, legacyFormatConverter);
@@ -1041,23 +1041,28 @@ function jsonValuesEqual(left, right) {
1041
1041
  return leftKeys.length === rightKeys.length && leftKeys.every((key) => Object.hasOwn(rightRecord, key) && jsonValuesEqual(leftRecord[key], rightRecord[key]));
1042
1042
  }
1043
1043
  function matchLegacyRefToDeclaration(declaration, ref, ownerId, legacyFormatConverter) {
1044
- const projected = projectV1ProductToV2(
1045
- {
1046
- product_id: ownerId,
1047
- name: ownerId,
1048
- description: ownerId,
1049
- format_ids: [ref]
1050
- },
1051
- { legacyFormatConverter }
1052
- );
1053
- if (projected.diagnostics.length > 0 || projected.v2.format_options.length !== 1) return "unresolved";
1054
- const expected = projected.v2.format_options[0];
1055
- if (declaration.format_kind !== expected.format_kind) return "kind_mismatch";
1056
- const params = declaration.params !== null && typeof declaration.params === "object" && !Array.isArray(declaration.params) ? declaration.params : {};
1057
- for (const [key, expectedValue] of Object.entries(expected.params)) {
1058
- if (!Object.hasOwn(params, key) || !jsonValuesEqual(params[key], expectedValue)) return "params_mismatch";
1059
- }
1060
- return "match";
1044
+ const compare = (authoritativeOnly) => {
1045
+ const projected = projectV1ProductToV2(
1046
+ {
1047
+ product_id: ownerId,
1048
+ name: ownerId,
1049
+ description: ownerId,
1050
+ format_ids: [ref]
1051
+ },
1052
+ { legacyFormatConverter, _authoritativeOnly: authoritativeOnly }
1053
+ );
1054
+ if (projected.diagnostics.length > 0 || projected.v2.format_options.length !== 1) return "unresolved";
1055
+ const expected = projected.v2.format_options[0];
1056
+ if (declaration.format_kind !== expected.format_kind) return "kind_mismatch";
1057
+ const params = declaration.params !== null && typeof declaration.params === "object" && !Array.isArray(declaration.params) ? declaration.params : {};
1058
+ for (const [key, expectedValue] of Object.entries(expected.params)) {
1059
+ if (!Object.hasOwn(params, key) || !jsonValuesEqual(params[key], expectedValue)) return "params_mismatch";
1060
+ }
1061
+ return "match";
1062
+ };
1063
+ const authoritative = compare(true);
1064
+ if (authoritative !== "unresolved") return authoritative;
1065
+ return compare(false) === "match" ? "match" : "unresolved";
1061
1066
  }
1062
1067
  function validateLegacyRefNarrowing(declaration, ref, ownerId, field, legacyFormatConverter) {
1063
1068
  const match = matchLegacyRefToDeclaration(declaration, ref, ownerId, legacyFormatConverter);
@@ -83,8 +83,8 @@ export { createPinAndBindFetch, WEBHOOK_SSRF_POLICY, LOOPBACK_OK_WEBHOOK_SSRF_PO
83
83
  export type { PinAndBindFetchOptions, DnsLookupAll } from './pin-and-bind-fetch.mjs';
84
84
  export { checkGovernance, createAdcpGovernanceEnforcementMiddleware, governanceDeniedError, governanceUnavailableError, } from './governance.mjs';
85
85
  export type { AdcpGovernanceEnforcementMiddleware, CheckGovernanceOptions, GovernanceCallResult, GovernanceApproved, GovernanceDenied, GovernanceConditions, } from './governance.mjs';
86
- export { GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, verifyGovernanceAuthorization, createGovernanceAgentJwksResolver, } from '../governance/index.mjs';
87
- export type { BuildGovernanceExecutionRequestInput, GovernanceAuthorizationClaims, GovernanceAuthorizationErrorCode, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, VerifyGovernanceAuthorizationOptions, GovernanceBuyerIdentity, } from '../governance/index.mjs';
86
+ export { GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, verifyGovernanceAuthorization, verifyHistoricalGovernanceContext, createGovernanceAgentJwksResolver, } from '../governance/index.mjs';
87
+ export type { BuildGovernanceExecutionRequestInput, GovernanceAuthorizationClaims, GovernanceAuthorizationErrorCode, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, VerifyGovernanceAuthorizationOptions, VerifyHistoricalGovernanceContextOptions, HistoricalGovernanceContextResult, GovernanceBuyerIdentity, } from '../governance/index.mjs';
88
88
  export { clearDefaultResolvedListCache, createResolvedListCache, DEFAULT_RESOLVE_LIST_PAGE_SIZE, defaultResolvedListCache, resolvePropertyList, resolveCollectionList, resolvedListCacheKey, matchesPropertyList, matchesCollectionList, } from './targeting-helpers.mjs';
89
89
  export type { ResolvedListCache, ResolvedListCacheEntry, ResolvedListCacheValue, ResolvedListKind, ResolvedPropertyList, ResolvedCollectionList, ResolvedCollection, ResolveListCallTool, ResolveListOptions, } from './targeting-helpers.mjs';
90
90
  export * from './decisioning/index.mjs';
@@ -83,8 +83,8 @@ export { createPinAndBindFetch, WEBHOOK_SSRF_POLICY, LOOPBACK_OK_WEBHOOK_SSRF_PO
83
83
  export type { PinAndBindFetchOptions, DnsLookupAll } from './pin-and-bind-fetch';
84
84
  export { checkGovernance, createAdcpGovernanceEnforcementMiddleware, governanceDeniedError, governanceUnavailableError, } from './governance';
85
85
  export type { AdcpGovernanceEnforcementMiddleware, CheckGovernanceOptions, GovernanceCallResult, GovernanceApproved, GovernanceDenied, GovernanceConditions, } from './governance';
86
- export { GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, verifyGovernanceAuthorization, createGovernanceAgentJwksResolver, } from '../governance';
87
- export type { BuildGovernanceExecutionRequestInput, GovernanceAuthorizationClaims, GovernanceAuthorizationErrorCode, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, VerifyGovernanceAuthorizationOptions, GovernanceBuyerIdentity, } from '../governance';
86
+ export { GovernanceAuthorizationError, GovernanceReplayStoreAdapter, InMemoryGovernanceReplayStore, buildGovernanceExecutionCommitment, buildGovernanceExecutionRequest, computeGovernedPayloadHash, createGovernanceEnforcementMiddleware, verifyGovernanceAuthorization, verifyHistoricalGovernanceContext, createGovernanceAgentJwksResolver, } from '../governance';
87
+ export type { BuildGovernanceExecutionRequestInput, GovernanceAuthorizationClaims, GovernanceAuthorizationErrorCode, GovernanceAuthorizationResult, GovernanceAuthorizationSuccess, GovernanceCommitment, GovernanceEnforcementMiddleware, GovernanceEnforcementMiddlewareConfig, GovernanceEnforcementMiddlewareInput, GovernanceReplayStore, GovernanceReplayBinding, GovernanceRevocationResolver, GovernanceRevocationStatus, VerifyGovernanceAuthorizationOptions, VerifyHistoricalGovernanceContextOptions, HistoricalGovernanceContextResult, GovernanceBuyerIdentity, } from '../governance';
88
88
  export { clearDefaultResolvedListCache, createResolvedListCache, DEFAULT_RESOLVE_LIST_PAGE_SIZE, defaultResolvedListCache, resolvePropertyList, resolveCollectionList, resolvedListCacheKey, matchesPropertyList, matchesCollectionList, } from './targeting-helpers';
89
89
  export type { ResolvedListCache, ResolvedListCacheEntry, ResolvedListCacheValue, ResolvedListKind, ResolvedPropertyList, ResolvedCollectionList, ResolvedCollection, ResolveListCallTool, ResolveListOptions, } from './targeting-helpers';
90
90
  export * from './decisioning';
@@ -293,6 +293,7 @@ __export(server_exports, {
293
293
  verifyApiKey: () => import_auth.verifyApiKey,
294
294
  verifyBearer: () => import_auth.verifyBearer,
295
295
  verifyGovernanceAuthorization: () => import_governance2.verifyGovernanceAuthorization,
296
+ verifyHistoricalGovernanceContext: () => import_governance2.verifyHistoricalGovernanceContext,
296
297
  verifyIntrospection: () => import_auth_introspection.verifyIntrospection,
297
298
  verifyProposalTermsDigest: () => import_verification.verifyProposalTermsDigest,
298
299
  verifySignatureAsAuthenticator: () => import_auth_signature.verifySignatureAsAuthenticator,
@@ -633,6 +634,7 @@ var import_property_lists = require('./property-lists.js');
633
634
  verifyApiKey,
634
635
  verifyBearer,
635
636
  verifyGovernanceAuthorization,
637
+ verifyHistoricalGovernanceContext,
636
638
  verifyIntrospection,
637
639
  verifyProposalTermsDigest,
638
640
  verifySignatureAsAuthenticator,
@@ -236,6 +236,7 @@ import {
236
236
  computeGovernedPayloadHash,
237
237
  createGovernanceEnforcementMiddleware,
238
238
  verifyGovernanceAuthorization,
239
+ verifyHistoricalGovernanceContext,
239
240
  createGovernanceAgentJwksResolver
240
241
  } from "../governance/index.mjs";
241
242
  import {
@@ -579,6 +580,7 @@ export {
579
580
  verifyApiKey,
580
581
  verifyBearer,
581
582
  verifyGovernanceAuthorization,
583
+ verifyHistoricalGovernanceContext,
582
584
  verifyIntrospection,
583
585
  verifyProposalTermsDigest,
584
586
  verifySignatureAsAuthenticator,
@@ -35,6 +35,7 @@ __export(web_bot_auth_exports, {
35
35
  deferWebBotAuthPrincipalFailure: () => deferWebBotAuthPrincipalFailure,
36
36
  getWebBotAuthAuthorizationFailure: () => getWebBotAuthAuthorizationFailure,
37
37
  getWebBotAuthLegacyOriginGate: () => getWebBotAuthLegacyOriginGate,
38
+ isRefusedWebBotAuthTestKey: () => isRefusedWebBotAuthTestKey,
38
39
  isVerifiedWebBotSigner: () => isVerifiedWebBotSigner,
39
40
  isWebBotAuthRevocationChecked: () => isWebBotAuthRevocationChecked,
40
41
  jwkThumbprint: () => jwkThumbprint,
@@ -186,6 +187,14 @@ function jwkThumbprint(jwk) {
186
187
  function keyAlgorithm(jwk) {
187
188
  return jwk.kty === "OKP" && jwk.crv === "Ed25519" ? "ed25519" : void 0;
188
189
  }
190
+ function importable(jwk) {
191
+ try {
192
+ (0, import_crypto2.jwkToPublicKey)(jwk);
193
+ return true;
194
+ } catch {
195
+ return false;
196
+ }
197
+ }
189
198
  function algorithm(jwk) {
190
199
  return keyAlgorithm(jwk) ?? denied("unsupported_key");
191
200
  }
@@ -562,6 +571,9 @@ async function legacyRevocationCheck(options, origin, keyid) {
562
571
  function testKeysAllowed(allowTestKeys) {
563
572
  return allowTestKeys === true && ["test", "development"].includes(process.env.NODE_ENV ?? "");
564
573
  }
574
+ function isRefusedWebBotAuthTestKey(kid, allowTestKeys) {
575
+ return TEST_KIDS.has(kid) && !testKeysAllowed(allowTestKeys);
576
+ }
565
577
  async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}) {
566
578
  try {
567
579
  if (!Number.isFinite(now)) denied("directory_invalid");
@@ -590,25 +602,24 @@ async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}
590
602
  if (!raw || typeof raw !== "object") denied("directory_key");
591
603
  if (Object.keys(raw).some((k) => PRIVATE_JWK_MEMBERS.has(k.toLowerCase()) || k.startsWith("_private")))
592
604
  denied("directory_key");
593
- if (!keyAlgorithm(raw)) continue;
605
+ if (!keyAlgorithm(raw) || !importable(raw)) continue;
594
606
  const thumbprint = jwkThumbprint(raw);
595
607
  const key = { ...raw, kid: raw.kid ?? thumbprint };
596
608
  if (key.kid !== thumbprint || kids.has(key.kid) || key.adcp_use !== void 0 || !testKeysAllowed(options.allowTestKeys) && TEST_KIDS.has(key.kid))
597
609
  denied("directory_key");
598
610
  kids.add(key.kid);
599
- keys.push(key);
600
611
  const proof = signatures.find((input) => input.params.keyid === key.kid && input.params.tag === DIRECTORY_TAG);
601
612
  if (!proof || !proof.components.includes("@authority;req") || !proof.components.includes("content-digest") || !Number.isSafeInteger(proof.params.created) || !Number.isSafeInteger(proof.params.expires) || proof.params.expires <= now || proof.params.expires <= proof.params.created)
602
- denied("directory_proof");
613
+ continue;
603
614
  const proofComponents = [(0, import_http_message_sig.component)("@authority", { req: true }), (0, import_http_message_sig.component)("content-digest")];
604
615
  let covered;
605
616
  try {
606
617
  covered = proof.components.map(componentDescriptor);
607
618
  } catch {
608
- return denied("directory_proof");
619
+ continue;
609
620
  }
610
621
  const requestHeaders = response.request.headers ?? {};
611
- await verifyWithLibrary(
622
+ const proven = await verifyWithLibrary(
612
623
  {
613
624
  kind: "response",
614
625
  status: response.status,
@@ -634,7 +645,15 @@ async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}
634
645
  // The library rejects a proof whose `created` is in the future (beyond skew).
635
646
  { requiredComponents: proofComponents, requiredParameters: ["created", "expires", "keyid", "tag"], now },
636
647
  async () => keyVerifier(key)
648
+ ).then(
649
+ () => true,
650
+ (error) => {
651
+ if (error instanceof WebBotAuthError) return false;
652
+ throw error;
653
+ }
637
654
  );
655
+ if (!proven) continue;
656
+ keys.push(key);
638
657
  expires = Math.min(expires, proof.params.expires);
639
658
  }
640
659
  if (!keys.length) denied("directory_keys");
@@ -922,6 +941,7 @@ function createWebBotAuthFetch(upstream, key, options) {
922
941
  deferWebBotAuthPrincipalFailure,
923
942
  getWebBotAuthAuthorizationFailure,
924
943
  getWebBotAuthLegacyOriginGate,
944
+ isRefusedWebBotAuthTestKey,
925
945
  isVerifiedWebBotSigner,
926
946
  isWebBotAuthRevocationChecked,
927
947
  jwkThumbprint,
@@ -16,7 +16,7 @@ import { canonicalAgentUrl } from "./agent-resolver/select-agent.mjs";
16
16
  import { parseStrictJson } from "./agent-resolver/strict-json.mjs";
17
17
  import { getHeaderValue } from "./canonicalize.mjs";
18
18
  import { computeContentDigest, contentDigestMatches, contentDigestUsesEncoding } from "./content-digest.mjs";
19
- import { signWithPrivateJwkAsync, verifySignatureAsync } from "./crypto.mjs";
19
+ import { jwkToPublicKey, signWithPrivateJwkAsync, verifySignatureAsync } from "./crypto.mjs";
20
20
  import {
21
21
  parseSignature,
22
22
  parseSignatureInputMember,
@@ -142,6 +142,14 @@ function jwkThumbprint(jwk) {
142
142
  function keyAlgorithm(jwk) {
143
143
  return jwk.kty === "OKP" && jwk.crv === "Ed25519" ? "ed25519" : void 0;
144
144
  }
145
+ function importable(jwk) {
146
+ try {
147
+ jwkToPublicKey(jwk);
148
+ return true;
149
+ } catch {
150
+ return false;
151
+ }
152
+ }
145
153
  function algorithm(jwk) {
146
154
  return keyAlgorithm(jwk) ?? denied("unsupported_key");
147
155
  }
@@ -518,6 +526,9 @@ async function legacyRevocationCheck(options, origin, keyid) {
518
526
  function testKeysAllowed(allowTestKeys) {
519
527
  return allowTestKeys === true && ["test", "development"].includes(process.env.NODE_ENV ?? "");
520
528
  }
529
+ function isRefusedWebBotAuthTestKey(kid, allowTestKeys) {
530
+ return TEST_KIDS.has(kid) && !testKeysAllowed(allowTestKeys);
531
+ }
521
532
  async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}) {
522
533
  try {
523
534
  if (!Number.isFinite(now)) denied("directory_invalid");
@@ -546,25 +557,24 @@ async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}
546
557
  if (!raw || typeof raw !== "object") denied("directory_key");
547
558
  if (Object.keys(raw).some((k) => PRIVATE_JWK_MEMBERS.has(k.toLowerCase()) || k.startsWith("_private")))
548
559
  denied("directory_key");
549
- if (!keyAlgorithm(raw)) continue;
560
+ if (!keyAlgorithm(raw) || !importable(raw)) continue;
550
561
  const thumbprint = jwkThumbprint(raw);
551
562
  const key = { ...raw, kid: raw.kid ?? thumbprint };
552
563
  if (key.kid !== thumbprint || kids.has(key.kid) || key.adcp_use !== void 0 || !testKeysAllowed(options.allowTestKeys) && TEST_KIDS.has(key.kid))
553
564
  denied("directory_key");
554
565
  kids.add(key.kid);
555
- keys.push(key);
556
566
  const proof = signatures.find((input) => input.params.keyid === key.kid && input.params.tag === DIRECTORY_TAG);
557
567
  if (!proof || !proof.components.includes("@authority;req") || !proof.components.includes("content-digest") || !Number.isSafeInteger(proof.params.created) || !Number.isSafeInteger(proof.params.expires) || proof.params.expires <= now || proof.params.expires <= proof.params.created)
558
- denied("directory_proof");
568
+ continue;
559
569
  const proofComponents = [component("@authority", { req: true }), component("content-digest")];
560
570
  let covered;
561
571
  try {
562
572
  covered = proof.components.map(componentDescriptor);
563
573
  } catch {
564
- return denied("directory_proof");
574
+ continue;
565
575
  }
566
576
  const requestHeaders = response.request.headers ?? {};
567
- await verifyWithLibrary(
577
+ const proven = await verifyWithLibrary(
568
578
  {
569
579
  kind: "response",
570
580
  status: response.status,
@@ -590,7 +600,15 @@ async function verifyKeyDirectory(response, now = Date.now() / 1e3, options = {}
590
600
  // The library rejects a proof whose `created` is in the future (beyond skew).
591
601
  { requiredComponents: proofComponents, requiredParameters: ["created", "expires", "keyid", "tag"], now },
592
602
  async () => keyVerifier(key)
603
+ ).then(
604
+ () => true,
605
+ (error) => {
606
+ if (error instanceof WebBotAuthError) return false;
607
+ throw error;
608
+ }
593
609
  );
610
+ if (!proven) continue;
611
+ keys.push(key);
594
612
  expires = Math.min(expires, proof.params.expires);
595
613
  }
596
614
  if (!keys.length) denied("directory_keys");
@@ -877,6 +895,7 @@ export {
877
895
  deferWebBotAuthPrincipalFailure,
878
896
  getWebBotAuthAuthorizationFailure,
879
897
  getWebBotAuthLegacyOriginGate,
898
+ isRefusedWebBotAuthTestKey,
880
899
  isVerifiedWebBotSigner,
881
900
  isWebBotAuthRevocationChecked,
882
901
  jwkThumbprint,
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
197
197
  */
198
198
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
199
199
  /** Capability semver emitted in run summaries and used for advisory expiry. */
200
- export declare const RUNNER_CAPABILITY_VERSION = "16.0.0";
200
+ export declare const RUNNER_CAPABILITY_VERSION = "16.2.0";
201
201
  /** True when a failed validation contributes to the owning step's grade. */
202
202
  export declare function validationFailsStep(result: ValidationResult): boolean;
203
203
  /**
@@ -197,7 +197,7 @@ export interface UpstreamTrafficQueryResult {
197
197
  */
198
198
  export declare function runValidations(validations: StoryboardValidation[], context: ValidationContext): ValidationResult[];
199
199
  /** Capability semver emitted in run summaries and used for advisory expiry. */
200
- export declare const RUNNER_CAPABILITY_VERSION = "16.0.0";
200
+ export declare const RUNNER_CAPABILITY_VERSION = "16.2.0";
201
201
  /** True when a failed validation contributes to the owning step's grade. */
202
202
  export declare function validationFailsStep(result: ValidationResult): boolean;
203
203
  /**
@@ -91,6 +91,12 @@ interface CatalogIndex {
91
91
  byUniqueId: Map<string, V1FormatDefinition | null>;
92
92
  entries: V1FormatDefinition[];
93
93
  }
94
+ /**
95
+ * True when `agentUrl` names the AAO reference format agent (including its
96
+ * folded historical hosts). Ids under any other agent URL belong to that
97
+ * agent, so AAO naming conventions say nothing about what they mean.
98
+ */
99
+ export declare function isAaoAgentUrl(agentUrl: string): boolean;
94
100
  /**
95
101
  * Load the catalog from a known path. Resolution order:
96
102
  *
@@ -91,6 +91,12 @@ interface CatalogIndex {
91
91
  byUniqueId: Map<string, V1FormatDefinition | null>;
92
92
  entries: V1FormatDefinition[];
93
93
  }
94
+ /**
95
+ * True when `agentUrl` names the AAO reference format agent (including its
96
+ * folded historical hosts). Ids under any other agent URL belong to that
97
+ * agent, so AAO naming conventions say nothing about what they mean.
98
+ */
99
+ export declare function isAaoAgentUrl(agentUrl: string): boolean;
94
100
  /**
95
101
  * Load the catalog from a known path. Resolution order:
96
102
  *
@@ -30,6 +30,7 @@ var catalog_exports = {};
30
30
  __export(catalog_exports, {
31
31
  _resetCatalogCache: () => _resetCatalogCache,
32
32
  findCatalogEntryByCanonicalAndSize: () => findCatalogEntryByCanonicalAndSize,
33
+ isAaoAgentUrl: () => isAaoAgentUrl,
33
34
  loadCatalog: () => loadCatalog,
34
35
  lookupUniqueV1FormatById: () => lookupUniqueV1FormatById,
35
36
  lookupV1Format: () => lookupV1Format,
@@ -52,6 +53,9 @@ function normalizeAgentUrl(u) {
52
53
  if (canonical === null) return void 0;
53
54
  return AAO_LEGACY_AGENT_URL_ALIASES.has(canonical) ? import_constants.AAO_CANONICAL_AGENT_URL : canonical;
54
55
  }
56
+ function isAaoAgentUrl(agentUrl) {
57
+ return normalizeAgentUrl(agentUrl) === import_constants.AAO_CANONICAL_AGENT_URL;
58
+ }
55
59
  function indexKey(agentUrl, id) {
56
60
  const normalized = normalizeAgentUrl(agentUrl);
57
61
  return normalized === void 0 ? void 0 : `${normalized}::${id}`;
@@ -136,6 +140,7 @@ function findCatalogEntryByCanonicalAndSize(canonical, width, height, agentUrl,
136
140
  0 && (module.exports = {
137
141
  _resetCatalogCache,
138
142
  findCatalogEntryByCanonicalAndSize,
143
+ isAaoAgentUrl,
139
144
  loadCatalog,
140
145
  lookupUniqueV1FormatById,
141
146
  lookupV1Format,
@@ -19,6 +19,9 @@ function normalizeAgentUrl(u) {
19
19
  if (canonical === null) return void 0;
20
20
  return AAO_LEGACY_AGENT_URL_ALIASES.has(canonical) ? AAO_CANONICAL_AGENT_URL : canonical;
21
21
  }
22
+ function isAaoAgentUrl(agentUrl) {
23
+ return normalizeAgentUrl(agentUrl) === AAO_CANONICAL_AGENT_URL;
24
+ }
22
25
  function indexKey(agentUrl, id) {
23
26
  const normalized = normalizeAgentUrl(agentUrl);
24
27
  return normalized === void 0 ? void 0 : `${normalized}::${id}`;
@@ -102,6 +105,7 @@ function findCatalogEntryByCanonicalAndSize(canonical, width, height, agentUrl,
102
105
  export {
103
106
  _resetCatalogCache,
104
107
  findCatalogEntryByCanonicalAndSize,
108
+ isAaoAgentUrl,
105
109
  loadCatalog,
106
110
  lookupUniqueV1FormatById,
107
111
  lookupV1Format,
@@ -219,7 +219,8 @@ function projectFormatId(fid, productId, field, options) {
219
219
  const exactCatalogEntry = (0, import_catalog.lookupV1Format)(fid, options?._catalogPath);
220
220
  const canonicalAgentUrl = (0, import_resolve_agent_properties.canonicalizeAgentUrl)(fid.agent_url);
221
221
  const mayUseUniqueAlias = canonicalAgentUrl !== null && new URL(canonicalAgentUrl).protocol === "https:" && !(0, import_address_guards.isLikelyPrivateUrl)(canonicalAgentUrl);
222
- const uniqueAliasEntry = exactCatalogEntry === void 0 && mayUseUniqueAlias ? (0, import_catalog.lookupUniqueV1FormatById)(fid.id, options?._catalogPath) : void 0;
222
+ const aaoGuessesApply = options?._authoritativeOnly !== true || (0, import_catalog.isAaoAgentUrl)(fid.agent_url);
223
+ const uniqueAliasEntry = exactCatalogEntry === void 0 && mayUseUniqueAlias && aaoGuessesApply ? (0, import_catalog.lookupUniqueV1FormatById)(fid.id, options?._catalogPath) : void 0;
223
224
  if (uniqueAliasEntry) {
224
225
  const explicit = projectWithLegacyConverter(fid, productId, field, options?.legacyFormatConverter);
225
226
  if (explicit) return explicit;
@@ -277,7 +278,7 @@ function projectFormatId(fid, productId, field, options) {
277
278
  }
278
279
  };
279
280
  }
280
- const globMatch = (0, import_registry.forwardLookupByGlob)(fid.id);
281
+ const globMatch = aaoGuessesApply ? (0, import_registry.forwardLookupByGlob)(fid.id) : void 0;
281
282
  if (globMatch) {
282
283
  return {
283
284
  decl: {
@@ -4,7 +4,7 @@ import { createRequire as __adcpCreateRequire } from "node:module";
4
4
  const __dirname = __adcpDirname(__adcpFileURLToPath(import.meta.url));
5
5
  const require2 = __adcpCreateRequire(import.meta.url);
6
6
  import { forwardLookupByGlob, forwardLookupByStructural } from "./registry.mjs";
7
- import { lookupUniqueV1FormatById, lookupV1Format } from "./catalog.mjs";
7
+ import { isAaoAgentUrl, lookupUniqueV1FormatById, lookupV1Format } from "./catalog.mjs";
8
8
  import { AAO_CANONICAL_AGENT_URL } from "./constants.mjs";
9
9
  import { LIBRARY_VERSION } from "../../version.mjs";
10
10
  import { legacyFormatConverterFromCatalogSnapshots } from "./catalog-snapshot.mjs";
@@ -202,7 +202,8 @@ function projectFormatId(fid, productId, field, options) {
202
202
  const exactCatalogEntry = lookupV1Format(fid, options?._catalogPath);
203
203
  const canonicalAgentUrl = canonicalizeAgentUrl(fid.agent_url);
204
204
  const mayUseUniqueAlias = canonicalAgentUrl !== null && new URL(canonicalAgentUrl).protocol === "https:" && !isLikelyPrivateUrl(canonicalAgentUrl);
205
- const uniqueAliasEntry = exactCatalogEntry === void 0 && mayUseUniqueAlias ? lookupUniqueV1FormatById(fid.id, options?._catalogPath) : void 0;
205
+ const aaoGuessesApply = options?._authoritativeOnly !== true || isAaoAgentUrl(fid.agent_url);
206
+ const uniqueAliasEntry = exactCatalogEntry === void 0 && mayUseUniqueAlias && aaoGuessesApply ? lookupUniqueV1FormatById(fid.id, options?._catalogPath) : void 0;
206
207
  if (uniqueAliasEntry) {
207
208
  const explicit = projectWithLegacyConverter(fid, productId, field, options?.legacyFormatConverter);
208
209
  if (explicit) return explicit;
@@ -260,7 +261,7 @@ function projectFormatId(fid, productId, field, options) {
260
261
  }
261
262
  };
262
263
  }
263
- const globMatch = forwardLookupByGlob(fid.id);
264
+ const globMatch = aaoGuessesApply ? forwardLookupByGlob(fid.id) : void 0;
264
265
  if (globMatch) {
265
266
  return {
266
267
  decl: {