@onebrain-ai/cli 2.2.1 → 2.2.3

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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/dist/onebrain +22 -39
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -103,7 +103,7 @@ Obsidian becomes your dispatch hub for everything you do:
103
103
  <p align="center">
104
104
  <picture>
105
105
  <source media="(prefers-color-scheme: dark)" srcset="assets/diagrams/vault-hub-dark.svg">
106
- <img alt="Obsidian as command center — eight spokes radiate from the vault to CLI/repo, website, cloud infra, social media, office docs, project notes, research, and MCP server" src="assets/diagrams/vault-hub-light.svg" width="640">
106
+ <img alt="Obsidian as command center — eight spokes radiate from the vault to CLI/repo, website, cloud infra, social media, office docs, project notes, research, and MCP server" src="assets/diagrams/vault-hub-light.svg" width="460">
107
107
  </picture>
108
108
  </p>
109
109
 
@@ -118,7 +118,7 @@ OneBrain runs as a tight 3-step loop. Each cycle, both sides sharpen.
118
118
  <p align="center">
119
119
  <picture>
120
120
  <source media="(prefers-color-scheme: dark)" srcset="assets/diagrams/coevo-loop-dark.svg">
121
- <img alt="Co-Evolution loop — three nodes (01 CAPTURE at top, 02 EVOLVE at bottom-right, 03 WRAPUP at bottom-left) connected by curved arrows flowing clockwise" src="assets/diagrams/coevo-loop-light.svg" width="540">
121
+ <img alt="Co-Evolution loop — three nodes (01 CAPTURE at top, 02 EVOLVE at bottom-right, 03 WRAPUP at bottom-left) connected by curved arrows flowing clockwise" src="assets/diagrams/coevo-loop-light.svg" width="350">
122
122
  </picture>
123
123
  </p>
124
124
 
package/dist/onebrain CHANGED
@@ -9560,7 +9560,7 @@ var init_lib = __esm(() => {
9560
9560
  var require_package = __commonJS((exports, module) => {
9561
9561
  module.exports = {
9562
9562
  name: "@onebrain-ai/cli",
9563
- version: "2.2.1",
9563
+ version: "2.2.3",
9564
9564
  description: "CLI for OneBrain \u2014 personal AI OS for Obsidian with persistent memory, 24+ skills, and Claude Code integration",
9565
9565
  keywords: [
9566
9566
  "onebrain",
@@ -10149,7 +10149,10 @@ function migrateLegacyQmdEntries(groups, keepCanonical) {
10149
10149
  }
10150
10150
  } else {
10151
10151
  const before = group.hooks.length;
10152
- group.hooks = group.hooks.filter((h) => !isLegacyQmdCmd(h.command ?? ""));
10152
+ group.hooks = group.hooks.filter((h) => {
10153
+ const cmd = h.command ?? "";
10154
+ return !isLegacyQmdCmd(cmd) && cmd !== QMD_CMD;
10155
+ });
10153
10156
  if (group.hooks.length !== before)
10154
10157
  touched = true;
10155
10158
  }
@@ -10991,7 +10994,7 @@ var import_picocolors5 = __toESM(require_picocolors(), 1);
10991
10994
  var import_picocolors = __toESM(require_picocolors(), 1);
10992
10995
  function resolveBinaryVersion() {
10993
10996
  if (true)
10994
- return "2.2.1";
10997
+ return "2.2.3";
10995
10998
  try {
10996
10999
  const pkg = require_package();
10997
11000
  return pkg.version ?? "dev";
@@ -12411,9 +12414,7 @@ function loadVaultSettings(vaultRoot) {
12411
12414
  }
12412
12415
  }
12413
12416
  function maxCheckpointNnSync(vaultRoot, date, token, logsFolder) {
12414
- const yyyy = date.slice(0, 4);
12415
- const mm = date.slice(5, 7);
12416
- const dir = join7(vaultRoot, logsFolder, yyyy, mm);
12417
+ const dir = join7(vaultRoot, logsFolder, "checkpoint");
12417
12418
  const prefix = `${date}-${token}-checkpoint-`;
12418
12419
  try {
12419
12420
  let max = 0;
@@ -12528,14 +12529,15 @@ async function runBackfillRecapped(logsFolder, cutoffDate) {
12528
12529
  const today = new Date().toISOString().slice(0, 10);
12529
12530
  let backfilled = 0;
12530
12531
  let skipped = 0;
12532
+ const sessionRoot = join8(logsFolder, "session");
12531
12533
  let yearDirs = [];
12532
12534
  try {
12533
- yearDirs = await readdir3(logsFolder);
12535
+ yearDirs = await readdir3(sessionRoot);
12534
12536
  } catch {
12535
12537
  return { backfilled: 0, skipped: 0 };
12536
12538
  }
12537
12539
  for (const yearDir of yearDirs) {
12538
- const yearPath = join8(logsFolder, yearDir);
12540
+ const yearPath = join8(sessionRoot, yearDir);
12539
12541
  let monthDirs = [];
12540
12542
  try {
12541
12543
  monthDirs = await readdir3(yearPath);
@@ -12629,14 +12631,6 @@ function parseFrontmatter(rawText) {
12629
12631
  return null;
12630
12632
  }
12631
12633
  }
12632
- function getMonthParts(now = new Date) {
12633
- const thisYear = String(now.getFullYear());
12634
- const thisMonth = String(now.getMonth() + 1).padStart(2, "0");
12635
- const prevDate = new Date(now.getFullYear(), now.getMonth() - 1, 1);
12636
- const prevYear = String(prevDate.getFullYear());
12637
- const prevMonth = String(prevDate.getMonth() + 1).padStart(2, "0");
12638
- return { thisYear, thisMonth, prevYear, prevMonth };
12639
- }
12640
12634
  async function listMdFiles2(dir) {
12641
12635
  try {
12642
12636
  const entries = await readdir4(dir);
@@ -12714,16 +12708,19 @@ async function hasManualSessionLog(monthDir, date) {
12714
12708
  }
12715
12709
  return false;
12716
12710
  }
12717
- async function collectCandidateGroupsForMonth(monthDir, currentToken, today) {
12711
+ async function collectCandidateGroups(checkpointDir, sessionDir, currentToken, today) {
12718
12712
  const groups = new Map;
12719
- const files = await listMdFiles2(monthDir);
12713
+ const files = await listMdFiles2(checkpointDir);
12720
12714
  const checkpoints = files.filter((f2) => f2.includes("-checkpoint-") && f2.endsWith(".md"));
12721
12715
  const manualLogCache = new Map;
12722
12716
  async function dateHasManualLog(date) {
12723
12717
  const cached = manualLogCache.get(date);
12724
12718
  if (cached !== undefined)
12725
12719
  return cached;
12726
- const result = await hasManualSessionLog(monthDir, date);
12720
+ const year = date.slice(0, 4);
12721
+ const month = date.slice(5, 7);
12722
+ const sessionMonthDir = join9(sessionDir, year, month);
12723
+ const result = await hasManualSessionLog(sessionMonthDir, date);
12727
12724
  manualLogCache.set(date, result);
12728
12725
  return result;
12729
12726
  }
@@ -12745,7 +12742,7 @@ async function collectCandidateGroupsForMonth(monthDir, currentToken, today) {
12745
12742
  continue;
12746
12743
  if (await dateHasManualLog(fdate))
12747
12744
  continue;
12748
- const fpath = join9(monthDir, fname);
12745
+ const fpath = join9(checkpointDir, fname);
12749
12746
  const existing = groups.get(ftoken);
12750
12747
  if (existing)
12751
12748
  existing.push(fpath);
@@ -12759,23 +12756,9 @@ async function runOrphanScan(logsFolder, sessionToken, now, vaultRoot) {
12759
12756
  throw new Error("runOrphanScan: vaultRoot is required and must be a non-empty path");
12760
12757
  }
12761
12758
  const today = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}`;
12762
- const { thisYear, thisMonth, prevYear, prevMonth } = getMonthParts(now);
12763
- const monthDirs = [
12764
- { year: thisYear, month: thisMonth },
12765
- { year: prevYear, month: prevMonth }
12766
- ];
12767
- const allGroups = new Map;
12768
- for (const { year, month } of monthDirs) {
12769
- const monthDir = join9(logsFolder, year, month);
12770
- const monthGroups = await collectCandidateGroupsForMonth(monthDir, sessionToken, today);
12771
- for (const [token, files] of monthGroups) {
12772
- const existing = allGroups.get(token);
12773
- if (existing)
12774
- existing.push(...files);
12775
- else
12776
- allGroups.set(token, [...files]);
12777
- }
12778
- }
12759
+ const checkpointDir = join9(logsFolder, "checkpoint");
12760
+ const sessionDir = join9(logsFolder, "session");
12761
+ const allGroups = await collectCandidateGroups(checkpointDir, sessionDir, sessionToken, today);
12779
12762
  const guardMs = await getActiveSessionGuardMs(vaultRoot);
12780
12763
  const nowMs = now.getTime();
12781
12764
  let totalOrphans = 0;
@@ -13309,8 +13292,8 @@ function patchUtf8(stream) {
13309
13292
  }
13310
13293
 
13311
13294
  // src/index.ts
13312
- var VERSION = "2.2.1";
13313
- var RELEASE_DATE = "2026-05-07";
13295
+ var VERSION = "2.2.3";
13296
+ var RELEASE_DATE = "2026-05-10";
13314
13297
  patchUtf8(process.stdout);
13315
13298
  patchUtf8(process.stderr);
13316
13299
  var VERSION_STRING = `OneBrain v${VERSION} \u2014 released ${RELEASE_DATE}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onebrain-ai/cli",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "CLI for OneBrain — personal AI OS for Obsidian with persistent memory, 24+ skills, and Claude Code integration",
5
5
  "keywords": [
6
6
  "onebrain",