@cleocode/cleo 2026.5.100 → 2026.5.101
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/cli/index.js +51 -316
- package/dist/cli/index.js.map +2 -2
- package/package.json +11 -12
package/dist/cli/index.js
CHANGED
|
@@ -14606,7 +14606,7 @@ var init_job_manager_accessor = __esm({
|
|
|
14606
14606
|
});
|
|
14607
14607
|
|
|
14608
14608
|
// packages/cleo/src/cli/paths.ts
|
|
14609
|
-
var CLEO_DIR_NAME, AGENTS_SUBDIR, CANT_AGENTS_SUBDIR, WORKFLOWS_SUBDIR, TEMPLATES_SUBDIR, RESTORE_IMPORTED_SUBDIR, TASKS_DB_FILENAME, BRAIN_DB_FILENAME, CONDUIT_DB_FILENAME, NEXUS_DB_FILENAME, SIGNALDOCK_DB_FILENAME, CONFIG_JSON, PROJECT_INFO_JSON, PROJECT_CONTEXT_JSON, RESTORE_CONFLICTS_MD, MIGRATE_MEMORY_HASHES_JSON, CLEO_INJECTION_MD, CLI_PROJECT_BACKUP_FILES, CLI_GLOBAL_BACKUP_FILES,
|
|
14609
|
+
var CLEO_DIR_NAME, AGENTS_SUBDIR, CANT_AGENTS_SUBDIR, WORKFLOWS_SUBDIR, TEMPLATES_SUBDIR, RESTORE_IMPORTED_SUBDIR, TASKS_DB_FILENAME, BRAIN_DB_FILENAME, CONDUIT_DB_FILENAME, NEXUS_DB_FILENAME, SIGNALDOCK_DB_FILENAME, CONFIG_JSON, PROJECT_INFO_JSON, PROJECT_CONTEXT_JSON, RESTORE_CONFLICTS_MD, MIGRATE_MEMORY_HASHES_JSON, CLEO_INJECTION_MD, CLI_PROJECT_BACKUP_FILES, CLI_GLOBAL_BACKUP_FILES, RESTORE_DEFAULT_FILE;
|
|
14610
14610
|
var init_paths = __esm({
|
|
14611
14611
|
"packages/cleo/src/cli/paths.ts"() {
|
|
14612
14612
|
"use strict";
|
|
@@ -14636,11 +14636,6 @@ var init_paths = __esm({
|
|
|
14636
14636
|
`${CLEO_DIR_NAME}/${PROJECT_CONTEXT_JSON}`
|
|
14637
14637
|
];
|
|
14638
14638
|
CLI_GLOBAL_BACKUP_FILES = [NEXUS_DB_FILENAME, SIGNALDOCK_DB_FILENAME];
|
|
14639
|
-
RESTORE_VALID_JSON_FILENAMES = /* @__PURE__ */ new Set([
|
|
14640
|
-
CONFIG_JSON,
|
|
14641
|
-
PROJECT_INFO_JSON,
|
|
14642
|
-
PROJECT_CONTEXT_JSON
|
|
14643
|
-
]);
|
|
14644
14639
|
RESTORE_DEFAULT_FILE = TASKS_DB_FILENAME;
|
|
14645
14640
|
}
|
|
14646
14641
|
});
|
|
@@ -32235,13 +32230,13 @@ var init_upgrade = __esm({
|
|
|
32235
32230
|
// packages/cleo/src/dispatch/domains/worktree.ts
|
|
32236
32231
|
import {
|
|
32237
32232
|
adoptWorktree,
|
|
32233
|
+
destroyWorktree,
|
|
32238
32234
|
forceUnlockWorktree,
|
|
32239
32235
|
getLogger as getLogger18,
|
|
32240
32236
|
getProjectRoot as getProjectRoot21,
|
|
32241
32237
|
listWorktrees,
|
|
32242
32238
|
pruneOrphanedWorktreesByStatus
|
|
32243
32239
|
} from "@cleocode/core/internal";
|
|
32244
|
-
import { destroyWorktree } from "@cleocode/worktree";
|
|
32245
32240
|
function coerceStatusFilter(value) {
|
|
32246
32241
|
if (value === void 0 || value === null) return void 0;
|
|
32247
32242
|
const raw = Array.isArray(value) ? value.filter((v) => typeof v === "string") : typeof value === "string" ? value.split(",").map((s) => s.trim()) : [];
|
|
@@ -37755,66 +37750,19 @@ var backup_inspect_exports = {};
|
|
|
37755
37750
|
__export(backup_inspect_exports, {
|
|
37756
37751
|
backupInspectSubCommand: () => backupInspectSubCommand
|
|
37757
37752
|
});
|
|
37758
|
-
import crypto2 from "node:crypto";
|
|
37759
37753
|
import fs from "node:fs";
|
|
37760
37754
|
import os from "node:os";
|
|
37761
37755
|
import path from "node:path";
|
|
37762
37756
|
import zlib from "node:zlib";
|
|
37763
|
-
|
|
37764
|
-
|
|
37765
|
-
|
|
37766
|
-
|
|
37767
|
-
|
|
37768
|
-
|
|
37769
|
-
|
|
37770
|
-
|
|
37771
|
-
|
|
37772
|
-
const entryName = rawName.subarray(0, nullIdx === -1 ? TAR_NAME_LENGTH : nullIdx).toString("utf8");
|
|
37773
|
-
const typeFlag = String.fromCharCode(header[TAR_TYPE_OFFSET] ?? 0);
|
|
37774
|
-
const isRegular = typeFlag === "0" || typeFlag === "\0";
|
|
37775
|
-
const rawSize = header.subarray(TAR_SIZE_OFFSET, TAR_SIZE_OFFSET + TAR_SIZE_LENGTH).toString("utf8").replace(/\0/g, "").trim();
|
|
37776
|
-
const fileSize = parseInt(rawSize, 8);
|
|
37777
|
-
offset += TAR_BLOCK_SIZE;
|
|
37778
|
-
const normalizedName = entryName.replace(/^\.\//, "");
|
|
37779
|
-
if (isRegular && normalizedName === "manifest.json") {
|
|
37780
|
-
if (offset + fileSize > tarBuf.length) {
|
|
37781
|
-
return null;
|
|
37782
|
-
}
|
|
37783
|
-
return tarBuf.subarray(offset, offset + fileSize).toString("utf8");
|
|
37784
|
-
}
|
|
37785
|
-
if (!Number.isNaN(fileSize) && fileSize > 0) {
|
|
37786
|
-
offset += Math.ceil(fileSize / TAR_BLOCK_SIZE) * TAR_BLOCK_SIZE;
|
|
37787
|
-
}
|
|
37788
|
-
}
|
|
37789
|
-
return null;
|
|
37790
|
-
}
|
|
37791
|
-
function verifyManifestHash(raw, manifest) {
|
|
37792
|
-
const integrity = manifest["integrity"];
|
|
37793
|
-
if (!integrity || typeof integrity["manifestHash"] !== "string") {
|
|
37794
|
-
return false;
|
|
37795
|
-
}
|
|
37796
|
-
const expectedHash = integrity["manifestHash"];
|
|
37797
|
-
let obj;
|
|
37798
|
-
try {
|
|
37799
|
-
obj = JSON.parse(raw);
|
|
37800
|
-
} catch {
|
|
37801
|
-
return false;
|
|
37802
|
-
}
|
|
37803
|
-
const intObj = obj["integrity"];
|
|
37804
|
-
intObj["manifestHash"] = "";
|
|
37805
|
-
const forHashing = JSON.stringify(obj);
|
|
37806
|
-
const computed = crypto2.createHash("sha256").update(forHashing).digest("hex");
|
|
37807
|
-
return computed === expectedHash;
|
|
37808
|
-
}
|
|
37809
|
-
function fmtBytes(bytes) {
|
|
37810
|
-
if (bytes >= 1024 * 1024) {
|
|
37811
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
37812
|
-
}
|
|
37813
|
-
if (bytes >= 1024) {
|
|
37814
|
-
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
37815
|
-
}
|
|
37816
|
-
return `${bytes} B`;
|
|
37817
|
-
}
|
|
37757
|
+
import {
|
|
37758
|
+
detectEncryption,
|
|
37759
|
+
ENC_MIN_LENGTH,
|
|
37760
|
+
ENC_VERSION_OFFSET,
|
|
37761
|
+
ENC_VERSION_SUPPORTED,
|
|
37762
|
+
extractManifestFromTar,
|
|
37763
|
+
fmtBytes,
|
|
37764
|
+
verifyManifestHash
|
|
37765
|
+
} from "@cleocode/core";
|
|
37818
37766
|
function printInspectReport(bundlePath, bundleSize, encrypted, manifest, integrityOk) {
|
|
37819
37767
|
const backup = manifest["backup"] ?? {};
|
|
37820
37768
|
const databases = manifest["databases"] ?? [];
|
|
@@ -37870,16 +37818,6 @@ function printInspectReport(bundlePath, bundleSize, encrypted, manifest, integri
|
|
|
37870
37818
|
lines.push(`Manifest integrity: [${integrityOk ? "OK" : "TAMPERED"}]`);
|
|
37871
37819
|
humanLine(lines.join("\n"));
|
|
37872
37820
|
}
|
|
37873
|
-
function detectEncryption(filePath) {
|
|
37874
|
-
const header = Buffer.alloc(8);
|
|
37875
|
-
const fd = fs.openSync(filePath, "r");
|
|
37876
|
-
try {
|
|
37877
|
-
fs.readSync(fd, header, 0, 8, 0);
|
|
37878
|
-
} finally {
|
|
37879
|
-
fs.closeSync(fd);
|
|
37880
|
-
}
|
|
37881
|
-
return header.toString("utf8") === CLEO_ENC_MAGIC;
|
|
37882
|
-
}
|
|
37883
37821
|
async function inspectAction(bundlePath) {
|
|
37884
37822
|
const resolved = path.resolve(bundlePath);
|
|
37885
37823
|
if (!fs.existsSync(resolved)) {
|
|
@@ -37980,22 +37918,12 @@ async function inspectTarball(tarPath, displayPath, encrypted) {
|
|
|
37980
37918
|
printInspectReport(displayPath, stat3.size, encrypted, manifest, integrityOk);
|
|
37981
37919
|
process.exitCode = 0;
|
|
37982
37920
|
}
|
|
37983
|
-
var
|
|
37921
|
+
var backupInspectSubCommand;
|
|
37984
37922
|
var init_backup_inspect = __esm({
|
|
37985
37923
|
"packages/cleo/src/cli/commands/backup-inspect.ts"() {
|
|
37986
37924
|
"use strict";
|
|
37987
37925
|
init_dist();
|
|
37988
37926
|
init_renderers();
|
|
37989
|
-
CLEO_ENC_MAGIC = "CLEOENC1";
|
|
37990
|
-
ENC_VERSION_OFFSET = 8;
|
|
37991
|
-
ENC_VERSION_SUPPORTED = 1;
|
|
37992
|
-
ENC_MIN_LENGTH = 8 + 1 + 7 + 32 + 12 + 16;
|
|
37993
|
-
TAR_BLOCK_SIZE = 512;
|
|
37994
|
-
TAR_NAME_OFFSET = 0;
|
|
37995
|
-
TAR_NAME_LENGTH = 100;
|
|
37996
|
-
TAR_SIZE_OFFSET = 124;
|
|
37997
|
-
TAR_SIZE_LENGTH = 12;
|
|
37998
|
-
TAR_TYPE_OFFSET = 156;
|
|
37999
37927
|
backupInspectSubCommand = defineCommand({
|
|
38000
37928
|
meta: {
|
|
38001
37929
|
name: "inspect",
|
|
@@ -38020,7 +37948,7 @@ var backup_exports = {};
|
|
|
38020
37948
|
__export(backup_exports, {
|
|
38021
37949
|
backupCommand: () => backupCommand
|
|
38022
37950
|
});
|
|
38023
|
-
import
|
|
37951
|
+
import crypto2 from "node:crypto";
|
|
38024
37952
|
import fs2 from "node:fs";
|
|
38025
37953
|
import path2 from "node:path";
|
|
38026
37954
|
import readline from "node:readline";
|
|
@@ -38074,7 +38002,7 @@ function sha256OfMachineKey(cleoHome) {
|
|
|
38074
38002
|
if (!fs2.existsSync(keyPath)) {
|
|
38075
38003
|
return "0".repeat(64);
|
|
38076
38004
|
}
|
|
38077
|
-
return
|
|
38005
|
+
return crypto2.createHash("sha256").update(fs2.readFileSync(keyPath)).digest("hex");
|
|
38078
38006
|
}
|
|
38079
38007
|
var addCommand2, listCommand4, exportCommand, importCommand, backupCommand;
|
|
38080
38008
|
var init_backup = __esm({
|
|
@@ -45916,6 +45844,17 @@ var init_doctor = __esm({
|
|
|
45916
45844
|
type: "boolean",
|
|
45917
45845
|
description: "Audit orphaned CLEO-generated temp directories and report what cleo gc --temp would remove (T9043)"
|
|
45918
45846
|
},
|
|
45847
|
+
/**
|
|
45848
|
+
* T9983: migrate the worktree-include file location from
|
|
45849
|
+
* `<root>/.cleo/worktree-include` (legacy) to `<root>/.worktreeinclude`
|
|
45850
|
+
* (canonical, matches Claude Code Desktop + worktrunk-core). Backs the
|
|
45851
|
+
* legacy file up to `.cleo/backups/worktree-include-<iso>.bak` before
|
|
45852
|
+
* removing it from the legacy path. Combine with `--dry-run` to preview.
|
|
45853
|
+
*/
|
|
45854
|
+
"migrate-worktree-include": {
|
|
45855
|
+
type: "boolean",
|
|
45856
|
+
description: "Migrate <root>/.cleo/worktree-include (legacy) \u2192 <root>/.worktreeinclude (canonical, T9983). Combine with --dry-run to preview."
|
|
45857
|
+
},
|
|
45919
45858
|
"dry-run": {
|
|
45920
45859
|
type: "boolean",
|
|
45921
45860
|
description: "With --quarantine-rogue-cleo-dirs or --scan-stray-nexus-dbs: print what would be done without acting"
|
|
@@ -46291,6 +46230,17 @@ var init_doctor = __esm({
|
|
|
46291
46230
|
if (result.rejected.length > 0) {
|
|
46292
46231
|
process.exitCode = 1;
|
|
46293
46232
|
}
|
|
46233
|
+
} else if (args["migrate-worktree-include"]) {
|
|
46234
|
+
const isDryRun = args["dry-run"] === true;
|
|
46235
|
+
progress.step(
|
|
46236
|
+
0,
|
|
46237
|
+
`${isDryRun ? "[DRY RUN] " : ""}Migrating .cleo/worktree-include \u2192 .worktreeinclude`
|
|
46238
|
+
);
|
|
46239
|
+
const { migrateWorktreeIncludeFile } = await import("@cleocode/core");
|
|
46240
|
+
const projectRoot = getProjectRoot33();
|
|
46241
|
+
const result = await migrateWorktreeIncludeFile(projectRoot, { dryRun: isDryRun });
|
|
46242
|
+
progress.complete(`Migration ${result.action}`);
|
|
46243
|
+
cliOutput(result, { command: "doctor", operation: "doctor.migrate-worktree-include" });
|
|
46294
46244
|
} else if (args["audit-temp"]) {
|
|
46295
46245
|
progress.step(0, "Auditing orphaned CLEO temp directories");
|
|
46296
46246
|
const { auditOrphanTempDirs } = await import("@cleocode/core/gc/index.js");
|
|
@@ -59079,116 +59029,19 @@ var init_research2 = __esm({
|
|
|
59079
59029
|
// packages/cleo/src/cli/commands/restore.ts
|
|
59080
59030
|
var restore_exports = {};
|
|
59081
59031
|
__export(restore_exports, {
|
|
59082
|
-
parseConflictReport: () =>
|
|
59032
|
+
parseConflictReport: () => parseConflictReport2,
|
|
59083
59033
|
restoreCommand: () => restoreCommand
|
|
59084
59034
|
});
|
|
59085
59035
|
import fs3 from "node:fs";
|
|
59086
59036
|
import path5 from "node:path";
|
|
59087
|
-
import {
|
|
59088
|
-
|
|
59089
|
-
|
|
59090
|
-
|
|
59091
|
-
|
|
59092
|
-
|
|
59093
|
-
|
|
59094
|
-
|
|
59095
|
-
return stripped;
|
|
59096
|
-
}
|
|
59097
|
-
}
|
|
59098
|
-
function setAtPath(obj, dotPath, value) {
|
|
59099
|
-
const parts = dotPath.split(".");
|
|
59100
|
-
let curr = obj;
|
|
59101
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
59102
|
-
const key = parts[i];
|
|
59103
|
-
if (curr[key] === void 0 || typeof curr[key] !== "object" || curr[key] === null) {
|
|
59104
|
-
curr[key] = {};
|
|
59105
|
-
}
|
|
59106
|
-
curr = curr[key];
|
|
59107
|
-
}
|
|
59108
|
-
const lastKey = parts[parts.length - 1];
|
|
59109
|
-
curr[lastKey] = value;
|
|
59110
|
-
}
|
|
59111
|
-
function parseConflictReport(md) {
|
|
59112
|
-
const results = [];
|
|
59113
|
-
const VALID_FILENAMES = RESTORE_VALID_JSON_FILENAMES;
|
|
59114
|
-
const lines = md.split("\n");
|
|
59115
|
-
let currentFilename = null;
|
|
59116
|
-
let currentSection = null;
|
|
59117
|
-
let entryField = null;
|
|
59118
|
-
let entryLocalRaw = null;
|
|
59119
|
-
let entryImportedRaw = null;
|
|
59120
|
-
let entryResolution = null;
|
|
59121
|
-
function flushEntry() {
|
|
59122
|
-
if (entryField !== null && entryResolution !== null && currentFilename !== null && currentSection !== null) {
|
|
59123
|
-
results.push({
|
|
59124
|
-
section: currentSection,
|
|
59125
|
-
filename: currentFilename,
|
|
59126
|
-
fieldPath: entryField,
|
|
59127
|
-
localValue: entryLocalRaw !== null ? parseMarkdownValue(entryLocalRaw) : void 0,
|
|
59128
|
-
importedValue: entryImportedRaw !== null ? parseMarkdownValue(entryImportedRaw) : void 0,
|
|
59129
|
-
resolution: entryResolution
|
|
59130
|
-
});
|
|
59131
|
-
}
|
|
59132
|
-
entryField = null;
|
|
59133
|
-
entryLocalRaw = null;
|
|
59134
|
-
entryImportedRaw = null;
|
|
59135
|
-
entryResolution = null;
|
|
59136
|
-
}
|
|
59137
|
-
for (const line of lines) {
|
|
59138
|
-
const fileHeading = /^##\s+(.+\.json)\s*$/.exec(line);
|
|
59139
|
-
if (fileHeading) {
|
|
59140
|
-
flushEntry();
|
|
59141
|
-
const name = fileHeading[1]?.trim() ?? "";
|
|
59142
|
-
currentFilename = VALID_FILENAMES.has(name) ? name : null;
|
|
59143
|
-
currentSection = null;
|
|
59144
|
-
continue;
|
|
59145
|
-
}
|
|
59146
|
-
const sectionHeading = /^###\s+(.+)$/.exec(line);
|
|
59147
|
-
if (sectionHeading) {
|
|
59148
|
-
flushEntry();
|
|
59149
|
-
const headingText = (sectionHeading[1] ?? "").toLowerCase();
|
|
59150
|
-
if (headingText.includes("manual")) {
|
|
59151
|
-
currentSection = "manual";
|
|
59152
|
-
} else if (headingText.includes("resolved") || headingText.includes("auto")) {
|
|
59153
|
-
currentSection = "auto";
|
|
59154
|
-
} else {
|
|
59155
|
-
currentSection = null;
|
|
59156
|
-
}
|
|
59157
|
-
continue;
|
|
59158
|
-
}
|
|
59159
|
-
if (currentFilename === null || currentSection === null) continue;
|
|
59160
|
-
const fieldLine = /^-\s+`([^`]+)`\s*$/.exec(line);
|
|
59161
|
-
if (fieldLine) {
|
|
59162
|
-
flushEntry();
|
|
59163
|
-
entryField = fieldLine[1] ?? null;
|
|
59164
|
-
continue;
|
|
59165
|
-
}
|
|
59166
|
-
if (entryField === null) continue;
|
|
59167
|
-
const localLine = /^\s+-\s+Local\s+\(A\):\s+(.+)$/.exec(line);
|
|
59168
|
-
if (localLine) {
|
|
59169
|
-
entryLocalRaw = localLine[1] ?? "";
|
|
59170
|
-
continue;
|
|
59171
|
-
}
|
|
59172
|
-
const importedLine = /^\s+-\s+Imported\s+\(B\):\s+(.+)$/.exec(line);
|
|
59173
|
-
if (importedLine) {
|
|
59174
|
-
entryImportedRaw = importedLine[1] ?? "";
|
|
59175
|
-
continue;
|
|
59176
|
-
}
|
|
59177
|
-
const resolutionLine = /^\s+-\s+Resolution:\s+\*\*([^*]+)\*\*/.exec(line);
|
|
59178
|
-
if (resolutionLine) {
|
|
59179
|
-
const resText = (resolutionLine[1] ?? "").trim();
|
|
59180
|
-
if (resText === "A") {
|
|
59181
|
-
entryResolution = "A";
|
|
59182
|
-
} else if (resText === "B") {
|
|
59183
|
-
entryResolution = "B";
|
|
59184
|
-
} else {
|
|
59185
|
-
entryResolution = "manual-review";
|
|
59186
|
-
}
|
|
59187
|
-
}
|
|
59188
|
-
}
|
|
59189
|
-
flushEntry();
|
|
59190
|
-
return results;
|
|
59191
|
-
}
|
|
59037
|
+
import {
|
|
59038
|
+
CleoError as CleoError7,
|
|
59039
|
+
getProjectRoot as getProjectRoot39,
|
|
59040
|
+
getTaskAccessor as getTaskAccessor3,
|
|
59041
|
+
parseConflictReport,
|
|
59042
|
+
setAtPath
|
|
59043
|
+
} from "@cleocode/core";
|
|
59044
|
+
import { parseConflictReport as parseConflictReport2 } from "@cleocode/core";
|
|
59192
59045
|
var finalizeCommand, backupSubCommand, taskSubCommand, restoreCommand;
|
|
59193
59046
|
var init_restore = __esm({
|
|
59194
59047
|
"packages/cleo/src/cli/commands/restore.ts"() {
|
|
@@ -62539,119 +62392,11 @@ __export(setup_exports, {
|
|
|
62539
62392
|
runSetup: () => runSetup,
|
|
62540
62393
|
setupCommand: () => setupCommand2
|
|
62541
62394
|
});
|
|
62542
|
-
import {
|
|
62543
|
-
|
|
62544
|
-
|
|
62545
|
-
|
|
62546
|
-
|
|
62547
|
-
if (typeof sectionOpts !== "object" || sectionOpts === null) continue;
|
|
62548
|
-
if ("provider" in sectionOpts && out.provider === void 0) {
|
|
62549
|
-
if (typeof sectionOpts["provider"] === "string" && sectionOpts["provider"] !== "") {
|
|
62550
|
-
out.provider = sectionOpts["provider"];
|
|
62551
|
-
}
|
|
62552
|
-
}
|
|
62553
|
-
if ("apiKey" in sectionOpts && out.apiKey === void 0) {
|
|
62554
|
-
if (typeof sectionOpts["apiKey"] === "string" && sectionOpts["apiKey"] !== "") {
|
|
62555
|
-
out.apiKey = sectionOpts["apiKey"];
|
|
62556
|
-
}
|
|
62557
|
-
}
|
|
62558
|
-
if ("label" in sectionOpts && out.label === void 0) {
|
|
62559
|
-
if (typeof sectionOpts["label"] === "string" && sectionOpts["label"] !== "") {
|
|
62560
|
-
out.label = sectionOpts["label"];
|
|
62561
|
-
}
|
|
62562
|
-
}
|
|
62563
|
-
if ("agentName" in sectionOpts && out.agentName === void 0) {
|
|
62564
|
-
if (typeof sectionOpts["agentName"] === "string" && sectionOpts["agentName"] !== "") {
|
|
62565
|
-
out.agentName = sectionOpts["agentName"];
|
|
62566
|
-
}
|
|
62567
|
-
}
|
|
62568
|
-
if ("soulMdContent" in sectionOpts && out.soulMdContent === void 0) {
|
|
62569
|
-
if (typeof sectionOpts["soulMdContent"] === "string" && sectionOpts["soulMdContent"] !== "") {
|
|
62570
|
-
out.soulMdContent = sectionOpts["soulMdContent"];
|
|
62571
|
-
}
|
|
62572
|
-
}
|
|
62573
|
-
if ("strictness" in sectionOpts && out.strictness === void 0) {
|
|
62574
|
-
const s = sectionOpts["strictness"];
|
|
62575
|
-
if (s === "strict" || s === "standard" || s === "minimal") {
|
|
62576
|
-
out.strictness = s;
|
|
62577
|
-
}
|
|
62578
|
-
}
|
|
62579
|
-
if ("harness" in sectionOpts && out.harness === void 0) {
|
|
62580
|
-
const h = sectionOpts["harness"];
|
|
62581
|
-
if (h === "pi" || h === "claude-code") {
|
|
62582
|
-
out.harness = h;
|
|
62583
|
-
}
|
|
62584
|
-
}
|
|
62585
|
-
if ("brainBridgeMode" in sectionOpts && out.brainBridgeMode === void 0) {
|
|
62586
|
-
const b = sectionOpts["brainBridgeMode"];
|
|
62587
|
-
if (b === "digest" || b === "file" || b === "disabled") {
|
|
62588
|
-
out.brainBridgeMode = b;
|
|
62589
|
-
}
|
|
62590
|
-
}
|
|
62591
|
-
if ("sentientEnabled" in sectionOpts && out.sentientEnabled === void 0) {
|
|
62592
|
-
if (typeof sectionOpts["sentientEnabled"] === "boolean") {
|
|
62593
|
-
out.sentientEnabled = sectionOpts["sentientEnabled"];
|
|
62594
|
-
}
|
|
62595
|
-
}
|
|
62596
|
-
if ("tier2Enabled" in sectionOpts && out.tier2Enabled === void 0) {
|
|
62597
|
-
if (typeof sectionOpts["tier2Enabled"] === "boolean") {
|
|
62598
|
-
out.tier2Enabled = sectionOpts["tier2Enabled"];
|
|
62599
|
-
}
|
|
62600
|
-
}
|
|
62601
|
-
if ("signaldockAutoConnect" in sectionOpts && out.signaldockAutoConnect === void 0) {
|
|
62602
|
-
if (typeof sectionOpts["signaldockAutoConnect"] === "boolean") {
|
|
62603
|
-
out.signaldockAutoConnect = sectionOpts["signaldockAutoConnect"];
|
|
62604
|
-
}
|
|
62605
|
-
}
|
|
62606
|
-
if ("brainRetentionDays" in sectionOpts && out.brainRetentionDays === void 0) {
|
|
62607
|
-
const v = sectionOpts["brainRetentionDays"];
|
|
62608
|
-
if (typeof v === "number" && Number.isInteger(v) && v >= 0) {
|
|
62609
|
-
out.brainRetentionDays = v;
|
|
62610
|
-
}
|
|
62611
|
-
}
|
|
62612
|
-
if ("brainEmbeddingEnabled" in sectionOpts && out.brainEmbeddingEnabled === void 0) {
|
|
62613
|
-
if (typeof sectionOpts["brainEmbeddingEnabled"] === "boolean") {
|
|
62614
|
-
out.brainEmbeddingEnabled = sectionOpts["brainEmbeddingEnabled"];
|
|
62615
|
-
}
|
|
62616
|
-
}
|
|
62617
|
-
if ("signaldockEnabled" in sectionOpts && out.signaldockEnabled === void 0) {
|
|
62618
|
-
if (typeof sectionOpts["signaldockEnabled"] === "boolean") {
|
|
62619
|
-
out.signaldockEnabled = sectionOpts["signaldockEnabled"];
|
|
62620
|
-
}
|
|
62621
|
-
}
|
|
62622
|
-
if ("signaldockEndpoint" in sectionOpts && out.signaldockEndpoint === void 0) {
|
|
62623
|
-
if (typeof sectionOpts["signaldockEndpoint"] === "string" && sectionOpts["signaldockEndpoint"] !== "") {
|
|
62624
|
-
out.signaldockEndpoint = sectionOpts["signaldockEndpoint"];
|
|
62625
|
-
}
|
|
62626
|
-
}
|
|
62627
|
-
if ("studioEnabled" in sectionOpts && out.studioEnabled === void 0) {
|
|
62628
|
-
if (typeof sectionOpts["studioEnabled"] === "boolean") {
|
|
62629
|
-
out.studioEnabled = sectionOpts["studioEnabled"];
|
|
62630
|
-
}
|
|
62631
|
-
}
|
|
62632
|
-
if ("conduitPath" in sectionOpts && out.conduitPath === void 0) {
|
|
62633
|
-
if (typeof sectionOpts["conduitPath"] === "string" && sectionOpts["conduitPath"] !== "") {
|
|
62634
|
-
out.conduitPath = sectionOpts["conduitPath"];
|
|
62635
|
-
}
|
|
62636
|
-
}
|
|
62637
|
-
if ("poolSeedingConsent" in sectionOpts && out.poolSeedingConsent === void 0) {
|
|
62638
|
-
if (typeof sectionOpts["poolSeedingConsent"] === "boolean") {
|
|
62639
|
-
out.poolSeedingConsent = sectionOpts["poolSeedingConsent"];
|
|
62640
|
-
}
|
|
62641
|
-
}
|
|
62642
|
-
if ("acEnforcementMode" in sectionOpts && out.acEnforcementMode === void 0) {
|
|
62643
|
-
const m = sectionOpts["acEnforcementMode"];
|
|
62644
|
-
if (m === "block" || m === "warn" || m === "off") {
|
|
62645
|
-
out.acEnforcementMode = m;
|
|
62646
|
-
}
|
|
62647
|
-
}
|
|
62648
|
-
if ("sessionAutoStart" in sectionOpts && out.sessionAutoStart === void 0) {
|
|
62649
|
-
if (typeof sectionOpts["sessionAutoStart"] === "boolean") {
|
|
62650
|
-
out.sessionAutoStart = sectionOpts["sessionAutoStart"];
|
|
62651
|
-
}
|
|
62652
|
-
}
|
|
62653
|
-
}
|
|
62654
|
-
}
|
|
62395
|
+
import {
|
|
62396
|
+
createDefaultWizardRunner,
|
|
62397
|
+
mergeConfigJson,
|
|
62398
|
+
WizardInterruptError as WizardInterruptError2
|
|
62399
|
+
} from "@cleocode/core/setup";
|
|
62655
62400
|
function buildWizardOptions(args) {
|
|
62656
62401
|
const out = {};
|
|
62657
62402
|
const configJsonRaw = args["config-json"] ?? args["configJson"];
|
|
@@ -62781,23 +62526,13 @@ async function runSetup(args, io) {
|
|
|
62781
62526
|
ok: isOk(runResult)
|
|
62782
62527
|
};
|
|
62783
62528
|
}
|
|
62784
|
-
var
|
|
62529
|
+
var setupCommand2;
|
|
62785
62530
|
var init_setup = __esm({
|
|
62786
62531
|
"packages/cleo/src/cli/commands/setup.ts"() {
|
|
62787
62532
|
"use strict";
|
|
62788
62533
|
init_dist();
|
|
62789
62534
|
init_readline_wizard_io();
|
|
62790
62535
|
init_renderers();
|
|
62791
|
-
WIZARD_SECTION_IDS = /* @__PURE__ */ new Set([
|
|
62792
|
-
"llm",
|
|
62793
|
-
"identity",
|
|
62794
|
-
"harness",
|
|
62795
|
-
"sentient",
|
|
62796
|
-
"project-conventions",
|
|
62797
|
-
"brain",
|
|
62798
|
-
"integrations",
|
|
62799
|
-
"verification"
|
|
62800
|
-
]);
|
|
62801
62536
|
setupCommand2 = defineCommand({
|
|
62802
62537
|
meta: {
|
|
62803
62538
|
name: "setup",
|