botrun-msync
Advanced tools
+1
-1
| { | ||
| "name": "botrun-msync", | ||
| "version": "0.3.0", | ||
| "version": "0.3.1", | ||
| "description": "Git-backed memory sync CLI for AI agents (forked from botrun-mcli@0.2.2)", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+5
-5
@@ -86,7 +86,7 @@ # botrun-msync — Git-backed Memory Sync CLI for Agents | ||
| - **config.json** — 集中管理,預設 `~/.botrun/bms/config.json` | ||
| - **config.json** — 集中管理,預設 `/workspace/.botrun/bms/config.json` | ||
| - **data** — 跟著使用場景走,由 `memory init` 決定位置,預設 `$PWD/data/` | ||
| ``` | ||
| ~/.botrun/bms/config.json ← scope 定義 + data_path 指向 | ||
| /workspace/.botrun/bms/config.json ← scope 定義 + data_path 指向 | ||
@@ -101,3 +101,3 @@ /your/project/data/ ← data 跟著專案走 | ||
| 預設路徑:`~/.botrun/bms/config.json` | ||
| 預設路徑:`/workspace/.botrun/bms/config.json` | ||
@@ -111,3 +111,3 @@ 覆蓋方式: | ||
| Priority: `--config-path` > `BMS_CONFIG` > `~/.botrun/bms/config.json` | ||
| Priority: `--config-path` > `BMS_CONFIG` > `/workspace/.botrun/bms/config.json` | ||
@@ -164,3 +164,3 @@ ```json | ||
| |----------|---------| | ||
| | `BMS_CONFIG` | Config file path (default: `~/.botrun/bms/config.json`) | | ||
| | `BMS_CONFIG` | Config file path (default: `/workspace/.botrun/bms/config.json`) | | ||
@@ -167,0 +167,0 @@ Each scope's token is configured via `--token-env`, which points to an environment variable name. There are no global token variables — every scope must declare its own. |
@@ -10,3 +10,3 @@ import { join } from 'node:path'; | ||
| if (!dataDir) { | ||
| throw new Error('No data_path in config. Run "bms memory init" first.'); | ||
| throw new Error('No data_path in config. Run "bms config add-scope" to add a scope, then "bms memory init" to clone and set data_path.'); | ||
| } | ||
@@ -13,0 +13,0 @@ |
+1
-2
| import { readFile, writeFile, mkdir } from 'node:fs/promises'; | ||
| import { homedir } from 'node:os'; | ||
| import { join, dirname } from 'node:path'; | ||
| const DEFAULT_CONFIG_PATH = join(homedir(), '.botrun', 'bms', 'config.json'); | ||
| const DEFAULT_CONFIG_PATH = join('/workspace', '.botrun', 'bms', 'config.json'); | ||
@@ -7,0 +6,0 @@ export function getConfigPath() { |
19786
0.4%331
-0.3%