@ykurilov/agent-chat-flows 0.0.0-stage → 0.55.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 (151) hide show
  1. package/CHANGELOG.md +252 -0
  2. package/LICENSE +21 -0
  3. package/README.md +124 -2
  4. package/agent-flow.schema.json +1020 -0
  5. package/dist/chunk-3PTJI2XY.js +100 -0
  6. package/dist/chunk-3PTJI2XY.js.map +1 -0
  7. package/dist/chunk-BNMQUNSI.js +9 -0
  8. package/dist/chunk-BNMQUNSI.js.map +1 -0
  9. package/dist/chunk-BOV6FJGU.js +1288 -0
  10. package/dist/chunk-BOV6FJGU.js.map +1 -0
  11. package/dist/chunk-CKY5KG7N.js +165 -0
  12. package/dist/chunk-CKY5KG7N.js.map +1 -0
  13. package/dist/chunk-DCTRMCGV.js +34 -0
  14. package/dist/chunk-DCTRMCGV.js.map +1 -0
  15. package/dist/format.js +147 -0
  16. package/dist/format.js.map +1 -0
  17. package/dist/index.js +3197 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/postgres.js +387 -0
  20. package/dist/postgres.js.map +1 -0
  21. package/dist/react.js +2650 -0
  22. package/dist/react.js.map +1 -0
  23. package/dist/sqlite.js +319 -0
  24. package/dist/sqlite.js.map +1 -0
  25. package/dist/types/check/app-checks.d.ts +16 -0
  26. package/dist/types/check/check-flow.d.ts +8 -0
  27. package/dist/types/check/index.d.ts +2 -0
  28. package/dist/types/engine/data-conditions.d.ts +10 -0
  29. package/dist/types/engine/day-frame.d.ts +17 -0
  30. package/dist/types/engine/first-messages.d.ts +21 -0
  31. package/dist/types/engine/flow-days.d.ts +39 -0
  32. package/dist/types/engine/flow-graph.d.ts +26 -0
  33. package/dist/types/engine/flow-run.d.ts +130 -0
  34. package/dist/types/engine/index.d.ts +14 -0
  35. package/dist/types/engine/migrate-run.d.ts +11 -0
  36. package/dist/types/engine/next-transition.d.ts +40 -0
  37. package/dist/types/engine/nudges.d.ts +78 -0
  38. package/dist/types/engine/run-updates.d.ts +37 -0
  39. package/dist/types/engine/side-questions.d.ts +26 -0
  40. package/dist/types/engine/side-tasks.d.ts +44 -0
  41. package/dist/types/engine/targets.d.ts +9 -0
  42. package/dist/types/engine/timers.d.ts +61 -0
  43. package/dist/types/engine/zoned-time.d.ts +27 -0
  44. package/dist/types/format/catalog-events.d.ts +5 -0
  45. package/dist/types/format/compact-flow.d.ts +8 -0
  46. package/dist/types/format/flow-format.d.ts +286 -0
  47. package/dist/types/format/flow-json-schema.d.ts +2 -0
  48. package/dist/types/format/flow-schema.d.ts +605 -0
  49. package/dist/types/format/index.d.ts +7 -0
  50. package/dist/types/format/migrate-flow.d.ts +4 -0
  51. package/dist/types/format/parse-flow.d.ts +6 -0
  52. package/dist/types/format.d.ts +3 -0
  53. package/dist/types/index.d.ts +4 -0
  54. package/dist/types/labels/client-card.d.ts +20 -0
  55. package/dist/types/labels/editor.d.ts +261 -0
  56. package/dist/types/labels/index.d.ts +14 -0
  57. package/dist/types/labels/migrate.d.ts +19 -0
  58. package/dist/types/labels/test-chat.d.ts +28 -0
  59. package/dist/types/not-yet.d.ts +2 -0
  60. package/dist/types/postgres.d.ts +10 -0
  61. package/dist/types/prompt/client-card-block.d.ts +16 -0
  62. package/dist/types/prompt/flow-rules.d.ts +9 -0
  63. package/dist/types/prompt/rules/after-end.d.ts +3 -0
  64. package/dist/types/prompt/rules/client-facts.d.ts +2 -0
  65. package/dist/types/prompt/rules/day-frame.d.ts +2 -0
  66. package/dist/types/prompt/rules/link-views.d.ts +4 -0
  67. package/dist/types/prompt/rules/rule-part.d.ts +3 -0
  68. package/dist/types/prompt/rules/side-tasks.d.ts +2 -0
  69. package/dist/types/prompt/rules/time-zone.d.ts +2 -0
  70. package/dist/types/prompt/state-card.d.ts +14 -0
  71. package/dist/types/react/client-card/client-card-panel.d.ts +8 -0
  72. package/dist/types/react/client-card/index.d.ts +2 -0
  73. package/dist/types/react/client-card/use-client-card.d.ts +19 -0
  74. package/dist/types/react/client-card-skin.d.ts +27 -0
  75. package/dist/types/react/editor/board-space.d.ts +51 -0
  76. package/dist/types/react/editor/board-styles.d.ts +1 -0
  77. package/dist/types/react/editor/editor-model.d.ts +60 -0
  78. package/dist/types/react/editor/exit-text.d.ts +11 -0
  79. package/dist/types/react/editor/flow-board.d.ts +11 -0
  80. package/dist/types/react/editor/flow-editor.d.ts +13 -0
  81. package/dist/types/react/editor/flow-simulation.d.ts +44 -0
  82. package/dist/types/react/editor/index.d.ts +6 -0
  83. package/dist/types/react/editor/schedule-model.d.ts +47 -0
  84. package/dist/types/react/editor/side-task-model.d.ts +18 -0
  85. package/dist/types/react/editor/use-flow-editor.d.ts +120 -0
  86. package/dist/types/react/flow-editor-skin.d.ts +453 -0
  87. package/dist/types/react/flow-labels.d.ts +8 -0
  88. package/dist/types/react/index.d.ts +6 -0
  89. package/dist/types/react/test-chat/flow-test-chat.d.ts +22 -0
  90. package/dist/types/react/test-chat/index.d.ts +2 -0
  91. package/dist/types/react/test-chat/use-flow-test-chat.d.ts +50 -0
  92. package/dist/types/react.d.ts +3 -0
  93. package/dist/types/runtime/admit.d.ts +15 -0
  94. package/dist/types/runtime/agent-flow.d.ts +20 -0
  95. package/dist/types/runtime/client-card.d.ts +9 -0
  96. package/dist/types/runtime/client-facts.d.ts +22 -0
  97. package/dist/types/runtime/close-day-tool.d.ts +3 -0
  98. package/dist/types/runtime/decisions-client.d.ts +33 -0
  99. package/dist/types/runtime/extra-tool.d.ts +16 -0
  100. package/dist/types/runtime/first-message-retry.d.ts +4 -0
  101. package/dist/types/runtime/first-message-rules.d.ts +55 -0
  102. package/dist/types/runtime/first-reasons-notice.d.ts +9 -0
  103. package/dist/types/runtime/flow-delivery.d.ts +53 -0
  104. package/dist/types/runtime/flow-events.d.ts +126 -0
  105. package/dist/types/runtime/flow-finish.d.ts +68 -0
  106. package/dist/types/runtime/flow-known-texts.d.ts +11 -0
  107. package/dist/types/runtime/flow-signals.d.ts +12 -0
  108. package/dist/types/runtime/flow-timers.d.ts +55 -0
  109. package/dist/types/runtime/flow-tools.d.ts +23 -0
  110. package/dist/types/runtime/flow-types.d.ts +547 -0
  111. package/dist/types/runtime/held-messages.d.ts +25 -0
  112. package/dist/types/runtime/index.d.ts +11 -0
  113. package/dist/types/runtime/judge-context.d.ts +36 -0
  114. package/dist/types/runtime/judge.d.ts +21 -0
  115. package/dist/types/runtime/migrate-chats.d.ts +20 -0
  116. package/dist/types/runtime/note-tools.d.ts +15 -0
  117. package/dist/types/runtime/pause.d.ts +21 -0
  118. package/dist/types/runtime/prepare-turn.d.ts +12 -0
  119. package/dist/types/runtime/side-task-tool.d.ts +5 -0
  120. package/dist/types/runtime/step-tail.d.ts +11 -0
  121. package/dist/types/runtime/tail/day-line.d.ts +2 -0
  122. package/dist/types/runtime/tail/frame-line.d.ts +2 -0
  123. package/dist/types/runtime/tail/side-tasks-line.d.ts +2 -0
  124. package/dist/types/runtime/tail/tail-part.d.ts +21 -0
  125. package/dist/types/runtime/test-clock.d.ts +26 -0
  126. package/dist/types/runtime/time-zone-tool.d.ts +3 -0
  127. package/dist/types/runtime/turn-gate.d.ts +8 -0
  128. package/dist/types/sqlite.d.ts +9 -0
  129. package/dist/types/store/flow-store-shared.d.ts +20 -0
  130. package/dist/types/store/flow-store.d.ts +240 -0
  131. package/dist/types/store/memory.d.ts +3 -0
  132. package/dist/types/store/migration-settings.d.ts +7 -0
  133. package/dist/types/store/postgres-schema.d.ts +775 -0
  134. package/dist/types/store/postgres.d.ts +15 -0
  135. package/dist/types/store/sqlite-schema.d.ts +824 -0
  136. package/dist/types/store/sqlite.d.ts +9 -0
  137. package/drizzle/postgres/0000_init.sql +45 -0
  138. package/drizzle/postgres/0001_days_pause_side_tasks.sql +21 -0
  139. package/drizzle/postgres/0002_chat_placement.sql +1 -0
  140. package/drizzle/postgres/meta/0000_snapshot.json +317 -0
  141. package/drizzle/postgres/meta/0001_snapshot.json +439 -0
  142. package/drizzle/postgres/meta/0002_snapshot.json +445 -0
  143. package/drizzle/postgres/meta/_journal.json +27 -0
  144. package/drizzle/sqlite/0000_init.sql +44 -0
  145. package/drizzle/sqlite/0001_days_pause_side_tasks.sql +21 -0
  146. package/drizzle/sqlite/0002_chat_placement.sql +1 -0
  147. package/drizzle/sqlite/meta/0000_snapshot.json +297 -0
  148. package/drizzle/sqlite/meta/0001_snapshot.json +427 -0
  149. package/drizzle/sqlite/meta/0002_snapshot.json +434 -0
  150. package/drizzle/sqlite/meta/_journal.json +27 -0
  151. package/package.json +98 -3
@@ -0,0 +1,44 @@
1
+ import { type AgentFlow } from "../../format/flow-format.js";
2
+ import type { FlowRun } from "../../engine/flow-run.js";
3
+ /** Шаг пути прогона: куда пришли и по какому условию; `nothing` — «ничего из этого», агент остался. */
4
+ export interface SimulationStep {
5
+ stateId: string;
6
+ exitId: string | null;
7
+ nothing: boolean;
8
+ }
9
+ export interface Simulation {
10
+ run: FlowRun;
11
+ /** Карточка клиента в прогоне: id поля → значение и когда записано. */
12
+ card: Record<string, {
13
+ value: unknown;
14
+ updatedAt: number;
15
+ }>;
16
+ now: number;
17
+ timeZone: string;
18
+ steps: SimulationStep[];
19
+ /** Прогон до последнего шага — для «шаг назад». */
20
+ previous: Simulation | null;
21
+ }
22
+ /** Выбор «что произошло»: условие и куда приведёт движок (`null` — не сработает). */
23
+ export interface SimulationChoice {
24
+ exitId: string;
25
+ own: boolean;
26
+ target: string | null;
27
+ }
28
+ export declare function startSimulation(flow: AgentFlow, options: {
29
+ now: number;
30
+ timeZone: string;
31
+ }): Simulation;
32
+ export declare function simulationChoices(flow: AgentFlow, sim: Simulation): SimulationChoice[];
33
+ /** Автор выбрал условие: собираем событие, на которое оно срабатывает, и отдаём движку. */
34
+ export declare function chooseExit(flow: AgentFlow, sim: Simulation, exitId: string): Simulation;
35
+ /** «Ничего из этого»: человек написал, агент ответил, остались в том же состоянии. */
36
+ export declare function chooseNothing(flow: AgentFlow, sim: Simulation): Simulation;
37
+ /**
38
+ * Автор вписал, что агент знает о человеке. Число — для числовых полей; пусто — поле забыто. Если от этого сработало
39
+ * условие по данным — переход, как в рабочем чате.
40
+ */
41
+ export declare function setKnownValue(flow: AgentFlow, sim: Simulation, fieldId: string, text: string): Simulation;
42
+ /** id поля, о котором агент спросит сейчас; `null` — ни о чём. */
43
+ export declare function nextQuestionField(flow: AgentFlow, sim: Simulation): string | null;
44
+ export declare function stepBack(sim: Simulation): Simulation;
@@ -0,0 +1,6 @@
1
+ export { FlowEditor, type FlowEditorProps } from "./flow-editor.js";
2
+ export { useFlowEditor, type FlowDialog, type FlowEditorController, type FlowMigrateController, type FlowMigrateRow, type FlowMigration, type FlowSaveResult, type FlowSelection, type UseFlowEditorOptions, } from "./use-flow-editor.js";
3
+ export { conditionText } from "./exit-text.js";
4
+ export { chooseExit, chooseNothing, nextQuestionField, setKnownValue, simulationChoices, startSimulation, stepBack, type Simulation, type SimulationChoice, type SimulationStep, } from "./flow-simulation.js";
5
+ export { DEFAULT_NUDGES, DEFAULT_SCHEDULE } from "./schedule-model.js";
6
+ export type { FlowBoardSpaceProps, FlowHeaderMode, FlowInspectorMode, FlowLegendMode, FlowMinimapMode } from "./board-space.js";
@@ -0,0 +1,47 @@
1
+ import { type AgentFlow, type FlowAfterEnd, type FlowDuration, type FlowNudges, type FlowSchedule, type FlowState } from "../../format/flow-format.js";
2
+ import type { FlowEditorLabels } from "../../labels/editor.js";
3
+ /** «Дни и время» при включении: день с 9:00, порог позднего старта по умолчанию, без прощания. */
4
+ export declare const DEFAULT_SCHEDULE: FlowSchedule;
5
+ /** Свои касания ноды без общего образца: 15 мин · 1 ч · 4 ч тишины. */
6
+ export declare const DEFAULT_NUDGES: FlowNudges;
7
+ export declare function setScheduleOn(flow: AgentFlow, on: boolean): AgentFlow;
8
+ export type SchedulePatch = {
9
+ [K in keyof FlowSchedule]?: FlowSchedule[K] | undefined;
10
+ };
11
+ /** Правка «Дней и времени»: `undefined` и пустая строка убирают поле, пустые вложенные разделы — целиком. */
12
+ export declare function updateSchedule(flow: AgentFlow, patch: SchedulePatch): AgentFlow;
13
+ export declare function setAfterEnd(flow: AgentFlow, mode: FlowAfterEnd): AgentFlow;
14
+ export type DurationUnit = "h" | "d" | "program_day";
15
+ /**
16
+ * Продолжительность ноды: выход «длится N дней сценария» (`state_days`), «до дня N программы» (`program_day`, `amount` —
17
+ * номер дня) или «N часов в этом состоянии».
18
+ */
19
+ export interface StateDuration {
20
+ exitId: string;
21
+ amount: number;
22
+ unit: DurationUnit;
23
+ to: string | null;
24
+ }
25
+ /** Первый выход-продолжительность ноды; минуты «в этом состоянии» — обычный таймер, не «Длится». */
26
+ export declare function durationOf(state: FlowState): StateDuration | null;
27
+ /** «Длится»: дни — `state_days`, день программы — `program_day`, часы — `in_state`. Правится тот же выход; `null` — выход убирается. */
28
+ export declare function setDuration(flow: AgentFlow, stateId: string, value: {
29
+ amount: number;
30
+ unit: DurationUnit;
31
+ } | null): AgentFlow;
32
+ export type NudgesMode = "inherit" | "own" | "off";
33
+ export declare function nudgesMode(state: FlowState): NudgesMode;
34
+ /** Касания ноды: как у сценария (поля нет), свои (образец — общие или 15 мин · 1 ч · 4 ч), выкл. */
35
+ export declare function setStateNudges(flow: AgentFlow, stateId: string, mode: NudgesMode): AgentFlow;
36
+ /** Своё расписание касаний ноды: пустые части убираются, срок в днях остаётся. */
37
+ export declare function updateStateNudges(flow: AgentFlow, stateId: string, nudges: FlowNudges): AgentFlow;
38
+ /** Сколько дней действуют свои касания ноды, считая день входа; `null` — всё время в ноде. */
39
+ export declare function setStateNudgesDays(flow: AgentFlow, stateId: string, days: number | null): AgentFlow;
40
+ /** Срок своих касаний ноды в днях; всё время в ноде или касания не свои — `null`. */
41
+ export declare function stateNudgesDays(state: FlowState): number | null;
42
+ /** Касания по умолчанию в «Днях и времени»; `null` — без общих касаний. */
43
+ export declare function updateScheduleNudges(flow: AgentFlow, nudges: FlowNudges | null): AgentFlow;
44
+ /** «15 мин», «4 ч», «3 дн.». */
45
+ export declare function durationText(duration: FlowDuration, labels: FlowEditorLabels): string;
46
+ /** Подпись «Длится» и касаний на карточке ноды: «1 день · касания 15 мин · 1 ч · 4 ч». Ничего своего — пусто. */
47
+ export declare function stateTimingText(flow: AgentFlow, state: FlowState, labels: FlowEditorLabels): string;
@@ -0,0 +1,18 @@
1
+ import { type AgentFlow, type FlowCatalog, type FlowCatalogField, type FlowSideTask } from "../../format/flow-format.js";
2
+ import type { FieldList } from "./editor-model.js";
3
+ export declare function addSideTask(flow: AgentFlow, text: string): {
4
+ flow: AgentFlow;
5
+ sideTaskId: string;
6
+ };
7
+ export type SideTaskPatch = {
8
+ [K in keyof FlowSideTask]?: FlowSideTask[K] | undefined;
9
+ };
10
+ /** Правка задачи: пустые «когда» и «поле» убираются, попыток — хотя бы одна. */
11
+ export declare function updateSideTask(flow: AgentFlow, sideTaskId: string, patch: SideTaskPatch): AgentFlow;
12
+ export declare function removeSideTask(flow: AgentFlow, sideTaskId: string): AgentFlow;
13
+ /** Поля словаря приложения, которых ещё нет ни в карточке, ни в заметках. */
14
+ export declare function catalogFieldsToAdd(flow: AgentFlow, catalog: FlowCatalog): FlowCatalogField[];
15
+ /** Поле словаря приложения в карточку или заметки: id, название, тип и варианты — как у приложения. Уже есть — без правок. */
16
+ export declare function addCatalogField(flow: AgentFlow, list: FieldList, field: FlowCatalogField): AgentFlow;
17
+ /** Поле, по которому задача решена. Поле из словаря приложения, которого нет в сценарии, попадает в карточку. */
18
+ export declare function setSideTaskField(flow: AgentFlow, sideTaskId: string, fieldId: string | null, catalog: FlowCatalog): AgentFlow;
@@ -0,0 +1,120 @@
1
+ import type { AgentFlow, FlowCatalog, FlowIssue, FlowPoint } from "../../format/flow-format.js";
2
+ import type { StateMap } from "../../engine/migrate-run.js";
3
+ import type { ChatsInState } from "../../store/flow-store.js";
4
+ import type { FlowEditorMode, FlowIssueCount } from "../flow-editor-skin.js";
5
+ import { type FlowAppChecks, type FlowAppIssue } from "../../check/app-checks.js";
6
+ import { type ExitOwner } from "./editor-model.js";
7
+ import { type Simulation } from "./flow-simulation.js";
8
+ /** Что открыто в панели справа. */
9
+ export type FlowSelection = {
10
+ kind: "overview";
11
+ sideTaskId?: string;
12
+ } | {
13
+ kind: "state";
14
+ stateId: string;
15
+ exitId?: string;
16
+ } | {
17
+ kind: "any";
18
+ exitId?: string;
19
+ } | {
20
+ kind: "card";
21
+ };
22
+ export type FlowDialog = "json" | "migrate" | null;
23
+ /**
24
+ * Перевод идущих чатов на текущую версию. Данные и действие даёт приложение — редактор не знает, где сервер:
25
+ * `chatsByState` — чаты на прежних версиях (`flow.chatsByState`), `migrate` — перевод с картой удалённых состояний
26
+ * (`flow.migrateChats`).
27
+ */
28
+ export interface FlowMigration {
29
+ chatsByState(): Promise<ChatsInState[]>;
30
+ migrate(map: StateMap): Promise<{
31
+ moved: number;
32
+ }>;
33
+ /** Название состояния прежней версии; нет — берём из текущей или показываем id. */
34
+ stateTitle?(versionId: string, stateId: string): string | undefined;
35
+ }
36
+ /**
37
+ * Ответ `onSave`. Ничего (`void`) и `{ ok: true }` — сохранено. `{ ok: false, issues }` — приложение отказало без
38
+ * исключения: шапка не пишет «Сохранено», `issues` встают у нод и выходов, как находки «Проверить граф».
39
+ */
40
+ export type FlowSaveResult = void | {
41
+ ok: true;
42
+ } | {
43
+ ok: false;
44
+ issues?: ReadonlyArray<Pick<FlowAppIssue, "path" | "message">>;
45
+ };
46
+ export interface UseFlowEditorOptions {
47
+ value: AgentFlow;
48
+ onChange(flow: AgentFlow): void;
49
+ /** Сохранить сценарий. Отказ — `{ ok: false, issues }` или исключение (оно не уходит в консоль необработанным). */
50
+ onSave?(flow: AgentFlow): FlowSaveResult | Promise<FlowSaveResult>;
51
+ /**
52
+ * Только просмотр: доску нельзя менять (двигать, соединять, удалять, править панели), нельзя сохранять и загружать
53
+ * JSON. Смотреть, проверять граф, прогонять и открывать JSON можно. Нужно, пока сценарий правит внешний агент.
54
+ */
55
+ readOnly?: boolean;
56
+ /** Что объявило приложение: инструменты, события и кнопки, виджеты. */
57
+ catalog: FlowCatalog;
58
+ migration?: FlowMigration;
59
+ /** Пояс человека для таймеров «время суток» в прогоне; по умолчанию — пояс браузера. */
60
+ timeZone?: string;
61
+ now?(): number;
62
+ /**
63
+ * Свои проверки приложения в «Проверить сценарий»: `(flow) => [{ path: "states[2]", message }]`. Находки идут после
64
+ * встроенных, клик ведёт на место. Те же проверки приложение передаёт в `checkFlow(flow, catalog, { checks })`.
65
+ */
66
+ checks?: FlowAppChecks;
67
+ }
68
+ export interface FlowMigrateRow extends ChatsInState {
69
+ stateTitle: string;
70
+ removed: boolean;
71
+ target: string | null;
72
+ }
73
+ export interface FlowMigrateController {
74
+ rows: FlowMigrateRow[];
75
+ busy: boolean;
76
+ failed: boolean;
77
+ moved: number | null;
78
+ canMigrate: boolean;
79
+ open(): void;
80
+ setTarget(stateId: string, target: string): void;
81
+ run(): Promise<void>;
82
+ }
83
+ /** Логика редактора сценария: правки, выбор, проверка, прогон, JSON, сохранение, перевод чатов. Скин только рисует. */
84
+ export declare function useFlowEditor(options: UseFlowEditorOptions): {
85
+ flow: AgentFlow;
86
+ catalog: FlowCatalog;
87
+ issues: FlowIssue[];
88
+ issueCount: FlowIssueCount;
89
+ selection: FlowSelection;
90
+ select: (next: FlowSelection) => void;
91
+ mode: FlowEditorMode;
92
+ setMode: (next: FlowEditorMode) => void;
93
+ goToIssue: (issue: FlowIssue) => void;
94
+ edit: (change: (flow: AgentFlow) => AgentFlow) => void;
95
+ addState: (at?: FlowPoint) => string;
96
+ connect: (owner: ExitOwner, exitId: string, to: string) => void;
97
+ connectToNewState: (owner: ExitOwner, exitId: string | null, at: FlowPoint) => void;
98
+ removeState: (stateId: string) => void;
99
+ simulation: Simulation | null;
100
+ simulate: {
101
+ choose: (exitId: string) => void;
102
+ nothing: () => void;
103
+ back: () => void;
104
+ restart: () => void;
105
+ setKnown: (fieldId: string, text: string) => void;
106
+ };
107
+ dialog: FlowDialog;
108
+ openJson: () => void;
109
+ closeDialog: () => void;
110
+ json: string;
111
+ jsonErrors: string[];
112
+ loadJson: (text: string) => boolean;
113
+ save: () => Promise<void>;
114
+ saving: boolean;
115
+ saveFailed: boolean;
116
+ dirty: boolean;
117
+ readOnly: boolean;
118
+ migrate: FlowMigrateController | null;
119
+ };
120
+ export type FlowEditorController = ReturnType<typeof useFlowEditor>;