@onebrain-ai/cli 2.2.1 → 2.2.2

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 +18 -38
  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.2",
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",
@@ -10991,7 +10991,7 @@ var import_picocolors5 = __toESM(require_picocolors(), 1);
10991
10991
  var import_picocolors = __toESM(require_picocolors(), 1);
10992
10992
  function resolveBinaryVersion() {
10993
10993
  if (true)
10994
- return "2.2.1";
10994
+ return "2.2.2";
10995
10995
  try {
10996
10996
  const pkg = require_package();
10997
10997
  return pkg.version ?? "dev";
@@ -12411,9 +12411,7 @@ function loadVaultSettings(vaultRoot) {
12411
12411
  }
12412
12412
  }
12413
12413
  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);
12414
+ const dir = join7(vaultRoot, logsFolder, "checkpoint");
12417
12415
  const prefix = `${date}-${token}-checkpoint-`;
12418
12416
  try {
12419
12417
  let max = 0;
@@ -12528,14 +12526,15 @@ async function runBackfillRecapped(logsFolder, cutoffDate) {
12528
12526
  const today = new Date().toISOString().slice(0, 10);
12529
12527
  let backfilled = 0;
12530
12528
  let skipped = 0;
12529
+ const sessionRoot = join8(logsFolder, "session");
12531
12530
  let yearDirs = [];
12532
12531
  try {
12533
- yearDirs = await readdir3(logsFolder);
12532
+ yearDirs = await readdir3(sessionRoot);
12534
12533
  } catch {
12535
12534
  return { backfilled: 0, skipped: 0 };
12536
12535
  }
12537
12536
  for (const yearDir of yearDirs) {
12538
- const yearPath = join8(logsFolder, yearDir);
12537
+ const yearPath = join8(sessionRoot, yearDir);
12539
12538
  let monthDirs = [];
12540
12539
  try {
12541
12540
  monthDirs = await readdir3(yearPath);
@@ -12629,14 +12628,6 @@ function parseFrontmatter(rawText) {
12629
12628
  return null;
12630
12629
  }
12631
12630
  }
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
12631
  async function listMdFiles2(dir) {
12641
12632
  try {
12642
12633
  const entries = await readdir4(dir);
@@ -12714,16 +12705,19 @@ async function hasManualSessionLog(monthDir, date) {
12714
12705
  }
12715
12706
  return false;
12716
12707
  }
12717
- async function collectCandidateGroupsForMonth(monthDir, currentToken, today) {
12708
+ async function collectCandidateGroups(checkpointDir, sessionDir, currentToken, today) {
12718
12709
  const groups = new Map;
12719
- const files = await listMdFiles2(monthDir);
12710
+ const files = await listMdFiles2(checkpointDir);
12720
12711
  const checkpoints = files.filter((f2) => f2.includes("-checkpoint-") && f2.endsWith(".md"));
12721
12712
  const manualLogCache = new Map;
12722
12713
  async function dateHasManualLog(date) {
12723
12714
  const cached = manualLogCache.get(date);
12724
12715
  if (cached !== undefined)
12725
12716
  return cached;
12726
- const result = await hasManualSessionLog(monthDir, date);
12717
+ const year = date.slice(0, 4);
12718
+ const month = date.slice(5, 7);
12719
+ const sessionMonthDir = join9(sessionDir, year, month);
12720
+ const result = await hasManualSessionLog(sessionMonthDir, date);
12727
12721
  manualLogCache.set(date, result);
12728
12722
  return result;
12729
12723
  }
@@ -12745,7 +12739,7 @@ async function collectCandidateGroupsForMonth(monthDir, currentToken, today) {
12745
12739
  continue;
12746
12740
  if (await dateHasManualLog(fdate))
12747
12741
  continue;
12748
- const fpath = join9(monthDir, fname);
12742
+ const fpath = join9(checkpointDir, fname);
12749
12743
  const existing = groups.get(ftoken);
12750
12744
  if (existing)
12751
12745
  existing.push(fpath);
@@ -12759,23 +12753,9 @@ async function runOrphanScan(logsFolder, sessionToken, now, vaultRoot) {
12759
12753
  throw new Error("runOrphanScan: vaultRoot is required and must be a non-empty path");
12760
12754
  }
12761
12755
  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
- }
12756
+ const checkpointDir = join9(logsFolder, "checkpoint");
12757
+ const sessionDir = join9(logsFolder, "session");
12758
+ const allGroups = await collectCandidateGroups(checkpointDir, sessionDir, sessionToken, today);
12779
12759
  const guardMs = await getActiveSessionGuardMs(vaultRoot);
12780
12760
  const nowMs = now.getTime();
12781
12761
  let totalOrphans = 0;
@@ -13309,8 +13289,8 @@ function patchUtf8(stream) {
13309
13289
  }
13310
13290
 
13311
13291
  // src/index.ts
13312
- var VERSION = "2.2.1";
13313
- var RELEASE_DATE = "2026-05-07";
13292
+ var VERSION = "2.2.2";
13293
+ var RELEASE_DATE = "2026-05-10";
13314
13294
  patchUtf8(process.stdout);
13315
13295
  patchUtf8(process.stderr);
13316
13296
  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.2",
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",