(event: InboundTextEvent | null | undefined)
| 16827 | } |
| 16828 | |
| 16829 | function resolveExplicitPluginTargetHints(event: InboundTextEvent | null | undefined): ExplicitPluginTargetHint[] { |
| 16830 | const metadata = event?.metadata; |
| 16831 | if (!metadata || typeof metadata !== 'object') { |
| 16832 | return []; |
| 16833 | } |
| 16834 | const codexbridge = (metadata as Record<string, unknown>).codexbridge; |
| 16835 | if (!codexbridge || typeof codexbridge !== 'object') { |
| 16836 | return []; |
| 16837 | } |
| 16838 | const hints = (codexbridge as Record<string, unknown>).explicitPluginTargets; |
| 16839 | if (Array.isArray(hints)) { |
| 16840 | return hints.filter((entry) => entry && typeof entry === 'object') as ExplicitPluginTargetHint[]; |
| 16841 | } |
| 16842 | const hint = (codexbridge as Record<string, unknown>).explicitPluginTarget; |
| 16843 | if (!hint || typeof hint !== 'object') { |
| 16844 | return []; |
| 16845 | } |
| 16846 | return [hint as ExplicitPluginTargetHint]; |
| 16847 | } |
| 16848 | |
| 16849 | function withCodexbridgeMetadata(event: InboundTextEvent, updates: Record<string, unknown>) { |
| 16850 | const metadata = event?.metadata && typeof event.metadata === 'object' |
no outgoing calls
no test coverage detected