@cleocode/cleo 2026.5.97 → 2026.5.98
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 +110 -16
- package/dist/cli/index.js.map +2 -2
- package/package.json +12 -12
package/dist/cli/index.js
CHANGED
|
@@ -39548,6 +39548,17 @@ var init_briefing = __esm({
|
|
|
39548
39548
|
type: "boolean",
|
|
39549
39549
|
description: "Include user profile traits in the bundle (suppressed by default)",
|
|
39550
39550
|
default: false
|
|
39551
|
+
},
|
|
39552
|
+
/**
|
|
39553
|
+
* T9964: restore full text fields on peerLearnings and decisions.
|
|
39554
|
+
* By default these are truncated to 80-char previews with a `_next.fetch`
|
|
39555
|
+
* hint. Pass --memory-detail to restore the full `insight` and `decision`
|
|
39556
|
+
* body fields (equivalent to pre-T9964 output for those fields).
|
|
39557
|
+
*/
|
|
39558
|
+
"memory-detail": {
|
|
39559
|
+
type: "boolean",
|
|
39560
|
+
description: "Restore full peerLearnings/decisions body text (suppressed by default for token budget)",
|
|
39561
|
+
default: false
|
|
39551
39562
|
}
|
|
39552
39563
|
},
|
|
39553
39564
|
async run({ args, cmd, rawArgs }) {
|
|
@@ -39575,7 +39586,8 @@ var init_briefing = __esm({
|
|
|
39575
39586
|
maxBlocked: parseInt(args["max-blocked"], 10),
|
|
39576
39587
|
maxEpics: parseInt(args["max-epics"], 10),
|
|
39577
39588
|
debug: args.debug,
|
|
39578
|
-
withProfile: args["with-profile"]
|
|
39589
|
+
withProfile: args["with-profile"],
|
|
39590
|
+
memoryDetail: args["memory-detail"]
|
|
39579
39591
|
},
|
|
39580
39592
|
{ command: "briefing" }
|
|
39581
39593
|
);
|
|
@@ -46060,7 +46072,7 @@ __export(doctor_exports, {
|
|
|
46060
46072
|
});
|
|
46061
46073
|
import { mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "node:fs";
|
|
46062
46074
|
import { join as join23 } from "node:path";
|
|
46063
|
-
import { getProjectRoot as getProjectRoot33 } from "@cleocode/core";
|
|
46075
|
+
import { getProjectRoot as getProjectRoot33, pushWarning as pushWarning2 } from "@cleocode/core";
|
|
46064
46076
|
import {
|
|
46065
46077
|
quarantineRogueCleoDir,
|
|
46066
46078
|
scanRogueCleoDirs
|
|
@@ -46237,6 +46249,23 @@ var init_doctor = __esm({
|
|
|
46237
46249
|
type: "boolean",
|
|
46238
46250
|
description: "List orphan .cleo/ directories under .claude/worktrees/ (T9790, fallout from T9550/T9580)"
|
|
46239
46251
|
},
|
|
46252
|
+
/**
|
|
46253
|
+
* T9962: timeout in seconds for --audit-worktree-orphans and
|
|
46254
|
+
* --prune-worktree-orphans. On expiry the scan returns a partial result.
|
|
46255
|
+
* Default: 30 seconds.
|
|
46256
|
+
*/
|
|
46257
|
+
timeout: {
|
|
46258
|
+
type: "string",
|
|
46259
|
+
description: "Timeout in seconds for worktree-orphan audit/prune scan (default: 30). Partial results are returned on expiry."
|
|
46260
|
+
},
|
|
46261
|
+
/**
|
|
46262
|
+
* T9962: per-level fan-out cap for --audit-worktree-orphans.
|
|
46263
|
+
* Default: 500.
|
|
46264
|
+
*/
|
|
46265
|
+
"max-entries-per-level": {
|
|
46266
|
+
type: "string",
|
|
46267
|
+
description: "Per-level entry hard-stop for worktree-orphan scan (default: 500). Scan aborts with partial result when exceeded."
|
|
46268
|
+
},
|
|
46240
46269
|
/**
|
|
46241
46270
|
* T9790: archive then remove every orphan reported by
|
|
46242
46271
|
* `--audit-worktree-orphans`. Combine with `--dry-run` to preview
|
|
@@ -46495,21 +46524,50 @@ var init_doctor = __esm({
|
|
|
46495
46524
|
}
|
|
46496
46525
|
} else if (args["audit-worktree-orphans"]) {
|
|
46497
46526
|
progress.step(0, "Comprehensive worktree anomaly audit (T9808 / council D009)");
|
|
46498
|
-
const { auditWorktreeOrphansComprehensive,
|
|
46527
|
+
const { auditWorktreeOrphansComprehensive, scanWorktreeOrphansBudgeted } = await import("@cleocode/core/doctor/worktree-orphans.js");
|
|
46499
46528
|
const projectRoot = getProjectRoot33();
|
|
46500
|
-
const [
|
|
46529
|
+
const timeoutSecs = args["timeout"] !== void 0 ? Number.parseInt(String(args["timeout"]), 10) : 30;
|
|
46530
|
+
const timeoutMs = Number.isFinite(timeoutSecs) && timeoutSecs > 0 ? timeoutSecs * 1e3 : 3e4;
|
|
46531
|
+
const maxEntriesPerLevel = args["max-entries-per-level"] !== void 0 ? Number.parseInt(String(args["max-entries-per-level"]), 10) : 500;
|
|
46532
|
+
const [comprehensive, legacyScanResult] = await Promise.all([
|
|
46501
46533
|
auditWorktreeOrphansComprehensive(projectRoot),
|
|
46502
|
-
|
|
46534
|
+
scanWorktreeOrphansBudgeted(projectRoot, {
|
|
46535
|
+
timeoutMs,
|
|
46536
|
+
maxEntriesPerLevel: Number.isFinite(maxEntriesPerLevel) ? maxEntriesPerLevel : 500
|
|
46537
|
+
})
|
|
46503
46538
|
]);
|
|
46539
|
+
const legacyOrphans = legacyScanResult.orphans;
|
|
46504
46540
|
const totalAnomalies = comprehensive.count;
|
|
46541
|
+
if (legacyScanResult.softWarnMessage) {
|
|
46542
|
+
pushWarning2({
|
|
46543
|
+
code: "W_DOCTOR_SCAN_SOFT_WARN",
|
|
46544
|
+
message: legacyScanResult.softWarnMessage,
|
|
46545
|
+
severity: "warn"
|
|
46546
|
+
});
|
|
46547
|
+
}
|
|
46548
|
+
if (legacyScanResult.isPartial) {
|
|
46549
|
+
const reason = legacyScanResult.partialReason === "timeout" ? `timed out after ${timeoutSecs}s (use --timeout <seconds> to adjust)` : `per-level entry cap of ${maxEntriesPerLevel} exceeded (use --max-entries-per-level <n> to adjust)`;
|
|
46550
|
+
pushWarning2({
|
|
46551
|
+
code: "W_DOCTOR_SCAN_PARTIAL",
|
|
46552
|
+
message: `legacy orphan scan is PARTIAL \u2014 ${reason}. Results may be incomplete.`,
|
|
46553
|
+
severity: "warn",
|
|
46554
|
+
context: {
|
|
46555
|
+
partialReason: legacyScanResult.partialReason,
|
|
46556
|
+
timeoutSecs,
|
|
46557
|
+
maxEntriesPerLevel
|
|
46558
|
+
}
|
|
46559
|
+
});
|
|
46560
|
+
}
|
|
46505
46561
|
progress.complete(
|
|
46506
|
-
`Found ${totalAnomalies} anomal${totalAnomalies === 1 ? "y" : "ies"}` + (legacyOrphans.length > 0 ? ` (${legacyOrphans.length} legacy orphan(s))` : "")
|
|
46562
|
+
`Found ${totalAnomalies} anomal${totalAnomalies === 1 ? "y" : "ies"}` + (legacyOrphans.length > 0 ? ` (${legacyOrphans.length} legacy orphan(s))` : "") + (legacyScanResult.isPartial ? " [PARTIAL]" : "")
|
|
46507
46563
|
);
|
|
46508
46564
|
cliOutput(
|
|
46509
46565
|
{
|
|
46510
46566
|
projectRoot,
|
|
46511
46567
|
comprehensive,
|
|
46512
46568
|
legacyOrphans,
|
|
46569
|
+
legacyScanPartial: legacyScanResult.isPartial,
|
|
46570
|
+
legacyScanPartialReason: legacyScanResult.partialReason,
|
|
46513
46571
|
count: totalAnomalies
|
|
46514
46572
|
},
|
|
46515
46573
|
{ command: "doctor", operation: "doctor.audit-worktree-orphans" }
|
|
@@ -46523,11 +46581,40 @@ var init_doctor = __esm({
|
|
|
46523
46581
|
0,
|
|
46524
46582
|
`${isDryRun ? "[DRY RUN] " : ""}Scanning + pruning worktree-orphan .cleo/ directories`
|
|
46525
46583
|
);
|
|
46526
|
-
const { pruneWorktreeOrphans,
|
|
46584
|
+
const { pruneWorktreeOrphans, scanWorktreeOrphansBudgeted } = await import("@cleocode/core/doctor/worktree-orphans.js");
|
|
46527
46585
|
const projectRoot = getProjectRoot33();
|
|
46528
|
-
const
|
|
46586
|
+
const timeoutSecs = args["timeout"] !== void 0 ? Number.parseInt(String(args["timeout"]), 10) : 30;
|
|
46587
|
+
const timeoutMs = Number.isFinite(timeoutSecs) && timeoutSecs > 0 ? timeoutSecs * 1e3 : 3e4;
|
|
46588
|
+
const maxEntriesPerLevel = args["max-entries-per-level"] !== void 0 ? Number.parseInt(String(args["max-entries-per-level"]), 10) : 500;
|
|
46589
|
+
const scanResult = await scanWorktreeOrphansBudgeted(projectRoot, {
|
|
46590
|
+
timeoutMs,
|
|
46591
|
+
maxEntriesPerLevel: Number.isFinite(maxEntriesPerLevel) ? maxEntriesPerLevel : 500
|
|
46592
|
+
});
|
|
46593
|
+
if (scanResult.softWarnMessage) {
|
|
46594
|
+
pushWarning2({
|
|
46595
|
+
code: "W_DOCTOR_SCAN_SOFT_WARN",
|
|
46596
|
+
message: scanResult.softWarnMessage,
|
|
46597
|
+
severity: "warn"
|
|
46598
|
+
});
|
|
46599
|
+
}
|
|
46600
|
+
if (scanResult.isPartial) {
|
|
46601
|
+
const reason = scanResult.partialReason === "timeout" ? `timed out after ${timeoutSecs}s (use --timeout <seconds> to adjust)` : `per-level entry cap of ${maxEntriesPerLevel} exceeded (use --max-entries-per-level <n> to adjust)`;
|
|
46602
|
+
pushWarning2({
|
|
46603
|
+
code: "W_DOCTOR_SCAN_PARTIAL",
|
|
46604
|
+
message: `orphan scan is PARTIAL \u2014 ${reason}. Only orphans found before abort will be pruned.`,
|
|
46605
|
+
severity: "warn",
|
|
46606
|
+
context: {
|
|
46607
|
+
partialReason: scanResult.partialReason,
|
|
46608
|
+
timeoutSecs,
|
|
46609
|
+
maxEntriesPerLevel
|
|
46610
|
+
}
|
|
46611
|
+
});
|
|
46612
|
+
}
|
|
46613
|
+
const orphans = scanResult.orphans;
|
|
46529
46614
|
if (orphans.length === 0) {
|
|
46530
|
-
progress.complete(
|
|
46615
|
+
progress.complete(
|
|
46616
|
+
`No worktree orphans found \u2014 nothing to prune${scanResult.isPartial ? " [PARTIAL SCAN]" : ""}`
|
|
46617
|
+
);
|
|
46531
46618
|
cliOutput(
|
|
46532
46619
|
{
|
|
46533
46620
|
projectRoot,
|
|
@@ -46535,7 +46622,9 @@ var init_doctor = __esm({
|
|
|
46535
46622
|
archivePath: null,
|
|
46536
46623
|
pruned: [],
|
|
46537
46624
|
rejected: [],
|
|
46538
|
-
totalSizeBytes: 0
|
|
46625
|
+
totalSizeBytes: 0,
|
|
46626
|
+
scanPartial: scanResult.isPartial,
|
|
46627
|
+
scanPartialReason: scanResult.partialReason
|
|
46539
46628
|
},
|
|
46540
46629
|
{ command: "doctor", operation: "doctor.prune-worktree-orphans" }
|
|
46541
46630
|
);
|
|
@@ -46551,10 +46640,15 @@ var init_doctor = __esm({
|
|
|
46551
46640
|
});
|
|
46552
46641
|
const verb = isDryRun ? "Would prune" : "Pruned";
|
|
46553
46642
|
progress.complete(
|
|
46554
|
-
`${verb} ${result.pruned.length} orphan${result.pruned.length === 1 ? "" : "s"}${result.rejected.length > 0 ? `, ${result.rejected.length} rejected` : ""}`
|
|
46643
|
+
`${verb} ${result.pruned.length} orphan${result.pruned.length === 1 ? "" : "s"}${result.rejected.length > 0 ? `, ${result.rejected.length} rejected` : ""}${scanResult.isPartial ? " [PARTIAL SCAN]" : ""}`
|
|
46555
46644
|
);
|
|
46556
46645
|
cliOutput(
|
|
46557
|
-
{
|
|
46646
|
+
{
|
|
46647
|
+
projectRoot,
|
|
46648
|
+
...result,
|
|
46649
|
+
scanPartial: scanResult.isPartial,
|
|
46650
|
+
scanPartialReason: scanResult.partialReason
|
|
46651
|
+
},
|
|
46558
46652
|
{ command: "doctor", operation: "doctor.prune-worktree-orphans" }
|
|
46559
46653
|
);
|
|
46560
46654
|
if (result.rejected.length > 0) {
|
|
@@ -50444,7 +50538,7 @@ var llm_exports = {};
|
|
|
50444
50538
|
__export(llm_exports, {
|
|
50445
50539
|
llmCommand: () => llmCommand
|
|
50446
50540
|
});
|
|
50447
|
-
import { pushWarning as
|
|
50541
|
+
import { pushWarning as pushWarning3 } from "@cleocode/core";
|
|
50448
50542
|
async function getListProviders() {
|
|
50449
50543
|
const { listProviders } = await import(
|
|
50450
50544
|
/* webpackIgnore: true */
|
|
@@ -50575,7 +50669,7 @@ var init_llm3 = __esm({
|
|
|
50575
50669
|
apiKey = envValue;
|
|
50576
50670
|
source = "env";
|
|
50577
50671
|
} else if (typeof a["api-key"] === "string" && a["api-key"]) {
|
|
50578
|
-
|
|
50672
|
+
pushWarning3({
|
|
50579
50673
|
code: "W_DEPRECATED_FLAG",
|
|
50580
50674
|
message: API_KEY_FLAG_DEPRECATION,
|
|
50581
50675
|
deprecated: "--api-key=<value>",
|
|
@@ -58370,7 +58464,7 @@ __export(release_exports, {
|
|
|
58370
58464
|
SHIP_DEPRECATION_NOTICE: () => SHIP_DEPRECATION_NOTICE,
|
|
58371
58465
|
releaseCommand: () => releaseCommand
|
|
58372
58466
|
});
|
|
58373
|
-
import { pushWarning as
|
|
58467
|
+
import { pushWarning as pushWarning4, release as release2 } from "@cleocode/core";
|
|
58374
58468
|
var SHIP_DEPRECATION_NOTICE, shipCommand, listCommand19, showCommand10, cancelCommand2, rollbackCommand, rollbackFullCommand, prStatusCommand, channelCommand, planCommand3, openCommand2, reconcileCommand4, releaseCommand;
|
|
58375
58469
|
var init_release3 = __esm({
|
|
58376
58470
|
"packages/cleo/src/cli/commands/release.ts"() {
|
|
@@ -58401,7 +58495,7 @@ var init_release3 = __esm({
|
|
|
58401
58495
|
}
|
|
58402
58496
|
},
|
|
58403
58497
|
async run({ args }) {
|
|
58404
|
-
|
|
58498
|
+
pushWarning4({
|
|
58405
58499
|
code: "W_DEPRECATED_COMMAND",
|
|
58406
58500
|
message: SHIP_DEPRECATION_NOTICE,
|
|
58407
58501
|
deprecated: "cleo release ship",
|