@cleocode/cleo 2026.5.81 → 2026.5.82

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
@@ -16086,10 +16086,11 @@ var init_check = __esm({
16086
16086
  });
16087
16087
 
16088
16088
  // packages/cleo/src/dispatch/domains/conduit.ts
16089
+ import { getProjectRoot as getProjectRoot4 } from "@cleocode/core";
16089
16090
  async function _resolveCredential(agentId) {
16090
16091
  const { AgentRegistryAccessor, getDb: getDb3 } = await import("@cleocode/core/internal");
16091
16092
  await getDb3();
16092
- const registry = new AgentRegistryAccessor(process.cwd());
16093
+ const registry = new AgentRegistryAccessor(getProjectRoot4());
16093
16094
  const credential = agentId ? await registry.get(agentId) : await registry.getActive();
16094
16095
  if (!credential) {
16095
16096
  throw new Error(
@@ -16102,7 +16103,7 @@ async function getStatusImpl(agentId) {
16102
16103
  const credential = await _resolveCredential(agentId);
16103
16104
  const pollerRunning = activePoller !== null && activeAgentId === credential.agentId;
16104
16105
  const { LocalTransport } = await import("@cleocode/core/conduit");
16105
- if (LocalTransport.isAvailable(process.cwd())) {
16106
+ if (LocalTransport.isAvailable(getProjectRoot4())) {
16106
16107
  const transport = new LocalTransport();
16107
16108
  await transport.connect({
16108
16109
  agentId: credential.agentId,
@@ -16160,7 +16161,7 @@ async function getStatusImpl(agentId) {
16160
16161
  async function peekImpl(agentId, limit) {
16161
16162
  const credential = await _resolveCredential(agentId);
16162
16163
  const { LocalTransport } = await import("@cleocode/core/conduit");
16163
- if (LocalTransport.isAvailable(process.cwd())) {
16164
+ if (LocalTransport.isAvailable(getProjectRoot4())) {
16164
16165
  const transport = new LocalTransport();
16165
16166
  await transport.connect({
16166
16167
  agentId: credential.agentId,
@@ -16232,7 +16233,7 @@ async function startPollingImpl(agentId, pollIntervalMs, groupConversationIds) {
16232
16233
  const { LocalTransport } = await import("@cleocode/core/conduit");
16233
16234
  let transport;
16234
16235
  let transportName = "http";
16235
- if (LocalTransport.isAvailable(process.cwd())) {
16236
+ if (LocalTransport.isAvailable(getProjectRoot4())) {
16236
16237
  const local = new LocalTransport();
16237
16238
  await local.connect({
16238
16239
  agentId: credential.agentId,
@@ -16291,7 +16292,7 @@ async function subscribeTopicImpl(topicName, agentId, _filter) {
16291
16292
  }
16292
16293
  const credential = await _resolveCredential(agentId);
16293
16294
  const { LocalTransport } = await import("@cleocode/core/conduit");
16294
- if (!LocalTransport.isAvailable(process.cwd())) {
16295
+ if (!LocalTransport.isAvailable(getProjectRoot4())) {
16295
16296
  return {
16296
16297
  success: false,
16297
16298
  error: { code: "E_CONDUIT", message: "conduit.db not found \u2014 run: cleo init" }
@@ -16332,7 +16333,7 @@ async function publishToTopicImpl(topicName, content, kind, payload, agentId) {
16332
16333
  }
16333
16334
  const credential = await _resolveCredential(agentId);
16334
16335
  const { LocalTransport } = await import("@cleocode/core/conduit");
16335
- if (!LocalTransport.isAvailable(process.cwd())) {
16336
+ if (!LocalTransport.isAvailable(getProjectRoot4())) {
16336
16337
  return {
16337
16338
  success: false,
16338
16339
  error: { code: "E_CONDUIT", message: "conduit.db not found \u2014 run: cleo init" }
@@ -16370,7 +16371,7 @@ async function listenTopicImpl(topicName, agentId, limit, since) {
16370
16371
  const startMs = Date.now();
16371
16372
  const credential = await _resolveCredential(agentId);
16372
16373
  const { LocalTransport } = await import("@cleocode/core/conduit");
16373
- if (!LocalTransport.isAvailable(process.cwd())) {
16374
+ if (!LocalTransport.isAvailable(getProjectRoot4())) {
16374
16375
  return {
16375
16376
  success: false,
16376
16377
  error: { code: "E_CONDUIT", message: "conduit.db not found \u2014 run: cleo init" }
@@ -16415,7 +16416,7 @@ async function sendMessageImpl(content, to, conversationId, agentId) {
16415
16416
  }
16416
16417
  const credential = await _resolveCredential(agentId);
16417
16418
  const { LocalTransport } = await import("@cleocode/core/conduit");
16418
- if (LocalTransport.isAvailable(process.cwd())) {
16419
+ if (LocalTransport.isAvailable(getProjectRoot4())) {
16419
16420
  const transport = new LocalTransport();
16420
16421
  await transport.connect({
16421
16422
  agentId: credential.agentId,
@@ -16669,7 +16670,7 @@ import {
16669
16670
  createAttachmentStoreV2,
16670
16671
  generateDocsLlmsTxt,
16671
16672
  getCleoDirAbsolute,
16672
- getProjectRoot as getProjectRoot4,
16673
+ getProjectRoot as getProjectRoot5,
16673
16674
  resolveAttachmentBackend
16674
16675
  } from "@cleocode/core/internal";
16675
16676
  function inferOwnerType(ownerId) {
@@ -16782,7 +16783,7 @@ var init_docs2 = __esm({
16782
16783
  if (!forId) {
16783
16784
  return lafsError("E_INVALID_INPUT", "--for <taskId|epicId> is required", "generate");
16784
16785
  }
16785
- const cwd = getProjectRoot4();
16786
+ const cwd = getProjectRoot5();
16786
16787
  const result = await generateDocsLlmsTxt({ ownerId: forId, cwd });
16787
16788
  let attachmentId;
16788
16789
  let attachmentSha256;
@@ -16848,7 +16849,7 @@ var init_docs2 = __esm({
16848
16849
  if (!fetchResult || !metadata) {
16849
16850
  return lafsError("E_NOT_FOUND", `Attachment not found: ${ref}`, "fetch");
16850
16851
  }
16851
- const cwd = getProjectRoot4();
16852
+ const cwd = getProjectRoot5();
16852
16853
  const cleoDir = getCleoDirAbsolute(cwd);
16853
16854
  let storagePath;
16854
16855
  if (metadata.attachment.kind === "local-file") {
@@ -16938,7 +16939,7 @@ var init_docs2 = __esm({
16938
16939
  const meta = await store.put(bytes, attachment, ownerType, ownerId, attachedBy);
16939
16940
  let backend = "legacy";
16940
16941
  try {
16941
- const v2 = createAttachmentStoreV2(getProjectRoot4());
16942
+ const v2 = createAttachmentStoreV2(getProjectRoot5());
16942
16943
  const v2Result = await v2.put(ownerId, {
16943
16944
  name: absPath.split(/[\\/]/).pop() ?? meta.sha256.slice(0, 12),
16944
16945
  data: new Uint8Array(bytes),
@@ -16950,7 +16951,7 @@ var init_docs2 = __esm({
16950
16951
  }
16951
16952
  import("@cleocode/core/internal").then(
16952
16953
  ({ ensureLlmtxtNode }) => ensureLlmtxtNode(
16953
- getProjectRoot4(),
16954
+ getProjectRoot5(),
16954
16955
  meta.sha256,
16955
16956
  `${ownerType}:${ownerId}`,
16956
16957
  absPath.split("/").pop() ?? meta.sha256.slice(0, 12)
@@ -16981,7 +16982,7 @@ var init_docs2 = __esm({
16981
16982
  const urlBytes = Buffer.from(url, "utf-8");
16982
16983
  const meta = await store.put(urlBytes, attachment, ownerType, ownerId, attachedBy);
16983
16984
  import("@cleocode/core/internal").then(
16984
- ({ ensureLlmtxtNode }) => ensureLlmtxtNode(getProjectRoot4(), meta.sha256, `${ownerType}:${ownerId}`, url)
16985
+ ({ ensureLlmtxtNode }) => ensureLlmtxtNode(getProjectRoot5(), meta.sha256, `${ownerType}:${ownerId}`, url)
16985
16986
  ).catch(() => {
16986
16987
  });
16987
16988
  const backend = "legacy";
@@ -17036,7 +17037,7 @@ var init_docs2 = __esm({
17036
17037
  const blobPurged = derefResult.status === "removed";
17037
17038
  const refCountAfter = derefResult.status === "derefd" ? derefResult.refCountAfter : 0;
17038
17039
  try {
17039
- const v2 = createAttachmentStoreV2(getProjectRoot4());
17040
+ const v2 = createAttachmentStoreV2(getProjectRoot5());
17040
17041
  await v2.remove(attachmentId, fromOwner);
17041
17042
  } catch {
17042
17043
  }
@@ -17123,7 +17124,7 @@ var init_docs2 = __esm({
17123
17124
  });
17124
17125
 
17125
17126
  // packages/cleo/src/dispatch/domains/intelligence.ts
17126
- import { getLogger as getLogger5, getProjectRoot as getProjectRoot5, getTaskAccessor as getTaskAccessor2 } from "@cleocode/core";
17127
+ import { getLogger as getLogger5, getProjectRoot as getProjectRoot6, getTaskAccessor as getTaskAccessor2 } from "@cleocode/core";
17127
17128
  import {
17128
17129
  calculateTaskRisk,
17129
17130
  extractPatternsFromHistory,
@@ -17143,7 +17144,7 @@ var init_intelligence2 = __esm({
17143
17144
  // Query
17144
17145
  // -----------------------------------------------------------------------
17145
17146
  async query(operation, params) {
17146
- const projectRoot = getProjectRoot5();
17147
+ const projectRoot = getProjectRoot6();
17147
17148
  const startTime = Date.now();
17148
17149
  try {
17149
17150
  switch (operation) {
@@ -17447,7 +17448,7 @@ var init_llm2 = __esm({
17447
17448
  });
17448
17449
 
17449
17450
  // packages/cleo/src/dispatch/domains/memory.ts
17450
- import { getLogger as getLogger6, getProjectRoot as getProjectRoot6 } from "@cleocode/core";
17451
+ import { getLogger as getLogger6, getProjectRoot as getProjectRoot7 } from "@cleocode/core";
17451
17452
  import {
17452
17453
  generateMemoryBridgeContent,
17453
17454
  getBrainDb,
@@ -17475,7 +17476,7 @@ var init_memory2 = __esm({
17475
17476
  // Query
17476
17477
  // -----------------------------------------------------------------------
17477
17478
  async query(operation, params) {
17478
- const projectRoot = getProjectRoot6();
17479
+ const projectRoot = getProjectRoot7();
17479
17480
  const startTime = Date.now();
17480
17481
  try {
17481
17482
  switch (operation) {
@@ -18582,7 +18583,7 @@ var init_memory2 = __esm({
18582
18583
  // Mutate
18583
18584
  // -----------------------------------------------------------------------
18584
18585
  async mutate(operation, params) {
18585
- const projectRoot = getProjectRoot6();
18586
+ const projectRoot = getProjectRoot7();
18586
18587
  const startTime = Date.now();
18587
18588
  try {
18588
18589
  switch (operation) {
@@ -19231,7 +19232,7 @@ import {
19231
19232
  getBrainNativeDb as getBrainNativeDb2,
19232
19233
  getLogger as getLogger7,
19233
19234
  getNexusNativeDb,
19234
- getProjectRoot as getProjectRoot7,
19235
+ getProjectRoot as getProjectRoot8,
19235
19236
  nexusAugment,
19236
19237
  nexusBlockers,
19237
19238
  nexusBrainAnchors,
@@ -19503,7 +19504,7 @@ async function handleImpact(operation, params, startTime) {
19503
19504
  5
19504
19505
  );
19505
19506
  const projectIdParam = params?.projectId;
19506
- const projectId = projectIdParam ?? Buffer.from(process.cwd()).toString("base64url").slice(0, 32);
19507
+ const projectId = projectIdParam ?? Buffer.from(getProjectRoot8()).toString("base64url").slice(0, 32);
19507
19508
  try {
19508
19509
  const { getNexusDb } = await import("@cleocode/core/store/nexus-sqlite");
19509
19510
  await getNexusDb();
@@ -19764,7 +19765,7 @@ var init_nexus3 = __esm({
19764
19765
  return wrapCoreResult(await nexusAugment(params.pattern, params.limit ?? 5), "augment");
19765
19766
  },
19766
19767
  "share.status": async (_params) => {
19767
- const projectRoot = getProjectRoot7();
19768
+ const projectRoot = getProjectRoot8();
19768
19769
  return wrapCoreResult(await nexusShareStatus(projectRoot), "share.status");
19769
19770
  },
19770
19771
  "transfer.preview": async (params) => {
@@ -19800,39 +19801,39 @@ var init_nexus3 = __esm({
19800
19801
  },
19801
19802
  "full-context": async (params) => {
19802
19803
  if (!params.symbol) return lafsError("E_INVALID_INPUT", "symbol is required", "full-context");
19803
- const projectRoot = getProjectRoot7();
19804
+ const projectRoot = getProjectRoot8();
19804
19805
  return wrapCoreResult(await nexusFullContext(params.symbol, projectRoot), "full-context");
19805
19806
  },
19806
19807
  "task-footprint": async (params) => {
19807
19808
  if (!params.taskId) return lafsError("E_INVALID_INPUT", "taskId is required", "task-footprint");
19808
- const projectRoot = getProjectRoot7();
19809
+ const projectRoot = getProjectRoot8();
19809
19810
  return wrapCoreResult(await nexusTaskFootprint(params.taskId, projectRoot), "task-footprint");
19810
19811
  },
19811
19812
  "brain-anchors": async (params) => {
19812
19813
  if (!params.entryId)
19813
19814
  return lafsError("E_INVALID_INPUT", "entryId is required", "brain-anchors");
19814
- const projectRoot = getProjectRoot7();
19815
+ const projectRoot = getProjectRoot8();
19815
19816
  return wrapCoreResult(await nexusBrainAnchors(params.entryId, projectRoot), "brain-anchors");
19816
19817
  },
19817
19818
  why: async (params) => {
19818
19819
  if (!params.symbol) return lafsError("E_INVALID_INPUT", "symbol is required", "why");
19819
- const projectRoot = getProjectRoot7();
19820
+ const projectRoot = getProjectRoot8();
19820
19821
  return wrapCoreResult(await nexusWhy(params.symbol, projectRoot), "why");
19821
19822
  },
19822
19823
  "impact-full": async (params) => {
19823
19824
  if (!params.symbol) return lafsError("E_INVALID_INPUT", "symbol is required", "impact-full");
19824
- const projectRoot = getProjectRoot7();
19825
+ const projectRoot = getProjectRoot8();
19825
19826
  return wrapCoreResult(await nexusImpactFull(params.symbol, projectRoot), "impact-full");
19826
19827
  },
19827
19828
  "route-map": async (params) => {
19828
- const projectRoot = getProjectRoot7();
19829
+ const projectRoot = getProjectRoot8();
19829
19830
  const projectId = params.projectId ?? Buffer.from(projectRoot).toString("base64url").slice(0, 32);
19830
19831
  return wrapCoreResult(await nexusRouteMap(projectId, projectRoot), "route-map");
19831
19832
  },
19832
19833
  "shape-check": async (params) => {
19833
19834
  if (!params.routeSymbol)
19834
19835
  return lafsError("E_INVALID_INPUT", "routeSymbol is required", "shape-check");
19835
- const projectRoot = getProjectRoot7();
19836
+ const projectRoot = getProjectRoot8();
19836
19837
  const projectId = params.projectId ?? Buffer.from(projectRoot).toString("base64url").slice(0, 32);
19837
19838
  return wrapCoreResult(
19838
19839
  await nexusShapeCheck(params.routeSymbol, projectId, projectRoot),
@@ -19844,7 +19845,7 @@ var init_nexus3 = __esm({
19844
19845
  return wrapCoreResult(await nexusSearchCode(params.pattern, params.limit ?? 10), "search-code");
19845
19846
  },
19846
19847
  wiki: async (params) => {
19847
- const projectRoot = getProjectRoot7();
19848
+ const projectRoot = getProjectRoot8();
19848
19849
  const outputDir = params.outputDir ?? `${projectRoot}/.cleo/wiki`;
19849
19850
  return wrapCoreResult(
19850
19851
  await nexusWiki(outputDir, projectRoot, {
@@ -19857,7 +19858,7 @@ var init_nexus3 = __esm({
19857
19858
  "contracts-show": async (params) => {
19858
19859
  if (!params.projectA || !params.projectB)
19859
19860
  return lafsError("E_INVALID_INPUT", "projectA and projectB are required", "contracts-show");
19860
- const projectRoot = getProjectRoot7();
19861
+ const projectRoot = getProjectRoot8();
19861
19862
  return wrapCoreResult(
19862
19863
  await nexusContractsShow(params.projectA, params.projectB, projectRoot),
19863
19864
  "contracts-show"
@@ -19865,7 +19866,7 @@ var init_nexus3 = __esm({
19865
19866
  },
19866
19867
  "task-symbols": async (params) => {
19867
19868
  if (!params.taskId) return lafsError("E_INVALID_INPUT", "taskId is required", "task-symbols");
19868
- const projectRoot = getProjectRoot7();
19869
+ const projectRoot = getProjectRoot8();
19869
19870
  return wrapCoreResult(await nexusTaskSymbols(params.taskId, projectRoot), "task-symbols");
19870
19871
  },
19871
19872
  "profile.view": async (params) => wrapCoreResult(
@@ -19880,20 +19881,20 @@ var init_nexus3 = __esm({
19880
19881
  "sigil.list": async (params) => wrapCoreResult(await nexusSigilList(params.role), "sigil.list"),
19881
19882
  // T1510 — Phase 2 query ops
19882
19883
  clusters: async (params) => {
19883
- const projectRoot = getProjectRoot7();
19884
+ const projectRoot = getProjectRoot8();
19884
19885
  const repoPath = params.repoPath ?? projectRoot;
19885
19886
  const projectId = params.projectId ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
19886
19887
  return wrapCoreResult(await nexusClusters(projectId, repoPath), "clusters");
19887
19888
  },
19888
19889
  flows: async (params) => {
19889
- const projectRoot = getProjectRoot7();
19890
+ const projectRoot = getProjectRoot8();
19890
19891
  const repoPath = params.repoPath ?? projectRoot;
19891
19892
  const projectId = params.projectId ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
19892
19893
  return wrapCoreResult(await nexusFlows(projectId, repoPath), "flows");
19893
19894
  },
19894
19895
  context: async (params) => {
19895
19896
  if (!params.symbol) return lafsError("E_INVALID_INPUT", "symbol is required", "context");
19896
- const projectRoot = getProjectRoot7();
19897
+ const projectRoot = getProjectRoot8();
19897
19898
  const projectId = params.projectId ?? Buffer.from(projectRoot).toString("base64url").slice(0, 32);
19898
19899
  const limit = typeof params.limit === "number" ? params.limit : 20;
19899
19900
  const showContent = params.content === true;
@@ -19942,13 +19943,13 @@ var init_nexus3 = __esm({
19942
19943
  "projects.clean"
19943
19944
  ),
19944
19945
  "refresh-bridge": async (params) => {
19945
- const projectRoot = getProjectRoot7();
19946
+ const projectRoot = getProjectRoot8();
19946
19947
  const repoPath = params.repoPath ?? projectRoot;
19947
19948
  const projectId = params.projectId;
19948
19949
  return wrapCoreResult(await nexusRefreshBridge(repoPath, projectId), "refresh-bridge");
19949
19950
  },
19950
19951
  diff: async (params) => {
19951
- const projectRoot = getProjectRoot7();
19952
+ const projectRoot = getProjectRoot8();
19952
19953
  const repoPath = params.repoPath ?? projectRoot;
19953
19954
  return wrapCoreResult(
19954
19955
  await nexusDiff(
@@ -19968,17 +19969,17 @@ var init_nexus3 = __esm({
19968
19969
  );
19969
19970
  },
19970
19971
  "hot-paths": async (params) => {
19971
- const projectRoot = getProjectRoot7();
19972
+ const projectRoot = getProjectRoot8();
19972
19973
  const limit = typeof params.limit === "number" ? params.limit : 20;
19973
19974
  return wrapCoreResult(await nexusHotPaths(projectRoot, limit), "hot-paths");
19974
19975
  },
19975
19976
  "hot-nodes": async (params) => {
19976
- const projectRoot = getProjectRoot7();
19977
+ const projectRoot = getProjectRoot8();
19977
19978
  const limit = typeof params.limit === "number" ? params.limit : 20;
19978
19979
  return wrapCoreResult(await nexusHotNodes(projectRoot, limit), "hot-nodes");
19979
19980
  },
19980
19981
  "cold-symbols": async (params) => {
19981
- const projectRoot = getProjectRoot7();
19982
+ const projectRoot = getProjectRoot8();
19982
19983
  const days = typeof params.days === "number" ? params.days : 30;
19983
19984
  return wrapCoreResult(await nexusColdSymbols(projectRoot, days), "cold-symbols");
19984
19985
  },
@@ -20013,9 +20014,12 @@ var init_nexus3 = __esm({
20013
20014
  "permission.set"
20014
20015
  );
20015
20016
  },
20016
- reconcile: async (params) => wrapCoreResult(await nexusReconcileProject(params.projectRoot ?? process.cwd()), "reconcile"),
20017
+ reconcile: async (params) => wrapCoreResult(
20018
+ await nexusReconcileProject(params.projectRoot ?? getProjectRoot8()),
20019
+ "reconcile"
20020
+ ),
20017
20021
  "share.snapshot.export": async (params) => {
20018
- const projectRoot = getProjectRoot7();
20022
+ const projectRoot = getProjectRoot8();
20019
20023
  return wrapCoreResult(
20020
20024
  await nexusShareSnapshotExport(projectRoot, params.outputPath),
20021
20025
  "share.snapshot.export"
@@ -20024,7 +20028,7 @@ var init_nexus3 = __esm({
20024
20028
  "share.snapshot.import": async (params) => {
20025
20029
  if (!params.inputPath)
20026
20030
  return lafsError("E_INVALID_INPUT", "inputPath is required", "share.snapshot.import");
20027
- const projectRoot = getProjectRoot7();
20031
+ const projectRoot = getProjectRoot8();
20028
20032
  return wrapCoreResult(
20029
20033
  await nexusShareSnapshotImport(projectRoot, params.inputPath),
20030
20034
  "share.snapshot.import"
@@ -20052,13 +20056,13 @@ var init_nexus3 = __esm({
20052
20056
  );
20053
20057
  },
20054
20058
  "contracts-sync": async (params) => {
20055
- const projectRoot = getProjectRoot7();
20059
+ const projectRoot = getProjectRoot8();
20056
20060
  const repoPath = params.repoPath ?? projectRoot;
20057
20061
  const projectId = params.projectId ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
20058
20062
  return wrapCoreResult(await nexusContractsSync(projectId, repoPath), "contracts-sync");
20059
20063
  },
20060
20064
  "contracts-link-tasks": async (params) => {
20061
- const projectRoot = getProjectRoot7();
20065
+ const projectRoot = getProjectRoot8();
20062
20066
  const repoPath = params.repoPath ?? projectRoot;
20063
20067
  const projectId = params.projectId ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
20064
20068
  return wrapCoreResult(
@@ -20067,7 +20071,7 @@ var init_nexus3 = __esm({
20067
20071
  );
20068
20072
  },
20069
20073
  "conduit-scan": async (_params) => {
20070
- const projectRoot = getProjectRoot7();
20074
+ const projectRoot = getProjectRoot8();
20071
20075
  return wrapCoreResult(await nexusConduitScan(projectRoot), "conduit-scan");
20072
20076
  },
20073
20077
  "profile.import": async (params) => wrapCoreResult(await nexusProfileImport(params.path), "profile.import"),
@@ -20271,7 +20275,7 @@ import {
20271
20275
  extractTypedGates,
20272
20276
  getIvtrState,
20273
20277
  getLogger as getLogger8,
20274
- getProjectRoot as getProjectRoot8,
20278
+ getProjectRoot as getProjectRoot9,
20275
20279
  getTask,
20276
20280
  loopBackIvtr,
20277
20281
  releaseIvtr,
@@ -20287,7 +20291,7 @@ function extractEvidenceFromRaw(raw) {
20287
20291
  return [];
20288
20292
  }
20289
20293
  async function ivtrStatusOp(params) {
20290
- const cwd = getProjectRoot8();
20294
+ const cwd = getProjectRoot9();
20291
20295
  const state = await getIvtrState(params.taskId, { cwd });
20292
20296
  if (!state) {
20293
20297
  return engineSuccess2({
@@ -20317,7 +20321,7 @@ async function ivtrStatusOp(params) {
20317
20321
  });
20318
20322
  }
20319
20323
  async function ivtrStartOp(params) {
20320
- const cwd = getProjectRoot8();
20324
+ const cwd = getProjectRoot9();
20321
20325
  const task = await getTask(params.taskId, cwd);
20322
20326
  if (!task) {
20323
20327
  return engineError2("E_NOT_FOUND", `Task ${params.taskId} not found`);
@@ -20338,7 +20342,7 @@ async function ivtrStartOp(params) {
20338
20342
  });
20339
20343
  }
20340
20344
  async function ivtrNextOp(params) {
20341
- const cwd = getProjectRoot8();
20345
+ const cwd = getProjectRoot9();
20342
20346
  const task = await getTask(params.taskId, cwd);
20343
20347
  if (!task) {
20344
20348
  return engineError2("E_NOT_FOUND", `Task ${params.taskId} not found`);
@@ -20389,7 +20393,7 @@ async function ivtrNextOp(params) {
20389
20393
  });
20390
20394
  }
20391
20395
  async function ivtrReleaseOp(params) {
20392
- const cwd = getProjectRoot8();
20396
+ const cwd = getProjectRoot9();
20393
20397
  const result = await releaseIvtr(params.taskId, { cwd });
20394
20398
  if (!result.released) {
20395
20399
  return {
@@ -20426,7 +20430,7 @@ async function ivtrReleaseOp(params) {
20426
20430
  };
20427
20431
  }
20428
20432
  async function ivtrLoopBackOp(params) {
20429
- const cwd = getProjectRoot8();
20433
+ const cwd = getProjectRoot9();
20430
20434
  if (!isLoopBackTarget(params.phase)) {
20431
20435
  return {
20432
20436
  success: false,
@@ -24992,8 +24996,8 @@ async function loadPlaybookByName(name) {
24992
24996
  return null;
24993
24997
  }
24994
24998
  try {
24995
- const { getProjectRoot: getProjectRoot38 } = await import("@cleocode/core/internal");
24996
- const projectRoot = __playbookRuntimeOverrides.projectRoot ?? getProjectRoot38();
24999
+ const { getProjectRoot: getProjectRoot41 } = await import("@cleocode/core/internal");
25000
+ const projectRoot = __playbookRuntimeOverrides.projectRoot ?? getProjectRoot41();
24997
25001
  const resolved = resolvePlaybook(name, {
24998
25002
  projectRoot,
24999
25003
  globalPlaybooksDir: __playbookRuntimeOverrides.globalPlaybooksDir,
@@ -25037,8 +25041,8 @@ async function acquireDb() {
25037
25041
  async function buildDefaultDispatcher() {
25038
25042
  if (__playbookRuntimeOverrides.dispatcher) return __playbookRuntimeOverrides.dispatcher;
25039
25043
  const { orchestrateSpawnExecute: orchestrateSpawnExecute2 } = await Promise.resolve().then(() => (init_engine(), engine_exports));
25040
- const { getProjectRoot: getProjectRoot38 } = await import("@cleocode/core/internal");
25041
- const projectRoot = getProjectRoot38();
25044
+ const { getProjectRoot: getProjectRoot41 } = await import("@cleocode/core/internal");
25045
+ const projectRoot = getProjectRoot41();
25042
25046
  return {
25043
25047
  async dispatch(input2) {
25044
25048
  try {
@@ -25228,8 +25232,8 @@ var init_playbook2 = __esm({
25228
25232
  projectRoot = __playbookRuntimeOverrides.projectRoot;
25229
25233
  } else {
25230
25234
  try {
25231
- const { getProjectRoot: getProjectRoot38 } = await import("@cleocode/core/internal");
25232
- projectRoot = getProjectRoot38();
25235
+ const { getProjectRoot: getProjectRoot41 } = await import("@cleocode/core/internal");
25236
+ projectRoot = getProjectRoot41();
25233
25237
  } catch {
25234
25238
  projectRoot = void 0;
25235
25239
  }
@@ -25293,14 +25297,14 @@ var init_playbook2 = __esm({
25293
25297
  const dispatcher = await buildDefaultDispatcher();
25294
25298
  let result;
25295
25299
  try {
25296
- const { getProjectRoot: getProjectRoot38 } = await import("@cleocode/core/internal");
25300
+ const { getProjectRoot: getProjectRoot41 } = await import("@cleocode/core/internal");
25297
25301
  const opts = {
25298
25302
  db,
25299
25303
  playbook: parsed.definition,
25300
25304
  playbookHash: parsed.sourceHash,
25301
25305
  initialContext,
25302
25306
  dispatcher,
25303
- projectRoot: getProjectRoot38()
25307
+ projectRoot: getProjectRoot41()
25304
25308
  };
25305
25309
  if (__playbookRuntimeOverrides.approvalSecret !== void 0) {
25306
25310
  opts.approvalSecret = __playbookRuntimeOverrides.approvalSecret;
@@ -25482,7 +25486,7 @@ var init_playbook2 = __esm({
25482
25486
  // packages/cleo/src/dispatch/domains/orchestrate.ts
25483
25487
  import {
25484
25488
  getLogger as getLogger9,
25485
- getProjectRoot as getProjectRoot9,
25489
+ getProjectRoot as getProjectRoot10,
25486
25490
  instantiateTessera,
25487
25491
  listTesseraTemplates,
25488
25492
  paginate as paginate2,
@@ -25496,24 +25500,24 @@ function evictFanoutManifest() {
25496
25500
  }
25497
25501
  }
25498
25502
  async function orchestrateStatusOp(params) {
25499
- return orchestrateStatus(params.epicId, getProjectRoot9());
25503
+ return orchestrateStatus(params.epicId, getProjectRoot10());
25500
25504
  }
25501
25505
  async function orchestrateNextOp(params) {
25502
- return orchestrateNext(params.epicId, getProjectRoot9());
25506
+ return orchestrateNext(params.epicId, getProjectRoot10());
25503
25507
  }
25504
25508
  async function orchestrateReadyOp(params) {
25505
- return orchestrateReady(params.epicId, getProjectRoot9(), {
25509
+ return orchestrateReady(params.epicId, getProjectRoot10(), {
25506
25510
  ignoreDepsValidate: params.ignoreDepsValidate
25507
25511
  });
25508
25512
  }
25509
25513
  async function orchestrateAnalyzeOp(params) {
25510
25514
  if (params.mode === "parallel-safety") {
25511
- return orchestrateAnalyzeParallelSafety(params.taskIds ?? [], getProjectRoot9());
25515
+ return orchestrateAnalyzeParallelSafety(params.taskIds ?? [], getProjectRoot10());
25512
25516
  }
25513
- return orchestrateAnalyze(params.epicId, getProjectRoot9(), params.mode);
25517
+ return orchestrateAnalyze(params.epicId, getProjectRoot10(), params.mode);
25514
25518
  }
25515
25519
  async function orchestrateClassifyOp(params) {
25516
- return orchestrateClassify(params.request, params.context, getProjectRoot9());
25520
+ return orchestrateClassify(params.request, params.context, getProjectRoot10());
25517
25521
  }
25518
25522
  function orchestrateFanoutStatusOp(params) {
25519
25523
  const entry = fanoutManifestStore.get(params.manifestEntryId);
@@ -25546,23 +25550,23 @@ function orchestrateFanoutStatusOp(params) {
25546
25550
  });
25547
25551
  }
25548
25552
  async function orchestrateContextOp(params) {
25549
- return orchestrateContext(params.epicId, getProjectRoot9());
25553
+ return orchestrateContext(params.epicId, getProjectRoot10());
25550
25554
  }
25551
25555
  async function orchestrateWavesOp(params) {
25552
- return orchestrateWaves(params.epicId, getProjectRoot9());
25556
+ return orchestrateWaves(params.epicId, getProjectRoot10());
25553
25557
  }
25554
25558
  async function orchestratePlanOp(params) {
25555
25559
  return orchestratePlan({
25556
25560
  epicId: params.epicId,
25557
- projectRoot: getProjectRoot9(),
25561
+ projectRoot: getProjectRoot10(),
25558
25562
  preferTier: params.preferTier
25559
25563
  });
25560
25564
  }
25561
25565
  async function orchestrateBootstrapOp(params) {
25562
- return orchestrateBootstrap(getProjectRoot9(), { speed: params.speed });
25566
+ return orchestrateBootstrap(getProjectRoot10(), { speed: params.speed });
25563
25567
  }
25564
25568
  async function orchestrateUnblockOp(_params) {
25565
- return orchestrateUnblockOpportunities(getProjectRoot9());
25569
+ return orchestrateUnblockOpportunities(getProjectRoot10());
25566
25570
  }
25567
25571
  async function orchestrateTesseraListOp(params) {
25568
25572
  return Promise.resolve({ success: true, data: params });
@@ -25574,13 +25578,13 @@ async function orchestratePendingOp(_params) {
25574
25578
  return Promise.resolve({ success: true, data: {} });
25575
25579
  }
25576
25580
  async function orchestrateStartOp(params) {
25577
- return orchestrateStartup(params.epicId, getProjectRoot9());
25581
+ return orchestrateStartup(params.epicId, getProjectRoot10());
25578
25582
  }
25579
25583
  async function orchestrateSpawnOp(params) {
25580
25584
  return orchestrateSpawn(
25581
25585
  params.taskId,
25582
25586
  params.protocolType,
25583
- getProjectRoot9(),
25587
+ getProjectRoot10(),
25584
25588
  params.tier,
25585
25589
  params.noWorktree
25586
25590
  );
@@ -25598,7 +25602,7 @@ async function orchestrateHandoffOp(params) {
25598
25602
  },
25599
25603
  // Inject cleo session ops to avoid core→cleo import cycle (T1570 ADR-057)
25600
25604
  { sessionStatus, sessionEnd, sessionContextInject },
25601
- getProjectRoot9()
25605
+ getProjectRoot10()
25602
25606
  );
25603
25607
  }
25604
25608
  async function orchestrateSpawnExecuteOp(params) {
@@ -25606,19 +25610,19 @@ async function orchestrateSpawnExecuteOp(params) {
25606
25610
  params.taskId,
25607
25611
  params.adapterId,
25608
25612
  params.protocolType,
25609
- getProjectRoot9(),
25613
+ getProjectRoot10(),
25610
25614
  params.tier
25611
25615
  );
25612
25616
  }
25613
25617
  async function orchestrateValidateOp(params) {
25614
- return orchestrateValidate(params.taskId, getProjectRoot9());
25618
+ return orchestrateValidate(params.taskId, getProjectRoot10());
25615
25619
  }
25616
25620
  async function orchestratePivotOp(params) {
25617
25621
  try {
25618
25622
  const result = await pivotTask(params.fromTaskId, params.toTaskId, {
25619
25623
  reason: params.reason,
25620
25624
  blocksFrom: params.blocksFrom,
25621
- projectRoot: getProjectRoot9()
25625
+ projectRoot: getProjectRoot10()
25622
25626
  });
25623
25627
  return { success: true, data: result };
25624
25628
  } catch (err) {
@@ -25636,19 +25640,19 @@ async function orchestratePivotOp(params) {
25636
25640
  }
25637
25641
  }
25638
25642
  async function orchestrateWorktreeCompleteOp(params) {
25639
- return handleWorktreeComplete(params.taskId, getProjectRoot9(), params.resolve);
25643
+ return handleWorktreeComplete(params.taskId, getProjectRoot10(), params.resolve);
25640
25644
  }
25641
25645
  async function orchestrateWorktreeCleanupOp(params) {
25642
- return handleWorktreeCleanup(getProjectRoot9(), params.taskIds);
25646
+ return handleWorktreeCleanup(getProjectRoot10(), params.taskIds);
25643
25647
  }
25644
25648
  async function orchestrateWorktreePruneOp(params) {
25645
- return handleWorktreePrune(getProjectRoot9(), params.taskId);
25649
+ return handleWorktreePrune(getProjectRoot10(), params.taskId);
25646
25650
  }
25647
25651
  async function orchestrateParallelOp(params) {
25648
25652
  return Promise.resolve({ success: true, data: params });
25649
25653
  }
25650
25654
  async function orchestrateFanoutOp(params) {
25651
- return orchestrateFanoutImpl(params.items, getProjectRoot9());
25655
+ return orchestrateFanoutImpl(params.items, getProjectRoot10());
25652
25656
  }
25653
25657
  async function orchestrateTesseraInstantiateOp(params) {
25654
25658
  return Promise.resolve({ success: true, data: params });
@@ -26616,7 +26620,7 @@ var init_orchestrate2 = __esm({
26616
26620
  startTime
26617
26621
  );
26618
26622
  return wrapResult(
26619
- await orchestrateParallelStart(epicId, wave, getProjectRoot9()),
26623
+ await orchestrateParallelStart(epicId, wave, getProjectRoot10()),
26620
26624
  "mutate",
26621
26625
  "orchestrate",
26622
26626
  "parallel",
@@ -26645,7 +26649,7 @@ var init_orchestrate2 = __esm({
26645
26649
  startTime
26646
26650
  );
26647
26651
  return wrapResult(
26648
- await orchestrateParallelEnd(epicId, wave, getProjectRoot9()),
26652
+ await orchestrateParallelEnd(epicId, wave, getProjectRoot10()),
26649
26653
  "mutate",
26650
26654
  "orchestrate",
26651
26655
  "parallel",
@@ -26712,7 +26716,7 @@ var init_orchestrate2 = __esm({
26712
26716
  epicId,
26713
26717
  variables: { epicId, ...variables }
26714
26718
  },
26715
- getProjectRoot9()
26719
+ getProjectRoot10()
26716
26720
  );
26717
26721
  return {
26718
26722
  meta: dispatchMeta("mutate", "orchestrate", operation, startTime),
@@ -26805,7 +26809,7 @@ import {
26805
26809
  describeChannel,
26806
26810
  formatStageGuidance,
26807
26811
  getLogger as getLogger10,
26808
- getProjectRoot as getProjectRoot10,
26812
+ getProjectRoot as getProjectRoot11,
26809
26813
  isValidStage,
26810
26814
  listChains,
26811
26815
  paginate as paginate3,
@@ -26813,19 +26817,19 @@ import {
26813
26817
  showChain
26814
26818
  } from "@cleocode/core/internal";
26815
26819
  async function stageValidateOp(params) {
26816
- return lifecycleCheck(params.epicId, params.targetStage, getProjectRoot10());
26820
+ return lifecycleCheck(params.epicId, params.targetStage, getProjectRoot11());
26817
26821
  }
26818
26822
  async function stageStatusOp(params) {
26819
- return lifecycleStatus(params.epicId, getProjectRoot10());
26823
+ return lifecycleStatus(params.epicId, getProjectRoot11());
26820
26824
  }
26821
26825
  async function stageHistoryOp(params) {
26822
- return lifecycleHistory(params.taskId, getProjectRoot10());
26826
+ return lifecycleHistory(params.taskId, getProjectRoot11());
26823
26827
  }
26824
26828
  async function stageGuidanceOp(params) {
26825
26829
  let stage = params.stage;
26826
26830
  const epicId = params.epicId;
26827
26831
  const format = params.format ?? "markdown";
26828
- const projectRoot = getProjectRoot10();
26832
+ const projectRoot = getProjectRoot11();
26829
26833
  if (!stage && epicId) {
26830
26834
  const statusResult = await lifecycleStatus(epicId, projectRoot);
26831
26835
  if (statusResult.success) {
@@ -26841,14 +26845,14 @@ async function stageRecordOp(params) {
26841
26845
  params.stage,
26842
26846
  params.status,
26843
26847
  params.notes,
26844
- getProjectRoot10()
26848
+ getProjectRoot11()
26845
26849
  );
26846
26850
  }
26847
26851
  async function stageSkipOp(params) {
26848
- return lifecycleSkip(params.taskId, params.stage, params.reason, getProjectRoot10());
26852
+ return lifecycleSkip(params.taskId, params.stage, params.reason, getProjectRoot11());
26849
26853
  }
26850
26854
  async function stageResetOp(params) {
26851
- return lifecycleReset(params.taskId, params.stage, params.reason, getProjectRoot10());
26855
+ return lifecycleReset(params.taskId, params.stage, params.reason, getProjectRoot11());
26852
26856
  }
26853
26857
  async function stageGatePassOp(params) {
26854
26858
  return lifecycleGatePass(
@@ -26856,24 +26860,24 @@ async function stageGatePassOp(params) {
26856
26860
  params.gateName,
26857
26861
  params.agent,
26858
26862
  params.notes,
26859
- getProjectRoot10()
26863
+ getProjectRoot11()
26860
26864
  );
26861
26865
  }
26862
26866
  async function stageGateFailOp(params) {
26863
- return lifecycleGateFail(params.taskId, params.gateName, params.reason, getProjectRoot10());
26867
+ return lifecycleGateFail(params.taskId, params.gateName, params.reason, getProjectRoot11());
26864
26868
  }
26865
26869
  async function releaseListOp(params) {
26866
26870
  return releaseList(
26867
26871
  { status: params.status, limit: params.limit, offset: params.offset },
26868
- getProjectRoot10()
26872
+ getProjectRoot11()
26869
26873
  );
26870
26874
  }
26871
26875
  async function releaseShowOp(params) {
26872
- return releaseShow(params.version, getProjectRoot10());
26876
+ return releaseShow(params.version, getProjectRoot11());
26873
26877
  }
26874
26878
  async function releaseChannelShowOp(_params) {
26875
26879
  let currentBranch = "unknown";
26876
- const projectRoot = getProjectRoot10();
26880
+ const projectRoot = getProjectRoot11();
26877
26881
  try {
26878
26882
  currentBranch = execFileSync("git", ["rev-parse", "--abbrev-ref", "HEAD"], {
26879
26883
  encoding: "utf-8",
@@ -26891,55 +26895,55 @@ async function releaseChannelShowOp(_params) {
26891
26895
  };
26892
26896
  }
26893
26897
  async function releaseChangelogSinceOp(params) {
26894
- return releaseChangelogSince(params.sinceTag, getProjectRoot10());
26898
+ return releaseChangelogSince(params.sinceTag, getProjectRoot11());
26895
26899
  }
26896
26900
  async function releasePrStatusOp(params) {
26897
- return releasePrStatus(params.version, getProjectRoot10());
26901
+ return releasePrStatus(params.version, getProjectRoot11());
26898
26902
  }
26899
26903
  async function releaseCancelOp(params) {
26900
- return releaseCancel(params.version, getProjectRoot10());
26904
+ return releaseCancel(params.version, getProjectRoot11());
26901
26905
  }
26902
26906
  async function releaseRollbackOp(params) {
26903
- return releaseRollback(params.version, params.reason, getProjectRoot10());
26907
+ return releaseRollback(params.version, params.reason, getProjectRoot11());
26904
26908
  }
26905
26909
  async function releaseRollbackFullOp(params) {
26906
26910
  return releaseRollbackFull(
26907
26911
  params.version,
26908
26912
  { reason: params.reason, force: params.force, unpublish: params.unpublish },
26909
- getProjectRoot10()
26913
+ getProjectRoot11()
26910
26914
  );
26911
26915
  }
26912
26916
  async function manifestShowOp(params) {
26913
- return pipelineManifestShow(params.entryId, getProjectRoot10());
26917
+ return pipelineManifestShow(params.entryId, getProjectRoot11());
26914
26918
  }
26915
26919
  async function manifestListOp(params) {
26916
- return pipelineManifestList(params, getProjectRoot10());
26920
+ return pipelineManifestList(params, getProjectRoot11());
26917
26921
  }
26918
26922
  async function manifestFindOp(params) {
26919
26923
  return pipelineManifestFind(
26920
26924
  params.query,
26921
26925
  { confidence: params.confidence, limit: params.limit },
26922
- getProjectRoot10()
26926
+ getProjectRoot11()
26923
26927
  );
26924
26928
  }
26925
26929
  async function manifestStatsOp(params) {
26926
- return pipelineManifestStats(params.epicId, getProjectRoot10());
26930
+ return pipelineManifestStats(params.epicId, getProjectRoot11());
26927
26931
  }
26928
26932
  async function manifestAppendOp(params) {
26929
- return pipelineManifestAppend(params.entry, getProjectRoot10());
26933
+ return pipelineManifestAppend(params.entry, getProjectRoot11());
26930
26934
  }
26931
26935
  async function manifestArchiveOp(params) {
26932
- return pipelineManifestArchive(params.beforeDate, getProjectRoot10());
26936
+ return pipelineManifestArchive(params.beforeDate, getProjectRoot11());
26933
26937
  }
26934
26938
  async function phaseShowOp(params) {
26935
- return phaseShow(params.phaseId, getProjectRoot10());
26939
+ return phaseShow(params.phaseId, getProjectRoot11());
26936
26940
  }
26937
26941
  async function phaseListOp(_params) {
26938
- return phaseList(getProjectRoot10());
26942
+ return phaseList(getProjectRoot11());
26939
26943
  }
26940
26944
  async function phaseSetOp(params) {
26941
26945
  const { phaseId, action, rollback, force, dryRun } = params;
26942
- const projectRoot = getProjectRoot10();
26946
+ const projectRoot = getProjectRoot11();
26943
26947
  if (action === "start") {
26944
26948
  return phaseStart(phaseId, projectRoot);
26945
26949
  }
@@ -26949,28 +26953,28 @@ async function phaseSetOp(params) {
26949
26953
  return phaseSet({ phaseId, rollback, force, dryRun }, projectRoot);
26950
26954
  }
26951
26955
  async function phaseAdvanceOp(params) {
26952
- return phaseAdvance(params.force, getProjectRoot10());
26956
+ return phaseAdvance(params.force, getProjectRoot11());
26953
26957
  }
26954
26958
  async function phaseRenameOp(params) {
26955
- return phaseRename(params.oldName, params.newName, getProjectRoot10());
26959
+ return phaseRename(params.oldName, params.newName, getProjectRoot11());
26956
26960
  }
26957
26961
  async function phaseDeleteOp(params) {
26958
26962
  return phaseDelete(
26959
26963
  params.phaseId,
26960
26964
  { reassignTo: params.reassignTo, force: params.force },
26961
- getProjectRoot10()
26965
+ getProjectRoot11()
26962
26966
  );
26963
26967
  }
26964
26968
  async function chainShowOp(params) {
26965
- const chain = await showChain(params.chainId, getProjectRoot10());
26969
+ const chain = await showChain(params.chainId, getProjectRoot11());
26966
26970
  return { _chain: chain, _chainId: params.chainId };
26967
26971
  }
26968
26972
  async function chainListOp(_params) {
26969
- const chains = await listChains(getProjectRoot10());
26973
+ const chains = await listChains(getProjectRoot11());
26970
26974
  return { _chains: chains };
26971
26975
  }
26972
26976
  async function chainAddOp(params) {
26973
- await addChain(params.chain, getProjectRoot10());
26977
+ await addChain(params.chain, getProjectRoot11());
26974
26978
  return { id: params.chain.id };
26975
26979
  }
26976
26980
  async function chainInstantiateOp(params) {
@@ -26981,7 +26985,7 @@ async function chainInstantiateOp(params) {
26981
26985
  variables: params.variables,
26982
26986
  stageToTask: params.stageToTask
26983
26987
  },
26984
- getProjectRoot10()
26988
+ getProjectRoot11()
26985
26989
  );
26986
26990
  }
26987
26991
  async function chainAdvanceOp(params) {
@@ -26989,7 +26993,7 @@ async function chainAdvanceOp(params) {
26989
26993
  params.instanceId,
26990
26994
  params.nextStage,
26991
26995
  params.gateResults ?? [],
26992
- getProjectRoot10()
26996
+ getProjectRoot11()
26993
26997
  );
26994
26998
  }
26995
26999
  function pipelinePhaseListResponse(envelope, params, operation, startTime) {
@@ -27518,7 +27522,7 @@ var init_pipeline3 = __esm({
27518
27522
  // packages/cleo/src/dispatch/domains/provenance.ts
27519
27523
  import {
27520
27524
  getLogger as getLogger11,
27521
- getProjectRoot as getProjectRoot11,
27525
+ getProjectRoot as getProjectRoot12,
27522
27526
  provenanceBackfill,
27523
27527
  verifyProvenance
27524
27528
  } from "@cleocode/core/internal";
@@ -27563,7 +27567,7 @@ var init_provenance = __esm({
27563
27567
  ...version ? { version } : {},
27564
27568
  all,
27565
27569
  ...limit !== void 0 ? { limit } : {},
27566
- projectRoot: getProjectRoot11()
27570
+ projectRoot: getProjectRoot12()
27567
27571
  });
27568
27572
  return wrapResult(result, "query", "provenance", operation, startTime);
27569
27573
  }
@@ -27609,7 +27613,7 @@ var init_provenance = __esm({
27609
27613
  const resetCheckpoint = typeof params?.["resetCheckpoint"] === "boolean" ? params["resetCheckpoint"] : false;
27610
27614
  const result = await provenanceBackfill({
27611
27615
  since,
27612
- projectRoot: getProjectRoot11(),
27616
+ projectRoot: getProjectRoot12(),
27613
27617
  forceOverwrite,
27614
27618
  dryRun,
27615
27619
  resetCheckpoint
@@ -27639,12 +27643,12 @@ var init_provenance = __esm({
27639
27643
  });
27640
27644
 
27641
27645
  // packages/cleo/src/dispatch/domains/release.ts
27642
- import { getLogger as getLogger12, getProjectRoot as getProjectRoot12 } from "@cleocode/core/internal";
27646
+ import { getLogger as getLogger12, getProjectRoot as getProjectRoot13 } from "@cleocode/core/internal";
27643
27647
  async function releaseGateOp(params) {
27644
- return releaseGateCheck(params.epicId, params.force ?? false, getProjectRoot12());
27648
+ return releaseGateCheck(params.epicId, params.force ?? false, getProjectRoot13());
27645
27649
  }
27646
27650
  async function releaseIvtrSuggestOp(params) {
27647
- return releaseIvtrAutoSuggest(params.taskId, getProjectRoot12());
27651
+ return releaseIvtrAutoSuggest(params.taskId, getProjectRoot13());
27648
27652
  }
27649
27653
  var log3, coreOps4, ReleaseHandler;
27650
27654
  var init_release2 = __esm({
@@ -27815,7 +27819,7 @@ var init_release2 = __esm({
27815
27819
  channel: typeof params?.channel === "string" ? params.channel : void 0,
27816
27820
  hotfix: typeof params?.hotfix === "boolean" ? params.hotfix : false,
27817
27821
  dryRun: typeof params?.dryRun === "boolean" ? params.dryRun : false,
27818
- projectRoot: getProjectRoot12()
27822
+ projectRoot: getProjectRoot13()
27819
27823
  };
27820
27824
  return wrapResult(await releasePlan(typed), "mutate", "release", operation, startTime);
27821
27825
  }
@@ -27837,7 +27841,7 @@ var init_release2 = __esm({
27837
27841
  workflow: typeof params?.workflow === "string" ? params.workflow : void 0,
27838
27842
  watch: typeof params?.watch === "boolean" ? params.watch : false,
27839
27843
  commitPlan: typeof params?.commitPlan === "boolean" ? params.commitPlan : false,
27840
- projectRoot: getProjectRoot12()
27844
+ projectRoot: getProjectRoot13()
27841
27845
  };
27842
27846
  return wrapResult(await releaseOpen(typed), "mutate", "release", operation, startTime);
27843
27847
  }
@@ -27854,7 +27858,7 @@ var init_release2 = __esm({
27854
27858
  startTime
27855
27859
  );
27856
27860
  const result = await releaseReconcileV2(version, {
27857
- projectRoot: getProjectRoot12(),
27861
+ projectRoot: getProjectRoot13(),
27858
27862
  fromWorkflow: typeof params?.fromWorkflow === "boolean" ? params.fromWorkflow : false,
27859
27863
  rollback: typeof params?.rollback === "boolean" ? params.rollback : false
27860
27864
  });
@@ -27883,7 +27887,7 @@ var init_release2 = __esm({
27883
27887
  });
27884
27888
 
27885
27889
  // packages/cleo/src/dispatch/domains/sentient.ts
27886
- import { getProjectRoot as getProjectRoot13 } from "@cleocode/core";
27890
+ import { getProjectRoot as getProjectRoot14 } from "@cleocode/core";
27887
27891
  import {
27888
27892
  sentientAllowlistAdd,
27889
27893
  sentientAllowlistList,
@@ -27903,16 +27907,16 @@ var init_sentient2 = __esm({
27903
27907
  init_typed();
27904
27908
  init_base();
27905
27909
  coreOps5 = {
27906
- "propose.list": (params) => sentientProposeList(getProjectRoot13(), params),
27907
- "propose.diff": (params) => sentientProposeDiff(getProjectRoot13(), params),
27908
- "allowlist.list": (params) => sentientAllowlistList(getProjectRoot13(), params),
27909
- "propose.accept": (params) => sentientProposeAccept(getProjectRoot13(), params),
27910
- "propose.reject": (params) => sentientProposeReject(getProjectRoot13(), params),
27911
- "propose.run": (params) => sentientProposeRun(getProjectRoot13(), params),
27912
- "propose.enable": (params) => sentientProposeEnable(getProjectRoot13(), params),
27913
- "propose.disable": (params) => sentientProposeDisable(getProjectRoot13(), params),
27914
- "allowlist.add": (params) => sentientAllowlistAdd(getProjectRoot13(), params),
27915
- "allowlist.remove": (params) => sentientAllowlistRemove(getProjectRoot13(), params)
27910
+ "propose.list": (params) => sentientProposeList(getProjectRoot14(), params),
27911
+ "propose.diff": (params) => sentientProposeDiff(getProjectRoot14(), params),
27912
+ "allowlist.list": (params) => sentientAllowlistList(getProjectRoot14(), params),
27913
+ "propose.accept": (params) => sentientProposeAccept(getProjectRoot14(), params),
27914
+ "propose.reject": (params) => sentientProposeReject(getProjectRoot14(), params),
27915
+ "propose.run": (params) => sentientProposeRun(getProjectRoot14(), params),
27916
+ "propose.enable": (params) => sentientProposeEnable(getProjectRoot14(), params),
27917
+ "propose.disable": (params) => sentientProposeDisable(getProjectRoot14(), params),
27918
+ "allowlist.add": (params) => sentientAllowlistAdd(getProjectRoot14(), params),
27919
+ "allowlist.remove": (params) => sentientAllowlistRemove(getProjectRoot14(), params)
27916
27920
  };
27917
27921
  _sentientTypedHandler = defineTypedHandler("sentient", {
27918
27922
  // -------------------------------------------------------------------------
@@ -28142,28 +28146,28 @@ var init_session_context = __esm({
28142
28146
  });
28143
28147
 
28144
28148
  // packages/cleo/src/dispatch/domains/session.ts
28145
- import { getDb, getLogger as getLogger13, getProjectRoot as getProjectRoot14, sessions } from "@cleocode/core/internal";
28149
+ import { getDb, getLogger as getLogger13, getProjectRoot as getProjectRoot15, sessions } from "@cleocode/core/internal";
28146
28150
  import { eq } from "drizzle-orm";
28147
28151
  async function sessionStatusOp() {
28148
- return sessionStatus(getProjectRoot14());
28152
+ return sessionStatus(getProjectRoot15());
28149
28153
  }
28150
28154
  async function sessionListOp(params) {
28151
- return sessionList(getProjectRoot14(), params);
28155
+ return sessionList(getProjectRoot15(), params);
28152
28156
  }
28153
28157
  async function sessionShowOp(params) {
28154
28158
  if (params.include === "debrief") {
28155
- return sessionDebriefShow(getProjectRoot14(), params.sessionId);
28159
+ return sessionDebriefShow(getProjectRoot15(), params.sessionId);
28156
28160
  }
28157
- return sessionShow(getProjectRoot14(), params.sessionId);
28161
+ return sessionShow(getProjectRoot15(), params.sessionId);
28158
28162
  }
28159
28163
  async function sessionFindOp(params) {
28160
- return sessionFind(getProjectRoot14(), params);
28164
+ return sessionFind(getProjectRoot15(), params);
28161
28165
  }
28162
28166
  async function sessionDecisionLogOp(params) {
28163
- return sessionDecisionLog(getProjectRoot14(), params);
28167
+ return sessionDecisionLog(getProjectRoot15(), params);
28164
28168
  }
28165
28169
  async function sessionContextDriftOp(params) {
28166
- return sessionContextDrift(getProjectRoot14(), params);
28170
+ return sessionContextDrift(getProjectRoot15(), params);
28167
28171
  }
28168
28172
  async function sessionHandoffShowOp(params) {
28169
28173
  let scopeFilter;
@@ -28174,33 +28178,33 @@ async function sessionHandoffShowOp(params) {
28174
28178
  scopeFilter = { type: "epic", epicId: params.scope.replace("epic:", "") };
28175
28179
  }
28176
28180
  }
28177
- return sessionHandoff(getProjectRoot14(), scopeFilter);
28181
+ return sessionHandoff(getProjectRoot15(), scopeFilter);
28178
28182
  }
28179
28183
  async function sessionBriefingShowOp(params) {
28180
- return sessionBriefing(getProjectRoot14(), params);
28184
+ return sessionBriefing(getProjectRoot15(), params);
28181
28185
  }
28182
28186
  async function sessionStartOp(params) {
28183
- return sessionStart(getProjectRoot14(), params);
28187
+ return sessionStart(getProjectRoot15(), params);
28184
28188
  }
28185
28189
  async function sessionEndOp(params) {
28186
- return sessionEnd(getProjectRoot14(), params.note, {
28190
+ return sessionEnd(getProjectRoot15(), params.note, {
28187
28191
  sessionSummary: params.sessionSummary
28188
28192
  });
28189
28193
  }
28190
28194
  async function sessionResumeOp(params) {
28191
- return sessionResume(getProjectRoot14(), params.sessionId);
28195
+ return sessionResume(getProjectRoot15(), params.sessionId);
28192
28196
  }
28193
28197
  async function sessionSuspendOp(params) {
28194
- return sessionSuspend(getProjectRoot14(), params.sessionId, params.reason);
28198
+ return sessionSuspend(getProjectRoot15(), params.sessionId, params.reason);
28195
28199
  }
28196
28200
  async function sessionGcOp(params) {
28197
- return sessionGc(getProjectRoot14(), params.maxAgeDays);
28201
+ return sessionGc(getProjectRoot15(), params.maxAgeDays);
28198
28202
  }
28199
28203
  async function sessionRecordDecisionOp(params) {
28200
- return sessionRecordDecision(getProjectRoot14(), params);
28204
+ return sessionRecordDecision(getProjectRoot15(), params);
28201
28205
  }
28202
28206
  async function sessionRecordAssumptionOp(params) {
28203
- return sessionRecordAssumption(getProjectRoot14(), params);
28207
+ return sessionRecordAssumption(getProjectRoot15(), params);
28204
28208
  }
28205
28209
  async function storeSessionOwnerAuthToken(projectRoot, sessionId, token) {
28206
28210
  const db = await getDb(projectRoot);
@@ -28289,7 +28293,7 @@ var init_session3 = __esm({
28289
28293
  // SSoT-EXEMPT: storeOwnerAuthToken (DB side-effect requiring post-create sessionId),
28290
28294
  // bindSession (process-scoped context, requires scope-string parsing) — ADR-058
28291
28295
  start: async (params) => {
28292
- const projectRoot = getProjectRoot14();
28296
+ const projectRoot = getProjectRoot15();
28293
28297
  if (!params.scope) {
28294
28298
  return lafsError("E_INVALID_INPUT", "scope is required", "start");
28295
28299
  }
@@ -28338,7 +28342,7 @@ var init_session3 = __esm({
28338
28342
  // SSoT-EXEMPT: orchestrated post-op pipeline — sessionComputeDebrief, persistSessionMemory,
28339
28343
  // unbindSession (process-context teardown), refreshMemoryBridge — ADR-058
28340
28344
  end: async (params) => {
28341
- const projectRoot = getProjectRoot14();
28345
+ const projectRoot = getProjectRoot15();
28342
28346
  const endResult = await coreOps6.end(params);
28343
28347
  if (!endResult.success) {
28344
28348
  return lafsError(
@@ -28530,7 +28534,7 @@ var init_session3 = __esm({
28530
28534
  });
28531
28535
 
28532
28536
  // packages/cleo/src/dispatch/domains/sticky.ts
28533
- import { getLogger as getLogger14, getProjectRoot as getProjectRoot15 } from "@cleocode/core";
28537
+ import { getLogger as getLogger14, getProjectRoot as getProjectRoot16 } from "@cleocode/core";
28534
28538
  import {
28535
28539
  stickyAdd,
28536
28540
  stickyArchive,
@@ -28544,7 +28548,7 @@ import {
28544
28548
  } from "@cleocode/core/internal";
28545
28549
  async function stickyListOp(params) {
28546
28550
  return stickyListFiltered(
28547
- getProjectRoot15(),
28551
+ getProjectRoot16(),
28548
28552
  {
28549
28553
  status: params.status,
28550
28554
  color: params.color,
@@ -28556,10 +28560,10 @@ async function stickyListOp(params) {
28556
28560
  );
28557
28561
  }
28558
28562
  async function stickyShowOp(params) {
28559
- return stickyShow(getProjectRoot15(), params.stickyId);
28563
+ return stickyShow(getProjectRoot16(), params.stickyId);
28560
28564
  }
28561
28565
  async function stickyAddOp(params) {
28562
- return stickyAdd(getProjectRoot15(), {
28566
+ return stickyAdd(getProjectRoot16(), {
28563
28567
  content: params.content,
28564
28568
  tags: params.tags,
28565
28569
  color: params.color,
@@ -28567,24 +28571,24 @@ async function stickyAddOp(params) {
28567
28571
  });
28568
28572
  }
28569
28573
  async function stickyArchiveOp(params) {
28570
- return stickyArchive(getProjectRoot15(), params.stickyId);
28574
+ return stickyArchive(getProjectRoot16(), params.stickyId);
28571
28575
  }
28572
28576
  async function stickyPurgeOp(params) {
28573
- return stickyPurge(getProjectRoot15(), params.stickyId);
28577
+ return stickyPurge(getProjectRoot16(), params.stickyId);
28574
28578
  }
28575
28579
  async function stickyConvertTaskOp(params) {
28576
- const result = await stickyConvertToTask(getProjectRoot15(), params.stickyId, params.title);
28580
+ const result = await stickyConvertToTask(getProjectRoot16(), params.stickyId, params.title);
28577
28581
  if (!result.success) return { taskId: void 0 };
28578
28582
  return { taskId: result.data.taskId };
28579
28583
  }
28580
28584
  async function stickyConvertMemoryOp(params) {
28581
- const result = await stickyConvertToMemory(getProjectRoot15(), params.stickyId, params.memoryType);
28585
+ const result = await stickyConvertToMemory(getProjectRoot16(), params.stickyId, params.memoryType);
28582
28586
  if (!result.success) return { memoryId: void 0 };
28583
28587
  return { memoryId: result.data.memoryId };
28584
28588
  }
28585
28589
  async function stickyConvertSessionNoteOp(params) {
28586
28590
  const result = await stickyConvertToSessionNote(
28587
- getProjectRoot15(),
28591
+ getProjectRoot16(),
28588
28592
  params.stickyId,
28589
28593
  params.sessionId
28590
28594
  );
@@ -28592,7 +28596,7 @@ async function stickyConvertSessionNoteOp(params) {
28592
28596
  return { sessionId: result.data.sessionId };
28593
28597
  }
28594
28598
  async function stickyConvertTaskNoteOp(params) {
28595
- const result = await stickyConvertToTaskNote(getProjectRoot15(), params.stickyId, params.taskId);
28599
+ const result = await stickyConvertToTaskNote(getProjectRoot16(), params.stickyId, params.taskId);
28596
28600
  if (!result.success) return { taskId: void 0 };
28597
28601
  return { taskId: result.data.taskId };
28598
28602
  }
@@ -28763,9 +28767,9 @@ var init_sticky2 = __esm({
28763
28767
  });
28764
28768
 
28765
28769
  // packages/cleo/src/dispatch/domains/tasks.ts
28766
- import { getLogger as getLogger15, getProjectRoot as getProjectRoot16 } from "@cleocode/core";
28770
+ import { getLogger as getLogger15, getProjectRoot as getProjectRoot17 } from "@cleocode/core";
28767
28771
  async function sagaCreate(params) {
28768
- const projectRoot = getProjectRoot16();
28772
+ const projectRoot = getProjectRoot17();
28769
28773
  const title = typeof params.title === "string" ? params.title : "";
28770
28774
  const description = typeof params.description === "string" ? params.description : void 0;
28771
28775
  const acceptance = Array.isArray(params.acceptance) ? params.acceptance : void 0;
@@ -28781,7 +28785,7 @@ async function sagaCreate(params) {
28781
28785
  );
28782
28786
  }
28783
28787
  async function sagaAdd(params) {
28784
- const projectRoot = getProjectRoot16();
28788
+ const projectRoot = getProjectRoot17();
28785
28789
  const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
28786
28790
  const epicId = typeof params.epicId === "string" ? params.epicId : "";
28787
28791
  if (!sagaId || !epicId) {
@@ -28819,7 +28823,7 @@ async function sagaAdd(params) {
28819
28823
  return lafsSuccess({ sagaId, epicId, added: relResult.data?.added ?? true }, "saga.add");
28820
28824
  }
28821
28825
  async function sagaList() {
28822
- const projectRoot = getProjectRoot16();
28826
+ const projectRoot = getProjectRoot17();
28823
28827
  const result = await taskList(projectRoot, { type: "epic", label: "saga" });
28824
28828
  if (!result.success) {
28825
28829
  return lafsError("E_GENERAL", result.error?.message ?? "Failed to list Sagas", "saga.list");
@@ -28832,7 +28836,7 @@ async function sagaList() {
28832
28836
  return lafsSuccess({ sagas: topLevel, total: topLevel.length }, "saga.list");
28833
28837
  }
28834
28838
  async function sagaMembers(params) {
28835
- const projectRoot = getProjectRoot16();
28839
+ const projectRoot = getProjectRoot17();
28836
28840
  const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
28837
28841
  if (!sagaId) {
28838
28842
  return lafsError("E_INVALID_INPUT", "sagaId is required", "saga.members");
@@ -28857,7 +28861,7 @@ async function sagaMembers(params) {
28857
28861
  );
28858
28862
  }
28859
28863
  async function sagaRollup(params) {
28860
- const projectRoot = getProjectRoot16();
28864
+ const projectRoot = getProjectRoot17();
28861
28865
  const sagaId = typeof params.sagaId === "string" ? params.sagaId : "";
28862
28866
  if (!sagaId) {
28863
28867
  return lafsError("E_INVALID_INPUT", "sagaId is required", "saga.rollup");
@@ -28909,7 +28913,7 @@ var init_tasks3 = __esm({
28909
28913
  // Query ops
28910
28914
  // -------------------------------------------------------------------------
28911
28915
  show: async (params) => {
28912
- const projectRoot = getProjectRoot16();
28916
+ const projectRoot = getProjectRoot17();
28913
28917
  if (params.ivtrHistory) {
28914
28918
  return wrapCoreResult(await taskShowIvtrHistory(projectRoot, params.taskId), "show");
28915
28919
  }
@@ -28919,7 +28923,7 @@ var init_tasks3 = __esm({
28919
28923
  return wrapCoreResult(await taskShow(projectRoot, params.taskId), "show");
28920
28924
  },
28921
28925
  list: async (params) => {
28922
- const projectRoot = getProjectRoot16();
28926
+ const projectRoot = getProjectRoot17();
28923
28927
  const result = await taskList(projectRoot, {
28924
28928
  parent: params.parent,
28925
28929
  status: params.status,
@@ -28945,7 +28949,7 @@ var init_tasks3 = __esm({
28945
28949
  return lafsSuccess(result.data, "list");
28946
28950
  },
28947
28951
  find: async (params) => {
28948
- const projectRoot = getProjectRoot16();
28952
+ const projectRoot = getProjectRoot17();
28949
28953
  return wrapCoreResult(
28950
28954
  await taskFind(projectRoot, params.query, params.limit, {
28951
28955
  id: params.id,
@@ -28962,15 +28966,15 @@ var init_tasks3 = __esm({
28962
28966
  );
28963
28967
  },
28964
28968
  tree: async (params) => {
28965
- const projectRoot = getProjectRoot16();
28969
+ const projectRoot = getProjectRoot17();
28966
28970
  return wrapCoreResult(await taskTree(projectRoot, params.taskId, params.withBlockers), "tree");
28967
28971
  },
28968
28972
  blockers: async (params) => {
28969
- const projectRoot = getProjectRoot16();
28973
+ const projectRoot = getProjectRoot17();
28970
28974
  return wrapCoreResult(await taskBlockers(projectRoot, params), "blockers");
28971
28975
  },
28972
28976
  depends: async (params) => {
28973
- const projectRoot = getProjectRoot16();
28977
+ const projectRoot = getProjectRoot17();
28974
28978
  if (params.action === "overview") {
28975
28979
  return wrapCoreResult(await taskDepsOverview(projectRoot), "depends");
28976
28980
  }
@@ -28990,14 +28994,14 @@ var init_tasks3 = __esm({
28990
28994
  );
28991
28995
  },
28992
28996
  "deps.validate": async (params) => {
28993
- const projectRoot = getProjectRoot16();
28997
+ const projectRoot = getProjectRoot17();
28994
28998
  return wrapCoreResult(
28995
28999
  await taskDepsValidate(projectRoot, params.epicId, params.scope),
28996
29000
  "deps.validate"
28997
29001
  );
28998
29002
  },
28999
29003
  "deps.tree": async (params) => {
29000
- const projectRoot = getProjectRoot16();
29004
+ const projectRoot = getProjectRoot17();
29001
29005
  if (!params.epicId) {
29002
29006
  return lafsError("E_INVALID_INPUT", "epicId is required for deps.tree", "deps.tree");
29003
29007
  }
@@ -29007,29 +29011,29 @@ var init_tasks3 = __esm({
29007
29011
  );
29008
29012
  },
29009
29013
  analyze: async (params) => {
29010
- const projectRoot = getProjectRoot16();
29014
+ const projectRoot = getProjectRoot17();
29011
29015
  return wrapCoreResult(
29012
29016
  await taskAnalyze(projectRoot, params.taskId, { tierLimit: params.tierLimit }),
29013
29017
  "analyze"
29014
29018
  );
29015
29019
  },
29016
29020
  impact: async (params) => {
29017
- const projectRoot = getProjectRoot16();
29021
+ const projectRoot = getProjectRoot17();
29018
29022
  return wrapCoreResult(
29019
29023
  await taskImpact(projectRoot, params.change, params.matchLimit),
29020
29024
  "impact"
29021
29025
  );
29022
29026
  },
29023
29027
  next: async (params) => {
29024
- const projectRoot = getProjectRoot16();
29028
+ const projectRoot = getProjectRoot17();
29025
29029
  return wrapCoreResult(await taskNext(projectRoot, params), "next");
29026
29030
  },
29027
29031
  plan: async (_params) => {
29028
- const projectRoot = getProjectRoot16();
29032
+ const projectRoot = getProjectRoot17();
29029
29033
  return wrapCoreResult(await taskPlan(projectRoot), "plan");
29030
29034
  },
29031
29035
  relates: async (params) => {
29032
- const projectRoot = getProjectRoot16();
29036
+ const projectRoot = getProjectRoot17();
29033
29037
  if (params.mode) {
29034
29038
  return wrapCoreResult(
29035
29039
  await taskRelatesFind(projectRoot, params.taskId, {
@@ -29042,36 +29046,36 @@ var init_tasks3 = __esm({
29042
29046
  return wrapCoreResult(await taskRelates(projectRoot, params.taskId), "relates");
29043
29047
  },
29044
29048
  "complexity.estimate": async (params) => {
29045
- const projectRoot = getProjectRoot16();
29049
+ const projectRoot = getProjectRoot17();
29046
29050
  return wrapCoreResult(
29047
29051
  await taskComplexityEstimate(projectRoot, { taskId: params.taskId }),
29048
29052
  "complexity.estimate"
29049
29053
  );
29050
29054
  },
29051
29055
  history: async (params) => {
29052
- const projectRoot = getProjectRoot16();
29056
+ const projectRoot = getProjectRoot17();
29053
29057
  if (params.taskId) {
29054
29058
  return wrapCoreResult(await taskHistory(projectRoot, params.taskId, params.limit), "history");
29055
29059
  }
29056
29060
  return wrapCoreResult(await taskWorkHistory(projectRoot), "history");
29057
29061
  },
29058
29062
  current: async (_params) => {
29059
- const projectRoot = getProjectRoot16();
29063
+ const projectRoot = getProjectRoot17();
29060
29064
  return wrapCoreResult(await taskCurrentGet(projectRoot), "current");
29061
29065
  },
29062
29066
  "label.list": async (_params) => {
29063
- const projectRoot = getProjectRoot16();
29067
+ const projectRoot = getProjectRoot17();
29064
29068
  return wrapCoreResult(await taskLabelList(projectRoot), "label.list");
29065
29069
  },
29066
29070
  "sync.links": async (params) => {
29067
- const projectRoot = getProjectRoot16();
29071
+ const projectRoot = getProjectRoot17();
29068
29072
  return wrapCoreResult(await taskSyncLinks(projectRoot, params), "sync.links");
29069
29073
  },
29070
29074
  // -------------------------------------------------------------------------
29071
29075
  // Mutate ops
29072
29076
  // -------------------------------------------------------------------------
29073
29077
  add: async (params) => {
29074
- const projectRoot = getProjectRoot16();
29078
+ const projectRoot = getProjectRoot17();
29075
29079
  return wrapCoreResult(
29076
29080
  await addTaskWithSessionScope(projectRoot, {
29077
29081
  title: params.title,
@@ -29099,7 +29103,7 @@ var init_tasks3 = __esm({
29099
29103
  );
29100
29104
  },
29101
29105
  update: async (params) => {
29102
- const projectRoot = getProjectRoot16();
29106
+ const projectRoot = getProjectRoot17();
29103
29107
  return wrapCoreResult(
29104
29108
  await taskUpdate(projectRoot, params.taskId, {
29105
29109
  title: params.title,
@@ -29142,7 +29146,7 @@ var init_tasks3 = __esm({
29142
29146
  );
29143
29147
  },
29144
29148
  complete: async (params) => {
29145
- const projectRoot = getProjectRoot16();
29149
+ const projectRoot = getProjectRoot17();
29146
29150
  if (params.force !== void 0) {
29147
29151
  return lafsError(
29148
29152
  "E_FLAG_REMOVED",
@@ -29165,15 +29169,15 @@ var init_tasks3 = __esm({
29165
29169
  return wrapCoreResult(result, "complete");
29166
29170
  },
29167
29171
  cancel: async (params) => {
29168
- const projectRoot = getProjectRoot16();
29172
+ const projectRoot = getProjectRoot17();
29169
29173
  return wrapCoreResult(await taskCancel(projectRoot, params.taskId, params.reason), "cancel");
29170
29174
  },
29171
29175
  delete: async (params) => {
29172
- const projectRoot = getProjectRoot16();
29176
+ const projectRoot = getProjectRoot17();
29173
29177
  return wrapCoreResult(await taskDelete(projectRoot, params.taskId, params.force), "delete");
29174
29178
  },
29175
29179
  archive: async (params) => {
29176
- const projectRoot = getProjectRoot16();
29180
+ const projectRoot = getProjectRoot17();
29177
29181
  return wrapCoreResult(
29178
29182
  await taskArchive(projectRoot, params.taskId, params.before, {
29179
29183
  taskIds: params.taskIds,
@@ -29184,7 +29188,7 @@ var init_tasks3 = __esm({
29184
29188
  );
29185
29189
  },
29186
29190
  restore: async (params) => {
29187
- const projectRoot = getProjectRoot16();
29191
+ const projectRoot = getProjectRoot17();
29188
29192
  if (params.from === "done") {
29189
29193
  return wrapCoreResult(
29190
29194
  await taskReopen(projectRoot, params.taskId, {
@@ -29212,21 +29216,21 @@ var init_tasks3 = __esm({
29212
29216
  );
29213
29217
  },
29214
29218
  reparent: async (params) => {
29215
- const projectRoot = getProjectRoot16();
29219
+ const projectRoot = getProjectRoot17();
29216
29220
  return wrapCoreResult(
29217
29221
  await taskReparent(projectRoot, params.taskId, params.newParentId ?? null),
29218
29222
  "reparent"
29219
29223
  );
29220
29224
  },
29221
29225
  reorder: async (params) => {
29222
- const projectRoot = getProjectRoot16();
29226
+ const projectRoot = getProjectRoot17();
29223
29227
  return wrapCoreResult(
29224
29228
  await taskReorder(projectRoot, params.taskId, params.position),
29225
29229
  "reorder"
29226
29230
  );
29227
29231
  },
29228
29232
  "relates.add": async (params) => {
29229
- const projectRoot = getProjectRoot16();
29233
+ const projectRoot = getProjectRoot17();
29230
29234
  const relatedId = params.relatedId ?? params.targetId;
29231
29235
  if (!relatedId) {
29232
29236
  return lafsError("E_INVALID_INPUT", "relatedId (or targetId) is required", "relates.add");
@@ -29237,7 +29241,7 @@ var init_tasks3 = __esm({
29237
29241
  );
29238
29242
  },
29239
29243
  "relates.remove": async (params) => {
29240
- const projectRoot = getProjectRoot16();
29244
+ const projectRoot = getProjectRoot17();
29241
29245
  if (!params.relatedId) {
29242
29246
  return lafsError("E_INVALID_INPUT", "relatedId is required", "relates.remove");
29243
29247
  }
@@ -29247,15 +29251,15 @@ var init_tasks3 = __esm({
29247
29251
  );
29248
29252
  },
29249
29253
  start: async (params) => {
29250
- const projectRoot = getProjectRoot16();
29254
+ const projectRoot = getProjectRoot17();
29251
29255
  return wrapCoreResult(await taskStart(projectRoot, params.taskId), "start");
29252
29256
  },
29253
29257
  stop: async (_params) => {
29254
- const projectRoot = getProjectRoot16();
29258
+ const projectRoot = getProjectRoot17();
29255
29259
  return wrapCoreResult(await taskStop(projectRoot), "stop");
29256
29260
  },
29257
29261
  "sync.reconcile": async (params) => {
29258
- const projectRoot = getProjectRoot16();
29262
+ const projectRoot = getProjectRoot17();
29259
29263
  return wrapCoreResult(
29260
29264
  await taskSyncReconcile(projectRoot, {
29261
29265
  providerId: params.providerId,
@@ -29269,18 +29273,18 @@ var init_tasks3 = __esm({
29269
29273
  );
29270
29274
  },
29271
29275
  "sync.links.remove": async (params) => {
29272
- const projectRoot = getProjectRoot16();
29276
+ const projectRoot = getProjectRoot17();
29273
29277
  return wrapCoreResult(
29274
29278
  await taskSyncLinksRemove(projectRoot, params.providerId),
29275
29279
  "sync.links.remove"
29276
29280
  );
29277
29281
  },
29278
29282
  claim: async (params) => {
29279
- const projectRoot = getProjectRoot16();
29283
+ const projectRoot = getProjectRoot17();
29280
29284
  return wrapCoreResult(await taskClaim(projectRoot, params.taskId, params.agentId), "claim");
29281
29285
  },
29282
29286
  unclaim: async (params) => {
29283
- const projectRoot = getProjectRoot16();
29287
+ const projectRoot = getProjectRoot17();
29284
29288
  return wrapCoreResult(await taskUnclaim(projectRoot, params.taskId), "unclaim");
29285
29289
  }
29286
29290
  });
@@ -29506,7 +29510,7 @@ var init_tasks3 = __esm({
29506
29510
  });
29507
29511
 
29508
29512
  // packages/cleo/src/dispatch/domains/tools.ts
29509
- import { getLogger as getLogger16, getProjectRoot as getProjectRoot17 } from "@cleocode/core";
29513
+ import { getLogger as getLogger16, getProjectRoot as getProjectRoot18 } from "@cleocode/core";
29510
29514
  import {
29511
29515
  codeOutline,
29512
29516
  codeParse,
@@ -29551,7 +29555,7 @@ var init_tools = __esm({
29551
29555
  init_routing();
29552
29556
  ToolsHandler = class {
29553
29557
  get projectRoot() {
29554
- return getProjectRoot17();
29558
+ return getProjectRoot18();
29555
29559
  }
29556
29560
  // -----------------------------------------------------------------------
29557
29561
  // DomainHandler interface
@@ -30074,7 +30078,7 @@ var init_tools = __esm({
30074
30078
  // packages/cleo/src/dispatch/domains/upgrade.ts
30075
30079
  import { dirname as dirname3, resolve as resolve3 } from "node:path";
30076
30080
  import { fileURLToPath as fileURLToPath2 } from "node:url";
30077
- import { getLogger as getLogger17, getProjectRoot as getProjectRoot18 } from "@cleocode/core";
30081
+ import { getLogger as getLogger17, getProjectRoot as getProjectRoot19 } from "@cleocode/core";
30078
30082
  import { upgradeWorkflows } from "@cleocode/core/internal";
30079
30083
  function resolveTemplatesDir() {
30080
30084
  const here = dirname3(fileURLToPath2(import.meta.url));
@@ -30114,7 +30118,7 @@ var init_upgrade = __esm({
30114
30118
  case "workflows": {
30115
30119
  const includeRendered = params?.["includeRendered"] === true;
30116
30120
  const result = await upgradeWorkflows({
30117
- projectRoot: getProjectRoot18(),
30121
+ projectRoot: getProjectRoot19(),
30118
30122
  templatesDir: resolveTemplatesDir(),
30119
30123
  dryRun: true
30120
30124
  });
@@ -30157,7 +30161,7 @@ var init_upgrade = __esm({
30157
30161
  const dryRun = params?.["dryRun"] === true;
30158
30162
  const includeRendered = params?.["includeRendered"] === true;
30159
30163
  const result = await upgradeWorkflows({
30160
- projectRoot: getProjectRoot18(),
30164
+ projectRoot: getProjectRoot19(),
30161
30165
  templatesDir: resolveTemplatesDir(),
30162
30166
  force,
30163
30167
  dryRun
@@ -30198,7 +30202,7 @@ var init_upgrade = __esm({
30198
30202
  import {
30199
30203
  forceUnlockWorktree,
30200
30204
  getLogger as getLogger18,
30201
- getProjectRoot as getProjectRoot19,
30205
+ getProjectRoot as getProjectRoot20,
30202
30206
  listWorktrees,
30203
30207
  pruneOrphanedWorktreesByStatus
30204
30208
  } from "@cleocode/core/internal";
@@ -30249,7 +30253,7 @@ var init_worktree2 = __esm({
30249
30253
  switch (operation) {
30250
30254
  case "list": {
30251
30255
  const opts = {
30252
- projectRoot: getProjectRoot19(),
30256
+ projectRoot: getProjectRoot20(),
30253
30257
  statusFilter: coerceStatusFilter(params?.["statusFilter"]),
30254
30258
  staleDays: typeof params?.["staleDays"] === "number" ? params["staleDays"] : void 0
30255
30259
  };
@@ -30288,7 +30292,7 @@ var init_worktree2 = __esm({
30288
30292
  switch (operation) {
30289
30293
  case "prune": {
30290
30294
  const opts = {
30291
- projectRoot: getProjectRoot19(),
30295
+ projectRoot: getProjectRoot20(),
30292
30296
  dryRun: params?.["dryRun"] === true,
30293
30297
  ...typeof params?.["staleDays"] === "number" ? { staleDays: params["staleDays"] } : {},
30294
30298
  ...coerceStringList(params?.["paths"]) !== void 0 ? { paths: coerceStringList(params?.["paths"]) } : {},
@@ -30316,7 +30320,7 @@ var init_worktree2 = __esm({
30316
30320
  );
30317
30321
  }
30318
30322
  const opts = {
30319
- projectRoot: getProjectRoot19(),
30323
+ projectRoot: getProjectRoot20(),
30320
30324
  taskId,
30321
30325
  ...typeof params?.["actor"] === "string" && params["actor"].length > 0 ? { actor: params["actor"] } : {}
30322
30326
  };
@@ -30839,11 +30843,11 @@ var init_security = __esm({
30839
30843
  });
30840
30844
 
30841
30845
  // packages/cleo/src/dispatch/middleware/sanitizer.ts
30842
- function createSanitizer(getProjectRoot38) {
30846
+ function createSanitizer(getProjectRoot41) {
30843
30847
  return async (req, next) => {
30844
30848
  if (req.params) {
30845
30849
  try {
30846
- const root = getProjectRoot38 ? getProjectRoot38() : void 0;
30850
+ const root = getProjectRoot41 ? getProjectRoot41() : void 0;
30847
30851
  req.params = sanitizeParams(req.params, root, {
30848
30852
  domain: req.domain,
30849
30853
  operation: req.operation
@@ -30968,7 +30972,7 @@ import { createRequire } from "node:module";
30968
30972
  import { dirname as dirname4, join as join6 } from "node:path";
30969
30973
  import { fileURLToPath as fileURLToPath3 } from "node:url";
30970
30974
  import { catalog, registerSkillLibraryFromPath } from "@cleocode/caamp";
30971
- import { autoRecordDispatchTokenUsage, getProjectRoot as getProjectRoot20, hooks } from "@cleocode/core/internal";
30975
+ import { autoRecordDispatchTokenUsage, getProjectRoot as getProjectRoot21, hooks } from "@cleocode/core/internal";
30972
30976
  function ensureCaampLibrary() {
30973
30977
  if (catalog.isCatalogAvailable()) return;
30974
30978
  try {
@@ -31019,7 +31023,7 @@ function createCliDispatcher() {
31019
31023
  middlewares: [
31020
31024
  createSessionResolver(lookupCliSession),
31021
31025
  // T4959: session identity first
31022
- createSanitizer(() => getProjectRoot20()),
31026
+ createSanitizer(() => getProjectRoot21()),
31023
31027
  createFieldFilter(),
31024
31028
  createAudit(),
31025
31029
  // T4959: CLI now gets audit trail
@@ -31033,7 +31037,7 @@ function resetCliDispatcher() {
31033
31037
  }
31034
31038
  async function dispatchFromCli(gateway, domain, operation, params, outputOpts) {
31035
31039
  const dispatcher = getCliDispatcher();
31036
- const projectRoot = getProjectRoot20();
31040
+ const projectRoot = getProjectRoot21();
31037
31041
  const dispatchStart = Date.now();
31038
31042
  hooks.dispatch("PromptSubmit", projectRoot, {
31039
31043
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
@@ -31078,7 +31082,7 @@ async function dispatchFromCli(gateway, domain, operation, params, outputOpts) {
31078
31082
  operation,
31079
31083
  sessionId: response.meta.sessionId,
31080
31084
  requestId: response.meta.requestId,
31081
- cwd: getProjectRoot20()
31085
+ cwd: getProjectRoot21()
31082
31086
  });
31083
31087
  const opts = {
31084
31088
  command: outputOpts?.command ?? operation,
@@ -31140,7 +31144,7 @@ function handleRawError(response, _opts) {
31140
31144
  }
31141
31145
  async function dispatchRaw(gateway, domain, operation, params) {
31142
31146
  const dispatcher = getCliDispatcher();
31143
- const projectRoot = getProjectRoot20();
31147
+ const projectRoot = getProjectRoot21();
31144
31148
  const dispatchStart = Date.now();
31145
31149
  hooks.dispatch("PromptSubmit", projectRoot, {
31146
31150
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
@@ -31535,7 +31539,7 @@ __export(add_exports, {
31535
31539
  });
31536
31540
  import {
31537
31541
  appendSignedSeverityAttestation,
31538
- getProjectRoot as getProjectRoot21,
31542
+ getProjectRoot as getProjectRoot22,
31539
31543
  inferTaskAddParams
31540
31544
  } from "@cleocode/core";
31541
31545
  var addCommand;
@@ -31763,7 +31767,7 @@ var init_add = __esm({
31763
31767
  return;
31764
31768
  }
31765
31769
  if (args["depends-waiver"] !== void 0) params["dependsWaiver"] = args["depends-waiver"];
31766
- const inferred = await inferTaskAddParams(getProjectRoot21(), {
31770
+ const inferred = await inferTaskAddParams(getProjectRoot22(), {
31767
31771
  title: args.title,
31768
31772
  description: args.description ?? args.desc,
31769
31773
  filesInfer: args["files-infer"],
@@ -32387,6 +32391,7 @@ var agent_exports = {};
32387
32391
  __export(agent_exports, {
32388
32392
  agentCommand: () => agentCommand
32389
32393
  });
32394
+ import { getProjectRoot as getProjectRoot23 } from "@cleocode/core";
32390
32395
  import {
32391
32396
  checkAgentHealth,
32392
32397
  detectCrashedAgents,
@@ -32779,7 +32784,7 @@ var init_agent = __esm({
32779
32784
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
32780
32785
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
32781
32786
  await getDb3();
32782
- const registry = new AgentRegistryAccessor(process.cwd());
32787
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
32783
32788
  const agentId = args.id;
32784
32789
  const displayName = args.name;
32785
32790
  const classification = args.classification;
@@ -32897,7 +32902,7 @@ agent ${agentId}:
32897
32902
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
32898
32903
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
32899
32904
  await getDb3();
32900
- const registry = new AgentRegistryAccessor(process.cwd());
32905
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
32901
32906
  const credential = await registry.get(args.agentId);
32902
32907
  if (!credential) {
32903
32908
  cliOutput(
@@ -32985,7 +32990,7 @@ agent ${agentId}:
32985
32990
  const { existsSync: existsSync17, readFileSync: readFileSync18 } = await import("node:fs");
32986
32991
  const { join: join29 } = await import("node:path");
32987
32992
  await getDb3();
32988
- const registry = new AgentRegistryAccessor(process.cwd());
32993
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
32989
32994
  const credential = await registry.get(args.agentId);
32990
32995
  if (!credential) {
32991
32996
  cliOutput(
@@ -33104,7 +33109,7 @@ agent ${agentId}:
33104
33109
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
33105
33110
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33106
33111
  await getDb3();
33107
- const registry = new AgentRegistryAccessor(process.cwd());
33112
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
33108
33113
  const credential = await registry.get(args.agentId);
33109
33114
  if (!credential) {
33110
33115
  cliOutput(
@@ -33161,7 +33166,7 @@ agent ${agentId}:
33161
33166
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
33162
33167
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33163
33168
  await getDb3();
33164
- const registry = new AgentRegistryAccessor(process.cwd());
33169
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
33165
33170
  if (args.agentId) {
33166
33171
  const credential = await registry.get(args.agentId);
33167
33172
  if (!credential) {
@@ -33237,7 +33242,7 @@ agent ${agentId}:
33237
33242
  const { AgentRegistryAccessor, createConduit } = await import("@cleocode/core/agents");
33238
33243
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33239
33244
  await getDb3();
33240
- const registry = new AgentRegistryAccessor(process.cwd());
33245
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
33241
33246
  const active = await registry.getActive();
33242
33247
  if (!active) {
33243
33248
  cliOutput(
@@ -33294,7 +33299,7 @@ Assigned task ${args.taskId}. Run: cleo show ${args.taskId} && cleo start ${args
33294
33299
  const { AgentRegistryAccessor, createConduit } = await import("@cleocode/core/agents");
33295
33300
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33296
33301
  await getDb3();
33297
- const registry = new AgentRegistryAccessor(process.cwd());
33302
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
33298
33303
  const active = await registry.getActive();
33299
33304
  if (!active) {
33300
33305
  cliOutput(
@@ -33360,7 +33365,7 @@ You are idle. Check your queue: cleo current || cleo next. Report status immedia
33360
33365
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
33361
33366
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33362
33367
  await getDb3();
33363
- const registry = new AgentRegistryAccessor(process.cwd());
33368
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
33364
33369
  const role = args.role;
33365
33370
  const taskId = args.task;
33366
33371
  const model = args.model ?? "sonnet";
@@ -33425,7 +33430,7 @@ You are idle. Check your queue: cleo current || cleo next. Report status immedia
33425
33430
  const { AgentRegistryAccessor, createConduit } = await import("@cleocode/core/agents");
33426
33431
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33427
33432
  await getDb3();
33428
- const registry = new AgentRegistryAccessor(process.cwd());
33433
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
33429
33434
  const active = await registry.getActive();
33430
33435
  if (!active) {
33431
33436
  cliOutput(
@@ -33469,7 +33474,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
33469
33474
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
33470
33475
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33471
33476
  await getDb3();
33472
- const registry = new AgentRegistryAccessor(process.cwd());
33477
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
33473
33478
  const agents = await registry.list({ active: true });
33474
33479
  let stopped = 0;
33475
33480
  for (const a of agents) {
@@ -33542,7 +33547,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
33542
33547
  const { promisify: promisify2 } = await import("node:util");
33543
33548
  const execFileAsync = promisify2(execFile2);
33544
33549
  await getDb3();
33545
- const registry = new AgentRegistryAccessor(process.cwd());
33550
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
33546
33551
  const credential = await registry.get(args.agentId);
33547
33552
  if (!credential) {
33548
33553
  cliOutput(
@@ -33699,7 +33704,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
33699
33704
  await getDb3();
33700
33705
  const includeGlobal = args.global === true;
33701
33706
  const includeDisabled = args["include-disabled"] === true;
33702
- const agents = listAgentsForProject(process.cwd(), {
33707
+ const agents = listAgentsForProject(getProjectRoot23(), {
33703
33708
  includeGlobal,
33704
33709
  includeDisabled
33705
33710
  });
@@ -33750,7 +33755,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
33750
33755
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33751
33756
  await getDb3();
33752
33757
  const includeGlobal = args.global === true;
33753
- const agent = lookupAgent(process.cwd(), args.agentId, { includeGlobal });
33758
+ const agent = lookupAgent(getProjectRoot23(), args.agentId, { includeGlobal });
33754
33759
  if (!agent) {
33755
33760
  cliOutput(
33756
33761
  {
@@ -33816,7 +33821,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
33816
33821
  const { AgentRegistryAccessor, attachAgentToProject, lookupAgent } = await import("@cleocode/core/agents");
33817
33822
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33818
33823
  await getDb3();
33819
- const projectRoot = process.cwd();
33824
+ const projectRoot = getProjectRoot23();
33820
33825
  const _registry = new AgentRegistryAccessor(projectRoot);
33821
33826
  void _registry;
33822
33827
  const globalAgent = lookupAgent(projectRoot, args.agentId, { includeGlobal: true });
@@ -33872,7 +33877,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
33872
33877
  const { AgentRegistryAccessor, detachAgentFromProject, getProjectAgentRef } = await import("@cleocode/core/agents");
33873
33878
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33874
33879
  await getDb3();
33875
- const projectRoot = process.cwd();
33880
+ const projectRoot = getProjectRoot23();
33876
33881
  const _registry = new AgentRegistryAccessor(projectRoot);
33877
33882
  void _registry;
33878
33883
  const ref = getProjectAgentRef(projectRoot, args.agentId);
@@ -33929,7 +33934,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
33929
33934
  const { AgentRegistryAccessor, detachAgentFromProject, getProjectAgentRef } = await import("@cleocode/core/agents");
33930
33935
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
33931
33936
  await getDb3();
33932
- const projectRoot = process.cwd();
33937
+ const projectRoot = getProjectRoot23();
33933
33938
  if (!args.global) {
33934
33939
  const _registry = new AgentRegistryAccessor(projectRoot);
33935
33940
  void _registry;
@@ -34011,7 +34016,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34011
34016
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
34012
34017
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
34013
34018
  await getDb3();
34014
- const registry = new AgentRegistryAccessor(process.cwd());
34019
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
34015
34020
  const result = await registry.rotateKey(args.agentId);
34016
34021
  cliOutput(
34017
34022
  {
@@ -34050,7 +34055,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34050
34055
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
34051
34056
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
34052
34057
  await getDb3();
34053
- const registry = new AgentRegistryAccessor(process.cwd());
34058
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
34054
34059
  const credential = await registry.get(args.agentId);
34055
34060
  if (!credential) {
34056
34061
  cliOutput(
@@ -34125,7 +34130,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34125
34130
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
34126
34131
  const { createRuntime } = await import("@cleocode/runtime");
34127
34132
  await getDb3();
34128
- const registry = new AgentRegistryAccessor(process.cwd());
34133
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
34129
34134
  const groupIds = args.group ? args.group.split(",").map((s) => s.trim()) : void 0;
34130
34135
  const handle = await createRuntime(registry, {
34131
34136
  agentId: args.agent,
@@ -34208,7 +34213,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34208
34213
  const { AgentRegistryAccessor, createConduit } = await import("@cleocode/core/agents");
34209
34214
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
34210
34215
  await getDb3();
34211
- const registry = new AgentRegistryAccessor(process.cwd());
34216
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
34212
34217
  const agentId = args.agent;
34213
34218
  const conduit = await createConduit(registry, agentId);
34214
34219
  const limit = Number(args.limit) || 20;
@@ -34260,7 +34265,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34260
34265
  const { AgentRegistryAccessor, createConduit } = await import("@cleocode/core/agents");
34261
34266
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
34262
34267
  await getDb3();
34263
- const registry = new AgentRegistryAccessor(process.cwd());
34268
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
34264
34269
  const agentId = args.agent;
34265
34270
  const to = args.to;
34266
34271
  const conv = args.conv;
@@ -34538,7 +34543,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34538
34543
  const db = _sdDb;
34539
34544
  const isGlobal = args.global === true;
34540
34545
  const targetTier = isGlobal ? "global" : "project";
34541
- const projectRoot = process.cwd();
34546
+ const projectRoot = getProjectRoot23();
34542
34547
  try {
34543
34548
  if (args.resync) {
34544
34549
  const parsedName = basename(cantPath, ".cant");
@@ -34835,7 +34840,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34835
34840
  const xdgData = process.env["XDG_DATA_HOME"] ?? join29(home, ".local", "share");
34836
34841
  targetRoot = join29(xdgData, "cleo", "cant", "agents");
34837
34842
  } else {
34838
- targetRoot = join29(process.cwd(), CLEO_DIR_NAME, CANT_AGENTS_SUBDIR);
34843
+ targetRoot = join29(getProjectRoot23(), CLEO_DIR_NAME, CANT_AGENTS_SUBDIR);
34839
34844
  }
34840
34845
  const agentDir = join29(targetRoot, name);
34841
34846
  if (existsSync17(agentDir)) {
@@ -34908,7 +34913,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34908
34913
  const { AgentRegistryAccessor } = await import("@cleocode/core/agents");
34909
34914
  const { getDb: getDb3 } = await import("@cleocode/core/internal");
34910
34915
  await getDb3();
34911
- const registry = new AgentRegistryAccessor(process.cwd());
34916
+ const registry = new AgentRegistryAccessor(getProjectRoot23());
34912
34917
  const existing = await registry.get(name);
34913
34918
  if (!existing) {
34914
34919
  const descMatch = personaContent.match(/description:\s*"([^"]+)"/);
@@ -34992,7 +34997,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
34992
34997
  return;
34993
34998
  }
34994
34999
  const specContent = readFileSync18(specPath, "utf-8");
34995
- const projectRoot = process.cwd();
35000
+ const projectRoot = getProjectRoot23();
34996
35001
  const outputDir = args["output-dir"] ? resolve8(args["output-dir"]) : join29(projectRoot, ".cleo", "cant", "agents");
34997
35002
  mkdirSync7(outputDir, { recursive: true });
34998
35003
  if (args["dry-run"]) {
@@ -35123,7 +35128,7 @@ Task ${args.taskId} reassigned to you by ${active.agentId}. Run: cleo show ${arg
35123
35128
  const { db: _sdDb3 } = await openCleoDb2("signaldock");
35124
35129
  const db = _sdDb3;
35125
35130
  try {
35126
- const report = await buildDoctorReport(db, { projectRoot: process.cwd() });
35131
+ const report = await buildDoctorReport(db, { projectRoot: getProjectRoot23() });
35127
35132
  const repairFlag = args.repair === true;
35128
35133
  let reconciled;
35129
35134
  if (repairFlag) {
@@ -35391,7 +35396,7 @@ var audit_exports = {};
35391
35396
  __export(audit_exports, {
35392
35397
  auditCommand: () => auditCommand
35393
35398
  });
35394
- import { getProjectRoot as getProjectRoot22, reconstructLineage } from "@cleocode/core/internal";
35399
+ import { getProjectRoot as getProjectRoot24, reconstructLineage } from "@cleocode/core/internal";
35395
35400
  var reconstructCommand, auditCommand;
35396
35401
  var init_audit2 = __esm({
35397
35402
  "packages/cleo/src/cli/commands/audit.ts"() {
@@ -35435,7 +35440,7 @@ var init_audit2 = __esm({
35435
35440
  repoRoot = args["repo-root"];
35436
35441
  } else {
35437
35442
  try {
35438
- repoRoot = getProjectRoot22(process.cwd()) ?? process.cwd();
35443
+ repoRoot = getProjectRoot24(process.cwd()) ?? process.cwd();
35439
35444
  } catch {
35440
35445
  repoRoot = process.cwd();
35441
35446
  }
@@ -36059,7 +36064,7 @@ var backfill_exports = {};
36059
36064
  __export(backfill_exports, {
36060
36065
  backfillCommand: () => backfillCommand
36061
36066
  });
36062
- import { backfillTasks, getProjectRoot as getProjectRoot23, populateEmbeddings } from "@cleocode/core/internal";
36067
+ import { backfillTasks, getProjectRoot as getProjectRoot25, populateEmbeddings } from "@cleocode/core/internal";
36063
36068
  var backfillCommand;
36064
36069
  var init_backfill = __esm({
36065
36070
  "packages/cleo/src/cli/commands/backfill.ts"() {
@@ -36093,7 +36098,7 @@ var init_backfill = __esm({
36093
36098
  }
36094
36099
  },
36095
36100
  async run({ args }) {
36096
- const root = getProjectRoot23();
36101
+ const root = getProjectRoot25();
36097
36102
  if (args.embeddings) {
36098
36103
  try {
36099
36104
  let lastLine = "";
@@ -36611,9 +36616,9 @@ var init_backup = __esm({
36611
36616
  async run({ args }) {
36612
36617
  const scope = args.scope;
36613
36618
  const { packBundle } = await import("@cleocode/core/store/backup-pack.js");
36614
- const { getProjectRoot: getProjectRoot38 } = await import("@cleocode/core");
36619
+ const { getProjectRoot: getProjectRoot41 } = await import("@cleocode/core");
36615
36620
  const includesProject = scope === "project" || scope === "all";
36616
- const projectRoot = includesProject ? getProjectRoot38() : void 0;
36621
+ const projectRoot = includesProject ? getProjectRoot41() : void 0;
36617
36622
  let passphrase;
36618
36623
  if (args.encrypt === true) {
36619
36624
  passphrase = process.env["CLEO_BACKUP_PASSPHRASE"];
@@ -36689,12 +36694,12 @@ var init_backup = __esm({
36689
36694
  },
36690
36695
  async run({ args }) {
36691
36696
  const bundlePath = args.bundle;
36692
- const { getProjectRoot: getProjectRoot38, getCleoHome: getCleoHome3, getCleoVersion } = await import("@cleocode/core");
36697
+ const { getProjectRoot: getProjectRoot41, getCleoHome: getCleoHome3, getCleoVersion } = await import("@cleocode/core");
36693
36698
  const { BundleError, cleanupStaging, unpackBundle } = await import("@cleocode/core/store/backup-unpack.js");
36694
36699
  const { regenerateConfigJson, regenerateProjectContextJson, regenerateProjectInfoJson } = await import("@cleocode/core/store/regenerators.js");
36695
36700
  const { regenerateAndCompare } = await import("@cleocode/core/store/restore-json-merge.js");
36696
36701
  const { buildConflictReport, writeConflictReport } = await import("@cleocode/core/store/restore-conflict-report.js");
36697
- const projectRoot = getProjectRoot38();
36702
+ const projectRoot = getProjectRoot41();
36698
36703
  if (args.force !== true) {
36699
36704
  const existing = checkForExistingData(projectRoot, getCleoHome3());
36700
36705
  if (existing.length > 0) {
@@ -36912,7 +36917,7 @@ var brain_exports = {};
36912
36917
  __export(brain_exports, {
36913
36918
  brainCommand: () => brainCommand
36914
36919
  });
36915
- import { getProjectRoot as getProjectRoot24 } from "@cleocode/core";
36920
+ import { getProjectRoot as getProjectRoot26 } from "@cleocode/core";
36916
36921
  import {
36917
36922
  backfillBrainGraph,
36918
36923
  exportBrainAsGexf,
@@ -36957,7 +36962,7 @@ var init_brain2 = __esm({
36957
36962
  json: { type: "boolean", description: "Output results as JSON" }
36958
36963
  },
36959
36964
  async run({ args }) {
36960
- const root = getProjectRoot24();
36965
+ const root = getProjectRoot26();
36961
36966
  try {
36962
36967
  const result = await runBrainMaintenance(root, {
36963
36968
  skipDecay: !!args["skip-decay"],
@@ -37028,7 +37033,7 @@ var init_brain2 = __esm({
37028
37033
  json: { type: "boolean", description: "Output results as JSON" }
37029
37034
  },
37030
37035
  async run({ args: _args }) {
37031
- const root = getProjectRoot24();
37036
+ const root = getProjectRoot26();
37032
37037
  try {
37033
37038
  const result = await backfillBrainGraph(root);
37034
37039
  cliOutput(
@@ -37069,7 +37074,7 @@ var init_brain2 = __esm({
37069
37074
  json: { type: "boolean", description: "Output results as JSON" }
37070
37075
  },
37071
37076
  async run({ args: _args }) {
37072
- const root = getProjectRoot24();
37077
+ const root = getProjectRoot26();
37073
37078
  try {
37074
37079
  const result = await purgeBrainNoise(root);
37075
37080
  cliOutput(
@@ -37115,7 +37120,7 @@ var init_brain2 = __esm({
37115
37120
  json: { type: "boolean", description: "Output results as JSON" }
37116
37121
  },
37117
37122
  async run({ args }) {
37118
- const root = getProjectRoot24();
37123
+ const root = getProjectRoot26();
37119
37124
  const limit = Number.parseInt(args.limit, 10) || 20;
37120
37125
  try {
37121
37126
  const stats = await getPlasticityStats(root, limit);
@@ -37165,7 +37170,7 @@ var init_brain2 = __esm({
37165
37170
  json: { type: "boolean", description: "Output results as JSON" }
37166
37171
  },
37167
37172
  async run({ args: _args }) {
37168
- const root = getProjectRoot24();
37173
+ const root = getProjectRoot26();
37169
37174
  try {
37170
37175
  const report = await getMemoryQualityReport(root);
37171
37176
  cliOutput(
@@ -37214,7 +37219,7 @@ var init_brain2 = __esm({
37214
37219
  }
37215
37220
  },
37216
37221
  async run({ args }) {
37217
- const root = getProjectRoot24();
37222
+ const root = getProjectRoot26();
37218
37223
  const format = args.format ?? "gexf";
37219
37224
  if (format !== "gexf" && format !== "json") {
37220
37225
  cliError(`Invalid format: ${format}. Use 'gexf' or 'json'.`, "E_VALIDATION", {
@@ -41091,7 +41096,7 @@ import {
41091
41096
  exportDocument,
41092
41097
  formatError as formatError5,
41093
41098
  getAgentOutputsAbsolute,
41094
- getProjectRoot as getProjectRoot25,
41099
+ getProjectRoot as getProjectRoot27,
41095
41100
  listDocVersions,
41096
41101
  mergeDocs,
41097
41102
  publishDocs,
@@ -41387,7 +41392,7 @@ var init_docs3 = __esm({
41387
41392
  const taskId = String(args.task);
41388
41393
  const includeAttachments = args["include-attachments"] !== false;
41389
41394
  const includeMemoryRefs = args["include-memory-refs"] === true;
41390
- const projectRoot = getProjectRoot25();
41395
+ const projectRoot = getProjectRoot27();
41391
41396
  try {
41392
41397
  const result = await exportDocument({
41393
41398
  taskId,
@@ -41450,7 +41455,7 @@ var init_docs3 = __esm({
41450
41455
  }
41451
41456
  },
41452
41457
  async run({ args }) {
41453
- const projectRoot = getProjectRoot25();
41458
+ const projectRoot = getProjectRoot27();
41454
41459
  try {
41455
41460
  const result = await searchDocs2(String(args.query), {
41456
41461
  ownerId: args.owner ?? void 0,
@@ -41502,7 +41507,7 @@ var init_docs3 = __esm({
41502
41507
  }
41503
41508
  },
41504
41509
  async run({ args }) {
41505
- const projectRoot = getProjectRoot25();
41510
+ const projectRoot = getProjectRoot27();
41506
41511
  const rawStrategy = args.strategy ?? "three-way";
41507
41512
  const strategy = rawStrategy === "cherry-pick" || rawStrategy === "multi-diff" ? rawStrategy : "three-way";
41508
41513
  try {
@@ -41552,7 +41557,7 @@ var init_docs3 = __esm({
41552
41557
  }
41553
41558
  },
41554
41559
  async run({ args }) {
41555
- const projectRoot = getProjectRoot25();
41560
+ const projectRoot = getProjectRoot27();
41556
41561
  const fmt = args.format ?? "mermaid";
41557
41562
  try {
41558
41563
  const result = await buildDocsGraph({ ownerId: String(args.for), projectRoot });
@@ -41622,7 +41627,7 @@ var init_docs3 = __esm({
41622
41627
  }
41623
41628
  },
41624
41629
  async run({ args }) {
41625
- const projectRoot = getProjectRoot25();
41630
+ const projectRoot = getProjectRoot27();
41626
41631
  try {
41627
41632
  const result = await rankDocs({
41628
41633
  ownerId: String(args.for),
@@ -41661,7 +41666,7 @@ var init_docs3 = __esm({
41661
41666
  }
41662
41667
  },
41663
41668
  async run({ args }) {
41664
- const projectRoot = getProjectRoot25();
41669
+ const projectRoot = getProjectRoot27();
41665
41670
  try {
41666
41671
  const result = await listDocVersions({
41667
41672
  ownerId: String(args.for),
@@ -41705,7 +41710,7 @@ var init_docs3 = __esm({
41705
41710
  }
41706
41711
  },
41707
41712
  async run({ args }) {
41708
- const projectRoot = getProjectRoot25();
41713
+ const projectRoot = getProjectRoot27();
41709
41714
  try {
41710
41715
  const result = await publishDocs({
41711
41716
  ownerId: String(args.for),
@@ -42110,7 +42115,7 @@ __export(migrate_agents_v2_exports, {
42110
42115
  import { createHash as createHash2 } from "node:crypto";
42111
42116
  import { appendFileSync as appendFileSync2, existsSync as existsSync12, mkdirSync as mkdirSync3, readdirSync as readdirSync2, readFileSync as readFileSync12 } from "node:fs";
42112
42117
  import { join as join15 } from "node:path";
42113
- import { getProjectRoot as getProjectRoot26, installAgentFromCant } from "@cleocode/core/internal";
42118
+ import { getProjectRoot as getProjectRoot28, installAgentFromCant } from "@cleocode/core/internal";
42114
42119
  import { openCleoDb } from "@cleocode/core/store/open-cleo-db";
42115
42120
  function sha256Hex(bytes) {
42116
42121
  return createHash2("sha256").update(bytes).digest("hex");
@@ -42297,7 +42302,7 @@ var init_migrate_agents_v2 = __esm({
42297
42302
  }
42298
42303
  },
42299
42304
  async run({ args }) {
42300
- const projectRoot = getProjectRoot26();
42305
+ const projectRoot = getProjectRoot28();
42301
42306
  const verbose = args.quiet !== true;
42302
42307
  if (verbose) {
42303
42308
  humanInfo("Scanning .cleo/cant/agents/ and .cleo/agents/ for unregistered agents...");
@@ -42341,7 +42346,7 @@ __export(doctor_exports, {
42341
42346
  });
42342
42347
  import { mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "node:fs";
42343
42348
  import { join as join16 } from "node:path";
42344
- import { getProjectRoot as getProjectRoot27 } from "@cleocode/core";
42349
+ import { getProjectRoot as getProjectRoot29 } from "@cleocode/core";
42345
42350
  import {
42346
42351
  quarantineRogueCleoDir,
42347
42352
  scanRogueCleoDirs
@@ -42567,7 +42572,7 @@ var init_doctor = __esm({
42567
42572
  try {
42568
42573
  if (args.brain) {
42569
42574
  const { computeBrainHealthDashboard } = await import("@cleocode/core/memory/brain-health-dashboard.js");
42570
- const projectRoot = getProjectRoot27();
42575
+ const projectRoot = getProjectRoot29();
42571
42576
  const dashboard = await computeBrainHealthDashboard(projectRoot);
42572
42577
  cliOutput(dashboard, { command: "doctor", operation: "doctor.brain" });
42573
42578
  if (dashboard.hasP0Failure) {
@@ -42576,7 +42581,7 @@ var init_doctor = __esm({
42576
42581
  return;
42577
42582
  }
42578
42583
  if (args["scan-test-fixtures-in-prod"]) {
42579
- const projectRoot = getProjectRoot27();
42584
+ const projectRoot = getProjectRoot29();
42580
42585
  const matches = await scanTestFixturesInProd(projectRoot);
42581
42586
  const dryRun = args["dry-run"] !== false && args.quarantine !== true;
42582
42587
  const quarantined = !dryRun && matches.length > 0 ? await quarantineTestFixtures(projectRoot, matches) : void 0;
@@ -42664,7 +42669,7 @@ var init_doctor = __esm({
42664
42669
  progress.complete("Comprehensive diagnostics complete");
42665
42670
  } else if (args["scan-rogue-cleo-dirs"]) {
42666
42671
  progress.step(0, "Scanning for rogue .cleo/ directories");
42667
- const projectRoot = getProjectRoot27();
42672
+ const projectRoot = getProjectRoot29();
42668
42673
  const reports = scanRogueCleoDirs(projectRoot);
42669
42674
  progress.complete(
42670
42675
  `Found ${reports.length} rogue .cleo/ director${reports.length === 1 ? "y" : "ies"}`
@@ -42673,7 +42678,7 @@ var init_doctor = __esm({
42673
42678
  } else if (args["quarantine-rogue-cleo-dirs"]) {
42674
42679
  const isDryRun = args["dry-run"] === true;
42675
42680
  progress.step(0, `${isDryRun ? "[DRY RUN] " : ""}Scanning for rogue .cleo/ directories`);
42676
- const projectRoot = getProjectRoot27();
42681
+ const projectRoot = getProjectRoot29();
42677
42682
  const reports = scanRogueCleoDirs(projectRoot);
42678
42683
  if (reports.length === 0) {
42679
42684
  progress.complete("No rogue .cleo/ directories found \u2014 nothing to quarantine");
@@ -42727,7 +42732,7 @@ var init_doctor = __esm({
42727
42732
  const { detectAndRemoveLegacyGlobalFiles, detectAndRemoveStrayProjectNexus } = await import("@cleocode/core/store/cleanup-legacy.js");
42728
42733
  const { getCleoHome: getCleoHome3 } = await import("@cleocode/core");
42729
42734
  const cleoHome = getCleoHome3();
42730
- const projectRoot = getProjectRoot27();
42735
+ const projectRoot = getProjectRoot29();
42731
42736
  const legacyResult = detectAndRemoveLegacyGlobalFiles(cleoHome);
42732
42737
  const strayResult = detectAndRemoveStrayProjectNexus(projectRoot);
42733
42738
  const isDryRun = args["dry-run"] === true;
@@ -42776,7 +42781,7 @@ var init_doctor = __esm({
42776
42781
  { command: "doctor", operation: "admin.health" }
42777
42782
  );
42778
42783
  try {
42779
- const projectRoot = getProjectRoot27();
42784
+ const projectRoot = getProjectRoot29();
42780
42785
  const conflicts = readMigrationConflicts(projectRoot);
42781
42786
  if (conflicts.length > 0) {
42782
42787
  progress.complete(
@@ -43721,7 +43726,7 @@ __export(generate_changelog_exports, {
43721
43726
  import { execFileSync as execFileSync2 } from "node:child_process";
43722
43727
  import { existsSync as existsSync13, mkdirSync as mkdirSync5, readFileSync as readFileSync13, writeFileSync as writeFileSync5 } from "node:fs";
43723
43728
  import { dirname as dirname8, join as join19 } from "node:path";
43724
- import { CleoError as CleoError4, formatError as formatError6, getConfigPath, getProjectRoot as getProjectRoot28 } from "@cleocode/core";
43729
+ import { CleoError as CleoError4, formatError as formatError6, getConfigPath, getProjectRoot as getProjectRoot30 } from "@cleocode/core";
43725
43730
  function getChangelogSource(cwd) {
43726
43731
  const configPath = getConfigPath(cwd);
43727
43732
  try {
@@ -43752,7 +43757,7 @@ function getDefaultOutputPath(platform) {
43752
43757
  }
43753
43758
  }
43754
43759
  function getGitHubRepoSlug(cwd) {
43755
- const projectRoot = getProjectRoot28(cwd);
43760
+ const projectRoot = getProjectRoot30(cwd);
43756
43761
  try {
43757
43762
  const remoteUrl = execFileSync2("git", ["remote", "get-url", "origin"], {
43758
43763
  cwd: projectRoot,
@@ -43885,7 +43890,7 @@ var init_generate_changelog = __esm({
43885
43890
  const targetPlatform = args.platform;
43886
43891
  const dryRun = args["dry-run"] === true;
43887
43892
  const sourceFile = getChangelogSource();
43888
- const sourcePath = join19(getProjectRoot28(), sourceFile);
43893
+ const sourcePath = join19(getProjectRoot30(), sourceFile);
43889
43894
  if (!existsSync13(sourcePath)) {
43890
43895
  throw new CleoError4(4 /* NOT_FOUND */, `Changelog source not found: ${sourcePath}`);
43891
43896
  }
@@ -43898,7 +43903,7 @@ var init_generate_changelog = __esm({
43898
43903
  const outputPath = platformConfig?.path ?? getDefaultOutputPath(targetPlatform);
43899
43904
  const content = generateForPlatform(targetPlatform, sourceContent, repoSlug, limit);
43900
43905
  if (!dryRun) {
43901
- const fullPath = join19(getProjectRoot28(), outputPath);
43906
+ const fullPath = join19(getProjectRoot30(), outputPath);
43902
43907
  mkdirSync5(dirname8(fullPath), { recursive: true });
43903
43908
  writeFileSync5(fullPath, content, "utf-8");
43904
43909
  }
@@ -43919,7 +43924,7 @@ var init_generate_changelog = __esm({
43919
43924
  limit
43920
43925
  );
43921
43926
  if (!dryRun) {
43922
- const fullPath = join19(getProjectRoot28(), platformConfig.path);
43927
+ const fullPath = join19(getProjectRoot30(), platformConfig.path);
43923
43928
  mkdirSync5(dirname8(fullPath), { recursive: true });
43924
43929
  writeFileSync5(fullPath, content, "utf-8");
43925
43930
  }
@@ -46000,7 +46005,7 @@ var llm_cost_exports = {};
46000
46005
  __export(llm_cost_exports, {
46001
46006
  costCommand: () => costCommand
46002
46007
  });
46003
- import { getProjectRoot as getProjectRoot29 } from "@cleocode/core/internal";
46008
+ import { getProjectRoot as getProjectRoot31 } from "@cleocode/core/internal";
46004
46009
  import { computeCost } from "@cleocode/core/llm/usage-pricing";
46005
46010
  function resolveSessionId(raw) {
46006
46011
  if (raw === "current") {
@@ -46073,7 +46078,7 @@ var init_llm_cost = __esm({
46073
46078
  process.exit(6);
46074
46079
  }
46075
46080
  const sessionId = resolveSessionId(rawSessionId);
46076
- const projectRoot = getProjectRoot29(process.cwd());
46081
+ const projectRoot = getProjectRoot31(process.cwd());
46077
46082
  let breakdown;
46078
46083
  try {
46079
46084
  breakdown = await loadSessionCostBreakdown(projectRoot, sessionId);
@@ -47580,7 +47585,7 @@ import { createHash as createHash3 } from "node:crypto";
47580
47585
  import { existsSync as existsSync15, mkdirSync as mkdirSync6, readdirSync as readdirSync3, readFileSync as readFileSync15, writeFileSync as writeFileSync6 } from "node:fs";
47581
47586
  import { homedir as homedir7 } from "node:os";
47582
47587
  import { join as join21 } from "node:path";
47583
- import { getProjectRoot as getProjectRoot30 } from "@cleocode/core";
47588
+ import { getProjectRoot as getProjectRoot32 } from "@cleocode/core";
47584
47589
  import {
47585
47590
  getBrainDb as getBrainDb2,
47586
47591
  getDreamStatus,
@@ -48547,7 +48552,7 @@ var init_memory3 = __esm({
48547
48552
  },
48548
48553
  args: {},
48549
48554
  async run() {
48550
- const root = getProjectRoot30();
48555
+ const root = getProjectRoot32();
48551
48556
  try {
48552
48557
  const result = await runConsolidation(root);
48553
48558
  cliOutput(result, { command: "memory-consolidate", operation: "memory.consolidate" });
@@ -48571,7 +48576,7 @@ var init_memory3 = __esm({
48571
48576
  }
48572
48577
  },
48573
48578
  async run({ args }) {
48574
- const root = getProjectRoot30();
48579
+ const root = getProjectRoot32();
48575
48580
  if (args.status) {
48576
48581
  try {
48577
48582
  const status = await getDreamStatus(root);
@@ -48608,7 +48613,7 @@ var init_memory3 = __esm({
48608
48613
  }
48609
48614
  },
48610
48615
  async run({ args }) {
48611
- const root = getProjectRoot30();
48616
+ const root = getProjectRoot32();
48612
48617
  try {
48613
48618
  const { runObserver, runReflector } = await import("@cleocode/core/memory");
48614
48619
  const observerResult = await runObserver(root, args.session, {
@@ -48648,7 +48653,7 @@ var init_memory3 = __esm({
48648
48653
  }
48649
48654
  },
48650
48655
  async run({ args }) {
48651
- const root = getProjectRoot30();
48656
+ const root = getProjectRoot32();
48652
48657
  try {
48653
48658
  await getBrainDb2(root);
48654
48659
  const { totalDuplicateRows, groups } = await scanDuplicateEntries();
@@ -48694,7 +48699,7 @@ var init_memory3 = __esm({
48694
48699
  async run({ args }) {
48695
48700
  const sourceDir = args.from ?? join21(homedir7(), ".claude", "projects", "-mnt-projects-cleocode", "memory");
48696
48701
  const isDryRun = !!args["dry-run"];
48697
- const projectRoot = getProjectRoot30();
48702
+ const projectRoot = getProjectRoot32();
48698
48703
  const stateFile = join21(projectRoot, CLEO_DIR_NAME, MIGRATE_MEMORY_HASHES_JSON);
48699
48704
  if (!existsSync15(sourceDir)) {
48700
48705
  cliError(`Source directory not found: ${sourceDir}`, "E_NOT_FOUND", { name: "E_NOT_FOUND" });
@@ -48907,7 +48912,7 @@ var init_memory3 = __esm({
48907
48912
  },
48908
48913
  args: {},
48909
48914
  async run() {
48910
- const root = getProjectRoot30();
48915
+ const root = getProjectRoot32();
48911
48916
  try {
48912
48917
  await getBrainDb2(root);
48913
48918
  const result = await getTierStats(root);
@@ -48950,7 +48955,7 @@ var init_memory3 = __esm({
48950
48955
  }
48951
48956
  },
48952
48957
  async run({ args }) {
48953
- const root = getProjectRoot30();
48958
+ const root = getProjectRoot32();
48954
48959
  const targetTier = args.to;
48955
48960
  const reason = args.reason;
48956
48961
  const validTiers = ["medium", "long"];
@@ -49016,7 +49021,7 @@ var init_memory3 = __esm({
49016
49021
  }
49017
49022
  },
49018
49023
  async run({ args }) {
49019
- const root = getProjectRoot30();
49024
+ const root = getProjectRoot32();
49020
49025
  const targetTier = args.to;
49021
49026
  const reason = args.reason;
49022
49027
  const validTiers = ["short", "medium"];
@@ -49484,7 +49489,7 @@ var migrate_claude_mem_exports = {};
49484
49489
  __export(migrate_claude_mem_exports, {
49485
49490
  migrateClaudeMemCommand: () => migrateClaudeMemCommand
49486
49491
  });
49487
- import { getProjectRoot as getProjectRoot31, migrateClaudeMem } from "@cleocode/core/internal";
49492
+ import { getProjectRoot as getProjectRoot33, migrateClaudeMem } from "@cleocode/core/internal";
49488
49493
  import { ingestLooseAgentOutputs, ingestRcasdDirectories } from "@cleocode/core/memory";
49489
49494
  import { getDb as getDb2 } from "@cleocode/core/store/sqlite";
49490
49495
  var storageCommand, claudeMemCommand, manifestIngestCommand, migrateClaudeMemCommand;
@@ -49547,7 +49552,7 @@ var init_migrate_claude_mem = __esm({
49547
49552
  }
49548
49553
  },
49549
49554
  async run({ args }) {
49550
- const root = getProjectRoot31();
49555
+ const root = getProjectRoot33();
49551
49556
  try {
49552
49557
  const result = await migrateClaudeMem(root, {
49553
49558
  sourcePath: args.source,
@@ -49596,7 +49601,7 @@ var init_migrate_claude_mem = __esm({
49596
49601
  }
49597
49602
  },
49598
49603
  async run({ args }) {
49599
- const projectRoot = getProjectRoot31();
49604
+ const projectRoot = getProjectRoot33();
49600
49605
  try {
49601
49606
  const db = await getDb2(projectRoot);
49602
49607
  const rcasdFlag = Boolean(args.rcasd);
@@ -49700,6 +49705,7 @@ __export(nexus_exports, {
49700
49705
  import { appendFile, mkdir as mkdir2 } from "node:fs/promises";
49701
49706
  import { homedir as homedir8 } from "node:os";
49702
49707
  import path4 from "node:path";
49708
+ import { getProjectRoot as getProjectRoot34 } from "@cleocode/core";
49703
49709
  import { generateGexf, getSymbolImpact } from "@cleocode/core/nexus";
49704
49710
  async function appendDeprecationTelemetry(op, replacement) {
49705
49711
  try {
@@ -49811,7 +49817,7 @@ var init_nexus4 = __esm({
49811
49817
  async run({ args }) {
49812
49818
  applyJsonFlag2(args.json);
49813
49819
  const projectIdOverride = args["project-id"];
49814
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
49820
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
49815
49821
  const startTime = Date.now();
49816
49822
  try {
49817
49823
  const [{ getNexusDb, nexusSchema }, { getIndexStats }] = await Promise.all([
@@ -50326,7 +50332,7 @@ var init_nexus4 = __esm({
50326
50332
  applyJsonFlag2(args.json);
50327
50333
  const startTime = Date.now();
50328
50334
  const projectIdOverride = args["project-id"];
50329
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
50335
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
50330
50336
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
50331
50337
  const response = await dispatchRaw("query", "nexus", "clusters", { projectId, repoPath });
50332
50338
  const durationMs = Date.now() - startTime;
@@ -50370,7 +50376,7 @@ var init_nexus4 = __esm({
50370
50376
  applyJsonFlag2(args.json);
50371
50377
  const startTime = Date.now();
50372
50378
  const projectIdOverride = args["project-id"];
50373
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
50379
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
50374
50380
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
50375
50381
  const response = await dispatchRaw("query", "nexus", "flows", { projectId, repoPath });
50376
50382
  const durationMs = Date.now() - startTime;
@@ -50413,7 +50419,7 @@ var init_nexus4 = __esm({
50413
50419
  void appendDeprecationTelemetry("nexus.context", "cleo graph context");
50414
50420
  const startTime = Date.now();
50415
50421
  const projectIdOverride = args["project-id"];
50416
- const repoPath = process.cwd();
50422
+ const repoPath = getProjectRoot34();
50417
50423
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
50418
50424
  const limit = parseInt(args.limit, 10);
50419
50425
  const symbolName = args.symbol;
@@ -50476,7 +50482,7 @@ var init_nexus4 = __esm({
50476
50482
  const startTime = Date.now();
50477
50483
  const whyFlag = !!args.why;
50478
50484
  const projectIdOverride = args["project-id"];
50479
- const repoPath = process.cwd();
50485
+ const repoPath = getProjectRoot34();
50480
50486
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
50481
50487
  const maxDepth = Math.min(parseInt(args.depth, 10), 5);
50482
50488
  const symbolName = args.symbol;
@@ -50548,13 +50554,12 @@ var init_nexus4 = __esm({
50548
50554
  const projectIdOverride = args["project-id"];
50549
50555
  const isIncremental = !!args.incremental;
50550
50556
  const ctx = getFormatContext();
50551
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
50557
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
50552
50558
  humanInfo(`[nexus] Analyzing: ${repoPath}${isIncremental ? " (incremental)" : ""}`);
50553
50559
  try {
50554
- const [{ getNexusDb, nexusSchema }, { runPipeline }, { getProjectRoot: getProjectRoot38 }, { eq: eq2 }] = await Promise.all([
50560
+ const [{ getNexusDb, nexusSchema }, { runPipeline }, { eq: eq2 }] = await Promise.all([
50555
50561
  import("@cleocode/core/store/nexus-sqlite"),
50556
50562
  import("@cleocode/nexus/pipeline"),
50557
- import("@cleocode/core/internal"),
50558
50563
  import("drizzle-orm")
50559
50564
  ]);
50560
50565
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
@@ -50631,7 +50636,6 @@ var init_nexus4 = __esm({
50631
50636
  extensions: { duration_ms: durationMs }
50632
50637
  }
50633
50638
  );
50634
- void getProjectRoot38;
50635
50639
  } catch (err) {
50636
50640
  const msg = err instanceof Error ? err.message : String(err);
50637
50641
  cliError(
@@ -50702,7 +50706,7 @@ var init_nexus4 = __esm({
50702
50706
  async run({ args }) {
50703
50707
  applyJsonFlag2(args.json);
50704
50708
  const startTime = Date.now();
50705
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
50709
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
50706
50710
  const name = args.name;
50707
50711
  const response = await dispatchRaw("mutate", "nexus", "projects.register", {
50708
50712
  path: repoPath,
@@ -51060,7 +51064,7 @@ var init_nexus4 = __esm({
51060
51064
  applyJsonFlag2(args.json);
51061
51065
  const startTime = Date.now();
51062
51066
  const projectIdOverride = args["project-id"];
51063
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
51067
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
51064
51068
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
51065
51069
  const response = await dispatchRaw("mutate", "nexus", "refresh-bridge", {
51066
51070
  repoPath,
@@ -51209,7 +51213,7 @@ var init_nexus4 = __esm({
51209
51213
  async run({ args }) {
51210
51214
  applyJsonFlag2(args.json);
51211
51215
  const startTime = Date.now();
51212
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
51216
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
51213
51217
  const projectIdOverride = args["project-id"];
51214
51218
  const beforeRef = args.before ?? "HEAD~1";
51215
51219
  const afterRef = args.after ?? "HEAD";
@@ -51327,7 +51331,7 @@ var init_nexus4 = __esm({
51327
51331
  applyJsonFlag2(args.json);
51328
51332
  const startTime = Date.now();
51329
51333
  const projectIdOverride = args["project-id"];
51330
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
51334
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
51331
51335
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
51332
51336
  const response = await dispatchRaw("query", "nexus", "route-map", { projectId });
51333
51337
  const durationMs = Date.now() - startTime;
@@ -51383,7 +51387,7 @@ var init_nexus4 = __esm({
51383
51387
  const startTime = Date.now();
51384
51388
  const routeSymbol = args.routeSymbol;
51385
51389
  const projectIdOverride = args["project-id"];
51386
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
51390
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
51387
51391
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
51388
51392
  const response = await dispatchRaw("query", "nexus", "shape-check", { routeSymbol, projectId });
51389
51393
  const durationMs = Date.now() - startTime;
@@ -51773,7 +51777,7 @@ var init_nexus4 = __esm({
51773
51777
  async run({ args }) {
51774
51778
  applyJsonFlag2(args.json);
51775
51779
  const startTime = Date.now();
51776
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
51780
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
51777
51781
  const projectIdOverride = args["project-id"];
51778
51782
  const projectId = projectIdOverride ?? Buffer.from(repoPath).toString("base64url").slice(0, 32);
51779
51783
  const response = await dispatchRaw("mutate", "nexus", "contracts-sync", {
@@ -51877,7 +51881,7 @@ var init_nexus4 = __esm({
51877
51881
  async run({ args }) {
51878
51882
  applyJsonFlag2(args.json);
51879
51883
  const startTime = Date.now();
51880
- const repoPath = args.path ? path4.resolve(args.path) : process.cwd();
51884
+ const repoPath = args.path ? path4.resolve(args.path) : getProjectRoot34();
51881
51885
  const projectId = Buffer.from(repoPath).toString("base64url").slice(0, 32);
51882
51886
  const response = await dispatchRaw("mutate", "nexus", "contracts-link-tasks", {
51883
51887
  projectId,
@@ -51953,7 +51957,7 @@ var init_nexus4 = __esm({
51953
51957
  async run({ args }) {
51954
51958
  applyJsonFlag2(args.json);
51955
51959
  const startTime = Date.now();
51956
- const outputDir = args.output ?? path4.join(process.cwd(), ".cleo", "wiki");
51960
+ const outputDir = args.output ?? path4.join(getProjectRoot34(), ".cleo", "wiki");
51957
51961
  const communityFilter = args.community ?? void 0;
51958
51962
  const isIncremental = !!args.incremental;
51959
51963
  let loomProvider = null;
@@ -51977,11 +51981,11 @@ var init_nexus4 = __esm({
51977
51981
  }
51978
51982
  try {
51979
51983
  const { generateNexusWikiIndex } = await import("@cleocode/core/nexus/wiki-index.js");
51980
- const result = await generateNexusWikiIndex(outputDir, process.cwd(), {
51984
+ const result = await generateNexusWikiIndex(outputDir, getProjectRoot34(), {
51981
51985
  communityFilter,
51982
51986
  incremental: isIncremental,
51983
51987
  loomProvider,
51984
- projectRoot: process.cwd()
51988
+ projectRoot: getProjectRoot34()
51985
51989
  });
51986
51990
  const durationMs = Date.now() - startTime;
51987
51991
  if (!result.success) {
@@ -54379,7 +54383,7 @@ var refresh_memory_exports = {};
54379
54383
  __export(refresh_memory_exports, {
54380
54384
  refreshMemoryCommand: () => refreshMemoryCommand
54381
54385
  });
54382
- import { getProjectRoot as getProjectRoot32 } from "@cleocode/core";
54386
+ import { getProjectRoot as getProjectRoot35 } from "@cleocode/core";
54383
54387
  var refreshMemoryCommand;
54384
54388
  var init_refresh_memory = __esm({
54385
54389
  "packages/cleo/src/cli/commands/refresh-memory.ts"() {
@@ -54392,7 +54396,7 @@ var init_refresh_memory = __esm({
54392
54396
  description: "Regenerate .cleo/memory-bridge.md from brain.db"
54393
54397
  },
54394
54398
  async run() {
54395
- const projectDir = getProjectRoot32();
54399
+ const projectDir = getProjectRoot35();
54396
54400
  const { writeMemoryBridge } = await import("@cleocode/core/internal");
54397
54401
  const result = await writeMemoryBridge(projectDir);
54398
54402
  if (result.written) {
@@ -55772,7 +55776,7 @@ __export(restore_exports, {
55772
55776
  });
55773
55777
  import fs3 from "node:fs";
55774
55778
  import path5 from "node:path";
55775
- import { CleoError as CleoError8, getProjectRoot as getProjectRoot33, getTaskAccessor as getTaskAccessor3 } from "@cleocode/core";
55779
+ import { CleoError as CleoError8, getProjectRoot as getProjectRoot36, getTaskAccessor as getTaskAccessor3 } from "@cleocode/core";
55776
55780
  function parseMarkdownValue(raw) {
55777
55781
  const trimmed = raw.trim();
55778
55782
  if (trimmed === "_(not present)_" || trimmed === "") return void 0;
@@ -55892,7 +55896,7 @@ var init_restore = __esm({
55892
55896
  description: "Apply manually-resolved conflicts from .cleo/restore-conflicts.md"
55893
55897
  },
55894
55898
  async run() {
55895
- const projectRoot = getProjectRoot33();
55899
+ const projectRoot = getProjectRoot36();
55896
55900
  const reportPath = path5.join(projectRoot, CLEO_DIR_NAME, RESTORE_CONFLICTS_MD);
55897
55901
  if (!fs3.existsSync(reportPath)) {
55898
55902
  humanLine("No pending restore conflicts. Nothing to finalize.");
@@ -58014,7 +58018,7 @@ var sequence_exports = {};
58014
58018
  __export(sequence_exports, {
58015
58019
  sequenceCommand: () => sequenceCommand
58016
58020
  });
58017
- import { getProjectRoot as getProjectRoot34 } from "@cleocode/core/internal";
58021
+ import { getProjectRoot as getProjectRoot37 } from "@cleocode/core/internal";
58018
58022
  var showCommand12, checkCommand6, repairCommand, sequenceCommand;
58019
58023
  var init_sequence = __esm({
58020
58024
  "packages/cleo/src/cli/commands/sequence.ts"() {
@@ -58050,7 +58054,7 @@ var init_sequence = __esm({
58050
58054
  meta: { name: "repair", description: "Reset counter to max + 1 if behind" },
58051
58055
  async run() {
58052
58056
  const { repairSequence } = await import("@cleocode/core/internal");
58053
- const projectRoot = getProjectRoot34();
58057
+ const projectRoot = getProjectRoot37();
58054
58058
  const repair = await repairSequence(projectRoot);
58055
58059
  const result = {
58056
58060
  repaired: repair.repaired,
@@ -58493,8 +58497,8 @@ var init_session4 = __esm({
58493
58497
  "audit-scope": { type: "string", description: "Audit log scope (global|local)" }
58494
58498
  },
58495
58499
  async run({ args }) {
58496
- const { detectSessionDrift, getProjectRoot: getProjectRoot38 } = await import("@cleocode/core");
58497
- const projectRoot = await getProjectRoot38();
58500
+ const { detectSessionDrift, getProjectRoot: getProjectRoot41 } = await import("@cleocode/core");
58501
+ const projectRoot = await getProjectRoot41();
58498
58502
  const scope = args["audit-scope"] === "local" ? "local" : "global";
58499
58503
  const report = await detectSessionDrift({ projectRoot, auditScope: scope });
58500
58504
  cliOutput(report, { command: "session drift", operation: "session.drift" });
@@ -60695,7 +60699,7 @@ __export(token_exports, {
60695
60699
  tokenCommand: () => tokenCommand
60696
60700
  });
60697
60701
  import { readFileSync as readFileSync16 } from "node:fs";
60698
- import { getProjectRoot as getProjectRoot35, measureTokenExchange, recordTokenExchange as recordTokenExchange2 } from "@cleocode/core/internal";
60702
+ import { getProjectRoot as getProjectRoot38, measureTokenExchange, recordTokenExchange as recordTokenExchange2 } from "@cleocode/core/internal";
60699
60703
  function readPayload(args, textKey, fileKey) {
60700
60704
  const text = args[textKey];
60701
60705
  const file = args[fileKey];
@@ -60859,7 +60863,7 @@ var init_token = __esm({
60859
60863
  domain: args.domain,
60860
60864
  operation: args.operation
60861
60865
  };
60862
- const result = args.record ? await recordTokenExchange2(getProjectRoot35(), input2) : await measureTokenExchange(input2);
60866
+ const result = args.record ? await recordTokenExchange2(getProjectRoot38(), input2) : await measureTokenExchange(input2);
60863
60867
  cliOutput(result, {
60864
60868
  command: "token",
60865
60869
  operation: args.record ? "admin.token.record" : "token.estimate"
@@ -60895,7 +60899,7 @@ __export(transcript_exports, {
60895
60899
  });
60896
60900
  import { homedir as homedir9 } from "node:os";
60897
60901
  import { join as join25 } from "node:path";
60898
- import { getProjectRoot as getProjectRoot36 } from "@cleocode/core";
60902
+ import { getProjectRoot as getProjectRoot39 } from "@cleocode/core";
60899
60903
  import {
60900
60904
  parseDurationMs,
60901
60905
  pruneTranscripts,
@@ -60925,7 +60929,7 @@ var init_transcript = __esm({
60925
60929
  async run({ args }) {
60926
60930
  if (args.pending) {
60927
60931
  try {
60928
- const projectRoot = getProjectRoot36();
60932
+ const projectRoot = getProjectRoot39();
60929
60933
  const { scanPendingTranscripts } = await import("@cleocode/core/memory/transcript-scanner.js");
60930
60934
  const pending = await scanPendingTranscripts(projectRoot);
60931
60935
  cliOutput(
@@ -61022,7 +61026,7 @@ var init_transcript = __esm({
61022
61026
  async run({ args }) {
61023
61027
  const tier = args.tier ?? "warm";
61024
61028
  const dryRun = args["dry-run"] ?? false;
61025
- const projectRoot = getProjectRoot36();
61029
+ const projectRoot = getProjectRoot39();
61026
61030
  try {
61027
61031
  const { extractTranscript } = await import("@cleocode/core/memory/transcript-extractor.js");
61028
61032
  const { findSessionTranscriptPath, listAllTranscripts } = await import("@cleocode/core/memory/transcript-scanner.js");
@@ -61134,7 +61138,7 @@ var init_transcript = __esm({
61134
61138
  const dryRun = args["dry-run"] ?? false;
61135
61139
  const olderThanHours = args["older-than-hours"] ? Number.parseInt(args["older-than-hours"], 10) : 24;
61136
61140
  const limit = args.limit ? Number.parseInt(args.limit, 10) : void 0;
61137
- const projectRoot = getProjectRoot36();
61141
+ const projectRoot = getProjectRoot39();
61138
61142
  try {
61139
61143
  const { extractTranscript } = await import("@cleocode/core/memory/transcript-extractor.js");
61140
61144
  const { listAllTranscripts } = await import("@cleocode/core/memory/transcript-scanner.js");
@@ -62249,7 +62253,7 @@ __export(worktree_exports, {
62249
62253
  worktreeCommand: () => worktreeCommand
62250
62254
  });
62251
62255
  import readline4 from "node:readline";
62252
- import { getProjectRoot as getProjectRoot37, listWorktrees as listWorktrees2 } from "@cleocode/core/internal";
62256
+ import { getProjectRoot as getProjectRoot40, listWorktrees as listWorktrees2 } from "@cleocode/core/internal";
62253
62257
  async function promptYesNo2(question) {
62254
62258
  return new Promise((resolve8) => {
62255
62259
  const rl = readline4.createInterface({ input: process.stdin, output: process.stdout });
@@ -62348,7 +62352,7 @@ var init_worktree3 = __esm({
62348
62352
  const yes = args["yes"] === true;
62349
62353
  const staleDaysRaw = typeof args["days"] === "string" ? args["days"] : void 0;
62350
62354
  const staleDays = staleDaysRaw !== void 0 ? Number.parseInt(staleDaysRaw, 10) : void 0;
62351
- const projectRoot = getProjectRoot37();
62355
+ const projectRoot = getProjectRoot40();
62352
62356
  const listResult = await listWorktrees2({
62353
62357
  projectRoot,
62354
62358
  ...staleDays !== void 0 && !Number.isNaN(staleDays) ? { staleDays } : {}
@@ -63777,7 +63781,7 @@ async function runStartupMaintenance() {
63777
63781
  detectAndRemoveStrayProjectNexus,
63778
63782
  getGlobalSalt,
63779
63783
  getLogger: getLogger20,
63780
- getProjectRoot: getProjectRoot38,
63784
+ getProjectRoot: getProjectRoot41,
63781
63785
  isCleanupMarkerSet,
63782
63786
  migrateSignaldockToConduit,
63783
63787
  needsSignaldockToConduitMigration,
@@ -63786,7 +63790,7 @@ async function runStartupMaintenance() {
63786
63790
  } = await import("@cleocode/core/internal");
63787
63791
  let projectRootForCleanup = "";
63788
63792
  try {
63789
- projectRootForCleanup = getProjectRoot38();
63793
+ projectRootForCleanup = getProjectRoot41();
63790
63794
  } catch {
63791
63795
  }
63792
63796
  if (!isCleanupMarkerSet(CLI_VERSION, projectRootForCleanup)) {
@@ -63806,7 +63810,7 @@ async function runStartupMaintenance() {
63806
63810
  const isInitInvocation = process.argv.slice(2).some((a) => a === "init");
63807
63811
  if (!isInitInvocation) {
63808
63812
  try {
63809
- const _projectRootForMigration = getProjectRoot38();
63813
+ const _projectRootForMigration = getProjectRoot41();
63810
63814
  if (needsSignaldockToConduitMigration(_projectRootForMigration)) {
63811
63815
  const migrationResult = migrateSignaldockToConduit(_projectRootForMigration);
63812
63816
  if (migrationResult.status === "failed") {