@tryarcanist/cli 0.1.267 → 0.1.268
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/index.js +57 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8564,6 +8564,43 @@ function noChangeOutcomeCopy(reason) {
|
|
|
8564
8564
|
}
|
|
8565
8565
|
}
|
|
8566
8566
|
|
|
8567
|
+
// ../../shared/onboarding/events.ts
|
|
8568
|
+
var ONBOARDING_STAGES = [
|
|
8569
|
+
"repo_scan_started",
|
|
8570
|
+
"stack_detected",
|
|
8571
|
+
"dependencies_resolved",
|
|
8572
|
+
"setup_authored",
|
|
8573
|
+
"runtime_profile_authored",
|
|
8574
|
+
"boot_attempt_started",
|
|
8575
|
+
"boot_verified",
|
|
8576
|
+
"environment_saved",
|
|
8577
|
+
"build_started",
|
|
8578
|
+
"smoke_started",
|
|
8579
|
+
"smoke_passed",
|
|
8580
|
+
"smoke_failed",
|
|
8581
|
+
"escalated_to_engineer",
|
|
8582
|
+
"engineer_unblocked",
|
|
8583
|
+
"completed",
|
|
8584
|
+
"failed"
|
|
8585
|
+
];
|
|
8586
|
+
var ONBOARDING_STAGE_STATUSES = ["started", "succeeded", "failed"];
|
|
8587
|
+
var ONBOARDING_STAGE_DETAIL_MAX_CHARS = 200;
|
|
8588
|
+
function isOnboardingStage(value) {
|
|
8589
|
+
return typeof value === "string" && ONBOARDING_STAGES.includes(value);
|
|
8590
|
+
}
|
|
8591
|
+
function isOnboardingStageStatus(value) {
|
|
8592
|
+
return typeof value === "string" && ONBOARDING_STAGE_STATUSES.includes(value);
|
|
8593
|
+
}
|
|
8594
|
+
function parseOnboardingStageEvent(input) {
|
|
8595
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) return null;
|
|
8596
|
+
const record = input;
|
|
8597
|
+
if (!isOnboardingStage(record.stage)) return null;
|
|
8598
|
+
const status = isOnboardingStageStatus(record.status) ? record.status : "started";
|
|
8599
|
+
const rawDetail = typeof record.detail === "string" ? record.detail.trim() : "";
|
|
8600
|
+
const detail = rawDetail.slice(0, ONBOARDING_STAGE_DETAIL_MAX_CHARS);
|
|
8601
|
+
return { stage: record.stage, status, ...detail ? { detail } : {} };
|
|
8602
|
+
}
|
|
8603
|
+
|
|
8567
8604
|
// ../../shared/utils/type-guards.ts
|
|
8568
8605
|
function isRecord(value) {
|
|
8569
8606
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
@@ -9260,6 +9297,19 @@ function applyTodoUpdate(data, state) {
|
|
|
9260
9297
|
}
|
|
9261
9298
|
}
|
|
9262
9299
|
}
|
|
9300
|
+
function projectOnboardingStatus(data, state) {
|
|
9301
|
+
const parsed = parseOnboardingStageEvent(data);
|
|
9302
|
+
if (!parsed) return;
|
|
9303
|
+
const promptId = resolvePromptId(data);
|
|
9304
|
+
state.merged.push({
|
|
9305
|
+
type: "onboarding_status",
|
|
9306
|
+
id: `onboarding_status:${state.merged.length}`,
|
|
9307
|
+
stage: parsed.stage,
|
|
9308
|
+
status: parsed.status,
|
|
9309
|
+
...parsed.detail ? { detail: parsed.detail } : {},
|
|
9310
|
+
...promptId ? { promptId } : {}
|
|
9311
|
+
});
|
|
9312
|
+
}
|
|
9263
9313
|
function projectNarration(data, state) {
|
|
9264
9314
|
const text = typeof data?.text === "string" ? data.text.trim() : "";
|
|
9265
9315
|
if (!text) return;
|
|
@@ -9350,6 +9400,9 @@ function flattenSessionEvents(raw) {
|
|
|
9350
9400
|
case "narration":
|
|
9351
9401
|
projectNarration(data, state);
|
|
9352
9402
|
break;
|
|
9403
|
+
case "onboarding_status":
|
|
9404
|
+
projectOnboardingStatus(data, state);
|
|
9405
|
+
break;
|
|
9353
9406
|
}
|
|
9354
9407
|
}
|
|
9355
9408
|
return suppressMalformedSearchSegments(state);
|
|
@@ -9715,6 +9768,10 @@ ${event.answer ? `**Answer:** ${event.answer}
|
|
|
9715
9768
|
`;
|
|
9716
9769
|
case "narration":
|
|
9717
9770
|
return `*[Currently: ${event.text}]*
|
|
9771
|
+
`;
|
|
9772
|
+
// `detail` is staff-only; this transcript is customer-readable through the export route.
|
|
9773
|
+
case "onboarding_status":
|
|
9774
|
+
return `*[${event.stage}: ${event.status}]*
|
|
9718
9775
|
`;
|
|
9719
9776
|
case "raw_agent_runtime":
|
|
9720
9777
|
return "";
|