exomind 0.4.0 → 0.4.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.
- package/README.md +3 -3
- package/dist/cli.js +8 -7
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/skill/SKILL.md +10 -2
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
```bash
|
|
15
15
|
npm install -g exomind
|
|
16
16
|
exomind login # 粘贴 youhuale.cn/ui/account 的 API Key
|
|
17
|
-
exomind
|
|
17
|
+
exomind me # 验证登录
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
> 前置:Node.js 18+(`node -v`)。CI 等场景可改用环境变量 `EXOMIND_API_KEY` / `EXOMIND_BASE_URL`,免登录。
|
|
@@ -50,7 +50,7 @@ exomind feedback "entities/Redis.md" positive
|
|
|
50
50
|
- **凭证类型**:服务端 `auth_middleware` 同时接受 **API Key**(从 `youhuale.cn/ui/account` 复制)与 **GitHub token**(`gh_` 前缀);两者统一以 `Authorization: Bearer` 发送,CLI 不关心是哪种。
|
|
51
51
|
- **读取优先级**:`config.json` 的 `api_key` → 环境变量 `EXOMIND_API_KEY` → 旧版遗留文件 `~/.claude/scripts/.exomind-api-key`(向后兼容老安装)。三者任一存在即免登录。
|
|
52
52
|
- **CI / 免登录**:只设环境变量 `EXOMIND_API_KEY`(可选 `EXOMIND_BASE_URL`)即可,完全不写本地文件。`config.json` 优先级高于环境变量,故已 `login` 的机器需 `--api-key` 才能临时覆盖。
|
|
53
|
-
- **校验行为**:`login` 先探活 `/keywords` **通过后再落盘**——401/403 时**不写文件**,避免无效凭证覆盖已有有效配置;网络错误无法判定时仍保存并提示"登录成功(未校验)",稍后用 `exomind
|
|
53
|
+
- **校验行为**:`login` 先探活 `/keywords` **通过后再落盘**——401/403 时**不写文件**,避免无效凭证覆盖已有有效配置;网络错误无法判定时仍保存并提示"登录成功(未校验)",稍后用 `exomind me` 复核。
|
|
54
54
|
- **换号 / 登出**:重新 `exomind login` 覆盖旧凭证;彻底登出删 `~/.exomind/config.json`。
|
|
55
55
|
- **安全提醒**:文件是**明文**,任何能读你 home 目录的进程都能拿到 key。共享机器 / 不信任环境请用环境变量,不要用 `login`。
|
|
56
56
|
|
|
@@ -91,7 +91,7 @@ exomind install # 装 skill + hook + MCP,全部自动(幂等+备份)
|
|
|
91
91
|
|
|
92
92
|
| 命令 | 说明 |
|
|
93
93
|
|------|------|
|
|
94
|
-
| `login` / `
|
|
94
|
+
| `login` / `me` | 配置与查看登录态 |
|
|
95
95
|
| `ingest` | 导入知识(文本 / stdin / `--file`) |
|
|
96
96
|
| `query` | LLM 问答 |
|
|
97
97
|
| `search` | 全文 / `--hybrid` / `--rerank` 搜索 |
|
package/dist/cli.js
CHANGED
|
@@ -3119,7 +3119,7 @@ var {
|
|
|
3119
3119
|
// package.json
|
|
3120
3120
|
var package_default = {
|
|
3121
3121
|
name: "exomind",
|
|
3122
|
-
version: "0.4.
|
|
3122
|
+
version: "0.4.2",
|
|
3123
3123
|
description: "ExoMind \u8DE8\u5E73\u53F0\u547D\u4EE4\u884C\u5BA2\u6237\u7AEF \u2014 \u901A\u8FC7 REST \u4E0E ExoMind \u77E5\u8BC6\u5E93\u4EA4\u4E92(ingest/query/search/review),\u66FF\u4EE3 Windows \u4E0D\u53EF\u7528\u7684 MCP \u5BA2\u6237\u7AEF\u3002",
|
|
3124
3124
|
bin: {
|
|
3125
3125
|
exomind: "dist/cli.js"
|
|
@@ -4064,7 +4064,7 @@ async function ingest(client, opts, args) {
|
|
|
4064
4064
|
if (opts.title) body.title = opts.title;
|
|
4065
4065
|
if (opts.tag && opts.tag.length) body.tags = opts.tag;
|
|
4066
4066
|
hint("\u23F3 \u6444\u5165\u4E2D: \u670D\u52A1\u5668\u7528 LLM \u62BD\u53D6\u5B9E\u4F53/\u5173\u7CFB,\u957F\u5185\u5BB9\u53EF\u80FD 1-3 \u5206\u949F\u2026");
|
|
4067
|
-
const result = await client
|
|
4067
|
+
const result = await ingestWithRetry(client, body, opTimeout(3e5));
|
|
4068
4068
|
if (fileAbs && fileRaw !== null) {
|
|
4069
4069
|
const man = loadManifest();
|
|
4070
4070
|
recordFile(man, fileAbs, fileRaw, opts.title || path5.basename(fileAbs));
|
|
@@ -4269,7 +4269,7 @@ async function draft(client, opts, args) {
|
|
|
4269
4269
|
return doWechat(client, opts, args[1]);
|
|
4270
4270
|
default:
|
|
4271
4271
|
throw new Error(
|
|
4272
|
-
`\u672A\u77E5 draft \u5B50\u547D\u4EE4: ${action ?? "(\u7A7A)"}\u3002\u53EF\u7528: new <\u9009\u9898> / list / show <id> / publish <id> / wechat <id
|
|
4272
|
+
`\u672A\u77E5 draft \u5B50\u547D\u4EE4: ${action ?? "(\u7A7A)"}\u3002\u53EF\u7528: new <\u9009\u9898> \u751F\u6210 / list \u5217\u8868 / show <id> \u770B\u6B63\u6587 / publish <id> \u5165\u5E93 / wechat <id> \u6295\u516C\u4F17\u53F7`
|
|
4273
4273
|
);
|
|
4274
4274
|
}
|
|
4275
4275
|
}
|
|
@@ -4449,7 +4449,7 @@ async function login(_client, opts) {
|
|
|
4449
4449
|
verified = false;
|
|
4450
4450
|
console.log(
|
|
4451
4451
|
yellow(
|
|
4452
|
-
`\u8B66\u544A: \u65E0\u6CD5\u8FDE\u63A5 ${baseUrl} \u6821\u9A8C\u51ED\u8BC1 (${e instanceof Error ? e.message : String(e)})\u3002\u914D\u7F6E\u4ECD\u5C06\u4FDD\u5B58,\u7A0D\u540E\u53EF\u7528 exomind
|
|
4452
|
+
`\u8B66\u544A: \u65E0\u6CD5\u8FDE\u63A5 ${baseUrl} \u6821\u9A8C\u51ED\u8BC1 (${e instanceof Error ? e.message : String(e)})\u3002\u914D\u7F6E\u4ECD\u5C06\u4FDD\u5B58,\u7A0D\u540E\u53EF\u7528 exomind me \u9A8C\u8BC1\u3002`
|
|
4453
4453
|
)
|
|
4454
4454
|
);
|
|
4455
4455
|
}
|
|
@@ -4704,7 +4704,7 @@ async function install(client, opts) {
|
|
|
4704
4704
|
console.log(dim(" \uFF08\u672A\u914D\u7F6E API Key\uFF0C\u8DF3\u8FC7\u81EA\u68C0\uFF1Bexomind login \u540E\u91CD\u8DD1 install \u53EF\u81EA\u68C0\uFF09"));
|
|
4705
4705
|
} else {
|
|
4706
4706
|
console.log(
|
|
4707
|
-
me && me.authenticated ? ok(` \u670D\u52A1\u5668\u8FDE\u901A + \u9274\u6743\u6709\u6548\uFF08tenant ${me.tenant_id} \xB7 ${keyHint}\uFF09`) : yellow(" \u2717 \u670D\u52A1\u5668\u8FDE\u901A/\u9274\u6743\u5F02\u5E38 \u2192 exomind
|
|
4707
|
+
me && me.authenticated ? ok(` \u670D\u52A1\u5668\u8FDE\u901A + \u9274\u6743\u6709\u6548\uFF08tenant ${me.tenant_id} \xB7 ${keyHint}\uFF09`) : yellow(" \u2717 \u670D\u52A1\u5668\u8FDE\u901A/\u9274\u6743\u5F02\u5E38 \u2192 exomind me \u6838\u9A8C")
|
|
4708
4708
|
);
|
|
4709
4709
|
console.log(mcp.ok ? ok(` MCP \u670D\u52A1\u7AEF\u53EF\u7528\uFF08${mcp.detail}\uFF09`) : yellow(` \u2717 MCP \u670D\u52A1\u7AEF\u5F02\u5E38\uFF1A${mcp.detail}`));
|
|
4710
4710
|
}
|
|
@@ -4760,7 +4760,8 @@ function run(fn) {
|
|
|
4760
4760
|
var program2 = new Command();
|
|
4761
4761
|
program2.name("exomind").description("ExoMind \u8DE8\u5E73\u53F0\u77E5\u8BC6\u5E93\u5BA2\u6237\u7AEF \u2014 \u901A\u8FC7 REST \u4EA4\u4E92(\u66FF\u4EE3 Windows MCP \u5BA2\u6237\u7AEF)\u3002").version(VERSION).option("--json", "\u8F93\u51FA\u539F\u59CB JSON(\u673A\u5668\u53EF\u8BFB)").option("--base-url <url>", "\u8986\u76D6\u670D\u52A1\u5668\u5730\u5740").option("--api-key <key>", "\u8986\u76D6 API Key / \u51ED\u8BC1");
|
|
4762
4762
|
program2.command("login").description("\u914D\u7F6E\u670D\u52A1\u5668\u5730\u5740\u4E0E\u51ED\u8BC1,\u5199\u5165 ~/.exomind/config.json").option("--base-url <url>", "\u670D\u52A1\u5668\u5730\u5740").option("--api-key <key>", "API Key \u6216\u767B\u5F55 token(\u4E0D\u586B\u5219\u4EA4\u4E92\u8F93\u5165)").action(run(login));
|
|
4763
|
-
program2.command("
|
|
4763
|
+
program2.command("me").description("\u663E\u793A\u5F53\u524D\u767B\u5F55\u6001\u4E0E\u670D\u52A1\u5668").action(run(whoami));
|
|
4764
|
+
program2.command("whoami", { hidden: true }).description("\u663E\u793A\u5F53\u524D\u767B\u5F55\u6001\u4E0E\u670D\u52A1\u5668(me \u7684\u65E7\u540D)").action(run(whoami));
|
|
4764
4765
|
program2.command("ingest [content...]").description("\u5BFC\u5165\u77E5\u8BC6: \u53C2\u6570\u6587\u672C / --file / stdin / --dir \u76EE\u5F55\u6279\u91CF(\u589E\u91CF)").option("-t, --title <title>", "\u6807\u9898(\u5355\u6587\u4EF6\u6A21\u5F0F)").option("--tag <tag>", "\u6807\u7B7E(\u53EF\u91CD\u590D)", collect, []).option("--file <path>", "\u4ECE\u6587\u4EF6\u8BFB\u53D6\u5185\u5BB9").option("--dir <path>", "\u76EE\u5F55\u6279\u91CF\u6444\u5165(\u589E\u91CF: \u5185\u5BB9\u54C8\u5E0C\u8DF3\u8FC7\u672A\u53D8\u6587\u4EF6)").option("-r, --recursive", "\u9012\u5F52\u5B50\u76EE\u5F55(\u914D\u5408 --dir)").option("--pattern <glob>", "\u6587\u4EF6\u540D\u5339\u914D,\u9ED8\u8BA4 *.md", "*.md").option("--force", "\u5FFD\u7565 manifest,\u5F3A\u5236\u5168\u91CF\u91CD\u6444(\u914D\u5408 --dir)").option(
|
|
4765
4766
|
"-c, --concurrency <n>",
|
|
4766
4767
|
"\u5E76\u53D1\u6444\u5165\u6570(\u914D\u5408 --dir,\u9ED8\u8BA4 3,\u5F31\u670D\u52A1\u5668\u53CB\u597D)",
|
|
@@ -4777,7 +4778,7 @@ reviewCmd.action(run((client, opts) => list(client, { limit: toInt(opts.limit) }
|
|
|
4777
4778
|
reviewCmd.command("mark [name...]").description("\u6807\u8BB0\u590D\u4E60 (rating: 1=\u5FD8\u8BB0 2=\u5403\u529B 3=\u987A\u5229 4=\u8F7B\u677E)").option("-r, --rating <n>", "1-4", "3").action(run((client, opts, args) => mark(client, { rating: toInt(opts.rating) }, args)));
|
|
4778
4779
|
program2.command("synthesize [topic...]").description("\u4E3B\u9898\u7EFC\u5408\u62A5\u544A").option("-d, --depth <n>", "\u6DF1\u5EA6 1-5", "2").action(run(synthesize));
|
|
4779
4780
|
program2.command("topics").description("\u9009\u9898\u63A8\u8350").option("-c, --count <n>", "\u6570\u91CF", "5").action(run((client, opts) => topics(client, { count: toInt(opts.count) })));
|
|
4780
|
-
program2.command("draft <action> [target...]").description("\u8349\u7A3F: new <\u9009\u9898> / list / show <id> / publish <id> / wechat <id>").option("--account <name>", "\u76EE\u6807\u516C\u4F17\u53F7(new/wechat)").option("--status <s>", "\u72B6\u6001\u8FC7\u6EE4(list)").option("-p, --page <n>", "\u9875\u7801(list)", "1").option("-s, --size <n>", "\u6BCF\u9875(list)", "20").option("--digest <text>", "\u6458\u8981(wechat,\u53EF\u9009)").option("--author <name>", "\u7B14\u540D(wechat,\u53EF\u9009)").action(run((client, opts, args) => draft(client, opts, args)));
|
|
4781
|
+
program2.command("draft <action> [target...]").description("\u8349\u7A3F: new <\u9009\u9898> \u751F\u6210 / list \u5217\u8868 / show <id> \u770B\u6B63\u6587 / publish <id> \u5165\u5E93 / wechat <id> \u6295\u516C\u4F17\u53F7").option("--account <name>", "\u76EE\u6807\u516C\u4F17\u53F7(new/wechat)").option("--status <s>", "\u72B6\u6001\u8FC7\u6EE4(list)").option("-p, --page <n>", "\u9875\u7801(list)", "1").option("-s, --size <n>", "\u6BCF\u9875(list)", "20").option("--digest <text>", "\u6458\u8981(wechat,\u53EF\u9009)").option("--author <name>", "\u7B14\u540D(wechat,\u53EF\u9009)").action(run((client, opts, args) => draft(client, opts, args)));
|
|
4781
4782
|
program2.command("gaps").description("\u77E5\u8BC6\u7F3A\u53E3(\u88AB\u591A\u6B21\u641C\u7D22\u4F46\u65E0\u7ED3\u679C)").option("-d, --days <n>", "\u56DE\u6EAF\u5929\u6570", "30").action(run((client, opts) => gaps(client, { days: toInt(opts.days) })));
|
|
4782
4783
|
program2.command("feedback [page...]").description("\u5BF9\u9875\u9762/\u5B9E\u4F53\u6253\u53CD\u9988 (positive|negative)").action(run(feedback));
|
|
4783
4784
|
program2.command("daily").description("\u6BCF\u65E5\u6D3B\u52A8\u6458\u8981").option("-d, --days <n>", "\u56DE\u6EAF\u5929\u6570", "1").action(run((client, opts) => daily(client, { days: toInt(opts.days) })));
|