(agent: NonNullable<CodexBundle["agents"]>[number])
| 645 | } |
| 646 | |
| 647 | function renderCodexAgentToml(agent: NonNullable<CodexBundle["agents"]>[number]): string { |
| 648 | const lines = [ |
| 649 | `name = ${formatTomlString(agent.name)}`, |
| 650 | `description = ${formatTomlString(agent.description)}`, |
| 651 | `developer_instructions = ${formatTomlString(agent.instructions)}`, |
| 652 | ] |
| 653 | return lines.join("\n") |
| 654 | } |
| 655 | |
| 656 | function formatTomlKey(value: string): string { |
| 657 | if (/^[A-Za-z0-9_-]+$/.test(value)) return value |
no test coverage detected