@cat-factory/contracts 0.34.0 → 0.36.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 (209) hide show
  1. package/dist/api-keys.d.ts +17 -0
  2. package/dist/api-keys.d.ts.map +1 -1
  3. package/dist/api-keys.js +2 -0
  4. package/dist/api-keys.js.map +1 -1
  5. package/dist/github.d.ts +14 -0
  6. package/dist/github.d.ts.map +1 -1
  7. package/dist/github.js +13 -0
  8. package/dist/github.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/observability.d.ts +63 -0
  14. package/dist/observability.d.ts.map +1 -1
  15. package/dist/observability.js +57 -0
  16. package/dist/observability.js.map +1 -1
  17. package/dist/requests.d.ts +7 -0
  18. package/dist/requests.d.ts.map +1 -1
  19. package/dist/requests.js +2 -0
  20. package/dist/requests.js.map +1 -1
  21. package/dist/routes/_shared.d.ts +58 -0
  22. package/dist/routes/_shared.d.ts.map +1 -0
  23. package/dist/routes/_shared.js +46 -0
  24. package/dist/routes/_shared.js.map +1 -0
  25. package/dist/routes/accounts.d.ts +775 -0
  26. package/dist/routes/accounts.d.ts.map +1 -0
  27. package/dist/routes/accounts.js +145 -0
  28. package/dist/routes/accounts.js.map +1 -0
  29. package/dist/routes/agent-runs.d.ts +659 -0
  30. package/dist/routes/agent-runs.d.ts.map +1 -0
  31. package/dist/routes/agent-runs.js +33 -0
  32. package/dist/routes/agent-runs.js.map +1 -0
  33. package/dist/routes/api-keys.d.ts +244 -0
  34. package/dist/routes/api-keys.d.ts.map +1 -0
  35. package/dist/routes/api-keys.js +48 -0
  36. package/dist/routes/api-keys.js.map +1 -0
  37. package/dist/routes/auth.d.ts +411 -0
  38. package/dist/routes/auth.d.ts.map +1 -0
  39. package/dist/routes/auth.js +129 -0
  40. package/dist/routes/auth.js.map +1 -0
  41. package/dist/routes/board.d.ts +1259 -0
  42. package/dist/routes/board.d.ts.map +1 -0
  43. package/dist/routes/board.js +84 -0
  44. package/dist/routes/board.js.map +1 -0
  45. package/dist/routes/bootstrap.d.ts +395 -0
  46. package/dist/routes/bootstrap.d.ts.map +1 -0
  47. package/dist/routes/bootstrap.js +56 -0
  48. package/dist/routes/bootstrap.js.map +1 -0
  49. package/dist/routes/brainstorm.d.ts +482 -0
  50. package/dist/routes/brainstorm.d.ts.map +1 -0
  51. package/dist/routes/brainstorm.js +69 -0
  52. package/dist/routes/brainstorm.js.map +1 -0
  53. package/dist/routes/clarity.d.ts +462 -0
  54. package/dist/routes/clarity.d.ts.map +1 -0
  55. package/dist/routes/clarity.js +67 -0
  56. package/dist/routes/clarity.js.map +1 -0
  57. package/dist/routes/consensus.d.ts +71 -0
  58. package/dist/routes/consensus.d.ts.map +1 -0
  59. package/dist/routes/consensus.js +23 -0
  60. package/dist/routes/consensus.js.map +1 -0
  61. package/dist/routes/documents.d.ts +449 -0
  62. package/dist/routes/documents.d.ts.map +1 -0
  63. package/dist/routes/documents.js +89 -0
  64. package/dist/routes/documents.js.map +1 -0
  65. package/dist/routes/environments.d.ts +715 -0
  66. package/dist/routes/environments.d.ts.map +1 -0
  67. package/dist/routes/environments.js +82 -0
  68. package/dist/routes/environments.js.map +1 -0
  69. package/dist/routes/execution.d.ts +2768 -0
  70. package/dist/routes/execution.d.ts.map +1 -0
  71. package/dist/routes/execution.js +119 -0
  72. package/dist/routes/execution.js.map +1 -0
  73. package/dist/routes/followUp.d.ts +277 -0
  74. package/dist/routes/followUp.d.ts.map +1 -0
  75. package/dist/routes/followUp.js +47 -0
  76. package/dist/routes/followUp.js.map +1 -0
  77. package/dist/routes/fragment-library.d.ts +594 -0
  78. package/dist/routes/fragment-library.d.ts.map +1 -0
  79. package/dist/routes/fragment-library.js +102 -0
  80. package/dist/routes/fragment-library.js.map +1 -0
  81. package/dist/routes/github.d.ts +807 -0
  82. package/dist/routes/github.d.ts.map +1 -0
  83. package/dist/routes/github.js +157 -0
  84. package/dist/routes/github.js.map +1 -0
  85. package/dist/routes/human-review.d.ts +289 -0
  86. package/dist/routes/human-review.d.ts.map +1 -0
  87. package/dist/routes/human-review.js +19 -0
  88. package/dist/routes/human-review.js.map +1 -0
  89. package/dist/routes/human-test.d.ts +1434 -0
  90. package/dist/routes/human-test.d.ts.map +1 -0
  91. package/dist/routes/human-test.js +47 -0
  92. package/dist/routes/human-test.js.map +1 -0
  93. package/dist/routes/incident-enrichment.d.ts +110 -0
  94. package/dist/routes/incident-enrichment.d.ts.map +1 -0
  95. package/dist/routes/incident-enrichment.js +26 -0
  96. package/dist/routes/incident-enrichment.js.map +1 -0
  97. package/dist/routes/index.d.ts +47 -0
  98. package/dist/routes/index.d.ts.map +1 -0
  99. package/dist/routes/index.js +50 -0
  100. package/dist/routes/index.js.map +1 -0
  101. package/dist/routes/kaizen.d.ts +112 -0
  102. package/dist/routes/kaizen.d.ts.map +1 -0
  103. package/dist/routes/kaizen.js +21 -0
  104. package/dist/routes/kaizen.js.map +1 -0
  105. package/dist/routes/localModels.d.ts +163 -0
  106. package/dist/routes/localModels.d.ts.map +1 -0
  107. package/dist/routes/localModels.js +41 -0
  108. package/dist/routes/localModels.js.map +1 -0
  109. package/dist/routes/localSettings.d.ts +93 -0
  110. package/dist/routes/localSettings.d.ts.map +1 -0
  111. package/dist/routes/localSettings.js +22 -0
  112. package/dist/routes/localSettings.js.map +1 -0
  113. package/dist/routes/merge.d.ts +197 -0
  114. package/dist/routes/merge.d.ts.map +1 -0
  115. package/dist/routes/merge.js +36 -0
  116. package/dist/routes/merge.js.map +1 -0
  117. package/dist/routes/model-presets.d.ts +162 -0
  118. package/dist/routes/model-presets.d.ts.map +1 -0
  119. package/dist/routes/model-presets.js +36 -0
  120. package/dist/routes/model-presets.js.map +1 -0
  121. package/dist/routes/models.d.ts +122 -0
  122. package/dist/routes/models.d.ts.map +1 -0
  123. package/dist/routes/models.js +24 -0
  124. package/dist/routes/models.js.map +1 -0
  125. package/dist/routes/notifications.d.ts +213 -0
  126. package/dist/routes/notifications.d.ts.map +1 -0
  127. package/dist/routes/notifications.js +31 -0
  128. package/dist/routes/notifications.js.map +1 -0
  129. package/dist/routes/openrouter.d.ts +144 -0
  130. package/dist/routes/openrouter.d.ts.map +1 -0
  131. package/dist/routes/openrouter.js +31 -0
  132. package/dist/routes/openrouter.js.map +1 -0
  133. package/dist/routes/personal-subscriptions.d.ts +124 -0
  134. package/dist/routes/personal-subscriptions.d.ts.map +1 -0
  135. package/dist/routes/personal-subscriptions.js +32 -0
  136. package/dist/routes/personal-subscriptions.js.map +1 -0
  137. package/dist/routes/pipelines.d.ts +457 -0
  138. package/dist/routes/pipelines.d.ts.map +1 -0
  139. package/dist/routes/pipelines.js +51 -0
  140. package/dist/routes/pipelines.js.map +1 -0
  141. package/dist/routes/prompt-fragments.d.ts +52 -0
  142. package/dist/routes/prompt-fragments.d.ts.map +1 -0
  143. package/dist/routes/prompt-fragments.js +14 -0
  144. package/dist/routes/prompt-fragments.js.map +1 -0
  145. package/dist/routes/provisioning-logs.d.ts +45 -0
  146. package/dist/routes/provisioning-logs.d.ts.map +1 -0
  147. package/dist/routes/provisioning-logs.js +14 -0
  148. package/dist/routes/provisioning-logs.js.map +1 -0
  149. package/dist/routes/recurring.d.ts +309 -0
  150. package/dist/routes/recurring.d.ts.map +1 -0
  151. package/dist/routes/recurring.js +50 -0
  152. package/dist/routes/recurring.js.map +1 -0
  153. package/dist/routes/release.d.ts +218 -0
  154. package/dist/routes/release.d.ts.map +1 -0
  155. package/dist/routes/release.js +47 -0
  156. package/dist/routes/release.js.map +1 -0
  157. package/dist/routes/requirements.d.ts +901 -0
  158. package/dist/routes/requirements.d.ts.map +1 -0
  159. package/dist/routes/requirements.js +96 -0
  160. package/dist/routes/requirements.js.map +1 -0
  161. package/dist/routes/runners.d.ts +442 -0
  162. package/dist/routes/runners.d.ts.map +1 -0
  163. package/dist/routes/runners.js +47 -0
  164. package/dist/routes/runners.js.map +1 -0
  165. package/dist/routes/sandbox.d.ts +898 -0
  166. package/dist/routes/sandbox.d.ts.map +1 -0
  167. package/dist/routes/sandbox.js +119 -0
  168. package/dist/routes/sandbox.js.map +1 -0
  169. package/dist/routes/service-fragment-defaults.d.ts +66 -0
  170. package/dist/routes/service-fragment-defaults.d.ts.map +1 -0
  171. package/dist/routes/service-fragment-defaults.js +20 -0
  172. package/dist/routes/service-fragment-defaults.js.map +1 -0
  173. package/dist/routes/services.d.ts +224 -0
  174. package/dist/routes/services.d.ts.map +1 -0
  175. package/dist/routes/services.js +44 -0
  176. package/dist/routes/services.js.map +1 -0
  177. package/dist/routes/slack.d.ts +332 -0
  178. package/dist/routes/slack.d.ts.map +1 -0
  179. package/dist/routes/slack.js +72 -0
  180. package/dist/routes/slack.js.map +1 -0
  181. package/dist/routes/spec.d.ts +75 -0
  182. package/dist/routes/spec.d.ts.map +1 -0
  183. package/dist/routes/spec.js +16 -0
  184. package/dist/routes/spec.js.map +1 -0
  185. package/dist/routes/tasks.d.ts +723 -0
  186. package/dist/routes/tasks.d.ts.map +1 -0
  187. package/dist/routes/tasks.js +108 -0
  188. package/dist/routes/tasks.js.map +1 -0
  189. package/dist/routes/tracker.d.ts +77 -0
  190. package/dist/routes/tracker.d.ts.map +1 -0
  191. package/dist/routes/tracker.js +20 -0
  192. package/dist/routes/tracker.js.map +1 -0
  193. package/dist/routes/user-secret.d.ts +231 -0
  194. package/dist/routes/user-secret.d.ts.map +1 -0
  195. package/dist/routes/user-secret.js +49 -0
  196. package/dist/routes/user-secret.js.map +1 -0
  197. package/dist/routes/vendor-credentials.d.ts +120 -0
  198. package/dist/routes/vendor-credentials.d.ts.map +1 -0
  199. package/dist/routes/vendor-credentials.js +33 -0
  200. package/dist/routes/vendor-credentials.js.map +1 -0
  201. package/dist/routes/workspace-settings.d.ts +93 -0
  202. package/dist/routes/workspace-settings.d.ts.map +1 -0
  203. package/dist/routes/workspace-settings.js +20 -0
  204. package/dist/routes/workspace-settings.js.map +1 -0
  205. package/dist/routes/workspaces.d.ts +1309 -0
  206. package/dist/routes/workspaces.d.ts.map +1 -0
  207. package/dist/routes/workspaces.js +45 -0
  208. package/dist/routes/workspaces.js.map +1 -0
  209. package/package.json +3 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-test.d.ts","sourceRoot":"","sources":["../../src/routes/human-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAc3E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMnC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMtC,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMpC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMvC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMtC,CAAA"}
@@ -0,0 +1,47 @@
1
+ import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
2
+ import { executionInstanceSchema } from '../entities.js';
3
+ import { requestHumanTestFixSchema } from '../human-test.js';
4
+ import { errorResponses, singleStringParam } from './_shared.js';
5
+ // ---------------------------------------------------------------------------
6
+ // Human-testing gate route contracts. Mounted under `/workspaces/:workspaceId`,
7
+ // so the paths here are relative to that prefix. Each route drives the block's
8
+ // parked `human-test` step and returns the updated execution instance. See
9
+ // HumanTestController in @cat-factory/server.
10
+ // ---------------------------------------------------------------------------
11
+ const blockIdParams = singleStringParam('blockId');
12
+ export const confirmHumanTestContract = defineApiContract({
13
+ method: 'post',
14
+ requestPathParamsSchema: blockIdParams,
15
+ pathResolver: ({ blockId }) => `/blocks/${blockId}/human-test/confirm`,
16
+ requestBodySchema: ContractNoBody,
17
+ responsesByStatusCode: { 200: executionInstanceSchema, ...errorResponses },
18
+ });
19
+ export const requestHumanTestFixContract = defineApiContract({
20
+ method: 'post',
21
+ requestPathParamsSchema: blockIdParams,
22
+ pathResolver: ({ blockId }) => `/blocks/${blockId}/human-test/request-fix`,
23
+ requestBodySchema: requestHumanTestFixSchema,
24
+ responsesByStatusCode: { 200: executionInstanceSchema, ...errorResponses },
25
+ });
26
+ export const pullMainHumanTestContract = defineApiContract({
27
+ method: 'post',
28
+ requestPathParamsSchema: blockIdParams,
29
+ pathResolver: ({ blockId }) => `/blocks/${blockId}/human-test/pull-main`,
30
+ requestBodySchema: ContractNoBody,
31
+ responsesByStatusCode: { 200: executionInstanceSchema, ...errorResponses },
32
+ });
33
+ export const recreateHumanTestEnvContract = defineApiContract({
34
+ method: 'post',
35
+ requestPathParamsSchema: blockIdParams,
36
+ pathResolver: ({ blockId }) => `/blocks/${blockId}/human-test/recreate-env`,
37
+ requestBodySchema: ContractNoBody,
38
+ responsesByStatusCode: { 200: executionInstanceSchema, ...errorResponses },
39
+ });
40
+ export const destroyHumanTestEnvContract = defineApiContract({
41
+ method: 'post',
42
+ requestPathParamsSchema: blockIdParams,
43
+ pathResolver: ({ blockId }) => `/blocks/${blockId}/human-test/destroy-env`,
44
+ requestBodySchema: ContractNoBody,
45
+ responsesByStatusCode: { 200: executionInstanceSchema, ...errorResponses },
46
+ });
47
+ //# sourceMappingURL=human-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-test.js","sourceRoot":"","sources":["../../src/routes/human-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhE,8EAA8E;AAC9E,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,8CAA8C;AAC9C,8EAA8E;AAE9E,MAAM,aAAa,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAA;AAElD,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,MAAM;IACd,uBAAuB,EAAE,aAAa;IACtC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,WAAW,OAAO,qBAAqB;IACtE,iBAAiB,EAAE,cAAc;IACjC,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;IAC3D,MAAM,EAAE,MAAM;IACd,uBAAuB,EAAE,aAAa;IACtC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,WAAW,OAAO,yBAAyB;IAC1E,iBAAiB,EAAE,yBAAyB;IAC5C,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACzD,MAAM,EAAE,MAAM;IACd,uBAAuB,EAAE,aAAa;IACtC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,WAAW,OAAO,uBAAuB;IACxE,iBAAiB,EAAE,cAAc;IACjC,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC5D,MAAM,EAAE,MAAM;IACd,uBAAuB,EAAE,aAAa;IACtC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,WAAW,OAAO,0BAA0B;IAC3E,iBAAiB,EAAE,cAAc;IACjC,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;IAC3D,MAAM,EAAE,MAAM;IACd,uBAAuB,EAAE,aAAa;IACtC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,WAAW,OAAO,yBAAyB;IAC1E,iBAAiB,EAAE,cAAc;IACjC,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CAAA"}
@@ -0,0 +1,110 @@
1
+ import { ContractNoBody } from '@toad-contracts/valibot';
2
+ export declare const getIncidentEnrichmentContract: {
3
+ readonly method: "get";
4
+ readonly pathResolver: () => string;
5
+ readonly responsesByStatusCode: {
6
+ readonly '4xx': import("valibot").ObjectSchema<{
7
+ readonly error: import("valibot").ObjectSchema<{
8
+ readonly code: import("valibot").StringSchema<undefined>;
9
+ readonly message: import("valibot").StringSchema<undefined>;
10
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
11
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
12
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
13
+ readonly message: import("valibot").StringSchema<undefined>;
14
+ }, undefined>, undefined>, undefined>;
15
+ }, undefined>;
16
+ }, undefined>;
17
+ readonly '5xx': import("valibot").ObjectSchema<{
18
+ readonly error: import("valibot").ObjectSchema<{
19
+ readonly code: import("valibot").StringSchema<undefined>;
20
+ readonly message: import("valibot").StringSchema<undefined>;
21
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
22
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
23
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
24
+ readonly message: import("valibot").StringSchema<undefined>;
25
+ }, undefined>, undefined>, undefined>;
26
+ }, undefined>;
27
+ }, undefined>;
28
+ readonly 200: import("valibot").ObjectSchema<{
29
+ readonly connected: import("valibot").BooleanSchema<undefined>;
30
+ readonly summary: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
31
+ readonly pagerDuty: import("valibot").BooleanSchema<undefined>;
32
+ readonly incidentIo: import("valibot").BooleanSchema<undefined>;
33
+ }, undefined>, undefined>;
34
+ }, undefined>;
35
+ };
36
+ };
37
+ export declare const setIncidentEnrichmentContract: {
38
+ readonly method: "put";
39
+ readonly pathResolver: () => string;
40
+ readonly requestBodySchema: import("valibot").ObjectSchema<{
41
+ readonly pagerDuty: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").ObjectSchema<{
42
+ readonly apiToken: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>]>;
43
+ readonly fromEmail: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").EmailAction<string, undefined>]>;
44
+ }, undefined>, undefined>, undefined>;
45
+ readonly incidentIo: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").ObjectSchema<{
46
+ readonly apiKey: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").TrimAction, import("valibot").MinLengthAction<string, 1, undefined>]>;
47
+ }, undefined>, undefined>, undefined>;
48
+ }, undefined>;
49
+ readonly responsesByStatusCode: {
50
+ readonly '4xx': import("valibot").ObjectSchema<{
51
+ readonly error: import("valibot").ObjectSchema<{
52
+ readonly code: import("valibot").StringSchema<undefined>;
53
+ readonly message: import("valibot").StringSchema<undefined>;
54
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
55
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
56
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
57
+ readonly message: import("valibot").StringSchema<undefined>;
58
+ }, undefined>, undefined>, undefined>;
59
+ }, undefined>;
60
+ }, undefined>;
61
+ readonly '5xx': import("valibot").ObjectSchema<{
62
+ readonly error: import("valibot").ObjectSchema<{
63
+ readonly code: import("valibot").StringSchema<undefined>;
64
+ readonly message: import("valibot").StringSchema<undefined>;
65
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
66
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
67
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
68
+ readonly message: import("valibot").StringSchema<undefined>;
69
+ }, undefined>, undefined>, undefined>;
70
+ }, undefined>;
71
+ }, undefined>;
72
+ readonly 200: import("valibot").ObjectSchema<{
73
+ readonly connected: import("valibot").BooleanSchema<undefined>;
74
+ readonly summary: import("valibot").NullableSchema<import("valibot").ObjectSchema<{
75
+ readonly pagerDuty: import("valibot").BooleanSchema<undefined>;
76
+ readonly incidentIo: import("valibot").BooleanSchema<undefined>;
77
+ }, undefined>, undefined>;
78
+ }, undefined>;
79
+ };
80
+ };
81
+ export declare const deleteIncidentEnrichmentContract: {
82
+ readonly method: "delete";
83
+ readonly pathResolver: () => string;
84
+ readonly responsesByStatusCode: {
85
+ readonly '4xx': import("valibot").ObjectSchema<{
86
+ readonly error: import("valibot").ObjectSchema<{
87
+ readonly code: import("valibot").StringSchema<undefined>;
88
+ readonly message: import("valibot").StringSchema<undefined>;
89
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
90
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
91
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
92
+ readonly message: import("valibot").StringSchema<undefined>;
93
+ }, undefined>, undefined>, undefined>;
94
+ }, undefined>;
95
+ }, undefined>;
96
+ readonly '5xx': import("valibot").ObjectSchema<{
97
+ readonly error: import("valibot").ObjectSchema<{
98
+ readonly code: import("valibot").StringSchema<undefined>;
99
+ readonly message: import("valibot").StringSchema<undefined>;
100
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
101
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
102
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
103
+ readonly message: import("valibot").StringSchema<undefined>;
104
+ }, undefined>, undefined>, undefined>;
105
+ }, undefined>;
106
+ }, undefined>;
107
+ readonly 204: typeof ContractNoBody;
108
+ };
109
+ };
110
+ //# sourceMappingURL=incident-enrichment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incident-enrichment.d.ts","sourceRoot":"","sources":["../../src/routes/incident-enrichment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAc3E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIxC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxC,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI3C,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
2
+ import { incidentEnrichmentViewSchema, upsertIncidentEnrichmentSchema, } from '../incident-enrichment.js';
3
+ import { errorResponses } from './_shared.js';
4
+ // ---------------------------------------------------------------------------
5
+ // Per-workspace incident-enrichment route contracts (PagerDuty + incident.io).
6
+ // Mounted under `/workspaces/:workspaceId`, so the paths here are relative to
7
+ // that prefix. Credentials are write-only — GET returns only a presence summary.
8
+ // See IncidentEnrichmentController.
9
+ // ---------------------------------------------------------------------------
10
+ export const getIncidentEnrichmentContract = defineApiContract({
11
+ method: 'get',
12
+ pathResolver: () => '/incident-enrichment',
13
+ responsesByStatusCode: { 200: incidentEnrichmentViewSchema, ...errorResponses },
14
+ });
15
+ export const setIncidentEnrichmentContract = defineApiContract({
16
+ method: 'put',
17
+ pathResolver: () => '/incident-enrichment',
18
+ requestBodySchema: upsertIncidentEnrichmentSchema,
19
+ responsesByStatusCode: { 200: incidentEnrichmentViewSchema, ...errorResponses },
20
+ });
21
+ export const deleteIncidentEnrichmentContract = defineApiContract({
22
+ method: 'delete',
23
+ pathResolver: () => '/incident-enrichment',
24
+ responsesByStatusCode: { 204: ContractNoBody, ...errorResponses },
25
+ });
26
+ //# sourceMappingURL=incident-enrichment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"incident-enrichment.js","sourceRoot":"","sources":["../../src/routes/incident-enrichment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,oCAAoC;AACpC,8EAA8E;AAE9E,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;IAC7D,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,sBAAsB;IAC1C,qBAAqB,EAAE,EAAE,GAAG,EAAE,4BAA4B,EAAE,GAAG,cAAc,EAAE;CAChF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;IAC7D,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,sBAAsB;IAC1C,iBAAiB,EAAE,8BAA8B;IACjD,qBAAqB,EAAE,EAAE,GAAG,EAAE,4BAA4B,EAAE,GAAG,cAAc,EAAE;CAChF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;IAChE,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,GAAG,EAAE,CAAC,sBAAsB;IAC1C,qBAAqB,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE;CAClE,CAAC,CAAA"}
@@ -0,0 +1,47 @@
1
+ export * from './_shared.js';
2
+ export * from './accounts.js';
3
+ export * from './agent-runs.js';
4
+ export * from './api-keys.js';
5
+ export * from './auth.js';
6
+ export * from './board.js';
7
+ export * from './bootstrap.js';
8
+ export * from './brainstorm.js';
9
+ export * from './clarity.js';
10
+ export * from './consensus.js';
11
+ export * from './documents.js';
12
+ export * from './environments.js';
13
+ export * from './execution.js';
14
+ export * from './followUp.js';
15
+ export * from './fragment-library.js';
16
+ export * from './github.js';
17
+ export * from './human-review.js';
18
+ export * from './human-test.js';
19
+ export * from './incident-enrichment.js';
20
+ export * from './kaizen.js';
21
+ export * from './localModels.js';
22
+ export * from './localSettings.js';
23
+ export * from './merge.js';
24
+ export * from './model-presets.js';
25
+ export * from './models.js';
26
+ export * from './notifications.js';
27
+ export * from './openrouter.js';
28
+ export * from './personal-subscriptions.js';
29
+ export * from './pipelines.js';
30
+ export * from './prompt-fragments.js';
31
+ export * from './provisioning-logs.js';
32
+ export * from './recurring.js';
33
+ export * from './release.js';
34
+ export * from './requirements.js';
35
+ export * from './runners.js';
36
+ export * from './sandbox.js';
37
+ export * from './service-fragment-defaults.js';
38
+ export * from './services.js';
39
+ export * from './slack.js';
40
+ export * from './spec.js';
41
+ export * from './tasks.js';
42
+ export * from './tracker.js';
43
+ export * from './user-secret.js';
44
+ export * from './vendor-credentials.js';
45
+ export * from './workspace-settings.js';
46
+ export * from './workspaces.js';
47
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,50 @@
1
+ // Route contracts: the single source of truth for path + method + request +
2
+ // response, consumed by the backend (`buildHonoRoute`) and the frontend client
3
+ // (`sendByApiContract`). One module per API domain.
4
+ export * from './_shared.js';
5
+ export * from './accounts.js';
6
+ export * from './agent-runs.js';
7
+ export * from './api-keys.js';
8
+ export * from './auth.js';
9
+ export * from './board.js';
10
+ export * from './bootstrap.js';
11
+ export * from './brainstorm.js';
12
+ export * from './clarity.js';
13
+ export * from './consensus.js';
14
+ export * from './documents.js';
15
+ export * from './environments.js';
16
+ export * from './execution.js';
17
+ export * from './followUp.js';
18
+ export * from './fragment-library.js';
19
+ export * from './github.js';
20
+ export * from './human-review.js';
21
+ export * from './human-test.js';
22
+ export * from './incident-enrichment.js';
23
+ export * from './kaizen.js';
24
+ export * from './localModels.js';
25
+ export * from './localSettings.js';
26
+ export * from './merge.js';
27
+ export * from './model-presets.js';
28
+ export * from './models.js';
29
+ export * from './notifications.js';
30
+ export * from './openrouter.js';
31
+ export * from './personal-subscriptions.js';
32
+ export * from './pipelines.js';
33
+ export * from './prompt-fragments.js';
34
+ export * from './provisioning-logs.js';
35
+ export * from './recurring.js';
36
+ export * from './release.js';
37
+ export * from './requirements.js';
38
+ export * from './runners.js';
39
+ export * from './sandbox.js';
40
+ export * from './service-fragment-defaults.js';
41
+ export * from './services.js';
42
+ export * from './slack.js';
43
+ export * from './spec.js';
44
+ export * from './tasks.js';
45
+ export * from './tracker.js';
46
+ export * from './user-secret.js';
47
+ export * from './vendor-credentials.js';
48
+ export * from './workspace-settings.js';
49
+ export * from './workspaces.js';
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,oDAAoD;AACpD,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,gCAAgC,CAAA;AAC9C,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,112 @@
1
+ export declare const getKaizenOverviewContract: {
2
+ readonly method: "get";
3
+ readonly pathResolver: () => string;
4
+ readonly responsesByStatusCode: {
5
+ readonly '4xx': import("valibot").ObjectSchema<{
6
+ readonly error: import("valibot").ObjectSchema<{
7
+ readonly code: import("valibot").StringSchema<undefined>;
8
+ readonly message: import("valibot").StringSchema<undefined>;
9
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
10
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
11
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
12
+ readonly message: import("valibot").StringSchema<undefined>;
13
+ }, undefined>, undefined>, undefined>;
14
+ }, undefined>;
15
+ }, undefined>;
16
+ readonly '5xx': import("valibot").ObjectSchema<{
17
+ readonly error: import("valibot").ObjectSchema<{
18
+ readonly code: import("valibot").StringSchema<undefined>;
19
+ readonly message: import("valibot").StringSchema<undefined>;
20
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
21
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
22
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
23
+ readonly message: import("valibot").StringSchema<undefined>;
24
+ }, undefined>, undefined>, undefined>;
25
+ }, undefined>;
26
+ }, undefined>;
27
+ readonly 200: import("valibot").ObjectSchema<{
28
+ readonly gradings: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
29
+ readonly id: import("valibot").StringSchema<undefined>;
30
+ readonly executionId: import("valibot").StringSchema<undefined>;
31
+ readonly blockId: import("valibot").StringSchema<undefined>;
32
+ readonly stepIndex: import("valibot").NumberSchema<undefined>;
33
+ readonly agentKind: import("valibot").StringSchema<undefined>;
34
+ readonly model: import("valibot").StringSchema<undefined>;
35
+ readonly promptVersion: import("valibot").NumberSchema<undefined>;
36
+ readonly comboKey: import("valibot").StringSchema<undefined>;
37
+ readonly status: import("valibot").PicklistSchema<["scheduled", "running", "complete", "failed"], undefined>;
38
+ readonly grade: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
39
+ readonly summary: import("valibot").StringSchema<undefined>;
40
+ readonly recommendations: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
41
+ readonly graderModel: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
42
+ readonly error: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
43
+ readonly createdAt: import("valibot").NumberSchema<undefined>;
44
+ readonly updatedAt: import("valibot").NumberSchema<undefined>;
45
+ }, undefined>, undefined>;
46
+ readonly verified: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
47
+ readonly comboKey: import("valibot").StringSchema<undefined>;
48
+ readonly agentKind: import("valibot").StringSchema<undefined>;
49
+ readonly model: import("valibot").StringSchema<undefined>;
50
+ readonly promptVersion: import("valibot").NumberSchema<undefined>;
51
+ readonly consecutiveHighGrades: import("valibot").NumberSchema<undefined>;
52
+ readonly verified: import("valibot").BooleanSchema<undefined>;
53
+ readonly verifiedAt: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
54
+ readonly updatedAt: import("valibot").NumberSchema<undefined>;
55
+ }, undefined>, undefined>;
56
+ }, undefined>;
57
+ };
58
+ };
59
+ export declare const getKaizenRunGradingsContract: {
60
+ readonly method: "get";
61
+ readonly requestPathParamsSchema: import("valibot").ObjectSchema<{
62
+ executionId: import("valibot").StringSchema<undefined>;
63
+ }, undefined> & import("@toad-contracts/core").ObjectKeysCarrier;
64
+ readonly pathResolver: ({ executionId }: {
65
+ executionId: string;
66
+ }) => string;
67
+ readonly responsesByStatusCode: {
68
+ readonly '4xx': import("valibot").ObjectSchema<{
69
+ readonly error: import("valibot").ObjectSchema<{
70
+ readonly code: import("valibot").StringSchema<undefined>;
71
+ readonly message: import("valibot").StringSchema<undefined>;
72
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
73
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
74
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
75
+ readonly message: import("valibot").StringSchema<undefined>;
76
+ }, undefined>, undefined>, undefined>;
77
+ }, undefined>;
78
+ }, undefined>;
79
+ readonly '5xx': import("valibot").ObjectSchema<{
80
+ readonly error: import("valibot").ObjectSchema<{
81
+ readonly code: import("valibot").StringSchema<undefined>;
82
+ readonly message: import("valibot").StringSchema<undefined>;
83
+ readonly details: import("valibot").OptionalSchema<import("valibot").UnknownSchema, undefined>;
84
+ readonly issues: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").ObjectSchema<{
85
+ readonly path: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
86
+ readonly message: import("valibot").StringSchema<undefined>;
87
+ }, undefined>, undefined>, undefined>;
88
+ }, undefined>;
89
+ }, undefined>;
90
+ readonly 200: import("valibot").ObjectSchema<{
91
+ readonly gradings: import("valibot").ArraySchema<import("valibot").ObjectSchema<{
92
+ readonly id: import("valibot").StringSchema<undefined>;
93
+ readonly executionId: import("valibot").StringSchema<undefined>;
94
+ readonly blockId: import("valibot").StringSchema<undefined>;
95
+ readonly stepIndex: import("valibot").NumberSchema<undefined>;
96
+ readonly agentKind: import("valibot").StringSchema<undefined>;
97
+ readonly model: import("valibot").StringSchema<undefined>;
98
+ readonly promptVersion: import("valibot").NumberSchema<undefined>;
99
+ readonly comboKey: import("valibot").StringSchema<undefined>;
100
+ readonly status: import("valibot").PicklistSchema<["scheduled", "running", "complete", "failed"], undefined>;
101
+ readonly grade: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, undefined>;
102
+ readonly summary: import("valibot").StringSchema<undefined>;
103
+ readonly recommendations: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
104
+ readonly graderModel: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
105
+ readonly error: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
106
+ readonly createdAt: import("valibot").NumberSchema<undefined>;
107
+ readonly updatedAt: import("valibot").NumberSchema<undefined>;
108
+ }, undefined>, undefined>;
109
+ }, undefined>;
110
+ };
111
+ };
112
+ //# sourceMappingURL=kaizen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaizen.d.ts","sourceRoot":"","sources":["../../src/routes/kaizen.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIpC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKvC,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { defineApiContract } from '@toad-contracts/valibot';
2
+ import { kaizenOverviewSchema, kaizenRunGradingsSchema } from '../kaizen.js';
3
+ import { errorResponses, singleStringParam } from './_shared.js';
4
+ // ---------------------------------------------------------------------------
5
+ // Kaizen route contracts (read-only). Mounted under `/workspaces/:workspaceId`,
6
+ // so the paths here are relative to that prefix. See KaizenController in
7
+ // @cat-factory/server.
8
+ // ---------------------------------------------------------------------------
9
+ const executionIdParams = singleStringParam('executionId');
10
+ export const getKaizenOverviewContract = defineApiContract({
11
+ method: 'get',
12
+ pathResolver: () => '/kaizen',
13
+ responsesByStatusCode: { 200: kaizenOverviewSchema, ...errorResponses },
14
+ });
15
+ export const getKaizenRunGradingsContract = defineApiContract({
16
+ method: 'get',
17
+ requestPathParamsSchema: executionIdParams,
18
+ pathResolver: ({ executionId }) => `/executions/${executionId}/kaizen`,
19
+ responsesByStatusCode: { 200: kaizenRunGradingsSchema, ...errorResponses },
20
+ });
21
+ //# sourceMappingURL=kaizen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaizen.js","sourceRoot":"","sources":["../../src/routes/kaizen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhE,8EAA8E;AAC9E,gFAAgF;AAChF,yEAAyE;AACzE,uBAAuB;AACvB,8EAA8E;AAE9E,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAA;AAE1D,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACzD,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;IAC7B,qBAAqB,EAAE,EAAE,GAAG,EAAE,oBAAoB,EAAE,GAAG,cAAc,EAAE;CACxE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC5D,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,iBAAiB;IAC1C,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,eAAe,WAAW,SAAS;IACtE,qBAAqB,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE,GAAG,cAAc,EAAE;CAC3E,CAAC,CAAA"}
@@ -0,0 +1,163 @@
1
+ import { ContractNoBody } from '@toad-contracts/valibot';
2
+ import * as v from 'valibot';
3
+ export declare const listLocalModelEndpointsContract: {
4
+ readonly method: "get";
5
+ readonly pathResolver: () => string;
6
+ readonly responsesByStatusCode: {
7
+ readonly '4xx': v.ObjectSchema<{
8
+ readonly error: v.ObjectSchema<{
9
+ readonly code: v.StringSchema<undefined>;
10
+ readonly message: v.StringSchema<undefined>;
11
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
12
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
13
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
14
+ readonly message: v.StringSchema<undefined>;
15
+ }, undefined>, undefined>, undefined>;
16
+ }, undefined>;
17
+ }, undefined>;
18
+ readonly '5xx': v.ObjectSchema<{
19
+ readonly error: v.ObjectSchema<{
20
+ readonly code: v.StringSchema<undefined>;
21
+ readonly message: v.StringSchema<undefined>;
22
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
23
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
24
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
25
+ readonly message: v.StringSchema<undefined>;
26
+ }, undefined>, undefined>, undefined>;
27
+ }, undefined>;
28
+ }, undefined>;
29
+ readonly 200: v.ObjectSchema<{
30
+ readonly endpoints: v.ArraySchema<v.ObjectSchema<{
31
+ readonly provider: v.PicklistSchema<readonly ["ollama", "lmstudio", "llamacpp", "vllm", "custom"], undefined>;
32
+ readonly label: v.StringSchema<undefined>;
33
+ readonly baseUrl: v.StringSchema<undefined>;
34
+ readonly hasApiKey: v.BooleanSchema<undefined>;
35
+ readonly models: v.ArraySchema<v.StringSchema<undefined>, undefined>;
36
+ readonly createdAt: v.NumberSchema<undefined>;
37
+ readonly updatedAt: v.NumberSchema<undefined>;
38
+ }, undefined>, undefined>;
39
+ }, undefined>;
40
+ };
41
+ };
42
+ export declare const upsertLocalModelEndpointContract: {
43
+ readonly method: "put";
44
+ readonly requestPathParamsSchema: v.ObjectSchema<{
45
+ provider: v.StringSchema<undefined>;
46
+ }, undefined> & import("@toad-contracts/core").ObjectKeysCarrier;
47
+ readonly pathResolver: ({ provider }: {
48
+ provider: string;
49
+ }) => string;
50
+ readonly requestBodySchema: v.ObjectSchema<{
51
+ readonly provider: v.PicklistSchema<readonly ["ollama", "lmstudio", "llamacpp", "vllm", "custom"], undefined>;
52
+ readonly label: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 60, undefined>]>, undefined>;
53
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 300, undefined>, v.UrlAction<string, undefined>]>;
54
+ readonly apiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
55
+ readonly models: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
56
+ }, undefined>;
57
+ readonly responsesByStatusCode: {
58
+ readonly '4xx': v.ObjectSchema<{
59
+ readonly error: v.ObjectSchema<{
60
+ readonly code: v.StringSchema<undefined>;
61
+ readonly message: v.StringSchema<undefined>;
62
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
63
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
64
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
65
+ readonly message: v.StringSchema<undefined>;
66
+ }, undefined>, undefined>, undefined>;
67
+ }, undefined>;
68
+ }, undefined>;
69
+ readonly '5xx': v.ObjectSchema<{
70
+ readonly error: v.ObjectSchema<{
71
+ readonly code: v.StringSchema<undefined>;
72
+ readonly message: v.StringSchema<undefined>;
73
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
74
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
75
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
76
+ readonly message: v.StringSchema<undefined>;
77
+ }, undefined>, undefined>, undefined>;
78
+ }, undefined>;
79
+ }, undefined>;
80
+ readonly 201: v.ObjectSchema<{
81
+ readonly provider: v.PicklistSchema<readonly ["ollama", "lmstudio", "llamacpp", "vllm", "custom"], undefined>;
82
+ readonly label: v.StringSchema<undefined>;
83
+ readonly baseUrl: v.StringSchema<undefined>;
84
+ readonly hasApiKey: v.BooleanSchema<undefined>;
85
+ readonly models: v.ArraySchema<v.StringSchema<undefined>, undefined>;
86
+ readonly createdAt: v.NumberSchema<undefined>;
87
+ readonly updatedAt: v.NumberSchema<undefined>;
88
+ }, undefined>;
89
+ };
90
+ };
91
+ export declare const removeLocalModelEndpointContract: {
92
+ readonly method: "delete";
93
+ readonly requestPathParamsSchema: v.ObjectSchema<{
94
+ provider: v.StringSchema<undefined>;
95
+ }, undefined> & import("@toad-contracts/core").ObjectKeysCarrier;
96
+ readonly pathResolver: ({ provider }: {
97
+ provider: string;
98
+ }) => string;
99
+ readonly responsesByStatusCode: {
100
+ readonly '4xx': v.ObjectSchema<{
101
+ readonly error: v.ObjectSchema<{
102
+ readonly code: v.StringSchema<undefined>;
103
+ readonly message: v.StringSchema<undefined>;
104
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
105
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
106
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
107
+ readonly message: v.StringSchema<undefined>;
108
+ }, undefined>, undefined>, undefined>;
109
+ }, undefined>;
110
+ }, undefined>;
111
+ readonly '5xx': v.ObjectSchema<{
112
+ readonly error: v.ObjectSchema<{
113
+ readonly code: v.StringSchema<undefined>;
114
+ readonly message: v.StringSchema<undefined>;
115
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
116
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
117
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
118
+ readonly message: v.StringSchema<undefined>;
119
+ }, undefined>, undefined>, undefined>;
120
+ }, undefined>;
121
+ }, undefined>;
122
+ readonly 204: typeof ContractNoBody;
123
+ };
124
+ };
125
+ export declare const testLocalModelEndpointContract: {
126
+ readonly method: "post";
127
+ readonly pathResolver: () => string;
128
+ readonly requestBodySchema: v.ObjectSchema<{
129
+ readonly provider: v.PicklistSchema<readonly ["ollama", "lmstudio", "llamacpp", "vllm", "custom"], undefined>;
130
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 300, undefined>, v.UrlAction<string, undefined>]>;
131
+ readonly apiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
132
+ }, undefined>;
133
+ readonly responsesByStatusCode: {
134
+ readonly '4xx': v.ObjectSchema<{
135
+ readonly error: v.ObjectSchema<{
136
+ readonly code: v.StringSchema<undefined>;
137
+ readonly message: v.StringSchema<undefined>;
138
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
139
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
140
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
141
+ readonly message: v.StringSchema<undefined>;
142
+ }, undefined>, undefined>, undefined>;
143
+ }, undefined>;
144
+ }, undefined>;
145
+ readonly '5xx': v.ObjectSchema<{
146
+ readonly error: v.ObjectSchema<{
147
+ readonly code: v.StringSchema<undefined>;
148
+ readonly message: v.StringSchema<undefined>;
149
+ readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
150
+ readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
151
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
152
+ readonly message: v.StringSchema<undefined>;
153
+ }, undefined>, undefined>, undefined>;
154
+ }, undefined>;
155
+ }, undefined>;
156
+ readonly 200: v.ObjectSchema<{
157
+ readonly reachable: v.BooleanSchema<undefined>;
158
+ readonly models: v.ArraySchema<v.StringSchema<undefined>, undefined>;
159
+ readonly error: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
160
+ }, undefined>;
161
+ };
162
+ };
163
+ //# sourceMappingURL=localModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localModels.d.ts","sourceRoot":"","sources":["../../src/routes/localModels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAC3E,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAwB5B,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI1C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM3C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK3C,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKzC,CAAA"}