@onebrain-ai/cli 2.0.9 → 2.0.11
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/onebrain +10 -41
- package/package.json +1 -1
package/dist/onebrain
CHANGED
|
@@ -10302,9 +10302,6 @@ async function loadVaultConfig(vaultRoot) {
|
|
|
10302
10302
|
if (raw["runtime"] !== undefined) {
|
|
10303
10303
|
config.runtime = raw["runtime"];
|
|
10304
10304
|
}
|
|
10305
|
-
if (raw["sandbox"] !== undefined) {
|
|
10306
|
-
config.sandbox = raw["sandbox"];
|
|
10307
|
-
}
|
|
10308
10305
|
if (raw["stats"] !== undefined) {
|
|
10309
10306
|
config.stats = raw["stats"];
|
|
10310
10307
|
}
|
|
@@ -10490,11 +10487,11 @@ async function checkQmdEmbeddings(config) {
|
|
|
10490
10487
|
};
|
|
10491
10488
|
}
|
|
10492
10489
|
}
|
|
10493
|
-
async function checkVersionDrift(vaultRoot, config
|
|
10490
|
+
async function checkVersionDrift(vaultRoot, config) {
|
|
10494
10491
|
const pluginJsonPath = join2(vaultRoot, ".claude", "plugins", "onebrain", ".claude-plugin", "plugin.json");
|
|
10495
10492
|
const pluginFile = Bun.file(pluginJsonPath);
|
|
10496
10493
|
const exists = await pluginFile.exists();
|
|
10497
|
-
const compareVersion =
|
|
10494
|
+
const compareVersion = config.onebrain_version;
|
|
10498
10495
|
if (!compareVersion || !exists) {
|
|
10499
10496
|
return {
|
|
10500
10497
|
check: "version-drift",
|
|
@@ -10528,11 +10525,10 @@ async function checkVersionDrift(vaultRoot, config, binaryVersion) {
|
|
|
10528
10525
|
message: `v${compareVersion}`
|
|
10529
10526
|
};
|
|
10530
10527
|
}
|
|
10531
|
-
const driftMessage = binaryVersion ? `binary v${binaryVersion}, plugin files v${pluginVersion}` : `vault v${compareVersion}, plugin files v${pluginVersion}`;
|
|
10532
10528
|
return {
|
|
10533
10529
|
check: "version-drift",
|
|
10534
10530
|
status: "warn",
|
|
10535
|
-
message:
|
|
10531
|
+
message: `vault v${compareVersion}, plugin files v${pluginVersion}`,
|
|
10536
10532
|
hint: "Run onebrain update to sync"
|
|
10537
10533
|
};
|
|
10538
10534
|
}
|
|
@@ -10606,26 +10602,10 @@ async function readMergedField(filePath) {
|
|
|
10606
10602
|
return;
|
|
10607
10603
|
}
|
|
10608
10604
|
}
|
|
10609
|
-
function checkSandbox(config) {
|
|
10610
|
-
if (config.sandbox?.enabled === true) {
|
|
10611
|
-
return {
|
|
10612
|
-
check: "sandbox",
|
|
10613
|
-
status: "ok",
|
|
10614
|
-
message: "enabled"
|
|
10615
|
-
};
|
|
10616
|
-
}
|
|
10617
|
-
return {
|
|
10618
|
-
check: "sandbox",
|
|
10619
|
-
status: "warn",
|
|
10620
|
-
message: "disabled",
|
|
10621
|
-
hint: "Set sandbox.enabled: true in vault.yml"
|
|
10622
|
-
};
|
|
10623
|
-
}
|
|
10624
10605
|
// src/commands/doctor.ts
|
|
10625
10606
|
async function runDoctor(opts = {}) {
|
|
10626
10607
|
const vaultDir = opts.vaultDir ?? process.cwd();
|
|
10627
10608
|
const isTTY = opts.isTTY ?? process.stdout.isTTY ?? false;
|
|
10628
|
-
const binaryVersion = opts.binaryVersion;
|
|
10629
10609
|
const checkVaultYmlFn = opts.checkVaultYmlFn ?? checkVaultYml;
|
|
10630
10610
|
const loadVaultConfigFn = opts.loadVaultConfigFn ?? loadVaultConfig;
|
|
10631
10611
|
const checkFoldersFn = opts.checkFoldersFn ?? checkFolders;
|
|
@@ -10633,7 +10613,6 @@ async function runDoctor(opts = {}) {
|
|
|
10633
10613
|
const checkQmdEmbeddingsFn = opts.checkQmdEmbeddingsFn ?? checkQmdEmbeddings;
|
|
10634
10614
|
const checkVersionDriftFn = opts.checkVersionDriftFn ?? checkVersionDrift;
|
|
10635
10615
|
const checkOrphanCheckpointsFn = opts.checkOrphanCheckpointsFn ?? checkOrphanCheckpoints;
|
|
10636
|
-
const checkSandboxFn = opts.checkSandboxFn ?? checkSandbox;
|
|
10637
10616
|
const vaultYmlResult = await checkVaultYmlFn(vaultDir);
|
|
10638
10617
|
let config = {
|
|
10639
10618
|
folders: {
|
|
@@ -10659,22 +10638,13 @@ async function runDoctor(opts = {}) {
|
|
|
10659
10638
|
let qmdResult;
|
|
10660
10639
|
let versionDriftResult;
|
|
10661
10640
|
let orphanCheckpointsResult;
|
|
10662
|
-
let sandboxResult;
|
|
10663
10641
|
try {
|
|
10664
|
-
[
|
|
10665
|
-
foldersResult,
|
|
10666
|
-
harnessResult,
|
|
10667
|
-
qmdResult,
|
|
10668
|
-
versionDriftResult,
|
|
10669
|
-
orphanCheckpointsResult,
|
|
10670
|
-
sandboxResult
|
|
10671
|
-
] = await Promise.all([
|
|
10642
|
+
[foldersResult, harnessResult, qmdResult, versionDriftResult, orphanCheckpointsResult] = await Promise.all([
|
|
10672
10643
|
checkFoldersFn(vaultDir, config),
|
|
10673
10644
|
checkHarnessBinaryFn(config),
|
|
10674
10645
|
checkQmdEmbeddingsFn(config),
|
|
10675
|
-
checkVersionDriftFn(vaultDir, config
|
|
10676
|
-
checkOrphanCheckpointsFn(vaultDir, config)
|
|
10677
|
-
checkSandboxFn(config)
|
|
10646
|
+
checkVersionDriftFn(vaultDir, config),
|
|
10647
|
+
checkOrphanCheckpointsFn(vaultDir, config)
|
|
10678
10648
|
]);
|
|
10679
10649
|
sp?.stop();
|
|
10680
10650
|
} catch (err) {
|
|
@@ -10687,8 +10657,7 @@ async function runDoctor(opts = {}) {
|
|
|
10687
10657
|
harnessResult,
|
|
10688
10658
|
qmdResult,
|
|
10689
10659
|
versionDriftResult,
|
|
10690
|
-
orphanCheckpointsResult
|
|
10691
|
-
sandboxResult
|
|
10660
|
+
orphanCheckpointsResult
|
|
10692
10661
|
];
|
|
10693
10662
|
const errorCount = results.filter((r2) => r2.status === "error").length;
|
|
10694
10663
|
const warningCount = results.filter((r2) => r2.status === "warn").length;
|
|
@@ -10784,7 +10753,7 @@ init_dist3();
|
|
|
10784
10753
|
import { mkdir as mkdir3, readFile as readFile3, rename as rename3, stat as stat3, writeFile as writeFile3 } from "node:fs/promises";
|
|
10785
10754
|
import { homedir as homedir3 } from "node:os";
|
|
10786
10755
|
import { dirname as dirname3, join as join5 } from "node:path";
|
|
10787
|
-
var binaryVersion = "2.0.
|
|
10756
|
+
var binaryVersion = "2.0.11";
|
|
10788
10757
|
var STANDARD_FOLDERS = [
|
|
10789
10758
|
"00-inbox",
|
|
10790
10759
|
"01-projects",
|
|
@@ -12666,7 +12635,7 @@ async function updateCommand(opts = {}) {
|
|
|
12666
12635
|
}
|
|
12667
12636
|
|
|
12668
12637
|
// src/index.ts
|
|
12669
|
-
var VERSION = "2.0.
|
|
12638
|
+
var VERSION = "2.0.11";
|
|
12670
12639
|
var RELEASE_DATE = "2026-04-26";
|
|
12671
12640
|
process.stdout.setDefaultEncoding("utf8");
|
|
12672
12641
|
process.stderr.setDefaultEncoding("utf8");
|
|
@@ -12707,7 +12676,7 @@ program2.command("update").description("Update OneBrain plugin files from GitHub
|
|
|
12707
12676
|
});
|
|
12708
12677
|
program2.command("doctor").description("Run vault health checks and report issues").action(async () => {
|
|
12709
12678
|
const vaultRoot = findVaultRoot(process.cwd());
|
|
12710
|
-
await doctorCommand({ vaultDir: vaultRoot
|
|
12679
|
+
await doctorCommand({ vaultDir: vaultRoot });
|
|
12711
12680
|
});
|
|
12712
12681
|
program2.command("help").description("Show this help message").action(() => {
|
|
12713
12682
|
program2.help();
|