@staix/vault-mem 0.12.0 → 0.12.1
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 +4 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/skills/vault-enrich/SKILL.md +31 -0
- package/src/skills-install.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.12.1] - 2026-11-22
|
|
6
|
+
|
|
7
|
+
- Add the bundled `vault-enrich` skill for hash-bound offline enrichment intake, review and reconciliation.
|
|
8
|
+
|
|
5
9
|
## [0.12.0] - 2026-11-22
|
|
6
10
|
|
|
7
11
|
- N-1: 0.11.0 shares the note and spec index files; 0.11.0 supports config format 4; format 5 adds default vault and graph options, and format 6 adds per-vault enrichment. Older readers preserve but ignore new keys in newer formats. The older CLI lacks settings and enrichment options; its MCP server lacks the enrichment tools and vector arguments. Older readers ignore local sidecars, may treat inferred links as extracted and do not expose assertion origin metadata; older writers refuse newly introduced `inferred_links` metadata and the `infer-link` proposal operation. Bundled skills and their setup and export commands are new in 0.12.0; 0.11.0 leaves those installed skill directories alone.
|
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Enrichment is opt-in per vault through `vmem settings` or the Settings panel. A
|
|
|
62
62
|
|
|
63
63
|
## Skills
|
|
64
64
|
|
|
65
|
-
The package includes `vault-connect`, `vault-extract`, `vault-graph`, `vault-learn`, `vault-lint`, `vault-refactor`, `vault-remember`, `vault-rethink`, `vault-stats`, `vault-sync`, `vault-update`, `vmem-status` and `skill-mine`. They run with vmem alone; workspace-specific steps are optional.
|
|
65
|
+
The package includes `vault-connect`, `vault-enrich`, `vault-extract`, `vault-graph`, `vault-learn`, `vault-lint`, `vault-refactor`, `vault-remember`, `vault-rethink`, `vault-stats`, `vault-sync`, `vault-update`, `vmem-status` and `skill-mine`. They run with vmem alone; workspace-specific steps are optional.
|
|
66
66
|
|
|
67
67
|
`vmem setup claude|codex|kimi|qwen --apply` installs the skills alongside the MCP entry. `--undo` removes only unmodified vmem-owned skills. Pi, jcode and agy do not have an automatic skill root; use `vmem skills export <dir>` to prepare self-contained directories for another host.
|
|
68
68
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vault-enrich
|
|
3
|
+
description: Enrich opted-in vault notes with externally produced embeddings, summaries, community labels, inferred links or assertion facts through vmem's hash-bound intake.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vault enrichment
|
|
7
|
+
|
|
8
|
+
Before the first vmem call, read `references/vault-adapter.md` for runtime discovery and bind a vault id. Pass that `vault` to each tool. Workspace-specific steps in the adapter are optional.
|
|
9
|
+
|
|
10
|
+
Enrichment requires the selected vault's explicit opt-in and an allowed write channel. Inspect effective settings with `vmem settings <vault>`; if enrichment is disabled, stop and let the person decide whether to enable it using the settings preview and confirmation. Respect current secret, PII and path policies when reading, producing and submitting results. Do not send protected content to an external service without authorization. A host agent may perform the model or embedding work; vmem does not call models.
|
|
11
|
+
|
|
12
|
+
## Work and intake
|
|
13
|
+
|
|
14
|
+
1. Call `vmem_enrichment_work` with `vault`, `kind` (one of `embedding`, `summary`, `community-label`, `inferred-link`, `fact`) and optional `limit` (1..100). Each item supplies `path` and `contentHash`; use `next` as `after` for another page. An item with `status: needs-reconciliation` must be resolved before retrying that path and kind.
|
|
15
|
+
2. Read the selected note with `vmem_read`, including continuation pages as needed, and generate a result for that exact content. Do not infer missing note text. If the content has changed since the work item was listed, obtain fresh work and recompute.
|
|
16
|
+
3. Call `vmem_enrichment_intake` with `vault`, `path`, `contentHash`, `kind`, `producer: {skill, version, model}`, `createdAt` (canonical UTC ISO timestamp with milliseconds, such as `2026-11-22T00:00:00.000Z`) and `value`. The producer is caller-supplied and unverified. Values depend on kind:
|
|
17
|
+
- `embedding`: a numeric vector with 1..4096 dimensions. Every value must be finite and remain finite after Float32 conversion; at least one value must remain nonzero after conversion. Each vault sidecar accepts one model and dimension; reuse them. Stored values are rounded to Float32.
|
|
18
|
+
- `summary` or `community-label`: nonempty text up to 8192 UTF-8 bytes.
|
|
19
|
+
- `inferred-link`: `{target: "note-stem"}` for a different flat lowercase note stem. Intake submits an `infer-link` proposal, not a direct note edit. Review the proposal and use the existing preview, fingerprint and confirmation flow to apply it; applying adds a plain body link and the target to `inferred_links` together.
|
|
20
|
+
- `fact`: an array of assertion operations including `assert` or `revise`, with the existing assertion journal's evidence or source requirements. Resolve subjects and heads from the journal; do not fabricate evidence or treat producer metadata as verification.
|
|
21
|
+
4. Inspect the complete receipt, including `ok`, `applied`, nested `receipt`, `issues` and `issue` when present. A stale-hash refusal requires rereading the note, requesting fresh work and recomputing. Do not retry a partial or uncertain fact/link intake until its publication state is resolved.
|
|
22
|
+
|
|
23
|
+
Use `vmem_enrichment_get` with `vault`, `path` and `kind` to inspect status (`current`, `stale`, `missing` or `needs-reconciliation`). Sidecar data is local to the vmem home and is not synced across machines.
|
|
24
|
+
|
|
25
|
+
## Uncertain fact or link intake
|
|
26
|
+
|
|
27
|
+
If the outcome is uncertain or the work/get status is `needs-reconciliation`, do not replay it. Preview `vmem_enrichment_reconcile` with `vault`, `path`, `kind` and a candidate `resolution` (`published` or `not_published`), without `confirm`; its `intakeId` identifies the reservation. Inspect assertion journal entries via `vmem_assertions` for the matching origin intake id, or inspect proposals with `vmem_proposal_list` and `vmem_proposal_show` (the proposal id is the intake id and its agent label is `enrichment:<intakeId>`). Check the available journal/proposal coverage and any nested receipt before deciding. If evidence is incomplete or ambiguous, stop and report it rather than guessing. After inspection, request a fresh preview for the verified resolution, then confirm with its returned `fingerprint`. A `not_published` resolution allows new work; a `published` resolution prevents replay. Respect any refusal and inspect or repair its stated cause first.
|
|
28
|
+
|
|
29
|
+
## Vector reads
|
|
30
|
+
|
|
31
|
+
Use `vmem_similar` with `vault` and `path` for neighbors of a note with a current stored embedding. Before calling `vmem_search` with a vector, use `vmem_enrichment_get` on a current embedding record to read its producer model and vector length. Provide both `model` and `vector` using that model and dimension. If no embeddings are stored, search retains lexical ranking. When embeddings are stored, a model or dimension mismatch is an error; use the recorded model and dimension. A valid query also retains lexical ranking if no current eligible vectors match. Both results are suggestions, not evidence of a factual claim or permission to write links.
|
package/src/skills-install.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { version } from "../package.json";
|
|
|
9
9
|
import type { SetupMode, SetupTarget } from "./setup.ts";
|
|
10
10
|
import { shellWord } from "./text-output.ts";
|
|
11
11
|
|
|
12
|
-
export const SKILL_NAMES = ["vault-connect", "vault-extract", "vault-graph", "vault-learn", "vault-lint", "vault-refactor", "vault-remember", "vault-rethink", "vault-stats", "vault-sync", "vault-update", "vmem-status", "skill-mine"] as const;
|
|
12
|
+
export const SKILL_NAMES = ["vault-connect", "vault-enrich", "vault-extract", "vault-graph", "vault-learn", "vault-lint", "vault-refactor", "vault-remember", "vault-rethink", "vault-stats", "vault-sync", "vault-update", "vmem-status", "skill-mine"] as const;
|
|
13
13
|
const PACKAGE_ROOT = fileURLToPath(new URL("..", import.meta.url));
|
|
14
14
|
const MARKER = ".vmem-skill.json", MAX_FILE = 2 * 1024 * 1024, MAX_BYTES = 16 * 1024 * 1024, MAX_FILES = 512;
|
|
15
15
|
export interface SkillAction { name: string; path: string; change: "install" | "replace" | "remove" | "unchanged" | "absent" | "modified" | "foreign" | "refused"; reason?: string }
|