MCPcopy Index your code
hub / github.com/coder/mux / workflowRunRecoveryNote

Function workflowRunRecoveryNote

src/node/services/tools/workflow_run.ts:66–79  ·  view source on GitHub ↗
(run: WorkflowRunRecord, error: unknown)

Source from the content-addressed store, hash-verified

64}
65
66function workflowRunRecoveryNote(run: WorkflowRunRecord, error: unknown): string {
67 const statusGuidance: Record<WorkflowRunRecord["status"], string> = {
68 pending: "resume it with workflow_resume because no runner may be active yet",
69 running: "await it with task_await",
70 backgrounded: "await it with task_await",
71 interrupted: "resume it with workflow_resume",
72 failed: "use workflow_resume({ mode: 'retry_from_checkpoint' }) only if the run is eligible",
73 completed: "inspect the returned durable result instead of rerunning",
74 };
75 return (
76 `workflow_run errored after creating durable run \`${run.id}\`: ${getErrorMessage(error)}. ` +
77 `The durable run is ${run.status}; ${statusGuidance[run.status]}. Do not start another copy.`
78 );
79}
80
81export const createWorkflowRunTool: ToolFactory = (config: ToolConfiguration) => {
82 return tool({

Callers 1

createWorkflowRunToolFunction · 0.85

Calls 1

getErrorMessageFunction · 0.90

Tested by

no test coverage detected