( runtime: AgentRuntimeRecord, payload: ParsedTaskPayload, attachmentLines: string[], agentProfile?: ActiveEmployee, agentSkills: WorkspaceSkill[] = [], skillContextDir?: string, providerSkillContextDir?: string, channelDocuments: ChannelDocument[] = [], channelDocumentsContextDir?: string, contactContext?: ContactAgentContext, knowledgeContext?: AgentKnowledgePromptContext, runtimeApps: RuntimeAppContextEntry[] = [], documentPermissionRequests: DocumentPermissionRequestRecord[] = [], agentNotifications: WorkspaceNotificationRecord[] = [], routerSessionContext?: RouterSessionPromptContext, feishuLarkCliResourceGrants: FeishuLarkCliResourceGrant[] = [], )
| 473 | } |
| 474 | |
| 475 | export function buildTaskPrompt( |
| 476 | runtime: AgentRuntimeRecord, |
| 477 | payload: ParsedTaskPayload, |
| 478 | attachmentLines: string[], |
| 479 | agentProfile?: ActiveEmployee, |
| 480 | agentSkills: WorkspaceSkill[] = [], |
| 481 | skillContextDir?: string, |
| 482 | providerSkillContextDir?: string, |
| 483 | channelDocuments: ChannelDocument[] = [], |
| 484 | channelDocumentsContextDir?: string, |
| 485 | contactContext?: ContactAgentContext, |
| 486 | knowledgeContext?: AgentKnowledgePromptContext, |
| 487 | runtimeApps: RuntimeAppContextEntry[] = [], |
| 488 | documentPermissionRequests: DocumentPermissionRequestRecord[] = [], |
| 489 | agentNotifications: WorkspaceNotificationRecord[] = [], |
| 490 | routerSessionContext?: RouterSessionPromptContext, |
| 491 | feishuLarkCliResourceGrants: FeishuLarkCliResourceGrant[] = [], |
| 492 | ): string { |
| 493 | const agentDocumentContexts = contextsFromLegacyDocuments(channelDocuments); |
| 494 | return buildTaskPromptWithDocumentContexts( |
| 495 | runtime, |
| 496 | payload, |
| 497 | attachmentLines, |
| 498 | agentProfile, |
| 499 | agentSkills, |
| 500 | skillContextDir, |
| 501 | providerSkillContextDir, |
| 502 | agentDocumentContexts, |
| 503 | channelDocumentsContextDir, |
| 504 | contactContext, |
| 505 | knowledgeContext, |
| 506 | runtimeApps, |
| 507 | feishuLarkCliResourceGrants, |
| 508 | documentPermissionRequests, |
| 509 | agentNotifications, |
| 510 | routerSessionContext, |
| 511 | ); |
| 512 | } |
| 513 | |
| 514 | export function buildTaskPromptWithDocumentContexts( |
| 515 | runtime: AgentRuntimeRecord, |
no test coverage detected