@opengeni/contracts 1.0.1 → 2.2.0-canary.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 (112) hide show
  1. package/dist/agent-authored-durable-text.d.ts +64 -0
  2. package/dist/atlassian.d.ts +1 -0
  3. package/dist/atlassian.js +14 -13
  4. package/dist/{chunk-Y3MLSLB4.js → chunk-3SIZGL3O.js} +42 -30
  5. package/dist/chunk-3SIZGL3O.js.map +1 -0
  6. package/dist/{chunk-JBCIY7QD.js → chunk-7RMTKFJW.js} +45 -22
  7. package/dist/chunk-7RMTKFJW.js.map +1 -0
  8. package/dist/{chunk-NX5JNF4L.js → chunk-7ZZ3R27P.js} +9322 -5798
  9. package/dist/chunk-7ZZ3R27P.js.map +1 -0
  10. package/dist/{chunk-5UDNP7AO.js → chunk-MRWYRAS5.js} +56 -8
  11. package/dist/chunk-MRWYRAS5.js.map +1 -0
  12. package/dist/{chunk-LW7OH6CS.js → chunk-N6GRVXAJ.js} +6 -5
  13. package/dist/chunk-N6GRVXAJ.js.map +1 -0
  14. package/dist/{chunk-TZ6YEYN4.js → chunk-NVJMJWLL.js} +3 -1
  15. package/dist/chunk-NVJMJWLL.js.map +1 -0
  16. package/dist/chunk-PX3VCKAU.js +29 -0
  17. package/dist/chunk-PX3VCKAU.js.map +1 -0
  18. package/dist/{chunk-LSB7GRLG.js → chunk-TXTQIYCV.js} +15 -11
  19. package/dist/chunk-TXTQIYCV.js.map +1 -0
  20. package/dist/{chunk-CADSX6UN.js → chunk-Y3KNXVTD.js} +2 -2
  21. package/dist/chunk-YBW5JSA3.js +251 -0
  22. package/dist/chunk-YBW5JSA3.js.map +1 -0
  23. package/dist/company-brain-governed-writes.d.ts +475 -0
  24. package/dist/company-brain.d.ts +398 -0
  25. package/dist/company-profile.d.ts +268 -0
  26. package/dist/connection-authority.d.ts +501 -0
  27. package/dist/connection-authority.js +364 -0
  28. package/dist/connection-authority.js.map +1 -0
  29. package/dist/connector-attachments.d.ts +95 -0
  30. package/dist/connector-attachments.js +51 -0
  31. package/dist/connector-attachments.js.map +1 -0
  32. package/dist/editable-artifact-codec-registry.d.ts +16 -7
  33. package/dist/editable-artifact-codec-registry.js +18 -8
  34. package/dist/editable-artifact-committed-transaction.d.ts +2 -2
  35. package/dist/editable-artifact-committed-transaction.js +2 -2
  36. package/dist/editable-artifact-live.d.ts +11 -12
  37. package/dist/editable-artifact-live.js +111 -46
  38. package/dist/editable-artifact-live.js.map +1 -1
  39. package/dist/editable-artifact-serialized-commit.d.ts +2 -1
  40. package/dist/editable-artifact-serialized-commit.js +9 -8
  41. package/dist/editable-artifact-versions.d.ts +20 -5
  42. package/dist/editable-artifact-versions.js +23 -5
  43. package/dist/editable-artifacts.d.ts +2 -0
  44. package/dist/editable-artifacts.js +51 -39
  45. package/dist/google-drive.d.ts +1 -0
  46. package/dist/google-drive.js +14 -13
  47. package/dist/google-drive.js.map +1 -1
  48. package/dist/governed-learning-activation.d.ts +154 -0
  49. package/dist/governed-learning-evaluator.d.ts +152 -0
  50. package/dist/index.d.ts +12224 -1328
  51. package/dist/index.js +831 -115
  52. package/dist/interaction.d.ts +68 -0
  53. package/dist/knowledge.d.ts +119 -0
  54. package/dist/organization-membership-lifecycle.d.ts +516 -0
  55. package/dist/permissions.d.ts +52 -0
  56. package/dist/personal-github.d.ts +319 -0
  57. package/dist/personal-github.js +209 -0
  58. package/dist/personal-github.js.map +1 -0
  59. package/dist/preference-registry.d.ts +17 -0
  60. package/dist/remember.d.ts +331 -0
  61. package/dist/sandbox-file-artifacts.d.ts +56 -0
  62. package/dist/sandbox-snapshots.d.ts +21 -0
  63. package/dist/slack-bot-scopes.d.ts +34 -14
  64. package/dist/slack-bot-scopes.js +5 -1
  65. package/dist/spreadsheet-artifact-commands.d.ts +2 -3
  66. package/dist/spreadsheet-artifact-commands.js +4 -2
  67. package/dist/spreadsheet-artifact-query.js +3 -2
  68. package/dist/task-notes.d.ts +42 -1
  69. package/dist/tool-result-spill.d.ts +16 -0
  70. package/dist/workspace-instruction-policies.d.ts +81 -0
  71. package/dist/workspace-learning-administration.d.ts +289 -0
  72. package/package.json +13 -1
  73. package/src/agent-authored-durable-text.ts +105 -0
  74. package/src/company-brain-governed-writes.ts +356 -0
  75. package/src/company-brain.ts +201 -0
  76. package/src/company-profile.ts +122 -1
  77. package/src/connection-authority.ts +413 -0
  78. package/src/connector-attachments.ts +327 -0
  79. package/src/editable-artifact-codec-registry.ts +55 -17
  80. package/src/editable-artifact-committed-transaction.ts +44 -31
  81. package/src/editable-artifact-live.ts +123 -57
  82. package/src/editable-artifact-serialized-commit.ts +2 -1
  83. package/src/editable-artifact-versions.ts +26 -5
  84. package/src/editable-artifacts.ts +2 -0
  85. package/src/governed-learning-activation.ts +191 -0
  86. package/src/governed-learning-evaluator.ts +176 -0
  87. package/src/index.ts +3033 -392
  88. package/src/interaction.ts +55 -1
  89. package/src/knowledge.ts +118 -6
  90. package/src/organization-membership-lifecycle.ts +330 -0
  91. package/src/permissions.ts +55 -0
  92. package/src/personal-github.ts +267 -0
  93. package/src/preference-registry.ts +17 -0
  94. package/src/remember.ts +242 -0
  95. package/src/sandbox-file-artifacts.ts +65 -0
  96. package/src/sandbox-snapshots.ts +78 -0
  97. package/src/slack-bot-scopes.ts +81 -9
  98. package/src/spreadsheet-artifact-commands.ts +12 -13
  99. package/src/task-notes.ts +14 -1
  100. package/src/tool-result-spill.ts +35 -0
  101. package/src/workspace-instruction-policies.ts +30 -0
  102. package/src/workspace-learning-administration.ts +88 -0
  103. package/dist/chunk-5UDNP7AO.js.map +0 -1
  104. package/dist/chunk-BVGIYW7D.js +0 -11
  105. package/dist/chunk-BVGIYW7D.js.map +0 -1
  106. package/dist/chunk-JBCIY7QD.js.map +0 -1
  107. package/dist/chunk-LSB7GRLG.js.map +0 -1
  108. package/dist/chunk-LW7OH6CS.js.map +0 -1
  109. package/dist/chunk-NX5JNF4L.js.map +0 -1
  110. package/dist/chunk-TZ6YEYN4.js.map +0 -1
  111. package/dist/chunk-Y3MLSLB4.js.map +0 -1
  112. /package/dist/{chunk-CADSX6UN.js.map → chunk-Y3KNXVTD.js.map} +0 -0
@@ -0,0 +1,319 @@
1
+ import { z } from "zod";
2
+ import { ConnectionMetadata } from "./index.js";
3
+ export declare const PERSONAL_GITHUB_PROVIDER_DOMAIN: "github.com";
4
+ export declare const PERSONAL_GITHUB_PROVIDER_FAMILY: "github";
5
+ export declare const PERSONAL_GITHUB_CREDENTIAL_ROLE: "opengeni_github_personal";
6
+ export declare const PERSONAL_GITHUB_CONNECTION_SURFACE_ID: "github:personal";
7
+ export declare const PERSONAL_GITHUB_REQUESTED_SCOPES: readonly ["repo"];
8
+ export declare const PERSONAL_GITHUB_AUTHORIZATION_URL: "https://github.com/login/oauth/authorize";
9
+ export declare const PERSONAL_GITHUB_TOKEN_URL: "https://github.com/login/oauth/access_token";
10
+ export declare const PERSONAL_GITHUB_USER_URL: "https://api.github.com/user";
11
+ export declare const PERSONAL_GITHUB_API_ORIGIN: "https://api.github.com";
12
+ export declare const PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX: 100;
13
+ export declare const PersonalGitHubRepositoryId: z.ZodString;
14
+ export type PersonalGitHubRepositoryId = z.infer<typeof PersonalGitHubRepositoryId>;
15
+ export declare const PersonalGitHubRepositoryAccess: z.ZodEnum<{
16
+ read: "read";
17
+ write: "write";
18
+ }>;
19
+ export type PersonalGitHubRepositoryAccess = z.infer<typeof PersonalGitHubRepositoryAccess>;
20
+ export declare const PersonalGitHubRepositoryPermissions: z.ZodObject<{
21
+ pull: z.ZodBoolean;
22
+ push: z.ZodBoolean;
23
+ admin: z.ZodBoolean;
24
+ maintain: z.ZodBoolean;
25
+ triage: z.ZodBoolean;
26
+ }, z.core.$strict>;
27
+ export type PersonalGitHubRepositoryPermissions = z.infer<typeof PersonalGitHubRepositoryPermissions>;
28
+ export declare const PersonalGitHubRepositoryVisibility: z.ZodEnum<{
29
+ internal: "internal";
30
+ private: "private";
31
+ public: "public";
32
+ }>;
33
+ export type PersonalGitHubRepositoryVisibility = z.infer<typeof PersonalGitHubRepositoryVisibility>;
34
+ export declare function canonicalPersonalGitHubRepositoryUrl(fullName: string): string;
35
+ /** A bounded, credential-free projection verified directly against GitHub. */
36
+ export declare const PersonalGitHubRepository: z.ZodObject<{
37
+ repositoryId: z.ZodString;
38
+ fullName: z.ZodString;
39
+ canonicalUrl: z.ZodString;
40
+ defaultBranch: z.ZodString;
41
+ visibility: z.ZodEnum<{
42
+ internal: "internal";
43
+ private: "private";
44
+ public: "public";
45
+ }>;
46
+ private: z.ZodBoolean;
47
+ archived: z.ZodBoolean;
48
+ disabled: z.ZodBoolean;
49
+ permissions: z.ZodObject<{
50
+ pull: z.ZodBoolean;
51
+ push: z.ZodBoolean;
52
+ admin: z.ZodBoolean;
53
+ maintain: z.ZodBoolean;
54
+ triage: z.ZodBoolean;
55
+ }, z.core.$strict>;
56
+ }, z.core.$strict>;
57
+ export type PersonalGitHubRepository = z.infer<typeof PersonalGitHubRepository>;
58
+ export declare const PersonalGitHubSelectedRepository: z.ZodObject<{
59
+ repositoryId: z.ZodString;
60
+ fullName: z.ZodString;
61
+ canonicalUrl: z.ZodString;
62
+ defaultBranch: z.ZodString;
63
+ visibility: z.ZodEnum<{
64
+ internal: "internal";
65
+ private: "private";
66
+ public: "public";
67
+ }>;
68
+ private: z.ZodBoolean;
69
+ archived: z.ZodBoolean;
70
+ disabled: z.ZodBoolean;
71
+ permissions: z.ZodObject<{
72
+ pull: z.ZodBoolean;
73
+ push: z.ZodBoolean;
74
+ admin: z.ZodBoolean;
75
+ maintain: z.ZodBoolean;
76
+ triage: z.ZodBoolean;
77
+ }, z.core.$strict>;
78
+ selectedAccess: z.ZodEnum<{
79
+ read: "read";
80
+ write: "write";
81
+ }>;
82
+ selectionGeneration: z.ZodNumber;
83
+ selectedAt: z.ZodString;
84
+ lastVerifiedAt: z.ZodString;
85
+ }, z.core.$strict>;
86
+ export type PersonalGitHubSelectedRepository = z.infer<typeof PersonalGitHubSelectedRepository>;
87
+ export declare const PersonalGitHubRepositorySelectionState: z.ZodObject<{
88
+ connectionAuthorityGeneration: z.ZodNumber;
89
+ credentialBindingId: z.ZodString;
90
+ providerPrincipalId: z.ZodString;
91
+ selectionGeneration: z.ZodNumber;
92
+ repositories: z.ZodArray<z.ZodObject<{
93
+ repositoryId: z.ZodString;
94
+ fullName: z.ZodString;
95
+ canonicalUrl: z.ZodString;
96
+ defaultBranch: z.ZodString;
97
+ visibility: z.ZodEnum<{
98
+ internal: "internal";
99
+ private: "private";
100
+ public: "public";
101
+ }>;
102
+ private: z.ZodBoolean;
103
+ archived: z.ZodBoolean;
104
+ disabled: z.ZodBoolean;
105
+ permissions: z.ZodObject<{
106
+ pull: z.ZodBoolean;
107
+ push: z.ZodBoolean;
108
+ admin: z.ZodBoolean;
109
+ maintain: z.ZodBoolean;
110
+ triage: z.ZodBoolean;
111
+ }, z.core.$strict>;
112
+ selectedAccess: z.ZodEnum<{
113
+ read: "read";
114
+ write: "write";
115
+ }>;
116
+ selectionGeneration: z.ZodNumber;
117
+ selectedAt: z.ZodString;
118
+ lastVerifiedAt: z.ZodString;
119
+ }, z.core.$strict>>;
120
+ }, z.core.$strict>;
121
+ export type PersonalGitHubRepositorySelectionState = z.infer<typeof PersonalGitHubRepositorySelectionState>;
122
+ export declare const ListPersonalGitHubRepositoriesQuery: z.ZodObject<{
123
+ cursor: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
124
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
125
+ }, z.core.$strict>;
126
+ export type ListPersonalGitHubRepositoriesQuery = z.infer<typeof ListPersonalGitHubRepositoriesQuery>;
127
+ export declare const PersonalGitHubRepositoryCatalogItem: z.ZodObject<{
128
+ repositoryId: z.ZodString;
129
+ fullName: z.ZodString;
130
+ canonicalUrl: z.ZodString;
131
+ defaultBranch: z.ZodString;
132
+ visibility: z.ZodEnum<{
133
+ internal: "internal";
134
+ private: "private";
135
+ public: "public";
136
+ }>;
137
+ private: z.ZodBoolean;
138
+ archived: z.ZodBoolean;
139
+ disabled: z.ZodBoolean;
140
+ permissions: z.ZodObject<{
141
+ pull: z.ZodBoolean;
142
+ push: z.ZodBoolean;
143
+ admin: z.ZodBoolean;
144
+ maintain: z.ZodBoolean;
145
+ triage: z.ZodBoolean;
146
+ }, z.core.$strict>;
147
+ selectedAccess: z.ZodNullable<z.ZodEnum<{
148
+ read: "read";
149
+ write: "write";
150
+ }>>;
151
+ }, z.core.$strict>;
152
+ export type PersonalGitHubRepositoryCatalogItem = z.infer<typeof PersonalGitHubRepositoryCatalogItem>;
153
+ export declare const ListPersonalGitHubRepositoriesResponse: z.ZodObject<{
154
+ repositories: z.ZodArray<z.ZodObject<{
155
+ repositoryId: z.ZodString;
156
+ fullName: z.ZodString;
157
+ canonicalUrl: z.ZodString;
158
+ defaultBranch: z.ZodString;
159
+ visibility: z.ZodEnum<{
160
+ internal: "internal";
161
+ private: "private";
162
+ public: "public";
163
+ }>;
164
+ private: z.ZodBoolean;
165
+ archived: z.ZodBoolean;
166
+ disabled: z.ZodBoolean;
167
+ permissions: z.ZodObject<{
168
+ pull: z.ZodBoolean;
169
+ push: z.ZodBoolean;
170
+ admin: z.ZodBoolean;
171
+ maintain: z.ZodBoolean;
172
+ triage: z.ZodBoolean;
173
+ }, z.core.$strict>;
174
+ selectedAccess: z.ZodNullable<z.ZodEnum<{
175
+ read: "read";
176
+ write: "write";
177
+ }>>;
178
+ }, z.core.$strict>>;
179
+ nextCursor: z.ZodNullable<z.ZodNumber>;
180
+ selection: z.ZodObject<{
181
+ connectionAuthorityGeneration: z.ZodNumber;
182
+ credentialBindingId: z.ZodString;
183
+ providerPrincipalId: z.ZodString;
184
+ selectionGeneration: z.ZodNumber;
185
+ repositories: z.ZodArray<z.ZodObject<{
186
+ repositoryId: z.ZodString;
187
+ fullName: z.ZodString;
188
+ canonicalUrl: z.ZodString;
189
+ defaultBranch: z.ZodString;
190
+ visibility: z.ZodEnum<{
191
+ internal: "internal";
192
+ private: "private";
193
+ public: "public";
194
+ }>;
195
+ private: z.ZodBoolean;
196
+ archived: z.ZodBoolean;
197
+ disabled: z.ZodBoolean;
198
+ permissions: z.ZodObject<{
199
+ pull: z.ZodBoolean;
200
+ push: z.ZodBoolean;
201
+ admin: z.ZodBoolean;
202
+ maintain: z.ZodBoolean;
203
+ triage: z.ZodBoolean;
204
+ }, z.core.$strict>;
205
+ selectedAccess: z.ZodEnum<{
206
+ read: "read";
207
+ write: "write";
208
+ }>;
209
+ selectionGeneration: z.ZodNumber;
210
+ selectedAt: z.ZodString;
211
+ lastVerifiedAt: z.ZodString;
212
+ }, z.core.$strict>>;
213
+ }, z.core.$strict>;
214
+ }, z.core.$strict>;
215
+ export type ListPersonalGitHubRepositoriesResponse = z.infer<typeof ListPersonalGitHubRepositoriesResponse>;
216
+ export declare const PersonalGitHubRepositorySelectionInput: z.ZodObject<{
217
+ repositoryId: z.ZodString;
218
+ fullName: z.ZodString;
219
+ access: z.ZodEnum<{
220
+ read: "read";
221
+ write: "write";
222
+ }>;
223
+ }, z.core.$strict>;
224
+ export type PersonalGitHubRepositorySelectionInput = z.infer<typeof PersonalGitHubRepositorySelectionInput>;
225
+ export declare const ReplacePersonalGitHubRepositorySelectionsRequest: z.ZodObject<{
226
+ expectedConnectionAuthorityGeneration: z.ZodNumber;
227
+ expectedSelectionGeneration: z.ZodNumber;
228
+ idempotencyKey: z.ZodString;
229
+ repositories: z.ZodArray<z.ZodObject<{
230
+ repositoryId: z.ZodString;
231
+ fullName: z.ZodString;
232
+ access: z.ZodEnum<{
233
+ read: "read";
234
+ write: "write";
235
+ }>;
236
+ }, z.core.$strict>>;
237
+ }, z.core.$strict>;
238
+ export type ReplacePersonalGitHubRepositorySelectionsRequest = z.infer<typeof ReplacePersonalGitHubRepositorySelectionsRequest>;
239
+ export declare const VerifyPersonalGitHubRepositorySelectionsRequest: z.ZodObject<{
240
+ expectedConnectionAuthorityGeneration: z.ZodNumber;
241
+ expectedSelectionGeneration: z.ZodNumber;
242
+ idempotencyKey: z.ZodString;
243
+ }, z.core.$strict>;
244
+ export type VerifyPersonalGitHubRepositorySelectionsRequest = z.infer<typeof VerifyPersonalGitHubRepositorySelectionsRequest>;
245
+ /**
246
+ * Owner-visible, credential-free metadata for one dedicated personal GitHub
247
+ * OAuth connection. Repository selections are a separate authority and never
248
+ * live in this credential record.
249
+ */
250
+ export declare const PersonalGitHubConnectionMetadata: z.ZodObject<{
251
+ credentialRole: z.ZodLiteral<"opengeni_github_personal">;
252
+ providerFamily: z.ZodLiteral<"github">;
253
+ providerPrincipalId: z.ZodString;
254
+ githubUserId: z.ZodString;
255
+ githubLogin: z.ZodString;
256
+ oauthEnvironment: z.ZodString;
257
+ oauthClientMarker: z.ZodString;
258
+ credentialBindingId: z.ZodString;
259
+ connectedAt: z.ZodString;
260
+ lastVerifiedAt: z.ZodString;
261
+ disconnectedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
262
+ refreshTokenExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
+ }, z.core.$loose>;
264
+ export type PersonalGitHubConnectionMetadata = z.infer<typeof PersonalGitHubConnectionMetadata>;
265
+ export declare const PersonalGitHubOAuthStartRequest: z.ZodObject<{
266
+ connectionId: z.ZodOptional<z.ZodString>;
267
+ returnPath: z.ZodOptional<z.ZodString>;
268
+ }, z.core.$strict>;
269
+ export type PersonalGitHubOAuthStartRequest = z.infer<typeof PersonalGitHubOAuthStartRequest>;
270
+ export declare const PersonalGitHubOAuthStartResponse: z.ZodObject<{
271
+ authorizationUrl: z.ZodString;
272
+ expiresAt: z.ZodString;
273
+ }, z.core.$strict>;
274
+ export type PersonalGitHubOAuthStartResponse = z.infer<typeof PersonalGitHubOAuthStartResponse>;
275
+ export declare const PersonalGitHubConnectionStatusResponse: z.ZodObject<{
276
+ enabled: z.ZodBoolean;
277
+ connection: z.ZodNullable<z.ZodObject<{
278
+ id: z.ZodString;
279
+ authorityId: z.ZodOptional<z.ZodString>;
280
+ accountId: z.ZodString;
281
+ workspaceId: z.ZodString;
282
+ subjectId: z.ZodNullable<z.ZodString>;
283
+ providerDomain: z.ZodString;
284
+ kind: z.ZodEnum<{
285
+ api_key: "api_key";
286
+ app_install: "app_install";
287
+ delegated: "delegated";
288
+ oauth2: "oauth2";
289
+ }>;
290
+ status: z.ZodEnum<{
291
+ active: "active";
292
+ error: "error";
293
+ needs_reauth: "needs_reauth";
294
+ revoked: "revoked";
295
+ }>;
296
+ grantedScopes: z.ZodArray<z.ZodString>;
297
+ expiresAt: z.ZodNullable<z.ZodString>;
298
+ lastRefreshAt: z.ZodNullable<z.ZodString>;
299
+ lastUsedAt: z.ZodNullable<z.ZodString>;
300
+ lastError: z.ZodNullable<z.ZodString>;
301
+ version: z.ZodNumber;
302
+ verifiedInstallAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
303
+ verifiedInstallVersion: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
304
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
305
+ createdBySubjectId: z.ZodNullable<z.ZodString>;
306
+ updatedBySubjectId: z.ZodNullable<z.ZodString>;
307
+ createdAt: z.ZodString;
308
+ updatedAt: z.ZodString;
309
+ }, z.core.$strip>>;
310
+ reviewUrl: z.ZodNullable<z.ZodString>;
311
+ }, z.core.$strict>;
312
+ export type PersonalGitHubConnectionStatusResponse = z.infer<typeof PersonalGitHubConnectionStatusResponse>;
313
+ export declare const PersonalGitHubDisconnectRequest: z.ZodObject<{
314
+ expectedVersion: z.ZodNumber;
315
+ idempotencyKey: z.ZodString;
316
+ }, z.core.$strict>;
317
+ export type PersonalGitHubDisconnectRequest = z.infer<typeof PersonalGitHubDisconnectRequest>;
318
+ export declare function isPersonalGitHubConnection(connection: Pick<z.infer<typeof ConnectionMetadata>, "providerDomain" | "kind" | "metadata">): boolean;
319
+ export declare function hasReservedPersonalGitHubMetadata(metadata: Record<string, unknown> | undefined): boolean;
@@ -0,0 +1,209 @@
1
+ import {
2
+ ConnectionMetadata
3
+ } from "./chunk-7ZZ3R27P.js";
4
+ import "./chunk-MRWYRAS5.js";
5
+ import "./chunk-JUFK3T4Q.js";
6
+ import "./chunk-WYBDERIY.js";
7
+ import "./chunk-N6GRVXAJ.js";
8
+ import "./chunk-3SIZGL3O.js";
9
+ import "./chunk-NVJMJWLL.js";
10
+ import "./chunk-7RMTKFJW.js";
11
+ import "./chunk-Y3KNXVTD.js";
12
+ import "./chunk-RIY7GYQS.js";
13
+ import "./chunk-YRKRZ6OF.js";
14
+ import "./chunk-CM6BMECR.js";
15
+ import "./chunk-D2HKF2EF.js";
16
+ import "./chunk-MYBZRDTY.js";
17
+ import "./chunk-TXTQIYCV.js";
18
+ import "./chunk-PX3VCKAU.js";
19
+ import "./chunk-M5ZGRVIQ.js";
20
+ import "./chunk-YBW5JSA3.js";
21
+
22
+ // src/personal-github.ts
23
+ import { z } from "zod";
24
+ var PERSONAL_GITHUB_PROVIDER_DOMAIN = "github.com";
25
+ var PERSONAL_GITHUB_PROVIDER_FAMILY = "github";
26
+ var PERSONAL_GITHUB_CREDENTIAL_ROLE = "opengeni_github_personal";
27
+ var PERSONAL_GITHUB_CONNECTION_SURFACE_ID = "github:personal";
28
+ var PERSONAL_GITHUB_REQUESTED_SCOPES = ["repo"];
29
+ var PERSONAL_GITHUB_AUTHORIZATION_URL = "https://github.com/login/oauth/authorize";
30
+ var PERSONAL_GITHUB_TOKEN_URL = "https://github.com/login/oauth/access_token";
31
+ var PERSONAL_GITHUB_USER_URL = "https://api.github.com/user";
32
+ var PERSONAL_GITHUB_API_ORIGIN = "https://api.github.com";
33
+ var PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX = 100;
34
+ var PersonalGitHubRepositoryId = z.string().regex(/^[1-9]\d*$/u);
35
+ var PersonalGitHubRepositoryAccess = z.enum(["read", "write"]);
36
+ var PersonalGitHubRepositoryPermissions = z.object({
37
+ pull: z.boolean(),
38
+ push: z.boolean(),
39
+ admin: z.boolean(),
40
+ maintain: z.boolean(),
41
+ triage: z.boolean()
42
+ }).strict();
43
+ var PersonalGitHubRepositoryVisibility = z.enum(["public", "private", "internal"]);
44
+ var PersonalGitHubRepositoryFullName = z.string().min(3).max(140).regex(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\/[A-Za-z0-9_.-]{1,100}$/u);
45
+ function canonicalPersonalGitHubRepositoryUrl(fullName) {
46
+ return `https://github.com/${fullName}`;
47
+ }
48
+ var PersonalGitHubRepository = z.object({
49
+ repositoryId: PersonalGitHubRepositoryId,
50
+ fullName: PersonalGitHubRepositoryFullName,
51
+ canonicalUrl: z.string().url().max(512),
52
+ defaultBranch: z.string().min(1).max(255),
53
+ visibility: PersonalGitHubRepositoryVisibility,
54
+ private: z.boolean(),
55
+ archived: z.boolean(),
56
+ disabled: z.boolean(),
57
+ permissions: PersonalGitHubRepositoryPermissions
58
+ }).strict().superRefine((repository, context) => {
59
+ if (repository.canonicalUrl !== canonicalPersonalGitHubRepositoryUrl(repository.fullName)) {
60
+ context.addIssue({
61
+ code: "custom",
62
+ path: ["canonicalUrl"],
63
+ message: "canonicalUrl must be derived from fullName"
64
+ });
65
+ }
66
+ if (repository.private !== (repository.visibility === "private")) {
67
+ context.addIssue({
68
+ code: "custom",
69
+ path: ["private"],
70
+ message: "private must agree with visibility"
71
+ });
72
+ }
73
+ });
74
+ var PersonalGitHubSelectedRepository = PersonalGitHubRepository.safeExtend({
75
+ selectedAccess: PersonalGitHubRepositoryAccess,
76
+ selectionGeneration: z.number().int().positive(),
77
+ selectedAt: z.string().datetime({ offset: true }),
78
+ lastVerifiedAt: z.string().datetime({ offset: true })
79
+ }).strict();
80
+ var PersonalGitHubRepositorySelectionState = z.object({
81
+ connectionAuthorityGeneration: z.number().int().positive(),
82
+ credentialBindingId: z.string().uuid(),
83
+ providerPrincipalId: PersonalGitHubRepositoryId,
84
+ selectionGeneration: z.number().int().nonnegative(),
85
+ repositories: z.array(PersonalGitHubSelectedRepository).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX)
86
+ }).strict();
87
+ var ListPersonalGitHubRepositoriesQuery = z.object({
88
+ cursor: z.coerce.number().int().positive().max(1e4).default(1),
89
+ limit: z.coerce.number().int().min(1).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX).default(50)
90
+ }).strict();
91
+ var PersonalGitHubRepositoryCatalogItem = PersonalGitHubRepository.safeExtend({
92
+ selectedAccess: PersonalGitHubRepositoryAccess.nullable()
93
+ }).strict();
94
+ var ListPersonalGitHubRepositoriesResponse = z.object({
95
+ repositories: z.array(PersonalGitHubRepositoryCatalogItem).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),
96
+ nextCursor: z.number().int().positive().nullable(),
97
+ selection: PersonalGitHubRepositorySelectionState
98
+ }).strict();
99
+ var PersonalGitHubRepositorySelectionInput = z.object({
100
+ repositoryId: PersonalGitHubRepositoryId,
101
+ fullName: PersonalGitHubRepositoryFullName,
102
+ access: PersonalGitHubRepositoryAccess
103
+ }).strict();
104
+ var ReplacePersonalGitHubRepositorySelectionsRequest = z.object({
105
+ expectedConnectionAuthorityGeneration: z.number().int().positive(),
106
+ expectedSelectionGeneration: z.number().int().nonnegative(),
107
+ idempotencyKey: z.string().trim().min(1).max(200),
108
+ repositories: z.array(PersonalGitHubRepositorySelectionInput).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX)
109
+ }).strict().superRefine((request, context) => {
110
+ const repositoryIds = /* @__PURE__ */ new Set();
111
+ const fullNames = /* @__PURE__ */ new Set();
112
+ request.repositories.forEach((repository, index) => {
113
+ const normalizedFullName = repository.fullName.toLowerCase();
114
+ if (repositoryIds.has(repository.repositoryId)) {
115
+ context.addIssue({
116
+ code: "custom",
117
+ path: ["repositories", index, "repositoryId"],
118
+ message: "repositoryId must be unique"
119
+ });
120
+ }
121
+ if (fullNames.has(normalizedFullName)) {
122
+ context.addIssue({
123
+ code: "custom",
124
+ path: ["repositories", index, "fullName"],
125
+ message: "fullName must be unique"
126
+ });
127
+ }
128
+ repositoryIds.add(repository.repositoryId);
129
+ fullNames.add(normalizedFullName);
130
+ });
131
+ });
132
+ var VerifyPersonalGitHubRepositorySelectionsRequest = z.object({
133
+ expectedConnectionAuthorityGeneration: z.number().int().positive(),
134
+ expectedSelectionGeneration: z.number().int().nonnegative(),
135
+ idempotencyKey: z.string().trim().min(1).max(200)
136
+ }).strict();
137
+ var PersonalGitHubConnectionMetadata = z.object({
138
+ credentialRole: z.literal(PERSONAL_GITHUB_CREDENTIAL_ROLE),
139
+ providerFamily: z.literal(PERSONAL_GITHUB_PROVIDER_FAMILY),
140
+ providerPrincipalId: z.string().regex(/^\d+$/u),
141
+ githubUserId: z.string().regex(/^\d+$/u),
142
+ githubLogin: z.string().min(1).max(100),
143
+ oauthEnvironment: z.string().min(1).max(128),
144
+ oauthClientMarker: z.string().regex(/^[a-f0-9]{32}$/u),
145
+ credentialBindingId: z.string().uuid(),
146
+ connectedAt: z.string().datetime({ offset: true }),
147
+ lastVerifiedAt: z.string().datetime({ offset: true }),
148
+ disconnectedAt: z.string().datetime({ offset: true }).nullable().optional(),
149
+ refreshTokenExpiresAt: z.string().datetime({ offset: true }).nullable().optional()
150
+ }).passthrough();
151
+ var PersonalGitHubOAuthStartRequest = z.object({
152
+ /** Existing exact connection generation to re-authorize in place. */
153
+ connectionId: z.string().uuid().optional(),
154
+ /** Same-workspace UI path restored after the callback. */
155
+ returnPath: z.string().min(1).max(2048).optional()
156
+ }).strict();
157
+ var PersonalGitHubOAuthStartResponse = z.object({
158
+ authorizationUrl: z.string().url(),
159
+ expiresAt: z.string().datetime({ offset: true })
160
+ }).strict();
161
+ var PersonalGitHubConnectionStatusResponse = z.object({
162
+ enabled: z.boolean(),
163
+ connection: ConnectionMetadata.nullable(),
164
+ reviewUrl: z.string().url().nullable()
165
+ }).strict();
166
+ var PersonalGitHubDisconnectRequest = z.object({
167
+ expectedVersion: z.number().int().positive(),
168
+ idempotencyKey: z.string().trim().min(1).max(200)
169
+ }).strict();
170
+ function isPersonalGitHubConnection(connection) {
171
+ return connection.providerDomain.toLowerCase() === PERSONAL_GITHUB_PROVIDER_DOMAIN && connection.kind === "oauth2" && PersonalGitHubConnectionMetadata.safeParse(connection.metadata).success;
172
+ }
173
+ function hasReservedPersonalGitHubMetadata(metadata) {
174
+ return metadata?.credentialRole === PERSONAL_GITHUB_CREDENTIAL_ROLE;
175
+ }
176
+ export {
177
+ ListPersonalGitHubRepositoriesQuery,
178
+ ListPersonalGitHubRepositoriesResponse,
179
+ PERSONAL_GITHUB_API_ORIGIN,
180
+ PERSONAL_GITHUB_AUTHORIZATION_URL,
181
+ PERSONAL_GITHUB_CONNECTION_SURFACE_ID,
182
+ PERSONAL_GITHUB_CREDENTIAL_ROLE,
183
+ PERSONAL_GITHUB_PROVIDER_DOMAIN,
184
+ PERSONAL_GITHUB_PROVIDER_FAMILY,
185
+ PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX,
186
+ PERSONAL_GITHUB_REQUESTED_SCOPES,
187
+ PERSONAL_GITHUB_TOKEN_URL,
188
+ PERSONAL_GITHUB_USER_URL,
189
+ PersonalGitHubConnectionMetadata,
190
+ PersonalGitHubConnectionStatusResponse,
191
+ PersonalGitHubDisconnectRequest,
192
+ PersonalGitHubOAuthStartRequest,
193
+ PersonalGitHubOAuthStartResponse,
194
+ PersonalGitHubRepository,
195
+ PersonalGitHubRepositoryAccess,
196
+ PersonalGitHubRepositoryCatalogItem,
197
+ PersonalGitHubRepositoryId,
198
+ PersonalGitHubRepositoryPermissions,
199
+ PersonalGitHubRepositorySelectionInput,
200
+ PersonalGitHubRepositorySelectionState,
201
+ PersonalGitHubRepositoryVisibility,
202
+ PersonalGitHubSelectedRepository,
203
+ ReplacePersonalGitHubRepositorySelectionsRequest,
204
+ VerifyPersonalGitHubRepositorySelectionsRequest,
205
+ canonicalPersonalGitHubRepositoryUrl,
206
+ hasReservedPersonalGitHubMetadata,
207
+ isPersonalGitHubConnection
208
+ };
209
+ //# sourceMappingURL=personal-github.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/personal-github.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\n\nexport const PERSONAL_GITHUB_PROVIDER_DOMAIN = \"github.com\" as const;\nexport const PERSONAL_GITHUB_PROVIDER_FAMILY = \"github\" as const;\nexport const PERSONAL_GITHUB_CREDENTIAL_ROLE = \"opengeni_github_personal\" as const;\nexport const PERSONAL_GITHUB_CONNECTION_SURFACE_ID = \"github:personal\" as const;\nexport const PERSONAL_GITHUB_REQUESTED_SCOPES = [\"repo\"] as const;\nexport const PERSONAL_GITHUB_AUTHORIZATION_URL =\n \"https://github.com/login/oauth/authorize\" as const;\nexport const PERSONAL_GITHUB_TOKEN_URL = \"https://github.com/login/oauth/access_token\" as const;\nexport const PERSONAL_GITHUB_USER_URL = \"https://api.github.com/user\" as const;\nexport const PERSONAL_GITHUB_API_ORIGIN = \"https://api.github.com\" as const;\nexport const PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX = 100 as const;\n\nexport const PersonalGitHubRepositoryId = z.string().regex(/^[1-9]\\d*$/u);\nexport type PersonalGitHubRepositoryId = z.infer<typeof PersonalGitHubRepositoryId>;\n\nexport const PersonalGitHubRepositoryAccess = z.enum([\"read\", \"write\"]);\nexport type PersonalGitHubRepositoryAccess = z.infer<typeof PersonalGitHubRepositoryAccess>;\n\nexport const PersonalGitHubRepositoryPermissions = z\n .object({\n pull: z.boolean(),\n push: z.boolean(),\n admin: z.boolean(),\n maintain: z.boolean(),\n triage: z.boolean(),\n })\n .strict();\nexport type PersonalGitHubRepositoryPermissions = z.infer<\n typeof PersonalGitHubRepositoryPermissions\n>;\n\nexport const PersonalGitHubRepositoryVisibility = z.enum([\"public\", \"private\", \"internal\"]);\nexport type PersonalGitHubRepositoryVisibility = z.infer<typeof PersonalGitHubRepositoryVisibility>;\n\nconst PersonalGitHubRepositoryFullName = z\n .string()\n .min(3)\n .max(140)\n .regex(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\\/[A-Za-z0-9_.-]{1,100}$/u);\n\nexport function canonicalPersonalGitHubRepositoryUrl(fullName: string): string {\n return `https://github.com/${fullName}`;\n}\n\n/** A bounded, credential-free projection verified directly against GitHub. */\nexport const PersonalGitHubRepository = z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n canonicalUrl: z.string().url().max(512),\n defaultBranch: z.string().min(1).max(255),\n visibility: PersonalGitHubRepositoryVisibility,\n private: z.boolean(),\n archived: z.boolean(),\n disabled: z.boolean(),\n permissions: PersonalGitHubRepositoryPermissions,\n })\n .strict()\n .superRefine((repository, context) => {\n if (repository.canonicalUrl !== canonicalPersonalGitHubRepositoryUrl(repository.fullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"canonicalUrl\"],\n message: \"canonicalUrl must be derived from fullName\",\n });\n }\n if (repository.private !== (repository.visibility === \"private\")) {\n context.addIssue({\n code: \"custom\",\n path: [\"private\"],\n message: \"private must agree with visibility\",\n });\n }\n });\nexport type PersonalGitHubRepository = z.infer<typeof PersonalGitHubRepository>;\n\nexport const PersonalGitHubSelectedRepository = PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess,\n selectionGeneration: z.number().int().positive(),\n selectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n}).strict();\nexport type PersonalGitHubSelectedRepository = z.infer<typeof PersonalGitHubSelectedRepository>;\n\nexport const PersonalGitHubRepositorySelectionState = z\n .object({\n connectionAuthorityGeneration: z.number().int().positive(),\n credentialBindingId: z.string().uuid(),\n providerPrincipalId: PersonalGitHubRepositoryId,\n selectionGeneration: z.number().int().nonnegative(),\n repositories: z\n .array(PersonalGitHubSelectedRepository)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict();\nexport type PersonalGitHubRepositorySelectionState = z.infer<\n typeof PersonalGitHubRepositorySelectionState\n>;\n\nexport const ListPersonalGitHubRepositoriesQuery = z\n .object({\n cursor: z.coerce.number().int().positive().max(10_000).default(1),\n limit: z.coerce.number().int().min(1).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX).default(50),\n })\n .strict();\nexport type ListPersonalGitHubRepositoriesQuery = z.infer<\n typeof ListPersonalGitHubRepositoriesQuery\n>;\n\nexport const PersonalGitHubRepositoryCatalogItem = PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess.nullable(),\n}).strict();\nexport type PersonalGitHubRepositoryCatalogItem = z.infer<\n typeof PersonalGitHubRepositoryCatalogItem\n>;\n\nexport const ListPersonalGitHubRepositoriesResponse = z\n .object({\n repositories: z\n .array(PersonalGitHubRepositoryCatalogItem)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n nextCursor: z.number().int().positive().nullable(),\n selection: PersonalGitHubRepositorySelectionState,\n })\n .strict();\nexport type ListPersonalGitHubRepositoriesResponse = z.infer<\n typeof ListPersonalGitHubRepositoriesResponse\n>;\n\nexport const PersonalGitHubRepositorySelectionInput = z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n access: PersonalGitHubRepositoryAccess,\n })\n .strict();\nexport type PersonalGitHubRepositorySelectionInput = z.infer<\n typeof PersonalGitHubRepositorySelectionInput\n>;\n\nexport const ReplacePersonalGitHubRepositorySelectionsRequest = z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n repositories: z\n .array(PersonalGitHubRepositorySelectionInput)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict()\n .superRefine((request, context) => {\n const repositoryIds = new Set<string>();\n const fullNames = new Set<string>();\n request.repositories.forEach((repository, index) => {\n const normalizedFullName = repository.fullName.toLowerCase();\n if (repositoryIds.has(repository.repositoryId)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"repositoryId\"],\n message: \"repositoryId must be unique\",\n });\n }\n if (fullNames.has(normalizedFullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"fullName\"],\n message: \"fullName must be unique\",\n });\n }\n repositoryIds.add(repository.repositoryId);\n fullNames.add(normalizedFullName);\n });\n });\nexport type ReplacePersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof ReplacePersonalGitHubRepositorySelectionsRequest\n>;\n\nexport const VerifyPersonalGitHubRepositorySelectionsRequest = z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type VerifyPersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof VerifyPersonalGitHubRepositorySelectionsRequest\n>;\n\n/**\n * Owner-visible, credential-free metadata for one dedicated personal GitHub\n * OAuth connection. Repository selections are a separate authority and never\n * live in this credential record.\n */\nexport const PersonalGitHubConnectionMetadata = z\n .object({\n credentialRole: z.literal(PERSONAL_GITHUB_CREDENTIAL_ROLE),\n providerFamily: z.literal(PERSONAL_GITHUB_PROVIDER_FAMILY),\n providerPrincipalId: z.string().regex(/^\\d+$/u),\n githubUserId: z.string().regex(/^\\d+$/u),\n githubLogin: z.string().min(1).max(100),\n oauthEnvironment: z.string().min(1).max(128),\n oauthClientMarker: z.string().regex(/^[a-f0-9]{32}$/u),\n credentialBindingId: z.string().uuid(),\n connectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n disconnectedAt: z.string().datetime({ offset: true }).nullable().optional(),\n refreshTokenExpiresAt: z.string().datetime({ offset: true }).nullable().optional(),\n })\n .passthrough();\nexport type PersonalGitHubConnectionMetadata = z.infer<typeof PersonalGitHubConnectionMetadata>;\n\nexport const PersonalGitHubOAuthStartRequest = z\n .object({\n /** Existing exact connection generation to re-authorize in place. */\n connectionId: z.string().uuid().optional(),\n /** Same-workspace UI path restored after the callback. */\n returnPath: z.string().min(1).max(2048).optional(),\n })\n .strict();\nexport type PersonalGitHubOAuthStartRequest = z.infer<typeof PersonalGitHubOAuthStartRequest>;\n\nexport const PersonalGitHubOAuthStartResponse = z\n .object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n })\n .strict();\nexport type PersonalGitHubOAuthStartResponse = z.infer<typeof PersonalGitHubOAuthStartResponse>;\n\nexport const PersonalGitHubConnectionStatusResponse = z\n .object({\n enabled: z.boolean(),\n connection: ConnectionMetadata.nullable(),\n reviewUrl: z.string().url().nullable(),\n })\n .strict();\nexport type PersonalGitHubConnectionStatusResponse = z.infer<\n typeof PersonalGitHubConnectionStatusResponse\n>;\n\nexport const PersonalGitHubDisconnectRequest = z\n .object({\n expectedVersion: z.number().int().positive(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type PersonalGitHubDisconnectRequest = z.infer<typeof PersonalGitHubDisconnectRequest>;\n\nexport function isPersonalGitHubConnection(\n connection: Pick<z.infer<typeof ConnectionMetadata>, \"providerDomain\" | \"kind\" | \"metadata\">,\n): boolean {\n return (\n connection.providerDomain.toLowerCase() === PERSONAL_GITHUB_PROVIDER_DOMAIN &&\n connection.kind === \"oauth2\" &&\n PersonalGitHubConnectionMetadata.safeParse(connection.metadata).success\n );\n}\n\nexport function hasReservedPersonalGitHubMetadata(\n metadata: Record<string, unknown> | undefined,\n): boolean {\n return metadata?.credentialRole === PERSONAL_GITHUB_CREDENTIAL_ROLE;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAIX,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACxC,IAAM,wCAAwC;AAC9C,IAAM,mCAAmC,CAAC,MAAM;AAChD,IAAM,oCACX;AACK,IAAM,4BAA4B;AAClC,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;A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,EAAE,IAAI,EAAE,SAAS;AACvC,CAAC,EACA,OAAO;AAKH,IAAM,kCAAkC,EAC5C,OAAO;AAAA,EACN,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,EAC3C,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAClD,CAAC,EACA,OAAO;AAGH,SAAS,2BACd,YACS;AACT,SACE,WAAW,eAAe,YAAY,MAAM,mCAC5C,WAAW,SAAS,YACpB,iCAAiC,UAAU,WAAW,QAAQ,EAAE;AAEpE;AAEO,SAAS,kCACd,UACS;AACT,SAAO,UAAU,mBAAmB;AACtC;","names":[]}
@@ -283,6 +283,11 @@ export declare const PreferenceRegistryEvent: z.ZodObject<{
283
283
  createdAt: z.ZodString;
284
284
  }, z.core.$strip>;
285
285
  export type PreferenceRegistryEvent = z.infer<typeof PreferenceRegistryEvent>;
286
+ export declare const PreferenceRegistryActivationAuthority: z.ZodEnum<{
287
+ automatic: "automatic";
288
+ human_confirmed: "human_confirmed";
289
+ }>;
290
+ export type PreferenceRegistryActivationAuthority = z.infer<typeof PreferenceRegistryActivationAuthority>;
286
291
  export declare const PreferenceRegistryDescriptor: z.ZodObject<{
287
292
  id: z.ZodString;
288
293
  stableKey: z.ZodString;
@@ -329,6 +334,10 @@ export declare const PreferenceRegistryDescriptor: z.ZodObject<{
329
334
  workspace_managed: "workspace_managed";
330
335
  }>;
331
336
  }, z.core.$strip>;
337
+ activationAuthority: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
338
+ automatic: "automatic";
339
+ human_confirmed: "human_confirmed";
340
+ }>>>;
332
341
  expiresAt: z.ZodNullable<z.ZodString>;
333
342
  retrievalHandle: z.ZodString;
334
343
  }, z.core.$strip>;
@@ -388,6 +397,10 @@ export declare const PreferenceRegistrySnapshot: z.ZodObject<{
388
397
  workspace_managed: "workspace_managed";
389
398
  }>;
390
399
  }, z.core.$strip>;
400
+ activationAuthority: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
401
+ automatic: "automatic";
402
+ human_confirmed: "human_confirmed";
403
+ }>>>;
391
404
  expiresAt: z.ZodNullable<z.ZodString>;
392
405
  retrievalHandle: z.ZodString;
393
406
  }, z.core.$strip>>;
@@ -442,6 +455,10 @@ export declare const PreferenceRegistryFullContent: z.ZodObject<{
442
455
  workspace_managed: "workspace_managed";
443
456
  }>;
444
457
  }, z.core.$strip>;
458
+ activationAuthority: z.ZodDefault<z.ZodNullable<z.ZodEnum<{
459
+ automatic: "automatic";
460
+ human_confirmed: "human_confirmed";
461
+ }>>>;
445
462
  expiresAt: z.ZodNullable<z.ZodString>;
446
463
  retrievalHandle: z.ZodString;
447
464
  }, z.core.$strip>;