@cleocode/cleo 2026.5.2 → 2026.5.4

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 CHANGED
@@ -569,6 +569,13 @@ var init_lafs = __esm({
569
569
  }
570
570
  });
571
571
 
572
+ // packages/contracts/src/operations/admin.ts
573
+ var init_admin = __esm({
574
+ "packages/contracts/src/operations/admin.ts"() {
575
+ "use strict";
576
+ }
577
+ });
578
+
572
579
  // packages/contracts/src/operations/brain.ts
573
580
  var init_brain = __esm({
574
581
  "packages/contracts/src/operations/brain.ts"() {
@@ -583,6 +590,27 @@ var init_conduit = __esm({
583
590
  }
584
591
  });
585
592
 
593
+ // packages/contracts/src/operations/dialectic.ts
594
+ var init_dialectic = __esm({
595
+ "packages/contracts/src/operations/dialectic.ts"() {
596
+ "use strict";
597
+ }
598
+ });
599
+
600
+ // packages/contracts/src/operations/docs.ts
601
+ var init_docs = __esm({
602
+ "packages/contracts/src/operations/docs.ts"() {
603
+ "use strict";
604
+ }
605
+ });
606
+
607
+ // packages/contracts/src/operations/intelligence.ts
608
+ var init_intelligence = __esm({
609
+ "packages/contracts/src/operations/intelligence.ts"() {
610
+ "use strict";
611
+ }
612
+ });
613
+
586
614
  // packages/contracts/src/operations/issues.ts
587
615
  var init_issues = __esm({
588
616
  "packages/contracts/src/operations/issues.ts"() {
@@ -715,6 +743,13 @@ var init_skills = __esm({
715
743
  }
716
744
  });
717
745
 
746
+ // packages/contracts/src/operations/sticky.ts
747
+ var init_sticky = __esm({
748
+ "packages/contracts/src/operations/sticky.ts"() {
749
+ "use strict";
750
+ }
751
+ });
752
+
718
753
  // packages/contracts/src/operations/system.ts
719
754
  var init_system = __esm({
720
755
  "packages/contracts/src/operations/system.ts"() {
@@ -754,8 +789,12 @@ var init_worktree = __esm({
754
789
  var init_operations = __esm({
755
790
  "packages/contracts/src/operations/index.ts"() {
756
791
  "use strict";
792
+ init_admin();
757
793
  init_brain();
758
794
  init_conduit();
795
+ init_dialectic();
796
+ init_docs();
797
+ init_intelligence();
759
798
  init_issues();
760
799
  init_lifecycle();
761
800
  init_llm();
@@ -771,6 +810,7 @@ var init_operations = __esm({
771
810
  init_sentient();
772
811
  init_session();
773
812
  init_skills();
813
+ init_sticky();
774
814
  init_system();
775
815
  init_tasks();
776
816
  init_validate();
@@ -10063,7 +10103,7 @@ function mutateKey(operation) {
10063
10103
  }
10064
10104
  }
10065
10105
  var SMOKE_PROBES, _adminTypedHandler, QUERY_OPS, MUTATE_OPS, AdminHandler;
10066
- var init_admin = __esm({
10106
+ var init_admin2 = __esm({
10067
10107
  "packages/cleo/src/dispatch/domains/admin.ts"() {
10068
10108
  "use strict";
10069
10109
  init_typed();
@@ -12509,7 +12549,7 @@ function docsEnvelopeToResponse(envelope, gateway, operation, startTime) {
12509
12549
  };
12510
12550
  }
12511
12551
  var _docsTypedHandler, QUERY_OPS3, MUTATE_OPS3, DocsHandler;
12512
- var init_docs = __esm({
12552
+ var init_docs2 = __esm({
12513
12553
  "packages/cleo/src/dispatch/domains/docs.ts"() {
12514
12554
  "use strict";
12515
12555
  init_typed();
@@ -12538,7 +12578,6 @@ var init_docs = __esm({
12538
12578
  attachments: attachments.map((m) => ({
12539
12579
  id: m.id,
12540
12580
  sha256: `${m.sha256.slice(0, 8)}\u2026`,
12541
- // Cast: contracts AttachmentKind doesn't include 'llmtxt-doc' (contracts gap T1529)
12542
12581
  kind: m.attachment.kind,
12543
12582
  mime: m.attachment.kind === "local-file" || m.attachment.kind === "blob" ? m.attachment.mime : m.attachment.mime ?? "\u2014",
12544
12583
  size: m.attachment.kind === "local-file" || m.attachment.kind === "blob" ? m.attachment.size : void 0,
@@ -12648,10 +12687,19 @@ var init_docs = __esm({
12648
12687
  const backend = await resolveAttachmentBackend();
12649
12688
  return lafsSuccess(
12650
12689
  {
12651
- // Cast: core's AttachmentMetadata vs contracts/operations/docs AttachmentMetadata differ
12652
- // in their nested attachment field structure (T1529 contracts gap). The runtime
12653
- // value is compatible for all callers; the two interfaces diverged at the type level.
12654
- metadata,
12690
+ // Project the domain AttachmentMetadata (nested `attachment` object) into the
12691
+ // flat DocsAttachmentRow wire format consumed by CLI + HTTP callers.
12692
+ metadata: {
12693
+ id: metadata.id,
12694
+ sha256: metadata.sha256,
12695
+ kind: metadata.attachment.kind,
12696
+ mime: metadata.attachment.kind === "local-file" || metadata.attachment.kind === "blob" ? metadata.attachment.mime : metadata.attachment.mime,
12697
+ size: metadata.attachment.kind === "local-file" || metadata.attachment.kind === "blob" ? metadata.attachment.size : void 0,
12698
+ description: metadata.attachment.description,
12699
+ labels: metadata.attachment.labels,
12700
+ createdAt: metadata.createdAt,
12701
+ refCount: metadata.refCount
12702
+ },
12655
12703
  path: storagePath,
12656
12704
  sizeBytes: fetchResult.bytes.length,
12657
12705
  ...bytesBase64 !== void 0 ? { bytesBase64 } : {},
@@ -12902,7 +12950,7 @@ import {
12902
12950
  suggestGateFocus
12903
12951
  } from "@cleocode/core/internal";
12904
12952
  var IntelligenceHandler;
12905
- var init_intelligence = __esm({
12953
+ var init_intelligence2 = __esm({
12906
12954
  "packages/cleo/src/dispatch/domains/intelligence.ts"() {
12907
12955
  "use strict";
12908
12956
  init_base();
@@ -21134,12 +21182,12 @@ async function orchestrateRejectOp(params) {
21134
21182
  async function orchestrateClassify(request, context, projectRoot) {
21135
21183
  try {
21136
21184
  const { getCleoCantWorkflowsDir } = await import("@cleocode/core/internal");
21137
- const { readFileSync: readFileSync14, readdirSync: readdirSync3, existsSync: existsSync11 } = await import("node:fs");
21185
+ const { readFileSync: readFileSync14, readdirSync: readdirSync3, existsSync: existsSync12 } = await import("node:fs");
21138
21186
  const { join: join20 } = await import("node:path");
21139
21187
  const workflowsDir = getCleoCantWorkflowsDir();
21140
21188
  const combined = `${request} ${context ?? ""}`.toLowerCase();
21141
21189
  const matches = [];
21142
- if (existsSync11(workflowsDir)) {
21190
+ if (existsSync12(workflowsDir)) {
21143
21191
  const files = readdirSync3(workflowsDir).filter((f) => f.endsWith(".cant"));
21144
21192
  for (const file of files) {
21145
21193
  try {
@@ -21159,7 +21207,7 @@ async function orchestrateClassify(request, context, projectRoot) {
21159
21207
  }
21160
21208
  }
21161
21209
  const localCantDir = join20(projectRoot, CLEO_DIR_NAME, WORKFLOWS_SUBDIR);
21162
- if (existsSync11(localCantDir)) {
21210
+ if (existsSync12(localCantDir)) {
21163
21211
  const files = readdirSync3(localCantDir).filter((f) => f.endsWith(".cant"));
21164
21212
  for (const file of files) {
21165
21213
  try {
@@ -23882,7 +23930,7 @@ function envelopeToDispatch(envelope, gateway, operation, startTime) {
23882
23930
  };
23883
23931
  }
23884
23932
  var log3, stickyCoreOps, _stickyTypedHandler, QUERY_OPS8, MUTATE_OPS8, CONVERT_TARGET_TO_KEY, StickyHandler;
23885
- var init_sticky = __esm({
23933
+ var init_sticky2 = __esm({
23886
23934
  "packages/cleo/src/dispatch/domains/sticky.ts"() {
23887
23935
  "use strict";
23888
23936
  init_typed();
@@ -25137,12 +25185,12 @@ function createDomainHandlers() {
25137
25185
  var init_domains = __esm({
25138
25186
  "packages/cleo/src/dispatch/domains/index.ts"() {
25139
25187
  "use strict";
25140
- init_admin();
25188
+ init_admin2();
25141
25189
  init_check();
25142
25190
  init_conduit2();
25143
25191
  init_diagnostics();
25144
- init_docs();
25145
- init_intelligence();
25192
+ init_docs2();
25193
+ init_intelligence2();
25146
25194
  init_memory2();
25147
25195
  init_nexus2();
25148
25196
  init_orchestrate2();
@@ -25151,7 +25199,7 @@ var init_domains = __esm({
25151
25199
  init_release2();
25152
25200
  init_sentient2();
25153
25201
  init_session3();
25154
- init_sticky();
25202
+ init_sticky2();
25155
25203
  init_tasks3();
25156
25204
  init_tools();
25157
25205
  }
@@ -27659,12 +27707,12 @@ var registerCommand = defineCommand({
27659
27707
  transportConfig: {},
27660
27708
  isActive: true
27661
27709
  });
27662
- const { existsSync: existsSync11, mkdirSync: mkdirSync5, writeFileSync: writeFileSync5 } = await import("node:fs");
27710
+ const { existsSync: existsSync12, mkdirSync: mkdirSync5, writeFileSync: writeFileSync5 } = await import("node:fs");
27663
27711
  const { join: join20 } = await import("node:path");
27664
27712
  const cantDir = join20(CLEO_DIR_NAME, AGENTS_SUBDIR);
27665
27713
  const cantPath = join20(cantDir, `${agentId}.cant`);
27666
27714
  let cantScaffolded = false;
27667
- if (!existsSync11(cantPath)) {
27715
+ if (!existsSync12(cantPath)) {
27668
27716
  mkdirSync5(cantDir, { recursive: true });
27669
27717
  const role = classification ?? "specialist";
27670
27718
  const cantContent = `---
@@ -27724,7 +27772,7 @@ agent ${agentId}:
27724
27772
  data: {
27725
27773
  agentId: credential.agentId,
27726
27774
  displayName: credential.displayName,
27727
- cantFile: cantScaffolded ? cantPath : existsSync11(cantPath) ? cantPath : null,
27775
+ cantFile: cantScaffolded ? cantPath : existsSync12(cantPath) ? cantPath : null,
27728
27776
  cantScaffolded
27729
27777
  }
27730
27778
  },
@@ -27843,7 +27891,7 @@ var startCommand = defineCommand({
27843
27891
  try {
27844
27892
  const { AgentRegistryAccessor, getDb: getDb3 } = await import("@cleocode/core/internal");
27845
27893
  const { createRuntime } = await import("@cleocode/runtime");
27846
- const { existsSync: existsSync11, readFileSync: readFileSync14 } = await import("node:fs");
27894
+ const { existsSync: existsSync12, readFileSync: readFileSync14 } = await import("node:fs");
27847
27895
  const { join: join20 } = await import("node:path");
27848
27896
  await getDb3();
27849
27897
  const registry = new AgentRegistryAccessor(process.cwd());
@@ -27865,7 +27913,7 @@ var startCommand = defineCommand({
27865
27913
  let profile = null;
27866
27914
  let cantValidation = null;
27867
27915
  const cantPath = args.cant ?? join20(CLEO_DIR_NAME, AGENTS_SUBDIR, `${args.agentId}.cant`);
27868
- if (existsSync11(cantPath)) {
27916
+ if (existsSync12(cantPath)) {
27869
27917
  profile = readFileSync14(cantPath, "utf-8");
27870
27918
  try {
27871
27919
  const cantModule = await import("@cleocode/cant");
@@ -28389,7 +28437,7 @@ var workCommand = defineCommand({
28389
28437
  try {
28390
28438
  const { AgentRegistryAccessor, getDb: getDb3 } = await import("@cleocode/core/internal");
28391
28439
  const { createRuntime } = await import("@cleocode/runtime");
28392
- const { existsSync: existsSync11 } = await import("node:fs");
28440
+ const { existsSync: existsSync12 } = await import("node:fs");
28393
28441
  const { join: join20 } = await import("node:path");
28394
28442
  const { execFile: execFile2 } = await import("node:child_process");
28395
28443
  const { promisify: promisify2 } = await import("node:util");
@@ -28411,7 +28459,7 @@ var workCommand = defineCommand({
28411
28459
  await registry.update(args.agentId, { isActive: true });
28412
28460
  await registry.markUsed(args.agentId);
28413
28461
  const cantPath = join20(CLEO_DIR_NAME, AGENTS_SUBDIR, `${args.agentId}.cant`);
28414
- const hasProfile = existsSync11(cantPath);
28462
+ const hasProfile = existsSync12(cantPath);
28415
28463
  const runtime = await createRuntime(registry, {
28416
28464
  agentId: args.agentId,
28417
28465
  pollIntervalMs: 5e3,
@@ -29261,11 +29309,11 @@ var installCommand = defineCommand({
29261
29309
  async run({ args }) {
29262
29310
  let tempDir = null;
29263
29311
  try {
29264
- const { existsSync: existsSync11, mkdirSync: mkdirSync5, statSync, readdirSync: readdirSync3, copyFileSync } = await import("node:fs");
29312
+ const { existsSync: existsSync12, mkdirSync: mkdirSync5, statSync, readdirSync: readdirSync3, copyFileSync } = await import("node:fs");
29265
29313
  const { join: join20, basename, resolve: resolve5, extname } = await import("node:path");
29266
29314
  const { tmpdir } = await import("node:os");
29267
29315
  const resolvedPath = resolve5(args.path);
29268
- if (!existsSync11(resolvedPath)) {
29316
+ if (!existsSync12(resolvedPath)) {
29269
29317
  cliOutput(
29270
29318
  {
29271
29319
  success: false,
@@ -29326,7 +29374,7 @@ var installCommand = defineCommand({
29326
29374
  }
29327
29375
  const agentName = topLevel[0];
29328
29376
  const personaPath = join20(tempDir, agentName, "persona.cant");
29329
- if (!existsSync11(personaPath)) {
29377
+ if (!existsSync12(personaPath)) {
29330
29378
  cliOutput(
29331
29379
  {
29332
29380
  success: false,
@@ -29345,7 +29393,7 @@ var installCommand = defineCommand({
29345
29393
  } else if (stat2.isDirectory()) {
29346
29394
  const agentName = basename(resolvedPath);
29347
29395
  const personaPath = join20(resolvedPath, "persona.cant");
29348
- if (!existsSync11(personaPath)) {
29396
+ if (!existsSync12(personaPath)) {
29349
29397
  cliOutput(
29350
29398
  {
29351
29399
  success: false,
@@ -29488,11 +29536,11 @@ var packCommand = defineCommand({
29488
29536
  },
29489
29537
  async run({ args }) {
29490
29538
  try {
29491
- const { existsSync: existsSync11, statSync } = await import("node:fs");
29539
+ const { existsSync: existsSync12, statSync } = await import("node:fs");
29492
29540
  const { resolve: resolve5, basename, dirname: dirname10 } = await import("node:path");
29493
29541
  const { execFileSync: execFileSync5 } = await import("node:child_process");
29494
29542
  const resolvedDir = resolve5(args.dir);
29495
- if (!existsSync11(resolvedDir) || !statSync(resolvedDir).isDirectory()) {
29543
+ if (!existsSync12(resolvedDir) || !statSync(resolvedDir).isDirectory()) {
29496
29544
  cliOutput(
29497
29545
  {
29498
29546
  success: false,
@@ -29508,7 +29556,7 @@ var packCommand = defineCommand({
29508
29556
  }
29509
29557
  const { join: join20 } = await import("node:path");
29510
29558
  const personaPath = join20(resolvedDir, "persona.cant");
29511
- if (!existsSync11(personaPath)) {
29559
+ if (!existsSync12(personaPath)) {
29512
29560
  cliOutput(
29513
29561
  {
29514
29562
  success: false,
@@ -29624,7 +29672,7 @@ var createCommand = defineCommand({
29624
29672
  },
29625
29673
  async run({ args }) {
29626
29674
  try {
29627
- const { existsSync: existsSync11, mkdirSync: mkdirSync5, writeFileSync: writeFileSync5 } = await import("node:fs");
29675
+ const { existsSync: existsSync12, mkdirSync: mkdirSync5, writeFileSync: writeFileSync5 } = await import("node:fs");
29628
29676
  const { join: join20 } = await import("node:path");
29629
29677
  const { homedir: homedir6 } = await import("node:os");
29630
29678
  const name = args.name;
@@ -29691,7 +29739,7 @@ var createCommand = defineCommand({
29691
29739
  targetRoot = join20(process.cwd(), CLEO_DIR_NAME, CANT_AGENTS_SUBDIR);
29692
29740
  }
29693
29741
  const agentDir = join20(targetRoot, name);
29694
- if (existsSync11(agentDir)) {
29742
+ if (existsSync12(agentDir)) {
29695
29743
  cliOutput(
29696
29744
  {
29697
29745
  success: false,
@@ -29835,10 +29883,10 @@ var mintCommand = defineCommand({
29835
29883
  },
29836
29884
  async run({ args }) {
29837
29885
  try {
29838
- const { existsSync: existsSync11, readFileSync: readFileSync14, mkdirSync: mkdirSync5 } = await import("node:fs");
29886
+ const { existsSync: existsSync12, readFileSync: readFileSync14, mkdirSync: mkdirSync5 } = await import("node:fs");
29839
29887
  const { resolve: resolve5, join: join20 } = await import("node:path");
29840
29888
  const specPath = resolve5(args.spec);
29841
- if (!existsSync11(specPath)) {
29889
+ if (!existsSync12(specPath)) {
29842
29890
  const errEnv = {
29843
29891
  success: false,
29844
29892
  error: { code: "E_NOT_FOUND", message: `spec file not found: ${specPath}` },
@@ -34024,6 +34072,7 @@ var currentCommand = defineCommand({
34024
34072
  });
34025
34073
 
34026
34074
  // packages/cleo/src/cli/commands/daemon.ts
34075
+ import { existsSync as existsSync8 } from "node:fs";
34027
34076
  import { homedir as homedir2 } from "node:os";
34028
34077
  import { join as join9 } from "node:path";
34029
34078
  import { fileURLToPath as fileURLToPath3 } from "node:url";
@@ -34044,11 +34093,15 @@ async function showDaemonStatus(cleoDir, projectRoot, json2) {
34044
34093
  duplicateEpicGroups: 0,
34045
34094
  worktreesPruned: 0
34046
34095
  };
34096
+ let supervisesStudio = null;
34097
+ let studioStatus = null;
34047
34098
  try {
34048
34099
  const sentientStatus = await getSentientDaemonStatus(projectRoot);
34049
34100
  hygieneLastRunAt = sentientStatus.hygieneLastRunAt;
34050
34101
  hygieneSummary = sentientStatus.hygieneSummary;
34051
34102
  hygieneStats = sentientStatus.hygieneStats;
34103
+ supervisesStudio = sentientStatus.supervisesStudio;
34104
+ studioStatus = sentientStatus.studioStatus;
34052
34105
  } catch {
34053
34106
  }
34054
34107
  const result = {
@@ -34059,6 +34112,10 @@ async function showDaemonStatus(cleoDir, projectRoot, json2) {
34059
34112
  lastRunAt: hygieneLastRunAt,
34060
34113
  summary: hygieneSummary,
34061
34114
  stats: hygieneStats
34115
+ },
34116
+ studio: {
34117
+ supervises: supervisesStudio,
34118
+ status: studioStatus
34062
34119
  }
34063
34120
  }
34064
34121
  };
@@ -34082,6 +34139,15 @@ WARNING: Disk threshold breached. Run 'cleo gc run' to reclaim space.
34082
34139
  `
34083
34140
  );
34084
34141
  }
34142
+ if (supervisesStudio !== null) {
34143
+ process.stdout.write(`
34144
+ Studio Supervision:
34145
+ `);
34146
+ process.stdout.write(` Enabled: ${supervisesStudio ? "yes" : "no"}
34147
+ `);
34148
+ process.stdout.write(` Status: ${studioStatus ?? "unknown"}
34149
+ `);
34150
+ }
34085
34151
  process.stdout.write(`
34086
34152
  Hygiene Loop (cross-project):
34087
34153
  `);
@@ -34128,9 +34194,19 @@ Hygiene Loop (cross-project):
34128
34194
  }
34129
34195
  }
34130
34196
  function resolveDaemonInstallerScript() {
34131
- const __filename = fileURLToPath3(import.meta.url);
34132
- const pkgRoot = join9(__filename, "..", "..", "..", "..");
34133
- return join9(pkgRoot, "scripts", "install-daemon-service.mjs");
34197
+ const filePath = fileURLToPath3(import.meta.url);
34198
+ const candidate1 = join9(filePath, "..", "..", "..", "scripts", "install-daemon-service.mjs");
34199
+ if (existsSync8(candidate1)) return candidate1;
34200
+ const candidate2 = join9(
34201
+ filePath,
34202
+ "..",
34203
+ "..",
34204
+ "..",
34205
+ "..",
34206
+ "scripts",
34207
+ "install-daemon-service.mjs"
34208
+ );
34209
+ return candidate2;
34134
34210
  }
34135
34211
  var startCommand3 = defineCommand({
34136
34212
  meta: { name: "start", description: "Spawn the GC daemon as a detached background process" },
@@ -34733,14 +34809,14 @@ var detectCommand2 = defineCommand({
34733
34809
 
34734
34810
  // packages/cleo/src/cli/commands/detect-drift.ts
34735
34811
  init_src();
34736
- import { existsSync as existsSync8, readdirSync, readFileSync as readFileSync9 } from "node:fs";
34812
+ import { existsSync as existsSync9, readdirSync, readFileSync as readFileSync9 } from "node:fs";
34737
34813
  import { dirname as dirname6, join as join10 } from "node:path";
34738
34814
  init_paths();
34739
34815
  init_renderers();
34740
34816
  function findProjectRoot() {
34741
34817
  let currentDir = process.cwd();
34742
34818
  while (currentDir !== "/") {
34743
- if (existsSync8(join10(currentDir, "package.json"))) {
34819
+ if (existsSync9(join10(currentDir, "package.json"))) {
34744
34820
  return currentDir;
34745
34821
  }
34746
34822
  const parent = dirname6(currentDir);
@@ -34756,7 +34832,7 @@ var detectDriftCommand = defineCommand({
34756
34832
  },
34757
34833
  async run() {
34758
34834
  const projectRoot = findProjectRoot();
34759
- const isCleoRepo = existsSync8(join10(projectRoot, "packages", "cleo", "src"));
34835
+ const isCleoRepo = existsSync9(join10(projectRoot, "packages", "cleo", "src"));
34760
34836
  const cleoSrcRoot = isCleoRepo ? join10(projectRoot, "packages", "cleo", "src") : join10(projectRoot, "src");
34761
34837
  const safeRead = (filePath) => {
34762
34838
  try {
@@ -34772,7 +34848,7 @@ var detectDriftCommand = defineCommand({
34772
34848
  recommendations: []
34773
34849
  };
34774
34850
  const injPath = join10(projectRoot, CLEO_DIR_NAME, TEMPLATES_SUBDIR, CLEO_INJECTION_MD);
34775
- if (existsSync8(injPath)) {
34851
+ if (existsSync9(injPath)) {
34776
34852
  const content = safeRead(injPath);
34777
34853
  userResult.checks.push({
34778
34854
  name: "Agent injection",
@@ -34826,7 +34902,7 @@ var detectDriftCommand = defineCommand({
34826
34902
  const specPath = join10(projectRoot, "docs", "specs", "CLEO-OPERATION-CONSTITUTION.md");
34827
34903
  const registryPath = join10(cleoSrcRoot, "dispatch", "registry.ts");
34828
34904
  const dispatchDomainsDir = join10(cleoSrcRoot, "dispatch", "domains");
34829
- if (!existsSync8(specPath)) {
34905
+ if (!existsSync9(specPath)) {
34830
34906
  addCheck("Gateway-to-spec sync", "fail", "CLEO-OPERATION-CONSTITUTION.md missing", [
34831
34907
  {
34832
34908
  severity: "error",
@@ -34836,7 +34912,7 @@ var detectDriftCommand = defineCommand({
34836
34912
  recommendation: "Create docs/specs/CLEO-OPERATION-CONSTITUTION.md with canonical operation definitions"
34837
34913
  }
34838
34914
  ]);
34839
- } else if (!existsSync8(registryPath) || !existsSync8(dispatchDomainsDir)) {
34915
+ } else if (!existsSync9(registryPath) || !existsSync9(dispatchDomainsDir)) {
34840
34916
  addCheck("Gateway-to-spec sync", "fail", "Dispatch registry or domains missing", [
34841
34917
  {
34842
34918
  severity: "error",
@@ -34896,7 +34972,7 @@ var detectDriftCommand = defineCommand({
34896
34972
  try {
34897
34973
  const cliDir = join10(cleoSrcRoot, "cli", "commands");
34898
34974
  const coreDir = isCleoRepo ? join10(projectRoot, "packages", "core", "src") : join10(projectRoot, "src", "core");
34899
- if (!existsSync8(cliDir)) {
34975
+ if (!existsSync9(cliDir)) {
34900
34976
  addCheck("CLI-to-core sync", "fail", "CLI commands directory missing", [
34901
34977
  {
34902
34978
  severity: "error",
@@ -34905,7 +34981,7 @@ var detectDriftCommand = defineCommand({
34905
34981
  recommendation: "Verify TypeScript source structure is intact"
34906
34982
  }
34907
34983
  ]);
34908
- } else if (!existsSync8(coreDir)) {
34984
+ } else if (!existsSync9(coreDir)) {
34909
34985
  addCheck("CLI-to-core sync", "fail", "Core directory missing", [
34910
34986
  {
34911
34987
  severity: "error",
@@ -34923,7 +34999,7 @@ var detectDriftCommand = defineCommand({
34923
34999
  }
34924
35000
  try {
34925
35001
  const domainsDir = join10(cleoSrcRoot, "dispatch", "domains");
34926
- if (!existsSync8(domainsDir)) {
35002
+ if (!existsSync9(domainsDir)) {
34927
35003
  addCheck("Domain handler coverage", "fail", "Dispatch domains directory missing", [
34928
35004
  {
34929
35005
  severity: "error",
@@ -34941,7 +35017,7 @@ var detectDriftCommand = defineCommand({
34941
35017
  }
34942
35018
  try {
34943
35019
  const matrixPath = join10(cleoSrcRoot, "dispatch", "lib", "capability-matrix.ts");
34944
- if (!existsSync8(matrixPath)) {
35020
+ if (!existsSync9(matrixPath)) {
34945
35021
  addCheck("Capability matrix", "fail", "Capability matrix missing", [
34946
35022
  {
34947
35023
  severity: "error",
@@ -34958,7 +35034,7 @@ var detectDriftCommand = defineCommand({
34958
35034
  }
34959
35035
  try {
34960
35036
  const schemaPath = join10(projectRoot, "src", "store", "schema.ts");
34961
- if (!existsSync8(schemaPath)) {
35037
+ if (!existsSync9(schemaPath)) {
34962
35038
  addCheck("Schema validation", "fail", "Schema definition missing", [
34963
35039
  {
34964
35040
  severity: "error",
@@ -34995,7 +35071,7 @@ var detectDriftCommand = defineCommand({
34995
35071
  const visionPath = join10(projectRoot, "docs", "concepts", "CLEO-VISION.md");
34996
35072
  const specPath = join10(projectRoot, "docs", "specs", "CLEO-PORTABLE-PROJECT-BRAIN-SPEC.md");
34997
35073
  const issues = [];
34998
- if (!existsSync8(visionPath)) {
35074
+ if (!existsSync9(visionPath)) {
34999
35075
  issues.push({
35000
35076
  severity: "error",
35001
35077
  category: "vision",
@@ -35004,7 +35080,7 @@ var detectDriftCommand = defineCommand({
35004
35080
  recommendation: "Create docs/concepts/CLEO-VISION.md with project vision"
35005
35081
  });
35006
35082
  }
35007
- if (!existsSync8(specPath)) {
35083
+ if (!existsSync9(specPath)) {
35008
35084
  issues.push({
35009
35085
  severity: "error",
35010
35086
  category: "spec",
@@ -35049,7 +35125,7 @@ var detectDriftCommand = defineCommand({
35049
35125
  }
35050
35126
  try {
35051
35127
  const injectionPath = join10(projectRoot, CLEO_DIR_NAME, TEMPLATES_SUBDIR, CLEO_INJECTION_MD);
35052
- if (!existsSync8(injectionPath)) {
35128
+ if (!existsSync9(injectionPath)) {
35053
35129
  addCheck("Agent injection", "fail", "Agent injection template missing", [
35054
35130
  {
35055
35131
  severity: "error",
@@ -35079,7 +35155,7 @@ var detectDriftCommand = defineCommand({
35079
35155
  }
35080
35156
  try {
35081
35157
  const exitCodesPath = join10(cleoSrcRoot, "dispatch", "lib", "exit-codes.ts");
35082
- if (!existsSync8(exitCodesPath)) {
35158
+ if (!existsSync9(exitCodesPath)) {
35083
35159
  addCheck("Exit codes", "fail", "Exit codes definition missing", [
35084
35160
  {
35085
35161
  severity: "error",
@@ -36776,7 +36852,7 @@ var gcCommand = defineCommand({
36776
36852
  // packages/cleo/src/cli/commands/generate-changelog.ts
36777
36853
  init_src();
36778
36854
  import { execFileSync as execFileSync2 } from "node:child_process";
36779
- import { existsSync as existsSync9, mkdirSync as mkdirSync3, readFileSync as readFileSync10, writeFileSync as writeFileSync3 } from "node:fs";
36855
+ import { existsSync as existsSync10, mkdirSync as mkdirSync3, readFileSync as readFileSync10, writeFileSync as writeFileSync3 } from "node:fs";
36780
36856
  import { dirname as dirname8, join as join13 } from "node:path";
36781
36857
  import { CleoError as CleoError4, formatError as formatError6, getConfigPath as getConfigPath2, getProjectRoot as getProjectRoot23 } from "@cleocode/core";
36782
36858
  init_renderers();
@@ -36937,7 +37013,7 @@ var generateChangelogCommand = defineCommand({
36937
37013
  const dryRun = args["dry-run"] === true;
36938
37014
  const sourceFile = getChangelogSource();
36939
37015
  const sourcePath = join13(getProjectRoot23(), sourceFile);
36940
- if (!existsSync9(sourcePath)) {
37016
+ if (!existsSync10(sourcePath)) {
36941
37017
  throw new CleoError4(4 /* NOT_FOUND */, `Changelog source not found: ${sourcePath}`);
36942
37018
  }
36943
37019
  const sourceContent = readFileSync10(sourcePath, "utf-8");
@@ -38388,7 +38464,7 @@ var mapCommand = defineCommand({
38388
38464
 
38389
38465
  // packages/cleo/src/cli/commands/memory.ts
38390
38466
  import { createHash as createHash2 } from "node:crypto";
38391
- import { existsSync as existsSync10, mkdirSync as mkdirSync4, readdirSync as readdirSync2, readFileSync as readFileSync11, writeFileSync as writeFileSync4 } from "node:fs";
38467
+ import { existsSync as existsSync11, mkdirSync as mkdirSync4, readdirSync as readdirSync2, readFileSync as readFileSync11, writeFileSync as writeFileSync4 } from "node:fs";
38392
38468
  import { homedir as homedir4 } from "node:os";
38393
38469
  import { join as join14 } from "node:path";
38394
38470
  import {
@@ -38433,7 +38509,7 @@ ${body}`).digest("hex").slice(0, 16);
38433
38509
  }
38434
38510
  function loadImportHashes(stateFile) {
38435
38511
  try {
38436
- if (!existsSync10(stateFile)) return /* @__PURE__ */ new Set();
38512
+ if (!existsSync11(stateFile)) return /* @__PURE__ */ new Set();
38437
38513
  const raw = readFileSync11(stateFile, "utf-8");
38438
38514
  const parsed = JSON.parse(raw);
38439
38515
  return new Set(parsed.hashes);
@@ -38443,7 +38519,7 @@ function loadImportHashes(stateFile) {
38443
38519
  }
38444
38520
  function saveImportHashes(stateFile, hashes) {
38445
38521
  const dir = stateFile.slice(0, stateFile.lastIndexOf("/"));
38446
- if (!existsSync10(dir)) mkdirSync4(dir, { recursive: true });
38522
+ if (!existsSync11(dir)) mkdirSync4(dir, { recursive: true });
38447
38523
  writeFileSync4(stateFile, JSON.stringify({ hashes: [...hashes] }, null, 2), "utf-8");
38448
38524
  }
38449
38525
  var storeCommand = defineCommand({
@@ -39693,7 +39769,7 @@ var importCommand3 = defineCommand({
39693
39769
  const isJson = !!args.json;
39694
39770
  const projectRoot = getProjectRoot24();
39695
39771
  const stateFile = join14(projectRoot, CLEO_DIR_NAME, MIGRATE_MEMORY_HASHES_JSON);
39696
- if (!existsSync10(sourceDir)) {
39772
+ if (!existsSync11(sourceDir)) {
39697
39773
  const msg = `Source directory not found: ${sourceDir}`;
39698
39774
  if (isJson) {
39699
39775
  console.log(JSON.stringify({ success: false, error: msg }));