@opengeni/contracts 2.6.0-canary.0 → 2.9.2-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 (37) hide show
  1. package/dist/agent-authored-durable-text.d.ts +3 -0
  2. package/dist/agent-topology.d.ts +292 -0
  3. package/dist/atlassian.js +2 -1
  4. package/dist/chunk-4IVHBXRI.js +221 -0
  5. package/dist/chunk-4IVHBXRI.js.map +1 -0
  6. package/dist/{chunk-MJ3K6ICH.js → chunk-AWNGBY5I.js} +7153 -6946
  7. package/dist/chunk-AWNGBY5I.js.map +1 -0
  8. package/dist/company-profile.d.ts +275 -1
  9. package/dist/connection-authority.js +2 -1
  10. package/dist/connection-authority.js.map +1 -1
  11. package/dist/google-drive.js +2 -1
  12. package/dist/google-drive.js.map +1 -1
  13. package/dist/index.d.ts +273 -140
  14. package/dist/index.js +107 -5
  15. package/dist/managed-auth-session-sets.d.ts +19 -0
  16. package/dist/managed-auth-session-sets.js +12 -1
  17. package/dist/managed-auth-session-sets.js.map +1 -1
  18. package/dist/organization-membership-lifecycle.d.ts +3 -0
  19. package/dist/permissions.d.ts +1 -0
  20. package/dist/personal-github.js +2 -1
  21. package/dist/personal-github.js.map +1 -1
  22. package/dist/session-titles.d.ts +9 -0
  23. package/dist/session-titles.js +17 -0
  24. package/dist/session-titles.js.map +1 -0
  25. package/dist/session-topology-primitives.d.ts +22 -0
  26. package/dist/work-claims.d.ts +411 -0
  27. package/package.json +5 -1
  28. package/src/agent-authored-durable-text.ts +13 -6
  29. package/src/agent-topology.ts +69 -0
  30. package/src/company-profile.ts +46 -1
  31. package/src/index.ts +385 -249
  32. package/src/managed-auth-session-sets.ts +18 -0
  33. package/src/permissions.ts +1 -0
  34. package/src/session-titles.ts +12 -5
  35. package/src/session-topology-primitives.ts +21 -0
  36. package/src/work-claims.ts +266 -0
  37. package/dist/chunk-MJ3K6ICH.js.map +0 -1
@@ -56,6 +56,9 @@ export declare const AGENT_AUTHORED_REMEMBER_CONTENT_TOO_LONG_MESSAGE: string;
56
56
  * preference*. Deliberately not reused for the company profile, which is a
57
57
  * descriptive profile rather than an instruction and needs its own wording.
58
58
  */
59
+ export declare const AGENT_AUTHORED_INSTRUCTION_POLICY_STYLE: string;
60
+ export declare const AGENT_AUTHORED_SKILL_STYLE: string;
61
+ /** @deprecated Use the destination-specific instruction or Skill style. */
59
62
  export declare const AGENT_AUTHORED_DURABLE_TEXT_STYLE: string;
60
63
  /**
61
64
  * Actionable over-budget message including the text the caller actually sent,
@@ -0,0 +1,292 @@
1
+ import { z } from "zod";
2
+ /** Compact, bounded session projection for workspace agent-topology browsers. */
3
+ export declare const AgentTopologySession: z.ZodObject<{
4
+ id: z.ZodString;
5
+ title: z.ZodNullable<z.ZodString>;
6
+ titleTruncated: z.ZodBoolean;
7
+ parentSessionId: z.ZodNullable<z.ZodString>;
8
+ rootSessionId: z.ZodString;
9
+ nestedAgentDepth: z.ZodNumber;
10
+ ancestorPath: z.ZodArray<z.ZodObject<{
11
+ id: z.ZodString;
12
+ title: z.ZodNullable<z.ZodString>;
13
+ titleTruncated: z.ZodBoolean;
14
+ }, z.core.$strip>>;
15
+ status: z.ZodEnum<{
16
+ cancelled: "cancelled";
17
+ failed: "failed";
18
+ idle: "idle";
19
+ queued: "queued";
20
+ recovering: "recovering";
21
+ requires_action: "requires_action";
22
+ running: "running";
23
+ waiting_capacity: "waiting_capacity";
24
+ }>;
25
+ goal: z.ZodNullable<z.ZodObject<{
26
+ status: z.ZodEnum<{
27
+ active: "active";
28
+ completed: "completed";
29
+ paused: "paused";
30
+ }>;
31
+ summary: z.ZodString;
32
+ summaryTruncated: z.ZodBoolean;
33
+ }, z.core.$strip>>;
34
+ pause: z.ZodObject<{
35
+ state: z.ZodEnum<{
36
+ active: "active";
37
+ paused: "paused";
38
+ }>;
39
+ additionalBlockerCount: z.ZodNumber;
40
+ source: z.ZodNullable<z.ZodObject<{
41
+ kind: z.ZodEnum<{
42
+ session: "session";
43
+ workspace: "workspace";
44
+ }>;
45
+ sessionId: z.ZodOptional<z.ZodString>;
46
+ displayName: z.ZodString;
47
+ displayNameTruncated: z.ZodBoolean;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>;
50
+ children: z.ZodObject<{
51
+ directChildren: z.ZodNumber;
52
+ totalDescendants: z.ZodNumber;
53
+ runningDescendants: z.ZodNumber;
54
+ queuedDescendants: z.ZodNumber;
55
+ attentionDescendants: z.ZodNumber;
56
+ pausedDescendants: z.ZodNumber;
57
+ failedDescendants: z.ZodNumber;
58
+ truncated: z.ZodBoolean;
59
+ }, z.core.$strip>;
60
+ relatedWork: z.ZodObject<{
61
+ claims: z.ZodArray<z.ZodObject<{
62
+ id: z.ZodString;
63
+ sessionId: z.ZodString;
64
+ subject: z.ZodObject<{
65
+ namespace: z.ZodString;
66
+ type: z.ZodEnum<{
67
+ artifact: "artifact";
68
+ branch: "branch";
69
+ ci_run: "ci_run";
70
+ issue: "issue";
71
+ other: "other";
72
+ pull_request: "pull_request";
73
+ release: "release";
74
+ repository: "repository";
75
+ }>;
76
+ canonicalKey: z.ZodString;
77
+ displayLabel: z.ZodNullable<z.ZodString>;
78
+ }, z.core.$strip>;
79
+ role: z.ZodEnum<{
80
+ delivering: "delivering";
81
+ monitoring: "monitoring";
82
+ reviewing: "reviewing";
83
+ working: "working";
84
+ }>;
85
+ state: z.ZodEnum<{
86
+ active: "active";
87
+ released: "released";
88
+ stale: "stale";
89
+ superseded: "superseded";
90
+ }>;
91
+ revision: z.ZodNumber;
92
+ provenance: z.ZodEnum<{
93
+ explicit_agent: "explicit_agent";
94
+ session_resource: "session_resource";
95
+ system_lifecycle: "system_lifecycle";
96
+ trusted_integration: "trusted_integration";
97
+ user_api: "user_api";
98
+ }>;
99
+ version: z.ZodNullable<z.ZodObject<{
100
+ kind: z.ZodEnum<{
101
+ artifact_version: "artifact_version";
102
+ branch_head: "branch_head";
103
+ ci_run: "ci_run";
104
+ git_commit: "git_commit";
105
+ other: "other";
106
+ pull_request_head: "pull_request_head";
107
+ release_version: "release_version";
108
+ }>;
109
+ value: z.ZodString;
110
+ }, z.core.$strip>>;
111
+ observedAt: z.ZodString;
112
+ updatedAt: z.ZodString;
113
+ settledAt: z.ZodNullable<z.ZodString>;
114
+ }, z.core.$strip>>;
115
+ claimsTruncated: z.ZodBoolean;
116
+ match: z.ZodNullable<z.ZodObject<{
117
+ class: z.ZodEnum<{
118
+ exact_subject: "exact_subject";
119
+ fuzzy: "fuzzy";
120
+ goal: "goal";
121
+ title: "title";
122
+ }>;
123
+ field: z.ZodEnum<{
124
+ claim_key: "claim_key";
125
+ claim_label: "claim_label";
126
+ goal: "goal";
127
+ subject: "subject";
128
+ title: "title";
129
+ }>;
130
+ scoreBand: z.ZodEnum<{
131
+ exact: "exact";
132
+ related: "related";
133
+ strong: "strong";
134
+ }>;
135
+ claimId: z.ZodNullable<z.ZodString>;
136
+ }, z.core.$strict>>;
137
+ possibleOverlap: z.ZodBoolean;
138
+ advisoryOnly: z.ZodLiteral<true>;
139
+ noAdditionalAccess: z.ZodLiteral<true>;
140
+ }, z.core.$strict>;
141
+ createdAt: z.ZodString;
142
+ updatedAt: z.ZodString;
143
+ }, z.core.$strip>;
144
+ export type AgentTopologySession = z.infer<typeof AgentTopologySession>;
145
+ export declare const AgentTopologyPageResponse: z.ZodObject<{
146
+ sessions: z.ZodArray<z.ZodObject<{
147
+ id: z.ZodString;
148
+ title: z.ZodNullable<z.ZodString>;
149
+ titleTruncated: z.ZodBoolean;
150
+ parentSessionId: z.ZodNullable<z.ZodString>;
151
+ rootSessionId: z.ZodString;
152
+ nestedAgentDepth: z.ZodNumber;
153
+ ancestorPath: z.ZodArray<z.ZodObject<{
154
+ id: z.ZodString;
155
+ title: z.ZodNullable<z.ZodString>;
156
+ titleTruncated: z.ZodBoolean;
157
+ }, z.core.$strip>>;
158
+ status: z.ZodEnum<{
159
+ cancelled: "cancelled";
160
+ failed: "failed";
161
+ idle: "idle";
162
+ queued: "queued";
163
+ recovering: "recovering";
164
+ requires_action: "requires_action";
165
+ running: "running";
166
+ waiting_capacity: "waiting_capacity";
167
+ }>;
168
+ goal: z.ZodNullable<z.ZodObject<{
169
+ status: z.ZodEnum<{
170
+ active: "active";
171
+ completed: "completed";
172
+ paused: "paused";
173
+ }>;
174
+ summary: z.ZodString;
175
+ summaryTruncated: z.ZodBoolean;
176
+ }, z.core.$strip>>;
177
+ pause: z.ZodObject<{
178
+ state: z.ZodEnum<{
179
+ active: "active";
180
+ paused: "paused";
181
+ }>;
182
+ additionalBlockerCount: z.ZodNumber;
183
+ source: z.ZodNullable<z.ZodObject<{
184
+ kind: z.ZodEnum<{
185
+ session: "session";
186
+ workspace: "workspace";
187
+ }>;
188
+ sessionId: z.ZodOptional<z.ZodString>;
189
+ displayName: z.ZodString;
190
+ displayNameTruncated: z.ZodBoolean;
191
+ }, z.core.$strip>>;
192
+ }, z.core.$strip>;
193
+ children: z.ZodObject<{
194
+ directChildren: z.ZodNumber;
195
+ totalDescendants: z.ZodNumber;
196
+ runningDescendants: z.ZodNumber;
197
+ queuedDescendants: z.ZodNumber;
198
+ attentionDescendants: z.ZodNumber;
199
+ pausedDescendants: z.ZodNumber;
200
+ failedDescendants: z.ZodNumber;
201
+ truncated: z.ZodBoolean;
202
+ }, z.core.$strip>;
203
+ relatedWork: z.ZodObject<{
204
+ claims: z.ZodArray<z.ZodObject<{
205
+ id: z.ZodString;
206
+ sessionId: z.ZodString;
207
+ subject: z.ZodObject<{
208
+ namespace: z.ZodString;
209
+ type: z.ZodEnum<{
210
+ artifact: "artifact";
211
+ branch: "branch";
212
+ ci_run: "ci_run";
213
+ issue: "issue";
214
+ other: "other";
215
+ pull_request: "pull_request";
216
+ release: "release";
217
+ repository: "repository";
218
+ }>;
219
+ canonicalKey: z.ZodString;
220
+ displayLabel: z.ZodNullable<z.ZodString>;
221
+ }, z.core.$strip>;
222
+ role: z.ZodEnum<{
223
+ delivering: "delivering";
224
+ monitoring: "monitoring";
225
+ reviewing: "reviewing";
226
+ working: "working";
227
+ }>;
228
+ state: z.ZodEnum<{
229
+ active: "active";
230
+ released: "released";
231
+ stale: "stale";
232
+ superseded: "superseded";
233
+ }>;
234
+ revision: z.ZodNumber;
235
+ provenance: z.ZodEnum<{
236
+ explicit_agent: "explicit_agent";
237
+ session_resource: "session_resource";
238
+ system_lifecycle: "system_lifecycle";
239
+ trusted_integration: "trusted_integration";
240
+ user_api: "user_api";
241
+ }>;
242
+ version: z.ZodNullable<z.ZodObject<{
243
+ kind: z.ZodEnum<{
244
+ artifact_version: "artifact_version";
245
+ branch_head: "branch_head";
246
+ ci_run: "ci_run";
247
+ git_commit: "git_commit";
248
+ other: "other";
249
+ pull_request_head: "pull_request_head";
250
+ release_version: "release_version";
251
+ }>;
252
+ value: z.ZodString;
253
+ }, z.core.$strip>>;
254
+ observedAt: z.ZodString;
255
+ updatedAt: z.ZodString;
256
+ settledAt: z.ZodNullable<z.ZodString>;
257
+ }, z.core.$strip>>;
258
+ claimsTruncated: z.ZodBoolean;
259
+ match: z.ZodNullable<z.ZodObject<{
260
+ class: z.ZodEnum<{
261
+ exact_subject: "exact_subject";
262
+ fuzzy: "fuzzy";
263
+ goal: "goal";
264
+ title: "title";
265
+ }>;
266
+ field: z.ZodEnum<{
267
+ claim_key: "claim_key";
268
+ claim_label: "claim_label";
269
+ goal: "goal";
270
+ subject: "subject";
271
+ title: "title";
272
+ }>;
273
+ scoreBand: z.ZodEnum<{
274
+ exact: "exact";
275
+ related: "related";
276
+ strong: "strong";
277
+ }>;
278
+ claimId: z.ZodNullable<z.ZodString>;
279
+ }, z.core.$strict>>;
280
+ possibleOverlap: z.ZodBoolean;
281
+ advisoryOnly: z.ZodLiteral<true>;
282
+ noAdditionalAccess: z.ZodLiteral<true>;
283
+ }, z.core.$strict>;
284
+ createdAt: z.ZodString;
285
+ updatedAt: z.ZodString;
286
+ }, z.core.$strip>>;
287
+ total: z.ZodNumber;
288
+ hasMore: z.ZodBoolean;
289
+ humanAdvisoriesEnabled: z.ZodOptional<z.ZodBoolean>;
290
+ nextCursor: z.ZodNullable<z.ZodString>;
291
+ }, z.core.$strip>;
292
+ export type AgentTopologyPageResponse = z.infer<typeof AgentTopologyPageResponse>;
package/dist/atlassian.js CHANGED
@@ -17,9 +17,10 @@ import {
17
17
  AtlassianSyncCadence,
18
18
  SaveAtlassianSourcesRequest,
19
19
  atlassianScopesAllowRead
20
- } from "./chunk-MJ3K6ICH.js";
20
+ } from "./chunk-AWNGBY5I.js";
21
21
  import "./chunk-WYBDERIY.js";
22
22
  import "./chunk-MRWYRAS5.js";
23
+ import "./chunk-4IVHBXRI.js";
23
24
  import "./chunk-CM6BMECR.js";
24
25
  import "./chunk-JUFK3T4Q.js";
25
26
  import "./chunk-YBW5JSA3.js";
@@ -0,0 +1,221 @@
1
+ // src/session-titles.ts
2
+ var SESSION_TITLE_MAX_CHARACTERS = 200;
3
+ var AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES = 80;
4
+ var AUTOMATIC_SESSION_TITLE_FALLBACK = "New conversation";
5
+ var titleSegmenter;
6
+ var KNOWN_SENSITIVE_VALUE_PATTERNS = [
7
+ /-----BEGIN [A-Z ]*PRIVATE KEY-----/iu,
8
+ /\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/iu,
9
+ /\b(?:sk-(?:proj-)?|gh[oprsu]_|github_pat_|glpat-|xox[baprs]-)[A-Za-z0-9_-]{8,}/iu,
10
+ /\bAKIA[0-9A-Z]{16}\b/u,
11
+ /\bAIza[0-9A-Za-z_-]{20,}\b/u,
12
+ /\beyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/u,
13
+ /[?&](?:access_token|api_key|apikey|password|secret|token)=[^\s&#]+/iu
14
+ ];
15
+ var URI_SCHEME_CANDIDATE_PATTERN = /\b[a-z][a-z0-9+.-]*:\S+/giu;
16
+ var WINDOWS_DRIVE_PATH_PATTERN = /^[a-z]:[\\/](?![\\/])[^:]*$/iu;
17
+ var SCHEMELESS_HOST_CANDIDATE_PATTERN = /\b(?:www\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?(?::\d{1,5})?(?:[/?#][^\s]*)?/giu;
18
+ var SCHEMELESS_LOCAL_NETWORK_PATTERNS = [
19
+ /\blocalhost(?:(?::\d{1,5})(?:[/?#][^\s]*)?|[/?#][^\s]*)/iu,
20
+ /\b(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:(?::\d{1,5})(?:[/?#][^\s]*)?|[/?#][^\s]*)/u,
21
+ /\[(?=[0-9a-f:.]*:[0-9a-f:.]*\])[0-9a-f:.]+\](?:(?::\d{1,5})(?:[/?#][^\s]*)?|[/?#][^\s]*)/iu
22
+ ];
23
+ var FILE_LIKE_HOST_SUFFIXES = /* @__PURE__ */ new Set([
24
+ "css",
25
+ "html",
26
+ "js",
27
+ "json",
28
+ "jsx",
29
+ "lock",
30
+ "md",
31
+ "sql",
32
+ "toml",
33
+ "ts",
34
+ "tsx",
35
+ "xml",
36
+ "yaml",
37
+ "yml"
38
+ ]);
39
+ var DOTTED_TECHNOLOGY_PATH_AUTHORITIES = /* @__PURE__ */ new Set([
40
+ "ASP.NET",
41
+ "AWS.SDK",
42
+ "Microsoft.Extensions",
43
+ "System.IO"
44
+ ]);
45
+ var SECRET_ASSIGNMENT_CANDIDATE_PATTERN = /(?:^|[^A-Za-z0-9])(?:(['"])([A-Za-z][A-Za-z0-9_. -]*)\1|([A-Za-z][A-Za-z0-9_.-]*))\s*[=:]\s*[^\s,;]+/gu;
46
+ var SECRET_LABEL_ASSIGNMENT_PATTERN = /\b(?:api[ _-]?key|access[ _-]?token|auth[ _-]?token|credential|credentials|password|passwd|private[ _-]?key|secret|token)\b\s*[=:]\s*[^\s,;]+/iu;
47
+ var SENSITIVE_ASSIGNMENT_KEY_SUFFIXES = /* @__PURE__ */ new Set([
48
+ "credential",
49
+ "credentials",
50
+ "password",
51
+ "passwd",
52
+ "secret",
53
+ "token"
54
+ ]);
55
+ var COMPACT_SENSITIVE_ASSIGNMENT_KEY_SUFFIXES = [
56
+ "apikey",
57
+ "accesskey",
58
+ "accesskeyid",
59
+ "accesstoken",
60
+ "authtoken",
61
+ "credential",
62
+ "credentials",
63
+ "password",
64
+ "passwd",
65
+ "privatekey",
66
+ "secret",
67
+ "secretkey",
68
+ "token"
69
+ ];
70
+ var SENSITIVE_ASSIGNMENT_KEY_WORD_SUFFIXES = [
71
+ ["api", "key"],
72
+ ["access", "key"],
73
+ ["access", "key", "id"],
74
+ ["auth", "key"],
75
+ ["private", "key"],
76
+ ["secret", "key"]
77
+ ];
78
+ function hasWordSuffix(words, suffix) {
79
+ if (words.length < suffix.length) return false;
80
+ const offset = words.length - suffix.length;
81
+ return suffix.every((word, index) => words[offset + index] === word);
82
+ }
83
+ function containsSensitiveAssignment(value) {
84
+ for (const match of value.matchAll(SECRET_ASSIGNMENT_CANDIDATE_PATTERN)) {
85
+ const key = match[2] ?? match[3];
86
+ if (!key) continue;
87
+ const words = key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);
88
+ const last = words.at(-1);
89
+ if (last && SENSITIVE_ASSIGNMENT_KEY_SUFFIXES.has(last)) return true;
90
+ if (last && COMPACT_SENSITIVE_ASSIGNMENT_KEY_SUFFIXES.some((suffix) => last.endsWith(suffix))) {
91
+ return true;
92
+ }
93
+ if (SENSITIVE_ASSIGNMENT_KEY_WORD_SUFFIXES.some((suffix) => hasWordSuffix(words, suffix))) {
94
+ return true;
95
+ }
96
+ }
97
+ return false;
98
+ }
99
+ function containsUriScheme(value) {
100
+ for (const match of value.matchAll(URI_SCHEME_CANDIDATE_PATTERN)) {
101
+ if (!WINDOWS_DRIVE_PATH_PATTERN.test(match[0])) return true;
102
+ }
103
+ return false;
104
+ }
105
+ function isDottedTechnologyPath(candidate) {
106
+ if (/[?:#]/u.test(candidate)) return false;
107
+ const [authority, ...pathSegments] = candidate.split("/");
108
+ if (!authority || pathSegments.length === 0 || pathSegments.some((segment) => !segment)) {
109
+ return false;
110
+ }
111
+ if (!DOTTED_TECHNOLOGY_PATH_AUTHORITIES.has(authority) || pathSegments.some((segment) => !/^[A-Z][A-Za-z0-9_-]*$/u.test(segment))) {
112
+ return false;
113
+ }
114
+ return true;
115
+ }
116
+ function containsSchemelessUrl(value) {
117
+ if (SCHEMELESS_LOCAL_NETWORK_PATTERNS.some((pattern) => pattern.test(value))) return true;
118
+ for (const match of value.matchAll(SCHEMELESS_HOST_CANDIDATE_PATTERN)) {
119
+ const candidate = match[0];
120
+ if (candidate.toLowerCase().startsWith("www.")) return true;
121
+ if (!/[/?#]/u.test(candidate)) continue;
122
+ const authority = candidate.split(/[/?#]/u, 1)[0] ?? "";
123
+ const hostname = authority.replace(/:\d{1,5}$/u, "");
124
+ const suffix = hostname.split(".").at(-1)?.toLowerCase();
125
+ if (suffix && FILE_LIKE_HOST_SUFFIXES.has(suffix)) continue;
126
+ if (isDottedTechnologyPath(candidate)) continue;
127
+ return true;
128
+ }
129
+ return false;
130
+ }
131
+ var OPAQUE_IDENTIFIER_PATTERN = /\b(?=[A-Za-z0-9_-]{32,}\b)(?=[A-Za-z0-9_-]*[A-Za-z])(?=[A-Za-z0-9_-]*\d)[A-Za-z0-9_-]+\b/u;
132
+ var DEFAULT_IGNORABLE_CODE_POINTS = /\p{Default_Ignorable_Code_Point}+/gu;
133
+ var ESCAPED_QUOTE_DELIMITERS = /\\+(?=["'])/gu;
134
+ var TITLE_LABEL_PATTERN = /^(?:(?:suggested|generated|concise)\s+)?(?:(?:session|chat|conversation|task)\s+)?title\s*[:\-–—]\s*/iu;
135
+ var LEADING_BOILERPLATE_PATTERNS = [
136
+ /^(?:hi|hello|hey)(?:\s+there)?\s*[,!:.\-–—]*\s*/iu,
137
+ /^(?:i\s+(?:would\s+like|want|need)\s+you\s+to|i['’]d\s+like\s+you\s+to)\s+/iu,
138
+ /^(?:please\s+)?(?:can|could|would|will)\s+you\s+/iu,
139
+ /^(?:your|the)\s+(?:task|job)\s+is\s+to\s+/iu,
140
+ /^(?:please\s+)?help\s+me\s+(?:to\s+)?/iu,
141
+ /^please(?:\s*[,!:.\-–—]+\s*|\s+|$)/iu
142
+ ];
143
+ function automaticTitleDetectionValue(value) {
144
+ return value.normalize("NFKC").replace(DEFAULT_IGNORABLE_CODE_POINTS, "").replace(ESCAPED_QUOTE_DELIMITERS, "");
145
+ }
146
+ function hasVisibleAutomaticTitleContent(value) {
147
+ return automaticTitleDetectionValue(value).trim().length > 0;
148
+ }
149
+ function containsSensitiveAutomaticSessionTitleValue(value) {
150
+ const detectionValue = automaticTitleDetectionValue(value);
151
+ if (KNOWN_SENSITIVE_VALUE_PATTERNS.some((pattern) => pattern.test(detectionValue))) return true;
152
+ if (containsUriScheme(detectionValue)) return true;
153
+ if (containsSchemelessUrl(detectionValue)) return true;
154
+ if (SECRET_LABEL_ASSIGNMENT_PATTERN.test(detectionValue)) return true;
155
+ if (containsSensitiveAssignment(detectionValue)) return true;
156
+ if (OPAQUE_IDENTIFIER_PATTERN.test(detectionValue)) return true;
157
+ return false;
158
+ }
159
+ function stripAutomaticTitleBoilerplate(value) {
160
+ let title = value;
161
+ for (let pass = 0; pass < 4; pass += 1) {
162
+ const before = title;
163
+ title = title.replace(/^(?:```[^\n]*|[\s#>*_`"'“”‘’\-–—]+)+/u, "").replace(TITLE_LABEL_PATTERN, "");
164
+ for (const pattern of LEADING_BOILERPLATE_PATTERNS) {
165
+ title = title.replace(pattern, "");
166
+ }
167
+ title = title.trim();
168
+ if (title === before) break;
169
+ }
170
+ return title;
171
+ }
172
+ function automaticTitleGraphemes(value) {
173
+ if (titleSegmenter === void 0) {
174
+ titleSegmenter = typeof Intl.Segmenter === "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null;
175
+ }
176
+ if (titleSegmenter) {
177
+ return Array.from(titleSegmenter.segment(value), (part) => part.segment);
178
+ }
179
+ const graphemes = [];
180
+ for (const point of value) {
181
+ const prior = graphemes.at(-1);
182
+ if (prior && (/^[\p{Mark}\u{FE0E}\u{FE0F}\p{Emoji_Modifier}]$/u.test(point) || point === "\u200D" || prior.endsWith("\u200D"))) {
183
+ graphemes[graphemes.length - 1] = `${prior}${point}`;
184
+ } else {
185
+ graphemes.push(point);
186
+ }
187
+ }
188
+ return graphemes;
189
+ }
190
+ function boundAutomaticSessionTitle(value) {
191
+ const words = value.split(/\s+/u);
192
+ const wordBounded = words.length > 10 ? words.slice(0, 10).join(" ") : value;
193
+ const graphemes = automaticTitleGraphemes(wordBounded);
194
+ if (graphemes.length <= AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES) return wordBounded;
195
+ const prefix = graphemes.slice(0, AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES).join("");
196
+ const lastWhitespace = prefix.search(/\s+\S*$/u);
197
+ return (lastWhitespace >= 16 ? prefix.slice(0, lastWhitespace) : prefix).trimEnd();
198
+ }
199
+ function normalizeAutomaticSessionTitle(value) {
200
+ const firstLine = value.replace(/[\u0000-\u001f\u007f-\u009f]+/gu, "\n").split(/\n+/u).map((line) => line.trim()).find(Boolean);
201
+ if (!firstLine || !hasVisibleAutomaticTitleContent(firstLine) || containsSensitiveAutomaticSessionTitleValue(firstLine)) {
202
+ return null;
203
+ }
204
+ let title = stripAutomaticTitleBoilerplate(firstLine).replace(/\s+/gu, " ").replace(/[\s.!?,;:\-–—]+$/u, "").trim();
205
+ if (!title || !hasVisibleAutomaticTitleContent(title) || containsSensitiveAutomaticSessionTitleValue(title)) {
206
+ return null;
207
+ }
208
+ title = boundAutomaticSessionTitle(title).replace(/[\s.!?,;:\-–—]+$/u, "").trim();
209
+ if (!title || !hasVisibleAutomaticTitleContent(title)) return null;
210
+ return title;
211
+ }
212
+
213
+ export {
214
+ SESSION_TITLE_MAX_CHARACTERS,
215
+ AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES,
216
+ AUTOMATIC_SESSION_TITLE_FALLBACK,
217
+ containsSensitiveAutomaticSessionTitleValue,
218
+ boundAutomaticSessionTitle,
219
+ normalizeAutomaticSessionTitle
220
+ };
221
+ //# sourceMappingURL=chunk-4IVHBXRI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/session-titles.ts"],"sourcesContent":["/** Human-authored session titles keep the existing public API ceiling. */\nexport const SESSION_TITLE_MAX_CHARACTERS = 200;\n\n/**\n * Automatic titles are intentionally much shorter than the manual rename\n * ceiling. This is measured in grapheme clusters so emoji and combining text\n * are never split into malformed display strings.\n */\nexport const AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES = 80;\n\n/**\n * Safe durable title used until semantic generation succeeds. It contains no\n * user prompt bytes, so provider failure/offline operation cannot leak a\n * credential or leave a raw prompt prefix in navigation surfaces.\n */\nexport const AUTOMATIC_SESSION_TITLE_FALLBACK = \"New conversation\";\n\nlet titleSegmenter: Intl.Segmenter | null | undefined;\n\nconst KNOWN_SENSITIVE_VALUE_PATTERNS = [\n /-----BEGIN [A-Z ]*PRIVATE KEY-----/iu,\n /\\bBearer\\s+[A-Za-z0-9._~+/=-]{8,}/iu,\n /\\b(?:sk-(?:proj-)?|gh[oprsu]_|github_pat_|glpat-|xox[baprs]-)[A-Za-z0-9_-]{8,}/iu,\n /\\bAKIA[0-9A-Z]{16}\\b/u,\n /\\bAIza[0-9A-Za-z_-]{20,}\\b/u,\n /\\beyJ[A-Za-z0-9_-]+\\.eyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\b/u,\n /[?&](?:access_token|api_key|apikey|password|secret|token)=[^\\s&#]+/iu,\n] as const;\n\nconst URI_SCHEME_CANDIDATE_PATTERN = /\\b[a-z][a-z0-9+.-]*:\\S+/giu;\nconst WINDOWS_DRIVE_PATH_PATTERN = /^[a-z]:[\\\\/](?![\\\\/])[^:]*$/iu;\n\nconst SCHEMELESS_HOST_CANDIDATE_PATTERN =\n /\\b(?:www\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?(?::\\d{1,5})?(?:[/?#][^\\s]*)?/giu;\n\nconst SCHEMELESS_LOCAL_NETWORK_PATTERNS = [\n /\\blocalhost(?:(?::\\d{1,5})(?:[/?#][^\\s]*)?|[/?#][^\\s]*)/iu,\n /\\b(?:(?:25[0-5]|2[0-4]\\d|1?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1?\\d?\\d)(?:(?::\\d{1,5})(?:[/?#][^\\s]*)?|[/?#][^\\s]*)/u,\n /\\[(?=[0-9a-f:.]*:[0-9a-f:.]*\\])[0-9a-f:.]+\\](?:(?::\\d{1,5})(?:[/?#][^\\s]*)?|[/?#][^\\s]*)/iu,\n] as const;\n\nconst FILE_LIKE_HOST_SUFFIXES = new Set([\n \"css\",\n \"html\",\n \"js\",\n \"json\",\n \"jsx\",\n \"lock\",\n \"md\",\n \"sql\",\n \"toml\",\n \"ts\",\n \"tsx\",\n \"xml\",\n \"yaml\",\n \"yml\",\n]);\n\n// These authorities are established framework/namespace notation whose exact\n// casing is meaningful. Keep this exception deliberately narrow: generic\n// PascalCase or uppercase authorities remain host-like because an uppercase\n// real domain (for example MICROSOFT.COM/Admin) must not bypass the URL gate.\nconst DOTTED_TECHNOLOGY_PATH_AUTHORITIES = new Set([\n \"ASP.NET\",\n \"AWS.SDK\",\n \"Microsoft.Extensions\",\n \"System.IO\",\n]);\n\nconst SECRET_ASSIGNMENT_CANDIDATE_PATTERN =\n /(?:^|[^A-Za-z0-9])(?:(['\"])([A-Za-z][A-Za-z0-9_. -]*)\\1|([A-Za-z][A-Za-z0-9_.-]*))\\s*[=:]\\s*[^\\s,;]+/gu;\n\nconst SECRET_LABEL_ASSIGNMENT_PATTERN =\n /\\b(?:api[ _-]?key|access[ _-]?token|auth[ _-]?token|credential|credentials|password|passwd|private[ _-]?key|secret|token)\\b\\s*[=:]\\s*[^\\s,;]+/iu;\n\nconst SENSITIVE_ASSIGNMENT_KEY_SUFFIXES = new Set([\n \"credential\",\n \"credentials\",\n \"password\",\n \"passwd\",\n \"secret\",\n \"token\",\n]);\n\nconst COMPACT_SENSITIVE_ASSIGNMENT_KEY_SUFFIXES = [\n \"apikey\",\n \"accesskey\",\n \"accesskeyid\",\n \"accesstoken\",\n \"authtoken\",\n \"credential\",\n \"credentials\",\n \"password\",\n \"passwd\",\n \"privatekey\",\n \"secret\",\n \"secretkey\",\n \"token\",\n] as const;\n\nconst SENSITIVE_ASSIGNMENT_KEY_WORD_SUFFIXES = [\n [\"api\", \"key\"],\n [\"access\", \"key\"],\n [\"access\", \"key\", \"id\"],\n [\"auth\", \"key\"],\n [\"private\", \"key\"],\n [\"secret\", \"key\"],\n] as const;\n\nfunction hasWordSuffix(words: readonly string[], suffix: readonly string[]): boolean {\n if (words.length < suffix.length) return false;\n const offset = words.length - suffix.length;\n return suffix.every((word, index) => words[offset + index] === word);\n}\n\nfunction containsSensitiveAssignment(value: string): boolean {\n for (const match of value.matchAll(SECRET_ASSIGNMENT_CANDIDATE_PATTERN)) {\n const key = match[2] ?? match[3];\n if (!key) continue;\n const words = key\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .replace(/([A-Z]+)([A-Z][a-z])/g, \"$1 $2\")\n .toLowerCase()\n .split(/[^a-z0-9]+/)\n .filter(Boolean);\n const last = words.at(-1);\n if (last && SENSITIVE_ASSIGNMENT_KEY_SUFFIXES.has(last)) return true;\n if (last && COMPACT_SENSITIVE_ASSIGNMENT_KEY_SUFFIXES.some((suffix) => last.endsWith(suffix))) {\n return true;\n }\n if (SENSITIVE_ASSIGNMENT_KEY_WORD_SUFFIXES.some((suffix) => hasWordSuffix(words, suffix))) {\n return true;\n }\n }\n return false;\n}\n\nfunction containsUriScheme(value: string): boolean {\n for (const match of value.matchAll(URI_SCHEME_CANDIDATE_PATTERN)) {\n // A Windows drive path is the one scheme-shaped token accepted here. Keep\n // the exception exact: one separator after the drive letter and no later\n // colon, so x://host and a nested scheme remain rejected.\n if (!WINDOWS_DRIVE_PATH_PATTERN.test(match[0])) return true;\n }\n return false;\n}\n\nfunction isDottedTechnologyPath(candidate: string): boolean {\n if (/[?:#]/u.test(candidate)) return false;\n const [authority, ...pathSegments] = candidate.split(\"/\");\n if (!authority || pathSegments.length === 0 || pathSegments.some((segment) => !segment)) {\n return false;\n }\n if (\n !DOTTED_TECHNOLOGY_PATH_AUTHORITIES.has(authority) ||\n pathSegments.some((segment) => !/^[A-Z][A-Za-z0-9_-]*$/u.test(segment))\n ) {\n return false;\n }\n return true;\n}\n\nfunction containsSchemelessUrl(value: string): boolean {\n if (SCHEMELESS_LOCAL_NETWORK_PATTERNS.some((pattern) => pattern.test(value))) return true;\n\n for (const match of value.matchAll(SCHEMELESS_HOST_CANDIDATE_PATTERN)) {\n const candidate = match[0];\n if (candidate.toLowerCase().startsWith(\"www.\")) return true;\n if (!/[/?#]/u.test(candidate)) continue;\n\n const authority = candidate.split(/[/?#]/u, 1)[0] ?? \"\";\n const hostname = authority.replace(/:\\d{1,5}$/u, \"\");\n const suffix = hostname.split(\".\").at(-1)?.toLowerCase();\n if (suffix && FILE_LIKE_HOST_SUFFIXES.has(suffix)) continue;\n if (isDottedTechnologyPath(candidate)) continue;\n return true;\n }\n return false;\n}\n\nconst OPAQUE_IDENTIFIER_PATTERN =\n /\\b(?=[A-Za-z0-9_-]{32,}\\b)(?=[A-Za-z0-9_-]*[A-Za-z])(?=[A-Za-z0-9_-]*\\d)[A-Za-z0-9_-]+\\b/u;\n\nconst DEFAULT_IGNORABLE_CODE_POINTS = /\\p{Default_Ignorable_Code_Point}+/gu;\nconst ESCAPED_QUOTE_DELIMITERS = /\\\\+(?=[\"'])/gu;\n\nconst TITLE_LABEL_PATTERN =\n /^(?:(?:suggested|generated|concise)\\s+)?(?:(?:session|chat|conversation|task)\\s+)?title\\s*[:\\-–—]\\s*/iu;\n\nconst LEADING_BOILERPLATE_PATTERNS = [\n /^(?:hi|hello|hey)(?:\\s+there)?\\s*[,!:.\\-–—]*\\s*/iu,\n /^(?:i\\s+(?:would\\s+like|want|need)\\s+you\\s+to|i['’]d\\s+like\\s+you\\s+to)\\s+/iu,\n /^(?:please\\s+)?(?:can|could|would|will)\\s+you\\s+/iu,\n /^(?:your|the)\\s+(?:task|job)\\s+is\\s+to\\s+/iu,\n /^(?:please\\s+)?help\\s+me\\s+(?:to\\s+)?/iu,\n /^please(?:\\s*[,!:.\\-–—]+\\s*|\\s+|$)/iu,\n] as const;\n\nfunction automaticTitleDetectionValue(value: string): string {\n // Detection uses a compatibility-normalized shadow value so fullwidth\n // punctuation/letters, invisible token splits, and serialized quote\n // delimiters cannot evade the policy.\n // The accepted title itself stays byte-for-byte in the user's language and\n // emoji form; this shadow is never returned or persisted.\n return value\n .normalize(\"NFKC\")\n .replace(DEFAULT_IGNORABLE_CODE_POINTS, \"\")\n .replace(ESCAPED_QUOTE_DELIMITERS, \"\");\n}\n\nfunction hasVisibleAutomaticTitleContent(value: string): boolean {\n return automaticTitleDetectionValue(value).trim().length > 0;\n}\n\n/**\n * Whether a bounded automatic-title candidate contains a credential, URL, or\n * opaque identifier that must stay out of navigation and other display-title\n * surfaces. Callers handling an unbounded source must bound it before invoking\n * this helper.\n */\nexport function containsSensitiveAutomaticSessionTitleValue(value: string): boolean {\n const detectionValue = automaticTitleDetectionValue(value);\n\n if (KNOWN_SENSITIVE_VALUE_PATTERNS.some((pattern) => pattern.test(detectionValue))) return true;\n if (containsUriScheme(detectionValue)) return true;\n if (containsSchemelessUrl(detectionValue)) return true;\n if (SECRET_LABEL_ASSIGNMENT_PATTERN.test(detectionValue)) return true;\n if (containsSensitiveAssignment(detectionValue)) return true;\n if (OPAQUE_IDENTIFIER_PATTERN.test(detectionValue)) return true;\n return false;\n}\n\nfunction stripAutomaticTitleBoilerplate(value: string): string {\n let title = value;\n for (let pass = 0; pass < 4; pass += 1) {\n const before = title;\n title = title\n .replace(/^(?:```[^\\n]*|[\\s#>*_`\"'“”‘’\\-–—]+)+/u, \"\")\n .replace(TITLE_LABEL_PATTERN, \"\");\n for (const pattern of LEADING_BOILERPLATE_PATTERNS) {\n title = title.replace(pattern, \"\");\n }\n title = title.trim();\n if (title === before) break;\n }\n return title;\n}\n\nfunction automaticTitleGraphemes(value: string): string[] {\n if (titleSegmenter === undefined) {\n titleSegmenter =\n typeof Intl.Segmenter === \"function\"\n ? new Intl.Segmenter(undefined, { granularity: \"grapheme\" })\n : null;\n }\n if (titleSegmenter) {\n return Array.from(titleSegmenter.segment(value), (part) => part.segment);\n }\n\n // Older embedded runtimes may not ship Intl.Segmenter. Preserve surrogate\n // pairs plus common combining/emoji sequences instead of failing module load\n // or slicing UTF-16 code units.\n const graphemes: string[] = [];\n for (const point of value) {\n const prior = graphemes.at(-1);\n if (\n prior &&\n (/^[\\p{Mark}\\u{FE0E}\\u{FE0F}\\p{Emoji_Modifier}]$/u.test(point) ||\n point === \"\\u200d\" ||\n prior.endsWith(\"\\u200d\"))\n ) {\n graphemes[graphemes.length - 1] = `${prior}${point}`;\n } else {\n graphemes.push(point);\n }\n }\n return graphemes;\n}\n\n/** Bound an already-normalized automatic-title candidate without splitting graphemes. */\nexport function boundAutomaticSessionTitle(value: string): string {\n const words = value.split(/\\s+/u);\n const wordBounded = words.length > 10 ? words.slice(0, 10).join(\" \") : value;\n const graphemes = automaticTitleGraphemes(wordBounded);\n if (graphemes.length <= AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES) return wordBounded;\n\n const prefix = graphemes.slice(0, AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES).join(\"\");\n const lastWhitespace = prefix.search(/\\s+\\S*$/u);\n return (lastWhitespace >= 16 ? prefix.slice(0, lastWhitespace) : prefix).trimEnd();\n}\n\n/**\n * Normalize a model/system-authored title before it reaches durable session\n * metadata. Human renames intentionally do not use this path.\n *\n * Returns null when the candidate is empty, only boilerplate, or appears to\n * contain a credential/opaque prompt value. Callers should retain the current\n * title (normally {@link AUTOMATIC_SESSION_TITLE_FALLBACK}) in that case.\n */\nexport function normalizeAutomaticSessionTitle(value: string): string | null {\n const firstLine = value\n .replace(/[\\u0000-\\u001f\\u007f-\\u009f]+/gu, \"\\n\")\n .split(/\\n+/u)\n .map((line) => line.trim())\n .find(Boolean);\n if (\n !firstLine ||\n !hasVisibleAutomaticTitleContent(firstLine) ||\n containsSensitiveAutomaticSessionTitleValue(firstLine)\n ) {\n return null;\n }\n\n let title = stripAutomaticTitleBoilerplate(firstLine)\n .replace(/\\s+/gu, \" \")\n .replace(/[\\s.!?,;:\\-–—]+$/u, \"\")\n .trim();\n if (\n !title ||\n !hasVisibleAutomaticTitleContent(title) ||\n containsSensitiveAutomaticSessionTitleValue(title)\n ) {\n return null;\n }\n\n title = boundAutomaticSessionTitle(title)\n .replace(/[\\s.!?,;:\\-–—]+$/u, \"\")\n .trim();\n if (!title || !hasVisibleAutomaticTitleContent(title)) return null;\n return title;\n}\n"],"mappings":";AACO,IAAM,+BAA+B;AAOrC,IAAM,wCAAwC;AAO9C,IAAM,mCAAmC;AAEhD,IAAI;AAEJ,IAAM,iCAAiC;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,+BAA+B;AACrC,IAAM,6BAA6B;AAEnC,IAAM,oCACJ;AAEF,IAAM,oCAAoC;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACF;AAEA,IAAM,0BAA0B,oBAAI,IAAI;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAMD,IAAM,qCAAqC,oBAAI,IAAI;AAAA,EACjD;AAAA,EACA;AA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