@wirecat/files-cli 0.4.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  Notable changes to `@wirecat/files-cli`. One section per version, newest first.
4
4
 
5
+ ## 0.6.0 — 30.11.2026
6
+
7
+ ### Added
8
+
9
+ - **`files store migrate`, `files store info` and `files store recover`.** A search that finds the local store behind
10
+ this build says to run `files store migrate`, and this CLI had no such command. A damaged store now names `files
11
+ store recover`.
12
+
13
+ ### Fixed
14
+
15
+ - **Built on @wirecat/cli-core 3.6.3 and @wirecat/cli-base 3.1.4** (were 3.5.1 and 2.1.0).
16
+ - **A search never writes to the local store**, so a store this CLI may not write is searched too. A command that
17
+ writes indexes what it stored when it closes the store.
18
+ - **The release checks keep passing after 2026-12-11.** cli-base 2.x's audit named shared differences due on
19
+ 2026-11-27, which cli-base 3.1.4 has reviewed.
20
+ - **Built on @wirecat/cli-core 3.6.3** (was 3.6.0). A read-only open no longer builds indexes, so the first search
21
+ after an upgrade reads the store as it is.
22
+
23
+ ## 0.5.0 — 30.11.2026
24
+
25
+ ### Fixed
26
+
27
+ - **An agent can open a note by the `ref` a search hit gave it.** Over MCP, `notes show` now takes `ref` in place of
28
+ `note`, as the show commands of cli-core already do. The command line keeps its plain argument. Built on
29
+ @wirecat/cli-core 3.5.1 (was 3.4.0), whose `takesRef` makes this possible.
30
+
5
31
  ## 0.4.0 — 29.11.2026
6
32
 
7
33
  ### Fixed
@@ -595,6 +595,57 @@
595
595
  "local": "none"
596
596
  },
597
597
  "entity": "run_location"
598
+ },
599
+ {
600
+ "path": [
601
+ "store",
602
+ "info"
603
+ ],
604
+ "summary": "the shared store's format, size and contents, and whether this tool can read it",
605
+ "effects": {
606
+ "remote": "none",
607
+ "local": "read"
608
+ },
609
+ "permission": "store.info",
610
+ "entity": "store_info"
611
+ },
612
+ {
613
+ "path": [
614
+ "store",
615
+ "recover"
616
+ ],
617
+ "summary": "what is damaged in the store and how to recover it",
618
+ "effects": {
619
+ "remote": "none",
620
+ "local": "read"
621
+ },
622
+ "permission": "store.recover"
623
+ },
624
+ {
625
+ "path": [
626
+ "store",
627
+ "recover",
628
+ "run"
629
+ ],
630
+ "summary": "rebuild a damaged store from every row it can read",
631
+ "effects": {
632
+ "remote": "none",
633
+ "local": "write"
634
+ },
635
+ "permission": "store.recover.run"
636
+ },
637
+ {
638
+ "path": [
639
+ "store",
640
+ "migrate"
641
+ ],
642
+ "summary": "migrate an older local store",
643
+ "effects": {
644
+ "remote": "none",
645
+ "local": "write"
646
+ },
647
+ "permission": "store.migrate",
648
+ "entity": "store_migration"
598
649
  }
599
650
  ],
600
651
  "entities": {
package/dist/bin/files.js CHANGED
@@ -9,7 +9,11 @@ if (
9
9
  (words[0] === "--version" || words[0] === "-V") &&
10
10
  !Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
11
11
  ) {
12
- process.stdout.write("0.4.0\n")
12
+ process.stdout.write("0.6.0\n")
13
+ try {
14
+ const { wcatStart } = await import("@wirecat/cli-base/wcat/start")
15
+ await wcatStart({ command: "files", version: "0.6.0" })
16
+ } catch {}
13
17
  } else {
14
18
  // Before the bundle compiles: the bundle's own call comes after its chunks.
15
19
  module.enableCompileCache()
@@ -26,7 +30,7 @@ if (
26
30
  : next(specifier, context),
27
31
  })
28
32
  }
29
- const chunks = ["../bundle/program-GIDBBUEV.js"]
33
+ const chunks = ["../bundle/program-ACW42YWQ.js"]
30
34
  const preload = () =>
31
35
  Promise.allSettled([
32
36
  ...chunks.map((chunk) => import(chunk)),
@@ -225,7 +225,7 @@ var REASONS = defineReasons([
225
225
  ]);
226
226
 
227
227
  // dist/version.js
228
- var VERSION = "0.4.0";
228
+ var VERSION = "0.6.0";
229
229
 
230
230
  // dist/identity.js
231
231
  var PACKAGE = "@wirecat/files-cli";
@@ -3,7 +3,7 @@ import { createRequire as __bundleRequire } from "node:module";
3
3
  const require = __bundleRequire(import.meta.url);
4
4
  import {
5
5
  DESKTOP
6
- } from "./chunk-YUDZP7HA.js";
6
+ } from "./chunk-HKVR53AD.js";
7
7
 
8
8
  // dist/bin/files.js
9
9
  import { enableCompileCache } from "node:module";
@@ -15,7 +15,7 @@ var wcat = await wcatStart(DESKTOP);
15
15
  if (wcat.code !== void 0) {
16
16
  process.exitCode = wcat.code;
17
17
  } else {
18
- const { run } = await import("./program-GIDBBUEV.js");
18
+ const { run } = await import("./program-ACW42YWQ.js");
19
19
  process.exitCode = await run(process.argv.slice(2));
20
20
  }
21
21
  stopCatching();
@@ -8,7 +8,7 @@ import {
8
8
  __name,
9
9
  __require,
10
10
  __toESM
11
- } from "./chunk-YUDZP7HA.js";
11
+ } from "./chunk-HKVR53AD.js";
12
12
 
13
13
  // node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js
14
14
  var require_identity = __commonJS({
@@ -9845,7 +9845,7 @@ import { readFileSync as readFileSync5 } from "node:fs";
9845
9845
  import { CliError as CliError17 } from "@wirecat/cli-base";
9846
9846
  import { annotate as annotate2 } from "@wirecat/cli-base/commands";
9847
9847
  import { stepOf } from "@wirecat/cli-base/standards";
9848
- import { contextEvidenceFingerprint, LOCAL_READ, LOCAL_WRITE as LOCAL_WRITE2, queryTerms, termField, withQuery } from "@wirecat/cli-core";
9848
+ import { contextEvidenceFingerprint, LOCAL_READ, LOCAL_WRITE as LOCAL_WRITE2, queryTerms, takesRef, termField, withQuery } from "@wirecat/cli-core";
9849
9849
  import { InvalidArgumentError as InvalidArgumentError2 } from "commander";
9850
9850
 
9851
9851
  // dist/options.js
@@ -10655,7 +10655,7 @@ var notesCommandDefinition = /* @__PURE__ */ __name((program, streams, env) => {
10655
10655
  return work(store);
10656
10656
  }), "withNotes");
10657
10657
  const notes = program.command("notes").description("notes from your folders, and notes you write here");
10658
- annotate2(notes.command("show"), { effects: LOCAL_READ, output: { entity: "note" } }).description("one note: its text, tags, what it links and what links it").addHelpText("after", SAVE_HELP).argument("<note>", "note:<id>, document:<id>, or a file in a configured folder").option("--max-chars <n>", `characters of the text at most, 1\u2013${MAX_CHARS}; the whole text without it`, between(1, MAX_CHARS, "--max-chars")).action(async (reference, options) => {
10658
+ annotate2(takesRef(notes.command("show")), { effects: LOCAL_READ, output: { entity: "note" } }).description("one note: its text, tags, what it links and what links it").addHelpText("after", SAVE_HELP).argument("<note>", "note:<id>, document:<id>, or a file in a configured folder").option("--max-chars <n>", `characters of the text at most, 1\u2013${MAX_CHARS}; the whole text without it`, between(1, MAX_CHARS, "--max-chars")).action(async (reference, options) => {
10659
10659
  const whole = await withNotes(async (store) => {
10660
10660
  const note = await noteOf(store, env, reference);
10661
10661
  const ref = note.ref;
@@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
2
2
  import { CliError } from "@wirecat/cli-base";
3
3
  import { annotate } from "@wirecat/cli-base/commands";
4
4
  import { stepOf } from "@wirecat/cli-base/standards";
5
- import { contextEvidenceFingerprint, LOCAL_READ, LOCAL_WRITE, queryTerms, termField, withQuery, } from "@wirecat/cli-core";
5
+ import { contextEvidenceFingerprint, LOCAL_READ, LOCAL_WRITE, queryTerms, takesRef, termField, withQuery, } from "@wirecat/cli-core";
6
6
  import { InvalidArgumentError } from "commander";
7
7
  import { answers, itemAnswer, listAnswer, withStore } from "../answer.js";
8
8
  import { isMcpRun } from "../author.js";
@@ -99,7 +99,8 @@ const notesCommandDefinition = (program, streams, env) => {
99
99
  return work(store);
100
100
  });
101
101
  const notes = program.command("notes").description("notes from your folders, and notes you write here");
102
- annotate(notes.command("show"), { effects: LOCAL_READ, output: { entity: "note" } })
102
+ // Over MCP an agent passes the reference a search hit gave as `ref`, as it does to cli-core's show commands.
103
+ annotate(takesRef(notes.command("show")), { effects: LOCAL_READ, output: { entity: "note" } })
103
104
  .description("one note: its text, tags, what it links and what links it")
104
105
  .addHelpText("after", SAVE_HELP)
105
106
  .argument("<note>", "note:<id>, document:<id>, or a file in a configured folder")
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "0.4.0";
1
+ export const VERSION = "0.6.0";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/files-cli",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Notes folders, Obsidian vaults, PDFs and transcripts for your AI agents, in the local store",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",
@@ -59,8 +59,8 @@
59
59
  "docs:spell": "cspell lint --config cspell.json --no-progress --no-summary README.md SECURITY.md CHANGELOG.md AGENTS.md CLAUDE.md 'docs/*.md' 'skills/**/*.md' 'changes/*.md'"
60
60
  },
61
61
  "dependencies": {
62
- "@wirecat/cli-base": "2.1.0",
63
- "@wirecat/cli-core": "3.4.0",
62
+ "@wirecat/cli-base": "3.1.4",
63
+ "@wirecat/cli-core": "3.6.3",
64
64
  "commander": "15.0.0",
65
65
  "valibot": "1.5.0",
66
66
  "yaml": "2.9.1"