BaseNode, DEFAULT_ACTION } from &quot;../src/pocket&quot;;
import { callLLM } from &quot;../path/to/your/llm-wrapper&quot;;

export class SummarizeFile extends BaseNode {
  // constructor to accept node config (like maxRetries)
  constructor(private config?: { maxRetries?: number; wait?: number }) {
    super(config);
  }

  // prepAsync: read data from sharedState
  public async prepAsync(sharedState: any): Promise&lt;string&gt; {
    const filename = this.params[&quot;filename&quot;] as string;
    const 