callman-mcp 0.2.0 → 0.3.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 (47) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +2 -2
  3. package/dist/client/api.d.ts +1 -0
  4. package/dist/client/api.d.ts.map +1 -1
  5. package/dist/client/api.js +2 -0
  6. package/dist/client/api.js.map +1 -1
  7. package/dist/domain/diagram/build.d.ts +112 -63
  8. package/dist/domain/diagram/build.d.ts.map +1 -1
  9. package/dist/domain/diagram/build.js +49 -165
  10. package/dist/domain/diagram/build.js.map +1 -1
  11. package/dist/domain/diagram/layout.d.ts +3 -4
  12. package/dist/domain/diagram/layout.d.ts.map +1 -1
  13. package/dist/domain/diagram/layout.js +12 -45
  14. package/dist/domain/diagram/layout.js.map +1 -1
  15. package/dist/domain/diagram/patch.d.ts +298 -80
  16. package/dist/domain/diagram/patch.d.ts.map +1 -1
  17. package/dist/domain/diagram/patch.js +60 -273
  18. package/dist/domain/diagram/patch.js.map +1 -1
  19. package/dist/domain/diagram/style.d.ts +4 -12
  20. package/dist/domain/diagram/style.d.ts.map +1 -1
  21. package/dist/domain/diagram/style.js +8 -84
  22. package/dist/domain/diagram/style.js.map +1 -1
  23. package/dist/domain/diagram/summarize.d.ts +25 -24
  24. package/dist/domain/diagram/summarize.d.ts.map +1 -1
  25. package/dist/domain/diagram/summarize.js +20 -35
  26. package/dist/domain/diagram/summarize.js.map +1 -1
  27. package/dist/domain/requestIntegrations.d.ts +20 -20
  28. package/dist/domain/requestShape.d.ts +32 -32
  29. package/dist/resources/docs/diagramSchema.d.ts +1 -1
  30. package/dist/resources/docs/diagramSchema.d.ts.map +1 -1
  31. package/dist/resources/docs/diagramSchema.js +55 -10
  32. package/dist/resources/docs/diagramSchema.js.map +1 -1
  33. package/dist/resources/generated/aiPacks.d.ts +1 -1
  34. package/dist/resources/generated/aiPacks.js +2 -2
  35. package/dist/tools/diagrams.d.ts.map +1 -1
  36. package/dist/tools/diagrams.js +244 -42
  37. package/dist/tools/diagrams.js.map +1 -1
  38. package/dist-cjs/client/api.js +2 -0
  39. package/dist-cjs/domain/diagram/build.js +53 -169
  40. package/dist-cjs/domain/diagram/layout.js +11 -44
  41. package/dist-cjs/domain/diagram/patch.js +57 -270
  42. package/dist-cjs/domain/diagram/style.js +11 -88
  43. package/dist-cjs/domain/diagram/summarize.js +22 -35
  44. package/dist-cjs/resources/docs/diagramSchema.js +55 -10
  45. package/dist-cjs/resources/generated/aiPacks.js +2 -2
  46. package/dist-cjs/tools/diagrams.js +240 -38
  47. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { type DiagramDocument } from "callman-core";
1
+ import { type DiagramDocument, type LayoutDirection } from "callman-core";
2
2
  import { z } from "zod";
3
3
  export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject<{
4
4
  op: z.ZodLiteral<"addNode">;
@@ -145,6 +145,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
145
145
  rotation: z.ZodOptional<z.ZodNumber>;
146
146
  locked: z.ZodOptional<z.ZodBoolean>;
147
147
  hidden: z.ZodOptional<z.ZodBoolean>;
148
+ collapsed: z.ZodOptional<z.ZodBoolean>;
148
149
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
149
150
  }, "strict", z.ZodTypeAny, {
150
151
  type: string;
@@ -155,6 +156,11 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
155
156
  width: number;
156
157
  height: number;
157
158
  } | undefined;
159
+ label?: string | undefined;
160
+ position?: {
161
+ x: number;
162
+ y: number;
163
+ } | undefined;
158
164
  style?: {
159
165
  fill?: string | {
160
166
  raw: string;
@@ -189,11 +195,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
189
195
  rotation?: number | undefined;
190
196
  locked?: boolean | undefined;
191
197
  hidden?: boolean | undefined;
192
- label?: string | undefined;
193
- position?: {
194
- x: number;
195
- y: number;
196
- } | undefined;
198
+ collapsed?: boolean | undefined;
197
199
  }, {
198
200
  type: string;
199
201
  data?: Record<string, unknown> | undefined;
@@ -203,6 +205,11 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
203
205
  width: number;
204
206
  height: number;
205
207
  } | undefined;
208
+ label?: string | undefined;
209
+ position?: {
210
+ x: number;
211
+ y: number;
212
+ } | undefined;
206
213
  style?: {
207
214
  fill?: string | {
208
215
  raw: string;
@@ -237,11 +244,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
237
244
  rotation?: number | undefined;
238
245
  locked?: boolean | undefined;
239
246
  hidden?: boolean | undefined;
240
- label?: string | undefined;
241
- position?: {
242
- x: number;
243
- y: number;
244
- } | undefined;
247
+ collapsed?: boolean | undefined;
245
248
  }>;
246
249
  }, "strict", z.ZodTypeAny, {
247
250
  op: "addNode";
@@ -254,6 +257,11 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
254
257
  width: number;
255
258
  height: number;
256
259
  } | undefined;
260
+ label?: string | undefined;
261
+ position?: {
262
+ x: number;
263
+ y: number;
264
+ } | undefined;
257
265
  style?: {
258
266
  fill?: string | {
259
267
  raw: string;
@@ -288,11 +296,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
288
296
  rotation?: number | undefined;
289
297
  locked?: boolean | undefined;
290
298
  hidden?: boolean | undefined;
291
- label?: string | undefined;
292
- position?: {
293
- x: number;
294
- y: number;
295
- } | undefined;
299
+ collapsed?: boolean | undefined;
296
300
  };
297
301
  }, {
298
302
  op: "addNode";
@@ -305,6 +309,11 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
305
309
  width: number;
306
310
  height: number;
307
311
  } | undefined;
312
+ label?: string | undefined;
313
+ position?: {
314
+ x: number;
315
+ y: number;
316
+ } | undefined;
308
317
  style?: {
309
318
  fill?: string | {
310
319
  raw: string;
@@ -339,11 +348,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
339
348
  rotation?: number | undefined;
340
349
  locked?: boolean | undefined;
341
350
  hidden?: boolean | undefined;
342
- label?: string | undefined;
343
- position?: {
344
- x: number;
345
- y: number;
346
- } | undefined;
351
+ collapsed?: boolean | undefined;
347
352
  };
348
353
  }>, z.ZodObject<{
349
354
  op: z.ZodLiteral<"updateNode">;
@@ -490,6 +495,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
490
495
  rotation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
491
496
  locked: z.ZodOptional<z.ZodBoolean>;
492
497
  hidden: z.ZodOptional<z.ZodBoolean>;
498
+ collapsed: z.ZodOptional<z.ZodBoolean>;
493
499
  data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
494
500
  }, "strict", z.ZodTypeAny, {
495
501
  data?: Record<string, unknown> | null | undefined;
@@ -499,6 +505,11 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
499
505
  width: number;
500
506
  height: number;
501
507
  } | undefined;
508
+ label?: string | undefined;
509
+ position?: {
510
+ x: number;
511
+ y: number;
512
+ } | undefined;
502
513
  style?: {
503
514
  fill?: string | {
504
515
  raw: string;
@@ -533,11 +544,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
533
544
  rotation?: number | null | undefined;
534
545
  locked?: boolean | undefined;
535
546
  hidden?: boolean | undefined;
536
- label?: string | undefined;
537
- position?: {
538
- x: number;
539
- y: number;
540
- } | undefined;
547
+ collapsed?: boolean | undefined;
541
548
  }, {
542
549
  data?: Record<string, unknown> | null | undefined;
543
550
  type?: string | undefined;
@@ -546,6 +553,11 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
546
553
  width: number;
547
554
  height: number;
548
555
  } | undefined;
556
+ label?: string | undefined;
557
+ position?: {
558
+ x: number;
559
+ y: number;
560
+ } | undefined;
549
561
  style?: {
550
562
  fill?: string | {
551
563
  raw: string;
@@ -580,11 +592,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
580
592
  rotation?: number | null | undefined;
581
593
  locked?: boolean | undefined;
582
594
  hidden?: boolean | undefined;
583
- label?: string | undefined;
584
- position?: {
585
- x: number;
586
- y: number;
587
- } | undefined;
595
+ collapsed?: boolean | undefined;
588
596
  }>;
589
597
  }, "strict", z.ZodTypeAny, {
590
598
  id: string;
@@ -597,6 +605,11 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
597
605
  width: number;
598
606
  height: number;
599
607
  } | undefined;
608
+ label?: string | undefined;
609
+ position?: {
610
+ x: number;
611
+ y: number;
612
+ } | undefined;
600
613
  style?: {
601
614
  fill?: string | {
602
615
  raw: string;
@@ -631,11 +644,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
631
644
  rotation?: number | null | undefined;
632
645
  locked?: boolean | undefined;
633
646
  hidden?: boolean | undefined;
634
- label?: string | undefined;
635
- position?: {
636
- x: number;
637
- y: number;
638
- } | undefined;
647
+ collapsed?: boolean | undefined;
639
648
  };
640
649
  }, {
641
650
  id: string;
@@ -648,6 +657,11 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
648
657
  width: number;
649
658
  height: number;
650
659
  } | undefined;
660
+ label?: string | undefined;
661
+ position?: {
662
+ x: number;
663
+ y: number;
664
+ } | undefined;
651
665
  style?: {
652
666
  fill?: string | {
653
667
  raw: string;
@@ -682,11 +696,7 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
682
696
  rotation?: number | null | undefined;
683
697
  locked?: boolean | undefined;
684
698
  hidden?: boolean | undefined;
685
- label?: string | undefined;
686
- position?: {
687
- x: number;
688
- y: number;
689
- } | undefined;
699
+ collapsed?: boolean | undefined;
690
700
  };
691
701
  }>, z.ZodObject<{
692
702
  op: z.ZodLiteral<"removeNode">;
@@ -718,71 +728,86 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
718
728
  }, {
719
729
  token: string;
720
730
  }>]>>;
721
- routing: z.ZodOptional<z.ZodEnum<["orthogonal", "straight", "curved"]>>;
731
+ routing: z.ZodOptional<z.ZodEnum<["orthogonal", "straight", "curved", "smart"]>>;
722
732
  markerEnd: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval"]>>;
723
733
  markerStart: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval"]>>;
734
+ sourceSide: z.ZodOptional<z.ZodEnum<["top", "right", "bottom", "left"]>>;
735
+ targetSide: z.ZodOptional<z.ZodEnum<["top", "right", "bottom", "left"]>>;
736
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
724
737
  }, "strict", z.ZodTypeAny, {
725
738
  source: string;
726
739
  target: string;
740
+ data?: Record<string, unknown> | undefined;
727
741
  id?: string | undefined;
742
+ label?: string | undefined;
743
+ semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
728
744
  color?: string | {
729
745
  raw: string;
730
746
  } | {
731
747
  token: string;
732
748
  } | undefined;
733
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
734
- label?: string | undefined;
735
- semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
736
- routing?: "orthogonal" | "straight" | "curved" | undefined;
749
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
737
750
  markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
751
+ markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
752
+ sourceSide?: "left" | "right" | "top" | "bottom" | undefined;
753
+ targetSide?: "left" | "right" | "top" | "bottom" | undefined;
738
754
  }, {
739
755
  source: string;
740
756
  target: string;
757
+ data?: Record<string, unknown> | undefined;
741
758
  id?: string | undefined;
759
+ label?: string | undefined;
760
+ semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
742
761
  color?: string | {
743
762
  raw: string;
744
763
  } | {
745
764
  token: string;
746
765
  } | undefined;
747
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
748
- label?: string | undefined;
749
- semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
750
- routing?: "orthogonal" | "straight" | "curved" | undefined;
766
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
751
767
  markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
768
+ markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
769
+ sourceSide?: "left" | "right" | "top" | "bottom" | undefined;
770
+ targetSide?: "left" | "right" | "top" | "bottom" | undefined;
752
771
  }>;
753
772
  }, "strict", z.ZodTypeAny, {
754
773
  op: "addEdge";
755
774
  edge: {
756
775
  source: string;
757
776
  target: string;
777
+ data?: Record<string, unknown> | undefined;
758
778
  id?: string | undefined;
779
+ label?: string | undefined;
780
+ semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
759
781
  color?: string | {
760
782
  raw: string;
761
783
  } | {
762
784
  token: string;
763
785
  } | undefined;
764
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
765
- label?: string | undefined;
766
- semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
767
- routing?: "orthogonal" | "straight" | "curved" | undefined;
786
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
768
787
  markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
788
+ markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
789
+ sourceSide?: "left" | "right" | "top" | "bottom" | undefined;
790
+ targetSide?: "left" | "right" | "top" | "bottom" | undefined;
769
791
  };
770
792
  }, {
771
793
  op: "addEdge";
772
794
  edge: {
773
795
  source: string;
774
796
  target: string;
797
+ data?: Record<string, unknown> | undefined;
775
798
  id?: string | undefined;
799
+ label?: string | undefined;
800
+ semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
776
801
  color?: string | {
777
802
  raw: string;
778
803
  } | {
779
804
  token: string;
780
805
  } | undefined;
781
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
782
- label?: string | undefined;
783
- semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
784
- routing?: "orthogonal" | "straight" | "curved" | undefined;
806
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
785
807
  markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
808
+ markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
809
+ sourceSide?: "left" | "right" | "top" | "bottom" | undefined;
810
+ targetSide?: "left" | "right" | "top" | "bottom" | undefined;
786
811
  };
787
812
  }>, z.ZodObject<{
788
813
  op: z.ZodLiteral<"updateEdge">;
@@ -805,69 +830,84 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
805
830
  }, {
806
831
  token: string;
807
832
  }>]>>>;
808
- routing: z.ZodOptional<z.ZodEnum<["orthogonal", "straight", "curved"]>>;
833
+ routing: z.ZodOptional<z.ZodEnum<["orthogonal", "straight", "curved", "smart"]>>;
809
834
  markerEnd: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval"]>>;
810
835
  markerStart: z.ZodOptional<z.ZodEnum<["none", "classic", "classicThin", "open", "block", "diamond", "oval"]>>;
836
+ sourceSide: z.ZodOptional<z.ZodNullable<z.ZodEnum<["top", "right", "bottom", "left"]>>>;
837
+ targetSide: z.ZodOptional<z.ZodNullable<z.ZodEnum<["top", "right", "bottom", "left"]>>>;
838
+ data: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
811
839
  }, "strict", z.ZodTypeAny, {
840
+ data?: Record<string, unknown> | null | undefined;
841
+ source?: string | undefined;
842
+ label?: string | undefined;
843
+ target?: string | undefined;
844
+ semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
812
845
  color?: string | {
813
846
  raw: string;
814
847
  } | {
815
848
  token: string;
816
849
  } | null | undefined;
850
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
851
+ markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
817
852
  markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
853
+ sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
854
+ targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
855
+ }, {
856
+ data?: Record<string, unknown> | null | undefined;
818
857
  source?: string | undefined;
819
858
  label?: string | undefined;
820
859
  target?: string | undefined;
821
860
  semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
822
- routing?: "orthogonal" | "straight" | "curved" | undefined;
823
- markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
824
- }, {
825
861
  color?: string | {
826
862
  raw: string;
827
863
  } | {
828
864
  token: string;
829
865
  } | null | undefined;
830
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
831
- source?: string | undefined;
832
- label?: string | undefined;
833
- target?: string | undefined;
834
- semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
835
- routing?: "orthogonal" | "straight" | "curved" | undefined;
866
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
836
867
  markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
868
+ markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
869
+ sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
870
+ targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
837
871
  }>;
838
872
  }, "strict", z.ZodTypeAny, {
839
873
  id: string;
840
874
  op: "updateEdge";
841
875
  changes: {
876
+ data?: Record<string, unknown> | null | undefined;
877
+ source?: string | undefined;
878
+ label?: string | undefined;
879
+ target?: string | undefined;
880
+ semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
842
881
  color?: string | {
843
882
  raw: string;
844
883
  } | {
845
884
  token: string;
846
885
  } | null | undefined;
847
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
848
- source?: string | undefined;
849
- label?: string | undefined;
850
- target?: string | undefined;
851
- semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
852
- routing?: "orthogonal" | "straight" | "curved" | undefined;
886
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
853
887
  markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
888
+ markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
889
+ sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
890
+ targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
854
891
  };
855
892
  }, {
856
893
  id: string;
857
894
  op: "updateEdge";
858
895
  changes: {
896
+ data?: Record<string, unknown> | null | undefined;
897
+ source?: string | undefined;
898
+ label?: string | undefined;
899
+ target?: string | undefined;
900
+ semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
859
901
  color?: string | {
860
902
  raw: string;
861
903
  } | {
862
904
  token: string;
863
905
  } | null | undefined;
864
- markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
865
- source?: string | undefined;
866
- label?: string | undefined;
867
- target?: string | undefined;
868
- semantic?: "sync" | "async" | "fallback" | "bus" | undefined;
869
- routing?: "orthogonal" | "straight" | "curved" | undefined;
906
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | undefined;
870
907
  markerEnd?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
908
+ markerStart?: "none" | "classic" | "classicThin" | "open" | "block" | "diamond" | "oval" | undefined;
909
+ sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
910
+ targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
871
911
  };
872
912
  }>, z.ZodObject<{
873
913
  op: z.ZodLiteral<"removeEdge">;
@@ -887,6 +927,179 @@ export declare const diagramPatchOpSchema: z.ZodDiscriminatedUnion<"op", [z.ZodO
887
927
  }, {
888
928
  title: string;
889
929
  op: "setTitle";
930
+ }>, z.ZodObject<{
931
+ op: z.ZodLiteral<"moveNode">;
932
+ id: z.ZodString;
933
+ position: z.ZodObject<{
934
+ x: z.ZodNumber;
935
+ y: z.ZodNumber;
936
+ }, "strict", z.ZodTypeAny, {
937
+ x: number;
938
+ y: number;
939
+ }, {
940
+ x: number;
941
+ y: number;
942
+ }>;
943
+ }, "strict", z.ZodTypeAny, {
944
+ id: string;
945
+ position: {
946
+ x: number;
947
+ y: number;
948
+ };
949
+ op: "moveNode";
950
+ }, {
951
+ id: string;
952
+ position: {
953
+ x: number;
954
+ y: number;
955
+ };
956
+ op: "moveNode";
957
+ }>, z.ZodObject<{
958
+ op: z.ZodLiteral<"reparent">;
959
+ id: z.ZodString;
960
+ parent: z.ZodNullable<z.ZodString>;
961
+ position: z.ZodOptional<z.ZodObject<{
962
+ x: z.ZodNumber;
963
+ y: z.ZodNumber;
964
+ }, "strict", z.ZodTypeAny, {
965
+ x: number;
966
+ y: number;
967
+ }, {
968
+ x: number;
969
+ y: number;
970
+ }>>;
971
+ }, "strict", z.ZodTypeAny, {
972
+ id: string;
973
+ parent: string | null;
974
+ op: "reparent";
975
+ position?: {
976
+ x: number;
977
+ y: number;
978
+ } | undefined;
979
+ }, {
980
+ id: string;
981
+ parent: string | null;
982
+ op: "reparent";
983
+ position?: {
984
+ x: number;
985
+ y: number;
986
+ } | undefined;
987
+ }>, z.ZodObject<{
988
+ op: z.ZodLiteral<"setEdgeRoute">;
989
+ id: z.ZodString;
990
+ routing: z.ZodOptional<z.ZodNullable<z.ZodEnum<["orthogonal", "straight", "curved", "smart"]>>>;
991
+ sourceSide: z.ZodOptional<z.ZodNullable<z.ZodEnum<["top", "right", "bottom", "left"]>>>;
992
+ targetSide: z.ZodOptional<z.ZodNullable<z.ZodEnum<["top", "right", "bottom", "left"]>>>;
993
+ waypoints: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
994
+ x: z.ZodNumber;
995
+ y: z.ZodNumber;
996
+ }, "strict", z.ZodTypeAny, {
997
+ x: number;
998
+ y: number;
999
+ }, {
1000
+ x: number;
1001
+ y: number;
1002
+ }>, "many">>>;
1003
+ }, "strict", z.ZodTypeAny, {
1004
+ id: string;
1005
+ op: "setEdgeRoute";
1006
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | null | undefined;
1007
+ sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
1008
+ targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
1009
+ waypoints?: {
1010
+ x: number;
1011
+ y: number;
1012
+ }[] | null | undefined;
1013
+ }, {
1014
+ id: string;
1015
+ op: "setEdgeRoute";
1016
+ routing?: "orthogonal" | "straight" | "curved" | "smart" | null | undefined;
1017
+ sourceSide?: "left" | "right" | "top" | "bottom" | null | undefined;
1018
+ targetSide?: "left" | "right" | "top" | "bottom" | null | undefined;
1019
+ waypoints?: {
1020
+ x: number;
1021
+ y: number;
1022
+ }[] | null | undefined;
1023
+ }>, z.ZodObject<{
1024
+ op: z.ZodLiteral<"reorder">;
1025
+ id: z.ZodString;
1026
+ index: z.ZodUnion<[z.ZodNumber, z.ZodLiteral<"front">, z.ZodLiteral<"back">]>;
1027
+ }, "strict", z.ZodTypeAny, {
1028
+ id: string;
1029
+ op: "reorder";
1030
+ index: number | "front" | "back";
1031
+ }, {
1032
+ id: string;
1033
+ op: "reorder";
1034
+ index: number | "front" | "back";
1035
+ }>, z.ZodObject<{
1036
+ op: z.ZodLiteral<"setCanvas">;
1037
+ canvas: z.ZodObject<{
1038
+ background: z.ZodOptional<z.ZodNullable<z.ZodEnum<["grid", "dots", "blank"]>>>;
1039
+ gridSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1040
+ defaultRouting: z.ZodOptional<z.ZodNullable<z.ZodEnum<["orthogonal", "straight", "curved", "smart"]>>>;
1041
+ }, "strict", z.ZodTypeAny, {
1042
+ background?: "grid" | "dots" | "blank" | null | undefined;
1043
+ gridSize?: number | null | undefined;
1044
+ defaultRouting?: "orthogonal" | "straight" | "curved" | "smart" | null | undefined;
1045
+ }, {
1046
+ background?: "grid" | "dots" | "blank" | null | undefined;
1047
+ gridSize?: number | null | undefined;
1048
+ defaultRouting?: "orthogonal" | "straight" | "curved" | "smart" | null | undefined;
1049
+ }>;
1050
+ }, "strict", z.ZodTypeAny, {
1051
+ canvas: {
1052
+ background?: "grid" | "dots" | "blank" | null | undefined;
1053
+ gridSize?: number | null | undefined;
1054
+ defaultRouting?: "orthogonal" | "straight" | "curved" | "smart" | null | undefined;
1055
+ };
1056
+ op: "setCanvas";
1057
+ }, {
1058
+ canvas: {
1059
+ background?: "grid" | "dots" | "blank" | null | undefined;
1060
+ gridSize?: number | null | undefined;
1061
+ defaultRouting?: "orthogonal" | "straight" | "curved" | "smart" | null | undefined;
1062
+ };
1063
+ op: "setCanvas";
1064
+ }>, z.ZodObject<{
1065
+ op: z.ZodLiteral<"group">;
1066
+ ids: z.ZodArray<z.ZodString, "many">;
1067
+ type: z.ZodOptional<z.ZodString>;
1068
+ label: z.ZodOptional<z.ZodString>;
1069
+ id: z.ZodOptional<z.ZodString>;
1070
+ }, "strict", z.ZodTypeAny, {
1071
+ op: "group";
1072
+ ids: string[];
1073
+ type?: string | undefined;
1074
+ id?: string | undefined;
1075
+ label?: string | undefined;
1076
+ }, {
1077
+ op: "group";
1078
+ ids: string[];
1079
+ type?: string | undefined;
1080
+ id?: string | undefined;
1081
+ label?: string | undefined;
1082
+ }>, z.ZodObject<{
1083
+ op: z.ZodLiteral<"ungroup">;
1084
+ id: z.ZodString;
1085
+ }, "strict", z.ZodTypeAny, {
1086
+ id: string;
1087
+ op: "ungroup";
1088
+ }, {
1089
+ id: string;
1090
+ op: "ungroup";
1091
+ }>, z.ZodObject<{
1092
+ op: z.ZodLiteral<"relayout">;
1093
+ scope: z.ZodEnum<["new", "all"]>;
1094
+ direction: z.ZodOptional<z.ZodEnum<["DOWN", "RIGHT", "UP", "LEFT"]>>;
1095
+ }, "strict", z.ZodTypeAny, {
1096
+ scope: "all" | "new";
1097
+ op: "relayout";
1098
+ direction?: "DOWN" | "RIGHT" | "UP" | "LEFT" | undefined;
1099
+ }, {
1100
+ scope: "all" | "new";
1101
+ op: "relayout";
1102
+ direction?: "DOWN" | "RIGHT" | "UP" | "LEFT" | undefined;
890
1103
  }>]>;
891
1104
  export type DiagramPatchOp = z.infer<typeof diagramPatchOpSchema>;
892
1105
  export interface PatchResult {
@@ -896,6 +1109,11 @@ export interface PatchResult {
896
1109
  removedEdgeIds: string[];
897
1110
  reroutedEdgeIds: string[];
898
1111
  warnings: string[];
1112
+ relayout?: {
1113
+ scope: "new" | "all";
1114
+ direction?: LayoutDirection;
1115
+ };
1116
+ idMap: Record<string, string>;
899
1117
  }
900
1118
  export declare const applyDiagramPatch: (doc: DiagramDocument, ops: DiagramPatchOp[], options?: {
901
1119
  strictTypes?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"patch.d.ts","sourceRoot":"","sources":["../../../src/domain/diagram/patch.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,eAAe,EAGrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8CxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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