@cat-factory/contracts 0.6.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 (166) hide show
  1. package/LICENSE +21 -0
  2. package/dist/accounts.d.ts +103 -0
  3. package/dist/accounts.d.ts.map +1 -0
  4. package/dist/accounts.js +102 -0
  5. package/dist/accounts.js.map +1 -0
  6. package/dist/agent-config.d.ts +77 -0
  7. package/dist/agent-config.d.ts.map +1 -0
  8. package/dist/agent-config.js +78 -0
  9. package/dist/agent-config.js.map +1 -0
  10. package/dist/api-keys.d.ts +44 -0
  11. package/dist/api-keys.d.ts.map +1 -0
  12. package/dist/api-keys.js +49 -0
  13. package/dist/api-keys.js.map +1 -0
  14. package/dist/auth.d.ts +24 -0
  15. package/dist/auth.d.ts.map +1 -0
  16. package/dist/auth.js +15 -0
  17. package/dist/auth.js.map +1 -0
  18. package/dist/board-scan.d.ts +89 -0
  19. package/dist/board-scan.d.ts.map +1 -0
  20. package/dist/board-scan.js +122 -0
  21. package/dist/board-scan.js.map +1 -0
  22. package/dist/bootstrap.d.ts +168 -0
  23. package/dist/bootstrap.d.ts.map +1 -0
  24. package/dist/bootstrap.js +148 -0
  25. package/dist/bootstrap.js.map +1 -0
  26. package/dist/clarity.d.ts +75 -0
  27. package/dist/clarity.d.ts.map +1 -0
  28. package/dist/clarity.js +66 -0
  29. package/dist/clarity.js.map +1 -0
  30. package/dist/companion.d.ts +32 -0
  31. package/dist/companion.d.ts.map +1 -0
  32. package/dist/companion.js +43 -0
  33. package/dist/companion.js.map +1 -0
  34. package/dist/consensus.d.ts +195 -0
  35. package/dist/consensus.d.ts.map +1 -0
  36. package/dist/consensus.js +164 -0
  37. package/dist/consensus.js.map +1 -0
  38. package/dist/documents.d.ts +197 -0
  39. package/dist/documents.d.ts.map +1 -0
  40. package/dist/documents.js +161 -0
  41. package/dist/documents.js.map +1 -0
  42. package/dist/entities.d.ts +1691 -0
  43. package/dist/entities.d.ts.map +1 -0
  44. package/dist/entities.js +853 -0
  45. package/dist/entities.js.map +1 -0
  46. package/dist/environments.d.ts +426 -0
  47. package/dist/environments.d.ts.map +1 -0
  48. package/dist/environments.js +190 -0
  49. package/dist/environments.js.map +1 -0
  50. package/dist/events.d.ts +98 -0
  51. package/dist/events.d.ts.map +1 -0
  52. package/dist/events.js +2 -0
  53. package/dist/events.js.map +1 -0
  54. package/dist/fragment-library.d.ts +123 -0
  55. package/dist/fragment-library.d.ts.map +1 -0
  56. package/dist/fragment-library.js +88 -0
  57. package/dist/fragment-library.js.map +1 -0
  58. package/dist/github.d.ts +215 -0
  59. package/dist/github.d.ts.map +1 -0
  60. package/dist/github.js +204 -0
  61. package/dist/github.js.map +1 -0
  62. package/dist/index.d.ts +41 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +41 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/iteration-cap.d.ts +17 -0
  67. package/dist/iteration-cap.d.ts.map +1 -0
  68. package/dist/iteration-cap.js +25 -0
  69. package/dist/iteration-cap.js.map +1 -0
  70. package/dist/localModels.d.ts +54 -0
  71. package/dist/localModels.d.ts.map +1 -0
  72. package/dist/localModels.js +79 -0
  73. package/dist/localModels.js.map +1 -0
  74. package/dist/merge.d.ts +106 -0
  75. package/dist/merge.d.ts.map +1 -0
  76. package/dist/merge.js +129 -0
  77. package/dist/merge.js.map +1 -0
  78. package/dist/model-defaults.d.ts +23 -0
  79. package/dist/model-defaults.d.ts.map +1 -0
  80. package/dist/model-defaults.js +34 -0
  81. package/dist/model-defaults.js.map +1 -0
  82. package/dist/notifications.d.ts +136 -0
  83. package/dist/notifications.d.ts.map +1 -0
  84. package/dist/notifications.js +125 -0
  85. package/dist/notifications.js.map +1 -0
  86. package/dist/observability.d.ts +271 -0
  87. package/dist/observability.d.ts.map +1 -0
  88. package/dist/observability.js +152 -0
  89. package/dist/observability.js.map +1 -0
  90. package/dist/personal-subscriptions.d.ts +66 -0
  91. package/dist/personal-subscriptions.d.ts.map +1 -0
  92. package/dist/personal-subscriptions.js +70 -0
  93. package/dist/personal-subscriptions.js.map +1 -0
  94. package/dist/primitives.d.ts +57 -0
  95. package/dist/primitives.d.ts.map +1 -0
  96. package/dist/primitives.js +66 -0
  97. package/dist/primitives.js.map +1 -0
  98. package/dist/provisioning.d.ts +46 -0
  99. package/dist/provisioning.d.ts.map +1 -0
  100. package/dist/provisioning.js +107 -0
  101. package/dist/provisioning.js.map +1 -0
  102. package/dist/recurring.d.ts +117 -0
  103. package/dist/recurring.d.ts.map +1 -0
  104. package/dist/recurring.js +99 -0
  105. package/dist/recurring.js.map +1 -0
  106. package/dist/release.d.ts +60 -0
  107. package/dist/release.d.ts.map +1 -0
  108. package/dist/release.js +75 -0
  109. package/dist/release.js.map +1 -0
  110. package/dist/requests.d.ts +451 -0
  111. package/dist/requests.d.ts.map +1 -0
  112. package/dist/requests.js +231 -0
  113. package/dist/requests.js.map +1 -0
  114. package/dist/requirements.d.ts +127 -0
  115. package/dist/requirements.d.ts.map +1 -0
  116. package/dist/requirements.js +137 -0
  117. package/dist/requirements.js.map +1 -0
  118. package/dist/runners.d.ts +387 -0
  119. package/dist/runners.d.ts.map +1 -0
  120. package/dist/runners.js +117 -0
  121. package/dist/runners.js.map +1 -0
  122. package/dist/sandbox.d.ts +300 -0
  123. package/dist/sandbox.d.ts.map +1 -0
  124. package/dist/sandbox.js +243 -0
  125. package/dist/sandbox.js.map +1 -0
  126. package/dist/service-fragment-defaults.d.ts +16 -0
  127. package/dist/service-fragment-defaults.d.ts.map +1 -0
  128. package/dist/service-fragment-defaults.js +23 -0
  129. package/dist/service-fragment-defaults.js.map +1 -0
  130. package/dist/services.d.ts +81 -0
  131. package/dist/services.d.ts.map +1 -0
  132. package/dist/services.js +77 -0
  133. package/dist/services.js.map +1 -0
  134. package/dist/slack.d.ts +104 -0
  135. package/dist/slack.d.ts.map +1 -0
  136. package/dist/slack.js +98 -0
  137. package/dist/slack.js.map +1 -0
  138. package/dist/snapshot.d.ts +522 -0
  139. package/dist/snapshot.d.ts.map +1 -0
  140. package/dist/snapshot.js +104 -0
  141. package/dist/snapshot.js.map +1 -0
  142. package/dist/spec.d.ts +174 -0
  143. package/dist/spec.d.ts.map +1 -0
  144. package/dist/spec.js +173 -0
  145. package/dist/spec.js.map +1 -0
  146. package/dist/tasks.d.ts +150 -0
  147. package/dist/tasks.d.ts.map +1 -0
  148. package/dist/tasks.js +146 -0
  149. package/dist/tasks.js.map +1 -0
  150. package/dist/testing.d.ts +67 -0
  151. package/dist/testing.d.ts.map +1 -0
  152. package/dist/testing.js +64 -0
  153. package/dist/testing.js.map +1 -0
  154. package/dist/tracker.d.ts +18 -0
  155. package/dist/tracker.d.ts.map +1 -0
  156. package/dist/tracker.js +24 -0
  157. package/dist/tracker.js.map +1 -0
  158. package/dist/vendor-credentials.d.ts +37 -0
  159. package/dist/vendor-credentials.d.ts.map +1 -0
  160. package/dist/vendor-credentials.js +40 -0
  161. package/dist/vendor-credentials.js.map +1 -0
  162. package/dist/workspace-settings.d.ts +36 -0
  163. package/dist/workspace-settings.d.ts.map +1 -0
  164. package/dist/workspace-settings.js +41 -0
  165. package/dist/workspace-settings.js.map +1 -0
  166. package/package.json +31 -0
@@ -0,0 +1,215 @@
1
+ import * as v from 'valibot';
2
+ /** A repository the integration tracks for a workspace. */
3
+ export declare const githubRepoSchema: v.ObjectSchema<{
4
+ readonly githubId: v.NumberSchema<undefined>;
5
+ readonly installationId: v.NumberSchema<undefined>;
6
+ readonly owner: v.StringSchema<undefined>;
7
+ readonly name: v.StringSchema<undefined>;
8
+ readonly defaultBranch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
9
+ readonly private: v.BooleanSchema<undefined>;
10
+ /** Optional link to a board block this repo backs. */
11
+ readonly blockId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
12
+ /**
13
+ * Whether this repo is a monorepo hosting more than one service. When true the
14
+ * board lets several service frames target the same repo, each pinned to its own
15
+ * subdirectory (carried on the {@link Service}), and that subdirectory is fed to
16
+ * every agent working on the service. Owned by the board (set explicitly), so —
17
+ * like `blockId` — sync never overwrites it. Absent/false ⇒ a plain single-service
18
+ * repo (the historical behaviour).
19
+ */
20
+ readonly isMonorepo: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
21
+ /** When this projection row was last refreshed (epoch ms). */
22
+ readonly syncedAt: v.NumberSchema<undefined>;
23
+ }, undefined>;
24
+ export type GitHubRepo = v.InferOutput<typeof githubRepoSchema>;
25
+ export declare const githubBranchSchema: v.ObjectSchema<{
26
+ readonly repoGithubId: v.NumberSchema<undefined>;
27
+ readonly name: v.StringSchema<undefined>;
28
+ readonly headSha: v.StringSchema<undefined>;
29
+ readonly protected: v.BooleanSchema<undefined>;
30
+ readonly syncedAt: v.NumberSchema<undefined>;
31
+ }, undefined>;
32
+ export type GitHubBranch = v.InferOutput<typeof githubBranchSchema>;
33
+ export declare const githubPullRequestStateSchema: v.PicklistSchema<["open", "closed"], undefined>;
34
+ export type GitHubPullRequestState = v.InferOutput<typeof githubPullRequestStateSchema>;
35
+ export declare const githubPullRequestSchema: v.ObjectSchema<{
36
+ readonly repoGithubId: v.NumberSchema<undefined>;
37
+ readonly number: v.NumberSchema<undefined>;
38
+ readonly githubId: v.NumberSchema<undefined>;
39
+ readonly title: v.StringSchema<undefined>;
40
+ readonly state: v.PicklistSchema<["open", "closed"], undefined>;
41
+ readonly headRef: v.NullableSchema<v.StringSchema<undefined>, undefined>;
42
+ readonly baseRef: v.NullableSchema<v.StringSchema<undefined>, undefined>;
43
+ readonly headSha: v.NullableSchema<v.StringSchema<undefined>, undefined>;
44
+ readonly merged: v.BooleanSchema<undefined>;
45
+ readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
46
+ /** GitHub's `updated_at` (epoch ms), used as the incremental sync cursor. */
47
+ readonly updatedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
48
+ readonly syncedAt: v.NumberSchema<undefined>;
49
+ }, undefined>;
50
+ export type GitHubPullRequest = v.InferOutput<typeof githubPullRequestSchema>;
51
+ export declare const githubIssueStateSchema: v.PicklistSchema<["open", "closed"], undefined>;
52
+ export type GitHubIssueState = v.InferOutput<typeof githubIssueStateSchema>;
53
+ export declare const githubIssueSchema: v.ObjectSchema<{
54
+ readonly repoGithubId: v.NumberSchema<undefined>;
55
+ readonly number: v.NumberSchema<undefined>;
56
+ readonly githubId: v.NumberSchema<undefined>;
57
+ readonly title: v.StringSchema<undefined>;
58
+ readonly state: v.PicklistSchema<["open", "closed"], undefined>;
59
+ readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
60
+ readonly labels: v.ArraySchema<v.StringSchema<undefined>, undefined>;
61
+ readonly updatedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
62
+ readonly syncedAt: v.NumberSchema<undefined>;
63
+ }, undefined>;
64
+ export type GitHubIssue = v.InferOutput<typeof githubIssueSchema>;
65
+ export declare const githubCommitSchema: v.ObjectSchema<{
66
+ readonly repoGithubId: v.NumberSchema<undefined>;
67
+ readonly sha: v.StringSchema<undefined>;
68
+ readonly message: v.StringSchema<undefined>;
69
+ readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
70
+ readonly authoredAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
71
+ readonly syncedAt: v.NumberSchema<undefined>;
72
+ }, undefined>;
73
+ export type GitHubCommit = v.InferOutput<typeof githubCommitSchema>;
74
+ export declare const githubCheckRunSchema: v.ObjectSchema<{
75
+ readonly repoGithubId: v.NumberSchema<undefined>;
76
+ readonly githubId: v.NumberSchema<undefined>;
77
+ readonly headSha: v.StringSchema<undefined>;
78
+ readonly name: v.StringSchema<undefined>;
79
+ readonly status: v.StringSchema<undefined>;
80
+ readonly conclusion: v.NullableSchema<v.StringSchema<undefined>, undefined>;
81
+ readonly syncedAt: v.NumberSchema<undefined>;
82
+ }, undefined>;
83
+ export type GitHubCheckRun = v.InferOutput<typeof githubCheckRunSchema>;
84
+ /** A workspace's GitHub App installation, as exposed to clients (no token). */
85
+ export declare const githubConnectionSchema: v.ObjectSchema<{
86
+ readonly installationId: v.NumberSchema<undefined>;
87
+ readonly accountLogin: v.StringSchema<undefined>;
88
+ readonly targetType: v.PicklistSchema<["Organization", "User"], undefined>;
89
+ readonly connectedAt: v.NumberSchema<undefined>;
90
+ /**
91
+ * Whether cat-factory can create repositories under this account itself — true
92
+ * only for accounts served by the privileged App tier (ADR 0005). When false,
93
+ * the UI keeps the manual "create on GitHub" flow.
94
+ */
95
+ readonly canCreateRepos: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
96
+ /**
97
+ * Whether the installation actually granted the App `workflows: write`. When
98
+ * false, pushes that add/update `.github/workflows/*` are rejected by GitHub, so
99
+ * the UI warns the user to grant the permission. Read from the token's granted
100
+ * set (App ∩ install approval); defaults to false for older backends.
101
+ */
102
+ readonly canManageWorkflows: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
103
+ }, undefined>;
104
+ export type GitHubConnection = v.InferOutput<typeof githubConnectionSchema>;
105
+ /**
106
+ * A discoverable GitHub App installation (one account where the App is installed),
107
+ * listed via the app JWT so the connect UI can offer a pick instead of a manually
108
+ * typed installation id. `connected` says whether it's already bound: to THIS
109
+ * workspace, to ANOTHER one (so connecting would be rejected), or to NONE.
110
+ */
111
+ export declare const githubInstallationOptionSchema: v.ObjectSchema<{
112
+ readonly installationId: v.NumberSchema<undefined>;
113
+ readonly accountLogin: v.StringSchema<undefined>;
114
+ readonly targetType: v.PicklistSchema<["Organization", "User"], undefined>;
115
+ readonly accountAvatarUrl: v.NullableSchema<v.StringSchema<undefined>, undefined>;
116
+ readonly connected: v.PicklistSchema<["this", "other", "none"], undefined>;
117
+ }, undefined>;
118
+ export type GitHubInstallationOption = v.InferOutput<typeof githubInstallationOptionSchema>;
119
+ /**
120
+ * A repository the connected installation can access, annotated with whether the
121
+ * current workspace explicitly links it. Repos are linked per workspace (the
122
+ * installation is shared across an account's workspaces, but each board chooses
123
+ * its own repos), so the connect UI lists these and the user picks a subset.
124
+ */
125
+ export declare const githubAvailableRepoSchema: v.ObjectSchema<{
126
+ readonly githubId: v.NumberSchema<undefined>;
127
+ readonly owner: v.StringSchema<undefined>;
128
+ readonly name: v.StringSchema<undefined>;
129
+ readonly defaultBranch: v.NullableSchema<v.StringSchema<undefined>, undefined>;
130
+ readonly private: v.BooleanSchema<undefined>;
131
+ /** Whether this repo is currently linked to (tracked by) this workspace. */
132
+ readonly linked: v.BooleanSchema<undefined>;
133
+ /** Whether the (linked) repo is flagged as a monorepo. False for unlinked repos. */
134
+ readonly isMonorepo: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
135
+ }, undefined>;
136
+ export type GitHubAvailableRepo = v.InferOutput<typeof githubAvailableRepoSchema>;
137
+ /**
138
+ * Create a repository under the connected account (privileged App tier, ADR
139
+ * 0005). `name` is a single GitHub name segment — no `owner/` prefix — matching
140
+ * the bootstrap repo-name rule; the owner is the connected installation account.
141
+ */
142
+ export declare const createRepoRequestSchema: v.ObjectSchema<{
143
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.RegexAction<string, "Only letters, digits, '.', '_' and '-' are allowed">, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>;
144
+ readonly private: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
145
+ readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 350, undefined>]>, "">;
146
+ }, undefined>;
147
+ export type CreateRepoRequest = v.InferOutput<typeof createRepoRequestSchema>;
148
+ /** Set the exact set of repos (by GitHub numeric id) this workspace links. */
149
+ export declare const linkReposSchema: v.ObjectSchema<{
150
+ readonly repoGithubIds: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
151
+ }, undefined>;
152
+ export type LinkReposInput = v.InferOutput<typeof linkReposSchema>;
153
+ /** Mark (or unmark) a linked repo as a monorepo hosting several services. */
154
+ export declare const setRepoMonorepoSchema: v.ObjectSchema<{
155
+ readonly isMonorepo: v.BooleanSchema<undefined>;
156
+ }, undefined>;
157
+ export type SetRepoMonorepoInput = v.InferOutput<typeof setRepoMonorepoSchema>;
158
+ /**
159
+ * One directory entry of a repo's tree, used by the monorepo service picker to let
160
+ * a user browse a repo and pin a service to its subdirectory. Mirrors the slice of
161
+ * GitHub's contents API the picker needs (it lists a single level at a time).
162
+ */
163
+ export declare const repoTreeEntrySchema: v.ObjectSchema<{
164
+ /** Path relative to the repo root, e.g. `packages/api`. */
165
+ readonly path: v.StringSchema<undefined>;
166
+ /** Base name, e.g. `api`. */
167
+ readonly name: v.StringSchema<undefined>;
168
+ /** `file` | `dir` | `symlink` | `submodule`. */
169
+ readonly type: v.StringSchema<undefined>;
170
+ }, undefined>;
171
+ export type RepoTreeEntry = v.InferOutput<typeof repoTreeEntrySchema>;
172
+ /** Trigger a resync. Defaults to an incremental resync of all tracked repos. */
173
+ export declare const resyncRequestSchema: v.ObjectSchema<{
174
+ /** Limit the resync to a single repo (by its GitHub numeric id). */
175
+ readonly repoGithubId: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
176
+ /** Run a full backfill (durable Workflow) instead of an incremental pass. */
177
+ readonly full: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
178
+ }, undefined>;
179
+ export type ResyncRequest = v.InferOutput<typeof resyncRequestSchema>;
180
+ export declare const createBranchSchema: v.ObjectSchema<{
181
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
182
+ readonly fromSha: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
183
+ }, undefined>;
184
+ export type CreateBranchInput = v.InferOutput<typeof createBranchSchema>;
185
+ export declare const commitFilesSchema: v.ObjectSchema<{
186
+ readonly branch: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
187
+ readonly message: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
188
+ readonly files: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
189
+ readonly path: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
190
+ readonly content: v.StringSchema<undefined>;
191
+ }, undefined>, undefined>, v.MinLengthAction<{
192
+ path: string;
193
+ content: string;
194
+ }[], 1, undefined>]>;
195
+ /** Parent commit to build on; defaults to the branch tip. */
196
+ readonly baseSha: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
197
+ }, undefined>;
198
+ export type CommitFilesInput = v.InferOutput<typeof commitFilesSchema>;
199
+ export declare const openPullRequestSchema: v.ObjectSchema<{
200
+ readonly title: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
201
+ readonly head: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
202
+ readonly base: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
203
+ readonly body: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
204
+ readonly draft: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
205
+ }, undefined>;
206
+ export type OpenPullRequestInput = v.InferOutput<typeof openPullRequestSchema>;
207
+ export declare const mergePullRequestSchema: v.ObjectSchema<{
208
+ readonly method: v.OptionalSchema<v.PicklistSchema<["merge", "squash", "rebase"], undefined>, undefined>;
209
+ }, undefined>;
210
+ export type MergePullRequestInput = v.InferOutput<typeof mergePullRequestSchema>;
211
+ export declare const commentSchema: v.ObjectSchema<{
212
+ readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
213
+ }, undefined>;
214
+ export type CommentInput = v.InferOutput<typeof commentSchema>;
215
+ //# sourceMappingURL=github.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../src/github.ts"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;;aAG7B,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAExE,eAAO,MAAM,iBAAiB;;;;;;;;;;IAY5B,6DAA6D;;aAE7D,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEtE,eAAO,MAAM,qBAAqB;;;;;;aAMhC,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE9E,eAAO,MAAM,sBAAsB;;aAEjC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAEhF,eAAO,MAAM,aAAa;;aAExB,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,aAAa,CAAC,CAAA"}
package/dist/github.js ADDED
@@ -0,0 +1,204 @@
1
+ import * as v from 'valibot';
2
+ // ---------------------------------------------------------------------------
3
+ // GitHub integration wire contracts. These describe the *projected* GitHub data
4
+ // cat-factory caches locally (repos/branches, pull requests/issues,
5
+ // commits/check-runs) and serves from D1, plus the request bodies for the
6
+ // connect, resync and write endpoints. As with the board entities, the worker's
7
+ // `GitHubClient` produces these shapes and the core derives its domain types
8
+ // from them, so the API, core and frontend share one vocabulary.
9
+ //
10
+ // Storage-only bookkeeping (the workspace that owns a row, soft-delete
11
+ // tombstones, the cached installation token) is deliberately NOT on the wire —
12
+ // it lives in the core ports / D1 layer.
13
+ // ---------------------------------------------------------------------------
14
+ /** A repository the integration tracks for a workspace. */
15
+ export const githubRepoSchema = v.object({
16
+ githubId: v.number(),
17
+ installationId: v.number(),
18
+ owner: v.string(),
19
+ name: v.string(),
20
+ defaultBranch: v.nullable(v.string()),
21
+ private: v.boolean(),
22
+ /** Optional link to a board block this repo backs. */
23
+ blockId: v.nullable(v.string()),
24
+ /**
25
+ * Whether this repo is a monorepo hosting more than one service. When true the
26
+ * board lets several service frames target the same repo, each pinned to its own
27
+ * subdirectory (carried on the {@link Service}), and that subdirectory is fed to
28
+ * every agent working on the service. Owned by the board (set explicitly), so —
29
+ * like `blockId` — sync never overwrites it. Absent/false ⇒ a plain single-service
30
+ * repo (the historical behaviour).
31
+ */
32
+ isMonorepo: v.optional(v.boolean()),
33
+ /** When this projection row was last refreshed (epoch ms). */
34
+ syncedAt: v.number(),
35
+ });
36
+ export const githubBranchSchema = v.object({
37
+ repoGithubId: v.number(),
38
+ name: v.string(),
39
+ headSha: v.string(),
40
+ protected: v.boolean(),
41
+ syncedAt: v.number(),
42
+ });
43
+ export const githubPullRequestStateSchema = v.picklist(['open', 'closed']);
44
+ export const githubPullRequestSchema = v.object({
45
+ repoGithubId: v.number(),
46
+ number: v.number(),
47
+ githubId: v.number(),
48
+ title: v.string(),
49
+ state: githubPullRequestStateSchema,
50
+ headRef: v.nullable(v.string()),
51
+ baseRef: v.nullable(v.string()),
52
+ headSha: v.nullable(v.string()),
53
+ merged: v.boolean(),
54
+ author: v.nullable(v.string()),
55
+ /** GitHub's `updated_at` (epoch ms), used as the incremental sync cursor. */
56
+ updatedAt: v.nullable(v.number()),
57
+ syncedAt: v.number(),
58
+ });
59
+ export const githubIssueStateSchema = v.picklist(['open', 'closed']);
60
+ export const githubIssueSchema = v.object({
61
+ repoGithubId: v.number(),
62
+ number: v.number(),
63
+ githubId: v.number(),
64
+ title: v.string(),
65
+ state: githubIssueStateSchema,
66
+ author: v.nullable(v.string()),
67
+ labels: v.array(v.string()),
68
+ updatedAt: v.nullable(v.number()),
69
+ syncedAt: v.number(),
70
+ });
71
+ export const githubCommitSchema = v.object({
72
+ repoGithubId: v.number(),
73
+ sha: v.string(),
74
+ message: v.string(),
75
+ author: v.nullable(v.string()),
76
+ authoredAt: v.nullable(v.number()),
77
+ syncedAt: v.number(),
78
+ });
79
+ export const githubCheckRunSchema = v.object({
80
+ repoGithubId: v.number(),
81
+ githubId: v.number(),
82
+ headSha: v.string(),
83
+ name: v.string(),
84
+ status: v.string(),
85
+ conclusion: v.nullable(v.string()),
86
+ syncedAt: v.number(),
87
+ });
88
+ /** A workspace's GitHub App installation, as exposed to clients (no token). */
89
+ export const githubConnectionSchema = v.object({
90
+ installationId: v.number(),
91
+ accountLogin: v.string(),
92
+ targetType: v.picklist(['Organization', 'User']),
93
+ connectedAt: v.number(),
94
+ /**
95
+ * Whether cat-factory can create repositories under this account itself — true
96
+ * only for accounts served by the privileged App tier (ADR 0005). When false,
97
+ * the UI keeps the manual "create on GitHub" flow.
98
+ */
99
+ canCreateRepos: v.optional(v.boolean(), false),
100
+ /**
101
+ * Whether the installation actually granted the App `workflows: write`. When
102
+ * false, pushes that add/update `.github/workflows/*` are rejected by GitHub, so
103
+ * the UI warns the user to grant the permission. Read from the token's granted
104
+ * set (App ∩ install approval); defaults to false for older backends.
105
+ */
106
+ canManageWorkflows: v.optional(v.boolean(), false),
107
+ });
108
+ /**
109
+ * A discoverable GitHub App installation (one account where the App is installed),
110
+ * listed via the app JWT so the connect UI can offer a pick instead of a manually
111
+ * typed installation id. `connected` says whether it's already bound: to THIS
112
+ * workspace, to ANOTHER one (so connecting would be rejected), or to NONE.
113
+ */
114
+ export const githubInstallationOptionSchema = v.object({
115
+ installationId: v.number(),
116
+ accountLogin: v.string(),
117
+ targetType: v.picklist(['Organization', 'User']),
118
+ accountAvatarUrl: v.nullable(v.string()),
119
+ connected: v.picklist(['this', 'other', 'none']),
120
+ });
121
+ /**
122
+ * A repository the connected installation can access, annotated with whether the
123
+ * current workspace explicitly links it. Repos are linked per workspace (the
124
+ * installation is shared across an account's workspaces, but each board chooses
125
+ * its own repos), so the connect UI lists these and the user picks a subset.
126
+ */
127
+ export const githubAvailableRepoSchema = v.object({
128
+ githubId: v.number(),
129
+ owner: v.string(),
130
+ name: v.string(),
131
+ defaultBranch: v.nullable(v.string()),
132
+ private: v.boolean(),
133
+ /** Whether this repo is currently linked to (tracked by) this workspace. */
134
+ linked: v.boolean(),
135
+ /** Whether the (linked) repo is flagged as a monorepo. False for unlinked repos. */
136
+ isMonorepo: v.optional(v.boolean(), false),
137
+ });
138
+ // ---- Request bodies -------------------------------------------------------
139
+ /**
140
+ * Create a repository under the connected account (privileged App tier, ADR
141
+ * 0005). `name` is a single GitHub name segment — no `owner/` prefix — matching
142
+ * the bootstrap repo-name rule; the owner is the connected installation account.
143
+ */
144
+ export const createRepoRequestSchema = v.object({
145
+ name: v.pipe(v.string(), v.trim(), v.regex(/^[A-Za-z0-9_.-]+$/, "Only letters, digits, '.', '_' and '-' are allowed"), v.minLength(1), v.maxLength(100)),
146
+ private: v.optional(v.boolean(), true),
147
+ description: v.optional(v.pipe(v.string(), v.maxLength(350)), ''),
148
+ });
149
+ /** Set the exact set of repos (by GitHub numeric id) this workspace links. */
150
+ export const linkReposSchema = v.object({
151
+ repoGithubIds: v.array(v.number()),
152
+ });
153
+ /** Mark (or unmark) a linked repo as a monorepo hosting several services. */
154
+ export const setRepoMonorepoSchema = v.object({
155
+ isMonorepo: v.boolean(),
156
+ });
157
+ /**
158
+ * One directory entry of a repo's tree, used by the monorepo service picker to let
159
+ * a user browse a repo and pin a service to its subdirectory. Mirrors the slice of
160
+ * GitHub's contents API the picker needs (it lists a single level at a time).
161
+ */
162
+ export const repoTreeEntrySchema = v.object({
163
+ /** Path relative to the repo root, e.g. `packages/api`. */
164
+ path: v.string(),
165
+ /** Base name, e.g. `api`. */
166
+ name: v.string(),
167
+ /** `file` | `dir` | `symlink` | `submodule`. */
168
+ type: v.string(),
169
+ });
170
+ /** Trigger a resync. Defaults to an incremental resync of all tracked repos. */
171
+ export const resyncRequestSchema = v.object({
172
+ /** Limit the resync to a single repo (by its GitHub numeric id). */
173
+ repoGithubId: v.optional(v.number()),
174
+ /** Run a full backfill (durable Workflow) instead of an incremental pass. */
175
+ full: v.optional(v.boolean()),
176
+ });
177
+ export const createBranchSchema = v.object({
178
+ name: v.pipe(v.string(), v.minLength(1)),
179
+ fromSha: v.pipe(v.string(), v.minLength(1)),
180
+ });
181
+ export const commitFilesSchema = v.object({
182
+ branch: v.pipe(v.string(), v.minLength(1)),
183
+ message: v.pipe(v.string(), v.minLength(1)),
184
+ files: v.pipe(v.array(v.object({
185
+ path: v.pipe(v.string(), v.minLength(1)),
186
+ content: v.string(),
187
+ })), v.minLength(1)),
188
+ /** Parent commit to build on; defaults to the branch tip. */
189
+ baseSha: v.optional(v.string()),
190
+ });
191
+ export const openPullRequestSchema = v.object({
192
+ title: v.pipe(v.string(), v.minLength(1)),
193
+ head: v.pipe(v.string(), v.minLength(1)),
194
+ base: v.pipe(v.string(), v.minLength(1)),
195
+ body: v.optional(v.string()),
196
+ draft: v.optional(v.boolean()),
197
+ });
198
+ export const mergePullRequestSchema = v.object({
199
+ method: v.optional(v.picklist(['merge', 'squash', 'rebase'])),
200
+ });
201
+ export const commentSchema = v.object({
202
+ body: v.pipe(v.string(), v.minLength(1)),
203
+ });
204
+ //# sourceMappingURL=github.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,gFAAgF;AAChF,oEAAoE;AACpE,0EAA0E;AAC1E,gFAAgF;AAChF,6EAA6E;AAC7E,iEAAiE;AACjE,EAAE;AACF,uEAAuE;AACvE,+EAA+E;AAC/E,yCAAyC;AACzC,8EAA8E;AAE9E,2DAA2D;AAC3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,aAAa,EAAE,CAAC,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O,EAAE,CAAC;CAC/B,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;CAC9D,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;CACzC,CAAC,CAAA"}
@@ -0,0 +1,41 @@
1
+ export * from './primitives.js';
2
+ export * from './entities.js';
3
+ export * from './services.js';
4
+ export * from './fragment-library.js';
5
+ export * from './accounts.js';
6
+ export * from './auth.js';
7
+ export * from './events.js';
8
+ export * from './requests.js';
9
+ export * from './github.js';
10
+ export * from './documents.js';
11
+ export * from './tasks.js';
12
+ export * from './environments.js';
13
+ export * from './runners.js';
14
+ export * from './bootstrap.js';
15
+ export * from './snapshot.js';
16
+ export * from './board-scan.js';
17
+ export * from './iteration-cap.js';
18
+ export * from './requirements.js';
19
+ export * from './clarity.js';
20
+ export * from './spec.js';
21
+ export * from './companion.js';
22
+ export * from './merge.js';
23
+ export * from './consensus.js';
24
+ export * from './release.js';
25
+ export * from './agent-config.js';
26
+ export * from './testing.js';
27
+ export * from './provisioning.js';
28
+ export * from './model-defaults.js';
29
+ export * from './service-fragment-defaults.js';
30
+ export * from './notifications.js';
31
+ export * from './slack.js';
32
+ export * from './observability.js';
33
+ export * from './recurring.js';
34
+ export * from './tracker.js';
35
+ export * from './vendor-credentials.js';
36
+ export * from './api-keys.js';
37
+ export * from './personal-subscriptions.js';
38
+ export * from './localModels.js';
39
+ export * from './sandbox.js';
40
+ export * from './workspace-settings.js';
41
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,41 @@
1
+ export * from './primitives.js';
2
+ export * from './entities.js';
3
+ export * from './services.js';
4
+ export * from './fragment-library.js';
5
+ export * from './accounts.js';
6
+ export * from './auth.js';
7
+ export * from './events.js';
8
+ export * from './requests.js';
9
+ export * from './github.js';
10
+ export * from './documents.js';
11
+ export * from './tasks.js';
12
+ export * from './environments.js';
13
+ export * from './runners.js';
14
+ export * from './bootstrap.js';
15
+ export * from './snapshot.js';
16
+ export * from './board-scan.js';
17
+ export * from './iteration-cap.js';
18
+ export * from './requirements.js';
19
+ export * from './clarity.js';
20
+ export * from './spec.js';
21
+ export * from './companion.js';
22
+ export * from './merge.js';
23
+ export * from './consensus.js';
24
+ export * from './release.js';
25
+ export * from './agent-config.js';
26
+ export * from './testing.js';
27
+ export * from './provisioning.js';
28
+ export * from './model-defaults.js';
29
+ export * from './service-fragment-defaults.js';
30
+ export * from './notifications.js';
31
+ export * from './slack.js';
32
+ export * from './observability.js';
33
+ export * from './recurring.js';
34
+ export * from './tracker.js';
35
+ export * from './vendor-credentials.js';
36
+ export * from './api-keys.js';
37
+ export * from './personal-subscriptions.js';
38
+ export * from './localModels.js';
39
+ export * from './sandbox.js';
40
+ export * from './workspace-settings.js';
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import * as v from 'valibot';
2
+ /**
3
+ * How a human resolves an iterative gate that hit its budget with the bar still
4
+ * unmet:
5
+ * - `extra-round`: grant one more agent pass (bumps the budget by one).
6
+ * - `proceed`: advance the pipeline accepting the latest output as-is.
7
+ * - `stop-reset`: cancel the run and return the task to phase zero (editable),
8
+ * keeping the latest produced artifact as a reference to rework from.
9
+ */
10
+ export declare const iterationCapChoiceSchema: v.PicklistSchema<["extra-round", "proceed", "stop-reset"], undefined>;
11
+ export type IterationCapChoice = v.InferOutput<typeof iterationCapChoiceSchema>;
12
+ /** Request body carrying an {@link iterationCapChoiceSchema} choice. */
13
+ export declare const resolveIterationCapSchema: v.ObjectSchema<{
14
+ readonly choice: v.PicklistSchema<["extra-round", "proceed", "stop-reset"], undefined>;
15
+ }, undefined>;
16
+ export type ResolveIterationCapInput = v.InferOutput<typeof resolveIterationCapSchema>;
17
+ //# sourceMappingURL=iteration-cap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iteration-cap.d.ts","sourceRoot":"","sources":["../src/iteration-cap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAa5B;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,uEAAuD,CAAA;AAC5F,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E,wEAAwE;AACxE,eAAO,MAAM,yBAAyB;;aAEpC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
@@ -0,0 +1,25 @@
1
+ import * as v from 'valibot';
2
+ // ---------------------------------------------------------------------------
3
+ // Shared contract for an iterative agent gate that hit its budget. Two engine
4
+ // gates loop an agent + a human until the agent converges: the requirements
5
+ // reviewer (bounded by `maxRequirementIterations`) and the quality companions
6
+ // (reviewer / spec-companion / architect-companion, bounded by their automatic
7
+ // rework budget). When either spends its budget with the bar still unmet, it
8
+ // parks for a human instead of getting stuck, offering the SAME three choices.
9
+ // This module is the single source of truth for those choices so both gates
10
+ // (and both runtime facades) can't drift.
11
+ // ---------------------------------------------------------------------------
12
+ /**
13
+ * How a human resolves an iterative gate that hit its budget with the bar still
14
+ * unmet:
15
+ * - `extra-round`: grant one more agent pass (bumps the budget by one).
16
+ * - `proceed`: advance the pipeline accepting the latest output as-is.
17
+ * - `stop-reset`: cancel the run and return the task to phase zero (editable),
18
+ * keeping the latest produced artifact as a reference to rework from.
19
+ */
20
+ export const iterationCapChoiceSchema = v.picklist(['extra-round', 'proceed', 'stop-reset']);
21
+ /** Request body carrying an {@link iterationCapChoiceSchema} choice. */
22
+ export const resolveIterationCapSchema = v.object({
23
+ choice: iterationCapChoiceSchema,
24
+ });
25
+ //# sourceMappingURL=iteration-cap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iteration-cap.js","sourceRoot":"","sources":["../src/iteration-cap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,8EAA8E;AAC9E,8EAA8E;AAC9E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,4EAA4E;AAC5E,0CAA0C;AAC1C,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAA;AAG5F,wEAAwE;AACxE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,wBAAwB;CACjC,CAAC,CAAA"}
@@ -0,0 +1,54 @@
1
+ import * as v from 'valibot';
2
+ /** The supported local runner types. The runner type IS the `ModelRef.provider`. */
3
+ export declare const LOCAL_RUNNERS: readonly ['ollama', 'lmstudio', 'llamacpp', 'vllm', 'custom'];
4
+ export declare const localRunnerSchema: v.PicklistSchema<readonly ["ollama", "lmstudio", "llamacpp", "vllm", "custom"], undefined>;
5
+ export type LocalRunner = v.InferOutput<typeof localRunnerSchema>;
6
+ /** Whether a provider id is one of the local runner types. */
7
+ export declare function isLocalRunner(provider: string): boolean;
8
+ /** Default base URL per runner, for UI prefill. `custom` has none (user supplies it). */
9
+ export declare const LOCAL_RUNNER_DEFAULTS: Record<LocalRunner, string | null>;
10
+ /** Short display label per runner, shown in the picker as the provider label. */
11
+ export declare const LOCAL_RUNNER_LABELS: Record<LocalRunner, string>;
12
+ /**
13
+ * A user's configured local runner endpoint, as returned to the SPA. The API key is
14
+ * write-only (never returned); `hasApiKey` reports whether one is stored.
15
+ */
16
+ export declare const localModelEndpointSchema: v.ObjectSchema<{
17
+ readonly provider: v.PicklistSchema<readonly ["ollama", "lmstudio", "llamacpp", "vllm", "custom"], undefined>;
18
+ readonly label: v.StringSchema<undefined>;
19
+ readonly baseUrl: v.StringSchema<undefined>;
20
+ /** Whether a (write-only) API key is stored for this endpoint. */
21
+ readonly hasApiKey: v.BooleanSchema<undefined>;
22
+ /** The model ids the user has enabled from this runner (surfaced in the picker). */
23
+ readonly models: v.ArraySchema<v.StringSchema<undefined>, undefined>;
24
+ readonly createdAt: v.NumberSchema<undefined>;
25
+ readonly updatedAt: v.NumberSchema<undefined>;
26
+ }, undefined>;
27
+ export type LocalModelEndpoint = v.InferOutput<typeof localModelEndpointSchema>;
28
+ /** Create or replace the signed-in user's endpoint for a runner (one per runner). */
29
+ export declare const upsertLocalModelEndpointSchema: v.ObjectSchema<{
30
+ readonly provider: v.PicklistSchema<readonly ["ollama", "lmstudio", "llamacpp", "vllm", "custom"], undefined>;
31
+ readonly label: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 60, undefined>]>, undefined>;
32
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 300, undefined>, v.UrlAction<string, undefined>]>;
33
+ /** Optional bearer key (most local runners ignore it); stored encrypted at rest. */
34
+ readonly apiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
35
+ readonly models: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
36
+ }, undefined>;
37
+ export type UpsertLocalModelEndpointInput = v.InferOutput<typeof upsertLocalModelEndpointSchema>;
38
+ /** Probe a runner endpoint for reachability + the models it currently serves. */
39
+ export declare const testLocalModelEndpointSchema: v.ObjectSchema<{
40
+ readonly provider: v.PicklistSchema<readonly ["ollama", "lmstudio", "llamacpp", "vllm", "custom"], undefined>;
41
+ readonly baseUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 300, undefined>, v.UrlAction<string, undefined>]>;
42
+ readonly apiKey: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
43
+ }, undefined>;
44
+ export type TestLocalModelEndpointInput = v.InferOutput<typeof testLocalModelEndpointSchema>;
45
+ /** The result of probing a runner endpoint's `/models`. */
46
+ export declare const localModelEndpointTestResultSchema: v.ObjectSchema<{
47
+ readonly reachable: v.BooleanSchema<undefined>;
48
+ /** Model ids the runner reports (empty when unreachable). */
49
+ readonly models: v.ArraySchema<v.StringSchema<undefined>, undefined>;
50
+ /** Human-readable failure reason when `reachable` is false. */
51
+ readonly error: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
52
+ }, undefined>;
53
+ export type LocalModelEndpointTestResult = v.InferOutput<typeof localModelEndpointTestResultSchema>;
54
+ //# sourceMappingURL=localModels.d.ts.map