exomind 0.10.0 → 0.11.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/dist/cli.js +12 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
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.
|
|
3122
|
+
version: "0.11.0",
|
|
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"
|
|
@@ -4215,8 +4215,15 @@ async function runDirIngestest(client, opts, dir) {
|
|
|
4215
4215
|
}
|
|
4216
4216
|
|
|
4217
4217
|
// src/commands/ingest.ts
|
|
4218
|
+
function resolveIngestDir(dir, args) {
|
|
4219
|
+
const dirPath = typeof dir === "string" ? dir : args[0];
|
|
4220
|
+
if (!dirPath || dirPath === "-") {
|
|
4221
|
+
throw new Error("--dir \u9700\u8981\u76EE\u5F55\u8DEF\u5F84\u3002\u4E24\u79CD\u5199\u6CD5: exomind ingest --dir <\u76EE\u5F55> \u6216 exomind ingest <\u76EE\u5F55> --dir");
|
|
4222
|
+
}
|
|
4223
|
+
return dirPath;
|
|
4224
|
+
}
|
|
4218
4225
|
async function ingest(client, opts, args) {
|
|
4219
|
-
if (opts.dir) return runDirIngestest(client, opts, opts.dir);
|
|
4226
|
+
if (opts.dir) return runDirIngestest(client, opts, resolveIngestDir(opts.dir, args));
|
|
4220
4227
|
let content = "";
|
|
4221
4228
|
let fileAbs = null;
|
|
4222
4229
|
let fileRaw = null;
|
|
@@ -4303,7 +4310,8 @@ async function search(client, opts, args) {
|
|
|
4303
4310
|
console.log(`
|
|
4304
4311
|
${i + 1}. ${cyan(title)}`);
|
|
4305
4312
|
if (r.path) console.log(dim(` ${r.path}`));
|
|
4306
|
-
|
|
4313
|
+
const snip = r.snippet ?? r.content;
|
|
4314
|
+
if (snip) console.log(dim(` ${truncate(String(snip), 100)}`));
|
|
4307
4315
|
if (r.score != null) console.log(dim(` score: ${r.score}`));
|
|
4308
4316
|
});
|
|
4309
4317
|
});
|
|
@@ -5134,7 +5142,7 @@ program2.name("exomind").description("ExoMind \u8DE8\u5E73\u53F0\u77E5\u8BC6\u5E
|
|
|
5134
5142
|
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));
|
|
5135
5143
|
program2.command("me").description("\u663E\u793A\u5F53\u524D\u767B\u5F55\u6001\u4E0E\u670D\u52A1\u5668").action(run(whoami));
|
|
5136
5144
|
program2.command("whoami", { hidden: true }).description("\u663E\u793A\u5F53\u524D\u767B\u5F55\u6001\u4E0E\u670D\u52A1\u5668(me \u7684\u65E7\u540D)").action(run(whoami));
|
|
5137
|
-
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
|
|
5145
|
+
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;\u76EE\u5F55\u53EF\u5199\u5728\u524D: ingest <\u76EE\u5F55> --dir)").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(
|
|
5138
5146
|
"-c, --concurrency <n>",
|
|
5139
5147
|
"\u5E76\u53D1\u6444\u5165\u6570(\u914D\u5408 --dir,\u9ED8\u8BA4 3,\u5F31\u670D\u52A1\u5668\u53CB\u597D)",
|
|
5140
5148
|
(v) => parseInt(v, 10) || 3,
|