* Returns an array of FunctionDeclaration objects for tools that are local to the subagent's scope. * Currently, this includes the `self.emitvalue` tool for emitting variables. * @returns An array of `FunctionDeclaration` objects.
()
| 620 | * @returns An array of `FunctionDeclaration` objects. |
| 621 | */ |
| 622 | private getScopeLocalFuncDefs() { |
| 623 | const emitValueTool: FunctionDeclaration = { |
| 624 | name: 'self.emitvalue', |
| 625 | description: `* This tool emits A SINGLE return value from this execution, such that it can be collected and presented to the calling function. |
| 626 | * You can only emit ONE VALUE each time you call this tool. You are expected to call this tool MULTIPLE TIMES if you have MULTIPLE OUTPUTS.`, |
| 627 | parameters: { |
| 628 | type: Type.OBJECT, |
| 629 | properties: { |
| 630 | emit_variable_name: { |
| 631 | description: 'This is the name of the variable to be returned.', |
| 632 | type: Type.STRING, |
| 633 | }, |
| 634 | emit_variable_value: { |
| 635 | description: |
| 636 | 'This is the _value_ to be returned for this variable.', |
| 637 | type: Type.STRING, |
| 638 | }, |
| 639 | }, |
| 640 | required: ['emit_variable_name', 'emit_variable_value'], |
| 641 | }, |
| 642 | }; |
| 643 | |
| 644 | return [emitValueTool]; |
| 645 | } |
| 646 | |
| 647 | /** |
| 648 | * Builds the system prompt for the chat based on the provided configurations. |