(output: unknown)
| 9 | |
| 10 | // Helper function to extract profile ID from various response formats |
| 11 | const extractProfileId: ProfileIdExtractor = (output: unknown): string | null => { |
| 12 | if (typeof output === 'object' && output !== null) { |
| 13 | const profileOutput = output as LinkedInProfileOutput |
| 14 | return profileOutput.profile?.id || profileOutput.sub || profileOutput.id || null |
| 15 | } |
| 16 | return null |
| 17 | } |
| 18 | |
| 19 | export const linkedInSharePostTool: ToolConfig<SharePostParams, SharePostResponse> = { |
| 20 | id: 'linkedin_share_post', |