@cleocode/cleo 2026.4.52 → 2026.4.53
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 +151 -91
- package/dist/cli/index.js.map +3 -3
- package/package.json +8 -8
package/dist/cli/index.js
CHANGED
|
@@ -11142,44 +11142,6 @@ var init_platform_paths = __esm({
|
|
|
11142
11142
|
});
|
|
11143
11143
|
|
|
11144
11144
|
// packages/core/src/paths.ts
|
|
11145
|
-
var paths_exports = {};
|
|
11146
|
-
__export(paths_exports, {
|
|
11147
|
-
getAgentOutputsAbsolute: () => getAgentOutputsAbsolute,
|
|
11148
|
-
getAgentOutputsDir: () => getAgentOutputsDir,
|
|
11149
|
-
getAgentsHome: () => getAgentsHome,
|
|
11150
|
-
getArchivePath: () => getArchivePath,
|
|
11151
|
-
getBackupDir: () => getBackupDir,
|
|
11152
|
-
getClaudeAgentsDir: () => getClaudeAgentsDir,
|
|
11153
|
-
getClaudeMemDbPath: () => getClaudeMemDbPath,
|
|
11154
|
-
getCleoCacheDir: () => getCleoCacheDir,
|
|
11155
|
-
getCleoCantWorkflowsDir: () => getCleoCantWorkflowsDir,
|
|
11156
|
-
getCleoConfigDir: () => getCleoConfigDir,
|
|
11157
|
-
getCleoDir: () => getCleoDir,
|
|
11158
|
-
getCleoDirAbsolute: () => getCleoDirAbsolute,
|
|
11159
|
-
getCleoDocsDir: () => getCleoDocsDir,
|
|
11160
|
-
getCleoGlobalAgentsDir: () => getCleoGlobalAgentsDir,
|
|
11161
|
-
getCleoGlobalJustfilePath: () => getCleoGlobalJustfilePath,
|
|
11162
|
-
getCleoGlobalRecipesDir: () => getCleoGlobalRecipesDir,
|
|
11163
|
-
getCleoHome: () => getCleoHome,
|
|
11164
|
-
getCleoLogDir: () => getCleoLogDir,
|
|
11165
|
-
getCleoPiExtensionsDir: () => getCleoPiExtensionsDir,
|
|
11166
|
-
getCleoSchemasDir: () => getCleoSchemasDir,
|
|
11167
|
-
getCleoTempDir: () => getCleoTempDir,
|
|
11168
|
-
getCleoTemplatesDir: () => getCleoTemplatesDir,
|
|
11169
|
-
getCleoTemplatesTildePath: () => getCleoTemplatesTildePath,
|
|
11170
|
-
getConfigPath: () => getConfigPath,
|
|
11171
|
-
getGlobalConfigPath: () => getGlobalConfigPath,
|
|
11172
|
-
getLogPath: () => getLogPath,
|
|
11173
|
-
getManifestArchivePath: () => getManifestArchivePath,
|
|
11174
|
-
getManifestPath: () => getManifestPath,
|
|
11175
|
-
getProjectRoot: () => getProjectRoot,
|
|
11176
|
-
getSessionsPath: () => getSessionsPath,
|
|
11177
|
-
getTaskPath: () => getTaskPath,
|
|
11178
|
-
isAbsolutePath: () => isAbsolutePath,
|
|
11179
|
-
isProjectInitialized: () => isProjectInitialized,
|
|
11180
|
-
resolveProjectPath: () => resolveProjectPath,
|
|
11181
|
-
worktreeScope: () => worktreeScope
|
|
11182
|
-
});
|
|
11183
11145
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
11184
11146
|
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
11185
11147
|
import { homedir } from "node:os";
|
|
@@ -11198,9 +11160,6 @@ function getCleoTemplatesDir() {
|
|
|
11198
11160
|
function getCleoSchemasDir() {
|
|
11199
11161
|
return join4(getCleoHome(), "schemas");
|
|
11200
11162
|
}
|
|
11201
|
-
function getCleoDocsDir() {
|
|
11202
|
-
return join4(getCleoHome(), "docs");
|
|
11203
|
-
}
|
|
11204
11163
|
function getCleoDir(cwd) {
|
|
11205
11164
|
if (cwd) {
|
|
11206
11165
|
return getCleoDirAbsolute(cwd);
|
|
@@ -11272,15 +11231,6 @@ function getTaskPath(cwd) {
|
|
|
11272
11231
|
function getConfigPath(cwd) {
|
|
11273
11232
|
return join4(getCleoDirAbsolute(cwd), "config.json");
|
|
11274
11233
|
}
|
|
11275
|
-
function getSessionsPath(cwd) {
|
|
11276
|
-
return join4(getCleoDirAbsolute(cwd), "sessions.json");
|
|
11277
|
-
}
|
|
11278
|
-
function getArchivePath(cwd) {
|
|
11279
|
-
return join4(getCleoDirAbsolute(cwd), "tasks-archive.json");
|
|
11280
|
-
}
|
|
11281
|
-
function getLogPath(cwd) {
|
|
11282
|
-
return join4(getCleoDirAbsolute(cwd), "logs", "cleo.log");
|
|
11283
|
-
}
|
|
11284
11234
|
function getBackupDir(cwd) {
|
|
11285
11235
|
return join4(getCleoDirAbsolute(cwd), "backups", "operational");
|
|
11286
11236
|
}
|
|
@@ -14333,8 +14283,8 @@ async function cleanupMigrationArtifacts(backupPath) {
|
|
|
14333
14283
|
}
|
|
14334
14284
|
async function validateSqliteDatabase(dbPath) {
|
|
14335
14285
|
try {
|
|
14336
|
-
const { createRequire:
|
|
14337
|
-
const _req =
|
|
14286
|
+
const { createRequire: createRequire20 } = await import("node:module");
|
|
14287
|
+
const _req = createRequire20(import.meta.url);
|
|
14338
14288
|
const { DatabaseSync: DatabaseSync10 } = _req("node:sqlite");
|
|
14339
14289
|
const db = new DatabaseSync10(dbPath, { readOnly: true });
|
|
14340
14290
|
const integrityRow = db.prepare("PRAGMA integrity_check").get();
|
|
@@ -56056,6 +56006,7 @@ __export(scaffold_exports, {
|
|
|
56056
56006
|
checkConfig: () => checkConfig,
|
|
56057
56007
|
checkGitignore: () => checkGitignore,
|
|
56058
56008
|
checkGlobalHome: () => checkGlobalHome,
|
|
56009
|
+
checkGlobalIdentity: () => checkGlobalIdentity,
|
|
56059
56010
|
checkGlobalTemplates: () => checkGlobalTemplates,
|
|
56060
56011
|
checkLogDir: () => checkLogDir,
|
|
56061
56012
|
checkMemoryBridge: () => checkMemoryBridge,
|
|
@@ -56072,6 +56023,7 @@ __export(scaffold_exports, {
|
|
|
56072
56023
|
ensureContributorMcp: () => ensureContributorMcp,
|
|
56073
56024
|
ensureGitignore: () => ensureGitignore,
|
|
56074
56025
|
ensureGlobalHome: () => ensureGlobalHome,
|
|
56026
|
+
ensureGlobalIdentity: () => ensureGlobalIdentity,
|
|
56075
56027
|
ensureGlobalScaffold: () => ensureGlobalScaffold,
|
|
56076
56028
|
ensureGlobalTemplates: () => ensureGlobalTemplates,
|
|
56077
56029
|
ensureProjectContext: () => ensureProjectContext,
|
|
@@ -56089,6 +56041,7 @@ import { execFile as execFile3 } from "node:child_process";
|
|
|
56089
56041
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
56090
56042
|
import { existsSync as existsSync40, constants as fsConstants3, readFileSync as readFileSync26, statSync as statSync8 } from "node:fs";
|
|
56091
56043
|
import { access as access3, copyFile as copyFile2, mkdir as mkdir6, readdir as readdir2, readFile as readFile7, rm as rm2, writeFile as writeFile6 } from "node:fs/promises";
|
|
56044
|
+
import { createRequire as createRequire9 } from "node:module";
|
|
56092
56045
|
import { homedir as getHomedir } from "node:os";
|
|
56093
56046
|
import { dirname as dirname10, join as join42, resolve as resolve5 } from "node:path";
|
|
56094
56047
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
@@ -56944,6 +56897,102 @@ async function ensureCleoOsHub() {
|
|
|
56944
56897
|
details: `pi-extensions: ${piResult.copied} created/${piResult.kept} kept, global-recipes: ${recipesResult.copied} created/${recipesResult.kept} kept`
|
|
56945
56898
|
};
|
|
56946
56899
|
}
|
|
56900
|
+
function resolveIdentitySourcePath() {
|
|
56901
|
+
const monorepoPath = join42(
|
|
56902
|
+
process.cwd(),
|
|
56903
|
+
"packages",
|
|
56904
|
+
"cleo-os",
|
|
56905
|
+
"starter-bundle",
|
|
56906
|
+
"CLEOOS-IDENTITY.md"
|
|
56907
|
+
);
|
|
56908
|
+
if (existsSync40(monorepoPath)) return monorepoPath;
|
|
56909
|
+
try {
|
|
56910
|
+
const require2 = createRequire9(import.meta.url);
|
|
56911
|
+
const pkgJson = require2.resolve("@cleocode/cleo-os/package.json");
|
|
56912
|
+
const pkgDir = pkgJson.replace(/\/package\.json$/, "");
|
|
56913
|
+
const installedPath = join42(pkgDir, "starter-bundle", "CLEOOS-IDENTITY.md");
|
|
56914
|
+
if (existsSync40(installedPath)) return installedPath;
|
|
56915
|
+
} catch {
|
|
56916
|
+
}
|
|
56917
|
+
return null;
|
|
56918
|
+
}
|
|
56919
|
+
async function ensureGlobalIdentity(forceRefresh = false) {
|
|
56920
|
+
const sourcePath = resolveIdentitySourcePath();
|
|
56921
|
+
if (!sourcePath) {
|
|
56922
|
+
return {
|
|
56923
|
+
action: "skipped",
|
|
56924
|
+
path: "",
|
|
56925
|
+
details: "CLEOOS-IDENTITY.md source not found in monorepo or installed package"
|
|
56926
|
+
};
|
|
56927
|
+
}
|
|
56928
|
+
const cleoHome = getCleoHome();
|
|
56929
|
+
const dst = join42(cleoHome, "CLEOOS-IDENTITY.md");
|
|
56930
|
+
try {
|
|
56931
|
+
await mkdir6(cleoHome, { recursive: true });
|
|
56932
|
+
} catch (err) {
|
|
56933
|
+
return {
|
|
56934
|
+
action: "skipped",
|
|
56935
|
+
path: dst,
|
|
56936
|
+
details: `Failed to create global cleo home: ${err instanceof Error ? err.message : String(err)}`
|
|
56937
|
+
};
|
|
56938
|
+
}
|
|
56939
|
+
if (existsSync40(dst) && !forceRefresh) {
|
|
56940
|
+
return { action: "skipped", path: dst, details: "identity already present" };
|
|
56941
|
+
}
|
|
56942
|
+
const existedBefore = existsSync40(dst);
|
|
56943
|
+
try {
|
|
56944
|
+
const content = readFileSync26(sourcePath, "utf-8");
|
|
56945
|
+
await writeFile6(dst, content);
|
|
56946
|
+
return {
|
|
56947
|
+
action: existedBefore ? "repaired" : "created",
|
|
56948
|
+
path: dst,
|
|
56949
|
+
details: `from ${sourcePath}`
|
|
56950
|
+
};
|
|
56951
|
+
} catch (err) {
|
|
56952
|
+
return {
|
|
56953
|
+
action: "skipped",
|
|
56954
|
+
path: dst,
|
|
56955
|
+
details: `Failed to write identity: ${err instanceof Error ? err.message : String(err)}`
|
|
56956
|
+
};
|
|
56957
|
+
}
|
|
56958
|
+
}
|
|
56959
|
+
function checkGlobalIdentity() {
|
|
56960
|
+
const cleoHome = getCleoHome();
|
|
56961
|
+
const identityPath = join42(cleoHome, "CLEOOS-IDENTITY.md");
|
|
56962
|
+
if (!existsSync40(identityPath)) {
|
|
56963
|
+
return {
|
|
56964
|
+
id: "global_identity",
|
|
56965
|
+
category: "global",
|
|
56966
|
+
status: "failed",
|
|
56967
|
+
message: "Global CLEOOS-IDENTITY.md not found \u2014 orchestrator persona missing",
|
|
56968
|
+
details: { path: identityPath, exists: false },
|
|
56969
|
+
fix: "cleo upgrade (auto-deploys identity)"
|
|
56970
|
+
};
|
|
56971
|
+
}
|
|
56972
|
+
let size = 0;
|
|
56973
|
+
try {
|
|
56974
|
+
size = statSync8(identityPath).size;
|
|
56975
|
+
} catch {
|
|
56976
|
+
}
|
|
56977
|
+
if (size === 0) {
|
|
56978
|
+
return {
|
|
56979
|
+
id: "global_identity",
|
|
56980
|
+
category: "global",
|
|
56981
|
+
status: "failed",
|
|
56982
|
+
message: "Global CLEOOS-IDENTITY.md exists but is empty",
|
|
56983
|
+
details: { path: identityPath, exists: true, size: 0 },
|
|
56984
|
+
fix: "cleo upgrade --refresh-identity"
|
|
56985
|
+
};
|
|
56986
|
+
}
|
|
56987
|
+
return {
|
|
56988
|
+
id: "global_identity",
|
|
56989
|
+
category: "global",
|
|
56990
|
+
status: "passed",
|
|
56991
|
+
message: "Global CLEOOS-IDENTITY.md present",
|
|
56992
|
+
details: { path: identityPath, exists: true, size },
|
|
56993
|
+
fix: ""
|
|
56994
|
+
};
|
|
56995
|
+
}
|
|
56947
56996
|
function checkGlobalHome() {
|
|
56948
56997
|
const cleoHome = getCleoHome();
|
|
56949
56998
|
if (!existsSync40(cleoHome)) {
|
|
@@ -63342,7 +63391,7 @@ var init_agent_outputs = __esm({
|
|
|
63342
63391
|
// packages/core/src/migration/checksum.ts
|
|
63343
63392
|
import { createHash as createHash8 } from "node:crypto";
|
|
63344
63393
|
import { readFileSync as readFileSync37 } from "node:fs";
|
|
63345
|
-
import { createRequire as
|
|
63394
|
+
import { createRequire as createRequire10 } from "node:module";
|
|
63346
63395
|
async function computeChecksum2(filePath) {
|
|
63347
63396
|
const content = readFileSync37(filePath);
|
|
63348
63397
|
return createHash8("sha256").update(content).digest("hex");
|
|
@@ -63388,7 +63437,7 @@ var _require9, DatabaseSync4;
|
|
|
63388
63437
|
var init_checksum = __esm({
|
|
63389
63438
|
"packages/core/src/migration/checksum.ts"() {
|
|
63390
63439
|
"use strict";
|
|
63391
|
-
_require9 =
|
|
63440
|
+
_require9 = createRequire10(import.meta.url);
|
|
63392
63441
|
({ DatabaseSync: DatabaseSync4 } = _require9("node:sqlite"));
|
|
63393
63442
|
}
|
|
63394
63443
|
});
|
|
@@ -79566,7 +79615,7 @@ __export(parser_exports, {
|
|
|
79566
79615
|
parseFile: () => parseFile2
|
|
79567
79616
|
});
|
|
79568
79617
|
import { readFileSync as readFileSync67 } from "node:fs";
|
|
79569
|
-
import { createRequire as
|
|
79618
|
+
import { createRequire as createRequire11 } from "node:module";
|
|
79570
79619
|
import { relative as relative11 } from "node:path";
|
|
79571
79620
|
function tryRequire2(id) {
|
|
79572
79621
|
try {
|
|
@@ -79767,7 +79816,7 @@ var init_parser4 = __esm({
|
|
|
79767
79816
|
"packages/core/src/code/parser.ts"() {
|
|
79768
79817
|
"use strict";
|
|
79769
79818
|
init_tree_sitter_languages2();
|
|
79770
|
-
_require10 =
|
|
79819
|
+
_require10 = createRequire11(import.meta.url);
|
|
79771
79820
|
_ParserClass2 = null;
|
|
79772
79821
|
_QueryClass2 = null;
|
|
79773
79822
|
_parserInstance2 = null;
|
|
@@ -79873,7 +79922,7 @@ __export(dependencies_exports, {
|
|
|
79873
79922
|
getDependencySpecs: () => getDependencySpecs
|
|
79874
79923
|
});
|
|
79875
79924
|
import { execFileSync as execFileSync10 } from "node:child_process";
|
|
79876
|
-
import { createRequire as
|
|
79925
|
+
import { createRequire as createRequire12 } from "node:module";
|
|
79877
79926
|
import { dirname as dirname19 } from "node:path";
|
|
79878
79927
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
79879
79928
|
function tryExec(cmd, args, timeoutMs = 3e3) {
|
|
@@ -80146,7 +80195,7 @@ var init_dependencies = __esm({
|
|
|
80146
80195
|
"packages/core/src/system/dependencies.ts"() {
|
|
80147
80196
|
"use strict";
|
|
80148
80197
|
init_platform();
|
|
80149
|
-
_require11 =
|
|
80198
|
+
_require11 = createRequire12(import.meta.url);
|
|
80150
80199
|
_dirname = dirname19(fileURLToPath5(import.meta.url));
|
|
80151
80200
|
DEPENDENCY_SPECS = [
|
|
80152
80201
|
// ── Required ────────────────────────────────────────────────────────────
|
|
@@ -80218,7 +80267,7 @@ var init_dependencies = __esm({
|
|
|
80218
80267
|
// packages/core/src/system/health.ts
|
|
80219
80268
|
import { execFileSync as execFileSync11 } from "node:child_process";
|
|
80220
80269
|
import { existsSync as existsSync92, readFileSync as readFileSync68, statSync as statSync19 } from "node:fs";
|
|
80221
|
-
import { createRequire as
|
|
80270
|
+
import { createRequire as createRequire13 } from "node:module";
|
|
80222
80271
|
import { join as join94 } from "node:path";
|
|
80223
80272
|
function resolveStructuredLogPath(cleoDir) {
|
|
80224
80273
|
const defaultPath = join94(cleoDir, "logs", "cleo.log");
|
|
@@ -80759,6 +80808,7 @@ async function coreDoctorReport(projectRoot) {
|
|
|
80759
80808
|
});
|
|
80760
80809
|
checks.push(mapCheckResult(checkGlobalHome()));
|
|
80761
80810
|
checks.push(mapCheckResult(checkGlobalTemplates()));
|
|
80811
|
+
checks.push(mapCheckResult(checkGlobalIdentity()));
|
|
80762
80812
|
checks.push(mapSchemaCheckResult(checkGlobalSchemas()));
|
|
80763
80813
|
checks.push(mapCheckResult(checkLogDir(projectRoot)));
|
|
80764
80814
|
const hookResults = await checkGitHooks(projectRoot);
|
|
@@ -81190,7 +81240,7 @@ var init_health = __esm({
|
|
|
81190
81240
|
init_checks3();
|
|
81191
81241
|
init_dependencies();
|
|
81192
81242
|
init_storage_preflight();
|
|
81193
|
-
_require12 =
|
|
81243
|
+
_require12 = createRequire13(import.meta.url);
|
|
81194
81244
|
databaseSyncCtor = (() => {
|
|
81195
81245
|
try {
|
|
81196
81246
|
return _require12("node:sqlite").DatabaseSync;
|
|
@@ -86560,8 +86610,8 @@ import { platform as platform4 } from "node:os";
|
|
|
86560
86610
|
import { basename as basename17, dirname as dirname23, join as join108 } from "node:path";
|
|
86561
86611
|
async function resolveSeedAgentsDir() {
|
|
86562
86612
|
try {
|
|
86563
|
-
const { createRequire:
|
|
86564
|
-
const req =
|
|
86613
|
+
const { createRequire: createRequire20 } = await import("node:module");
|
|
86614
|
+
const req = createRequire20(import.meta.url);
|
|
86565
86615
|
const agentsPkgMain = req.resolve("@cleocode/agents/package.json");
|
|
86566
86616
|
const agentsPkgRoot = dirname23(agentsPkgMain);
|
|
86567
86617
|
const candidate = join108(agentsPkgRoot, "seed-agents");
|
|
@@ -86588,8 +86638,8 @@ async function resolveSeedAgentsDir() {
|
|
|
86588
86638
|
async function initAgentDefinition(created, warnings) {
|
|
86589
86639
|
let agentSourceDir = null;
|
|
86590
86640
|
try {
|
|
86591
|
-
const { createRequire:
|
|
86592
|
-
const req =
|
|
86641
|
+
const { createRequire: createRequire20 } = await import("node:module");
|
|
86642
|
+
const req = createRequire20(import.meta.url);
|
|
86593
86643
|
const agentsPkgMain = req.resolve("@cleocode/agents/package.json");
|
|
86594
86644
|
const agentsPkgRoot = dirname23(agentsPkgMain);
|
|
86595
86645
|
const candidate = join108(agentsPkgRoot, "cleo-subagent");
|
|
@@ -86655,8 +86705,8 @@ async function initCoreSkills(created, warnings) {
|
|
|
86655
86705
|
const packageRoot = getPackageRoot();
|
|
86656
86706
|
let ctSkillsRoot = null;
|
|
86657
86707
|
try {
|
|
86658
|
-
const { createRequire:
|
|
86659
|
-
const req =
|
|
86708
|
+
const { createRequire: createRequire20 } = await import("node:module");
|
|
86709
|
+
const req = createRequire20(import.meta.url);
|
|
86660
86710
|
const skillsPkgMain = req.resolve("@cleocode/skills/package.json");
|
|
86661
86711
|
const skillsPkgRoot = dirname23(skillsPkgMain);
|
|
86662
86712
|
if (existsSync108(join108(skillsPkgRoot, "skills.json"))) {
|
|
@@ -87164,8 +87214,8 @@ async function deployStarterBundle(cleoDir, created, warnings) {
|
|
|
87164
87214
|
if (hasCantFiles) return;
|
|
87165
87215
|
let starterBundleSrc = null;
|
|
87166
87216
|
try {
|
|
87167
|
-
const { createRequire:
|
|
87168
|
-
const req =
|
|
87217
|
+
const { createRequire: createRequire20 } = await import("node:module");
|
|
87218
|
+
const req = createRequire20(import.meta.url);
|
|
87169
87219
|
const cleoOsPkgMain = req.resolve("@cleocode/cleo-os/package.json");
|
|
87170
87220
|
const cleoOsPkgRoot = dirname23(cleoOsPkgMain);
|
|
87171
87221
|
const candidate = join108(cleoOsPkgRoot, "starter-bundle");
|
|
@@ -87205,20 +87255,20 @@ async function deployStarterBundle(cleoDir, created, warnings) {
|
|
|
87205
87255
|
}
|
|
87206
87256
|
}
|
|
87207
87257
|
}
|
|
87208
|
-
const identitySrc = join108(starterBundleSrc, "CLEOOS-IDENTITY.md");
|
|
87209
|
-
const identityDst = join108(cleoDir, "CLEOOS-IDENTITY.md");
|
|
87210
|
-
if (existsSync108(identitySrc) && !existsSync108(identityDst)) {
|
|
87211
|
-
await copyFile4(identitySrc, identityDst);
|
|
87212
|
-
}
|
|
87213
87258
|
try {
|
|
87214
|
-
const {
|
|
87215
|
-
const
|
|
87216
|
-
if (
|
|
87217
|
-
|
|
87259
|
+
const { ensureGlobalIdentity: ensureGlobalIdentity2 } = await Promise.resolve().then(() => (init_scaffold(), scaffold_exports));
|
|
87260
|
+
const identityResult = await ensureGlobalIdentity2();
|
|
87261
|
+
if (identityResult.action === "created") {
|
|
87262
|
+
created.push(`identity: ${identityResult.path}`);
|
|
87263
|
+
} else if (identityResult.action === "skipped" && identityResult.details) {
|
|
87264
|
+
warnings.push(`identity skipped: ${identityResult.details}`);
|
|
87218
87265
|
}
|
|
87219
|
-
} catch {
|
|
87266
|
+
} catch (err) {
|
|
87267
|
+
warnings.push(`identity deploy failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
87220
87268
|
}
|
|
87221
|
-
created.push(
|
|
87269
|
+
created.push(
|
|
87270
|
+
"starter-bundle: team + agent .cant files deployed to .cleo/ (identity at global XDG)"
|
|
87271
|
+
);
|
|
87222
87272
|
}
|
|
87223
87273
|
var DIR_SYMLINK_TYPE2;
|
|
87224
87274
|
var init_init = __esm({
|
|
@@ -91350,7 +91400,7 @@ var init_brain_purge = __esm({
|
|
|
91350
91400
|
|
|
91351
91401
|
// packages/core/src/memory/claude-mem-migration.ts
|
|
91352
91402
|
import { existsSync as existsSync111 } from "node:fs";
|
|
91353
|
-
import { createRequire as
|
|
91403
|
+
import { createRequire as createRequire14 } from "node:module";
|
|
91354
91404
|
function typedAll3(db, sql16) {
|
|
91355
91405
|
return db.prepare(sql16).all();
|
|
91356
91406
|
}
|
|
@@ -91580,7 +91630,7 @@ var init_claude_mem_migration = __esm({
|
|
|
91580
91630
|
init_paths();
|
|
91581
91631
|
init_brain_sqlite();
|
|
91582
91632
|
init_brain_search();
|
|
91583
|
-
_require13 =
|
|
91633
|
+
_require13 = createRequire14(import.meta.url);
|
|
91584
91634
|
({ DatabaseSync: DatabaseSync5 } = _require13("node:sqlite"));
|
|
91585
91635
|
VALID_OBSERVATION_TYPES = /* @__PURE__ */ new Set([
|
|
91586
91636
|
"discovery",
|
|
@@ -97334,7 +97384,7 @@ var init_t310_readiness = __esm({
|
|
|
97334
97384
|
// packages/core/src/store/backup-pack.ts
|
|
97335
97385
|
import crypto5 from "node:crypto";
|
|
97336
97386
|
import fs4 from "node:fs";
|
|
97337
|
-
import { createRequire as
|
|
97387
|
+
import { createRequire as createRequire15 } from "node:module";
|
|
97338
97388
|
import os2 from "node:os";
|
|
97339
97389
|
import path4 from "node:path";
|
|
97340
97390
|
function resolveContractsSchemasDir() {
|
|
@@ -97774,7 +97824,7 @@ var init_backup_pack = __esm({
|
|
|
97774
97824
|
init_nexus_sqlite();
|
|
97775
97825
|
init_signaldock_sqlite();
|
|
97776
97826
|
init_t310_readiness();
|
|
97777
|
-
_require14 =
|
|
97827
|
+
_require14 = createRequire15(import.meta.url);
|
|
97778
97828
|
({ DatabaseSync: DatabaseSync6 } = _require14("node:sqlite"));
|
|
97779
97829
|
}
|
|
97780
97830
|
});
|
|
@@ -97843,7 +97893,7 @@ var init_cleanup_legacy = __esm({
|
|
|
97843
97893
|
|
|
97844
97894
|
// packages/core/src/store/migrate-signaldock-to-conduit.ts
|
|
97845
97895
|
import { existsSync as existsSync117, mkdirSync as mkdirSync27, renameSync as renameSync9, unlinkSync as unlinkSync9 } from "node:fs";
|
|
97846
|
-
import { createRequire as
|
|
97896
|
+
import { createRequire as createRequire16 } from "node:module";
|
|
97847
97897
|
import { join as join115 } from "node:path";
|
|
97848
97898
|
function needsSignaldockToConduitMigration(projectRoot) {
|
|
97849
97899
|
const legacyPath = join115(projectRoot, ".cleo", "signaldock.db");
|
|
@@ -98183,7 +98233,7 @@ var init_migrate_signaldock_to_conduit = __esm({
|
|
|
98183
98233
|
init_conduit_sqlite();
|
|
98184
98234
|
init_global_salt();
|
|
98185
98235
|
init_signaldock_sqlite();
|
|
98186
|
-
_require15 =
|
|
98236
|
+
_require15 = createRequire16(import.meta.url);
|
|
98187
98237
|
({ DatabaseSync: DatabaseSync7 } = _require15("node:sqlite"));
|
|
98188
98238
|
PROJECT_TIER_TABLES = [
|
|
98189
98239
|
"messages",
|
|
@@ -101306,6 +101356,16 @@ async function runUpgrade(options = {}) {
|
|
|
101306
101356
|
}
|
|
101307
101357
|
} catch {
|
|
101308
101358
|
}
|
|
101359
|
+
try {
|
|
101360
|
+
const { ensureGlobalIdentity: ensureGlobalIdentity2 } = await Promise.resolve().then(() => (init_scaffold(), scaffold_exports));
|
|
101361
|
+
const identityResult = await ensureGlobalIdentity2();
|
|
101362
|
+
actions.push({
|
|
101363
|
+
action: "global_identity",
|
|
101364
|
+
status: identityResult.action === "created" || identityResult.action === "repaired" ? "applied" : "skipped",
|
|
101365
|
+
details: `${identityResult.path} (${identityResult.details ?? identityResult.action})`
|
|
101366
|
+
});
|
|
101367
|
+
} catch {
|
|
101368
|
+
}
|
|
101309
101369
|
try {
|
|
101310
101370
|
const skillsCreated = [];
|
|
101311
101371
|
const skillsWarnings = [];
|
|
@@ -111107,7 +111167,7 @@ var require__ = __commonJS({
|
|
|
111107
111167
|
// packages/core/src/store/backup-unpack.ts
|
|
111108
111168
|
import crypto6 from "node:crypto";
|
|
111109
111169
|
import fs6 from "node:fs";
|
|
111110
|
-
import { createRequire as
|
|
111170
|
+
import { createRequire as createRequire17 } from "node:module";
|
|
111111
111171
|
import os3 from "node:os";
|
|
111112
111172
|
import path6 from "node:path";
|
|
111113
111173
|
import { default as addFormatsImport2 } from "ajv-formats";
|
|
@@ -111376,7 +111436,7 @@ var init_backup_unpack = __esm({
|
|
|
111376
111436
|
import__ = __toESM(require__(), 1);
|
|
111377
111437
|
init_index_min();
|
|
111378
111438
|
init_backup_crypto();
|
|
111379
|
-
_require16 =
|
|
111439
|
+
_require16 = createRequire17(import.meta.url);
|
|
111380
111440
|
({ DatabaseSync: DatabaseSync8 } = _require16("node:sqlite"));
|
|
111381
111441
|
ajv2020Mod = import__.default;
|
|
111382
111442
|
Ajv2020 = typeof ajv2020Mod.default === "function" ? ajv2020Mod.default : import__.default;
|
|
@@ -112700,7 +112760,7 @@ var init_api_key_kdf = __esm({
|
|
|
112700
112760
|
// packages/core/src/store/agent-registry-accessor.ts
|
|
112701
112761
|
import { randomBytes as randomBytes17 } from "node:crypto";
|
|
112702
112762
|
import { existsSync as existsSync127, mkdirSync as mkdirSync32, readFileSync as readFileSync96, statSync as statSync21, writeFileSync as writeFileSync23 } from "node:fs";
|
|
112703
|
-
import { createRequire as
|
|
112763
|
+
import { createRequire as createRequire18 } from "node:module";
|
|
112704
112764
|
import { join as join123 } from "node:path";
|
|
112705
112765
|
function readMachineKey() {
|
|
112706
112766
|
const keyPath = join123(getCleoHome(), "machine-key");
|
|
@@ -112995,7 +113055,7 @@ var init_agent_registry_accessor = __esm({
|
|
|
112995
113055
|
init_conduit_sqlite();
|
|
112996
113056
|
init_global_salt();
|
|
112997
113057
|
init_signaldock_sqlite();
|
|
112998
|
-
_require17 =
|
|
113058
|
+
_require17 = createRequire18(import.meta.url);
|
|
112999
113059
|
({ DatabaseSync: DatabaseSync9 } = _require17("node:sqlite"));
|
|
113000
113060
|
MACHINE_KEY_LENGTH = 32;
|
|
113001
113061
|
AgentRegistryAccessor = class {
|
|
@@ -131713,7 +131773,7 @@ __export(cli_exports, {
|
|
|
131713
131773
|
});
|
|
131714
131774
|
import { randomUUID as randomUUID14 } from "node:crypto";
|
|
131715
131775
|
import { existsSync as existsSync130 } from "node:fs";
|
|
131716
|
-
import { createRequire as
|
|
131776
|
+
import { createRequire as createRequire19 } from "node:module";
|
|
131717
131777
|
import { dirname as dirname27, join as join127 } from "node:path";
|
|
131718
131778
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
131719
131779
|
import { catalog as catalog4, registerSkillLibraryFromPath } from "@cleocode/caamp";
|
|
@@ -131722,7 +131782,7 @@ function ensureCaampLibrary() {
|
|
|
131722
131782
|
try {
|
|
131723
131783
|
let skillsRoot = null;
|
|
131724
131784
|
try {
|
|
131725
|
-
const req =
|
|
131785
|
+
const req = createRequire19(import.meta.url);
|
|
131726
131786
|
const skillsPkgJson = req.resolve("@cleocode/skills/package.json");
|
|
131727
131787
|
const candidate = dirname27(skillsPkgJson);
|
|
131728
131788
|
if (existsSync130(join127(candidate, "skills.json"))) {
|