@cat-factory/contracts 0.274.0 → 0.276.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 (57) hide show
  1. package/dist/accountSettings.d.ts +156 -22
  2. package/dist/accountSettings.d.ts.map +1 -1
  3. package/dist/accountSettings.js +48 -5
  4. package/dist/accountSettings.js.map +1 -1
  5. package/dist/errors.d.ts +16 -1
  6. package/dist/errors.d.ts.map +1 -1
  7. package/dist/errors.js +16 -0
  8. package/dist/errors.js.map +1 -1
  9. package/dist/index.d.ts +2 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/notification-routing.d.ts +100 -0
  14. package/dist/notification-routing.d.ts.map +1 -0
  15. package/dist/notification-routing.js +155 -0
  16. package/dist/notification-routing.js.map +1 -0
  17. package/dist/public-api.d.ts +137 -0
  18. package/dist/public-api.d.ts.map +1 -1
  19. package/dist/public-api.js +74 -0
  20. package/dist/public-api.js.map +1 -1
  21. package/dist/public-board.d.ts +276 -0
  22. package/dist/public-board.d.ts.map +1 -0
  23. package/dist/public-board.js +215 -0
  24. package/dist/public-board.js.map +1 -0
  25. package/dist/public-evidence.d.ts +30 -3
  26. package/dist/public-evidence.d.ts.map +1 -1
  27. package/dist/public-evidence.js +27 -3
  28. package/dist/public-evidence.js.map +1 -1
  29. package/dist/requests.d.ts +19 -2
  30. package/dist/requests.d.ts.map +1 -1
  31. package/dist/requests.js +18 -1
  32. package/dist/requests.js.map +1 -1
  33. package/dist/routes/accounts.d.ts +81 -15
  34. package/dist/routes/accounts.d.ts.map +1 -1
  35. package/dist/routes/board.d.ts +6 -2
  36. package/dist/routes/board.d.ts.map +1 -1
  37. package/dist/routes/index.d.ts +1 -0
  38. package/dist/routes/index.d.ts.map +1 -1
  39. package/dist/routes/index.js +1 -0
  40. package/dist/routes/index.js.map +1 -1
  41. package/dist/routes/notifications.d.ts +76 -0
  42. package/dist/routes/notifications.d.ts.map +1 -1
  43. package/dist/routes/notifications.js +15 -0
  44. package/dist/routes/notifications.js.map +1 -1
  45. package/dist/routes/public-api.d.ts +18 -0
  46. package/dist/routes/public-api.d.ts.map +1 -1
  47. package/dist/routes/public-board.d.ts +369 -0
  48. package/dist/routes/public-board.d.ts.map +1 -0
  49. package/dist/routes/public-board.js +112 -0
  50. package/dist/routes/public-board.js.map +1 -0
  51. package/dist/routes/public-evidence.d.ts +1 -0
  52. package/dist/routes/public-evidence.d.ts.map +1 -1
  53. package/package.json +1 -1
  54. package/dist/gate-parking.d.ts +0 -30
  55. package/dist/gate-parking.d.ts.map +0 -1
  56. package/dist/gate-parking.js +0 -58
  57. package/dist/gate-parking.js.map +0 -1
@@ -453,6 +453,8 @@ export declare const createPublicTaskContract: {
453
453
  readonly progress: import("valibot").NumberSchema<undefined>;
454
454
  readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
455
455
  readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
456
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
457
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
456
458
  }, undefined>;
457
459
  };
458
460
  } & {
@@ -510,6 +512,8 @@ export declare const listPublicServiceTasksContract: {
510
512
  readonly progress: import("valibot").NumberSchema<undefined>;
511
513
  readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
512
514
  readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
515
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
516
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
513
517
  }, undefined>, undefined>;
514
518
  readonly nextCursor: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
515
519
  }, undefined>;
@@ -559,6 +563,8 @@ export declare const getPublicTaskContract: {
559
563
  readonly progress: import("valibot").NumberSchema<undefined>;
560
564
  readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
561
565
  readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
566
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
567
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
562
568
  }, undefined>;
563
569
  };
564
570
  } & {
@@ -609,6 +615,8 @@ export declare const startPublicTaskContract: {
609
615
  readonly progress: import("valibot").NumberSchema<undefined>;
610
616
  readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
611
617
  readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
618
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
619
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
612
620
  }, undefined>;
613
621
  };
614
622
  } & {
@@ -627,6 +635,7 @@ export declare const updatePublicTaskContract: {
627
635
  readonly title: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>, undefined>;
628
636
  readonly description: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>;
629
637
  readonly fields: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 80, undefined>]>, import("valibot").UnionSchema<[import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, import("valibot").SchemaWithPipe<readonly [import("valibot").ArraySchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>, import("valibot").MaxLengthAction<string[], 50, undefined>]>, import("valibot").BooleanSchema<undefined>, import("valibot").NumberSchema<undefined>], undefined>, undefined>, undefined>;
638
+ readonly autoStartDependents: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
630
639
  }, undefined>;
631
640
  readonly responsesByStatusCode: {
632
641
  readonly '4xx': import("valibot").ObjectSchema<{
@@ -661,6 +670,8 @@ export declare const updatePublicTaskContract: {
661
670
  readonly progress: import("valibot").NumberSchema<undefined>;
662
671
  readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
663
672
  readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
673
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
674
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
664
675
  }, undefined>;
665
676
  };
666
677
  } & {
@@ -709,6 +720,8 @@ export declare const stopPublicTaskContract: {
709
720
  readonly progress: import("valibot").NumberSchema<undefined>;
710
721
  readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
711
722
  readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
723
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
724
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
712
725
  }, undefined>;
713
726
  };
714
727
  } & {
@@ -757,6 +770,8 @@ export declare const retryPublicTaskContract: {
757
770
  readonly progress: import("valibot").NumberSchema<undefined>;
758
771
  readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
759
772
  readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
773
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
774
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
760
775
  }, undefined>;
761
776
  };
762
777
  } & {
@@ -809,6 +824,9 @@ export declare const getPublicRunContract: {
809
824
  readonly inProgress: import("valibot").NumberSchema<undefined>;
810
825
  readonly total: import("valibot").NumberSchema<undefined>;
811
826
  }, undefined>, undefined>;
827
+ readonly output: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
828
+ readonly data: import("valibot").NullableSchema<import("valibot").UnknownSchema, undefined>;
829
+ readonly truncated: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
812
830
  }, undefined>, undefined>;
813
831
  readonly externalIdentity: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
814
832
  readonly externalIdentityWithheld: import("valibot").BooleanSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../src/routes/public-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAkD3E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKrC,CAAA;AAIF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQlC,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQhC,CAAA;AAED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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASzC,CAAA;AAED,mDAAmD;AACnD,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS7C,CAAA;AAID;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOrC,CAAA;AAID;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOlC,CAAA;AAaD,sFAAsF;AACtF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOlC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAA"}
@@ -0,0 +1,369 @@
1
+ import { ContractNoBody } from '@toad-contracts/valibot';
2
+ /**
3
+ * List the repositories this workspace can back a service with.
4
+ *
5
+ * The discovery half of service creation, and what makes it usable with no browser: the create
6
+ * takes a provider repo id, and nothing on this surface served one. `read` scope, like every other
7
+ * discovery endpoint here (`/pipelines`, `/task-types`): it names what the workspace has already
8
+ * connected, and an integration must be able to see what it is about to ask for without holding the
9
+ * credential that could change it.
10
+ */
11
+ export declare const listPublicReposContract: {
12
+ readonly method: "get";
13
+ readonly pathResolver: () => string;
14
+ readonly responsesByStatusCode: {
15
+ readonly '4xx': import("valibot").ObjectSchema<{
16
+ readonly error: import("valibot").ObjectSchema<{
17
+ readonly code: import("valibot").StringSchema<undefined>;
18
+ readonly message: import("valibot").StringSchema<undefined>;
19
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
20
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
21
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
22
+ readonly message: import("valibot").StringSchema<undefined>;
23
+ }, undefined>, undefined>, undefined>;
24
+ }, undefined>;
25
+ }, undefined>;
26
+ readonly '5xx': import("valibot").ObjectSchema<{
27
+ readonly error: import("valibot").ObjectSchema<{
28
+ readonly code: import("valibot").StringSchema<undefined>;
29
+ readonly message: import("valibot").StringSchema<undefined>;
30
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
31
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
32
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
33
+ readonly message: import("valibot").StringSchema<undefined>;
34
+ }, undefined>, undefined>, undefined>;
35
+ }, undefined>;
36
+ }, undefined>;
37
+ readonly 200: import("valibot").ObjectSchema<{
38
+ readonly repos: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
39
+ readonly repoId: import("valibot").NumberSchema<undefined>;
40
+ readonly provider: import("valibot").StringSchema<undefined>;
41
+ readonly owner: import("valibot").StringSchema<undefined>;
42
+ readonly name: import("valibot").StringSchema<undefined>;
43
+ readonly defaultBranch: import("valibot").StringSchema<undefined>;
44
+ readonly private: import("valibot").BooleanSchema<undefined>;
45
+ readonly monorepo: import("valibot").BooleanSchema<undefined>;
46
+ readonly serviceId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
47
+ readonly linkedElsewhere: import("valibot").BooleanSchema<undefined>;
48
+ }, undefined>, undefined>;
49
+ }, undefined>;
50
+ };
51
+ } & {
52
+ readonly minScope: "read";
53
+ };
54
+ /**
55
+ * Create a board service, optionally backed by a repository: the last act of board setup that had
56
+ * no headless counterpart, so a deployment that could provision its own keys and enrol its own
57
+ * webhook still had to open the app once to have anywhere to file work.
58
+ *
59
+ * Delegates to the SAME service methods the app's own "import a repository" button and drag-drop
60
+ * call, so every guard holds identically: a whole-repo repository that already backs a service in
61
+ * this account is MOUNTED here rather than duplicated, a monorepo must name its subdirectory, and a
62
+ * subdirectory another service already claims is refused.
63
+ */
64
+ export declare const createPublicServiceContract: {
65
+ readonly method: "post";
66
+ readonly pathResolver: () => string;
67
+ readonly requestBodySchema: import("valibot").ObjectSchema<{
68
+ readonly title: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>, undefined>;
69
+ readonly description: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 2000, undefined>]>, undefined>;
70
+ readonly type: import("valibot").OptionalSchema<import("valibot").PicklistSchema<["service", "frontend", "library", "document"], undefined>, undefined>;
71
+ readonly repo: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
72
+ readonly repoId: import("valibot").NumberSchema<undefined>;
73
+ readonly directory: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MaxLengthAction<string, 400, undefined>]>, undefined>;
74
+ readonly monorepo: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
75
+ }, undefined>, undefined>;
76
+ }, undefined>;
77
+ readonly responsesByStatusCode: {
78
+ readonly '4xx': import("valibot").ObjectSchema<{
79
+ readonly error: import("valibot").ObjectSchema<{
80
+ readonly code: import("valibot").StringSchema<undefined>;
81
+ readonly message: import("valibot").StringSchema<undefined>;
82
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
83
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
84
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
85
+ readonly message: import("valibot").StringSchema<undefined>;
86
+ }, undefined>, undefined>, undefined>;
87
+ }, undefined>;
88
+ }, undefined>;
89
+ readonly '5xx': import("valibot").ObjectSchema<{
90
+ readonly error: import("valibot").ObjectSchema<{
91
+ readonly code: import("valibot").StringSchema<undefined>;
92
+ readonly message: import("valibot").StringSchema<undefined>;
93
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
94
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
95
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
96
+ readonly message: import("valibot").StringSchema<undefined>;
97
+ }, undefined>, undefined>, undefined>;
98
+ }, undefined>;
99
+ }, undefined>;
100
+ readonly 201: import("valibot").ObjectSchema<{
101
+ readonly serviceId: import("valibot").StringSchema<undefined>;
102
+ readonly title: import("valibot").StringSchema<undefined>;
103
+ readonly description: import("valibot").StringSchema<undefined>;
104
+ readonly type: import("valibot").PicklistSchema<["frontend", "service", "library", "document", "api", "database", "queue", "integration", "external", "environment"], undefined>;
105
+ readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
106
+ }, undefined>;
107
+ };
108
+ } & {
109
+ readonly minScope: "admin";
110
+ };
111
+ /**
112
+ * Declare that this task must wait for another one. Idempotent: an edge that already exists is
113
+ * returned as-is rather than toggled off, which is what separates this from the app's own toggle
114
+ * and what lets a provisioning integration re-run without inverting the graph it declared last time.
115
+ */
116
+ export declare const addPublicTaskDependencyContract: {
117
+ readonly method: "post";
118
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
119
+ taskId: import("valibot").StringSchema<undefined>;
120
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
121
+ readonly pathResolver: ({ taskId }: {
122
+ taskId: string;
123
+ }) => string;
124
+ readonly requestBodySchema: import("valibot").ObjectSchema<{
125
+ readonly dependsOnTaskId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
126
+ }, undefined>;
127
+ readonly responsesByStatusCode: {
128
+ readonly '4xx': import("valibot").ObjectSchema<{
129
+ readonly error: import("valibot").ObjectSchema<{
130
+ readonly code: import("valibot").StringSchema<undefined>;
131
+ readonly message: import("valibot").StringSchema<undefined>;
132
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
133
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
134
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
135
+ readonly message: import("valibot").StringSchema<undefined>;
136
+ }, undefined>, undefined>, undefined>;
137
+ }, undefined>;
138
+ }, undefined>;
139
+ readonly '5xx': import("valibot").ObjectSchema<{
140
+ readonly error: import("valibot").ObjectSchema<{
141
+ readonly code: import("valibot").StringSchema<undefined>;
142
+ readonly message: import("valibot").StringSchema<undefined>;
143
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
144
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
145
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
146
+ readonly message: import("valibot").StringSchema<undefined>;
147
+ }, undefined>, undefined>, undefined>;
148
+ }, undefined>;
149
+ }, undefined>;
150
+ readonly 200: import("valibot").ObjectSchema<{
151
+ readonly taskId: import("valibot").StringSchema<undefined>;
152
+ readonly serviceId: import("valibot").StringSchema<undefined>;
153
+ readonly title: import("valibot").StringSchema<undefined>;
154
+ readonly description: import("valibot").StringSchema<undefined>;
155
+ readonly taskType: import("valibot").UnionSchema<[import("valibot").PicklistSchema<readonly ["feature", "bug", "document", "spike", "review", "ralph", "recurring"], undefined>, import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>], undefined>;
156
+ readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
157
+ readonly progress: import("valibot").NumberSchema<undefined>;
158
+ readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
159
+ readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
160
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
161
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
162
+ }, undefined>;
163
+ };
164
+ } & {
165
+ readonly minScope: "write";
166
+ };
167
+ /** Drop a dependency edge. Idempotent, for the same reason the add is. */
168
+ export declare const removePublicTaskDependencyContract: {
169
+ readonly method: "post";
170
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
171
+ taskId: import("valibot").StringSchema<undefined>;
172
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
173
+ readonly pathResolver: ({ taskId }: {
174
+ taskId: string;
175
+ }) => string;
176
+ readonly requestBodySchema: import("valibot").ObjectSchema<{
177
+ readonly dependsOnTaskId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 120, undefined>]>;
178
+ }, undefined>;
179
+ readonly responsesByStatusCode: {
180
+ readonly '4xx': import("valibot").ObjectSchema<{
181
+ readonly error: import("valibot").ObjectSchema<{
182
+ readonly code: import("valibot").StringSchema<undefined>;
183
+ readonly message: import("valibot").StringSchema<undefined>;
184
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
185
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
186
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
187
+ readonly message: import("valibot").StringSchema<undefined>;
188
+ }, undefined>, undefined>, undefined>;
189
+ }, undefined>;
190
+ }, undefined>;
191
+ readonly '5xx': import("valibot").ObjectSchema<{
192
+ readonly error: import("valibot").ObjectSchema<{
193
+ readonly code: import("valibot").StringSchema<undefined>;
194
+ readonly message: import("valibot").StringSchema<undefined>;
195
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
196
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
197
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
198
+ readonly message: import("valibot").StringSchema<undefined>;
199
+ }, undefined>, undefined>, undefined>;
200
+ }, undefined>;
201
+ }, undefined>;
202
+ readonly 200: import("valibot").ObjectSchema<{
203
+ readonly taskId: import("valibot").StringSchema<undefined>;
204
+ readonly serviceId: import("valibot").StringSchema<undefined>;
205
+ readonly title: import("valibot").StringSchema<undefined>;
206
+ readonly description: import("valibot").StringSchema<undefined>;
207
+ readonly taskType: import("valibot").UnionSchema<[import("valibot").PicklistSchema<readonly ["feature", "bug", "document", "spike", "review", "ralph", "recurring"], undefined>, import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").RegexAction<string, "Consumer id must be <namespace>:<name> (lowercase a-z0-9, dash-separated)">]>], undefined>;
208
+ readonly status: import("valibot").PicklistSchema<["planned", "ready", "in_progress", "blocked", "pr_ready", "done"], undefined>;
209
+ readonly progress: import("valibot").NumberSchema<undefined>;
210
+ readonly runId: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
211
+ readonly pullRequestUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
212
+ readonly dependsOn: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
213
+ readonly autoStartDependents: import("valibot").BooleanSchema<undefined>;
214
+ }, undefined>;
215
+ };
216
+ } & {
217
+ readonly minScope: "write";
218
+ };
219
+ /** The requirements documents attached to a task, in the order the agents read them. */
220
+ export declare const listPublicTaskDocumentsContract: {
221
+ readonly method: "get";
222
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
223
+ taskId: import("valibot").StringSchema<undefined>;
224
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
225
+ readonly pathResolver: ({ taskId }: {
226
+ taskId: string;
227
+ }) => string;
228
+ readonly responsesByStatusCode: {
229
+ readonly '4xx': import("valibot").ObjectSchema<{
230
+ readonly error: import("valibot").ObjectSchema<{
231
+ readonly code: import("valibot").StringSchema<undefined>;
232
+ readonly message: import("valibot").StringSchema<undefined>;
233
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
234
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
235
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
236
+ readonly message: import("valibot").StringSchema<undefined>;
237
+ }, undefined>, undefined>, undefined>;
238
+ }, undefined>;
239
+ }, undefined>;
240
+ readonly '5xx': import("valibot").ObjectSchema<{
241
+ readonly error: import("valibot").ObjectSchema<{
242
+ readonly code: import("valibot").StringSchema<undefined>;
243
+ readonly message: import("valibot").StringSchema<undefined>;
244
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
245
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
246
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
247
+ readonly message: import("valibot").StringSchema<undefined>;
248
+ }, undefined>, undefined>, undefined>;
249
+ }, undefined>;
250
+ }, undefined>;
251
+ readonly 200: import("valibot").ObjectSchema<{
252
+ readonly documents: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
253
+ readonly source: import("valibot").PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
254
+ readonly externalId: import("valibot").StringSchema<undefined>;
255
+ readonly title: import("valibot").StringSchema<undefined>;
256
+ readonly url: import("valibot").StringSchema<undefined>;
257
+ readonly excerpt: import("valibot").StringSchema<undefined>;
258
+ }, undefined>, undefined>;
259
+ }, undefined>;
260
+ };
261
+ } & {
262
+ readonly minScope: "read";
263
+ };
264
+ /**
265
+ * Attach a requirements document to an EXISTING task: the same two forms creation takes, at the
266
+ * moment a spec actually arrives.
267
+ */
268
+ export declare const attachPublicTaskDocumentContract: {
269
+ readonly method: "post";
270
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
271
+ taskId: import("valibot").StringSchema<undefined>;
272
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
273
+ readonly pathResolver: ({ taskId }: {
274
+ taskId: string;
275
+ }) => string;
276
+ readonly requestBodySchema: import("valibot").ObjectSchema<{
277
+ readonly document: import("valibot").VariantSchema<"kind", [import("valibot").ObjectSchema<{
278
+ readonly kind: import("valibot").LiteralSchema<"source", undefined>;
279
+ readonly source: import("valibot").PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear"], undefined>;
280
+ readonly ref: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 500, undefined>]>;
281
+ }, undefined>, import("valibot").ObjectSchema<{
282
+ readonly kind: import("valibot").LiteralSchema<"upload", undefined>;
283
+ readonly title: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 200, undefined>]>;
284
+ readonly content: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 100000, undefined>]>;
285
+ }, undefined>], undefined>;
286
+ }, undefined>;
287
+ readonly responsesByStatusCode: {
288
+ readonly '4xx': import("valibot").ObjectSchema<{
289
+ readonly error: import("valibot").ObjectSchema<{
290
+ readonly code: import("valibot").StringSchema<undefined>;
291
+ readonly message: import("valibot").StringSchema<undefined>;
292
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
293
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
294
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
295
+ readonly message: import("valibot").StringSchema<undefined>;
296
+ }, undefined>, undefined>, undefined>;
297
+ }, undefined>;
298
+ }, undefined>;
299
+ readonly '5xx': import("valibot").ObjectSchema<{
300
+ readonly error: import("valibot").ObjectSchema<{
301
+ readonly code: import("valibot").StringSchema<undefined>;
302
+ readonly message: import("valibot").StringSchema<undefined>;
303
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
304
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
305
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
306
+ readonly message: import("valibot").StringSchema<undefined>;
307
+ }, undefined>, undefined>, undefined>;
308
+ }, undefined>;
309
+ }, undefined>;
310
+ readonly 201: import("valibot").ObjectSchema<{
311
+ readonly source: import("valibot").PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
312
+ readonly externalId: import("valibot").StringSchema<undefined>;
313
+ readonly title: import("valibot").StringSchema<undefined>;
314
+ readonly url: import("valibot").StringSchema<undefined>;
315
+ readonly excerpt: import("valibot").StringSchema<undefined>;
316
+ }, undefined>;
317
+ };
318
+ } & {
319
+ readonly minScope: "write";
320
+ };
321
+ /**
322
+ * Detach a document from a task, naming it by the `(source, externalId)` pair the list serves.
323
+ *
324
+ * A POST rather than a `DELETE .../documents/{id}`: a document's identity is two values, one of
325
+ * which is a free-form external id that is a path for some sources (`docs/adr/0001.md`), so
326
+ * addressing it in a path segment would need escaping rules a caller has to get right to reach its
327
+ * own document.
328
+ */
329
+ export declare const detachPublicTaskDocumentContract: {
330
+ readonly method: "post";
331
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
332
+ taskId: import("valibot").StringSchema<undefined>;
333
+ }, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
334
+ readonly pathResolver: ({ taskId }: {
335
+ taskId: string;
336
+ }) => string;
337
+ readonly requestBodySchema: import("valibot").ObjectSchema<{
338
+ readonly source: import("valibot").PicklistSchema<["confluence", "notion", "github", "figma", "zeplin", "linear", "upload"], undefined>;
339
+ readonly externalId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>, import("valibot").MaxLengthAction<string, 500, undefined>]>;
340
+ }, undefined>;
341
+ readonly responsesByStatusCode: {
342
+ readonly '4xx': import("valibot").ObjectSchema<{
343
+ readonly error: import("valibot").ObjectSchema<{
344
+ readonly code: import("valibot").StringSchema<undefined>;
345
+ readonly message: import("valibot").StringSchema<undefined>;
346
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
347
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
348
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
349
+ readonly message: import("valibot").StringSchema<undefined>;
350
+ }, undefined>, undefined>, undefined>;
351
+ }, undefined>;
352
+ }, undefined>;
353
+ readonly '5xx': import("valibot").ObjectSchema<{
354
+ readonly error: import("valibot").ObjectSchema<{
355
+ readonly code: import("valibot").StringSchema<undefined>;
356
+ readonly message: import("valibot").StringSchema<undefined>;
357
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
358
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
359
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
360
+ readonly message: import("valibot").StringSchema<undefined>;
361
+ }, undefined>, undefined>, undefined>;
362
+ }, undefined>;
363
+ }, undefined>;
364
+ readonly 204: typeof ContractNoBody;
365
+ };
366
+ } & {
367
+ readonly minScope: "write";
368
+ };
369
+ //# sourceMappingURL=public-board.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-board.d.ts","sourceRoot":"","sources":["../../src/routes/public-board.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAsC3E;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOnC,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvC,CAAA;AAID;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS3C,CAAA;AAED,0EAA0E;AAC1E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS9C,CAAA;AAID,wFAAwF;AACxF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ3C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS5C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS5C,CAAA"}
@@ -0,0 +1,112 @@
1
+ import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
2
+ import { attachPublicTaskDocumentSchema, createPublicServiceSchema, detachPublicTaskDocumentSchema, publicAttachedDocumentListSchema, publicAttachedDocumentSchema, publicRepoListSchema, publicTaskDependencySchema, } from '../public-board.js';
3
+ import { publicServiceSchema, publicTaskSchema } from '../public-api.js';
4
+ import { errorResponses, singleStringParam, withMinScope } from './_shared.js';
5
+ // ---------------------------------------------------------------------------
6
+ // Board PROVISIONING and the two task relationships that outlive a create call, on `/api/v1`.
7
+ //
8
+ // Their own file rather than more of `public-api.ts`, which had grown to carry the whole surface:
9
+ // these are one cohesive addition (what a headless deployment needs to SET UP and RELATE the board
10
+ // it drives, as opposed to what it needs to run one task) and they share a scope argument that is
11
+ // worth stating once.
12
+ //
13
+ // **Scope.** Service creation is `admin`; the task-level writes are `write`.
14
+ //
15
+ // The split follows what each act CHANGES rather than how destructive it feels. Creating a service
16
+ // is board STRUCTURE, which is what `admin` already covers on this surface for keys and the
17
+ // outbound webhook, and it is the rung a provisioning integration holds anyway. Attaching a
18
+ // document, declaring an ordering: those edit ONE task the caller can already create, edit and
19
+ // start with a `write` key, so putting them a rung higher would mean handing an integration that
20
+ // files tickets a credential that can also merge pull requests and delete tasks.
21
+ //
22
+ // Where the two readings were close, the REVERSIBLE one wins (ADR 0034): a scope can be relaxed
23
+ // later and never tightened, because narrowing what a live key may do is a break however small.
24
+ // ---------------------------------------------------------------------------
25
+ const taskIdParams = singleStringParam('taskId');
26
+ // ---- provisioning: the repositories, and the services they back --------------
27
+ /**
28
+ * List the repositories this workspace can back a service with.
29
+ *
30
+ * The discovery half of service creation, and what makes it usable with no browser: the create
31
+ * takes a provider repo id, and nothing on this surface served one. `read` scope, like every other
32
+ * discovery endpoint here (`/pipelines`, `/task-types`): it names what the workspace has already
33
+ * connected, and an integration must be able to see what it is about to ask for without holding the
34
+ * credential that could change it.
35
+ */
36
+ export const listPublicReposContract = withMinScope('read', defineApiContract({
37
+ method: 'get',
38
+ pathResolver: () => '/api/v1/repos',
39
+ responsesByStatusCode: { 200: publicRepoListSchema, ...errorResponses },
40
+ }));
41
+ /**
42
+ * Create a board service, optionally backed by a repository: the last act of board setup that had
43
+ * no headless counterpart, so a deployment that could provision its own keys and enrol its own
44
+ * webhook still had to open the app once to have anywhere to file work.
45
+ *
46
+ * Delegates to the SAME service methods the app's own "import a repository" button and drag-drop
47
+ * call, so every guard holds identically: a whole-repo repository that already backs a service in
48
+ * this account is MOUNTED here rather than duplicated, a monorepo must name its subdirectory, and a
49
+ * subdirectory another service already claims is refused.
50
+ */
51
+ export const createPublicServiceContract = withMinScope('admin', defineApiContract({
52
+ method: 'post',
53
+ pathResolver: () => '/api/v1/services',
54
+ requestBodySchema: createPublicServiceSchema,
55
+ responsesByStatusCode: { 201: publicServiceSchema, ...errorResponses },
56
+ }));
57
+ // ---- task ordering ----------------------------------------------------------
58
+ /**
59
+ * Declare that this task must wait for another one. Idempotent: an edge that already exists is
60
+ * returned as-is rather than toggled off, which is what separates this from the app's own toggle
61
+ * and what lets a provisioning integration re-run without inverting the graph it declared last time.
62
+ */
63
+ export const addPublicTaskDependencyContract = withMinScope('write', defineApiContract({
64
+ method: 'post',
65
+ requestPathParamsSchema: taskIdParams,
66
+ pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/dependencies`,
67
+ requestBodySchema: publicTaskDependencySchema,
68
+ responsesByStatusCode: { 200: publicTaskSchema, ...errorResponses },
69
+ }));
70
+ /** Drop a dependency edge. Idempotent, for the same reason the add is. */
71
+ export const removePublicTaskDependencyContract = withMinScope('write', defineApiContract({
72
+ method: 'post',
73
+ requestPathParamsSchema: taskIdParams,
74
+ pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/dependencies/remove`,
75
+ requestBodySchema: publicTaskDependencySchema,
76
+ responsesByStatusCode: { 200: publicTaskSchema, ...errorResponses },
77
+ }));
78
+ // ---- a task's documents, after it exists -------------------------------------
79
+ /** The requirements documents attached to a task, in the order the agents read them. */
80
+ export const listPublicTaskDocumentsContract = withMinScope('read', defineApiContract({
81
+ method: 'get',
82
+ requestPathParamsSchema: taskIdParams,
83
+ pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/documents`,
84
+ responsesByStatusCode: { 200: publicAttachedDocumentListSchema, ...errorResponses },
85
+ }));
86
+ /**
87
+ * Attach a requirements document to an EXISTING task: the same two forms creation takes, at the
88
+ * moment a spec actually arrives.
89
+ */
90
+ export const attachPublicTaskDocumentContract = withMinScope('write', defineApiContract({
91
+ method: 'post',
92
+ requestPathParamsSchema: taskIdParams,
93
+ pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/documents`,
94
+ requestBodySchema: attachPublicTaskDocumentSchema,
95
+ responsesByStatusCode: { 201: publicAttachedDocumentSchema, ...errorResponses },
96
+ }));
97
+ /**
98
+ * Detach a document from a task, naming it by the `(source, externalId)` pair the list serves.
99
+ *
100
+ * A POST rather than a `DELETE .../documents/{id}`: a document's identity is two values, one of
101
+ * which is a free-form external id that is a path for some sources (`docs/adr/0001.md`), so
102
+ * addressing it in a path segment would need escaping rules a caller has to get right to reach its
103
+ * own document.
104
+ */
105
+ export const detachPublicTaskDocumentContract = withMinScope('write', defineApiContract({
106
+ method: 'post',
107
+ requestPathParamsSchema: taskIdParams,
108
+ pathResolver: ({ taskId }) => `/api/v1/tasks/${taskId}/documents/detach`,
109
+ requestBodySchema: detachPublicTaskDocumentSchema,
110
+ responsesByStatusCode: { 204: ContractNoBody, ...errorResponses },
111
+ }));
112
+ //# sourceMappingURL=public-board.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-board.js","sourceRoot":"","sources":["../../src/routes/public-board.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,8BAA8B,EAC9B,gCAAgC,EAChC,4BAA4B,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,CACH,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,YAAY,CAC1D,OAAO,EACP,iBAAiB,CAAC;IAChB,MAAM,EAAE,MAAM;IACd,uBAAuB,EAAE,YAAY;IACrC,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,iBAAiB,MAAM,mBAAmB;IACxE,iBAAiB,EAAE,8BAA8B;IACjD,qBAAqB,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE;CAClE,CAAC,CACH,CAAA"}
@@ -458,6 +458,7 @@ export declare const listPublicRunArtifactsContract: {
458
458
  readonly artifacts: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
459
459
  readonly artifactId: import("valibot").StringSchema<undefined>;
460
460
  readonly kind: import("valibot").PicklistSchema<["screenshot", "reference"], undefined>;
461
+ readonly scope: import("valibot").PicklistSchema<["run", "task"], undefined>;
461
462
  readonly view: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
462
463
  readonly contentType: import("valibot").StringSchema<undefined>;
463
464
  readonly byteSize: import("valibot").NumberSchema<undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"public-evidence.d.ts","sourceRoot":"","sources":["../../src/routes/public-evidence.ts"],"names":[],"mappings":"AAyBA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQtC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvC,CAAA;AAED,oGAAoG;AACpG,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ1C,CAAA"}
1
+ {"version":3,"file":"public-evidence.d.ts","sourceRoot":"","sources":["../../src/routes/public-evidence.ts"],"names":[],"mappings":"AAyBA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQtC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQvC,CAAA;AAED,oGAAoG;AACpG,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ1C,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/contracts",
3
- "version": "0.274.0",
3
+ "version": "0.276.0",
4
4
  "description": "Valibot wire contract shared between the Agent Architecture Board frontend and backend.",
5
5
  "repository": {
6
6
  "type": "git",