(init: HookProgressInit)
| 46 | ): WorkflowHooks { |
| 47 | // All progress events auto-inject runId so the adapter can route them to the corresponding task (multiple concurrent workflows) |
| 48 | const emit = (init: HookProgressInit): void => { |
| 49 | ctx.ports.progressEmitter.emit({ |
| 50 | runId: ctx.runId, |
| 51 | ...init, |
| 52 | } as ProgressEvent) |
| 53 | } |
| 54 | |
| 55 | const agent: WorkflowHooks['agent'] = async (prompt, opts = {}) => { |
| 56 | const r = ctx.resources |
no test coverage detected