makersclaw 0.7.0 → 0.8.1
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.
- package/README.md +17 -4
- package/package.json +1 -1
- package/r/activity-log.json +52 -0
- package/r/agent-changes.json +51 -0
- package/r/agent-chat.json +53 -0
- package/r/agent-column.json +85 -0
- package/r/agent-dock.json +57 -0
- package/r/agent-kit.json +49 -0
- package/r/agent-marks.json +49 -0
- package/r/agent-pane.json +93 -0
- package/r/ai-action.json +56 -0
- package/r/annotate.json +4 -4
- package/r/approval-request.json +2 -2
- package/r/approval.json +54 -0
- package/r/ask-bar.json +50 -0
- package/r/audio-player.json +2 -2
- package/r/auth-form.json +2 -2
- package/r/automation-editor.json +66 -0
- package/r/automation-list.json +57 -0
- package/r/automation-model.json +118 -0
- package/r/automations-screen.json +71 -0
- package/r/board.json +2 -2
- package/r/calendar-view.json +3 -3
- package/r/cart.json +2 -2
- package/r/chart.json +5 -5
- package/r/chat-pane.json +84 -0
- package/r/chat.json +3 -3
- package/r/code-editor.json +2 -2
- package/r/comment-box.json +3 -3
- package/r/connect-card.json +51 -0
- package/r/contact-section.json +2 -2
- package/r/core.json +18 -6
- package/r/cost.json +51 -0
- package/r/csv-import.json +3 -3
- package/r/data-picker.json +60 -0
- package/r/data-table.json +2 -2
- package/r/diagram.json +2 -2
- package/r/doc-editor.json +2 -2
- package/r/doc-page.json +3 -3
- package/r/email-render.json +2 -2
- package/r/faq.json +2 -2
- package/r/file-upload.json +2 -2
- package/r/first-run.json +63 -0
- package/r/fix-note.json +57 -0
- package/r/flow-canvas.json +3 -3
- package/r/flow-editor.json +79 -0
- package/r/footer.json +3 -3
- package/r/gantt.json +3 -3
- package/r/job-panel.json +2 -2
- package/r/json-editor.json +3 -3
- package/r/library-shelf.json +56 -0
- package/r/map.json +2 -2
- package/r/margin-notes.json +67 -0
- package/r/menubar.json +2 -2
- package/r/mind-map.json +4 -4
- package/r/navigation-menu.json +2 -2
- package/r/needs-you.json +55 -0
- package/r/order-detail.json +2 -2
- package/r/org-chart.json +4 -4
- package/r/pace-bar.json +69 -0
- package/r/page-builder.json +3 -3
- package/r/payment-methods.json +2 -2
- package/r/pdf-document.json +2 -2
- package/r/pdf-viewer.json +3 -3
- package/r/product-detail.json +2 -2
- package/r/product-grid.json +3 -3
- package/r/record-form.json +2 -2
- package/r/record-grid.json +52 -0
- package/r/record-notes.json +4 -4
- package/r/registry.json +4089 -1510
- package/r/run-history.json +52 -0
- package/r/run-view.json +80 -0
- package/r/schedule-card.json +54 -0
- package/r/schedule-engine.json +79 -0
- package/r/schedule-gantt.json +83 -0
- package/r/schedule-ruler.json +64 -0
- package/r/search-dialog.json +2 -2
- package/r/settings-list.json +2 -2
- package/r/setup-checklist.json +2 -2
- package/r/share-dialog.json +2 -2
- package/r/sidebar.json +3 -3
- package/r/signature-pad.json +2 -2
- package/r/sketch-canvas.json +3 -3
- package/r/source-receipt.json +52 -0
- package/r/spreadsheet.json +3 -3
- package/r/stat-cards.json +3 -3
- package/r/step-picker.json +53 -0
- package/r/step-settings.json +72 -0
- package/r/suggestion.json +58 -0
- package/r/sum-bar.json +64 -0
- package/r/task-list.json +3 -3
- package/r/task-model.json +2 -2
- package/r/testimonials.json +2 -2
- package/r/tier-map.json +67 -0
- package/r/time-grid.json +73 -0
- package/r/time-strip.json +64 -0
- package/r/top-bar.json +66 -0
- package/r/transaction-list.json +2 -2
- package/r/trigger-picker.json +61 -0
- package/r/whiteboard.json +4 -4
- package/r/workflow-view.json +55 -0
- package/registry/blocks/activity-log/README.md +112 -0
- package/registry/blocks/activity-log/activity-log.jsx +351 -0
- package/registry/blocks/activity-log/block.json +33 -0
- package/registry/blocks/activity-log/demo.jsx +48 -0
- package/registry/blocks/activity-log/index.js +4 -0
- package/registry/blocks/agent-changes/README.md +94 -0
- package/registry/blocks/agent-changes/agent-changes.jsx +118 -0
- package/registry/blocks/agent-changes/block.json +28 -0
- package/registry/blocks/agent-changes/demo.jsx +39 -0
- package/registry/blocks/agent-changes/index.js +3 -0
- package/registry/blocks/agent-chat/README.md +145 -0
- package/registry/blocks/agent-chat/agent-chat.jsx +415 -0
- package/registry/blocks/agent-chat/block.json +30 -0
- package/registry/blocks/agent-chat/demo.jsx +165 -0
- package/registry/blocks/agent-chat/index.js +3 -0
- package/registry/blocks/agent-column/README.md +197 -0
- package/registry/blocks/agent-column/agent-column.jsx +492 -0
- package/registry/blocks/agent-column/block.json +67 -0
- package/registry/blocks/agent-column/column-picker.jsx +163 -0
- package/registry/blocks/agent-column/demo.jsx +50 -0
- package/registry/blocks/agent-column/index.js +7 -0
- package/registry/blocks/agent-column/model.js +164 -0
- package/registry/blocks/agent-column/receipt.jsx +483 -0
- package/registry/blocks/agent-column/spreadsheet-type.jsx +24 -0
- package/registry/blocks/agent-dock/README.md +210 -0
- package/registry/blocks/agent-dock/agent-dock.jsx +356 -0
- package/registry/blocks/agent-dock/block.json +47 -0
- package/registry/blocks/agent-dock/demo.jsx +153 -0
- package/registry/blocks/agent-dock/dock-model.js +118 -0
- package/registry/blocks/agent-dock/index.js +5 -0
- package/registry/blocks/agent-kit/README.md +73 -0
- package/registry/blocks/agent-kit/agent-kit.jsx +86 -0
- package/registry/blocks/agent-kit/block.json +10 -0
- package/registry/blocks/agent-kit/demo.jsx +35 -0
- package/registry/blocks/agent-kit/index.js +3 -0
- package/registry/blocks/agent-marks/README.md +80 -0
- package/registry/blocks/agent-marks/agent-marks.jsx +133 -0
- package/registry/blocks/agent-marks/block.json +27 -0
- package/registry/blocks/agent-marks/demo.jsx +49 -0
- package/registry/blocks/agent-marks/index.js +3 -0
- package/registry/blocks/agent-pane/README.md +225 -0
- package/registry/blocks/agent-pane/agent-pane.jsx +244 -0
- package/registry/blocks/agent-pane/block.json +41 -0
- package/registry/blocks/agent-pane/composer.jsx +6 -0
- package/registry/blocks/agent-pane/demo.jsx +233 -0
- package/registry/blocks/agent-pane/dock-context.js +10 -0
- package/registry/blocks/agent-pane/index.js +4 -0
- package/registry/blocks/agent-pane/prose.jsx +84 -0
- package/registry/blocks/agent-pane/questions.jsx +134 -0
- package/registry/blocks/agent-pane/transcript.jsx +268 -0
- package/registry/blocks/agent-pane/work.jsx +368 -0
- package/registry/blocks/ai-action/README.md +94 -0
- package/registry/blocks/ai-action/ai-action.jsx +188 -0
- package/registry/blocks/ai-action/block.json +34 -0
- package/registry/blocks/ai-action/demo.jsx +93 -0
- package/registry/blocks/ai-action/index.js +3 -0
- package/registry/blocks/annotate/README.md +14 -11
- package/registry/blocks/approval/README.md +145 -0
- package/registry/blocks/approval/approval.jsx +163 -0
- package/registry/blocks/approval/block.json +31 -0
- package/registry/blocks/approval/demo.jsx +121 -0
- package/registry/blocks/approval/index.js +3 -0
- package/registry/blocks/ask-bar/README.md +105 -0
- package/registry/blocks/ask-bar/ask-bar.jsx +166 -0
- package/registry/blocks/ask-bar/block.json +26 -0
- package/registry/blocks/ask-bar/demo.jsx +78 -0
- package/registry/blocks/ask-bar/index.js +3 -0
- package/registry/blocks/automation-editor/README.md +291 -0
- package/registry/blocks/automation-editor/automation-editor.jsx +656 -0
- package/registry/blocks/automation-editor/block.json +39 -0
- package/registry/blocks/automation-editor/demo.jsx +284 -0
- package/registry/blocks/automation-editor/index.js +4 -0
- package/registry/blocks/automation-editor/run-inputs.jsx +82 -0
- package/registry/blocks/automation-list/README.md +129 -0
- package/registry/blocks/automation-list/automation-list.jsx +476 -0
- package/registry/blocks/automation-list/block.json +35 -0
- package/registry/blocks/automation-list/demo.jsx +67 -0
- package/registry/blocks/automation-list/index.js +3 -0
- package/registry/blocks/automation-model/README.md +109 -0
- package/registry/blocks/automation-model/block.json +135 -0
- package/registry/blocks/automation-model/catalog.js +256 -0
- package/registry/blocks/automation-model/check.js +161 -0
- package/registry/blocks/automation-model/demo.jsx +42 -0
- package/registry/blocks/automation-model/edit.js +262 -0
- package/registry/blocks/automation-model/fixes.js +287 -0
- package/registry/blocks/automation-model/glyph.jsx +13 -0
- package/registry/blocks/automation-model/graph.js +410 -0
- package/registry/blocks/automation-model/index.js +33 -0
- package/registry/blocks/automation-model/overlay.js +175 -0
- package/registry/blocks/automation-model/parts.jsx +94 -0
- package/registry/blocks/automation-model/schedule.js +53 -0
- package/registry/blocks/automation-model/templates.js +128 -0
- package/registry/blocks/automation-model/values.js +29 -0
- package/registry/blocks/automation-model/words.js +439 -0
- package/registry/blocks/automations-screen/README.md +207 -0
- package/registry/blocks/automations-screen/automations-screen.jsx +452 -0
- package/registry/blocks/automations-screen/block.json +47 -0
- package/registry/blocks/automations-screen/demo.jsx +364 -0
- package/registry/blocks/automations-screen/index.js +4 -0
- package/registry/blocks/automations-screen/screen-model.js +129 -0
- package/registry/blocks/chart/cartesian.jsx +1 -1
- package/registry/blocks/chart/core.jsx +33 -23
- package/registry/blocks/chart/pie.jsx +1 -1
- package/registry/blocks/chat/README.md +4 -1
- package/registry/blocks/chat/demo.jsx +2 -2
- package/registry/blocks/chat-pane/README.md +143 -0
- package/registry/blocks/chat-pane/block.json +48 -0
- package/registry/blocks/chat-pane/chat-attach.js +166 -0
- package/registry/blocks/chat-pane/chat-composer.jsx +195 -0
- package/registry/blocks/chat-pane/chat-context.js +17 -0
- package/registry/blocks/chat-pane/chat-model.js +43 -0
- package/registry/blocks/chat-pane/chat-pane.jsx +398 -0
- package/registry/blocks/chat-pane/chats-list.jsx +52 -0
- package/registry/blocks/chat-pane/demo.jsx +103 -0
- package/registry/blocks/chat-pane/index.js +9 -0
- package/registry/blocks/connect-card/README.md +99 -0
- package/registry/blocks/connect-card/block.json +10 -0
- package/registry/blocks/connect-card/connect-card.jsx +103 -0
- package/registry/blocks/connect-card/demo.jsx +49 -0
- package/registry/blocks/connect-card/index.js +3 -0
- package/registry/blocks/cost/README.md +115 -0
- package/registry/blocks/cost/block.json +10 -0
- package/registry/blocks/cost/cost.jsx +176 -0
- package/registry/blocks/cost/demo.jsx +66 -0
- package/registry/blocks/cost/index.js +3 -0
- package/registry/blocks/data-picker/README.md +81 -0
- package/registry/blocks/data-picker/block.json +38 -0
- package/registry/blocks/data-picker/data-picker.jsx +210 -0
- package/registry/blocks/data-picker/demo.jsx +34 -0
- package/registry/blocks/data-picker/fields.js +89 -0
- package/registry/blocks/data-picker/index.js +4 -0
- package/registry/blocks/data-table/demo.jsx +1 -1
- package/registry/blocks/first-run/README.md +118 -0
- package/registry/blocks/first-run/block.json +11 -0
- package/registry/blocks/first-run/demo.jsx +88 -0
- package/registry/blocks/first-run/first-run-model.js +51 -0
- package/registry/blocks/first-run/first-run.jsx +156 -0
- package/registry/blocks/first-run/index.js +5 -0
- package/registry/blocks/first-run/probe-rules.js +26 -0
- package/registry/blocks/fix-note/README.md +79 -0
- package/registry/blocks/fix-note/block.json +35 -0
- package/registry/blocks/fix-note/demo.jsx +30 -0
- package/registry/blocks/fix-note/fix-note.jsx +235 -0
- package/registry/blocks/fix-note/index.js +3 -0
- package/registry/blocks/flow-canvas/README.md +15 -8
- package/registry/blocks/flow-editor/README.md +108 -0
- package/registry/blocks/flow-editor/block.json +44 -0
- package/registry/blocks/flow-editor/demo.jsx +115 -0
- package/registry/blocks/flow-editor/flow-canvas.jsx +568 -0
- package/registry/blocks/flow-editor/flow-editor.jsx +154 -0
- package/registry/blocks/flow-editor/index.js +6 -0
- package/registry/blocks/flow-editor/minimap.jsx +78 -0
- package/registry/blocks/flow-editor/outline.jsx +134 -0
- package/registry/blocks/footer/README.md +3 -2
- package/registry/blocks/library-shelf/README.md +117 -0
- package/registry/blocks/library-shelf/block.json +28 -0
- package/registry/blocks/library-shelf/demo.jsx +68 -0
- package/registry/blocks/library-shelf/index.js +3 -0
- package/registry/blocks/library-shelf/library-shelf.jsx +211 -0
- package/registry/blocks/library-shelf/probe-rules.js +15 -0
- package/registry/blocks/margin-notes/README.md +222 -0
- package/registry/blocks/margin-notes/block.json +10 -0
- package/registry/blocks/margin-notes/demo.jsx +144 -0
- package/registry/blocks/margin-notes/index.js +20 -0
- package/registry/blocks/margin-notes/margin-model.js +224 -0
- package/registry/blocks/margin-notes/margin-notes.jsx +465 -0
- package/registry/blocks/mind-map/README.md +4 -2
- package/registry/blocks/needs-you/README.md +177 -0
- package/registry/blocks/needs-you/block.json +34 -0
- package/registry/blocks/needs-you/demo.jsx +143 -0
- package/registry/blocks/needs-you/index.js +3 -0
- package/registry/blocks/needs-you/needs-you.jsx +441 -0
- package/registry/blocks/org-chart/README.md +4 -2
- package/registry/blocks/pace-bar/README.md +230 -0
- package/registry/blocks/pace-bar/block.json +10 -0
- package/registry/blocks/pace-bar/demo.jsx +255 -0
- package/registry/blocks/pace-bar/index.js +22 -0
- package/registry/blocks/pace-bar/pace-bar.jsx +461 -0
- package/registry/blocks/pace-bar/pace-model.js +288 -0
- package/registry/blocks/page-builder/README.md +1 -1
- package/registry/blocks/page-builder/demo.jsx +3 -3
- package/registry/blocks/pdf-viewer/README.md +4 -1
- package/registry/blocks/record-grid/README.md +100 -0
- package/registry/blocks/record-grid/block.json +28 -0
- package/registry/blocks/record-grid/demo.jsx +43 -0
- package/registry/blocks/record-grid/index.js +3 -0
- package/registry/blocks/record-grid/record-grid.jsx +251 -0
- package/registry/blocks/run-history/README.md +138 -0
- package/registry/blocks/run-history/block.json +10 -0
- package/registry/blocks/run-history/demo.jsx +74 -0
- package/registry/blocks/run-history/index.js +3 -0
- package/registry/blocks/run-history/run-history.jsx +218 -0
- package/registry/blocks/run-view/README.md +174 -0
- package/registry/blocks/run-view/block.json +50 -0
- package/registry/blocks/run-view/demo.jsx +286 -0
- package/registry/blocks/run-view/index.js +5 -0
- package/registry/blocks/run-view/run-controls.jsx +266 -0
- package/registry/blocks/run-view/run-view.jsx +236 -0
- package/registry/blocks/run-view/runs-list.jsx +99 -0
- package/registry/blocks/schedule-card/README.md +121 -0
- package/registry/blocks/schedule-card/block.json +10 -0
- package/registry/blocks/schedule-card/demo.jsx +82 -0
- package/registry/blocks/schedule-card/index.js +3 -0
- package/registry/blocks/schedule-card/schedule-card.jsx +136 -0
- package/registry/blocks/schedule-engine/README.md +137 -0
- package/registry/blocks/schedule-engine/block.json +10 -0
- package/registry/blocks/schedule-engine/demo.jsx +82 -0
- package/registry/blocks/schedule-engine/engine.js +769 -0
- package/registry/blocks/schedule-engine/index.js +9 -0
- package/registry/blocks/schedule-engine/ops.js +71 -0
- package/registry/blocks/schedule-engine/place.js +294 -0
- package/registry/blocks/schedule-engine/tree.js +79 -0
- package/registry/blocks/schedule-engine/waits.js +80 -0
- package/registry/blocks/schedule-gantt/README.md +159 -0
- package/registry/blocks/schedule-gantt/block.json +10 -0
- package/registry/blocks/schedule-gantt/demo.jsx +223 -0
- package/registry/blocks/schedule-gantt/gantt-model.js +219 -0
- package/registry/blocks/schedule-gantt/geometry.js +176 -0
- package/registry/blocks/schedule-gantt/index.js +26 -0
- package/registry/blocks/schedule-gantt/schedule-gantt.jsx +882 -0
- package/registry/blocks/schedule-gantt/sheet.jsx +372 -0
- package/registry/blocks/schedule-gantt/track.jsx +190 -0
- package/registry/blocks/schedule-ruler/README.md +148 -0
- package/registry/blocks/schedule-ruler/block.json +10 -0
- package/registry/blocks/schedule-ruler/demo.jsx +181 -0
- package/registry/blocks/schedule-ruler/index.js +21 -0
- package/registry/blocks/schedule-ruler/ruler-model.js +239 -0
- package/registry/blocks/schedule-ruler/schedule-ruler.jsx +548 -0
- package/registry/blocks/sidebar/README.md +23 -13
- package/registry/blocks/sketch-canvas/README.md +15 -9
- package/registry/blocks/source-receipt/README.md +97 -0
- package/registry/blocks/source-receipt/block.json +30 -0
- package/registry/blocks/source-receipt/demo.jsx +71 -0
- package/registry/blocks/source-receipt/index.js +3 -0
- package/registry/blocks/source-receipt/source-receipt.jsx +107 -0
- package/registry/blocks/spreadsheet/spreadsheet.jsx +15 -1
- package/registry/blocks/step-picker/README.md +78 -0
- package/registry/blocks/step-picker/block.json +31 -0
- package/registry/blocks/step-picker/demo.jsx +23 -0
- package/registry/blocks/step-picker/index.js +3 -0
- package/registry/blocks/step-picker/step-picker.jsx +144 -0
- package/registry/blocks/step-settings/README.md +100 -0
- package/registry/blocks/step-settings/block.json +44 -0
- package/registry/blocks/step-settings/demo.jsx +93 -0
- package/registry/blocks/step-settings/fields.jsx +58 -0
- package/registry/blocks/step-settings/flow-settings.jsx +115 -0
- package/registry/blocks/step-settings/index.js +5 -0
- package/registry/blocks/step-settings/step-settings.jsx +290 -0
- package/registry/blocks/suggestion/README.md +171 -0
- package/registry/blocks/suggestion/block.json +40 -0
- package/registry/blocks/suggestion/demo.jsx +91 -0
- package/registry/blocks/suggestion/index.js +3 -0
- package/registry/blocks/suggestion/suggestion.jsx +436 -0
- package/registry/blocks/sum-bar/README.md +122 -0
- package/registry/blocks/sum-bar/block.json +10 -0
- package/registry/blocks/sum-bar/demo.jsx +110 -0
- package/registry/blocks/sum-bar/index.js +5 -0
- package/registry/blocks/sum-bar/sum-bar.jsx +209 -0
- package/registry/blocks/sum-bar/sum-model.js +126 -0
- package/registry/blocks/tier-map/README.md +217 -0
- package/registry/blocks/tier-map/block.json +10 -0
- package/registry/blocks/tier-map/demo.jsx +222 -0
- package/registry/blocks/tier-map/index.js +24 -0
- package/registry/blocks/tier-map/tier-map.jsx +574 -0
- package/registry/blocks/tier-map/tier-model.js +318 -0
- package/registry/blocks/time-grid/README.md +305 -0
- package/registry/blocks/time-grid/block.json +10 -0
- package/registry/blocks/time-grid/demo.jsx +279 -0
- package/registry/blocks/time-grid/grid-model.js +322 -0
- package/registry/blocks/time-grid/index.js +25 -0
- package/registry/blocks/time-grid/time-grid.jsx +1325 -0
- package/registry/blocks/time-strip/README.md +141 -0
- package/registry/blocks/time-strip/block.json +10 -0
- package/registry/blocks/time-strip/demo.jsx +129 -0
- package/registry/blocks/time-strip/index.js +19 -0
- package/registry/blocks/time-strip/strip-model.js +178 -0
- package/registry/blocks/time-strip/time-strip.jsx +260 -0
- package/registry/blocks/top-bar/README.md +149 -0
- package/registry/blocks/top-bar/block.json +35 -0
- package/registry/blocks/top-bar/demo.jsx +78 -0
- package/registry/blocks/top-bar/index.js +5 -0
- package/registry/blocks/top-bar/probe-rules.js +74 -0
- package/registry/blocks/top-bar/top-bar-model.js +152 -0
- package/registry/blocks/top-bar/top-bar.jsx +244 -0
- package/registry/blocks/trigger-picker/README.md +98 -0
- package/registry/blocks/trigger-picker/block.json +38 -0
- package/registry/blocks/trigger-picker/demo.jsx +59 -0
- package/registry/blocks/trigger-picker/index.js +3 -0
- package/registry/blocks/trigger-picker/trigger-picker.jsx +374 -0
- package/registry/blocks/whiteboard/README.md +20 -14
- package/registry/blocks/workflow-view/README.md +123 -0
- package/registry/blocks/workflow-view/block.json +10 -0
- package/registry/blocks/workflow-view/demo.jsx +90 -0
- package/registry/blocks/workflow-view/index.js +3 -0
- package/registry/blocks/workflow-view/workflow-view.jsx +203 -0
- package/src/cli.mjs +2 -2
- package/src/install.mjs +100 -22
- package/src/registry.mjs +37 -3
- package/templates/next/browser/lib/data.js +6 -1
- package/templates/next/files/README.md +909 -26
- package/templates/next/files/app/shell.jsx +54 -37
- package/templates/next/files/check/automation-format.ts +2103 -0
- package/templates/next/files/check/automation-package.ts +142 -0
- package/templates/next/files/check/run.mjs +1043 -12
- package/templates/next/files/components/ui/field.jsx +17 -4
- package/templates/next/files/components/ui/icon.jsx +13 -0
- package/templates/next/files/components/ui/index.js +3 -1
- package/templates/next/files/components/ui/layout.jsx +382 -0
- package/templates/next/files/components/ui/notice.jsx +70 -0
- package/templates/next/files/components/ui/page.jsx +124 -0
- package/templates/next/files/components/ui/stat.jsx +22 -7
- package/templates/next/files/components/ui/toast.jsx +6 -3
- package/templates/next/files/lib/automations.js +660 -0
- package/templates/next/files/lib/claw.js +244 -5
- package/templates/next/files/lib/door.js +92 -0
- package/templates/next/files/lib/hooks.js +1694 -6
- package/templates/next/files/lib/platform.js +611 -14
- package/templates/next/template.json +22 -3
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// A job's runs, the account of one, and the overview of them all. Props
|
|
4
|
+
// in, callbacks out; the block never reads runs itself and formats no
|
|
5
|
+
// time (each comes in as words). Tokens only. An outcome is a mark AND a
|
|
6
|
+
// word, so it is never told by colour alone. Its own width decides its
|
|
7
|
+
// layout (@container), never the viewport.
|
|
8
|
+
//
|
|
9
|
+
// RunHistory and RunAccount moved from the CRM (makersclaw-store
|
|
10
|
+
// packages/crm 0.7.0) into the template's kit (0.8.1, D15); RunOverview
|
|
11
|
+
// is new.
|
|
12
|
+
|
|
13
|
+
import { Icon, cx } from "../../ui";
|
|
14
|
+
|
|
15
|
+
const MARK = {
|
|
16
|
+
ok: { icon: "circle-check", tone: "text-success", word: "Completed" },
|
|
17
|
+
done: { icon: "circle-check", tone: "text-success", word: "Completed" },
|
|
18
|
+
complete: { icon: "circle-check", tone: "text-success", word: "Completed" },
|
|
19
|
+
failed: { icon: "circle-x", tone: "text-destructive", word: "Failed" },
|
|
20
|
+
running: { icon: "loader", tone: "text-info", word: "Running" },
|
|
21
|
+
needs_you: { icon: "circle-help", tone: "text-warning", word: "Needs you" },
|
|
22
|
+
stopped: { icon: "stop", tone: "text-muted-foreground", word: "Stopped" },
|
|
23
|
+
skipped: { icon: "minus", tone: "text-muted-foreground", word: "Skipped" },
|
|
24
|
+
};
|
|
25
|
+
const markOf = (s) => MARK[s] ?? MARK.skipped;
|
|
26
|
+
const spin = (s) => (s === "running" ? "animate-spin motion-reduce:animate-none" : null);
|
|
27
|
+
|
|
28
|
+
/** A count as the overview shows it: words as they come, a number with
|
|
29
|
+
* its thousands marked the same way on the server and in the browser. */
|
|
30
|
+
function countOf(value) {
|
|
31
|
+
if (typeof value === "number" && Number.isFinite(value)) return value.toLocaleString("en-US");
|
|
32
|
+
return value ?? "—";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The runs, newest first.
|
|
37
|
+
*
|
|
38
|
+
* runs [{ id, status, title, line, cost?, when? }]
|
|
39
|
+
* status: ok|done|failed|running|needs_you|stopped|skipped
|
|
40
|
+
* title: "Run #7 · Tue 29 Sep, 07:02 · Read now, by Owen"; line: what it did
|
|
41
|
+
* when: the muted words at its end ("yesterday", "2 min")
|
|
42
|
+
* selected the id shown in the account
|
|
43
|
+
* onSelect(run)
|
|
44
|
+
* empty what an empty history says
|
|
45
|
+
*/
|
|
46
|
+
export function RunHistory({ runs = [], selected, onSelect, label = "Runs", empty, className }) {
|
|
47
|
+
if (!runs.length) return <div className={cx("p-4 text-sm text-muted-foreground", className)}>{empty ?? "No runs yet."}</div>;
|
|
48
|
+
return (
|
|
49
|
+
<ul aria-label={label} className={cx("m-0 grid min-w-0 list-none p-0", className)}>
|
|
50
|
+
{runs.map((r) => {
|
|
51
|
+
const m = markOf(r.status);
|
|
52
|
+
const on = r.id === selected;
|
|
53
|
+
const tail = r.cost || r.when;
|
|
54
|
+
return (
|
|
55
|
+
<li key={r.id} className="min-w-0">
|
|
56
|
+
<button
|
|
57
|
+
type="button"
|
|
58
|
+
aria-current={on ? "true" : undefined}
|
|
59
|
+
onClick={() => onSelect?.(r)}
|
|
60
|
+
className={cx(
|
|
61
|
+
"grid w-full grid-cols-[16px_minmax(0,1fr)_auto] items-start gap-2.5 border-b border-border px-3.5 py-2.5 text-left text-[13px] outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
62
|
+
on ? "bg-accent text-accent-foreground" : "hover:bg-muted",
|
|
63
|
+
)}
|
|
64
|
+
>
|
|
65
|
+
<Icon name={m.icon} size={16} className={cx("mt-0.5", m.tone, spin(r.status))} label={m.word} />
|
|
66
|
+
<span className="grid min-w-0 gap-0.5">
|
|
67
|
+
<span className={cx("truncate", on && "font-semibold")}>{r.title}</span>
|
|
68
|
+
{r.line ? (
|
|
69
|
+
<span className={cx("truncate text-xs", r.status === "failed" ? "text-destructive" : on ? "" : "text-muted-foreground")}>{r.line}</span>
|
|
70
|
+
) : null}
|
|
71
|
+
</span>
|
|
72
|
+
{tail ? (
|
|
73
|
+
<span className={cx("grid justify-items-end gap-0.5 whitespace-nowrap text-xs tabular-nums", on ? "" : "text-muted-foreground")}>
|
|
74
|
+
{r.when ? <span>{r.when}</span> : null}
|
|
75
|
+
{r.cost ? <span>{r.cost}</span> : null}
|
|
76
|
+
</span>
|
|
77
|
+
) : null}
|
|
78
|
+
</button>
|
|
79
|
+
</li>
|
|
80
|
+
);
|
|
81
|
+
})}
|
|
82
|
+
</ul>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function StepsStrip({ steps }) {
|
|
87
|
+
return (
|
|
88
|
+
<ol aria-label="Steps" className="m-0 flex list-none flex-wrap items-center gap-y-2 p-0">
|
|
89
|
+
{steps.map((s, i) => {
|
|
90
|
+
const m = markOf(s.status);
|
|
91
|
+
return (
|
|
92
|
+
<li key={`${s.label}-${i}`} className="flex min-w-0 items-center">
|
|
93
|
+
{i ? <span aria-hidden="true" className="h-px w-4 shrink-0 bg-border" /> : null}
|
|
94
|
+
<span className="grid min-w-0 max-w-full gap-0.5 rounded-[var(--radius)] border border-border bg-card px-2.5 py-2 text-card-foreground @xs:min-w-[150px]">
|
|
95
|
+
<b className="truncate text-xs font-semibold">{s.label}</b>
|
|
96
|
+
<span className={cx("flex items-center gap-1 text-[11.5px]", m.tone)}>
|
|
97
|
+
<Icon name={m.icon} size={12} className={spin(s.status)} />
|
|
98
|
+
{m.word}
|
|
99
|
+
{s.count ? <span>· {s.count}</span> : null}
|
|
100
|
+
</span>
|
|
101
|
+
</span>
|
|
102
|
+
</li>
|
|
103
|
+
);
|
|
104
|
+
})}
|
|
105
|
+
</ol>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const BAR = { neutral: "bg-muted-foreground", danger: "bg-destructive", info: "bg-info" };
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* One run's account.
|
|
113
|
+
*
|
|
114
|
+
* title "Tue 29 Sep, 07:02"
|
|
115
|
+
* sub the muted line beside it (what it read, the cost, the next run)
|
|
116
|
+
* steps [{ label, status: complete|done|failed|skipped|running, count? }]
|
|
117
|
+
* figures [{ label, value, note?, noteTone?: "success"|"danger", progress?: 0..1, progressTone? }]
|
|
118
|
+
* lines [{ label, text }]: the account, one line a heading
|
|
119
|
+
* empty a node when the run says nothing yet (running)
|
|
120
|
+
*/
|
|
121
|
+
export function RunAccount({ title, sub, steps = [], figures = [], lines = [], empty, className }) {
|
|
122
|
+
return (
|
|
123
|
+
<div className={cx("@container flex min-h-0 min-w-0 flex-col", className)}>
|
|
124
|
+
{steps.length ? (
|
|
125
|
+
<div className="shrink-0 border-b border-border px-4 py-4 @md:px-[18px]">
|
|
126
|
+
<StepsStrip steps={steps} />
|
|
127
|
+
</div>
|
|
128
|
+
) : null}
|
|
129
|
+
<div className="grid content-start gap-3.5 px-4 py-4 @md:px-5">
|
|
130
|
+
{figures.length ? (
|
|
131
|
+
<div className="grid grid-cols-1 gap-2.5 @2xs:grid-cols-2 @2xl:grid-cols-4">
|
|
132
|
+
{figures.map((f) => (
|
|
133
|
+
<div key={f.label} className="grid min-w-0 gap-0.5 rounded-[var(--radius)] border border-border bg-card px-3 py-2.5 text-card-foreground">
|
|
134
|
+
<span className="truncate text-xs text-muted-foreground">{f.label}</span>
|
|
135
|
+
<span className="truncate text-[22px] font-semibold leading-tight tabular-nums">{f.value}</span>
|
|
136
|
+
{f.progress != null ? (
|
|
137
|
+
<span aria-hidden="true" className="mt-1 block h-1 overflow-hidden rounded-sm bg-border">
|
|
138
|
+
<span className={cx("block h-full", BAR[f.progressTone] ?? BAR.neutral)} style={{ width: `${Math.max(0, Math.min(1, f.progress)) * 100}%` }} />
|
|
139
|
+
</span>
|
|
140
|
+
) : null}
|
|
141
|
+
{f.note ? <span className={cx("text-xs", f.noteTone === "success" ? "text-success" : f.noteTone === "danger" ? "text-destructive" : "text-muted-foreground")}>{f.note}</span> : null}
|
|
142
|
+
</div>
|
|
143
|
+
))}
|
|
144
|
+
</div>
|
|
145
|
+
) : null}
|
|
146
|
+
<div className="grid gap-0">
|
|
147
|
+
{title ? (
|
|
148
|
+
<div className="mb-1 flex flex-wrap items-baseline gap-x-2.5">
|
|
149
|
+
<b className="text-sm font-semibold">{title}</b>
|
|
150
|
+
{sub ? <span className="text-[13px] text-muted-foreground">{sub}</span> : null}
|
|
151
|
+
</div>
|
|
152
|
+
) : null}
|
|
153
|
+
{lines.length ? (
|
|
154
|
+
<dl className="m-0 grid text-[13px]">
|
|
155
|
+
{lines.map((l, i) => (
|
|
156
|
+
<div key={`${l.label}-${i}`} className="grid grid-cols-1 gap-0.5 border-b border-border py-2 last:border-b-0 @sm:grid-cols-[120px_minmax(0,1fr)] @sm:gap-3">
|
|
157
|
+
<dt className="text-muted-foreground">{l.label}</dt>
|
|
158
|
+
<dd className="m-0 min-w-0">{l.text}</dd>
|
|
159
|
+
</div>
|
|
160
|
+
))}
|
|
161
|
+
</dl>
|
|
162
|
+
) : (
|
|
163
|
+
empty ?? null
|
|
164
|
+
)}
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** One tile of the overview: a mark and a word, never a colour alone. */
|
|
172
|
+
function Tile({ value, word, icon, tone, spinning, className, children }) {
|
|
173
|
+
return (
|
|
174
|
+
<div className={cx("grid min-w-0 gap-0.5 rounded-[var(--radius)] border border-border bg-card px-3 py-2.5 text-card-foreground", className)}>
|
|
175
|
+
<div className="flex min-w-0 items-start gap-2">
|
|
176
|
+
<span className="min-w-0 flex-1 truncate text-lg font-semibold leading-tight tabular-nums">{value}</span>
|
|
177
|
+
{icon ? <Icon name={icon} size={14} className={cx("mt-1 shrink-0", tone, spinning && "animate-spin motion-reduce:animate-none")} /> : null}
|
|
178
|
+
</div>
|
|
179
|
+
<span className={cx("truncate text-xs", tone ?? "text-muted-foreground")}>{word}</span>
|
|
180
|
+
{children}
|
|
181
|
+
</div>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The overview of a job's runs: completed, failed, in progress, the
|
|
187
|
+
* average run time, and the credits used against the week's cap.
|
|
188
|
+
*
|
|
189
|
+
* completed, failed, running counts (numbers, or words)
|
|
190
|
+
* avg the average run time, in words ("2 seconds")
|
|
191
|
+
* credits { used, of, words: "7 of 37,000 this week" }
|
|
192
|
+
* title the heading (default "Overview"); null for none
|
|
193
|
+
*/
|
|
194
|
+
export function RunOverview({ completed, failed, running, avg, credits, title = "Overview", className }) {
|
|
195
|
+
const pct = credits && typeof credits.used === "number" && credits.of > 0 ? Math.max(0, Math.min(1, credits.used / credits.of)) : null;
|
|
196
|
+
const full = pct != null && pct >= 1;
|
|
197
|
+
return (
|
|
198
|
+
<section aria-label={title ?? "Overview"} className={cx("@container grid min-w-0 gap-2", className)}>
|
|
199
|
+
{title ? <h3 className="m-0 text-xs font-medium text-muted-foreground">{title}</h3> : null}
|
|
200
|
+
<div className="grid grid-cols-1 gap-2 @2xs:grid-cols-2">
|
|
201
|
+
<Tile value={countOf(completed ?? 0)} word="Completed" icon="circle-check" tone="text-success" />
|
|
202
|
+
<Tile value={countOf(failed ?? 0)} word="Failed" icon="circle-x" tone={failed ? "text-destructive" : "text-muted-foreground"} />
|
|
203
|
+
<Tile value={countOf(running ?? 0)} word="In progress" icon="loader" tone={running ? "text-info" : "text-muted-foreground"} spinning={Boolean(running)} />
|
|
204
|
+
<Tile value={avg ?? "—"} word="Average run time" icon="clock" />
|
|
205
|
+
{credits ? (
|
|
206
|
+
<Tile value={countOf(credits.used)} word="Credits used" icon="zap" tone={full ? "text-destructive" : undefined} className="@2xs:col-span-2">
|
|
207
|
+
{credits.words ? <span className={cx("text-xs tabular-nums", full ? "text-destructive" : "text-muted-foreground")}>{credits.words}</span> : null}
|
|
208
|
+
{pct != null ? (
|
|
209
|
+
<span aria-hidden="true" className="mt-1 block h-1 overflow-hidden rounded-sm bg-border">
|
|
210
|
+
<span className={cx("block h-full", full ? "bg-destructive" : "bg-muted-foreground")} style={{ width: `${pct * 100}%` }} />
|
|
211
|
+
</span>
|
|
212
|
+
) : null}
|
|
213
|
+
</Tile>
|
|
214
|
+
) : null}
|
|
215
|
+
</div>
|
|
216
|
+
</section>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# RunView
|
|
2
|
+
|
|
3
|
+
What an automation did, on the same canvas as the builder.
|
|
4
|
+
|
|
5
|
+
- **Every card wears how it went** — done, running, failed, waiting,
|
|
6
|
+
skipped, fixed by the agent, or not reached — as a mark and a word, never
|
|
7
|
+
colour alone. A looped step says how many times; a failed one says why,
|
|
8
|
+
in plain words.
|
|
9
|
+
- **The path taken is lit** and the paths not taken are dimmed, so a run
|
|
10
|
+
reads as one route through the flow. A condition shows which way it went
|
|
11
|
+
(from its own output when the member may read it, else from what ran).
|
|
12
|
+
- **The side panel** gives the run in a few lines: who started it, how
|
|
13
|
+
long, what it cost of what it may, the version; a note when it waits or
|
|
14
|
+
stopped and why; a "The agent fixed N steps" list; the report it left.
|
|
15
|
+
Press a card and it becomes that step's account: how it went, what went
|
|
16
|
+
in and what came out (for those who may read it), the agent's fix with
|
|
17
|
+
before and after.
|
|
18
|
+
- **Controls for a run that is not over** (`RunControls`, drawn in the panel
|
|
19
|
+
when you pass `onControl`). Only what the run's state allows:
|
|
20
|
+
*running* — Pause, Stop; *paused* — Resume, Stop; *waiting on its
|
|
21
|
+
owner* — Resume, Stop, and for the step that is stuck: Try this step
|
|
22
|
+
again, Skip this step, Change its data (for this run only; for those who
|
|
23
|
+
may read the step); *held at the run's own limit* — Raise its limit (adds
|
|
24
|
+
credits to this run and goes on; the automation's limit stays). A step
|
|
25
|
+
cut off in a send is said as unknown: "It did not go: send it again" or "It
|
|
26
|
+
did go: skip it", never repeated on a guess. A refusal is shown in the
|
|
27
|
+
platform's words. Stop asks first.
|
|
28
|
+
- **A test run** (`detail.run.dry`: it read real data and changed
|
|
29
|
+
nothing). A strip over the canvas says how it went in one line (`testWords`:
|
|
30
|
+
"Test passed: nothing was sent or changed. 3 steps would have run."), then
|
|
31
|
+
what the steps would have done (the platform's `run.result.dry.would`:
|
|
32
|
+
"Would send with send_email."), a note for steps that could not be checked
|
|
33
|
+
(they need what an earlier step would have made) and for loops it only
|
|
34
|
+
sampled ("Looked at the first 5 of 38"). The chip reads Test passed, Test
|
|
35
|
+
failed or Test stopped; a step that stood in for itself is a dashed card
|
|
36
|
+
with a pencil (the state `would`). A real run draws as before.
|
|
37
|
+
- **Retry from this step** (`RetryFromStep`, drawn in a step's panel when
|
|
38
|
+
you pass `onControl`). A quiet button on a step that ran, in a run that is
|
|
39
|
+
over (done, failed, stopped) or waiting on its owner; not in one that is
|
|
40
|
+
going or paused. It runs that step and every step after it again; the
|
|
41
|
+
steps before keep what they made. A step inside a loop or a branch
|
|
42
|
+
starts over from the one that holds it, and the panel says so. If a step
|
|
43
|
+
from there on already sent something, it asks first, in its own words
|
|
44
|
+
("It already sent something. Run it again from here?"), and only then
|
|
45
|
+
sends again. A refusal is shown in the platform's words.
|
|
46
|
+
- **The agent's fix** on a card and in its panel: what changed, what it
|
|
47
|
+
cost, whether a write can be taken back (a send cannot), and the change
|
|
48
|
+
the agent drafted for next time, to **keep** (a new version that runs) or
|
|
49
|
+
**drop**. A person's own edit of a run's data reads "You changed its data"
|
|
50
|
+
and is not marked as the agent's.
|
|
51
|
+
- **RunsList** — the automation's runs, newest first, with a little
|
|
52
|
+
overview (done, failed, in progress, spent), a filter, and for each run:
|
|
53
|
+
what started it, when (in the automation's zone), how it ended, how long
|
|
54
|
+
and what it cost.
|
|
55
|
+
|
|
56
|
+
```jsx
|
|
57
|
+
import { RunView, RunsList } from "../components/blocks/run-view"; // a Makersclaw app
|
|
58
|
+
import { RunView, RunsList } from "@/components/makersclaw/blocks/run-view"; // a shadcn project
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`makersclaw add run-view` lays `flow-editor`, `step-settings`, `fix-note`
|
|
62
|
+
and `automation-model` with it. Client components. Read-only: nothing here
|
|
63
|
+
changes the flow. Its own width decides its layout: the panel sits beside
|
|
64
|
+
the canvas from about 768 px and under it below.
|
|
65
|
+
|
|
66
|
+
## Props
|
|
67
|
+
|
|
68
|
+
### RunView
|
|
69
|
+
|
|
70
|
+
- `def` — the definition the run used. Pass `useAutomationRun().definition`
|
|
71
|
+
(the platform pins it) and, when it is null, the live or draft one with a
|
|
72
|
+
`versionNote` ("This run used version 3. The steps drawn are the current
|
|
73
|
+
ones.").
|
|
74
|
+
- `detail` — the run's account: `{ run, steps, steps_visible }`
|
|
75
|
+
(`useAutomationRun().detail`). `run` carries `status`, `version`,
|
|
76
|
+
`trigger_type`, `is_test`, `credits`, `cap_credits`, `result`, `error`,
|
|
77
|
+
`wake_at`. A step: `{ path, step_id, attempt, status, credits, error,
|
|
78
|
+
input?, output?, fix? }`.
|
|
79
|
+
- `runs` — the automation's runs, newest first, for the picker and the
|
|
80
|
+
run's number. `tz` — the automation's time zone.
|
|
81
|
+
- `apps`, `actions`, `ownedByApp` — as the builder's, for the read-only
|
|
82
|
+
step panel.
|
|
83
|
+
- `name`, `onBack`, `tabs`, `onPickRun(runId)`.
|
|
84
|
+
- `onRunAgain()`, `runAgainBusy` — Run again (it spends: say so on the
|
|
85
|
+
control where you can). For a test run the button reads "Test again".
|
|
86
|
+
- `onControl(op, { path?, input?, confirmNotSent?, raiseBy?, confirmResend? })`
|
|
87
|
+
— `op` is `pause` · `resume` · `stop` · `retry` · `skip` · `edit` ·
|
|
88
|
+
`retry_from` (the step's panel: `path` is the top-level step to start
|
|
89
|
+
over from, `confirmResend` says sending again is right); resolves
|
|
90
|
+
`{ ok }` or `{ ok: false, error, code }` (`useAutomationRun().control`).
|
|
91
|
+
Without it the panel only says a parked run waits for its owner.
|
|
92
|
+
`controlBusy` is the op that is out.
|
|
93
|
+
- `onKeepFix(stepId)`, `onDropFix(stepId)` — keep or drop the change the
|
|
94
|
+
agent drafted for a step it fixed (`useAutomationRun().keepFix` and
|
|
95
|
+
`dropFix`). A fix with no draft has no button. `onUndoFix(stepId)` takes
|
|
96
|
+
back a write.
|
|
97
|
+
- `detail.fixes` — the fixer's attempts and the changes it drafted
|
|
98
|
+
(`useAutomationRun().detail` carries them).
|
|
99
|
+
|
|
100
|
+
### RunControls
|
|
101
|
+
|
|
102
|
+
The controls alone: `run`, `steps`, `stepsVisible`, `titleOf(stepId)`,
|
|
103
|
+
`onControl`, `busy`. Draws nothing for a run that is over, or without
|
|
104
|
+
`onControl`.
|
|
105
|
+
|
|
106
|
+
### RetryFromStep
|
|
107
|
+
|
|
108
|
+
The button alone: `run`, `steps`, `def`, `stepId`, `onControl`, `busy`.
|
|
109
|
+
Draws nothing for a step that did not run, a run that is going or paused,
|
|
110
|
+
or without `onControl`. The rules are `retryFromOf(run, rows, def, stepId)`
|
|
111
|
+
in automation-model (`{ show, path, inLoop, loopTitle, sent }`).
|
|
112
|
+
|
|
113
|
+
### RunsList
|
|
114
|
+
|
|
115
|
+
- `runs`, `tz`, `onOpen(runId)`, `howToTest` (the words under "It has not
|
|
116
|
+
run yet").
|
|
117
|
+
|
|
118
|
+
## Hooks (lib/hooks.js)
|
|
119
|
+
|
|
120
|
+
`useAutomationRun(runId)` → `{ run, steps, stepsVisible, automation,
|
|
121
|
+
definition, fixes, detail, control, keepFix, dropFix, busy, loading, error,
|
|
122
|
+
unavailable, reload }`. Looks every 2.5 s while the run goes; a run that
|
|
123
|
+
has ended is read once. `control(op, opts)` (`opts.confirmResend` is sent as `confirm_resend`) and
|
|
124
|
+
`keepFix(stepId)` resolve
|
|
125
|
+
the platform's answer (a refusal is `{ ok: false, error, code }`, never
|
|
126
|
+
thrown) and read the run again.
|
|
127
|
+
`useAutomation(id).runs` is the list.
|
|
128
|
+
|
|
129
|
+
## Never
|
|
130
|
+
|
|
131
|
+
- Never an Approve in a run: an automation has none. A run waiting on its
|
|
132
|
+
owner says so; the owner answers on the desk. Resume, retry and skip are
|
|
133
|
+
not approvals: they are the owner's controls on a stuck run.
|
|
134
|
+
- Never a Retry for a send that may have gone, without asking whether it did.
|
|
135
|
+
- Never "Retry from this step" that sends again without asking first.
|
|
136
|
+
- Never a state by colour alone.
|
|
137
|
+
- Never a step's data to someone who may not read it: pass
|
|
138
|
+
`steps_visible` as the platform sent it.
|
|
139
|
+
|
|
140
|
+
## Example
|
|
141
|
+
|
|
142
|
+
```jsx
|
|
143
|
+
"use client";
|
|
144
|
+
import { useRouter, useSearchParams } from "next/navigation";
|
|
145
|
+
import { useAutomation, useAutomationRun } from "../lib/hooks";
|
|
146
|
+
import { RunView } from "../components/blocks/run-view";
|
|
147
|
+
|
|
148
|
+
export default function RunPage() {
|
|
149
|
+
const router = useRouter();
|
|
150
|
+
const q = useSearchParams();
|
|
151
|
+
const id = q.get("automation");
|
|
152
|
+
const a = useAutomation(id);
|
|
153
|
+
const r = useAutomationRun(q.get("run"));
|
|
154
|
+
if (!a.definition || !r.detail) return <p className="p-4 text-sm text-muted-foreground">Opening the run…</p>;
|
|
155
|
+
return (
|
|
156
|
+
<div className="flex h-[640px] flex-col">
|
|
157
|
+
<RunView
|
|
158
|
+
def={r.definition ?? a.definition}
|
|
159
|
+
versionNote={r.definition ? null : `This run used version ${r.run.version}. The steps drawn are the current ones.`}
|
|
160
|
+
detail={r.detail}
|
|
161
|
+
runs={a.runs}
|
|
162
|
+
tz={a.automation.tz}
|
|
163
|
+
name={a.automation.name}
|
|
164
|
+
onBack={() => router.push(`?automation=${id}`)}
|
|
165
|
+
onPickRun={(run) => router.push(`?automation=${id}&run=${run}`)}
|
|
166
|
+
onControl={r.control}
|
|
167
|
+
controlBusy={r.busy}
|
|
168
|
+
onKeepFix={r.keepFix}
|
|
169
|
+
onDropFix={r.dropFix}
|
|
170
|
+
/>
|
|
171
|
+
</div>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "run-view",
|
|
3
|
+
"title": "RunView",
|
|
4
|
+
"description": "One run of an automation on the same canvas as the builder: every card wears how it went, the path the run took is lit and the paths it did not take are dimmed, a looped step says how many times, a failed step says why, and a step the agent fixed says so on its card and in its panel. A side panel gives the run in a few lines (who started it, how long, what it cost of what it may, the version) and, for a card pressed, how that step went and what went in and out for those who may read it. RunsList is the automation's runs, newest first, with an overview (done, failed, in progress, spent) and a filter. For a run that is not over it offers what the run allows (RunControls): pause, resume, stop; when it is stuck on a step, try it again, skip it, change the data it was given for this run, or raise the run's limit and go on. On a step of a run that is over (done, failed, stopped) or waiting on its owner, a quiet \"Retry from this step\" starts the run over there, asking first when a step from there on already sent something. A step the agent fixed shows what changed, what it cost, whether a write can be taken back, and keeps or drops the change the agent drafted for next time. A test run (a dry run) draws a strip over the canvas, with what each step would have done and what could not be checked, and its steps as dashed pencil cards.",
|
|
5
|
+
"useWhen": "A member looks at what an automation did: the page behind a run row, and the Runs tab beside the builder. Fed by useAutomationRun and useAutomation (lib/hooks.js). For a job's run drawn top to bottom in the older kit use workflow-view.",
|
|
6
|
+
"tags": [
|
|
7
|
+
"automation",
|
|
8
|
+
"workflow",
|
|
9
|
+
"run",
|
|
10
|
+
"history",
|
|
11
|
+
"runs",
|
|
12
|
+
"trace",
|
|
13
|
+
"execution",
|
|
14
|
+
"steps",
|
|
15
|
+
"path taken",
|
|
16
|
+
"failed",
|
|
17
|
+
"fixed",
|
|
18
|
+
"retry",
|
|
19
|
+
"overview",
|
|
20
|
+
"n8n",
|
|
21
|
+
"make",
|
|
22
|
+
"pause",
|
|
23
|
+
"resume",
|
|
24
|
+
"stop",
|
|
25
|
+
"skip",
|
|
26
|
+
"retry",
|
|
27
|
+
"control",
|
|
28
|
+
"retry from this step",
|
|
29
|
+
"start over",
|
|
30
|
+
"re-run"
|
|
31
|
+
],
|
|
32
|
+
"exports": [
|
|
33
|
+
"RunView",
|
|
34
|
+
"RunsList",
|
|
35
|
+
"RunControls",
|
|
36
|
+
"RetryFromStep"
|
|
37
|
+
],
|
|
38
|
+
"files": [
|
|
39
|
+
"index.js",
|
|
40
|
+
"run-view.jsx",
|
|
41
|
+
"runs-list.jsx",
|
|
42
|
+
"run-controls.jsx"
|
|
43
|
+
],
|
|
44
|
+
"requires": [
|
|
45
|
+
"automation-model",
|
|
46
|
+
"flow-editor",
|
|
47
|
+
"step-settings",
|
|
48
|
+
"fix-note"
|
|
49
|
+
]
|
|
50
|
+
}
|