* Analyze workflow code. * Returns graph data. * @param condensedStructure Optional condensed repo structure for cross-batch context
(
code: string,
filePaths: string[],
frameworkHint?: string,
metadata?: FileMetadata[],
condensedStructure?: string,
httpConnections?: string
)
| 84 | * @param condensedStructure Optional condensed repo structure for cross-batch context |
| 85 | */ |
| 86 | async analyzeWorkflow( |
| 87 | code: string, |
| 88 | filePaths: string[], |
| 89 | frameworkHint?: string, |
| 90 | metadata?: FileMetadata[], |
| 91 | condensedStructure?: string, |
| 92 | httpConnections?: string |
| 93 | ): Promise<AnalyzeResult> { |
| 94 | // If condensed structure provided, prepend it to the code |
| 95 | let codeWithContext = code; |
| 96 | if (condensedStructure) { |
| 97 | codeWithContext = `<workflow_context>\n${condensedStructure}\n</workflow_context>\n\n${code}`; |
| 98 | } |
| 99 | |
| 100 | const res = await this.client.post('/analyze', { |
| 101 | code: codeWithContext, |
| 102 | file_paths: filePaths, |
| 103 | framework_hint: frameworkHint, |
| 104 | metadata: metadata || [], |
| 105 | http_connections: httpConnections |
| 106 | }); |
| 107 | |
| 108 | // Backend returns { graph, usage, cost } |
| 109 | return { |
| 110 | graph: res.data.graph, |
| 111 | usage: res.data.usage as TokenUsage | undefined, |
| 112 | cost: res.data.cost as CostData | undefined |
| 113 | }; |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * Fetch metadata (labels, descriptions) for functions. |
no outgoing calls
no test coverage detected