@flowdrop/flowdrop 2.16.0 → 2.18.0

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 (130) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/README.md +6 -1
  3. package/dist/api/enhanced-client.d.ts +3 -1
  4. package/dist/api/enhanced-client.js +4 -2
  5. package/dist/commands/executor.js +9 -0
  6. package/dist/commands/storeIntegration.svelte.js +6 -0
  7. package/dist/commands/types.d.ts +8 -0
  8. package/dist/components/App.svelte +414 -105
  9. package/dist/components/App.svelte.d.ts +31 -0
  10. package/dist/components/CanvasToolbar.svelte +40 -3
  11. package/dist/components/CanvasToolbar.svelte.d.ts +5 -1
  12. package/dist/components/ConnectPortPicker.svelte +8 -4
  13. package/dist/components/DoctorMenu.svelte +208 -126
  14. package/dist/components/FlowDropZone.svelte +7 -1
  15. package/dist/components/FlowDropZone.svelte.d.ts +5 -0
  16. package/dist/components/ImpactConfirm.svelte +554 -0
  17. package/dist/components/ImpactConfirm.svelte.d.ts +22 -0
  18. package/dist/components/Input.svelte +8 -2
  19. package/dist/components/LockBanner.svelte +76 -0
  20. package/dist/components/LockBanner.svelte.d.ts +14 -0
  21. package/dist/components/LockFence.svelte +33 -0
  22. package/dist/components/LockFence.svelte.d.ts +19 -0
  23. package/dist/components/Navbar.svelte +77 -9
  24. package/dist/components/Navbar.svelte.d.ts +10 -0
  25. package/dist/components/NodeSidebar.svelte +36 -15
  26. package/dist/components/NodeSidebar.svelte.d.ts +2 -0
  27. package/dist/components/NodeSwapPicker.svelte +4 -14
  28. package/dist/components/RunBar.svelte +50 -3
  29. package/dist/components/RunBar.svelte.d.ts +5 -0
  30. package/dist/components/RunInputsDialog.svelte +198 -0
  31. package/dist/components/RunInputsDialog.svelte.d.ts +34 -0
  32. package/dist/components/Textarea.svelte +7 -1
  33. package/dist/components/WorkflowCompareDialog.svelte +177 -0
  34. package/dist/components/WorkflowCompareDialog.svelte.d.ts +10 -0
  35. package/dist/components/WorkflowEditor.svelte +120 -15
  36. package/dist/components/WorkflowEditor.svelte.d.ts +6 -0
  37. package/dist/components/WorkflowInterfaceEditor.svelte +17 -4
  38. package/dist/components/WorkflowInterfaceEntryCard.svelte +40 -7
  39. package/dist/components/WorkflowInterfaceEntryCard.svelte.d.ts +2 -0
  40. package/dist/components/WorkflowPlaygroundSettings.svelte +9 -1
  41. package/dist/components/form/FieldFactory.svelte +13 -6
  42. package/dist/components/form/FormArray.svelte +0 -1
  43. package/dist/components/form/FormArrayRows.svelte +4 -4
  44. package/dist/components/form/FormCodeEditor.svelte +18 -2
  45. package/dist/components/form/FormMarkdownEditor.svelte +22 -8
  46. package/dist/components/form/FormTemplateEditor.svelte +17 -1
  47. package/dist/components/form/readOnly.d.ts +13 -0
  48. package/dist/components/form/readOnly.js +18 -0
  49. package/dist/components/nodes/CaptionNode.svelte +1 -0
  50. package/dist/components/nodes/NodeCard.svelte +2 -2
  51. package/dist/components/primitives/Checkbox.svelte +5 -1
  52. package/dist/components/primitives/Select.svelte +6 -1
  53. package/dist/components/primitives/Switch.svelte +5 -1
  54. package/dist/components/toast/DismissibleToast.svelte +25 -6
  55. package/dist/components/toast/DismissibleToast.svelte.d.ts +3 -0
  56. package/dist/config/endpoints.d.ts +7 -0
  57. package/dist/config/endpoints.js +2 -1
  58. package/dist/editor/connectCandidates.d.ts +3 -0
  59. package/dist/editor/connectCandidates.js +14 -5
  60. package/dist/editor/index.d.ts +2 -1
  61. package/dist/editor/index.js +1 -1
  62. package/dist/helpers/workflowEditorHelper.d.ts +15 -0
  63. package/dist/helpers/workflowEditorHelper.js +9 -0
  64. package/dist/index.d.ts +2 -0
  65. package/dist/messages/defaults.d.ts +145 -0
  66. package/dist/messages/defaults.js +139 -1
  67. package/dist/openapi/v1/openapi.yaml +492 -0
  68. package/dist/registry/nodeComponentRegistry.d.ts +5 -0
  69. package/dist/schemas/v1/workflow.schema.json +2 -0
  70. package/dist/services/draftStorage.d.ts +24 -10
  71. package/dist/services/draftStorage.js +60 -35
  72. package/dist/services/globalSave.d.ts +45 -10
  73. package/dist/services/globalSave.js +296 -32
  74. package/dist/services/impactGate.d.ts +38 -0
  75. package/dist/services/impactGate.js +72 -0
  76. package/dist/services/impactService.d.ts +45 -0
  77. package/dist/services/impactService.js +157 -0
  78. package/dist/services/runsService.d.ts +9 -0
  79. package/dist/services/runsService.js +13 -0
  80. package/dist/services/toastQueue.d.ts +9 -0
  81. package/dist/services/toastService.d.ts +4 -0
  82. package/dist/services/toastService.js +9 -3
  83. package/dist/services/workflowLaunchService.d.ts +6 -0
  84. package/dist/services/workflowLaunchService.js +5 -1
  85. package/dist/settings/index.d.ts +2 -2
  86. package/dist/settings/index.js +1 -1
  87. package/dist/stores/doctorStore.svelte.d.ts +24 -1
  88. package/dist/stores/doctorStore.svelte.js +105 -2
  89. package/dist/stores/historyStore.svelte.d.ts +12 -2
  90. package/dist/stores/historyStore.svelte.js +25 -2
  91. package/dist/stores/instanceContainer.svelte.d.ts +23 -0
  92. package/dist/stores/instanceContainer.svelte.js +32 -2
  93. package/dist/stores/lockStore.svelte.d.ts +39 -0
  94. package/dist/stores/lockStore.svelte.js +109 -0
  95. package/dist/stores/runController.svelte.d.ts +2 -0
  96. package/dist/stores/runController.svelte.js +27 -11
  97. package/dist/stores/saveConflictStore.svelte.d.ts +62 -0
  98. package/dist/stores/saveConflictStore.svelte.js +169 -0
  99. package/dist/stores/workflowStore.svelte.d.ts +14 -4
  100. package/dist/stores/workflowStore.svelte.js +55 -18
  101. package/dist/styles/base.css +6 -0
  102. package/dist/styles/toast.css +10 -1
  103. package/dist/svelte-app.d.ts +33 -0
  104. package/dist/svelte-app.js +178 -22
  105. package/dist/types/doctor.d.ts +3 -1
  106. package/dist/types/events.d.ts +37 -0
  107. package/dist/types/events.js +2 -0
  108. package/dist/types/impact.d.ts +77 -0
  109. package/dist/types/impact.js +7 -0
  110. package/dist/types/lock.d.ts +35 -0
  111. package/dist/types/lock.js +13 -0
  112. package/dist/types/navbar.d.ts +6 -0
  113. package/dist/types/settings.d.ts +31 -0
  114. package/dist/types/settings.js +132 -0
  115. package/dist/utils/draftRestore.d.ts +27 -0
  116. package/dist/utils/draftRestore.js +36 -0
  117. package/dist/utils/interfaceTags.js +4 -1
  118. package/dist/utils/links.d.ts +29 -0
  119. package/dist/utils/links.js +63 -0
  120. package/dist/utils/nodeSearch.d.ts +10 -0
  121. package/dist/utils/nodeSearch.js +37 -0
  122. package/dist/utils/runOffer.d.ts +21 -0
  123. package/dist/utils/runOffer.js +13 -0
  124. package/dist/utils/workflowCompare.d.ts +35 -0
  125. package/dist/utils/workflowCompare.js +84 -0
  126. package/dist/utils/workflowInterface.d.ts +26 -1
  127. package/dist/utils/workflowInterface.js +91 -11
  128. package/dist/webmcp/runtime.js +16 -3
  129. package/dist/webmcp/types.d.ts +11 -1
  130. package/package.json +3 -2
@@ -272,6 +272,7 @@ export declare const defaultMessages: {
272
272
  readonly tagline: "Visual Workflow Manager";
273
273
  readonly breadcrumbAriaLabel: "Breadcrumb";
274
274
  readonly connected: "Connected";
275
+ readonly unsavedChanges: "Unsaved changes";
275
276
  readonly settingsTitle: "Settings";
276
277
  readonly settingsAriaLabel: "Open settings";
277
278
  readonly appearance: {
@@ -436,9 +437,29 @@ export declare const defaultMessages: {
436
437
  readonly optionCurrent: "current";
437
438
  readonly optionTaken: "already taken";
438
439
  };
440
+ readonly runButton: {
441
+ readonly label: "Run";
442
+ readonly title: "Run this workflow";
443
+ readonly failed: "The run could not be started.";
444
+ readonly queued: "The run is queued. It starts when the site's queue runs (cron).";
445
+ readonly lockedUnsaved: "The editor is locked, so unsaved changes are not part of this run.";
446
+ };
447
+ readonly runInputsDialog: {
448
+ readonly title: ({ name }: {
449
+ name: string;
450
+ }) => string;
451
+ readonly close: "Close the run form";
452
+ readonly missing: ({ names }: {
453
+ names: string;
454
+ }) => string;
455
+ readonly invalid: ({ names }: {
456
+ names: string;
457
+ }) => string;
458
+ };
439
459
  readonly runBar: {
440
460
  readonly label: "Run";
441
461
  readonly running: "Running";
462
+ readonly waitingForWorker: "Waiting for a worker";
442
463
  readonly waiting: "Waiting";
443
464
  readonly failed: "Failed";
444
465
  readonly done: "Done";
@@ -447,10 +468,15 @@ export declare const defaultMessages: {
447
468
  readonly stopLabel: "Stop the run";
448
469
  readonly open: "Open";
449
470
  readonly openLabel: "Open the run in Test mode";
471
+ readonly openRun: "Open run";
472
+ readonly viewResult: "View result";
473
+ readonly viewResultTitle: "Open the run page to see its result";
474
+ readonly openRunTitle: "Open the run page";
450
475
  readonly askAssistant: "Ask the Assistant";
451
476
  readonly askAssistantLabel: "Ask the Assistant about this run";
452
477
  readonly announce: {
453
478
  readonly running: "Run started.";
479
+ readonly waitingForWorker: "Run is waiting for a worker.";
454
480
  readonly waiting: "Run is waiting for you.";
455
481
  readonly failed: "Run failed.";
456
482
  readonly done: "Run finished.";
@@ -462,6 +488,10 @@ export declare const defaultMessages: {
462
488
  count: number;
463
489
  }) => string;
464
490
  readonly triggerTitle: "Problems found in this workflow";
491
+ readonly checking: "Checking...";
492
+ readonly unavailable: "Check unavailable";
493
+ readonly unavailableTitle: "The problem check could not run. It tries again after your next change.";
494
+ readonly retry: "Retry";
465
495
  readonly title: "Problems";
466
496
  readonly listLabel: "Problems in this workflow";
467
497
  readonly severity: {
@@ -499,6 +529,10 @@ export declare const defaultMessages: {
499
529
  }) => string;
500
530
  };
501
531
  readonly dismissNotice: "Dismiss";
532
+ readonly autoDone: ({ label }: {
533
+ label: string;
534
+ }) => string;
535
+ readonly undo: "Undo";
502
536
  };
503
537
  readonly runsList: {
504
538
  readonly trigger: "Runs";
@@ -587,8 +621,12 @@ export declare const defaultMessages: {
587
621
  };
588
622
  readonly layout: {
589
623
  readonly componentsSidebar: "Components sidebar";
624
+ readonly addNode: ({ name }: {
625
+ name: string;
626
+ }) => string;
590
627
  readonly nodesTab: "Nodes";
591
628
  readonly workflowCanvas: "Workflow canvas";
629
+ readonly skipToCanvas: "Skip to the canvas";
592
630
  readonly executionLogs: "Execution logs sidebar";
593
631
  readonly settingsCategories: "Settings categories";
594
632
  readonly zoomLevelsTitle: "Zoom levels";
@@ -1188,6 +1226,8 @@ export declare const defaultMessages: {
1188
1226
  readonly descriptionLabel: "Description";
1189
1227
  readonly dataTypeLabel: "Data type";
1190
1228
  readonly dataTypePlaceholder: "Select a data type…";
1229
+ readonly mixedInputHint: "Callers can send anything. Pick a type so forms can ask for it properly.";
1230
+ readonly noTitle: "No title";
1191
1231
  readonly namePlaceholder: "Defaults to ID";
1192
1232
  readonly typeMismatchInline: ({ portType }: {
1193
1233
  portType: string;
@@ -1334,6 +1374,56 @@ export declare const defaultMessages: {
1334
1374
  }) => string;
1335
1375
  };
1336
1376
  };
1377
+ readonly impact: {
1378
+ readonly title: "Before you save";
1379
+ readonly breaks: "This change breaks";
1380
+ readonly changes: "This change also does";
1381
+ readonly info: "Also good to know";
1382
+ readonly severity: {
1383
+ readonly breaks: "Breaks";
1384
+ readonly changes: "Changes";
1385
+ readonly info: "Info";
1386
+ };
1387
+ readonly failed: ({ message }: {
1388
+ message: string;
1389
+ }) => string;
1390
+ readonly cancel: "Cancel";
1391
+ readonly save: "Save anyway";
1392
+ readonly saveRenames: "Save";
1393
+ readonly refused: {
1394
+ readonly title: "This change can't be saved";
1395
+ readonly body: ({ count }: {
1396
+ count: number;
1397
+ }) => string;
1398
+ readonly keepEditing: "Keep editing";
1399
+ readonly discard: "Discard my changes";
1400
+ readonly discarding: "Discarding…";
1401
+ readonly discardFailed: ({ message }: {
1402
+ message: string;
1403
+ }) => string;
1404
+ readonly copy: "Save as a copy";
1405
+ readonly copying: "Saving a copy…";
1406
+ readonly copyFailed: ({ message }: {
1407
+ message: string;
1408
+ }) => string;
1409
+ readonly copied: "Saved a copy of this workflow.";
1410
+ };
1411
+ readonly renames: {
1412
+ readonly heading: "Renames";
1413
+ readonly title: ({ kind, from, to }: {
1414
+ kind: string;
1415
+ from: string;
1416
+ to: string;
1417
+ }) => string;
1418
+ readonly input: "input";
1419
+ readonly output: "output";
1420
+ readonly noPlaces: "Nothing uses it yet.";
1421
+ readonly disabledPlace: "switched off";
1422
+ readonly follow: ({ count }: {
1423
+ count: number;
1424
+ }) => string;
1425
+ };
1426
+ };
1337
1427
  readonly webmcp: {
1338
1428
  readonly bridge: {
1339
1429
  readonly trigger: "Desktop bridge";
@@ -1406,6 +1496,15 @@ export declare const defaultMessages: {
1406
1496
  readonly failed: "Failed";
1407
1497
  readonly skipped: "Skipped";
1408
1498
  };
1499
+ readonly drafts: {
1500
+ readonly found: ({ time }: {
1501
+ time: string;
1502
+ }) => string;
1503
+ readonly savedSince: "The workflow was saved after this draft. Restoring puts your draft over that version.";
1504
+ readonly restore: "Restore";
1505
+ readonly discard: "Discard";
1506
+ readonly restoreLocked: "The editor is locked, so the draft was not restored. It is kept and offered again when the workflow next opens.";
1507
+ };
1409
1508
  readonly composer: {
1410
1509
  readonly placeholder: "Type a message";
1411
1510
  readonly send: "Send";
@@ -1415,6 +1514,11 @@ export declare const defaultMessages: {
1415
1514
  readonly notice: {
1416
1515
  readonly dismiss: "Dismiss";
1417
1516
  };
1517
+ readonly lock: {
1518
+ readonly title: "This workflow is read-only";
1519
+ readonly learnMore: "Learn more";
1520
+ readonly saveRefused: "The editor is locked, so nothing was saved.";
1521
+ };
1418
1522
  readonly field: {
1419
1523
  readonly required: "required";
1420
1524
  readonly examples: "Examples";
@@ -1433,4 +1537,45 @@ export declare const defaultMessages: {
1433
1537
  readonly hintChoose: "choose";
1434
1538
  readonly hintClose: "close";
1435
1539
  };
1540
+ readonly autoSave: {
1541
+ readonly waiting: "Autosave is waiting: this change affects what uses the workflow. Press Save to review it.";
1542
+ };
1543
+ readonly compare: {
1544
+ readonly title: "Your version and the saved version";
1545
+ readonly onlyMine: "Only in yours";
1546
+ readonly onlyTheirs: "Only in the saved version";
1547
+ readonly changedInBoth: "Different in the two versions";
1548
+ readonly none: "No differences in the workflow itself";
1549
+ readonly keepMine: "Keep mine";
1550
+ readonly loadTheirs: "Load saved version";
1551
+ readonly cancel: "Cancel";
1552
+ readonly stepOnly: ({ label }: {
1553
+ label: string;
1554
+ }) => string;
1555
+ readonly stepSettings: ({ label }: {
1556
+ label: string;
1557
+ }) => string;
1558
+ readonly stepLabel: ({ label }: {
1559
+ label: string;
1560
+ }) => string;
1561
+ readonly stepPosition: ({ label }: {
1562
+ label: string;
1563
+ }) => string;
1564
+ readonly wiresOnly: ({ n }: {
1565
+ n: number;
1566
+ }) => string;
1567
+ readonly name: ({ mine, theirs }: {
1568
+ mine: string;
1569
+ theirs: string;
1570
+ }) => string;
1571
+ readonly description: "Workflow description changed";
1572
+ readonly interface: "Workflow interface changed";
1573
+ readonly chat: "Chat settings changed";
1574
+ };
1575
+ readonly saveConflict: {
1576
+ readonly title: "Someone saved this workflow after you opened it.";
1577
+ readonly body: "Your changes are not saved yet.";
1578
+ readonly compare: "Compare";
1579
+ readonly noRevision: "Could not read the saved version, so your changes were not sent.";
1580
+ };
1436
1581
  };
@@ -226,6 +226,7 @@ export const defaultMessages = {
226
226
  tagline: 'Visual Workflow Manager',
227
227
  breadcrumbAriaLabel: 'Breadcrumb',
228
228
  connected: 'Connected',
229
+ unsavedChanges: 'Unsaved changes',
229
230
  settingsTitle: 'Settings',
230
231
  settingsAriaLabel: 'Open settings',
231
232
  // The gear menu: an Appearance switch, then the full settings dialog.
@@ -375,10 +376,32 @@ export const defaultMessages = {
375
376
  optionCurrent: 'current',
376
377
  optionTaken: 'already taken'
377
378
  },
379
+ // The Run button in the canvas toolbar (Edit mode).
380
+ runButton: {
381
+ label: 'Run',
382
+ title: 'Run this workflow',
383
+ // Toast when the run could not start and the server gave no message.
384
+ failed: 'The run could not be started.',
385
+ // Info toast when the run was accepted but waits for the site's queue.
386
+ queued: "The run is queued. It starts when the site's queue runs (cron).",
387
+ // Info toast when the editor is locked and the workflow has unsaved changes.
388
+ lockedUnsaved: 'The editor is locked, so unsaved changes are not part of this run.'
389
+ },
390
+ // The form Run opens for a workflow that has inputs.
391
+ runInputsDialog: {
392
+ title: ({ name }) => `Run ${name}`,
393
+ close: 'Close the run form',
394
+ // Shown under the Run button when required inputs are empty; names the inputs.
395
+ missing: ({ names }) => `Fill in the required inputs first: ${names}.`,
396
+ // Shown when an input holds text that is not the JSON its type needs.
397
+ invalid: ({ names }) => `These inputs are not valid: ${names}.`
398
+ },
378
399
  // The run bar on the Edit canvas: shown only while a run exists.
379
400
  runBar: {
380
401
  label: 'Run',
381
402
  running: 'Running',
403
+ // A run that is queued while no worker has picked it up.
404
+ waitingForWorker: 'Waiting for a worker',
382
405
  waiting: 'Waiting',
383
406
  failed: 'Failed',
384
407
  done: 'Done',
@@ -387,11 +410,17 @@ export const defaultMessages = {
387
410
  stopLabel: 'Stop the run',
388
411
  open: 'Open',
389
412
  openLabel: 'Open the run in Test mode',
413
+ openRun: 'Open run',
414
+ // The same link once the run has ended: the run page shows what it produced.
415
+ viewResult: 'View result',
416
+ viewResultTitle: 'Open the run page to see its result',
417
+ openRunTitle: 'Open the run page',
390
418
  askAssistant: 'Ask the Assistant',
391
419
  askAssistantLabel: 'Ask the Assistant about this run',
392
420
  // Read out politely when the status changes.
393
421
  announce: {
394
422
  running: 'Run started.',
423
+ waitingForWorker: 'Run is waiting for a worker.',
395
424
  waiting: 'Run is waiting for you.',
396
425
  failed: 'Run failed.',
397
426
  done: 'Run finished.',
@@ -402,6 +431,10 @@ export const defaultMessages = {
402
431
  doctor: {
403
432
  trigger: ({ count }) => (count === 1 ? '1 problem' : `${count} problems`),
404
433
  triggerTitle: 'Problems found in this workflow',
434
+ checking: 'Checking...',
435
+ unavailable: 'Check unavailable',
436
+ unavailableTitle: 'The problem check could not run. It tries again after your next change.',
437
+ retry: 'Retry',
405
438
  title: 'Problems',
406
439
  listLabel: 'Problems in this workflow',
407
440
  severity: { error: 'Error', warning: 'Warning', info: 'Note' },
@@ -425,7 +458,10 @@ export const defaultMessages = {
425
458
  empty: 'That fix would change nothing.',
426
459
  failed: ({ message }) => `The fix could not be applied. ${message}`
427
460
  },
428
- dismissNotice: 'Dismiss'
461
+ dismissNotice: 'Dismiss',
462
+ // A remedy the editor applied by itself: the toast names what it did.
463
+ autoDone: ({ label }) => `Done: ${label}`,
464
+ undo: 'Undo'
429
465
  },
430
466
  // The Runs list in Test mode: a popover from the canvas toolbar.
431
467
  runsList: {
@@ -504,9 +540,13 @@ export const defaultMessages = {
504
540
  layout: {
505
541
  // Sidebar/main-region landmarks.
506
542
  componentsSidebar: 'Components sidebar',
543
+ // Palette item: click or Enter adds the node.
544
+ addNode: ({ name }) => `Add ${name}`,
507
545
  // Edit mode's left slot: Nodes | Assistant.
508
546
  nodesTab: 'Nodes',
509
547
  workflowCanvas: 'Workflow canvas',
548
+ // The skip link at the start of the editor.
549
+ skipToCanvas: 'Skip to the canvas',
510
550
  executionLogs: 'Execution logs sidebar',
511
551
  settingsCategories: 'Settings categories',
512
552
  zoomLevelsTitle: 'Zoom levels',
@@ -1024,6 +1064,8 @@ export const defaultMessages = {
1024
1064
  descriptionLabel: 'Description',
1025
1065
  dataTypeLabel: 'Data type',
1026
1066
  dataTypePlaceholder: 'Select a data type…',
1067
+ mixedInputHint: 'Callers can send anything. Pick a type so forms can ask for it properly.',
1068
+ noTitle: 'No title',
1027
1069
  namePlaceholder: 'Defaults to ID',
1028
1070
  typeMismatchInline: ({ portType }) => `Doesn't match the bound port's type (${portType}).`,
1029
1071
  useMatchPortType: 'Use port type',
@@ -1136,6 +1178,55 @@ export const defaultMessages = {
1136
1178
  replyPortMissing: ({ reply }) => `The reply "${reply}" is on an output the node no longer has.`
1137
1179
  }
1138
1180
  },
1181
+ // The confirm dialog the editor shows before a save that breaks or changes what uses the workflow.
1182
+ impact: {
1183
+ title: 'Before you save',
1184
+ breaks: 'This change breaks',
1185
+ changes: 'This change also does',
1186
+ info: 'Also good to know',
1187
+ // The severity as a word on each row, so it never rests on colour alone.
1188
+ severity: {
1189
+ breaks: 'Breaks',
1190
+ changes: 'Changes',
1191
+ info: 'Info'
1192
+ },
1193
+ failed: ({ message }) => `The check of what uses this workflow failed: ${message}`,
1194
+ cancel: 'Cancel',
1195
+ save: 'Save anyway',
1196
+ // Shown when the only reason to ask is a rename: nothing breaks, so "anyway" would mislead.
1197
+ saveRenames: 'Save',
1198
+ // The save is refused while things use the workflow.
1199
+ refused: {
1200
+ title: "This change can't be saved",
1201
+ // `count` is the places the change breaks; none counted means no number.
1202
+ body: ({ count }) => count === 0
1203
+ ? "This change can't be saved while other things use this workflow."
1204
+ : count === 1
1205
+ ? "This change can't be saved while 1 place uses it."
1206
+ : `This change can't be saved while ${count} places use it.`,
1207
+ keepEditing: 'Keep editing',
1208
+ // Throws away every unsaved edit and loads the saved version.
1209
+ discard: 'Discard my changes',
1210
+ discarding: 'Discarding\u2026',
1211
+ discardFailed: ({ message }) => `Could not discard your changes: ${message}`,
1212
+ copy: 'Save as a copy',
1213
+ copying: 'Saving a copy\u2026',
1214
+ copyFailed: ({ message }) => `Could not save a copy: ${message}`,
1215
+ // Shown when the copy was saved and the editor stays where it is.
1216
+ copied: 'Saved a copy of this workflow.'
1217
+ },
1218
+ // Renamed inputs and outputs, and the opt-in to follow them.
1219
+ renames: {
1220
+ heading: 'Renames',
1221
+ title: ({ kind, from, to }) => `Renaming ${kind} ${from} \u2192 ${to}. Places that use it:`,
1222
+ input: 'input',
1223
+ output: 'output',
1224
+ noPlaces: 'Nothing uses it yet.',
1225
+ // After a place that is switched off.
1226
+ disabledPlace: 'switched off',
1227
+ follow: ({ count }) => count === 1 ? 'Also update this 1 place' : `Also update these ${count} places`
1228
+ }
1229
+ },
1139
1230
  // The confirm dialog the WebMCP adapter shows before a browser agent's change runs.
1140
1231
  webmcp: {
1141
1232
  // The desktop bridge: a button beside the canvas zoom controls and its popover, for a
@@ -1187,6 +1278,15 @@ export const defaultMessages = {
1187
1278
  failed: 'Failed',
1188
1279
  skipped: 'Skipped'
1189
1280
  },
1281
+ // The offer to bring back unsaved changes found in browser storage.
1282
+ drafts: {
1283
+ // "Unsaved changes from 14:02 were found."
1284
+ found: ({ time }) => `Unsaved changes from ${time} were found.`,
1285
+ savedSince: 'The workflow was saved after this draft. Restoring puts your draft over that version.',
1286
+ restore: 'Restore',
1287
+ discard: 'Discard',
1288
+ restoreLocked: 'The editor is locked, so the draft was not restored. It is kept and offered again when the workflow next opens.'
1289
+ },
1190
1290
  composer: {
1191
1291
  placeholder: 'Type a message',
1192
1292
  send: 'Send',
@@ -1196,6 +1296,12 @@ export const defaultMessages = {
1196
1296
  notice: {
1197
1297
  dismiss: 'Dismiss'
1198
1298
  },
1299
+ lock: {
1300
+ title: 'This workflow is read-only',
1301
+ learnMore: 'Learn more',
1302
+ // A person's save (a host's own Save button, app.save()) while the editor is locked.
1303
+ saveRefused: 'The editor is locked, so nothing was saved.'
1304
+ },
1199
1305
  field: {
1200
1306
  required: 'required',
1201
1307
  examples: 'Examples'
@@ -1212,5 +1318,37 @@ export const defaultMessages = {
1212
1318
  hintMove: 'move',
1213
1319
  hintChoose: 'choose',
1214
1320
  hintClose: 'close'
1321
+ },
1322
+ // Autosave could not save on its own.
1323
+ autoSave: {
1324
+ waiting: 'Autosave is waiting: this change affects what uses the workflow. Press Save to review it.'
1325
+ },
1326
+ // The dialog that compares your workflow with the saved version.
1327
+ compare: {
1328
+ title: 'Your version and the saved version',
1329
+ onlyMine: 'Only in yours',
1330
+ onlyTheirs: 'Only in the saved version',
1331
+ changedInBoth: 'Different in the two versions',
1332
+ none: 'No differences in the workflow itself',
1333
+ keepMine: 'Keep mine',
1334
+ loadTheirs: 'Load saved version',
1335
+ cancel: 'Cancel',
1336
+ stepOnly: ({ label }) => `Step "${label}"`,
1337
+ stepSettings: ({ label }) => `Step "${label}": settings changed`,
1338
+ stepLabel: ({ label }) => `Step "${label}": name changed`,
1339
+ stepPosition: ({ label }) => `Step "${label}": moved`,
1340
+ wiresOnly: ({ n }) => (n === 1 ? '1 wire' : `${n} wires`),
1341
+ name: ({ mine, theirs }) => `Workflow name: "${mine}" and "${theirs}"`,
1342
+ description: 'Workflow description changed',
1343
+ interface: 'Workflow interface changed',
1344
+ chat: 'Chat settings changed'
1345
+ },
1346
+ // The toast shown when a save is refused because someone saved first. Its
1347
+ // Keep mine / Load saved version labels are the compare dialog's.
1348
+ saveConflict: {
1349
+ title: 'Someone saved this workflow after you opened it.',
1350
+ body: 'Your changes are not saved yet.',
1351
+ compare: 'Compare',
1352
+ noRevision: 'Could not read the saved version, so your changes were not sent.'
1215
1353
  }
1216
1354
  };