@leitwerk-dev/domain 0.1.8 → 0.2.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 (72) hide show
  1. package/dist/actor.d.ts.map +1 -1
  2. package/dist/domain-model.d.ts +87 -4
  3. package/dist/domain-model.d.ts.map +1 -1
  4. package/dist/index.d.ts +7 -5
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +985 -15
  7. package/dist/index.js.map +1 -1
  8. package/dist/launcher-recent-values.d.ts.map +1 -1
  9. package/dist/number-normalize.d.ts +3 -0
  10. package/dist/number-normalize.d.ts.map +1 -0
  11. package/dist/repo-locator.d.ts.map +1 -1
  12. package/dist/semantic-entry-refs.d.ts +1 -0
  13. package/dist/semantic-entry-refs.d.ts.map +1 -1
  14. package/dist/startup-observation.d.ts +42 -0
  15. package/dist/startup-observation.d.ts.map +1 -0
  16. package/dist/string-normalize.d.ts +5 -0
  17. package/dist/string-normalize.d.ts.map +1 -1
  18. package/dist/turn-annotations.d.ts.map +1 -1
  19. package/dist/turn-recovery.d.ts +6 -1
  20. package/dist/turn-recovery.d.ts.map +1 -1
  21. package/dist/turn-start-resolution.d.ts.map +1 -1
  22. package/dist/unknown-record.d.ts +6 -0
  23. package/dist/unknown-record.d.ts.map +1 -0
  24. package/package.json +2 -2
  25. package/src/actor.ts +4 -8
  26. package/src/domain-model.ts +115 -17
  27. package/src/index.ts +21 -8
  28. package/src/launcher-recent-values.ts +6 -11
  29. package/src/number-normalize.ts +11 -0
  30. package/src/repo-locator.ts +2 -6
  31. package/src/semantic-entry-refs.ts +19 -22
  32. package/src/startup-observation.ts +73 -0
  33. package/src/string-normalize.ts +33 -0
  34. package/src/turn-annotations.ts +7 -21
  35. package/src/turn-recovery.ts +18 -8
  36. package/src/turn-start-resolution.ts +11 -25
  37. package/src/unknown-record.ts +16 -0
  38. package/dist/actor.js +0 -62
  39. package/dist/actor.js.map +0 -1
  40. package/dist/domain-model.js +0 -169
  41. package/dist/domain-model.js.map +0 -1
  42. package/dist/launcher-recent-values.js +0 -60
  43. package/dist/launcher-recent-values.js.map +0 -1
  44. package/dist/markdown-normalize.js +0 -14
  45. package/dist/markdown-normalize.js.map +0 -1
  46. package/dist/process-definitions.js +0 -2
  47. package/dist/process-definitions.js.map +0 -1
  48. package/dist/process-model-config.js +0 -68
  49. package/dist/process-model-config.js.map +0 -1
  50. package/dist/process-row-slots.js +0 -45
  51. package/dist/process-row-slots.js.map +0 -1
  52. package/dist/process-state-json.js +0 -102
  53. package/dist/process-state-json.js.map +0 -1
  54. package/dist/repo-locator.js +0 -82
  55. package/dist/repo-locator.js.map +0 -1
  56. package/dist/review-subject.d.ts +0 -9
  57. package/dist/review-subject.d.ts.map +0 -1
  58. package/dist/review-subject.js +0 -18
  59. package/dist/review-subject.js.map +0 -1
  60. package/dist/semantic-entry-refs.js +0 -79
  61. package/dist/semantic-entry-refs.js.map +0 -1
  62. package/dist/string-normalize.js +0 -28
  63. package/dist/string-normalize.js.map +0 -1
  64. package/dist/turn-acceptance.js +0 -2
  65. package/dist/turn-acceptance.js.map +0 -1
  66. package/dist/turn-annotations.js +0 -49
  67. package/dist/turn-annotations.js.map +0 -1
  68. package/dist/turn-recovery.js +0 -70
  69. package/dist/turn-recovery.js.map +0 -1
  70. package/dist/turn-start-resolution.js +0 -97
  71. package/dist/turn-start-resolution.js.map +0 -1
  72. package/src/review-subject.ts +0 -26
package/dist/index.js CHANGED
@@ -1,16 +1,986 @@
1
- export { normalizeActor, parseActorOrSystem, SERIALIZED_SYSTEM_ACTOR, serializeActor, } from "./actor.js";
2
- export { ADMIN_ACTOR, canonicalizeQuestionAnswers, emptyQuestionDrafts, formatPathTypeLabel, isProcessSelectedTurnModelSource, isProcessTurnType, isTurnFailureCode, isWaitingTurnType, isWorkerErrorClass, isWorkerOwnedTurnType, lifecycleStatusForSelectedTurnType, normalizeAskQuestionsInput, PROCESS_SELECTED_TURN_MODEL_SOURCES, PROCESS_TURN_RECORD_PATH_TYPES, PROCESS_TURN_TYPES, SYSTEM_ACTOR, WORKER_ERROR_CLASSES, } from "./domain-model.js";
3
- export { addLauncherRecentValue, DEFAULT_LAUNCHER_RECENT_VALUE_LIMIT, normalizeLauncherRecentValue, normalizeLauncherRecentValues, redactCredentialBearingAbsoluteUrl, } from "./launcher-recent-values.js";
4
- export { normalizeMarkdownLineEndings, normalizeMarkdownText, normalizeOptionalMarkdown, } from "./markdown-normalize.js";
5
- export { normalizeLaunchModelConfigInput, parseStrictInstanceTurnConfigsJson, serializeInstanceTurnConfigs, } from "./process-model-config.js";
6
- export { buildProcessRowSlot, getProcessStatusCategory, sortProcessRows, } from "./process-row-slots.js";
7
- export { parseProcessStateJsonLenient, parseProcessStateJsonStrict, parseProductRefsFromStateJsonLenient, parseProductRefsFromStateJsonStrict, parseProductRefsLenient, parseProductRefsStrict, parseSemanticEntryRefsFromStateJsonLenient, parseSemanticEntryRefsFromStateJsonStrict, parseSemanticEntryRefsLenient, parseSemanticEntryRefsStrict, } from "./process-state-json.js";
8
- export { assertRepoLocator, detectRepoLocatorKind, isRepoLocator, parseRepoLocator, } from "./repo-locator.js";
9
- export { createReviewSubject, isReviewSubjectKind, parseReviewSubject, REVIEW_SUBJECT_KINDS, } from "./review-subject.js";
10
- export { assertValidProcessProductName, createEmptyProcessProductRefs, createEmptyProcessSemanticEntryRefs, isProcessSemanticEntryRefKey, isValidProcessProductName, PROCESS_SEMANTIC_ENTRY_REF_KEYS, parseProcessProductRefs, parseProcessSemanticEntryRefs, parseSemanticEntryRef, } from "./semantic-entry-refs.js";
11
- export { humanizeProcessLabel, normalizeStringArray, trimString, trimToNull, } from "./string-normalize.js";
12
- export { TURN_ACCEPTANCE_STATES } from "./turn-acceptance.js";
13
- export { parseTurnAnnotationReference, parseTurnAnnotationReferences, TURN_ANNOTATION_REFERENCE_KINDS, } from "./turn-annotations.js";
14
- export { buildFailedTurnRecoveryMetadata, CONTINUE_PROMPT_METADATA_KEY, createGenericFailedTurnRecoveryContext, DEFAULT_CONTINUE_PROMPT, FAILED_TURN_RECOVERY_CODES, FAILED_TURN_RECOVERY_METADATA_KEY, isFailedTurnRecoveryCode, normalizeContinuePrompt, readFailedTurnRecoveryContext, } from "./turn-recovery.js";
15
- export { defaultProcessTurnStartSelection, resolveExistingProcessEntryId, resolveProcessProductRefEntryId, resolveProcessSemanticRefEntryId, resolveProcessTurnStartSelection, resolveProcessTurnStartTarget, } from "./turn-start-resolution.js";
1
+ // src/string-normalize.ts
2
+ function toErrorMessage(error) {
3
+ if (error instanceof Error && error.message.trim() !== "") {
4
+ return error.message;
5
+ }
6
+ return String(error);
7
+ }
8
+ function readNonBlankString(value) {
9
+ return typeof value === "string" && value.trim() !== "" ? value : null;
10
+ }
11
+ function trimString(value) {
12
+ return typeof value === "string" ? value.trim() : "";
13
+ }
14
+ function trimToNull(value) {
15
+ const trimmed = trimString(value);
16
+ return trimmed === "" ? null : trimmed;
17
+ }
18
+ function normalizeStringArray(value) {
19
+ if (!Array.isArray(value)) {
20
+ return [];
21
+ }
22
+ return value.map((entry) => trimString(entry)).filter((entry) => entry.length > 0);
23
+ }
24
+ function humanizeProcessLabel(identifier) {
25
+ return trimString(identifier).replace(/[_-]+/g, " ").replace(/\s+/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase()).trim();
26
+ }
27
+ var IDENTIFIER_WORD_LABELS = {
28
+ api: "API",
29
+ id: "ID",
30
+ llm: "LLM",
31
+ mr: "MR",
32
+ pi: "Pi",
33
+ ui: "UI"
34
+ };
35
+ function formatProcessIdentifier(value) {
36
+ return value.split(/[_-]+/).filter((part) => part.length > 0).map((part) => {
37
+ const normalizedPart = part.toLowerCase();
38
+ return IDENTIFIER_WORD_LABELS[normalizedPart] ?? part.charAt(0).toUpperCase() + part.slice(1);
39
+ }).join(" ");
40
+ }
41
+
42
+ // src/domain-model.ts
43
+ var SYSTEM_ACTOR = { id: "system", kind: "system", provider: null };
44
+ var ADMIN_ACTOR = { id: "admin", kind: "user", provider: null };
45
+ function requiredTrimmedString(value, field) {
46
+ const trimmed = trimToNull(value);
47
+ if (!trimmed) {
48
+ throw new Error(`${field} must be a non-empty string`);
49
+ }
50
+ return trimmed;
51
+ }
52
+ function normalizeAskQuestionsInput(value) {
53
+ const questions = value?.questions;
54
+ if (!Array.isArray(questions)) throw new Error("questions must be an array");
55
+ if (questions.length === 0) throw new Error("questions must not be empty");
56
+ return questions.map((candidate, questionIndex) => {
57
+ const question = requiredTrimmedString(
58
+ candidate?.question,
59
+ `questions[${questionIndex}].question`
60
+ );
61
+ if (candidate?.selection !== "single" && candidate?.selection !== "multiple") {
62
+ throw new Error(`questions[${questionIndex}].selection must be 'single' or 'multiple'`);
63
+ }
64
+ if (!Array.isArray(candidate.options) || candidate.options.length === 0) {
65
+ throw new Error(`questions[${questionIndex}].options must not be empty`);
66
+ }
67
+ const labels = /* @__PURE__ */ new Set();
68
+ const questionId = `question_${questionIndex + 1}`;
69
+ const options = candidate.options.map((option, optionIndex) => {
70
+ const label = requiredTrimmedString(
71
+ option?.label,
72
+ `questions[${questionIndex}].options[${optionIndex}].label`
73
+ );
74
+ const key = label.toLocaleLowerCase();
75
+ if (labels.has(key)) {
76
+ throw new Error(`questions[${questionIndex}] contains duplicate option '${label}'`);
77
+ }
78
+ labels.add(key);
79
+ return {
80
+ id: `${questionId}_option_${optionIndex + 1}`,
81
+ label,
82
+ details: trimToNull(option.details)
83
+ };
84
+ });
85
+ return { id: questionId, question, selection: candidate.selection, options };
86
+ });
87
+ }
88
+ function emptyQuestionDrafts(questions) {
89
+ return questions.map(() => ({ selectedOptionIds: [], freeText: "", comment: "" }));
90
+ }
91
+ function normalizeQuestionDrafts(questions, value) {
92
+ if (!Array.isArray(value) || value.length !== questions.length) {
93
+ throw new Error("Every question must have one draft answer in question order");
94
+ }
95
+ return questions.map((question, index) => {
96
+ const answer = value[index];
97
+ if (!Array.isArray(answer?.selectedOptionIds)) {
98
+ throw new Error(`Question ${index + 1} has a malformed selection`);
99
+ }
100
+ const selectedOptionIds = answer.selectedOptionIds.map((id) => {
101
+ if (typeof id !== "string" || !question.options.some((option) => option.id === id)) {
102
+ throw new Error(`Question ${index + 1} contains an unknown selection`);
103
+ }
104
+ return id;
105
+ });
106
+ if (new Set(selectedOptionIds).size !== selectedOptionIds.length) {
107
+ throw new Error(`Question ${index + 1} contains duplicate selections`);
108
+ }
109
+ if (question.selection === "single" && selectedOptionIds.length > 1) {
110
+ throw new Error(`Question ${index + 1} accepts only one selection`);
111
+ }
112
+ if (typeof answer.freeText !== "string" || typeof answer.comment !== "string") {
113
+ throw new Error(`Question ${index + 1} contains malformed text`);
114
+ }
115
+ return { selectedOptionIds, freeText: answer.freeText, comment: answer.comment };
116
+ });
117
+ }
118
+ function canonicalizeQuestionAnswers(questions, value) {
119
+ return normalizeQuestionDrafts(questions, value).map((answer, index) => {
120
+ const question = questions[index];
121
+ if (!question) throw new Error(`Question ${index + 1} is missing`);
122
+ const options = answer.selectedOptionIds.map(
123
+ (id) => question.options.find((option) => option.id === id)?.label ?? ""
124
+ );
125
+ const freeText = answer.freeText.trim();
126
+ const comment = answer.comment.trim();
127
+ if (options.length === 0 && freeText === "") {
128
+ throw new Error(`Question ${index + 1} requires an answer`);
129
+ }
130
+ return [options.join(", "), freeText, comment ? `Context: ${comment}` : ""].filter(Boolean).join("\n");
131
+ });
132
+ }
133
+ var WORKER_ERROR_CLASSES = [
134
+ "llm_error",
135
+ "git_error",
136
+ "pi_crash",
137
+ "pipeline_error",
138
+ "infrastructure",
139
+ "protocol_error",
140
+ "operator_abort"
141
+ ];
142
+ function isWorkerErrorClass(value) {
143
+ return WORKER_ERROR_CLASSES.includes(value);
144
+ }
145
+ function isTurnFailureCode(value) {
146
+ return value === "branch_drift";
147
+ }
148
+ var PROCESS_TURN_TYPES = ["llm", "human", "external", "automatic"];
149
+ function isProcessTurnType(value) {
150
+ return typeof value === "string" && PROCESS_TURN_TYPES.includes(value);
151
+ }
152
+ function isWorkerOwnedTurnType(turnType) {
153
+ return turnType === "llm" || turnType === "automatic";
154
+ }
155
+ function isWaitingTurnType(turnType) {
156
+ return turnType === "human" || turnType === "external";
157
+ }
158
+ function lifecycleStatusForSelectedTurnType(turnType) {
159
+ return isWaitingTurnType(turnType) ? "waiting" : "active";
160
+ }
161
+ var PROCESS_SELECTED_TURN_MODEL_SOURCES = [
162
+ "action_override",
163
+ "launch_override",
164
+ "instance_turn_config",
165
+ "process_config_turn",
166
+ "instance_default",
167
+ "process_config_default",
168
+ "catalog_default",
169
+ "legacy_persisted"
170
+ ];
171
+ function isProcessSelectedTurnModelSource(value) {
172
+ return PROCESS_SELECTED_TURN_MODEL_SOURCES.includes(value);
173
+ }
174
+ var PROCESS_TURN_RECORD_PATH_TYPES = ["primary", "root_branch", "leaf_branch"];
175
+ function formatPathTypeLabel(pathType) {
176
+ switch (pathType) {
177
+ case "primary":
178
+ return "Continuing the main path";
179
+ case "root_branch":
180
+ return "Starting from the beginning";
181
+ case "leaf_branch":
182
+ return "Exploring an alternative";
183
+ default:
184
+ return "Path";
185
+ }
186
+ }
187
+
188
+ // src/actor.ts
189
+ var ACTOR_KINDS = ["user", "channel", "system"];
190
+ function isActorKind(value) {
191
+ return typeof value === "string" && ACTOR_KINDS.includes(value);
192
+ }
193
+ function normalizeActor(value) {
194
+ if (typeof value !== "object" || value === null) {
195
+ return null;
196
+ }
197
+ const candidate = value;
198
+ const id = trimToNull(candidate.id);
199
+ if (!id) {
200
+ return null;
201
+ }
202
+ const kind = isActorKind(candidate.kind) ? candidate.kind : "system";
203
+ const displayName = typeof candidate.displayName === "string" && candidate.displayName.trim() !== "" ? candidate.displayName : void 0;
204
+ return {
205
+ id,
206
+ kind,
207
+ provider: trimToNull(candidate.provider),
208
+ ...displayName !== void 0 ? { displayName } : {}
209
+ };
210
+ }
211
+ function serializeActor(actor) {
212
+ return JSON.stringify({
213
+ id: actor.id,
214
+ kind: actor.kind,
215
+ provider: actor.provider,
216
+ ...actor.displayName !== void 0 ? { displayName: actor.displayName } : {}
217
+ });
218
+ }
219
+ function parseActorOrSystem(value) {
220
+ if (value === null || value === void 0 || value.trim() === "") {
221
+ return SYSTEM_ACTOR;
222
+ }
223
+ try {
224
+ return normalizeActor(JSON.parse(value)) ?? SYSTEM_ACTOR;
225
+ } catch {
226
+ return SYSTEM_ACTOR;
227
+ }
228
+ }
229
+ var SERIALIZED_SYSTEM_ACTOR = serializeActor(SYSTEM_ACTOR);
230
+
231
+ // src/launcher-recent-values.ts
232
+ var DEFAULT_LAUNCHER_RECENT_VALUE_LIMIT = 5;
233
+ function hasCredentialBearingAbsoluteUrl(value) {
234
+ if (!/^[a-z][a-z0-9+.-]*:\/\//i.test(value)) {
235
+ return false;
236
+ }
237
+ try {
238
+ const url = new URL(value);
239
+ return url.protocol !== "file:" && (url.username !== "" || url.password !== "");
240
+ } catch {
241
+ return false;
242
+ }
243
+ }
244
+ function redactCredentialBearingAbsoluteUrl(value) {
245
+ if (!hasCredentialBearingAbsoluteUrl(value)) {
246
+ return value;
247
+ }
248
+ const url = new URL(value);
249
+ url.username = "";
250
+ url.password = "";
251
+ return url.toString();
252
+ }
253
+ function normalizeLauncherRecentValue(value) {
254
+ const normalizedValue = typeof value === "string" ? value.trim() : "";
255
+ if (!normalizedValue || hasCredentialBearingAbsoluteUrl(normalizedValue)) {
256
+ return null;
257
+ }
258
+ return normalizedValue;
259
+ }
260
+ function normalizeLauncherRecentValues(values, limit = DEFAULT_LAUNCHER_RECENT_VALUE_LIMIT) {
261
+ const nextValues = /* @__PURE__ */ new Set();
262
+ for (const value of values) {
263
+ const normalizedValue = normalizeLauncherRecentValue(value);
264
+ if (!normalizedValue || nextValues.has(normalizedValue)) {
265
+ continue;
266
+ }
267
+ nextValues.add(normalizedValue);
268
+ if (nextValues.size >= limit) {
269
+ break;
270
+ }
271
+ }
272
+ return [...nextValues];
273
+ }
274
+ function addLauncherRecentValue(existingValues, value, limit = DEFAULT_LAUNCHER_RECENT_VALUE_LIMIT) {
275
+ const normalizedValue = normalizeLauncherRecentValue(value);
276
+ if (!normalizedValue) {
277
+ return normalizeLauncherRecentValues(existingValues, limit);
278
+ }
279
+ return normalizeLauncherRecentValues([normalizedValue, ...existingValues], limit);
280
+ }
281
+
282
+ // src/markdown-normalize.ts
283
+ function normalizeMarkdownLineEndings(markdown) {
284
+ return markdown.replace(/\r\n?/g, "\n");
285
+ }
286
+ function normalizeMarkdownText(markdown) {
287
+ return normalizeMarkdownLineEndings(markdown).trim();
288
+ }
289
+ function normalizeOptionalMarkdown(value) {
290
+ if (typeof value !== "string") {
291
+ return null;
292
+ }
293
+ const normalized = normalizeMarkdownText(value);
294
+ return normalized === "" ? null : normalized;
295
+ }
296
+
297
+ // src/number-normalize.ts
298
+ function readFiniteNumber(value) {
299
+ if (typeof value === "number" && Number.isFinite(value)) {
300
+ return value;
301
+ }
302
+ if (typeof value === "string" && value.trim() !== "") {
303
+ const parsed = Number(value);
304
+ return Number.isFinite(parsed) ? parsed : null;
305
+ }
306
+ return null;
307
+ }
308
+
309
+ // src/process-model-config.ts
310
+ import * as v from "valibot";
311
+ var jsonObjectSchema = v.custom(
312
+ (value) => typeof value === "object" && value !== null && !Array.isArray(value),
313
+ "Expected object"
314
+ );
315
+ var instanceTurnConfigSchema = v.pipe(
316
+ jsonObjectSchema,
317
+ v.object({
318
+ modelProfileId: v.optional(v.unknown())
319
+ })
320
+ );
321
+ var strictInstanceTurnConfigsJsonSchema = v.pipe(
322
+ v.string(),
323
+ v.parseJson(),
324
+ jsonObjectSchema,
325
+ v.record(v.string(), instanceTurnConfigSchema)
326
+ );
327
+ function normalizeInstanceTurnConfigs(turnConfigs) {
328
+ const next = {};
329
+ for (const [turnId, turnConfig] of Object.entries(turnConfigs)) {
330
+ const modelProfileId = trimToNull(turnConfig.modelProfileId);
331
+ next[turnId] = modelProfileId ? { modelProfileId } : {};
332
+ }
333
+ return next;
334
+ }
335
+ function getFirstIssuePathKey(issue) {
336
+ const pathItem = issue.path?.[0];
337
+ return typeof pathItem?.key === "string" ? pathItem.key : void 0;
338
+ }
339
+ function parseStrictInstanceTurnConfigsJson(processId, turnConfigsJson) {
340
+ if (!turnConfigsJson) return { ok: true, value: {} };
341
+ const result = v.safeParse(strictInstanceTurnConfigsJsonSchema, turnConfigsJson, {
342
+ abortEarly: true
343
+ });
344
+ if (!result.success) {
345
+ const issue = result.issues[0];
346
+ if (issue?.type === "parse_json") {
347
+ return {
348
+ ok: false,
349
+ error: { code: "invalid_turn_configs_json", processId, reason: "invalid_json" }
350
+ };
351
+ }
352
+ const turnId = issue ? getFirstIssuePathKey(issue) : void 0;
353
+ return {
354
+ ok: false,
355
+ error: {
356
+ code: "invalid_turn_configs_json",
357
+ processId,
358
+ reason: turnId !== void 0 ? "turn_config_not_object" : "not_object",
359
+ ...turnId !== void 0 ? { turnId } : {}
360
+ }
361
+ };
362
+ }
363
+ return { ok: true, value: normalizeInstanceTurnConfigs(result.output) };
364
+ }
365
+ function serializeInstanceTurnConfigs(turnConfigs) {
366
+ const normalizedEntries = Object.entries(turnConfigs).map(([turnId, turnConfig]) => {
367
+ const modelProfileId = trimToNull(turnConfig.modelProfileId);
368
+ return [turnId, modelProfileId ? { modelProfileId } : {}];
369
+ }).filter(([, turnConfig]) => Object.keys(turnConfig).length > 0);
370
+ return normalizedEntries.length === 0 ? null : JSON.stringify(Object.fromEntries(normalizedEntries));
371
+ }
372
+ function normalizeLaunchModelConfigInput(input) {
373
+ const defaultModelProfileId = trimToNull(input.defaultModelProfileId);
374
+ const nextTurnConfigs = {};
375
+ for (const [turnId, turnConfig] of Object.entries(input.turnConfigs ?? {})) {
376
+ const modelProfileId = trimToNull(turnConfig.modelProfileId);
377
+ if (modelProfileId) nextTurnConfigs[turnId] = { modelProfileId };
378
+ }
379
+ return { defaultModelProfileId, turnConfigs: nextTurnConfigs };
380
+ }
381
+
382
+ // src/process-row-slots.ts
383
+ function getProcessStatusCategory(lifecycleStatus) {
384
+ if (lifecycleStatus === "error") return "error";
385
+ if (lifecycleStatus === "active") return "active";
386
+ if (lifecycleStatus === "waiting") return "waiting";
387
+ if (lifecycleStatus === "completed" || lifecycleStatus === "aborted") return "terminal";
388
+ return "discovered";
389
+ }
390
+ function buildProcessRowSlot(process, projects) {
391
+ const externalLinkCount = projects.filter((p) => p.externalId !== null).length;
392
+ const title = process.title ?? process.externalId ?? process.id;
393
+ const subtitle = `${process.processId} \xB7 ${projects.length} component${projects.length !== 1 ? "s" : ""}`;
394
+ return {
395
+ instanceId: process.id,
396
+ processId: process.processId,
397
+ title,
398
+ subtitle,
399
+ selectedTurnId: process.selectedTurnId,
400
+ lifecycleStatus: process.lifecycleStatus,
401
+ statusCategory: getProcessStatusCategory(process.lifecycleStatus),
402
+ projectCount: projects.length,
403
+ externalId: process.externalId,
404
+ externalLinkCount
405
+ };
406
+ }
407
+ function sortProcessRows(rows) {
408
+ const categoryOrder = {
409
+ error: 0,
410
+ active: 1,
411
+ waiting: 2,
412
+ discovered: 3,
413
+ terminal: 4
414
+ };
415
+ return [...rows].sort((a, b) => {
416
+ const catA = categoryOrder[a.statusCategory] ?? 4;
417
+ const catB = categoryOrder[b.statusCategory] ?? 4;
418
+ if (catA !== catB) return catA - catB;
419
+ return a.title.localeCompare(b.title);
420
+ });
421
+ }
422
+
423
+ // src/unknown-record.ts
424
+ import * as v2 from "valibot";
425
+ var copiedUnknownRecordSchema = v2.pipe(
426
+ v2.unknown(),
427
+ v2.check(isUnknownRecord, "Expected object"),
428
+ v2.record(v2.string(), v2.unknown())
429
+ );
430
+ function isUnknownRecord(value) {
431
+ return typeof value === "object" && value !== null && !Array.isArray(value);
432
+ }
433
+ function asUnknownRecord(value) {
434
+ return isUnknownRecord(value) ? value : null;
435
+ }
436
+
437
+ // src/semantic-entry-refs.ts
438
+ var PROCESS_SEMANTIC_ENTRY_REF_KEYS = [
439
+ "plan",
440
+ "review",
441
+ "currentPrimaryPathLeaf",
442
+ "rootEntry"
443
+ ];
444
+ function areSemanticEntryRefsEqual(left, right) {
445
+ return (left?.entryId ?? null) === (right?.entryId ?? null) && (left?.turnRecordId ?? null) === (right?.turnRecordId ?? null);
446
+ }
447
+ var PRODUCT_NAME_PATTERN = /^[a-z][a-z0-9-]*$/;
448
+ function isValidProcessProductName(value) {
449
+ return PRODUCT_NAME_PATTERN.test(value);
450
+ }
451
+ function assertValidProcessProductName(value) {
452
+ if (!isValidProcessProductName(value)) {
453
+ throw new Error(
454
+ `Invalid process product name '${value}'. Product names must match ${PRODUCT_NAME_PATTERN.source}`
455
+ );
456
+ }
457
+ }
458
+ function isProcessSemanticEntryRefKey(value) {
459
+ return PROCESS_SEMANTIC_ENTRY_REF_KEYS.includes(value);
460
+ }
461
+ function parseSemanticEntryRef(value) {
462
+ const record3 = asUnknownRecord(value);
463
+ const entryId = trimToNull(record3?.entryId);
464
+ if (!entryId) {
465
+ return null;
466
+ }
467
+ return {
468
+ entryId,
469
+ turnRecordId: trimToNull(record3?.turnRecordId)
470
+ };
471
+ }
472
+ function createEmptyProcessSemanticEntryRefs() {
473
+ return {
474
+ plan: null,
475
+ review: null,
476
+ currentPrimaryPathLeaf: null,
477
+ rootEntry: null
478
+ };
479
+ }
480
+ function createEmptyProcessProductRefs() {
481
+ return {};
482
+ }
483
+ function parseProcessProductRefs(value) {
484
+ if (!isUnknownRecord(value)) return createEmptyProcessProductRefs();
485
+ const refs = {};
486
+ for (const [name, rawRef] of Object.entries(value)) {
487
+ if (!isValidProcessProductName(name)) {
488
+ continue;
489
+ }
490
+ const ref = parseSemanticEntryRef(rawRef);
491
+ if (ref) {
492
+ refs[name] = ref;
493
+ }
494
+ }
495
+ return refs;
496
+ }
497
+ function parseProcessSemanticEntryRefs(value) {
498
+ const record3 = asUnknownRecord(value) ?? {};
499
+ return {
500
+ plan: parseSemanticEntryRef(record3.plan),
501
+ review: parseSemanticEntryRef(record3.review),
502
+ currentPrimaryPathLeaf: parseSemanticEntryRef(record3.currentPrimaryPathLeaf),
503
+ rootEntry: parseSemanticEntryRef(record3.rootEntry)
504
+ };
505
+ }
506
+
507
+ // src/process-state-json.ts
508
+ function formatMalformedSubject(defaultLabel, context) {
509
+ if (typeof context === "string") {
510
+ return context;
511
+ }
512
+ const label = context?.label ?? defaultLabel;
513
+ return context?.processId ? `${label} for process '${context.processId}'` : label;
514
+ }
515
+ function parseProcessStateJsonStrict(stateJson, context) {
516
+ if (!stateJson) {
517
+ return {};
518
+ }
519
+ const subject = formatMalformedSubject("stateJson", context);
520
+ let parsed;
521
+ try {
522
+ parsed = JSON.parse(stateJson);
523
+ } catch (error) {
524
+ throw new Error(
525
+ `Malformed ${subject}: ${error instanceof Error ? error.message : String(error)}`
526
+ );
527
+ }
528
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
529
+ throw new Error(`Malformed ${subject}: expected a JSON object`);
530
+ }
531
+ return parsed;
532
+ }
533
+ function parseProcessStateJsonLenient(stateJson) {
534
+ try {
535
+ return parseProcessStateJsonStrict(stateJson);
536
+ } catch {
537
+ return {};
538
+ }
539
+ }
540
+ function parseSemanticEntryRefsStrict(value, context) {
541
+ if (value === void 0) {
542
+ return createEmptyProcessSemanticEntryRefs();
543
+ }
544
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
545
+ throw new Error(
546
+ `Malformed ${formatMalformedSubject("semanticEntryRefs", {
547
+ label: "semanticEntryRefs",
548
+ processId: context?.processId
549
+ })}: expected an object when present`
550
+ );
551
+ }
552
+ return parseProcessSemanticEntryRefs(value);
553
+ }
554
+ function parseSemanticEntryRefsLenient(value) {
555
+ try {
556
+ return parseSemanticEntryRefsStrict(value);
557
+ } catch {
558
+ return createEmptyProcessSemanticEntryRefs();
559
+ }
560
+ }
561
+ function parseProductRefsStrict(value, context) {
562
+ if (value === void 0) {
563
+ return createEmptyProcessProductRefs();
564
+ }
565
+ const subject = formatMalformedSubject("productRefs", {
566
+ label: "productRefs",
567
+ processId: context?.processId
568
+ });
569
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
570
+ throw new Error(`Malformed ${subject}: expected an object when present`);
571
+ }
572
+ const refs = {};
573
+ for (const [name, rawRef] of Object.entries(value)) {
574
+ if (!isValidProcessProductName(name)) {
575
+ throw new Error(`Malformed ${subject}: invalid product name '${name}'`);
576
+ }
577
+ const ref = parseSemanticEntryRef(rawRef);
578
+ if (!ref) {
579
+ throw new Error(`Malformed ${subject}: product '${name}' must reference an entry`);
580
+ }
581
+ refs[name] = ref;
582
+ }
583
+ return refs;
584
+ }
585
+ function parseProductRefsLenient(value) {
586
+ try {
587
+ return parseProductRefsStrict(value);
588
+ } catch {
589
+ return createEmptyProcessProductRefs();
590
+ }
591
+ }
592
+ function parseSemanticEntryRefsFromStateJsonStrict(stateJson, context) {
593
+ const stateRecord = parseProcessStateJsonStrict(stateJson, context);
594
+ return parseSemanticEntryRefsStrict(
595
+ stateRecord.semanticEntryRefs,
596
+ typeof context === "string" ? void 0 : context
597
+ );
598
+ }
599
+ function parseSemanticEntryRefsFromStateJsonLenient(stateJson) {
600
+ const stateRecord = parseProcessStateJsonLenient(stateJson);
601
+ return parseSemanticEntryRefsLenient(stateRecord.semanticEntryRefs);
602
+ }
603
+ function parseProductRefsFromStateJsonStrict(stateJson, context) {
604
+ const stateRecord = parseProcessStateJsonStrict(stateJson, context);
605
+ return parseProductRefsStrict(
606
+ stateRecord.productRefs,
607
+ typeof context === "string" ? void 0 : context
608
+ );
609
+ }
610
+ function parseProductRefsFromStateJsonLenient(stateJson) {
611
+ const stateRecord = parseProcessStateJsonLenient(stateJson);
612
+ return parseProductRefsLenient(stateRecord.productRefs);
613
+ }
614
+
615
+ // src/repo-locator.ts
616
+ function isFileUrl(value) {
617
+ try {
618
+ const url = new URL(value);
619
+ if (url.protocol !== "file:") {
620
+ return false;
621
+ }
622
+ return (url.hostname === "" || url.hostname === "localhost") && url.pathname.startsWith("/") && decodeURIComponent(url.pathname).length > 1;
623
+ } catch {
624
+ return false;
625
+ }
626
+ }
627
+ function isLocalFilesystemPath(value) {
628
+ return value.startsWith("/") || value.startsWith("./") || value.startsWith("../") || value.startsWith("~/") || isFileUrl(value);
629
+ }
630
+ var scpLikeGitUrlPattern = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+:[^\s]+$/;
631
+ var explicitRemoteGitUrlPattern = /^(?:https?|ssh|git):\/\//;
632
+ function hasRepositoryPath(pathname) {
633
+ return pathname.split("/").filter(Boolean).length >= 1;
634
+ }
635
+ function isRemoteGitUrl(value) {
636
+ if (scpLikeGitUrlPattern.test(value)) {
637
+ const path = value.slice(value.indexOf(":") + 1);
638
+ return hasRepositoryPath(path);
639
+ }
640
+ if (!explicitRemoteGitUrlPattern.test(value)) {
641
+ return false;
642
+ }
643
+ try {
644
+ const url = new URL(value);
645
+ return ["http:", "https:", "ssh:", "git:"].includes(url.protocol) && !!url.hostname && hasRepositoryPath(url.pathname);
646
+ } catch {
647
+ return false;
648
+ }
649
+ }
650
+ function detectRepoLocatorKind(value) {
651
+ const trimmed = value.trim();
652
+ if (trimmed.length === 0) {
653
+ return null;
654
+ }
655
+ if (isLocalFilesystemPath(trimmed)) {
656
+ return "local_path";
657
+ }
658
+ if (isRemoteGitUrl(trimmed)) {
659
+ return "remote_url";
660
+ }
661
+ return null;
662
+ }
663
+ function parseRepoLocator(value) {
664
+ if (typeof value !== "string") {
665
+ return null;
666
+ }
667
+ const trimmed = value.trim();
668
+ const kind = detectRepoLocatorKind(trimmed);
669
+ if (!kind) {
670
+ return null;
671
+ }
672
+ return { kind, value: trimmed };
673
+ }
674
+ function isRepoLocator(value) {
675
+ return parseRepoLocator(value) !== null;
676
+ }
677
+ function assertRepoLocator(value, fieldName = "repoLocator") {
678
+ const parsed = parseRepoLocator(value);
679
+ if (!parsed) {
680
+ throw new Error(`${fieldName} must be a remote URL or local filesystem path`);
681
+ }
682
+ return parsed.value;
683
+ }
684
+
685
+ // src/startup-observation.ts
686
+ function startupInterval(start, end, clock = "server") {
687
+ const delta = start && end ? Date.parse(end) - Date.parse(start) : NaN;
688
+ const status = !start || !end ? "missing" : !Number.isFinite(delta) || delta < 0 ? "invalid_order" : "available";
689
+ return {
690
+ start: start ?? null,
691
+ end: end ?? null,
692
+ durationMs: status === "available" ? delta : null,
693
+ status,
694
+ clock
695
+ };
696
+ }
697
+
698
+ // src/turn-acceptance.ts
699
+ var TURN_ACCEPTANCE_STATES = ["accepted", "requires_changes", "neutral"];
700
+
701
+ // src/turn-annotations.ts
702
+ var TURN_ANNOTATION_REFERENCE_KINDS = [
703
+ "turn_record",
704
+ "entry",
705
+ "semantic_entry_ref"
706
+ ];
707
+ function parseTurnAnnotationReference(value) {
708
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
709
+ return null;
710
+ }
711
+ const record3 = value;
712
+ const kind = trimToNull(record3.kind);
713
+ const role = trimToNull(record3.role);
714
+ if (kind === "turn_record") {
715
+ const turnRecordId = trimToNull(record3.turnRecordId);
716
+ return turnRecordId ? { kind, turnRecordId, role } : null;
717
+ }
718
+ if (kind === "entry") {
719
+ const entryId = trimToNull(record3.entryId);
720
+ return entryId ? { kind, entryId, role } : null;
721
+ }
722
+ if (kind === "semantic_entry_ref") {
723
+ const ref = trimToNull(record3.ref);
724
+ return ref && isProcessSemanticEntryRefKey(ref) ? { kind, ref, role } : null;
725
+ }
726
+ return null;
727
+ }
728
+ function parseTurnAnnotationReferences(value) {
729
+ if (!Array.isArray(value)) {
730
+ return [];
731
+ }
732
+ return value.map(parseTurnAnnotationReference).filter((reference) => reference !== null);
733
+ }
734
+
735
+ // src/turn-recovery.ts
736
+ var DEFAULT_CONTINUE_PROMPT = "continue";
737
+ var FAILED_TURN_RECOVERY_CODES = [
738
+ "generic_continue",
739
+ "missing_outcome_tool",
740
+ "missing_markdown_result",
741
+ "missing_required_tool_calls"
742
+ ];
743
+ var FAILED_TURN_RECOVERY_METADATA_KEY = "failedTurnRecovery";
744
+ var CONTINUE_PROMPT_METADATA_KEY = "continuePrompt";
745
+ var TERMINAL_OUTCOME_RECORDING_FAILURE_PREFIX = "Server could not durably record worker turn outcome:";
746
+ function isFailedTurnRecoveryCode(value) {
747
+ return FAILED_TURN_RECOVERY_CODES.includes(value);
748
+ }
749
+ function normalizeUniqueStringArray(value) {
750
+ const normalized = normalizeStringArray(value);
751
+ return normalized.length > 0 ? [...new Set(normalized)] : void 0;
752
+ }
753
+ function createGenericFailedTurnRecoveryContext(overrides = {}) {
754
+ return {
755
+ strategy: "continue",
756
+ suggestedContinuePrompt: DEFAULT_CONTINUE_PROMPT,
757
+ failureCode: "generic_continue",
758
+ ...overrides
759
+ };
760
+ }
761
+ function inferTerminalRecordingFailedTurnRecoveryContext(input) {
762
+ if (input.errorClass !== "infrastructure" || !input.errorSummary?.startsWith(TERMINAL_OUTCOME_RECORDING_FAILURE_PREFIX)) {
763
+ return null;
764
+ }
765
+ return createGenericFailedTurnRecoveryContext();
766
+ }
767
+ function buildFailedTurnRecoveryMetadata(turnRecordId, context = {}) {
768
+ return {
769
+ [FAILED_TURN_RECOVERY_METADATA_KEY]: {
770
+ turnRecordId,
771
+ ...createGenericFailedTurnRecoveryContext(context)
772
+ }
773
+ };
774
+ }
775
+ function readFailedTurnRecoveryContext(metadata, expectedTurnRecordId) {
776
+ if (!metadata) {
777
+ return null;
778
+ }
779
+ const raw = metadata[FAILED_TURN_RECOVERY_METADATA_KEY];
780
+ if (!isUnknownRecord(raw)) {
781
+ return null;
782
+ }
783
+ if (expectedTurnRecordId) {
784
+ const turnRecordId = trimToNull(raw.turnRecordId);
785
+ if (turnRecordId !== expectedTurnRecordId) {
786
+ return null;
787
+ }
788
+ }
789
+ if (raw.strategy !== "continue") {
790
+ return null;
791
+ }
792
+ const suggestedContinuePrompt = trimToNull(raw.suggestedContinuePrompt);
793
+ const failureCode = trimToNull(raw.failureCode);
794
+ if (!suggestedContinuePrompt || !failureCode || !isFailedTurnRecoveryCode(failureCode)) {
795
+ return null;
796
+ }
797
+ const missingToolNames = normalizeUniqueStringArray(raw.missingToolNames);
798
+ return {
799
+ strategy: "continue",
800
+ suggestedContinuePrompt,
801
+ failureCode,
802
+ ...missingToolNames ? { missingToolNames } : {}
803
+ };
804
+ }
805
+
806
+ // src/turn-start-resolution.ts
807
+ function defaultProcessTurnStartSelection(branchType) {
808
+ switch (branchType) {
809
+ case "primary":
810
+ case "leaf_branch":
811
+ return { kind: "current_leaf" };
812
+ case "root_branch":
813
+ return { kind: "session_root" };
814
+ }
815
+ }
816
+ function resolveProcessTurnStartSelection(input) {
817
+ return input.startFrom ?? defaultProcessTurnStartSelection(input.branchType);
818
+ }
819
+ function resolveExistingProcessEntryId(entryId, entryExists) {
820
+ if (!entryId) {
821
+ return null;
822
+ }
823
+ return entryExists && !entryExists(entryId) ? null : entryId;
824
+ }
825
+ function resolveProcessSemanticRefEntryId(input) {
826
+ const fromState = resolveExistingProcessEntryId(
827
+ input.semanticEntryRefs?.[input.ref]?.entryId ?? null,
828
+ input.entryExists
829
+ );
830
+ if (fromState) {
831
+ return fromState;
832
+ }
833
+ if (input.ref === "currentPrimaryPathLeaf") {
834
+ return resolveExistingProcessEntryId(input.currentLeafId, input.entryExists);
835
+ }
836
+ if (input.ref === "rootEntry") {
837
+ return resolveExistingProcessEntryId(input.rootEntryId, input.entryExists);
838
+ }
839
+ return null;
840
+ }
841
+ function resolveProcessProductRefEntryId(input) {
842
+ const productName = input.productName.trim();
843
+ if (!productName) {
844
+ return null;
845
+ }
846
+ return resolveExistingProcessEntryId(
847
+ input.productRefs?.[productName]?.entryId ?? null,
848
+ input.entryExists
849
+ );
850
+ }
851
+ function resolveProcessTurnStartTarget(input) {
852
+ switch (input.selection.kind) {
853
+ case "current_leaf": {
854
+ return {
855
+ forkPiEntryId: resolveExistingProcessEntryId(input.currentLeafId, input.entryExists),
856
+ startTarget: { kind: "current_leaf" }
857
+ };
858
+ }
859
+ case "session_root": {
860
+ return {
861
+ forkPiEntryId: null,
862
+ startTarget: { kind: "root" }
863
+ };
864
+ }
865
+ case "entry": {
866
+ return {
867
+ forkPiEntryId: input.selection.entryId,
868
+ startTarget: { kind: "entry", entryId: input.selection.entryId }
869
+ };
870
+ }
871
+ case "semantic_ref":
872
+ case "product_ref": {
873
+ const entryId = input.selection.kind === "semantic_ref" ? resolveProcessSemanticRefEntryId({
874
+ ...input,
875
+ ref: input.selection.ref
876
+ }) : resolveProcessProductRefEntryId({
877
+ ...input,
878
+ productName: input.selection.productName
879
+ });
880
+ if (entryId) {
881
+ return {
882
+ forkPiEntryId: entryId,
883
+ startTarget: { kind: "entry", entryId }
884
+ };
885
+ }
886
+ return resolveProcessTurnStartTarget({
887
+ ...input,
888
+ selection: input.selection.fallback ?? defaultProcessTurnStartSelection(input.branchType)
889
+ });
890
+ }
891
+ }
892
+ }
893
+ export {
894
+ ADMIN_ACTOR,
895
+ CONTINUE_PROMPT_METADATA_KEY,
896
+ DEFAULT_CONTINUE_PROMPT,
897
+ DEFAULT_LAUNCHER_RECENT_VALUE_LIMIT,
898
+ FAILED_TURN_RECOVERY_CODES,
899
+ FAILED_TURN_RECOVERY_METADATA_KEY,
900
+ PROCESS_SELECTED_TURN_MODEL_SOURCES,
901
+ PROCESS_SEMANTIC_ENTRY_REF_KEYS,
902
+ PROCESS_TURN_RECORD_PATH_TYPES,
903
+ PROCESS_TURN_TYPES,
904
+ SERIALIZED_SYSTEM_ACTOR,
905
+ SYSTEM_ACTOR,
906
+ TURN_ACCEPTANCE_STATES,
907
+ TURN_ANNOTATION_REFERENCE_KINDS,
908
+ WORKER_ERROR_CLASSES,
909
+ addLauncherRecentValue,
910
+ areSemanticEntryRefsEqual,
911
+ asUnknownRecord,
912
+ assertRepoLocator,
913
+ assertValidProcessProductName,
914
+ buildFailedTurnRecoveryMetadata,
915
+ buildProcessRowSlot,
916
+ canonicalizeQuestionAnswers,
917
+ copiedUnknownRecordSchema,
918
+ createEmptyProcessProductRefs,
919
+ createEmptyProcessSemanticEntryRefs,
920
+ createGenericFailedTurnRecoveryContext,
921
+ defaultProcessTurnStartSelection,
922
+ detectRepoLocatorKind,
923
+ emptyQuestionDrafts,
924
+ formatPathTypeLabel,
925
+ formatProcessIdentifier,
926
+ getProcessStatusCategory,
927
+ humanizeProcessLabel,
928
+ inferTerminalRecordingFailedTurnRecoveryContext,
929
+ isFailedTurnRecoveryCode,
930
+ isProcessSelectedTurnModelSource,
931
+ isProcessSemanticEntryRefKey,
932
+ isProcessTurnType,
933
+ isRepoLocator,
934
+ isTurnFailureCode,
935
+ isUnknownRecord,
936
+ isValidProcessProductName,
937
+ isWaitingTurnType,
938
+ isWorkerErrorClass,
939
+ isWorkerOwnedTurnType,
940
+ lifecycleStatusForSelectedTurnType,
941
+ normalizeActor,
942
+ normalizeAskQuestionsInput,
943
+ trimToNull as normalizeContinuePrompt,
944
+ normalizeLaunchModelConfigInput,
945
+ normalizeLauncherRecentValue,
946
+ normalizeLauncherRecentValues,
947
+ normalizeMarkdownLineEndings,
948
+ normalizeMarkdownText,
949
+ normalizeOptionalMarkdown,
950
+ normalizeStringArray,
951
+ parseActorOrSystem,
952
+ parseProcessProductRefs,
953
+ parseProcessSemanticEntryRefs,
954
+ parseProcessStateJsonLenient,
955
+ parseProcessStateJsonStrict,
956
+ parseProductRefsFromStateJsonLenient,
957
+ parseProductRefsFromStateJsonStrict,
958
+ parseProductRefsLenient,
959
+ parseProductRefsStrict,
960
+ parseRepoLocator,
961
+ parseSemanticEntryRef,
962
+ parseSemanticEntryRefsFromStateJsonLenient,
963
+ parseSemanticEntryRefsFromStateJsonStrict,
964
+ parseSemanticEntryRefsLenient,
965
+ parseSemanticEntryRefsStrict,
966
+ parseStrictInstanceTurnConfigsJson,
967
+ parseTurnAnnotationReference,
968
+ parseTurnAnnotationReferences,
969
+ readFailedTurnRecoveryContext,
970
+ readFiniteNumber,
971
+ readNonBlankString,
972
+ redactCredentialBearingAbsoluteUrl,
973
+ resolveExistingProcessEntryId,
974
+ resolveProcessProductRefEntryId,
975
+ resolveProcessSemanticRefEntryId,
976
+ resolveProcessTurnStartSelection,
977
+ resolveProcessTurnStartTarget,
978
+ serializeActor,
979
+ serializeInstanceTurnConfigs,
980
+ sortProcessRows,
981
+ startupInterval,
982
+ toErrorMessage,
983
+ trimString,
984
+ trimToNull
985
+ };
16
986
  //# sourceMappingURL=index.js.map