({
cwd,
skillsDir,
projectFiles,
knowledgeFiles,
userKnowledgeFiles,
agentDefinitions,
customToolDefinitions,
maxAgentSteps,
fs,
}: {
cwd: string
skillsDir?: string
projectFiles?: Record<string, string>
knowledgeFiles?: Record<string, string>
userKnowledgeFiles?: Record<string, string>
agentDefinitions?: AgentDefinition[]
customToolDefinitions?: CustomToolDefinition[]
maxAgentSteps?: number
fs: CodebuffFileSystem
})
| 610 | } |
| 611 | |
| 612 | export async function generateInitialRunState({ |
| 613 | cwd, |
| 614 | skillsDir, |
| 615 | projectFiles, |
| 616 | knowledgeFiles, |
| 617 | userKnowledgeFiles, |
| 618 | agentDefinitions, |
| 619 | customToolDefinitions, |
| 620 | maxAgentSteps, |
| 621 | fs, |
| 622 | }: { |
| 623 | cwd: string |
| 624 | skillsDir?: string |
| 625 | projectFiles?: Record<string, string> |
| 626 | knowledgeFiles?: Record<string, string> |
| 627 | userKnowledgeFiles?: Record<string, string> |
| 628 | agentDefinitions?: AgentDefinition[] |
| 629 | customToolDefinitions?: CustomToolDefinition[] |
| 630 | maxAgentSteps?: number |
| 631 | fs: CodebuffFileSystem |
| 632 | }): Promise<RunState> { |
| 633 | return { |
| 634 | traceSessionId: crypto.randomUUID(), |
| 635 | sessionState: await initialSessionState({ |
| 636 | cwd, |
| 637 | skillsDir, |
| 638 | projectFiles, |
| 639 | knowledgeFiles, |
| 640 | userKnowledgeFiles, |
| 641 | agentDefinitions, |
| 642 | customToolDefinitions, |
| 643 | maxAgentSteps, |
| 644 | fs, |
| 645 | }), |
| 646 | output: { |
| 647 | type: 'error', |
| 648 | message: 'No output yet', |
| 649 | }, |
| 650 | } |
| 651 | } |
| 652 | |
| 653 | export function withAdditionalMessage({ |
| 654 | runState, |
nothing calls this directly
no test coverage detected