exomind 0.4.1 → 0.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exomind",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "ExoMind 跨平台命令行客户端 — 通过 REST 与 ExoMind 知识库交互(ingest/query/search/review),替代 Windows 不可用的 MCP 客户端。",
5
5
  "bin": {
6
6
  "exomind": "dist/cli.js"
@@ -14,7 +14,7 @@ If a command fails with "未登录", run `exomind login` first.
14
14
  1. **目录 / 多个文件 → 一条 `exomind ingest --dir <路径>`**(增量,自动跳过已摄文件)。**绝不**逐文件调用 Skill 工具、**绝不**逐条 `exomind ingest --file`。**用 `--dir` 时不要先 `Read` 文件**——CLI 自己读,预读纯浪费上下文。
15
15
  2. **Skill 工具只调用一次**(加载本文件一次即可,后续一律用 Bash 跑 `exomind ...`)。
16
16
  3. 单条知识 → `exomind ingest "内容" -t 标题 --tag 标签`。
17
- 4. ingest 是**同步**(每文件 1-3 min);`--dir` 串行 + `⏳[i/n]` 进度 + 结束汇总(新增/更新/跳过/失败),不是后台异步。
17
+ 4. ingest 是**同步**(每文件 1-3 min);`--dir` 并发(`--concurrency` 默认3)+ `⏳[i/n]` 进度 + 结束汇总(新增/更新/跳过/失败),不是后台异步。
18
18
  5. **"全部跳过"= 成功**(文件已在库且内容未变),**绝不**因此擅自加 `--force` 重摄(会白白重跑 N×分钟 LLM)。只有用户**明确**说"强制刷新/全量重处理/忽略缓存"才用 `--force`。
19
19
  6. **绝不把多个文件 `cat`/合并成一条 `ingest`**(丢失每篇结构、无法按文件判重、易超 5 万字限)。多个文件就是 `--dir`;单条才是文本 ingest。
20
20
 
@@ -40,16 +40,24 @@ If a command fails with "未登录", run `exomind login` first.
40
40
 
41
41
  ```bash
42
42
  exomind ingest --dir ~/workspace/notes --recursive # 增量:只摄新增/改动
43
+ exomind ingest --dir ~/workspace/notes --concurrency 5 # 并发(默认3,大服务器可调高加速)
43
44
  exomind ingest --dir ~/workspace/notes --force # 强制全量重摄
44
45
  exomind ingest --dir ~/workspace/notes --pattern "*.md" # 默认就是 *.md
45
46
  ```
46
47
 
47
48
  - **增量去重**:按文件内容 SHA-256 记在 `~/.exomind/manifest.json`,**未变的文件直接跳过**(不调 LLM),所以隔几天重跑同目录很便宜——只处理新/改文件。
48
- - **串行 + 进度**:弱服务器上每文件 1-3 分钟,`--dir` 串行处理、stderr 打 `⏳ [i/n]`;ingest 是**同步**(不是后台异步),会一直占住到完成。
49
+ - **并发 + 进度**:每文件 1-3 分钟,`--dir` 按 `--concurrency`(默认3)并发处理、stderr 打 `⏳ [i/n]`;ingest 是**同步**(不是后台异步),会一直占住到完成。
49
50
  - 结束汇总:`新增 N / 更新 M / 跳过 K / 失败 J`。
50
51
 
51
52
  ## Commands
52
53
 
54
+ ### Login & status
55
+ ```bash
56
+ exomind login # 配置服务器 + 粘贴 API Key(交互式)
57
+ exomind me # 显示当前登录态/服务器/凭证
58
+ exomind whoami # 同上
59
+ ```
60
+
53
61
  ### Save knowledge
54
62
  ```bash
55
63
  exomind ingest "内容文本" -t "描述性标题" --tag cli --tag exomind
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: exomind
3
+ description: Use ExoMind to save, ingest, import, search, query, and retrieve knowledge. Trigger when the user asks to remember, archive, save, ingest, import, search, query, or review knowledge, including shorthand commands such as "jdit", "存档", "记住这个", "保存到 ExoMind", "导入", and "查询知识库". Also use it when durable lessons, architectural decisions, investigation results, or root causes should be persisted. Treat these explicit save/import commands as authorization for that write. Do not silently write ordinary conversation to ExoMind. For a directory or multiple files, use one directory ingest command instead of reading or ingesting files individually.
4
+ ---
5
+
6
+ # ExoMind (Codex)
7
+
8
+ ExoMind is a remote knowledge base. Use it to persist durable knowledge and to recall prior knowledge. Prefer the ExoMind MCP tools; fall back to the `exomind` CLI when MCP is unavailable or the operation is CLI-only (e.g. directory ingestion).
9
+
10
+ ## Authorization (important)
11
+
12
+ - Explicit requests — `jdit`, `存档`, `记住这个`, `保存到 ExoMind`, `导入`, `写入知识库` — authorize THAT write. Proceed.
13
+ - Do NOT call a write/ingest for ordinary Q&A with no save intent. You may suggest saving if something is durable.
14
+ - Preserve all Codex tool approvals, sandbox, and host security checks. A user's "jdit" is business authorization, not a reason to bypass host-level confirmations.
15
+ - Read-only retrieval (query / search / entity / relations / stats) may be used whenever the user asks to recall, search, review, or check prior knowledge.
16
+
17
+ ## Tools — MCP first, CLI fallback
18
+
19
+ ExoMind MCP tools (when configured): `mcp__exomind__ingest`, `mcp__exomind__query`, `mcp__exomind__search`, `mcp__exomind__entity`, `mcp__exomind__relations`, `mcp__exomind__stats`.
20
+
21
+ | intent | preferred | fallback | write auth? |
22
+ |---|---|---|---|
23
+ | save one item / `jdit` | MCP `ingest` | `exomind ingest "..." -t "title" --tag x` | yes (the command authorizes) |
24
+ | import a single file | — | `exomind ingest --file <path> -t "title"` | yes |
25
+ | import a directory / many files | — | `exomind ingest --dir <path> [--recursive]` (CLI-only; incremental, skips unchanged) | yes |
26
+ | Q&A over the KB | MCP `query` | `exomind query "..."` | no (read) |
27
+ | keyword search | MCP `search` | `exomind search "..."` | no |
28
+ | entity / relations | MCP `entity` / `relations` | `exomind entity X` / `exomind relations X` | no |
29
+ | stats | MCP `stats` | `exomind stats` | no |
30
+
31
+ Note: MCP `ingest` accepts plain text only (no file/dir). For files or directories, use the CLI.
32
+
33
+ ## Saving conversation knowledge (on `jdit` / `存档`)
34
+
35
+ 1. Extract only durable conclusions, decisions, procedures, lessons, or root causes from the relevant conversation.
36
+ 2. Drop filler, secrets, credentials, and unrelated content.
37
+ 3. Compose a descriptive title + focused tags.
38
+ 4. Call ingest ONCE per coherent item; split only for genuinely independent topics.
39
+ 5. Report the actual result — do not claim success if the tool failed or was cancelled.
40
+
41
+ ## Directory ingestion
42
+
43
+ - ONE `exomind ingest --dir <path>` command. Do not pre-read every file, do not concatenate, do not ingest file-by-file.
44
+ - Incremental by default (unchanged files skipped). Use `--force` only if the user explicitly wants a full refresh.
45
+ - Synchronous; may take minutes on weak servers. Wait and report added / updated / skipped / failed counts.
46
+
47
+ ## Auth
48
+
49
+ If a call fails with "未登录" / 401: tell the user to run `exomind login` (or create an API Key at the ExoMind console). Never ask the user to paste an API key into chat.