@opengeni/contracts 2.7.0 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-authored-durable-text.d.ts +3 -0
- package/dist/atlassian.js +2 -1
- package/dist/chunk-4IVHBXRI.js +221 -0
- package/dist/chunk-4IVHBXRI.js.map +1 -0
- package/dist/{chunk-ILB4IYNN.js → chunk-AWNGBY5I.js} +210 -246
- package/dist/chunk-AWNGBY5I.js.map +1 -0
- package/dist/company-profile.d.ts +275 -1
- package/dist/connection-authority.js +2 -1
- package/dist/connection-authority.js.map +1 -1
- package/dist/google-drive.js +2 -1
- package/dist/google-drive.js.map +1 -1
- package/dist/index.d.ts +176 -3
- package/dist/index.js +43 -5
- package/dist/managed-auth-session-sets.d.ts +19 -0
- package/dist/managed-auth-session-sets.js +12 -1
- package/dist/managed-auth-session-sets.js.map +1 -1
- package/dist/organization-membership-lifecycle.d.ts +3 -0
- package/dist/permissions.d.ts +1 -0
- package/dist/personal-github.js +2 -1
- package/dist/personal-github.js.map +1 -1
- package/dist/session-titles.d.ts +9 -0
- package/dist/session-titles.js +17 -0
- package/dist/session-titles.js.map +1 -0
- package/package.json +5 -1
- package/src/agent-authored-durable-text.ts +13 -6
- package/src/company-profile.ts +46 -1
- package/src/index.ts +374 -179
- package/src/managed-auth-session-sets.ts +18 -0
- package/src/permissions.ts +1 -0
- package/src/session-titles.ts +12 -5
- package/dist/chunk-ILB4IYNN.js.map +0 -1
|
@@ -127,6 +127,24 @@ export const ManagedAuthLoginTransaction = z.object({
|
|
|
127
127
|
});
|
|
128
128
|
export type ManagedAuthLoginTransaction = z.infer<typeof ManagedAuthLoginTransaction>;
|
|
129
129
|
|
|
130
|
+
export const ManagedAuthSocialProvider = z.enum(["google", "github"]);
|
|
131
|
+
export type ManagedAuthSocialProvider = z.infer<typeof ManagedAuthSocialProvider>;
|
|
132
|
+
|
|
133
|
+
export const StartManagedAuthSocialTransactionRequest = ManagedAuthOperationIdentity.extend({
|
|
134
|
+
transactionId: z.string().uuid(),
|
|
135
|
+
provider: ManagedAuthSocialProvider,
|
|
136
|
+
});
|
|
137
|
+
export type StartManagedAuthSocialTransactionRequest = z.infer<
|
|
138
|
+
typeof StartManagedAuthSocialTransactionRequest
|
|
139
|
+
>;
|
|
140
|
+
|
|
141
|
+
export const StartManagedAuthSocialTransactionResponse = z.object({
|
|
142
|
+
url: z.string().url().max(4_096),
|
|
143
|
+
});
|
|
144
|
+
export type StartManagedAuthSocialTransactionResponse = z.infer<
|
|
145
|
+
typeof StartManagedAuthSocialTransactionResponse
|
|
146
|
+
>;
|
|
147
|
+
|
|
130
148
|
export const CompleteManagedAuthEmailPasswordTransactionRequest =
|
|
131
149
|
ManagedAuthOperationIdentity.extend({
|
|
132
150
|
transactionId: z.string().uuid(),
|
package/src/permissions.ts
CHANGED
package/src/session-titles.ts
CHANGED
|
@@ -212,7 +212,13 @@ function hasVisibleAutomaticTitleContent(value: string): boolean {
|
|
|
212
212
|
return automaticTitleDetectionValue(value).trim().length > 0;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
/**
|
|
216
|
+
* Whether a bounded automatic-title candidate contains a credential, URL, or
|
|
217
|
+
* opaque identifier that must stay out of navigation and other display-title
|
|
218
|
+
* surfaces. Callers handling an unbounded source must bound it before invoking
|
|
219
|
+
* this helper.
|
|
220
|
+
*/
|
|
221
|
+
export function containsSensitiveAutomaticSessionTitleValue(value: string): boolean {
|
|
216
222
|
const detectionValue = automaticTitleDetectionValue(value);
|
|
217
223
|
|
|
218
224
|
if (KNOWN_SENSITIVE_VALUE_PATTERNS.some((pattern) => pattern.test(detectionValue))) return true;
|
|
@@ -271,7 +277,8 @@ function automaticTitleGraphemes(value: string): string[] {
|
|
|
271
277
|
return graphemes;
|
|
272
278
|
}
|
|
273
279
|
|
|
274
|
-
|
|
280
|
+
/** Bound an already-normalized automatic-title candidate without splitting graphemes. */
|
|
281
|
+
export function boundAutomaticSessionTitle(value: string): string {
|
|
275
282
|
const words = value.split(/\s+/u);
|
|
276
283
|
const wordBounded = words.length > 10 ? words.slice(0, 10).join(" ") : value;
|
|
277
284
|
const graphemes = automaticTitleGraphemes(wordBounded);
|
|
@@ -299,7 +306,7 @@ export function normalizeAutomaticSessionTitle(value: string): string | null {
|
|
|
299
306
|
if (
|
|
300
307
|
!firstLine ||
|
|
301
308
|
!hasVisibleAutomaticTitleContent(firstLine) ||
|
|
302
|
-
|
|
309
|
+
containsSensitiveAutomaticSessionTitleValue(firstLine)
|
|
303
310
|
) {
|
|
304
311
|
return null;
|
|
305
312
|
}
|
|
@@ -311,12 +318,12 @@ export function normalizeAutomaticSessionTitle(value: string): string | null {
|
|
|
311
318
|
if (
|
|
312
319
|
!title ||
|
|
313
320
|
!hasVisibleAutomaticTitleContent(title) ||
|
|
314
|
-
|
|
321
|
+
containsSensitiveAutomaticSessionTitleValue(title)
|
|
315
322
|
) {
|
|
316
323
|
return null;
|
|
317
324
|
}
|
|
318
325
|
|
|
319
|
-
title =
|
|
326
|
+
title = boundAutomaticSessionTitle(title)
|
|
320
327
|
.replace(/[\s.!?,;:\-–—]+$/u, "")
|
|
321
328
|
.trim();
|
|
322
329
|
if (!title || !hasVisibleAutomaticTitleContent(title)) return null;
|