@maycombhq/sdk 2.0.0-beta.27 → 2.0.0-beta.28

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/npm/core/api.d.ts CHANGED
@@ -566,8 +566,18 @@ import { z } from "zod";
566
566
  * one edited by hand refuses the run, 409 code `assistant-files-edited`). A run's view carries
567
567
  * `problems`: a repo the run stopped on after two Copilot sessions added nothing, with what
568
568
  * verify rejected and why. Additive only.
569
+ * 3.13.0 (beta.28, the owner's decisions of 2026-11-12): Delete this link on the canvas. POST
570
+ * /api/links/delete writes a curated suppress (`{ action: suppress, target: <Interface id>,
571
+ * value: null }`, as `atticus catalog edits --curate` writes for a deleted generated file) of
572
+ * every Interface behind a link, then builds, as one local job; GET /api/links/deleted lists the
573
+ * links deleted so, and POST /api/links/deleted/undo removes one's decisions and builds again.
574
+ * Edit the map: POST /api/map/edits takes the changes staged on the canvas (deletes as above,
575
+ * adds as POST /api/declared-links writes them, redirects as both), checks them all (422 with
576
+ * `problems` by place, nothing written), writes them, then builds once, as one local job whose
577
+ * result is `MapEditsResult` (with the caller repos they touch). A problem may carry
578
+ * `problems`. Additive only.
569
579
  */
570
- export declare const API_VERSION = "3.12.0";
580
+ export declare const API_VERSION = "3.13.0";
571
581
  export declare const DEFAULT_PORT = 4321;
572
582
  /** RFC 9457 problem details, used for every error. */
573
583
  /**
@@ -601,6 +611,10 @@ export declare const Problem: z.ZodObject<{
601
611
  file: z.ZodString;
602
612
  }, z.core.$strip>>>;
603
613
  code: z.ZodOptional<z.ZodString>;
614
+ problems: z.ZodOptional<z.ZodArray<z.ZodObject<{
615
+ edit: z.ZodNumber;
616
+ message: z.ZodString;
617
+ }, z.core.$strip>>>;
604
618
  }, z.core.$strip>;
605
619
  export declare const CatalogRecord: z.ZodUnion<[z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, ...z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>[]]>;
606
620
  export declare const RecordPage: z.ZodObject<{
@@ -4604,6 +4618,368 @@ export declare const CatalogPruneRequest: z.ZodObject<{
4604
4618
  count: z.ZodNumber;
4605
4619
  plan: z.ZodString;
4606
4620
  }, z.core.$strict>;
4621
+ /**
4622
+ * 3.13.0 (beta.28, the owner's decision of 2026-11-12): Delete this link on the canvas. POST
4623
+ * /api/links/delete takes every Interface behind a link (GET /api/graph/edge-calls when the view
4624
+ * lists fewer) and its two ends' names, as the inline confirm listed them.
4625
+ */
4626
+ export declare const LinkDeleteRequest: z.ZodObject<{
4627
+ interfaces: z.ZodArray<z.ZodString>;
4628
+ from: z.ZodString;
4629
+ to: z.ZodString;
4630
+ }, z.core.$strict>;
4631
+ export type LinkDeleteRequestT = z.infer<typeof LinkDeleteRequest>;
4632
+ /** 3.13.0: GET /api/links/deleted, the links deleted on the canvas, each with its decisions. */
4633
+ export declare const DeletedLinksView: z.ZodObject<{
4634
+ links: z.ZodArray<z.ZodObject<{
4635
+ from: z.ZodString;
4636
+ to: z.ZodString;
4637
+ calls: z.ZodNumber;
4638
+ by: z.ZodString;
4639
+ at: z.ZodString;
4640
+ gone: z.ZodOptional<z.ZodBoolean>;
4641
+ redirect: z.ZodOptional<z.ZodBoolean>;
4642
+ decisions: z.ZodArray<z.ZodObject<{
4643
+ id: z.ZodString;
4644
+ target: z.ZodString;
4645
+ file: z.ZodString;
4646
+ gone: z.ZodOptional<z.ZodBoolean>;
4647
+ }, z.core.$strip>>;
4648
+ }, z.core.$strip>>;
4649
+ }, z.core.$strip>;
4650
+ export type DeletedLinksViewT = z.infer<typeof DeletedLinksView>;
4651
+ /** 3.13.0: POST /api/links/deleted/undo, Bring back: the decisions of one deleted link. */
4652
+ export declare const LinkUndeleteRequest: z.ZodObject<{
4653
+ decisions: z.ZodArray<z.ZodString>;
4654
+ }, z.core.$strict>;
4655
+ export type LinkUndeleteRequestT = z.infer<typeof LinkUndeleteRequest>;
4656
+ /**
4657
+ * 3.13.0 (beta.28, Edit the map): a link added on the canvas, exactly what Declare a link… writes
4658
+ * (POST /api/declared-links, without `preview`): a topic the system publishes or listens on, or a
4659
+ * gateway route it calls, in the profile that has the system.
4660
+ */
4661
+ export declare const MapEditAdd: z.ZodDiscriminatedUnion<[z.ZodObject<{
4662
+ kind: z.ZodLiteral<"topic">;
4663
+ system: z.ZodString;
4664
+ topic: z.ZodString;
4665
+ side: z.ZodEnum<{
4666
+ publishes: "publishes";
4667
+ listens: "listens";
4668
+ }>;
4669
+ }, z.core.$strict>, z.ZodObject<{
4670
+ kind: z.ZodLiteral<"call">;
4671
+ system: z.ZodString;
4672
+ route: z.ZodString;
4673
+ }, z.core.$strict>], "kind">;
4674
+ export type MapEditAddT = z.infer<typeof MapEditAdd>;
4675
+ /**
4676
+ * 3.13.0: a link added from a repo's box, exactly what Connect to… writes (POST /api/links/connect
4677
+ * without `rule` and `preview`): the person's pairing of each of the repo's calls named with an
4678
+ * API of the other box, one `link` line each in `facts/<from>.corrections.jsonl` (ADR 0174).
4679
+ */
4680
+ export declare const MapEditPair: z.ZodObject<{
4681
+ from: z.ZodString;
4682
+ to: z.ZodObject<{
4683
+ repo: z.ZodOptional<z.ZodString>;
4684
+ system: z.ZodOptional<z.ZodString>;
4685
+ }, z.core.$strict>;
4686
+ pairs: z.ZodArray<z.ZodObject<{
4687
+ call: z.ZodString;
4688
+ api: z.ZodString;
4689
+ }, z.core.$strip>>;
4690
+ }, z.core.$strict>;
4691
+ export type MapEditPairT = z.infer<typeof MapEditPair>;
4692
+ /**
4693
+ * 3.13.0: one change staged on the canvas. `delete` is Delete this link's (every Interface behind
4694
+ * the link and its two ends); an add is Declare a link…'s (`add`, from a system's box) or Connect
4695
+ * to…'s (`pair`, from a repo's box); `redirect` is a delete and an add together, one row.
4696
+ */
4697
+ /**
4698
+ * 3.13.0: an arrow taken away, as Delete this link takes it: every Interface behind it (an empty
4699
+ * list is said as the change's problem, by its place) and its two ends.
4700
+ */
4701
+ export declare const MapEditDelete: z.ZodObject<{
4702
+ interfaces: z.ZodArray<z.ZodString>;
4703
+ from: z.ZodString;
4704
+ to: z.ZodString;
4705
+ }, z.core.$strict>;
4706
+ export declare const MapEdit: z.ZodUnion<readonly [z.ZodObject<{
4707
+ kind: z.ZodLiteral<"delete">;
4708
+ delete: z.ZodObject<{
4709
+ interfaces: z.ZodArray<z.ZodString>;
4710
+ from: z.ZodString;
4711
+ to: z.ZodString;
4712
+ }, z.core.$strict>;
4713
+ }, z.core.$strict>, z.ZodObject<{
4714
+ kind: z.ZodLiteral<"add">;
4715
+ add: z.ZodDiscriminatedUnion<[z.ZodObject<{
4716
+ kind: z.ZodLiteral<"topic">;
4717
+ system: z.ZodString;
4718
+ topic: z.ZodString;
4719
+ side: z.ZodEnum<{
4720
+ publishes: "publishes";
4721
+ listens: "listens";
4722
+ }>;
4723
+ }, z.core.$strict>, z.ZodObject<{
4724
+ kind: z.ZodLiteral<"call">;
4725
+ system: z.ZodString;
4726
+ route: z.ZodString;
4727
+ }, z.core.$strict>], "kind">;
4728
+ }, z.core.$strict>, z.ZodObject<{
4729
+ kind: z.ZodLiteral<"add">;
4730
+ pair: z.ZodObject<{
4731
+ from: z.ZodString;
4732
+ to: z.ZodObject<{
4733
+ repo: z.ZodOptional<z.ZodString>;
4734
+ system: z.ZodOptional<z.ZodString>;
4735
+ }, z.core.$strict>;
4736
+ pairs: z.ZodArray<z.ZodObject<{
4737
+ call: z.ZodString;
4738
+ api: z.ZodString;
4739
+ }, z.core.$strip>>;
4740
+ }, z.core.$strict>;
4741
+ }, z.core.$strict>, z.ZodObject<{
4742
+ kind: z.ZodLiteral<"redirect">;
4743
+ delete: z.ZodObject<{
4744
+ interfaces: z.ZodArray<z.ZodString>;
4745
+ from: z.ZodString;
4746
+ to: z.ZodString;
4747
+ }, z.core.$strict>;
4748
+ add: z.ZodDiscriminatedUnion<[z.ZodObject<{
4749
+ kind: z.ZodLiteral<"topic">;
4750
+ system: z.ZodString;
4751
+ topic: z.ZodString;
4752
+ side: z.ZodEnum<{
4753
+ publishes: "publishes";
4754
+ listens: "listens";
4755
+ }>;
4756
+ }, z.core.$strict>, z.ZodObject<{
4757
+ kind: z.ZodLiteral<"call">;
4758
+ system: z.ZodString;
4759
+ route: z.ZodString;
4760
+ }, z.core.$strict>], "kind">;
4761
+ }, z.core.$strict>, z.ZodObject<{
4762
+ kind: z.ZodLiteral<"redirect">;
4763
+ delete: z.ZodObject<{
4764
+ interfaces: z.ZodArray<z.ZodString>;
4765
+ from: z.ZodString;
4766
+ to: z.ZodString;
4767
+ }, z.core.$strict>;
4768
+ pair: z.ZodObject<{
4769
+ from: z.ZodString;
4770
+ to: z.ZodObject<{
4771
+ repo: z.ZodOptional<z.ZodString>;
4772
+ system: z.ZodOptional<z.ZodString>;
4773
+ }, z.core.$strict>;
4774
+ pairs: z.ZodArray<z.ZodObject<{
4775
+ call: z.ZodString;
4776
+ api: z.ZodString;
4777
+ }, z.core.$strip>>;
4778
+ }, z.core.$strict>;
4779
+ }, z.core.$strict>]>;
4780
+ export type MapEditT = z.infer<typeof MapEdit>;
4781
+ /** 3.13.0: POST /api/map/edits, every change staged, applied together with one build. */
4782
+ export declare const MapEditsRequest: z.ZodObject<{
4783
+ edits: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
4784
+ kind: z.ZodLiteral<"delete">;
4785
+ delete: z.ZodObject<{
4786
+ interfaces: z.ZodArray<z.ZodString>;
4787
+ from: z.ZodString;
4788
+ to: z.ZodString;
4789
+ }, z.core.$strict>;
4790
+ }, z.core.$strict>, z.ZodObject<{
4791
+ kind: z.ZodLiteral<"add">;
4792
+ add: z.ZodDiscriminatedUnion<[z.ZodObject<{
4793
+ kind: z.ZodLiteral<"topic">;
4794
+ system: z.ZodString;
4795
+ topic: z.ZodString;
4796
+ side: z.ZodEnum<{
4797
+ publishes: "publishes";
4798
+ listens: "listens";
4799
+ }>;
4800
+ }, z.core.$strict>, z.ZodObject<{
4801
+ kind: z.ZodLiteral<"call">;
4802
+ system: z.ZodString;
4803
+ route: z.ZodString;
4804
+ }, z.core.$strict>], "kind">;
4805
+ }, z.core.$strict>, z.ZodObject<{
4806
+ kind: z.ZodLiteral<"add">;
4807
+ pair: z.ZodObject<{
4808
+ from: z.ZodString;
4809
+ to: z.ZodObject<{
4810
+ repo: z.ZodOptional<z.ZodString>;
4811
+ system: z.ZodOptional<z.ZodString>;
4812
+ }, z.core.$strict>;
4813
+ pairs: z.ZodArray<z.ZodObject<{
4814
+ call: z.ZodString;
4815
+ api: z.ZodString;
4816
+ }, z.core.$strip>>;
4817
+ }, z.core.$strict>;
4818
+ }, z.core.$strict>, z.ZodObject<{
4819
+ kind: z.ZodLiteral<"redirect">;
4820
+ delete: z.ZodObject<{
4821
+ interfaces: z.ZodArray<z.ZodString>;
4822
+ from: z.ZodString;
4823
+ to: z.ZodString;
4824
+ }, z.core.$strict>;
4825
+ add: z.ZodDiscriminatedUnion<[z.ZodObject<{
4826
+ kind: z.ZodLiteral<"topic">;
4827
+ system: z.ZodString;
4828
+ topic: z.ZodString;
4829
+ side: z.ZodEnum<{
4830
+ publishes: "publishes";
4831
+ listens: "listens";
4832
+ }>;
4833
+ }, z.core.$strict>, z.ZodObject<{
4834
+ kind: z.ZodLiteral<"call">;
4835
+ system: z.ZodString;
4836
+ route: z.ZodString;
4837
+ }, z.core.$strict>], "kind">;
4838
+ }, z.core.$strict>, z.ZodObject<{
4839
+ kind: z.ZodLiteral<"redirect">;
4840
+ delete: z.ZodObject<{
4841
+ interfaces: z.ZodArray<z.ZodString>;
4842
+ from: z.ZodString;
4843
+ to: z.ZodString;
4844
+ }, z.core.$strict>;
4845
+ pair: z.ZodObject<{
4846
+ from: z.ZodString;
4847
+ to: z.ZodObject<{
4848
+ repo: z.ZodOptional<z.ZodString>;
4849
+ system: z.ZodOptional<z.ZodString>;
4850
+ }, z.core.$strict>;
4851
+ pairs: z.ZodArray<z.ZodObject<{
4852
+ call: z.ZodString;
4853
+ api: z.ZodString;
4854
+ }, z.core.$strip>>;
4855
+ }, z.core.$strict>;
4856
+ }, z.core.$strict>]>>;
4857
+ }, z.core.$strict>;
4858
+ export type MapEditsRequestT = z.infer<typeof MapEditsRequest>;
4859
+ /** 3.13.0: a 422 of POST /api/map/edits: each change that can't be made, by its place (from 0). */
4860
+ export declare const MapEditProblem: z.ZodObject<{
4861
+ edit: z.ZodNumber;
4862
+ message: z.ZodString;
4863
+ }, z.core.$strip>;
4864
+ export type MapEditProblemT = z.infer<typeof MapEditProblem>;
4865
+ /**
4866
+ * 3.13.0: the result of POST /api/map/edits's job (GET /api/jobs/{id}'s `result`): its code and
4867
+ * lines, each change's outcome by its place (`saved`; `failed`, with why; `taken-back`, written
4868
+ * then removed because a later one failed; `not-tried`), whether the catalog was built, the
4869
+ * caller repos the changes touch (each deleted link's caller's repo, each pairing's repo, each
4870
+ * declaration's system's repos in the manifests) for one Copilot Read it again, the repos a new
4871
+ * link still waits on, and a refused build's listing.
4872
+ */
4873
+ export declare const MapEditsResult: z.ZodObject<{
4874
+ code: z.ZodNumber;
4875
+ lines: z.ZodArray<z.ZodString>;
4876
+ edits: z.ZodArray<z.ZodObject<{
4877
+ edit: z.ZodNumber;
4878
+ kind: z.ZodEnum<{
4879
+ delete: "delete";
4880
+ redirect: "redirect";
4881
+ add: "add";
4882
+ }>;
4883
+ state: z.ZodEnum<{
4884
+ failed: "failed";
4885
+ saved: "saved";
4886
+ "taken-back": "taken-back";
4887
+ "not-tried": "not-tried";
4888
+ }>;
4889
+ message: z.ZodOptional<z.ZodString>;
4890
+ }, z.core.$strip>>;
4891
+ built: z.ZodBoolean;
4892
+ callers: z.ZodArray<z.ZodString>;
4893
+ waitsOn: z.ZodArray<z.ZodString>;
4894
+ refused: z.ZodOptional<z.ZodObject<{
4895
+ reasons: z.ZodArray<z.ZodEnum<{
4896
+ "nothing-read": "nothing-read";
4897
+ empty: "empty";
4898
+ "unexplained-removals": "unexplained-removals";
4899
+ "large-removals": "large-removals";
4900
+ "hand-edits": "hand-edits";
4901
+ "not-upgraded": "not-upgraded";
4902
+ }>>;
4903
+ message: z.ZodString;
4904
+ removals: z.ZodOptional<z.ZodArray<z.ZodObject<{
4905
+ path: z.ZodString;
4906
+ kind: z.ZodString;
4907
+ id: z.ZodString;
4908
+ repos: z.ZodArray<z.ZodString>;
4909
+ explainedBy: z.ZodArray<z.ZodString>;
4910
+ reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
4911
+ input: "input";
4912
+ build: "build";
4913
+ archived: "archived";
4914
+ manifest: "manifest";
4915
+ curated: "curated";
4916
+ slot: "slot";
4917
+ }>>>;
4918
+ inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
4919
+ what: z.ZodEnum<{
4920
+ other: "other";
4921
+ inputs: "inputs";
4922
+ "org-pack": "org-pack";
4923
+ proposals: "proposals";
4924
+ shared: "shared";
4925
+ answers: "answers";
4926
+ pairings: "pairings";
4927
+ curated: "curated";
4928
+ traffic: "traffic";
4929
+ federated: "federated";
4930
+ }>;
4931
+ path: z.ZodString;
4932
+ }, z.core.$strip>>>;
4933
+ }, z.core.$strip>>>;
4934
+ unexplained: z.ZodOptional<z.ZodArray<z.ZodObject<{
4935
+ path: z.ZodString;
4936
+ kind: z.ZodString;
4937
+ id: z.ZodString;
4938
+ repos: z.ZodArray<z.ZodString>;
4939
+ explainedBy: z.ZodArray<z.ZodString>;
4940
+ reasons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
4941
+ input: "input";
4942
+ build: "build";
4943
+ archived: "archived";
4944
+ manifest: "manifest";
4945
+ curated: "curated";
4946
+ slot: "slot";
4947
+ }>>>;
4948
+ inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
4949
+ what: z.ZodEnum<{
4950
+ other: "other";
4951
+ inputs: "inputs";
4952
+ "org-pack": "org-pack";
4953
+ proposals: "proposals";
4954
+ shared: "shared";
4955
+ answers: "answers";
4956
+ pairings: "pairings";
4957
+ curated: "curated";
4958
+ traffic: "traffic";
4959
+ federated: "federated";
4960
+ }>;
4961
+ path: z.ZodString;
4962
+ }, z.core.$strip>>>;
4963
+ }, z.core.$strip>>>;
4964
+ allowRemovals: z.ZodOptional<z.ZodNumber>;
4965
+ edits: z.ZodOptional<z.ZodArray<z.ZodObject<{
4966
+ path: z.ZodString;
4967
+ how: z.ZodEnum<{
4968
+ added: "added";
4969
+ changed: "changed";
4970
+ deleted: "deleted";
4971
+ }>;
4972
+ }, z.core.$strip>>>;
4973
+ discardEdits: z.ZodOptional<z.ZodNumber>;
4974
+ unread: z.ZodOptional<z.ZodArray<z.ZodObject<{
4975
+ repo: z.ZodString;
4976
+ why: z.ZodString;
4977
+ }, z.core.$strip>>>;
4978
+ command: z.ZodString;
4979
+ plan: z.ZodOptional<z.ZodString>;
4980
+ }, z.core.$strip>>;
4981
+ }, z.core.$strip>;
4982
+ export type MapEditsResultT = z.infer<typeof MapEditsResult>;
4607
4983
  /**
4608
4984
  * 3.12.0 (ADR 0195 point 6): GET /api/build/upgrade, the upgrade to source slots as a dry run,
4609
4985
  * exactly what `atticus upgrade --json` lists under `slots`: every file `atticus upgrade --yes`
@@ -45,8 +45,16 @@ export declare function declareLink(root: string, d: Declared, o: {
45
45
  rel: string;
46
46
  changes: LineChange[];
47
47
  written: boolean;
48
+ /** Beta.28: the file's bytes this write started from (what a take-back puts back). */
49
+ before: string;
50
+ /** The bytes it wrote (what a take-back expects to find). */
51
+ wrote?: string;
48
52
  }>;
49
- /** Undo: remove a declared topic or call from the system's list, exactly that one. */
53
+ /**
54
+ * Undo: remove a declared topic or call from the system's list, exactly that one. Beta.28 (the
55
+ * review of Edit the map): only that item's lines go (and the list's key when it was the last),
56
+ * every other byte of the profile as it was: its comments, its flow lists, its version.
57
+ */
50
58
  export declare function undeclareLink(root: string, d: {
51
59
  kind: "topic" | "call";
52
60
  system: string;
@@ -54,6 +62,8 @@ export declare function undeclareLink(root: string, d: {
54
62
  }): Promise<{
55
63
  rel: string;
56
64
  changes: LineChange[];
65
+ before: string;
66
+ wrote: string;
57
67
  }>;
58
68
  /** A system's declarations, with who and when where the canvas wrote them. */
59
69
  export declare function declaredOf(root: string, system: string): Promise<{
package/npm/index.js CHANGED
@@ -6032,7 +6032,12 @@ var Problem = z31.object({
6032
6032
  * 3.12.0 (beta.27): which refusal it is, where one status has more than one the app tells
6033
6033
  * apart (an owner question's send: 409 `being-sent` or `already-sent`).
6034
6034
  */
6035
- code: z31.string().optional()
6035
+ code: z31.string().optional(),
6036
+ /**
6037
+ * 3.13.0 (beta.28): a 422 of POST /api/map/edits: each staged change that can't be made, by its
6038
+ * place in the list (from 0), with why. Nothing was written.
6039
+ */
6040
+ problems: z31.array(z31.object({ edit: z31.number().int().nonnegative(), message: z31.string() })).optional()
6036
6041
  });
6037
6042
  var Kind3 = z31.enum(RECORD_KINDS);
6038
6043
  var CatalogRecord2 = z31.union(RECORD_KINDS.map((k) => RECORD_SCHEMAS[k]));
@@ -7108,6 +7113,94 @@ var CatalogPruneRequest = z31.strictObject({
7108
7113
  /** GET /api/build/prune's `plan`. */
7109
7114
  plan: z31.string().regex(/^[0-9a-f]{64}$/)
7110
7115
  });
7116
+ var LinkDeleteRequest = z31.strictObject({
7117
+ interfaces: z31.array(z31.string().min(1).max(300)).min(1).max(5e3),
7118
+ from: z31.string().min(1).max(200),
7119
+ to: z31.string().min(1).max(200)
7120
+ });
7121
+ var DeletedLinksView = z31.object({
7122
+ links: z31.array(z31.object({
7123
+ from: z31.string(),
7124
+ to: z31.string(),
7125
+ /** How many calls the link had when it was deleted. */
7126
+ calls: z31.number().int().nonnegative(),
7127
+ by: z31.string(),
7128
+ at: z31.string(),
7129
+ /** No Interface of it would be drawn now even without the suppress (its code moved on). */
7130
+ gone: z31.boolean().optional(),
7131
+ /** Taken away by a redirect of Edit the map, its new link added in the same change. */
7132
+ redirect: z31.boolean().optional(),
7133
+ /** One curated suppress per Interface, in catalog/curated/curateddecision/. */
7134
+ decisions: z31.array(z31.object({
7135
+ id: z31.string(),
7136
+ target: z31.string(),
7137
+ file: z31.string(),
7138
+ /** The build no longer makes this Interface: the suppress takes nothing away. */
7139
+ gone: z31.boolean().optional()
7140
+ }))
7141
+ }))
7142
+ });
7143
+ var LinkUndeleteRequest = z31.strictObject({
7144
+ decisions: z31.array(z31.string().regex(/^[a-z0-9][a-z0-9._-]{0,120}$/)).min(1).max(500)
7145
+ });
7146
+ var MapEditAdd = z31.discriminatedUnion("kind", [
7147
+ z31.strictObject({
7148
+ kind: z31.literal("topic"),
7149
+ system: z31.string().min(1).max(200),
7150
+ topic: z31.string().min(1).max(300),
7151
+ side: z31.enum(["publishes", "listens"])
7152
+ }),
7153
+ z31.strictObject({
7154
+ kind: z31.literal("call"),
7155
+ system: z31.string().min(1).max(200),
7156
+ route: z31.string().min(1).max(300)
7157
+ })
7158
+ ]);
7159
+ var MapEditPair = z31.strictObject({
7160
+ from: z31.string().min(1).max(200),
7161
+ /** The other box: a repo of the manifest or an outside system (Connect to…'s `to`). */
7162
+ to: z31.strictObject({ repo: z31.string().min(1).optional(), system: z31.string().min(1).optional() }).refine((b) => !!b.repo !== !!b.system, { message: "name a repo or a system" }),
7163
+ pairs: z31.array(z31.object({ call: z31.string().min(1), api: z31.string().min(1) })).min(1).max(500)
7164
+ });
7165
+ var MapEditDelete = z31.strictObject({
7166
+ interfaces: z31.array(z31.string().min(1).max(300)).max(5e3),
7167
+ from: z31.string().min(1).max(200),
7168
+ to: z31.string().min(1).max(200)
7169
+ });
7170
+ var MapEdit = z31.union([
7171
+ z31.strictObject({ kind: z31.literal("delete"), delete: MapEditDelete }),
7172
+ z31.strictObject({ kind: z31.literal("add"), add: MapEditAdd }),
7173
+ z31.strictObject({ kind: z31.literal("add"), pair: MapEditPair }),
7174
+ z31.strictObject({ kind: z31.literal("redirect"), delete: MapEditDelete, add: MapEditAdd }),
7175
+ z31.strictObject({ kind: z31.literal("redirect"), delete: MapEditDelete, pair: MapEditPair })
7176
+ ]);
7177
+ var MapEditsRequest = z31.strictObject({ edits: z31.array(MapEdit).min(1).max(100) });
7178
+ var MapEditProblem = z31.object({
7179
+ edit: z31.number().int().nonnegative(),
7180
+ message: z31.string()
7181
+ });
7182
+ var MapEditsResult = z31.object({
7183
+ code: z31.number().int(),
7184
+ lines: z31.array(z31.string()),
7185
+ edits: z31.array(z31.object({
7186
+ edit: z31.number().int().nonnegative(),
7187
+ kind: z31.enum(["delete", "add", "redirect"]),
7188
+ state: z31.enum(["saved", "failed", "taken-back", "not-tried"]),
7189
+ message: z31.string().optional()
7190
+ })),
7191
+ built: z31.boolean(),
7192
+ callers: z31.array(z31.string()),
7193
+ /**
7194
+ * The repos a new link is joined through that aren't read from their facts yet (a pairing's
7195
+ * other repo, a declared call's gateway): the link is drawn once they are. Callers are left out.
7196
+ */
7197
+ waitsOn: z31.array(z31.string()),
7198
+ /**
7199
+ * The build refused after the changes were saved (a large removal it lists, a hand edit): its
7200
+ * listing, as Apply's job gives it, which Set up › Scans › Catalog builds confirms.
7201
+ */
7202
+ refused: BuildRefusalView.optional()
7203
+ });
7111
7204
  var CatalogUpgradeView = z31.object({
7112
7205
  pending: z31.boolean(),
7113
7206
  records: z31.number().int(),
@@ -11482,6 +11575,56 @@ var OPS = {
11482
11575
  errors: [400, 409]
11483
11576
  }
11484
11577
  },
11578
+ "/api/links/delete": {
11579
+ post: {
11580
+ id: "deleteLink",
11581
+ summary: "3.13.0 (beta.28): Delete this link as a local job: a curated suppress of each Interface named (the decision atticus catalog edits --curate writes for a deleted file), in catalog/curated/curateddecision/, then atticus catalog build. 404 when one isn't an Interface of the catalog now",
11582
+ tag: "scans",
11583
+ body: LinkDeleteRequest,
11584
+ ok: {
11585
+ status: 202,
11586
+ schema: "JobAccepted",
11587
+ description: "Started: its job's result is the code and the lines it printed"
11588
+ },
11589
+ errors: [400, 404, 409]
11590
+ }
11591
+ },
11592
+ "/api/links/deleted": {
11593
+ get: {
11594
+ id: "getDeletedLinks",
11595
+ summary: "3.13.0 (beta.28): the links deleted on the canvas, each with its curated suppresses. Reads files only",
11596
+ tag: "scans",
11597
+ ok: { status: 200, schema: "DeletedLinksView", description: "OK" }
11598
+ }
11599
+ },
11600
+ "/api/links/deleted/undo": {
11601
+ post: {
11602
+ id: "undeleteLink",
11603
+ summary: "3.13.0 (beta.28): Bring back a deleted link as a local job: its decisions removed, then atticus catalog build. 404 when one isn't a link deleted on the canvas",
11604
+ tag: "scans",
11605
+ body: LinkUndeleteRequest,
11606
+ ok: {
11607
+ status: 202,
11608
+ schema: "JobAccepted",
11609
+ description: "Started: its job's result is the code and the lines it printed"
11610
+ },
11611
+ errors: [400, 404, 409]
11612
+ }
11613
+ },
11614
+ "/api/map/edits": {
11615
+ post: {
11616
+ id: "applyMapEdits",
11617
+ summary: "3.13.0 (beta.28): Edit the map's Apply my changes as a local job: every change staged on the canvas checked first (422 with problems by place, nothing written), then each delete's curated suppresses and each add's declaration written, then atticus catalog build once. A write that fails takes back those before it and builds nothing. Its job's result is MapEditsResult",
11618
+ tag: "scans",
11619
+ body: MapEditsRequest,
11620
+ ok: {
11621
+ status: 202,
11622
+ schema: "JobAccepted",
11623
+ description: "Started: its job's result is MapEditsResult"
11624
+ },
11625
+ errors: [400, 409, 422]
11626
+ }
11627
+ },
11485
11628
  "/api/facts/{repo}": {
11486
11629
  get: {
11487
11630
  id: "getRepoFacts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maycombhq/sdk",
3
- "version": "2.0.0-beta.27",
3
+ "version": "2.0.0-beta.28",
4
4
  "description": "Atticus plugin SDK (contract C4): interfaces for extractors, dialects, ingestors and adapters.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",