@adcp/sdk 13.0.0-rc.2 → 13.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -14
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/protocols/mcp-modern.d.ts.map +1 -1
- package/dist/lib/protocols/mcp-modern.js +14 -0
- package/dist/lib/protocols/mcp-modern.js.map +1 -1
- package/dist/lib/protocols/mcp-modern.mjs +14 -0
- package/dist/lib/protocols/mcp-modern.mjs.map +1 -1
- package/dist/lib/registry/index.d.mts +5 -25
- package/dist/lib/registry/index.d.ts +5 -25
- package/dist/lib/registry/index.d.ts.map +1 -1
- package/dist/lib/registry/index.js +5 -130
- package/dist/lib/registry/index.js.map +1 -1
- package/dist/lib/registry/index.mjs +5 -130
- package/dist/lib/registry/index.mjs.map +1 -1
- package/dist/lib/registry/sync.d.mts +8 -2
- package/dist/lib/registry/sync.d.ts +8 -2
- package/dist/lib/registry/sync.d.ts.map +1 -1
- package/dist/lib/registry/sync.js +8 -2
- package/dist/lib/registry/sync.js.map +1 -1
- package/dist/lib/registry/sync.mjs +8 -2
- package/dist/lib/registry/sync.mjs.map +1 -1
- package/dist/lib/registry/types.d.mts +15 -29
- package/dist/lib/registry/types.d.ts +15 -29
- package/dist/lib/registry/types.d.ts.map +1 -1
- package/dist/lib/registry/types.generated.d.mts +20 -5
- package/dist/lib/registry/types.generated.d.ts +20 -5
- package/dist/lib/registry/types.generated.d.ts.map +1 -1
- package/dist/lib/registry/types.generated.js.map +1 -1
- package/dist/lib/registry/types.js.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +40 -6
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +40 -6
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/types/core.generated.d.mts +105 -58
- package/dist/lib/types/core.generated.d.ts +105 -58
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js.map +1 -1
- package/dist/lib/types/schemas.generated.d.mts +2352 -473
- package/dist/lib/types/schemas.generated.d.ts +2352 -473
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +78 -45
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/schemas.generated.mjs +71 -45
- package/dist/lib/types/schemas.generated.mjs.map +1 -1
- package/dist/lib/types/tools.generated.d.mts +48 -44
- package/dist/lib/types/tools.generated.d.ts +48 -44
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/types/tools.generated.js.map +1 -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.js.map +1 -1
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/version.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/registry/types.ts"],"sourcesContent":["/**\n * AdCP Registry Types\n *\n * Generated types are in types.generated.ts (from OpenAPI spec).\n * This file re-exports them with ergonomic names and adds client-specific types.\n */\n\n// Re-export generated component schema types\nexport type {\n LocalizedName,\n BrandRegistryItem,\n ResolvedProperty,\n PropertyIdentifier,\n ValidationResult,\n RegistryError,\n PublisherPropertySelector,\n FederatedAgentWithDetails,\n AgentHealth,\n AgentStats,\n AgentCapabilities,\n PropertySummary,\n FederatedPublisher,\n DomainLookupResult,\n BrandActivity,\n PropertyActivity,\n PolicySummary,\n Policy,\n PolicyHistory,\n RegistryFeedEvent,\n CollectionEventPayload,\n AuthorizationEventPayload,\n PublisherEventPayload,\n CatalogBrowseResponse,\n CatalogBrowseEntry,\n CatalogSyncResponse,\n CatalogSyncEntry,\n AgentInventoryProfile,\n AgentSearchResult,\n AgentSearchResponse,\n CrawlRequestResponse,\n AgentCompliance,\n AgentComplianceDetail,\n StoryboardStatus,\n OperatorLookupResult,\n PublisherLookupResult,\n AuthorizationEntry,\n CommunityMirrorListResponse,\n CommunityMirrorSummary,\n CommunityMirrorGetResponse,\n CommunityMirrorAdagentsJson,\n CommunityMirrorPublishResponse,\n CommunityMirrorPublishError,\n CommunityMirrorPublishRequest,\n CommunityMirrorDeleteResponse,\n} from './types.generated';\n\n// Re-export the full generated module for advanced usage (paths, operations, etc.)\nexport type { paths, operations, components } from './types.generated';\n\n// ====== Operation-derived types ======\n// Types extracted from inline OpenAPI operation schemas\n\nimport type {\n CatalogEvent as GeneratedCatalogEvent,\n FeedResponse as GeneratedFeedResponse,\n ResolvedBrand as GeneratedResolvedBrand,\n ResolvedProperty as GeneratedResolvedProperty,\n PropertyRegistryItem as GeneratedPropertyRegistryItem,\n AgentEventPayload as GeneratedAgentEventPayload,\n PropertyEventPayload as GeneratedPropertyEventPayload,\n BrandEventPayload as GeneratedBrandEventPayload,\n AgentCompliance as GeneratedAgentCompliance,\n AgentInventoryProfile as GeneratedAgentInventoryProfile,\n operations,\n CommunityMirrorListResponse,\n CommunityMirrorSummary,\n CommunityMirrorGetResponse,\n CommunityMirrorPublishResponse,\n CommunityMirrorPublishError,\n CommunityMirrorPublishRequest,\n CommunityMirrorDeleteResponse,\n} from './types.generated';\nimport type { PropertyIdentifierType, PropertyType } from '../discovery/types';\nimport type { MediaChannel, ProductFormatDeclaration } from '../types/tools.generated';\n\nexport type AgentEventPayload = Omit<GeneratedAgentEventPayload, 'inventory_profile' | 'compliance_summary'> & {\n /** On agent.profile_updated: the agent's refreshed inventory profile. */\n inventory_profile?: GeneratedAgentInventoryProfile;\n compliance_summary?: GeneratedAgentCompliance;\n};\n\nexport type PropertyEventPayload = Omit<GeneratedPropertyEventPayload, 'property'> & {\n /** Optional full post-change property object when available. */\n property?: GeneratedResolvedProperty | RegistryPropertyIdentity;\n};\n\nexport type BrandEventPayload = Omit<GeneratedBrandEventPayload, 'chain'> & {\n /** On brand.resolved/hierarchy_updated: the resolved brand chain. */\n chain?: ResolvedBrand[];\n};\n\ntype RegistryFeedEventBase<TEventType extends string, TPayload> = {\n event_id: string;\n event_type: TEventType;\n entity_type: string;\n entity_id: string;\n payload: TPayload;\n actor: string;\n created_at: string;\n};\n\nexport type RegistryBrandEventType =\n | 'brand.hierarchy_updated'\n | 'brand.updated'\n | 'brand.resolved'\n | 'brand.removed'\n | 'brand.deleted';\n\n/** Brand feed events emitted by older/self-hosted registry deployments. */\nexport type RegistryBrandEvent = RegistryFeedEventBase<RegistryBrandEventType, BrandEventPayload>;\n\n/** Forward-compatible feed event shape for event types newer than this SDK. */\nexport type UnknownRegistryFeedEvent = RegistryFeedEventBase<string, Record<string, unknown>>;\n\n/**\n * SDK-facing registry feed event.\n *\n * The generated `RegistryFeedEvent` export mirrors the current OpenAPI union.\n * `CatalogEvent` stays intentionally wider because RegistrySync accepts\n * older/self-hosted brand events and must ignore future event types safely.\n * Consumers should keep a default switch arm: the catch-all event type is\n * intentionally non-exhaustive for forward compatibility.\n */\nexport type CatalogEvent = GeneratedCatalogEvent | RegistryBrandEvent | UnknownRegistryFeedEvent;\n\n/** Full response from GET /api/registry/feed, using the SDK-facing event union. */\nexport type FeedResponse = Omit<GeneratedFeedResponse, 'events'> & {\n events: CatalogEvent[];\n};\n\n/**\n * Brand identity returned by the registry resolver.\n *\n * `parent_brand` is a registry hierarchy reference. New registry responses use\n * the parent brand's canonical domain when the parent has one; older rows may\n * still carry a portfolio-internal brand id from `brand.json#/brands[].id`.\n * Consumers that need ancestry should use `RegistrySync.getAncestors()` rather\n * than walking `parent_brand` directly.\n */\nexport interface ResolvedBrand extends Omit<GeneratedResolvedBrand, 'parent_brand'> {\n parent_brand?: string;\n}\n\n/**\n * Ordered corporate brand hierarchy for a domain, from self to house.\n *\n * This is retained for SDK compatibility with older/self-hosted registry\n * deployments. AdCP 3.1.1 removed the hierarchy endpoints from the public\n * registry OpenAPI; new ancestry consumers should prefer `RegistrySync`.\n */\nexport interface BrandHierarchyResolution {\n chain: ResolvedBrand[];\n}\n\n/**\n * Bulk ordered corporate brand hierarchy result keyed by the requested domain.\n *\n * Retained for SDK compatibility with older/self-hosted registry deployments.\n */\nexport interface BrandHierarchyBulkResolution {\n results: Record<string, BrandHierarchyResolution | null>;\n}\n\n/** Options for client-side brand hierarchy resolution caching. */\nexport interface ResolveBrandHierarchyOptions {\n /**\n * Cache this resolution in-memory for the provided number of milliseconds.\n * Omit or set to `0` to bypass the SDK cache.\n */\n ttlMs?: number;\n /** Force a registry read and refresh any matching cache entry. */\n fresh?: boolean;\n}\n\n/** Request body for POST /api/brands/save */\nexport type SaveBrandRequest = NonNullable<operations['saveBrand']['requestBody']>['content']['application/json'];\n\n/** Response from POST /api/brands/save (200) */\nexport type SaveBrandResponse = operations['saveBrand']['responses']['200']['content']['application/json'];\n\ntype RegistrySavePropertyRequest = NonNullable<\n operations['saveProperty']['requestBody']\n>['content']['application/json'];\n\n// TODO(#2318): Once the official registry OpenAPI publishes saveProperty\n// identity facts, regenerate the registry types and collapse these hand-written\n// write types onto the generated request shape, or assert they are structurally equal.\ntype SavePropertyIdentityBase = {\n /** Human-readable property name. */\n name: string;\n /** Register this property by known identifiers such as domain, bundle id, or app-store id. */\n identifiers?: { type: PropertyIdentifierType; value: string }[];\n /** Tags used by downstream `by_tag` property selection. */\n tags?: string[];\n};\n\n/** Property identity accepted by POST /api/properties/save. */\nexport type SavePropertyIdentity = SavePropertyIdentityBase &\n (\n | {\n /** Preferred field name, aligned with adagents.json property declarations. */\n property_type: PropertyType;\n /** Current registry wire field; emitted alongside `property_type` while the OpenAPI catches up. */\n type?: PropertyType | string;\n }\n | {\n /** Current registry wire field; accepts custom/self-hosted registry values for compatibility. */\n type: PropertyType | string;\n property_type?: PropertyType;\n }\n );\n\n/** Property identity facts returned by registry property read/list APIs. */\nexport type RegistryPropertyIdentity = {\n /** Stable property identifier when the registry has assigned one. */\n id?: string;\n /** Preferred field name, aligned with adagents.json property declarations. */\n property_type?: PropertyType;\n /** Legacy read/write alias for `property_type`. */\n type?: PropertyType | string;\n /** Human-readable property name. */\n name?: string;\n /** Known identifiers such as domain, bundle id, or app-store id. */\n identifiers?: { type: PropertyIdentifierType; value: string }[];\n /** Tags used by downstream `by_tag` property selection. */\n tags?: string[];\n};\n\n/** Property registry list item, including identity facts when returned by the registry. */\nexport type PropertyRegistryItem = GeneratedPropertyRegistryItem & {\n properties?: RegistryPropertyIdentity[];\n};\n\n/** Request body for POST /api/properties/save */\nexport type SavePropertyRequest = Omit<RegistrySavePropertyRequest, 'authorized_agents' | 'properties'> & {\n /** Ignored by the registry client; identity-only property saves always write `authorized_agents: []`. */\n authorized_agents?: [];\n properties?: SavePropertyIdentity[];\n};\n\n/** Response from POST /api/properties/save (200) */\nexport type SavePropertyResponse = operations['saveProperty']['responses']['200']['content']['application/json'];\n\ntype RegistryResolveIdentifiersRequest = NonNullable<\n operations['resolveIdentifiers']['requestBody']\n>['content']['application/json'];\n\n/** Request body for POST /api/registry/resolve. `mode` defaults to `resolve` server-side. */\nexport type ResolveIdentifiersRequest = Omit<RegistryResolveIdentifiersRequest, 'mode'> & {\n mode?: RegistryResolveIdentifiersRequest['mode'];\n};\n\n/** Response from POST /api/registry/resolve (200) */\nexport type ResolveIdentifiersResponse =\n operations['resolveIdentifiers']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/registry/catalog/disputes */\nexport type FileCatalogDisputeRequest = NonNullable<\n operations['fileCatalogDispute']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/registry/catalog/disputes (200) */\nexport type FileCatalogDisputeResponse =\n operations['fileCatalogDispute']['responses']['200']['content']['application/json'];\n\n/** Response from GET /api/registry/catalog/disputes/{id} (200) */\nexport type GetCatalogDisputeResponse =\n operations['getCatalogDispute']['responses']['200']['content']['application/json'];\n\n/** Response from POST /api/properties/hosted/{domain}/claim (200) */\nexport type ClaimHostedPropertyDomainResponse =\n operations['claimHostedPropertyDomain']['responses']['200']['content']['application/json'];\n\n/** Response from POST /api/properties/hosted/{domain}/verify-origin (200) */\nexport type VerifyHostedPropertyOriginResponse =\n operations['verifyHostedPropertyOrigin']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/adagents/validate */\nexport type ValidateAdagentsRequest = NonNullable<\n operations['validateAdagents']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/adagents/validate (200) */\nexport type ValidateAdagentsResponse =\n operations['validateAdagents']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/adagents/create */\ntype RegistryCreateAdagentsRequest = NonNullable<\n operations['createAdagents']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/adagents/create (200) */\ntype RegistryCreateAdagentsResponse = operations['createAdagents']['responses']['200']['content']['application/json'];\n\n/** Agent authorization entry accepted by the registry adagents.json generator. */\nexport type AdagentsAuthorizedAgent = RegistryCreateAdagentsRequest['authorized_agents'][number] & {\n [key: string]: unknown;\n};\n\n/**\n * Top-level `adagents.json#/formats[]` declaration.\n *\n * This reuses the protocol `ProductFormatDeclaration` shape and adds the\n * publisher-catalog scoping fields allowed in `adagents.json`.\n */\nexport type AdagentsCatalogFormat = ProductFormatDeclaration & {\n /** Property IDs from this file that this format applies to. Omit for all properties. */\n applies_to_property_ids?: string[];\n /** Property tags from this file that this format applies to. Omit for all properties. */\n applies_to_property_tags?: string[];\n};\n\n/** Reference to a top-level `formats[]` entry from a placement declaration. */\nexport type AdagentsPlacementFormatReference = {\n [key: string]: unknown;\n format_option_id: string;\n /** Use a full `AdagentsCatalogFormat` when declaring inline placement-specific format details. */\n format_kind?: never;\n};\n\n/** Placement-level format declaration or same-file top-level format reference. */\nexport type AdagentsPlacementFormatOption = AdagentsPlacementFormatReference | AdagentsCatalogFormat;\n\ntype AdagentsPlacementBase = {\n [key: string]: unknown;\n /** Stable placement identifier unique within this adagents.json file. */\n placement_id: string;\n /** Human-readable placement name. */\n name: string;\n description?: string;\n tags?: string[];\n collection_ids?: string[];\n channels?: MediaChannel[];\n format_options?: AdagentsPlacementFormatOption[];\n ext?: Record<string, unknown>;\n};\n\n/** Canonical placement declaration published in `adagents.json#/placements[]`. */\nexport type AdagentsPlacementDefinition =\n | (AdagentsPlacementBase & { property_ids: string[]; property_tags?: string[] })\n | (AdagentsPlacementBase & { property_tags: string[]; property_ids?: string[] });\n\n/** Metadata for one `adagents.json#/placement_tags` entry. */\nexport type AdagentsPlacementTag = {\n [key: string]: unknown;\n name: string;\n description: string;\n};\n\n/** Request body for POST /api/adagents/create with typed catalog fields. */\nexport type CreateAdagentsRequest = Omit<\n RegistryCreateAdagentsRequest,\n 'authorized_agents' | 'formats' | 'placements' | 'placement_tags'\n> & {\n authorized_agents: AdagentsAuthorizedAgent[];\n formats?: AdagentsCatalogFormat[];\n placements?: AdagentsPlacementDefinition[];\n placement_tags?: Record<string, AdagentsPlacementTag>;\n};\n\n/** Generated adagents.json payload returned by the registry generator. */\nexport type CreatedAdagentsJson = Record<string, unknown> & Partial<CreateAdagentsRequest>;\n\n/** Response from POST /api/adagents/create (200). */\nexport type CreateAdagentsResponse = Omit<RegistryCreateAdagentsResponse, 'data'> & {\n data: {\n success: boolean;\n adagents_json?: CreatedAdagentsJson;\n validation?: unknown;\n [key: string]: unknown;\n };\n};\n\ntype CommunityMirrorContentKey = 'formats' | 'properties' | 'placements' | 'collections' | 'signals';\ntype CommunityMirrorCatalogContent = Partial<\n Pick<CreateAdagentsRequest, Extract<CommunityMirrorContentKey, keyof CreateAdagentsRequest>>\n> & {\n collections?: Record<string, unknown>[];\n signals?: Record<string, unknown>[];\n};\n\n/** Input for building a catalog-only community mirror adagents.json descriptor. */\nexport type CommunityMirrorAdagentsConfig = Omit<\n CreateAdagentsRequest,\n 'authorized_agents' | 'catalog_etag' | 'include_schema' | 'include_timestamp' | 'platform'\n> &\n CommunityMirrorCatalogContent & {\n /** Community mirror catalogs should be cacheable static artifacts with stable content identity when available. */\n catalog_etag?: string;\n /** Community mirror catalogs must include at least one non-empty catalog collection. */\n formats?: AdagentsCatalogFormat[];\n /** Optional pointer to a successor adagents.json after a platform adopts AdCP directly. */\n superseded_by?: string;\n /** Seller authorization claims are intentionally not accepted by this helper. */\n authorized_agents?: never;\n /** Generator-only flag; community mirrors are persisted adagents.json documents. */\n include_schema?: never;\n /** Generator-only flag; community mirrors are persisted adagents.json documents. */\n include_timestamp?: never;\n };\n\n/** Input for publishing/upserting a catalog-only community mirror descriptor. */\nexport type CreateCommunityMirrorAdagentsConfig = CommunityMirrorAdagentsConfig & {\n /**\n * Stable platform key for the hosted mirror. If omitted, RegistryClient can\n * infer it only when every `properties[].platform` value is the same.\n */\n platform?: string;\n};\n\n/** Catalog-only community mirror adagents.json descriptor. */\nexport type CommunityMirrorAdagentsCatalog = Omit<\n CreateAdagentsRequest,\n 'authorized_agents' | 'catalog_etag' | 'include_schema' | 'include_timestamp' | 'platform'\n> &\n CommunityMirrorCatalogContent & {\n authorized_agents: [];\n catalog_etag?: string;\n formats?: AdagentsCatalogFormat[];\n superseded_by?: string;\n };\n\n/** Response from PUT /api/registry/mirrors/:platform. */\nexport type PublishCommunityMirrorAdagentsResponse = CommunityMirrorPublishResponse;\n\n/** Summary item from GET /api/registry/mirrors. */\nexport type CommunityMirrorAdagentsSummary = CommunityMirrorSummary;\n\n/** Response from GET /api/registry/mirrors. */\nexport type ListCommunityMirrorAdagentsResponse = CommunityMirrorListResponse;\n\n/** Raw response from GET /api/registry/mirrors/:platform. */\nexport type GetCommunityMirrorAdagentsResponse = CommunityMirrorGetResponse;\n\n/** Raw request body for PUT /api/registry/mirrors/:platform. */\nexport type PublishCommunityMirrorAdagentsRequest = CommunityMirrorPublishRequest;\n\n/** Validation error from PUT /api/registry/mirrors/:platform. */\nexport type PublishCommunityMirrorAdagentsError = CommunityMirrorPublishError;\n\n/** Response from DELETE /api/registry/mirrors/:platform. */\nexport type DeleteCommunityMirrorAdagentsResponse = CommunityMirrorDeleteResponse;\n\n/** Request body for POST /api/registry/validate/product-authorization */\nexport type ValidateProductAuthorizationRequest = NonNullable<\n operations['validateProductAuthorization']['requestBody']\n>['content']['application/json'];\n\n/** Request body for POST /api/registry/expand/product-identifiers */\nexport type ExpandProductIdentifiersRequest = NonNullable<\n operations['expandProductIdentifiers']['requestBody']\n>['content']['application/json'];\n\n/** Query parameters for GET /api/brands/registry */\nexport type ListBrandsOptions = NonNullable<operations['listBrands']['parameters']['query']>;\n\n/** Response from GET /api/brands/registry (200) */\nexport type ListBrandsResponse = operations['listBrands']['responses']['200']['content']['application/json'];\n\n/** Response from GET /api/brands/brand-json (200) */\nexport type GetBrandJsonResponse = operations['getBrandJson']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/registry/agents */\nexport type ListAgentsQuery = NonNullable<operations['listAgents']['parameters']['query']>;\n\n/** Response from GET /api/registry/agents (200) */\nexport type ListAgentsResponse = operations['listAgents']['responses']['200']['content']['application/json'] & {\n /**\n * Backward-compatible SDK field. Current registry responses may omit source\n * summaries, so RegistryClient normalizes this to an empty object.\n */\n sources: Record<string, unknown>;\n};\n\n/** Response from GET /api/registry/publishers (200) */\nexport type ListPublishersResponse = operations['listPublishers']['responses']['200']['content']['application/json'] & {\n /**\n * Backward-compatible SDK field. Current registry responses may omit source\n * summaries, so RegistryClient normalizes this to an empty object.\n */\n sources: Record<string, unknown>;\n};\n\n/** Query parameters for GET /api/registry/feed */\nexport type FeedQuery = NonNullable<operations['getRegistryFeed']['parameters']['query']>;\n\n/** Query parameters for GET /api/registry/agents/search */\nexport type AgentSearchQuery = NonNullable<operations['searchAgentProfiles']['parameters']['query']> & {\n /** Agent type filter. Accepts current registry types plus legacy aliases. */\n type?: string;\n /** Sort order. */\n sort?: string;\n};\n\n/** Request body for POST /api/registry/crawl-request */\nexport type CrawlRequest = NonNullable<operations['requestCrawl']['requestBody']>['content']['application/json'];\n\n/** Request body for POST /api/registry/manager-revalidation-request */\nexport type ManagerRevalidationRequest = NonNullable<\n operations['requestManagerRevalidation']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/registry/manager-revalidation-request (202) */\nexport type ManagerRevalidationResponse =\n operations['requestManagerRevalidation']['responses']['202']['content']['application/json'];\n\n/** Query parameters for GET /api/policies/registry */\nexport type ListPoliciesQuery = NonNullable<operations['listPolicies']['parameters']['query']>;\n\n/** Response from GET /api/policies/registry (200) */\nexport type ListPoliciesResponse = operations['listPolicies']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/policies/resolve */\nexport type ResolvePolicyQuery = operations['resolvePolicy']['parameters']['query'];\n\n/** Response from GET /api/policies/resolve (200) */\nexport type ResolvePolicyResponse = operations['resolvePolicy']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/policies/resolve/bulk */\nexport type ResolvePoliciesBulkRequest = NonNullable<\n operations['resolvePoliciesBulk']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/policies/resolve/bulk (200) */\nexport type ResolvePoliciesBulkResponse =\n operations['resolvePoliciesBulk']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/policies/history */\nexport type GetPolicyHistoryQuery = operations['getPolicyHistory']['parameters']['query'];\n\n/** Response from GET /api/policies/history (200) */\nexport type GetPolicyHistoryResponse =\n operations['getPolicyHistory']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/policies/save */\nexport type SavePolicyRequest = NonNullable<operations['savePolicy']['requestBody']>['content']['application/json'];\n\n/** Response from POST /api/policies/save (200) */\nexport type SavePolicyResponse = operations['savePolicy']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/brands/history */\nexport type GetBrandHistoryQuery = operations['getBrandHistory']['parameters']['query'];\n\n/** Response from GET /api/brands/history (200) */\nexport type GetBrandHistoryResponse = operations['getBrandHistory']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/properties/history */\nexport type GetPropertyHistoryQuery = operations['getPropertyHistory']['parameters']['query'];\n\n/** Response from GET /api/properties/history (200) */\nexport type GetPropertyHistoryResponse =\n operations['getPropertyHistory']['responses']['200']['content']['application/json'];\n\n/** Response from GET /api/registry/agents/{agentUrl}/storyboard-status */\nexport type GetAgentStoryboardStatusResponse =\n operations['getAgentStoryboardStatus']['responses']['200']['content']['application/json'];\n\n/** Response from POST /api/registry/agents/storyboard-status */\nexport type GetAgentStoryboardStatusBulkResponse =\n operations['bulkAgentStoryboardStatus']['responses']['200']['content']['application/json'];\n\n/** Payload for agent.compliance_changed feed events. */\nexport interface ComplianceChangedPayload {\n previous_status: import('./types.generated').AgentCompliance['status'];\n current_status: import('./types.generated').AgentCompliance['status'];\n compliance_summary?: import('./types.generated').AgentCompliance;\n}\n\n// ====== Brand logo asset types ======\n\n/** Review status for a brand logo asset in the AAO registry. */\nexport type BrandLogoReviewStatus = 'approved' | 'pending' | 'rejected' | 'deleted';\n\ntype BrandLogoAssetBase = {\n /** Registry-assigned stable asset ID. */\n id: string;\n /** Asset MIME type, for example `image/svg+xml` or `image/png`. */\n content_type: string;\n /** Registry source, for example `brandfetch` or `community`. */\n source: string;\n /** Caller- or registry-assigned asset tags. */\n tags: string[];\n /** Legacy relative asset URL, when returned by AAO. */\n legacy_url?: string;\n /** Pixel width for raster assets, when known. */\n width?: number;\n /** Pixel height for raster assets, when known. */\n height?: number;\n};\n\n/** Approved brand logo assets are ready to reference from brand.json. */\nexport type ApprovedBrandLogoAsset = BrandLogoAssetBase & {\n review_status: 'approved';\n url: string;\n};\n\n/**\n * Pending community logo assets are still under review and must not be treated\n * as brand.json-ready until a later list call returns them as approved.\n */\nexport type PendingBrandLogoAsset = BrandLogoAssetBase & {\n review_status: 'pending';\n url?: string;\n message?: string;\n review_sla_hours?: number;\n};\n\n/** Review-only logo assets that are no longer eligible for public brand.json use. */\nexport type ReviewedBrandLogoAsset = BrandLogoAssetBase & {\n review_status: 'rejected' | 'deleted';\n url?: string;\n};\n\n/**\n * A logo asset returned by AAO brand-logo endpoints.\n *\n * @remarks\n * These endpoints are not yet present in the generated registry OpenAPI\n * types, so this hand-rolled shape mirrors the current AAO response contract.\n */\nexport type BrandLogoAsset = ApprovedBrandLogoAsset | PendingBrandLogoAsset | ReviewedBrandLogoAsset;\n\n/** Response from GET /api/brands/:domain/logos. */\nexport interface ListBrandLogosResponse {\n domain?: string;\n assets: BrandLogoAsset[];\n stats?: Record<string, unknown>;\n /** @deprecated Use `assets`. Preserved for older AAO responses and callers. */\n logos?: BrandLogoAsset[];\n}\n\n/** Options for listing brand logo assets. */\nexport interface ListBrandLogosOptions {\n /** Optional tag filters, serialized as a comma-separated `tags` query parameter. */\n tags?: string[];\n}\n\n/** Input for POST /api/brands/:domain/logos. */\nexport interface SaveBrandLogoInput {\n domain: string;\n data: Blob | Buffer | ArrayBuffer | ArrayBufferView;\n filename: string;\n mimeType: string;\n tags: string[];\n note?: string;\n}\n\n/** @deprecated Use `SaveBrandLogoInput`. */\nexport type UploadBrandLogoInput = SaveBrandLogoInput;\n\n/**\n * Response from POST /api/brands/:domain/logos.\n *\n * @remarks\n * These endpoints are not yet present in the generated registry OpenAPI\n * types, so this hand-rolled shape mirrors the current AAO response contract.\n */\nexport type SaveBrandLogoResponse = {\n success?: boolean;\n domain: string;\n logo_id: string;\n review_status: BrandLogoReviewStatus;\n url?: string;\n legacy_url?: string;\n message?: string;\n review_sla_hours?: number;\n};\n\n/** @deprecated Use `SaveBrandLogoResponse`. */\nexport type UploadBrandLogoResponse = SaveBrandLogoResponse;\n\n// ====== Backward compatibility ======\n\n/** @deprecated Use ResolvedProperty instead */\nexport type PropertyInfo = import('./types.generated').ResolvedProperty;\n\n// ====== Client-specific types (not in the API schema) ======\n\n/** A single company match from a brand search query. */\nexport interface CompanySearchResult {\n domain: string;\n canonical_domain: string;\n brand_name: string;\n house_domain?: string;\n parent_brand?: string;\n keller_type: 'master' | 'sub_brand' | 'endorsed' | 'independent';\n brand_agent_url?: string;\n source: string;\n}\n\n/** Result from findCompany() brand search. */\nexport interface FindCompanyResult {\n results: CompanySearchResult[];\n}\n\n/** Configuration for the registry client. */\nexport interface RegistryClientConfig {\n /** Base URL of the AdCP registry. Defaults to https://agenticadvertising.org */\n baseUrl?: string;\n /** API key for authenticated registry access. Falls back to ADCP_REGISTRY_API_KEY env var. */\n apiKey?: string;\n /** Request timeout in milliseconds. Defaults to 10 seconds. */\n timeoutMs?: number;\n /** Maximum response body size in bytes before JSON parsing. Defaults to 256 KiB. */\n maxBodyBytes?: number;\n /** Redirect policy for registry requests. Defaults to 'error'. */\n redirect?: 'follow' | 'error';\n /** Fetch implementation for tests and custom runtimes. Defaults to globalThis.fetch. */\n fetch?: typeof globalThis.fetch;\n}\n\n/** Options for list/search endpoints with pagination. */\nexport interface ListOptions {\n search?: string;\n limit?: number;\n offset?: number;\n}\n\n/** Options for listing agents with filtering. */\nexport type ListAgentsOptions = Omit<\n ListAgentsQuery,\n 'type' | 'health' | 'capabilities' | 'properties' | 'compliance' | 'verified' | 'verification_mode'\n> & {\n type?: ListAgentsQuery['type'] | 'si';\n health?: boolean | 'true';\n capabilities?: boolean | 'true';\n properties?: boolean | 'true';\n compliance?: boolean | 'true';\n verified?: boolean | 'true';\n verification_mode?: ListAgentsQuery['verification_mode'] | 'spec' | 'live';\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/registry/types.ts"],"sourcesContent":["/**\n * AdCP Registry Types\n *\n * Generated types are in types.generated.ts (from OpenAPI spec).\n * This file re-exports them with ergonomic names and adds client-specific types.\n */\n\n// Re-export generated component schema types\nexport type {\n LocalizedName,\n BrandRegistryItem,\n ResolvedProperty,\n PropertyIdentifier,\n ValidationResult,\n RegistryError,\n PublisherPropertySelector,\n FederatedAgentWithDetails,\n AgentHealth,\n AgentStats,\n AgentCapabilities,\n PropertySummary,\n FederatedPublisher,\n DomainLookupResult,\n BrandActivity,\n PropertyActivity,\n PolicySummary,\n Policy,\n PolicyHistory,\n RegistryFeedEvent,\n CollectionEventPayload,\n AuthorizationEventPayload,\n PublisherEventPayload,\n CatalogBrowseResponse,\n CatalogBrowseEntry,\n CatalogSyncResponse,\n CatalogSyncEntry,\n AgentInventoryProfile,\n AgentSearchResult,\n AgentSearchResponse,\n CrawlRequestResponse,\n AgentCompliance,\n AgentComplianceDetail,\n StoryboardStatus,\n OperatorLookupResult,\n PublisherLookupResult,\n AuthorizationEntry,\n CommunityMirrorListResponse,\n CommunityMirrorSummary,\n CommunityMirrorGetResponse,\n CommunityMirrorAdagentsJson,\n CommunityMirrorPublishResponse,\n CommunityMirrorPublishError,\n CommunityMirrorPublishRequest,\n CommunityMirrorDeleteResponse,\n} from './types.generated';\n\n// Re-export the full generated module for advanced usage (paths, operations, etc.)\nexport type { paths, operations, components } from './types.generated';\n\n// ====== Operation-derived types ======\n// Types extracted from inline OpenAPI operation schemas\n\nimport type {\n CatalogEvent as GeneratedCatalogEvent,\n FeedResponse as GeneratedFeedResponse,\n ResolvedBrand as GeneratedResolvedBrand,\n ResolvedProperty as GeneratedResolvedProperty,\n PropertyRegistryItem as GeneratedPropertyRegistryItem,\n AgentEventPayload as GeneratedAgentEventPayload,\n PropertyEventPayload as GeneratedPropertyEventPayload,\n BrandEventPayload as GeneratedBrandEventPayload,\n AgentCompliance as GeneratedAgentCompliance,\n AgentInventoryProfile as GeneratedAgentInventoryProfile,\n operations,\n CommunityMirrorListResponse,\n CommunityMirrorSummary,\n CommunityMirrorGetResponse,\n CommunityMirrorPublishResponse,\n CommunityMirrorPublishError,\n CommunityMirrorPublishRequest,\n CommunityMirrorDeleteResponse,\n} from './types.generated';\nimport type { PropertyIdentifierType, PropertyType } from '../discovery/types';\nimport type { MediaChannel, ProductFormatDeclaration } from '../types/tools.generated';\n\nexport type AgentEventPayload = Omit<GeneratedAgentEventPayload, 'inventory_profile' | 'compliance_summary'> & {\n /** On agent.profile_updated: the agent's refreshed inventory profile. */\n inventory_profile?: GeneratedAgentInventoryProfile;\n compliance_summary?: GeneratedAgentCompliance;\n};\n\nexport type PropertyEventPayload = Omit<GeneratedPropertyEventPayload, 'property'> & {\n /** Optional full post-change property object when available. */\n property?: GeneratedResolvedProperty | RegistryPropertyIdentity;\n};\n\nexport type BrandEventPayload = Omit<GeneratedBrandEventPayload, 'chain'> & {\n /** On brand.resolved/hierarchy_updated: the resolved brand chain. */\n chain?: ResolvedBrand[];\n};\n\ntype RegistryFeedEventBase<TEventType extends string, TPayload> = {\n event_id: string;\n event_type: TEventType;\n entity_type: string;\n entity_id: string;\n payload: TPayload;\n actor: string;\n created_at: string;\n};\n\nexport type RegistryBrandEventType =\n | 'brand.hierarchy_updated'\n | 'brand.updated'\n | 'brand.resolved'\n | 'brand.removed'\n | 'brand.deleted';\n\n/** Brand feed events emitted by older/self-hosted registry deployments. */\nexport type RegistryBrandEvent = RegistryFeedEventBase<RegistryBrandEventType, BrandEventPayload>;\n\n/** Forward-compatible feed event shape for event types newer than this SDK. */\nexport type UnknownRegistryFeedEvent = RegistryFeedEventBase<string, Record<string, unknown>>;\n\n/**\n * SDK-facing registry feed event.\n *\n * The generated `RegistryFeedEvent` export mirrors the current OpenAPI union.\n * `CatalogEvent` stays intentionally wider because RegistrySync accepts\n * older/self-hosted brand events and must ignore future event types safely.\n * Consumers should keep a default switch arm: the catch-all event type is\n * intentionally non-exhaustive for forward compatibility.\n */\nexport type CatalogEvent = GeneratedCatalogEvent | RegistryBrandEvent | UnknownRegistryFeedEvent;\n\n/** Full response from GET /api/registry/feed, using the SDK-facing event union. */\nexport type FeedResponse = Omit<GeneratedFeedResponse, 'events'> & {\n events: CatalogEvent[];\n};\n\n/**\n * Brand identity returned by the registry resolver.\n *\n * `parent_brand` is a registry hierarchy reference. New registry responses use\n * the parent brand's canonical domain when the parent has one; older rows may\n * still carry a portfolio-internal brand id from `brand.json#/brands[].id`.\n * Do not walk `parent_brand` directly. `RegistrySync.getAncestors()` is a\n * topology-only compatibility view populated by older/self-hosted brand feed\n * events; public v3 feeds may not populate it, and it is not relationship\n * authorization evidence.\n *\n * `source` reports identity provenance, not relationship authorization. Only\n * `relationship_trust: \"mutual\" | \"inline\"` extends trust to `house_domain`.\n * Missing `relationship_trust` means the selected record carries no verdict;\n * it is not equivalent to `standalone`. When `live_brand_json` is present, a\n * `fresh=true` read fell back to stored evidence. Read `migration_warnings`\n * before relying on fields promoted from a legacy document.\n */\nexport interface ResolvedBrand extends Omit<GeneratedResolvedBrand, 'parent_brand'> {\n parent_brand?: string;\n}\n\n/** Options for resolving one brand through the registry. */\nexport type LookupBrandOptions = Omit<\n NonNullable<operations['resolveBrand']['parameters']['query']>,\n 'domain' | 'fresh'\n> & {\n /** Bypass the registry resolution cache and attempt a live origin read. */\n fresh?: boolean;\n};\n\n/** Request body for POST /api/brands/save */\nexport type SaveBrandRequest = NonNullable<operations['saveBrand']['requestBody']>['content']['application/json'];\n\n/** Response from POST /api/brands/save (200) */\nexport type SaveBrandResponse = operations['saveBrand']['responses']['200']['content']['application/json'];\n\ntype RegistrySavePropertyRequest = NonNullable<\n operations['saveProperty']['requestBody']\n>['content']['application/json'];\n\n// TODO(#2318): Once the official registry OpenAPI publishes saveProperty\n// identity facts, regenerate the registry types and collapse these hand-written\n// write types onto the generated request shape, or assert they are structurally equal.\ntype SavePropertyIdentityBase = {\n /** Human-readable property name. */\n name: string;\n /** Register this property by known identifiers such as domain, bundle id, or app-store id. */\n identifiers?: { type: PropertyIdentifierType; value: string }[];\n /** Tags used by downstream `by_tag` property selection. */\n tags?: string[];\n};\n\n/** Property identity accepted by POST /api/properties/save. */\nexport type SavePropertyIdentity = SavePropertyIdentityBase &\n (\n | {\n /** Preferred field name, aligned with adagents.json property declarations. */\n property_type: PropertyType;\n /** Current registry wire field; emitted alongside `property_type` while the OpenAPI catches up. */\n type?: PropertyType | string;\n }\n | {\n /** Current registry wire field; accepts custom/self-hosted registry values for compatibility. */\n type: PropertyType | string;\n property_type?: PropertyType;\n }\n );\n\n/** Property identity facts returned by registry property read/list APIs. */\nexport type RegistryPropertyIdentity = {\n /** Stable property identifier when the registry has assigned one. */\n id?: string;\n /** Preferred field name, aligned with adagents.json property declarations. */\n property_type?: PropertyType;\n /** Legacy read/write alias for `property_type`. */\n type?: PropertyType | string;\n /** Human-readable property name. */\n name?: string;\n /** Known identifiers such as domain, bundle id, or app-store id. */\n identifiers?: { type: PropertyIdentifierType; value: string }[];\n /** Tags used by downstream `by_tag` property selection. */\n tags?: string[];\n};\n\n/** Property registry list item, including identity facts when returned by the registry. */\nexport type PropertyRegistryItem = GeneratedPropertyRegistryItem & {\n properties?: RegistryPropertyIdentity[];\n};\n\n/** Request body for POST /api/properties/save */\nexport type SavePropertyRequest = Omit<RegistrySavePropertyRequest, 'authorized_agents' | 'properties'> & {\n /** Ignored by the registry client; identity-only property saves always write `authorized_agents: []`. */\n authorized_agents?: [];\n properties?: SavePropertyIdentity[];\n};\n\n/** Response from POST /api/properties/save (200) */\nexport type SavePropertyResponse = operations['saveProperty']['responses']['200']['content']['application/json'];\n\ntype RegistryResolveIdentifiersRequest = NonNullable<\n operations['resolveIdentifiers']['requestBody']\n>['content']['application/json'];\n\n/** Request body for POST /api/registry/resolve. `mode` defaults to `resolve` server-side. */\nexport type ResolveIdentifiersRequest = Omit<RegistryResolveIdentifiersRequest, 'mode'> & {\n mode?: RegistryResolveIdentifiersRequest['mode'];\n};\n\n/** Response from POST /api/registry/resolve (200) */\nexport type ResolveIdentifiersResponse =\n operations['resolveIdentifiers']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/registry/catalog/disputes */\nexport type FileCatalogDisputeRequest = NonNullable<\n operations['fileCatalogDispute']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/registry/catalog/disputes (200) */\nexport type FileCatalogDisputeResponse =\n operations['fileCatalogDispute']['responses']['200']['content']['application/json'];\n\n/** Response from GET /api/registry/catalog/disputes/{id} (200) */\nexport type GetCatalogDisputeResponse =\n operations['getCatalogDispute']['responses']['200']['content']['application/json'];\n\n/** Response from POST /api/properties/hosted/{domain}/claim (200) */\nexport type ClaimHostedPropertyDomainResponse =\n operations['claimHostedPropertyDomain']['responses']['200']['content']['application/json'];\n\n/** Response from POST /api/properties/hosted/{domain}/verify-origin (200) */\nexport type VerifyHostedPropertyOriginResponse =\n operations['verifyHostedPropertyOrigin']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/adagents/validate */\nexport type ValidateAdagentsRequest = NonNullable<\n operations['validateAdagents']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/adagents/validate (200) */\nexport type ValidateAdagentsResponse =\n operations['validateAdagents']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/adagents/create */\ntype RegistryCreateAdagentsRequest = NonNullable<\n operations['createAdagents']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/adagents/create (200) */\ntype RegistryCreateAdagentsResponse = operations['createAdagents']['responses']['200']['content']['application/json'];\n\n/** Agent authorization entry accepted by the registry adagents.json generator. */\nexport type AdagentsAuthorizedAgent = RegistryCreateAdagentsRequest['authorized_agents'][number] & {\n [key: string]: unknown;\n};\n\n/**\n * Top-level `adagents.json#/formats[]` declaration.\n *\n * This reuses the protocol `ProductFormatDeclaration` shape and adds the\n * publisher-catalog scoping fields allowed in `adagents.json`.\n */\nexport type AdagentsCatalogFormat = ProductFormatDeclaration & {\n /** Property IDs from this file that this format applies to. Omit for all properties. */\n applies_to_property_ids?: string[];\n /** Property tags from this file that this format applies to. Omit for all properties. */\n applies_to_property_tags?: string[];\n};\n\n/** Reference to a top-level `formats[]` entry from a placement declaration. */\nexport type AdagentsPlacementFormatReference = {\n [key: string]: unknown;\n format_option_id: string;\n /** Use a full `AdagentsCatalogFormat` when declaring inline placement-specific format details. */\n format_kind?: never;\n};\n\n/** Placement-level format declaration or same-file top-level format reference. */\nexport type AdagentsPlacementFormatOption = AdagentsPlacementFormatReference | AdagentsCatalogFormat;\n\ntype AdagentsPlacementBase = {\n [key: string]: unknown;\n /** Stable placement identifier unique within this adagents.json file. */\n placement_id: string;\n /** Human-readable placement name. */\n name: string;\n description?: string;\n tags?: string[];\n collection_ids?: string[];\n channels?: MediaChannel[];\n format_options?: AdagentsPlacementFormatOption[];\n ext?: Record<string, unknown>;\n};\n\n/** Canonical placement declaration published in `adagents.json#/placements[]`. */\nexport type AdagentsPlacementDefinition =\n | (AdagentsPlacementBase & { property_ids: string[]; property_tags?: string[] })\n | (AdagentsPlacementBase & { property_tags: string[]; property_ids?: string[] });\n\n/** Metadata for one `adagents.json#/placement_tags` entry. */\nexport type AdagentsPlacementTag = {\n [key: string]: unknown;\n name: string;\n description: string;\n};\n\n/** Request body for POST /api/adagents/create with typed catalog fields. */\nexport type CreateAdagentsRequest = Omit<\n RegistryCreateAdagentsRequest,\n 'authorized_agents' | 'formats' | 'placements' | 'placement_tags'\n> & {\n authorized_agents: AdagentsAuthorizedAgent[];\n formats?: AdagentsCatalogFormat[];\n placements?: AdagentsPlacementDefinition[];\n placement_tags?: Record<string, AdagentsPlacementTag>;\n};\n\n/** Generated adagents.json payload returned by the registry generator. */\nexport type CreatedAdagentsJson = Record<string, unknown> & Partial<CreateAdagentsRequest>;\n\n/** Response from POST /api/adagents/create (200). */\nexport type CreateAdagentsResponse = Omit<RegistryCreateAdagentsResponse, 'data'> & {\n data: {\n success: boolean;\n adagents_json?: CreatedAdagentsJson;\n validation?: unknown;\n [key: string]: unknown;\n };\n};\n\ntype CommunityMirrorContentKey = 'formats' | 'properties' | 'placements' | 'collections' | 'signals';\ntype CommunityMirrorCatalogContent = Partial<\n Pick<CreateAdagentsRequest, Extract<CommunityMirrorContentKey, keyof CreateAdagentsRequest>>\n> & {\n collections?: Record<string, unknown>[];\n signals?: Record<string, unknown>[];\n};\n\n/** Input for building a catalog-only community mirror adagents.json descriptor. */\nexport type CommunityMirrorAdagentsConfig = Omit<\n CreateAdagentsRequest,\n 'authorized_agents' | 'catalog_etag' | 'include_schema' | 'include_timestamp' | 'platform'\n> &\n CommunityMirrorCatalogContent & {\n /** Community mirror catalogs should be cacheable static artifacts with stable content identity when available. */\n catalog_etag?: string;\n /** Community mirror catalogs must include at least one non-empty catalog collection. */\n formats?: AdagentsCatalogFormat[];\n /** Optional pointer to a successor adagents.json after a platform adopts AdCP directly. */\n superseded_by?: string;\n /** Seller authorization claims are intentionally not accepted by this helper. */\n authorized_agents?: never;\n /** Generator-only flag; community mirrors are persisted adagents.json documents. */\n include_schema?: never;\n /** Generator-only flag; community mirrors are persisted adagents.json documents. */\n include_timestamp?: never;\n };\n\n/** Input for publishing/upserting a catalog-only community mirror descriptor. */\nexport type CreateCommunityMirrorAdagentsConfig = CommunityMirrorAdagentsConfig & {\n /**\n * Stable platform key for the hosted mirror. If omitted, RegistryClient can\n * infer it only when every `properties[].platform` value is the same.\n */\n platform?: string;\n};\n\n/** Catalog-only community mirror adagents.json descriptor. */\nexport type CommunityMirrorAdagentsCatalog = Omit<\n CreateAdagentsRequest,\n 'authorized_agents' | 'catalog_etag' | 'include_schema' | 'include_timestamp' | 'platform'\n> &\n CommunityMirrorCatalogContent & {\n authorized_agents: [];\n catalog_etag?: string;\n formats?: AdagentsCatalogFormat[];\n superseded_by?: string;\n };\n\n/** Response from PUT /api/registry/mirrors/:platform. */\nexport type PublishCommunityMirrorAdagentsResponse = CommunityMirrorPublishResponse;\n\n/** Summary item from GET /api/registry/mirrors. */\nexport type CommunityMirrorAdagentsSummary = CommunityMirrorSummary;\n\n/** Response from GET /api/registry/mirrors. */\nexport type ListCommunityMirrorAdagentsResponse = CommunityMirrorListResponse;\n\n/** Raw response from GET /api/registry/mirrors/:platform. */\nexport type GetCommunityMirrorAdagentsResponse = CommunityMirrorGetResponse;\n\n/** Raw request body for PUT /api/registry/mirrors/:platform. */\nexport type PublishCommunityMirrorAdagentsRequest = CommunityMirrorPublishRequest;\n\n/** Validation error from PUT /api/registry/mirrors/:platform. */\nexport type PublishCommunityMirrorAdagentsError = CommunityMirrorPublishError;\n\n/** Response from DELETE /api/registry/mirrors/:platform. */\nexport type DeleteCommunityMirrorAdagentsResponse = CommunityMirrorDeleteResponse;\n\n/** Request body for POST /api/registry/validate/product-authorization */\nexport type ValidateProductAuthorizationRequest = NonNullable<\n operations['validateProductAuthorization']['requestBody']\n>['content']['application/json'];\n\n/** Request body for POST /api/registry/expand/product-identifiers */\nexport type ExpandProductIdentifiersRequest = NonNullable<\n operations['expandProductIdentifiers']['requestBody']\n>['content']['application/json'];\n\n/** Query parameters for GET /api/brands/registry */\nexport type ListBrandsOptions = NonNullable<operations['listBrands']['parameters']['query']>;\n\n/** Response from GET /api/brands/registry (200) */\nexport type ListBrandsResponse = operations['listBrands']['responses']['200']['content']['application/json'];\n\n/** Response from GET /api/brands/brand-json (200) */\nexport type GetBrandJsonResponse = operations['getBrandJson']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/registry/agents */\nexport type ListAgentsQuery = NonNullable<operations['listAgents']['parameters']['query']>;\n\n/** Response from GET /api/registry/agents (200) */\nexport type ListAgentsResponse = operations['listAgents']['responses']['200']['content']['application/json'] & {\n /**\n * Backward-compatible SDK field. Current registry responses may omit source\n * summaries, so RegistryClient normalizes this to an empty object.\n */\n sources: Record<string, unknown>;\n};\n\n/** Response from GET /api/registry/publishers (200) */\nexport type ListPublishersResponse = operations['listPublishers']['responses']['200']['content']['application/json'] & {\n /**\n * Backward-compatible SDK field. Current registry responses may omit source\n * summaries, so RegistryClient normalizes this to an empty object.\n */\n sources: Record<string, unknown>;\n};\n\n/** Query parameters for GET /api/registry/feed */\nexport type FeedQuery = NonNullable<operations['getRegistryFeed']['parameters']['query']>;\n\n/** Query parameters for GET /api/registry/agents/search */\nexport type AgentSearchQuery = NonNullable<operations['searchAgentProfiles']['parameters']['query']> & {\n /** Agent type filter. Accepts current registry types plus legacy aliases. */\n type?: string;\n /** Sort order. */\n sort?: string;\n};\n\n/** Request body for POST /api/registry/crawl-request */\nexport type CrawlRequest = NonNullable<operations['requestCrawl']['requestBody']>['content']['application/json'];\n\n/** Request body for POST /api/registry/manager-revalidation-request */\nexport type ManagerRevalidationRequest = NonNullable<\n operations['requestManagerRevalidation']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/registry/manager-revalidation-request (202) */\nexport type ManagerRevalidationResponse =\n operations['requestManagerRevalidation']['responses']['202']['content']['application/json'];\n\n/** Query parameters for GET /api/policies/registry */\nexport type ListPoliciesQuery = NonNullable<operations['listPolicies']['parameters']['query']>;\n\n/** Response from GET /api/policies/registry (200) */\nexport type ListPoliciesResponse = operations['listPolicies']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/policies/resolve */\nexport type ResolvePolicyQuery = operations['resolvePolicy']['parameters']['query'];\n\n/** Response from GET /api/policies/resolve (200) */\nexport type ResolvePolicyResponse = operations['resolvePolicy']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/policies/resolve/bulk */\nexport type ResolvePoliciesBulkRequest = NonNullable<\n operations['resolvePoliciesBulk']['requestBody']\n>['content']['application/json'];\n\n/** Response from POST /api/policies/resolve/bulk (200) */\nexport type ResolvePoliciesBulkResponse =\n operations['resolvePoliciesBulk']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/policies/history */\nexport type GetPolicyHistoryQuery = operations['getPolicyHistory']['parameters']['query'];\n\n/** Response from GET /api/policies/history (200) */\nexport type GetPolicyHistoryResponse =\n operations['getPolicyHistory']['responses']['200']['content']['application/json'];\n\n/** Request body for POST /api/policies/save */\nexport type SavePolicyRequest = NonNullable<operations['savePolicy']['requestBody']>['content']['application/json'];\n\n/** Response from POST /api/policies/save (200) */\nexport type SavePolicyResponse = operations['savePolicy']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/brands/history */\nexport type GetBrandHistoryQuery = operations['getBrandHistory']['parameters']['query'];\n\n/** Response from GET /api/brands/history (200) */\nexport type GetBrandHistoryResponse = operations['getBrandHistory']['responses']['200']['content']['application/json'];\n\n/** Query parameters for GET /api/properties/history */\nexport type GetPropertyHistoryQuery = operations['getPropertyHistory']['parameters']['query'];\n\n/** Response from GET /api/properties/history (200) */\nexport type GetPropertyHistoryResponse =\n operations['getPropertyHistory']['responses']['200']['content']['application/json'];\n\n/** Response from GET /api/registry/agents/{agentUrl}/storyboard-status */\nexport type GetAgentStoryboardStatusResponse =\n operations['getAgentStoryboardStatus']['responses']['200']['content']['application/json'];\n\n/** Response from POST /api/registry/agents/storyboard-status */\nexport type GetAgentStoryboardStatusBulkResponse =\n operations['bulkAgentStoryboardStatus']['responses']['200']['content']['application/json'];\n\n/** Payload for agent.compliance_changed feed events. */\nexport interface ComplianceChangedPayload {\n previous_status: import('./types.generated').AgentCompliance['status'];\n current_status: import('./types.generated').AgentCompliance['status'];\n compliance_summary?: import('./types.generated').AgentCompliance;\n}\n\n// ====== Brand logo asset types ======\n\n/** Review status for a brand logo asset in the AAO registry. */\nexport type BrandLogoReviewStatus = 'approved' | 'pending' | 'rejected' | 'deleted';\n\ntype BrandLogoAssetBase = {\n /** Registry-assigned stable asset ID. */\n id: string;\n /** Asset MIME type, for example `image/svg+xml` or `image/png`. */\n content_type: string;\n /** Registry source, for example `brandfetch` or `community`. */\n source: string;\n /** Caller- or registry-assigned asset tags. */\n tags: string[];\n /** Legacy relative asset URL, when returned by AAO. */\n legacy_url?: string;\n /** Pixel width for raster assets, when known. */\n width?: number;\n /** Pixel height for raster assets, when known. */\n height?: number;\n};\n\n/** Approved brand logo assets are ready to reference from brand.json. */\nexport type ApprovedBrandLogoAsset = BrandLogoAssetBase & {\n review_status: 'approved';\n url: string;\n};\n\n/**\n * Pending community logo assets are still under review and must not be treated\n * as brand.json-ready until a later list call returns them as approved.\n */\nexport type PendingBrandLogoAsset = BrandLogoAssetBase & {\n review_status: 'pending';\n url?: string;\n message?: string;\n review_sla_hours?: number;\n};\n\n/** Review-only logo assets that are no longer eligible for public brand.json use. */\nexport type ReviewedBrandLogoAsset = BrandLogoAssetBase & {\n review_status: 'rejected' | 'deleted';\n url?: string;\n};\n\n/**\n * A logo asset returned by AAO brand-logo endpoints.\n *\n * @remarks\n * These endpoints are not yet present in the generated registry OpenAPI\n * types, so this hand-rolled shape mirrors the current AAO response contract.\n */\nexport type BrandLogoAsset = ApprovedBrandLogoAsset | PendingBrandLogoAsset | ReviewedBrandLogoAsset;\n\n/** Response from GET /api/brands/:domain/logos. */\nexport interface ListBrandLogosResponse {\n domain?: string;\n assets: BrandLogoAsset[];\n stats?: Record<string, unknown>;\n /** @deprecated Use `assets`. Preserved for older AAO responses and callers. */\n logos?: BrandLogoAsset[];\n}\n\n/** Options for listing brand logo assets. */\nexport interface ListBrandLogosOptions {\n /** Optional tag filters, serialized as a comma-separated `tags` query parameter. */\n tags?: string[];\n}\n\n/** Input for POST /api/brands/:domain/logos. */\nexport interface SaveBrandLogoInput {\n domain: string;\n data: Blob | Buffer | ArrayBuffer | ArrayBufferView;\n filename: string;\n mimeType: string;\n tags: string[];\n note?: string;\n}\n\n/** @deprecated Use `SaveBrandLogoInput`. */\nexport type UploadBrandLogoInput = SaveBrandLogoInput;\n\n/**\n * Response from POST /api/brands/:domain/logos.\n *\n * @remarks\n * These endpoints are not yet present in the generated registry OpenAPI\n * types, so this hand-rolled shape mirrors the current AAO response contract.\n */\nexport type SaveBrandLogoResponse = {\n success?: boolean;\n domain: string;\n logo_id: string;\n review_status: BrandLogoReviewStatus;\n url?: string;\n legacy_url?: string;\n message?: string;\n review_sla_hours?: number;\n};\n\n/** @deprecated Use `SaveBrandLogoResponse`. */\nexport type UploadBrandLogoResponse = SaveBrandLogoResponse;\n\n// ====== Backward compatibility ======\n\n/** @deprecated Use ResolvedProperty instead */\nexport type PropertyInfo = import('./types.generated').ResolvedProperty;\n\n// ====== Client-specific types (not in the API schema) ======\n\n/** A single company match from a brand search query. */\nexport interface CompanySearchResult {\n domain: string;\n canonical_domain: string;\n brand_name: string;\n house_domain?: string;\n parent_brand?: string;\n keller_type: 'master' | 'sub_brand' | 'endorsed' | 'independent';\n brand_agent_url?: string;\n source: string;\n}\n\n/** Result from findCompany() brand search. */\nexport interface FindCompanyResult {\n results: CompanySearchResult[];\n}\n\n/** Configuration for the registry client. */\nexport interface RegistryClientConfig {\n /** Base URL of the AdCP registry. Defaults to https://agenticadvertising.org */\n baseUrl?: string;\n /** API key for authenticated registry access. Falls back to ADCP_REGISTRY_API_KEY env var. */\n apiKey?: string;\n /** Request timeout in milliseconds. Defaults to 10 seconds. */\n timeoutMs?: number;\n /** Maximum response body size in bytes before JSON parsing. Defaults to 256 KiB. */\n maxBodyBytes?: number;\n /** Redirect policy for registry requests. Defaults to 'error'. */\n redirect?: 'follow' | 'error';\n /** Fetch implementation for tests and custom runtimes. Defaults to globalThis.fetch. */\n fetch?: typeof globalThis.fetch;\n}\n\n/** Options for list/search endpoints with pagination. */\nexport interface ListOptions {\n search?: string;\n limit?: number;\n offset?: number;\n}\n\n/** Options for listing agents with filtering. */\nexport type ListAgentsOptions = Omit<\n ListAgentsQuery,\n 'type' | 'health' | 'capabilities' | 'properties' | 'compliance' | 'verified' | 'verification_mode'\n> & {\n type?: ListAgentsQuery['type'] | 'si';\n health?: boolean | 'true';\n capabilities?: boolean | 'true';\n properties?: boolean | 'true';\n compliance?: boolean | 'true';\n verified?: boolean | 'true';\n verification_mode?: ListAgentsQuery['verification_mode'] | 'spec' | 'live';\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
"source_sha": "4e553ad955f83b49c7d221ab5c3ff78237ad02e3",
|
|
5
5
|
"source_tarball_sha256": "580656d6466ef9f0d1119985e6726c2efea718dc671e2ad30957fcb2fd54af0f",
|
|
6
6
|
"upstream_adcp_version": "2.5.3",
|
|
7
|
-
"synced_at": "2026-07-
|
|
7
|
+
"synced_at": "2026-07-29T23:25:55.485Z"
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../../src/lib/testing/storyboard/runner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+EH,OAAO,KAAK,EAeV,2BAA2B,EAG3B,UAAU,EACV,cAAc,EAEd,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAEhB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EAErB,uBAAuB,EACvB,qBAAqB,EAGtB,MAAM,SAAS,CAAC;AASjB,OAAO,KAAK,EAA4B,cAAc,EAAE,MAAM,UAAU,CAAC;AAoCzE,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,oBAAoB,GAC5B,oBAAoB,CAEtB;AAED,wBAAgB,0BAA0B,CACxC,kBAAkB,EAAE,MAAM,GAAG,SAAS,EACtC,OAAO,EAAE,oBAAoB,GAC5B,oBAAoB,CAUtB;AAsED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAS/E;AAoCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,2BAA2B,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CA2ClH;AA+kBD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE9D;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAEpC;AAED,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAEpC;AAiCD;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CACjC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,EACjC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,gBAAgB,CAAC,CAS3B;AAiqBD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EAAE,EACnB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,cAAc,GAC5B,gBAAgB,CA8ClB;
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../../src/lib/testing/storyboard/runner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+EH,OAAO,KAAK,EAeV,2BAA2B,EAG3B,UAAU,EACV,cAAc,EAEd,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAEhB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EAErB,uBAAuB,EACvB,qBAAqB,EAGtB,MAAM,SAAS,CAAC;AASjB,OAAO,KAAK,EAA4B,cAAc,EAAE,MAAM,UAAU,CAAC;AAoCzE,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,oBAAoB,GAC5B,oBAAoB,CAEtB;AAED,wBAAgB,0BAA0B,CACxC,kBAAkB,EAAE,MAAM,GAAG,SAAS,EACtC,OAAO,EAAE,oBAAoB,GAC5B,oBAAoB,CAUtB;AAsED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAS/E;AAoCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,2BAA2B,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CA2ClH;AA+kBD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE9D;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAEpC;AAED,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAEpC;AAiCD;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CACjC,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE,EACjC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,gBAAgB,CAAC,CAS3B;AAiqBD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EAAE,EACnB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,cAAc,GAC5B,gBAAgB,CA8ClB;AA8qDD;;;;;;;;;;;;;;;;GAgBG;AACH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,qBAAqB,EAAE,GAC9B,KAAK,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,qBAAqB,EAAE,CAAA;CAAE,CAAC,CA0B9G;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,uBAAuB,CA4BlG;AAMD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAU/B;AA+jFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,CAAC,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyDzB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyBpH;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,cAAc,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKzB;AAkfD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,iBAAsB,GAC9B,qBAAqB,GAAG,SAAS,CAgBnC"}
|
|
@@ -1302,7 +1302,7 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1302
1302
|
});
|
|
1303
1303
|
if (webhookReceiver) (0, import_webhook_assertions.armWebhookAssertions)(storyboard, runnerVars, webhookReceiver);
|
|
1304
1304
|
const allSteps = flattenSteps(storyboard);
|
|
1305
|
-
const dispatch = routingContext && options.agents ? createRoutingDispatcher(routingContext, options, options.agents) : createDispatcher(agentUrls, clients, "round-robin", dispatchOffset);
|
|
1305
|
+
const dispatch = routingContext && options.agents ? createRoutingDispatcher(routingContext, options, options.agents) : createDispatcher(agentUrls, clients, "round-robin", dispatchOffset, profile);
|
|
1306
1306
|
const assertions = (0, import_assertions.resolveAssertions)(storyboard.invariants);
|
|
1307
1307
|
(0, import_assertions.validateStepInvariants)(storyboard, assertions);
|
|
1308
1308
|
const assertionContexts = /* @__PURE__ */ new Map();
|
|
@@ -1588,7 +1588,9 @@ async function executeStoryboardPass(agentUrls, storyboard, options, dispatchOff
|
|
|
1588
1588
|
priorA2aEnvelopes,
|
|
1589
1589
|
stepRequestStarts,
|
|
1590
1590
|
responseDerivedNotApplicableContextKeys,
|
|
1591
|
-
|
|
1591
|
+
agentProfile: assignment.profile,
|
|
1592
|
+
agentLibraryVersion: assignment.profile?.library_version,
|
|
1593
|
+
storyboardRequiresRequestSigner: allRequires.includes("request_signer")
|
|
1592
1594
|
}
|
|
1593
1595
|
);
|
|
1594
1596
|
const result2 = { ...rawResult, storyboard_id: storyboard.id };
|
|
@@ -2054,7 +2056,9 @@ async function runStoryboardStepBody(agentUrl, storyboard, stepId, options) {
|
|
|
2054
2056
|
priorA2aEnvelopes: /* @__PURE__ */ new Map(),
|
|
2055
2057
|
stepRequestStarts: /* @__PURE__ */ new Map(),
|
|
2056
2058
|
responseDerivedNotApplicableContextKeys,
|
|
2057
|
-
|
|
2059
|
+
agentProfile: profile,
|
|
2060
|
+
agentLibraryVersion: profile?.library_version,
|
|
2061
|
+
storyboardRequiresRequestSigner: resolveStoryboardRequires(storyboard, options).includes("request_signer")
|
|
2058
2062
|
});
|
|
2059
2063
|
if (!result.skipped && result.passed && found.step.contributes_to) {
|
|
2060
2064
|
if (evalContributesIf(found.step.contributes_if, /* @__PURE__ */ new Map())) {
|
|
@@ -2454,6 +2458,33 @@ async function executeStep(client, step, storyboardId, phaseId, context, allStep
|
|
|
2454
2458
|
taskResult?.debug_logs,
|
|
2455
2459
|
storyboardId
|
|
2456
2460
|
);
|
|
2461
|
+
const requiredForSigning = resolveCapabilityPath(
|
|
2462
|
+
runState.agentProfile?.raw_capabilities,
|
|
2463
|
+
"request_signing.required_for"
|
|
2464
|
+
);
|
|
2465
|
+
if (taskResult?.adcp_error?.code === "request_signature_required" && Array.isArray(requiredForSigning) && requiredForSigning.includes(effectiveStep.task) && runState.storyboardRequiresRequestSigner !== true) {
|
|
2466
|
+
const next2 = getNextStepPreview(step.id, allSteps, context, runState.runnerVars);
|
|
2467
|
+
const detail = `Agent declared request_signing.required_for includes "${effectiveStep.task}" and rejected the unsigned request with request_signature_required; storyboard "${storyboardId}" does not require request_signer.`;
|
|
2468
|
+
return {
|
|
2469
|
+
step_id: step.id,
|
|
2470
|
+
phase_id: phaseId,
|
|
2471
|
+
title: step.title,
|
|
2472
|
+
task: step.task,
|
|
2473
|
+
passed: true,
|
|
2474
|
+
skipped: true,
|
|
2475
|
+
skip_reason: "not_applicable",
|
|
2476
|
+
skip: buildSkip("not_applicable", detail),
|
|
2477
|
+
duration_ms: stepResult.duration_ms,
|
|
2478
|
+
validations: [],
|
|
2479
|
+
context,
|
|
2480
|
+
response: (0, import_redact_secrets.redactSecrets)(taskResult.data),
|
|
2481
|
+
next: next2,
|
|
2482
|
+
request: requestRecord,
|
|
2483
|
+
...responseRecord && { response_record: responseRecord },
|
|
2484
|
+
extraction: extractionFromTaskResult(taskResult),
|
|
2485
|
+
...inputSchemaStripNotices.length > 0 && { notices: inputSchemaStripNotices }
|
|
2486
|
+
};
|
|
2487
|
+
}
|
|
2457
2488
|
{
|
|
2458
2489
|
const controllerData = taskResult?.data;
|
|
2459
2490
|
const requestScenario = request.scenario;
|
|
@@ -3995,7 +4026,7 @@ function getNextStepPreview(currentStepId, allSteps, context, runnerVars) {
|
|
|
3995
4026
|
sample_request: previewRequest
|
|
3996
4027
|
};
|
|
3997
4028
|
}
|
|
3998
|
-
function createDispatcher(agentUrls, clients, _strategy, startOffset = 0) {
|
|
4029
|
+
function createDispatcher(agentUrls, clients, _strategy, startOffset = 0, profile) {
|
|
3999
4030
|
let counter = startOffset;
|
|
4000
4031
|
return {
|
|
4001
4032
|
nextFor(_step) {
|
|
@@ -4004,7 +4035,8 @@ function createDispatcher(agentUrls, clients, _strategy, startOffset = 0) {
|
|
|
4004
4035
|
return {
|
|
4005
4036
|
client: clients[idx],
|
|
4006
4037
|
agentUrl: agentUrls[idx],
|
|
4007
|
-
instanceIndex: idx
|
|
4038
|
+
instanceIndex: idx,
|
|
4039
|
+
profile
|
|
4008
4040
|
};
|
|
4009
4041
|
}
|
|
4010
4042
|
};
|
|
@@ -4016,6 +4048,7 @@ function createRoutingDispatcher(ctx, options, agents) {
|
|
|
4016
4048
|
nextFor(step) {
|
|
4017
4049
|
const key = (0, import_agent_routing.resolveAgentForStep)(step, options, ctx);
|
|
4018
4050
|
const client = ctx.clients.get(key);
|
|
4051
|
+
const profile = ctx.profiles.get(key);
|
|
4019
4052
|
const url = agents[key]?.url;
|
|
4020
4053
|
if (!client || !url) {
|
|
4021
4054
|
throw new import_agent_routing.RoutingError(
|
|
@@ -4027,7 +4060,8 @@ function createRoutingDispatcher(ctx, options, agents) {
|
|
|
4027
4060
|
return {
|
|
4028
4061
|
client,
|
|
4029
4062
|
agentUrl: url,
|
|
4030
|
-
instanceIndex: keyToIndex.get(key) ?? 0
|
|
4063
|
+
instanceIndex: keyToIndex.get(key) ?? 0,
|
|
4064
|
+
profile
|
|
4031
4065
|
};
|
|
4032
4066
|
}
|
|
4033
4067
|
};
|