@agimon-ai/doompi-workflow 0.0.1-alpha.2 → 0.0.1-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/README.md +47 -21
  2. package/dist/adapters/pi/dispatcher.cjs.map +1 -0
  3. package/dist/{dispatcher.d.cts → adapters/pi/dispatcher.d.cts} +1 -1
  4. package/dist/adapters/pi/dispatcher.d.cts.map +1 -0
  5. package/dist/{dispatcher.d.mts → adapters/pi/dispatcher.d.mts} +1 -1
  6. package/dist/adapters/pi/dispatcher.d.mts.map +1 -0
  7. package/dist/adapters/pi/dispatcher.mjs.map +1 -0
  8. package/dist/adapters/pi/extension.cjs +2 -0
  9. package/dist/adapters/pi/extension.cjs.map +1 -0
  10. package/dist/{extension.d.cts → adapters/pi/extension.d.cts} +1 -1
  11. package/dist/adapters/pi/extension.d.cts.map +1 -0
  12. package/dist/{extension.d.mts → adapters/pi/extension.d.mts} +1 -1
  13. package/dist/adapters/pi/extension.d.mts.map +1 -0
  14. package/dist/adapters/pi/extension.mjs +2 -0
  15. package/dist/adapters/pi/extension.mjs.map +1 -0
  16. package/dist/adapters/pi/leader.cjs +2 -0
  17. package/dist/adapters/pi/leader.cjs.map +1 -0
  18. package/dist/adapters/pi/leader.mjs +2 -0
  19. package/dist/adapters/pi/leader.mjs.map +1 -0
  20. package/dist/adapters/pi/workflow/piExtension.cjs +11 -0
  21. package/dist/adapters/pi/workflow/piExtension.cjs.map +1 -0
  22. package/dist/adapters/pi/workflow/piExtension.mjs +11 -0
  23. package/dist/adapters/pi/workflow/piExtension.mjs.map +1 -0
  24. package/dist/{workflow → adapters/pi/workflow}/piToolBridge.cjs +1 -1
  25. package/dist/adapters/pi/workflow/piToolBridge.cjs.map +1 -0
  26. package/dist/{workflow → adapters/pi/workflow}/piToolBridge.mjs +1 -1
  27. package/dist/adapters/pi/workflow/piToolBridge.mjs.map +1 -0
  28. package/dist/adapters/pi/workflow/piTools.cjs +5 -0
  29. package/dist/adapters/pi/workflow/piTools.cjs.map +1 -0
  30. package/dist/adapters/pi/workflow/piTools.mjs +5 -0
  31. package/dist/adapters/pi/workflow/piTools.mjs.map +1 -0
  32. package/dist/adapters/pi/workflow/workflowLauncher.cjs +2 -0
  33. package/dist/adapters/pi/workflow/workflowLauncher.cjs.map +1 -0
  34. package/dist/adapters/pi/workflow/workflowLauncher.mjs +2 -0
  35. package/dist/adapters/pi/workflow/workflowLauncher.mjs.map +1 -0
  36. package/dist/extensions/dispatcher.cjs +1 -1
  37. package/dist/extensions/dispatcher.cjs.map +1 -1
  38. package/dist/extensions/dispatcher.d.cts +1 -1
  39. package/dist/extensions/dispatcher.d.mts +1 -1
  40. package/dist/extensions/dispatcher.mjs +1 -1
  41. package/dist/extensions/dispatcher.mjs.map +1 -1
  42. package/dist/extensions/pi.cjs +1 -1
  43. package/dist/extensions/pi.cjs.map +1 -1
  44. package/dist/extensions/pi.d.cts +1 -1
  45. package/dist/extensions/pi.d.mts +1 -1
  46. package/dist/extensions/pi.mjs +1 -1
  47. package/dist/extensions/pi.mjs.map +1 -1
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.d.cts +2 -2
  50. package/dist/index.d.mts +2 -2
  51. package/dist/index.mjs +1 -1
  52. package/dist/schemas/workflowPi.cjs +2 -0
  53. package/dist/schemas/workflowPi.cjs.map +1 -0
  54. package/dist/schemas/workflowPi.mjs +2 -0
  55. package/dist/schemas/workflowPi.mjs.map +1 -0
  56. package/dist/services/workflow/backgroundWork.cjs.map +1 -0
  57. package/dist/services/workflow/backgroundWork.mjs.map +1 -0
  58. package/dist/services/workflow/workflowNarration.cjs +2 -0
  59. package/dist/services/workflow/workflowNarration.cjs.map +1 -0
  60. package/dist/services/workflow/workflowNarration.mjs +2 -0
  61. package/dist/services/workflow/workflowNarration.mjs.map +1 -0
  62. package/dist/tui/workflow/doomOverlay.cjs.map +1 -0
  63. package/dist/tui/workflow/doomOverlay.mjs.map +1 -0
  64. package/dist/tui/workflow/overlayText.cjs.map +1 -0
  65. package/dist/tui/workflow/overlayText.mjs.map +1 -0
  66. package/dist/tui/workflow/rendering.cjs.map +1 -0
  67. package/dist/tui/workflow/rendering.mjs.map +1 -0
  68. package/dist/tui/workflow/workflowInspector.cjs +2 -0
  69. package/dist/{workflow/workflowInspector.mjs.map → tui/workflow/workflowInspector.cjs.map} +1 -1
  70. package/dist/tui/workflow/workflowInspector.mjs +2 -0
  71. package/dist/tui/workflow/workflowInspector.mjs.map +1 -0
  72. package/dist/tui/workflow/workflowOverlay.cjs.map +1 -0
  73. package/dist/tui/workflow/workflowOverlay.mjs.map +1 -0
  74. package/dist/tui/workflow/workflowPicker.cjs.map +1 -0
  75. package/dist/tui/workflow/workflowPicker.mjs.map +1 -0
  76. package/dist/tui/workflow/workflowProgressOverlay.cjs +2 -0
  77. package/dist/tui/workflow/workflowProgressOverlay.cjs.map +1 -0
  78. package/dist/tui/workflow/workflowProgressOverlay.mjs +2 -0
  79. package/dist/tui/workflow/workflowProgressOverlay.mjs.map +1 -0
  80. package/dist/tui/workflow/workflowPrompt.cjs.map +1 -0
  81. package/dist/tui/workflow/workflowPrompt.mjs.map +1 -0
  82. package/dist/tui/workflow/workflowRunPanel.cjs.map +1 -0
  83. package/dist/tui/workflow/workflowRunPanel.mjs.map +1 -0
  84. package/dist/tui/workflow/workflowStatusRow.cjs +2 -0
  85. package/dist/tui/workflow/workflowStatusRow.cjs.map +1 -0
  86. package/dist/tui/workflow/workflowStatusRow.mjs +2 -0
  87. package/dist/tui/workflow/workflowStatusRow.mjs.map +1 -0
  88. package/dist/tui/workflow/workflowStepMessage.cjs +2 -0
  89. package/dist/tui/workflow/workflowStepMessage.cjs.map +1 -0
  90. package/dist/tui/workflow/workflowStepMessage.mjs +2 -0
  91. package/dist/tui/workflow/workflowStepMessage.mjs.map +1 -0
  92. package/dist/tui/workflow/workflowToolRender.cjs +7 -0
  93. package/dist/tui/workflow/workflowToolRender.cjs.map +1 -0
  94. package/dist/tui/workflow/workflowToolRender.mjs +7 -0
  95. package/dist/tui/workflow/workflowToolRender.mjs.map +1 -0
  96. package/dist/{types.cjs → types/index.cjs} +1 -1
  97. package/dist/types/index.cjs.map +1 -0
  98. package/dist/{types.mjs → types/index.mjs} +1 -1
  99. package/dist/types/index.mjs.map +1 -0
  100. package/llms.txt +8 -0
  101. package/package.json +20 -11
  102. package/dist/dispatcher.cjs.map +0 -1
  103. package/dist/dispatcher.d.cts.map +0 -1
  104. package/dist/dispatcher.d.mts.map +0 -1
  105. package/dist/dispatcher.mjs.map +0 -1
  106. package/dist/extension.cjs +0 -2
  107. package/dist/extension.cjs.map +0 -1
  108. package/dist/extension.d.cts.map +0 -1
  109. package/dist/extension.d.mts.map +0 -1
  110. package/dist/extension.mjs +0 -2
  111. package/dist/extension.mjs.map +0 -1
  112. package/dist/leader.cjs +0 -2
  113. package/dist/leader.cjs.map +0 -1
  114. package/dist/leader.mjs +0 -2
  115. package/dist/leader.mjs.map +0 -1
  116. package/dist/types.cjs.map +0 -1
  117. package/dist/types.mjs.map +0 -1
  118. package/dist/workflow/backgroundWork.cjs.map +0 -1
  119. package/dist/workflow/backgroundWork.mjs.map +0 -1
  120. package/dist/workflow/doomOverlay.cjs.map +0 -1
  121. package/dist/workflow/doomOverlay.mjs.map +0 -1
  122. package/dist/workflow/overlayText.cjs.map +0 -1
  123. package/dist/workflow/overlayText.mjs.map +0 -1
  124. package/dist/workflow/piExtension.cjs +0 -11
  125. package/dist/workflow/piExtension.cjs.map +0 -1
  126. package/dist/workflow/piExtension.mjs +0 -11
  127. package/dist/workflow/piExtension.mjs.map +0 -1
  128. package/dist/workflow/piToolBridge.cjs.map +0 -1
  129. package/dist/workflow/piToolBridge.mjs.map +0 -1
  130. package/dist/workflow/piTools.cjs +0 -4
  131. package/dist/workflow/piTools.cjs.map +0 -1
  132. package/dist/workflow/piTools.mjs +0 -4
  133. package/dist/workflow/piTools.mjs.map +0 -1
  134. package/dist/workflow/rendering.cjs.map +0 -1
  135. package/dist/workflow/rendering.mjs.map +0 -1
  136. package/dist/workflow/workflowFooterStatus.cjs +0 -2
  137. package/dist/workflow/workflowFooterStatus.cjs.map +0 -1
  138. package/dist/workflow/workflowFooterStatus.mjs +0 -2
  139. package/dist/workflow/workflowFooterStatus.mjs.map +0 -1
  140. package/dist/workflow/workflowInspector.cjs +0 -2
  141. package/dist/workflow/workflowInspector.cjs.map +0 -1
  142. package/dist/workflow/workflowInspector.mjs +0 -2
  143. package/dist/workflow/workflowLauncher.cjs +0 -2
  144. package/dist/workflow/workflowLauncher.cjs.map +0 -1
  145. package/dist/workflow/workflowLauncher.mjs +0 -2
  146. package/dist/workflow/workflowLauncher.mjs.map +0 -1
  147. package/dist/workflow/workflowOverlay.cjs.map +0 -1
  148. package/dist/workflow/workflowOverlay.mjs.map +0 -1
  149. package/dist/workflow/workflowPicker.cjs.map +0 -1
  150. package/dist/workflow/workflowPicker.mjs.map +0 -1
  151. package/dist/workflow/workflowPrompt.cjs.map +0 -1
  152. package/dist/workflow/workflowPrompt.mjs.map +0 -1
  153. package/dist/workflow/workflowRunPanel.cjs.map +0 -1
  154. package/dist/workflow/workflowRunPanel.mjs.map +0 -1
  155. package/dist/workflow/workflowStatusRow.cjs +0 -2
  156. package/dist/workflow/workflowStatusRow.cjs.map +0 -1
  157. package/dist/workflow/workflowStatusRow.mjs +0 -2
  158. package/dist/workflow/workflowStatusRow.mjs.map +0 -1
  159. package/dist/workflow/workflowStepMessage.cjs +0 -2
  160. package/dist/workflow/workflowStepMessage.cjs.map +0 -1
  161. package/dist/workflow/workflowStepMessage.mjs +0 -2
  162. package/dist/workflow/workflowStepMessage.mjs.map +0 -1
  163. /package/dist/{dispatcher.cjs → adapters/pi/dispatcher.cjs} +0 -0
  164. /package/dist/{dispatcher.mjs → adapters/pi/dispatcher.mjs} +0 -0
  165. /package/dist/{workflow → services/workflow}/backgroundWork.cjs +0 -0
  166. /package/dist/{workflow → services/workflow}/backgroundWork.mjs +0 -0
  167. /package/dist/{workflow → tui/workflow}/doomOverlay.cjs +0 -0
  168. /package/dist/{workflow → tui/workflow}/doomOverlay.mjs +0 -0
  169. /package/dist/{workflow → tui/workflow}/overlayText.cjs +0 -0
  170. /package/dist/{workflow → tui/workflow}/overlayText.mjs +0 -0
  171. /package/dist/{workflow → tui/workflow}/rendering.cjs +0 -0
  172. /package/dist/{workflow → tui/workflow}/rendering.mjs +0 -0
  173. /package/dist/{workflow → tui/workflow}/workflowOverlay.cjs +0 -0
  174. /package/dist/{workflow → tui/workflow}/workflowOverlay.mjs +0 -0
  175. /package/dist/{workflow → tui/workflow}/workflowPicker.cjs +0 -0
  176. /package/dist/{workflow → tui/workflow}/workflowPicker.mjs +0 -0
  177. /package/dist/{workflow → tui/workflow}/workflowPrompt.cjs +0 -0
  178. /package/dist/{workflow → tui/workflow}/workflowPrompt.mjs +0 -0
  179. /package/dist/{workflow → tui/workflow}/workflowRunPanel.cjs +0 -0
  180. /package/dist/{workflow → tui/workflow}/workflowRunPanel.mjs +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflowStatusRow.cjs","names":[],"sources":["../../src/workflow/workflowStatusRow.ts"],"sourcesContent":["/**\n * Session reporting for a run's progress log.\n *\n * DESIGN PATTERNS:\n * - Pure derivation. Takes a run's raw progress events and returns report lines,\n * so the behaviour is unit-testable without a registry or a live run.\n *\n * CODING STANDARDS:\n * - Named exports only\n * - Explicit return types on exported members\n *\n * The row renderers this file used to hold are gone: running workflows are now\n * dots in the doom footer (`workflowFooterStatus.ts`) rather than a full-width\n * row above the editor.\n */\n\nimport type { WorkflowProgressEvent } from '@agimon-ai/workflow-mcp';\n\n/** Step names come from workflow YAML and can be sentences. */\nconst MAX_STEP_LABEL = 48;\n\n/** One session line, plus the key that stops it being reported twice. */\nexport interface StepReport {\n duration?: string;\n job: string;\n key: string;\n status: 'FAILED' | 'FINISHED' | 'STARTED';\n step: string;\n}\n\nfunction truncateStep(step: string): string {\n return step.length <= MAX_STEP_LABEL ? step : `${step.slice(0, MAX_STEP_LABEL - 1)}…`;\n}\n\n/**\n * Human-scale duration.\n *\n * Rounded hard on purpose: this is read at a glance next to a step name, where\n * milliseconds are noise and \"4m12s\" answers the only question being asked.\n */\nexport function humanizeDuration(ms: number): string {\n if (!Number.isFinite(ms) || ms < 0) return '?';\n if (ms < 1000) return `${ms}ms`;\n const seconds = Math.round(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m${String(seconds % 60).padStart(2, '0')}s`;\n return `${Math.floor(minutes / 60)}h${String(minutes % 60).padStart(2, '0')}m`;\n}\n\n/**\n * Turn a run's raw progress log into session report lines.\n *\n * Derives durations by pairing each step's start with its end rather than\n * recording a duration in the log, so nothing about the log format has to\n * change and old runs read back the same way.\n *\n * Keyed by the event's own timestamp so a caller polling the same append-only\n * file repeatedly reports each transition exactly once, however often it polls.\n */\nexport function stepReportLines(runKey: string, events: WorkflowProgressEvent[]): StepReport[] {\n const startedAt = new Map<string, string>();\n const reports: StepReport[] = [];\n\n for (const event of events) {\n if (event.type !== 'step' || !event.step) continue;\n const id = `${runKey}/${event.job}`;\n const stepKey = `${id}/${event.step}`;\n const label = truncateStep(event.step);\n\n if (event.status === 'running') {\n startedAt.set(stepKey, event.at);\n reports.push({ job: event.job, key: `started:${stepKey}:${event.at}`, status: 'STARTED', step: label });\n continue;\n }\n\n const began = startedAt.get(stepKey);\n const duration = began ? humanizeDuration(Date.parse(event.at) - Date.parse(began)) : '?';\n // A failed step did finish, but calling it FINISHED buries the one outcome\n // the reader needs to see. Same shape, honest verb.\n const status = event.status === 'failed' ? 'FAILED' : 'FINISHED';\n reports.push({ duration, job: event.job, key: `${status}:${stepKey}:${event.at}`, status, step: label });\n }\n\n return reports;\n}\n"],"mappings":"AA8BA,SAAS,EAAa,EAAsB,CAC1C,OAAO,EAAK,QAAU,GAAiB,EAAO,GAAG,EAAK,MAAM,EAAG,EAAkB,EAAE,EACrF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-1,2 +0,0 @@
1
- function e(e){return e.length<=48?e:`${e.slice(0,47)}…`}function t(e){if(!Number.isFinite(e)||e<0)return`?`;if(e<1e3)return`${e}ms`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m${String(t%60).padStart(2,`0`)}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,`0`)}m`}function n(n,r){let i=new Map,a=[];for(let o of r){if(o.type!==`step`||!o.step)continue;let r=`${`${n}/${o.job}`}/${o.step}`,s=e(o.step);if(o.status===`running`){i.set(r,o.at),a.push({job:o.job,key:`started:${r}:${o.at}`,status:`STARTED`,step:s});continue}let c=i.get(r),l=c?t(Date.parse(o.at)-Date.parse(c)):`?`,u=o.status===`failed`?`FAILED`:`FINISHED`;a.push({duration:l,job:o.job,key:`${u}:${r}:${o.at}`,status:u,step:s})}return a}export{t as humanizeDuration,n as stepReportLines};
2
- //# sourceMappingURL=workflowStatusRow.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflowStatusRow.mjs","names":[],"sources":["../../src/workflow/workflowStatusRow.ts"],"sourcesContent":["/**\n * Session reporting for a run's progress log.\n *\n * DESIGN PATTERNS:\n * - Pure derivation. Takes a run's raw progress events and returns report lines,\n * so the behaviour is unit-testable without a registry or a live run.\n *\n * CODING STANDARDS:\n * - Named exports only\n * - Explicit return types on exported members\n *\n * The row renderers this file used to hold are gone: running workflows are now\n * dots in the doom footer (`workflowFooterStatus.ts`) rather than a full-width\n * row above the editor.\n */\n\nimport type { WorkflowProgressEvent } from '@agimon-ai/workflow-mcp';\n\n/** Step names come from workflow YAML and can be sentences. */\nconst MAX_STEP_LABEL = 48;\n\n/** One session line, plus the key that stops it being reported twice. */\nexport interface StepReport {\n duration?: string;\n job: string;\n key: string;\n status: 'FAILED' | 'FINISHED' | 'STARTED';\n step: string;\n}\n\nfunction truncateStep(step: string): string {\n return step.length <= MAX_STEP_LABEL ? step : `${step.slice(0, MAX_STEP_LABEL - 1)}…`;\n}\n\n/**\n * Human-scale duration.\n *\n * Rounded hard on purpose: this is read at a glance next to a step name, where\n * milliseconds are noise and \"4m12s\" answers the only question being asked.\n */\nexport function humanizeDuration(ms: number): string {\n if (!Number.isFinite(ms) || ms < 0) return '?';\n if (ms < 1000) return `${ms}ms`;\n const seconds = Math.round(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m${String(seconds % 60).padStart(2, '0')}s`;\n return `${Math.floor(minutes / 60)}h${String(minutes % 60).padStart(2, '0')}m`;\n}\n\n/**\n * Turn a run's raw progress log into session report lines.\n *\n * Derives durations by pairing each step's start with its end rather than\n * recording a duration in the log, so nothing about the log format has to\n * change and old runs read back the same way.\n *\n * Keyed by the event's own timestamp so a caller polling the same append-only\n * file repeatedly reports each transition exactly once, however often it polls.\n */\nexport function stepReportLines(runKey: string, events: WorkflowProgressEvent[]): StepReport[] {\n const startedAt = new Map<string, string>();\n const reports: StepReport[] = [];\n\n for (const event of events) {\n if (event.type !== 'step' || !event.step) continue;\n const id = `${runKey}/${event.job}`;\n const stepKey = `${id}/${event.step}`;\n const label = truncateStep(event.step);\n\n if (event.status === 'running') {\n startedAt.set(stepKey, event.at);\n reports.push({ job: event.job, key: `started:${stepKey}:${event.at}`, status: 'STARTED', step: label });\n continue;\n }\n\n const began = startedAt.get(stepKey);\n const duration = began ? humanizeDuration(Date.parse(event.at) - Date.parse(began)) : '?';\n // A failed step did finish, but calling it FINISHED buries the one outcome\n // the reader needs to see. Same shape, honest verb.\n const status = event.status === 'failed' ? 'FAILED' : 'FINISHED';\n reports.push({ duration, job: event.job, key: `${status}:${stepKey}:${event.at}`, status, step: label });\n }\n\n return reports;\n}\n"],"mappings":"AA8BA,SAAS,EAAa,EAAsB,CAC1C,OAAO,EAAK,QAAU,GAAiB,EAAO,GAAG,EAAK,MAAM,EAAG,EAAkB,EAAE,EACrF,CAQA,SAAgB,EAAiB,EAAoB,CACnD,GAAI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");function t(e,t){return{displayName:e,job:t.job,status:t.status,step:t.step,...t.duration?{duration:t.duration}:{}}}function n(e){let t=e.duration?`${e.status}::${e.duration}::${e.step}`:`${e.status}::${e.step}`;return`[${e.displayName}]: ${e.job}\n${t}`}function r(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return typeof t.displayName==`string`&&typeof t.job==`string`&&typeof t.step==`string`&&(t.status===`STARTED`||t.status===`FINISHED`||t.status===`FAILED`)&&(t.duration===void 0||typeof t.duration==`string`)}var i=class{details;theme;constructor(e,t){this.details=e,this.theme=t}render(t){let n=`${this.theme.fg(`accent`,`[${this.details.displayName}]:`)} ${this.details.job}`,r=this.details.duration?`${this.details.status}::${this.details.duration}::${this.details.step}`:`${this.details.status}::${this.details.step}`,i=this.details.status===`FAILED`?`error`:this.details.status===`FINISHED`?`success`:`accent`;return[(0,e.truncateToWidth)(n,t),(0,e.truncateToWidth)(this.theme.fg(i,r),t)]}invalidate(){}};function a(t,n,r,a){let o=new e.Box(r,1,e=>a.bg(`customMessageBg`,e));return o.addChild(t?new i(t,a):new e.Text(n,0,0)),o}exports.formatWorkflowStepMessage=n,exports.isWorkflowStepMessageDetails=r,exports.renderWorkflowStepMessage=a,exports.workflowStepMessageDetails=t;
2
- //# sourceMappingURL=workflowStepMessage.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflowStepMessage.cjs","names":["truncateToWidth","Box","Text"],"sources":["../../src/workflow/workflowStepMessage.ts"],"sourcesContent":["import type { Theme } from '@earendil-works/pi-coding-agent';\nimport { Box, type Component, Text, truncateToWidth } from '@earendil-works/pi-tui';\nimport type { StepReport } from './workflowStatusRow';\n\nexport interface WorkflowStepMessageDetails {\n displayName: string;\n duration?: string;\n job: string;\n status: StepReport['status'];\n step: string;\n}\n\nexport function workflowStepMessageDetails(displayName: string, report: StepReport): WorkflowStepMessageDetails {\n return {\n displayName,\n job: report.job,\n status: report.status,\n step: report.step,\n ...(report.duration ? { duration: report.duration } : {}),\n };\n}\n\nexport function formatWorkflowStepMessage(details: WorkflowStepMessageDetails): string {\n const transition = details.duration\n ? `${details.status}::${details.duration}::${details.step}`\n : `${details.status}::${details.step}`;\n return `[${details.displayName}]: ${details.job}\\n${transition}`;\n}\n\nexport function isWorkflowStepMessageDetails(value: unknown): value is WorkflowStepMessageDetails {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return false;\n const candidate = value as Partial<WorkflowStepMessageDetails>;\n return (\n typeof candidate.displayName === 'string' &&\n typeof candidate.job === 'string' &&\n typeof candidate.step === 'string' &&\n (candidate.status === 'STARTED' || candidate.status === 'FINISHED' || candidate.status === 'FAILED') &&\n (candidate.duration === undefined || typeof candidate.duration === 'string')\n );\n}\n\nclass WorkflowStepMessageLines implements Component {\n constructor(\n private readonly details: WorkflowStepMessageDetails,\n private readonly theme: Theme,\n ) {}\n\n render(width: number): string[] {\n const header = `${this.theme.fg('accent', `[${this.details.displayName}]:`)} ${this.details.job}`;\n const transition = this.details.duration\n ? `${this.details.status}::${this.details.duration}::${this.details.step}`\n : `${this.details.status}::${this.details.step}`;\n const colour =\n this.details.status === 'FAILED' ? 'error' : this.details.status === 'FINISHED' ? 'success' : 'accent';\n return [truncateToWidth(header, width), truncateToWidth(this.theme.fg(colour, transition), width)];\n }\n\n invalidate(): void {}\n}\n\nexport function renderWorkflowStepMessage(\n details: WorkflowStepMessageDetails | undefined,\n fallback: string,\n outputPad: number,\n theme: Theme,\n): Component {\n const box = new Box(outputPad, 1, (text) => theme.bg('customMessageBg', text));\n box.addChild(details ? new WorkflowStepMessageLines(details, theme) : new Text(fallback, 0, 0));\n return box;\n}\n"],"mappings":"wCAYA,SAAgB,EAA2B,EAAqB,EAAgD,CAC9G,MAAO,CACL,cACA,IAAK,EAAO,IACZ,OAAQ,EAAO,OACf,KAAM,EAAO,KACb,GAAI,EAAO,SAAW,CAAE,SAAU,EAAO,QAAS,EAAI,CAAC,CACzD,CACF,CAEA,SAAgB,EAA0B,EAA6C,CACrF,IAAM,E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AC,EAE7E,OADA,EAAI,SAAS,EAAU,IAAI,EAAyB,EAAS,CAAK,EAAI,IAAIC,EAAAA,KAAK,EAAU,EAAG,CAAC,CAAC,EACvF,CACT"}
@@ -1,2 +0,0 @@
1
- import{Box as e,Text as t,truncateToWidth as n}from"@earendil-works/pi-tui";function r(e,t){return{displayName:e,job:t.job,status:t.status,step:t.step,...t.duration?{duration:t.duration}:{}}}function i(e){let t=e.duration?`${e.status}::${e.duration}::${e.step}`:`${e.status}::${e.step}`;return`[${e.displayName}]: ${e.job}\n${t}`}function a(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return typeof t.displayName==`string`&&typeof t.job==`string`&&typeof t.step==`string`&&(t.status===`STARTED`||t.status===`FINISHED`||t.status===`FAILED`)&&(t.duration===void 0||typeof t.duration==`string`)}var o=class{details;theme;constructor(e,t){this.details=e,this.theme=t}render(e){let t=`${this.theme.fg(`accent`,`[${this.details.displayName}]:`)} ${this.details.job}`,r=this.details.duration?`${this.details.status}::${this.details.duration}::${this.details.step}`:`${this.details.status}::${this.details.step}`,i=this.details.status===`FAILED`?`error`:this.details.status===`FINISHED`?`success`:`accent`;return[n(t,e),n(this.theme.fg(i,r),e)]}invalidate(){}};function s(n,r,i,a){let s=new e(i,1,e=>a.bg(`customMessageBg`,e));return s.addChild(n?new o(n,a):new t(r,0,0)),s}export{i as formatWorkflowStepMessage,a as isWorkflowStepMessageDetails,s as renderWorkflowStepMessage,r as workflowStepMessageDetails};
2
- //# sourceMappingURL=workflowStepMessage.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflowStepMessage.mjs","names":[],"sources":["../../src/workflow/workflowStepMessage.ts"],"sourcesContent":["import type { Theme } from '@earendil-works/pi-coding-agent';\nimport { Box, type Component, Text, truncateToWidth } from '@earendil-works/pi-tui';\nimport type { StepReport } from './workflowStatusRow';\n\nexport interface WorkflowStepMessageDetails {\n displayName: string;\n duration?: string;\n job: string;\n status: StepReport['status'];\n step: string;\n}\n\nexport function workflowStepMessageDetails(displayName: string, report: StepReport): WorkflowStepMessageDetails {\n return {\n displayName,\n job: report.job,\n status: report.status,\n step: report.step,\n ...(report.duration ? { duration: report.duration } : {}),\n };\n}\n\nexport function formatWorkflowStepMessage(details: WorkflowStepMessageDetails): string {\n const transition = details.duration\n ? `${details.status}::${details.duration}::${details.step}`\n : `${details.status}::${details.step}`;\n return `[${details.displayName}]: ${details.job}\\n${transition}`;\n}\n\nexport function isWorkflowStepMessageDetails(value: unknown): value is WorkflowStepMessageDetails {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return false;\n const candidate = value as Partial<WorkflowStepMessageDetails>;\n return (\n typeof candidate.displayName === 'string' &&\n typeof candidate.job === 'string' &&\n typeof candidate.step === 'string' &&\n (candidate.status === 'STARTED' || candidate.status === 'FINISHED' || candidate.status === 'FAILED') &&\n (candidate.duration === undefined || typeof candidate.duration === 'string')\n );\n}\n\nclass WorkflowStepMessageLines implements Component {\n constructor(\n private readonly details: WorkflowStepMessageDetails,\n private readonly theme: Theme,\n ) {}\n\n render(width: number): string[] {\n const header = `${this.theme.fg('accent', `[${this.details.displayName}]:`)} ${this.details.job}`;\n const transition = this.details.duration\n ? `${this.details.status}::${this.details.duration}::${this.details.step}`\n : `${this.details.status}::${this.details.step}`;\n const colour =\n this.details.status === 'FAILED' ? 'error' : this.details.status === 'FINISHED' ? 'success' : 'accent';\n return [truncateToWidth(header, width), truncateToWidth(this.theme.fg(colour, transition), width)];\n }\n\n invalidate(): void {}\n}\n\nexport function renderWorkflowStepMessage(\n details: WorkflowStepMessageDetails | undefined,\n fallback: string,\n outputPad: number,\n theme: Theme,\n): Component {\n const box = new Box(outputPad, 1, (text) => theme.bg('customMessageBg', text));\n box.addChild(details ? new WorkflowStepMessageLines(details, theme) : new Text(fallback, 0, 0));\n return box;\n}\n"],"mappings":"4EAYA,SAAgB,EAA2B,EAAqB,EAAgD,CAC9G,MAAO,CACL,cACA,IAAK,EAAO,IACZ,OAAQ,EAAO,OACf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IAAM,EAAM,IAAI,EAAI,EAAW,EAAI,GAAS,EAAM,GAAG,kBAAmB,CAAI,CAAC,EAE7E,OADA,EAAI,SAAS,EAAU,IAAI,EAAyB,EAAS,CAAK,EAAI,IAAI,EAAK,EAAU,EAAG,CAAC,CAAC,EACvF,CACT"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes