* Record properties from adagents.json and link them to an agent. * If the agent has property_ids specified, only record those specific properties.
(
properties: Array<{
property_id?: string;
property_type: string;
name: string;
identifiers: Array<{ type: string; value: string }>;
tags?: string[];
publisher_domain?: string;
}>,
publisherDomain: string,
agentUrl: string,
authorizedFor?: string,
limitToPropertyIds?: string[]
)
| 634 | * If the agent has property_ids specified, only record those specific properties. |
| 635 | */ |
| 636 | private async recordPropertiesForAgent( |
| 637 | properties: Array<{ |
| 638 | property_id?: string; |
| 639 | property_type: string; |
| 640 | name: string; |
| 641 | identifiers: Array<{ type: string; value: string }>; |
| 642 | tags?: string[]; |
| 643 | publisher_domain?: string; |
| 644 | }>, |
| 645 | publisherDomain: string, |
| 646 | agentUrl: string, |
| 647 | authorizedFor?: string, |
| 648 | limitToPropertyIds?: string[] |
| 649 | ): Promise<void> { |
| 650 | for (const prop of properties) { |
| 651 | // If agent has specific property_ids, only record those |
| 652 | if (limitToPropertyIds && limitToPropertyIds.length > 0) { |
| 653 | if (!prop.property_id || !limitToPropertyIds.includes(prop.property_id)) { |
| 654 | continue; |
| 655 | } |
| 656 | } |
| 657 | |
| 658 | await this.federatedIndex.recordProperty( |
| 659 | { |
| 660 | property_id: prop.property_id, |
| 661 | publisher_domain: prop.publisher_domain || publisherDomain, |
| 662 | property_type: prop.property_type, |
| 663 | name: prop.name, |
| 664 | identifiers: prop.identifiers, |
| 665 | tags: prop.tags, |
| 666 | }, |
| 667 | agentUrl, |
| 668 | authorizedFor |
| 669 | ); |
| 670 | } |
| 671 | } |
| 672 | |
| 673 | // ── State Snapshot & Diffing ───────────────────────────────────── |
| 674 |
no test coverage detected