@hraness/kb 0.18.0 → 0.19.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/README.md +197 -113
- package/dist/authoring.js +2 -2
- package/dist/benchmark.js +3 -3
- package/dist/cli.js +16 -12
- package/dist/evaluation-builder.js +5 -5
- package/dist/evaluation-kb.js +5 -5
- package/dist/graph.js +3 -1
- package/dist/{index-zxdy5pby.js → index-5m2ydj5q.js} +2 -2
- package/dist/{index-cxfrakt7.js → index-ekpwvbra.js} +5 -2
- package/dist/{index-jsmvyyvf.js → index-ey46z1zf.js} +4 -4
- package/dist/{index-cv6fh7z5.js → index-gm9t95d9.js} +1 -1
- package/dist/{index-01jj6rbv.js → index-gxr0fctd.js} +3 -3
- package/dist/index-nd6nynv2.js +1162 -0
- package/dist/{index-s2gw5aw9.js → index-qwgsmtsz.js} +1 -1
- package/dist/{index-zzhgcwyt.js → index-vxmf14m1.js} +3 -3
- package/dist/{index-n5dd7r0v.js → index-xw9ac71d.js} +2 -2
- package/dist/{index-1vrd1rmn.js → index-ykvvkd77.js} +1 -1
- package/dist/index.js +30 -8
- package/dist/percolate.js +22 -2
- package/dist/portfolio.js +5 -5
- package/dist/sdk.js +4 -4
- package/dist/search.js +2 -2
- package/dist/semantic.js +3 -3
- package/dist/workflows/decision-context.js +5 -5
- package/dist/workflows/index.js +5 -5
- package/package.json +1 -1
- package/skills/kb/AGENTS.md +3 -0
- package/skills/kb/SKILL.md +38 -29
- package/skills/kb/agents/openai.yaml +2 -2
- package/skills/kb/references/companion-skills.md +96 -0
- package/skills/kb/references/customize.md +123 -0
- package/skills/kb/references/percolate.md +39 -7
- package/skills/kb/references/query.md +21 -0
- package/skills/kb/templates/companion-skill.template.md +57 -0
- package/src/authoring.ts +5 -3
- package/src/cli.ts +12 -7
- package/src/graph.ts +8 -1
- package/src/percolate.ts +1088 -17
- package/dist/index-dyqwejk5.js +0 -531
package/README.md
CHANGED
|
@@ -14,34 +14,67 @@ system.
|
|
|
14
14
|
Bun 1.3.14 or newer is required.
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
|
-
bun add --global @hraness/kb@0.
|
|
17
|
+
bun add --global @hraness/kb@0.19.0
|
|
18
|
+
kb --help
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
- **Inspect what agents recover.** Markdown and Git stay authoritative,
|
|
23
|
-
retrieval signals stay distinct, and indexes, embeddings, and graph views
|
|
24
|
-
remain replaceable.
|
|
25
|
-
- **Keep the application independent.** Application code imports neither the
|
|
26
|
-
vault nor a hosted knowledge service. Capture and semantic adapters declare
|
|
27
|
-
their network, browser, native-tool, and model-download effects.
|
|
28
|
-
|
|
29
|
-
## Create one durable note
|
|
21
|
+
## Keep one decision available to the next session
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
embedding model:
|
|
23
|
+
Suppose a parser must stop retrying after three attempts. Record that constraint
|
|
24
|
+
in a note, then link the plan that will implement it:
|
|
34
25
|
|
|
35
|
-
```
|
|
26
|
+
```shell
|
|
36
27
|
kb init kb
|
|
37
28
|
kb note create notes/parser-contract \
|
|
38
|
-
--title "Parser contract" --type concept --tag architecture
|
|
39
|
-
|
|
29
|
+
--title "Parser contract" --type concept --tag architecture \
|
|
30
|
+
--body "Parser retries stop after three attempts." --root kb
|
|
31
|
+
kb note create plans/parser-v2 \
|
|
32
|
+
--title "Parser v2" --type plan \
|
|
33
|
+
--body "The plan implements [[notes/parser-contract|the parser contract]]." \
|
|
34
|
+
--root kb
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The first `kb note create` command stores ordinary Markdown at
|
|
38
|
+
`kb/notes/parser-contract.md` and assigns its stable `document_id`. Add the
|
|
39
|
+
exact code boundary to that note's frontmatter so path lookup can recover it:
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
repository_scopes:
|
|
43
|
+
- packages/parser
|
|
40
44
|
```
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
Commit the vault with the repository. The Markdown and its Git history are the
|
|
47
|
+
durable record.
|
|
48
|
+
|
|
49
|
+
## Recover the stopped session
|
|
50
|
+
|
|
51
|
+
In a later session, start from the code path and inspect each independent
|
|
52
|
+
signal:
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
kb context packages/parser/src/index.ts --root kb --repo .
|
|
56
|
+
kb search "why parser retries stop" --root kb --mode exact \
|
|
57
|
+
--history --repo .
|
|
58
|
+
kb backlinks notes/parser-contract --root kb
|
|
59
|
+
kb history notes/parser-contract --root kb --repo .
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
| Signal | What it recovers |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| Markdown | The current parser constraint in the file you can review and edit. |
|
|
65
|
+
| Backlinks | The plan that explicitly links to the constraint. |
|
|
66
|
+
| Exact search | The current note matched from its words, without a network request or embedding model. |
|
|
67
|
+
| Repository context | Inherited `AGENTS.md` guides and records scoped to `packages/parser`. |
|
|
68
|
+
| Git history | The commits and bounded co-change evidence associated with the note. |
|
|
69
|
+
|
|
70
|
+
Together, those views recover the persisted decision, related plan, applicable
|
|
71
|
+
rules, and provenance needed to resume the work. They do not reconstruct
|
|
72
|
+
private chat or prove that the note is still correct. Open the returned
|
|
73
|
+
Markdown and guides before acting on them.
|
|
74
|
+
|
|
75
|
+
The boundaries stay visible: Markdown and Git are authoritative, backlinks and
|
|
76
|
+
indexes are replaceable views, and Git work is opt-in. Application code imports
|
|
77
|
+
neither the vault nor a hosted knowledge service.
|
|
45
78
|
|
|
46
79
|
<!-- hraness:kb-landing:end -->
|
|
47
80
|
|
|
@@ -51,22 +84,6 @@ travel with the repository.
|
|
|
51
84
|
[KB source on GitHub](https://github.com/hraness/kb) ·
|
|
52
85
|
[KB overview](https://hraness.com/kb)
|
|
53
86
|
|
|
54
|
-
## Use
|
|
55
|
-
|
|
56
|
-
```sh
|
|
57
|
-
kb init kb
|
|
58
|
-
kb clip https://example.com/article --output articles
|
|
59
|
-
kb pdf ./report.pdf --output articles
|
|
60
|
-
kb percolate notes/topic --root .
|
|
61
|
-
kb context packages/parser/src/index.ts --root kb --repo .
|
|
62
|
-
kb list --where type=plan --scope packages/parser --root .
|
|
63
|
-
kb links notes/topic --root . --direction both
|
|
64
|
-
kb search "parser-v2" --root . --mode exact
|
|
65
|
-
kb portfolio search "parser-v2" --registry kb-portfolio.json \
|
|
66
|
-
--workspace .. --shared
|
|
67
|
-
kb history search packages/parser --root . --repo .. --json
|
|
68
|
-
```
|
|
69
|
-
|
|
70
87
|
## A knowledge base for your coding agents
|
|
71
88
|
|
|
72
89
|
> Give coding agents durable, searchable memory beside the repository with plain Markdown, Git history, and replaceable local search.
|
|
@@ -171,6 +188,14 @@ Retrieval is bounded. The high-level `kb search` and `KnowledgeBaseSession.searc
|
|
|
171
188
|
|
|
172
189
|
Each note owns its outbound typed relationships in frontmatter. KB derives backlinks, inverse edges, and bounded traversal at read time, so parallel agents do not contend on one generated fact file. `kb percolate <note>` reports recurring concepts and missing-link candidates with inspectable support but writes nothing. An agent reads the cited notes before creating a reusable concept or relationship. Semantic similarity never creates an edge automatically.
|
|
173
190
|
|
|
191
|
+
Percolation Result V2 presents a missing relationship as an unordered pair of
|
|
192
|
+
notes with a required predicate. It does not choose the source, direction, or a
|
|
193
|
+
`related-to` fallback. Recommended authored predicates include `synthesizes`,
|
|
194
|
+
`evidenced-by`, `informed-by`, `supersedes`, and `contradicts`; they are an
|
|
195
|
+
advisory vocabulary, so a vault can use another canonical predicate when its
|
|
196
|
+
prose and evidence define the claim. KB never infers reciprocal, inverse,
|
|
197
|
+
transitive, or similarity-derived relationships.
|
|
198
|
+
|
|
174
199
|
Git provenance is opt-in. A search without `--history` performs no Git indexing. `--history` requests best-effort provenance, while `--require-history` rejects unavailable history or incomplete provenance for the selected notes. If one commit exceeds the 2,000-path detail limit, KB retains its identity and vault-local note associations, marks its co-change detail incomplete, and continues through later commits. Best-effort search reports that requested lane as partial.
|
|
175
200
|
|
|
176
201
|
Local attachment checks cover Markdown and Obsidian references to images, PDFs, and editable tldraw sources. They reject missing or escaping files while leaving external URLs alone. A source-inbox view separately lists recent captures that have no inbound disposition from maintained knowledge. It is an advisory, not an automatic backlink requirement: a saved source may intentionally remain a leaf.
|
|
@@ -187,69 +212,45 @@ The same mixed-cache, single-run test recorded p95 latencies of 44.345 milliseco
|
|
|
187
212
|
|
|
188
213
|
Search finds candidates. Similarity does not establish that a passage is current, correct, or supported by its sources. The Markdown, cited captures, explicit relationships, and requested Git history supply the material a reader must inspect.
|
|
189
214
|
|
|
215
|
+
### Customize through an approved proposal
|
|
216
|
+
|
|
217
|
+
The Agent Skill routes setup and evolution requests before it prepares a
|
|
218
|
+
runtime. It inspects the proposed location without mutation, interviews the
|
|
219
|
+
user about the memory questions the KB should answer, and presents exact read
|
|
220
|
+
and write targets. Only the approved targets may be scaffolded. A changed path,
|
|
221
|
+
repository, account, integration, or companion skill requires renewed
|
|
222
|
+
approval.
|
|
223
|
+
|
|
224
|
+
The standard router may be enough. A recurring ritual can instead receive a
|
|
225
|
+
companion skill with explicit inputs, authority, durable outputs, idempotence,
|
|
226
|
+
failure behavior, and verification. These skills are inert instructions. They
|
|
227
|
+
do not create a plugin runtime, execute vault metadata, inherit ambient account
|
|
228
|
+
access, or couple application code to the KB. An exact repeat is a no-op;
|
|
229
|
+
divergence, path escape, symbolic links, partial writes, and unapproved
|
|
230
|
+
external surfaces stop the workflow.
|
|
231
|
+
|
|
232
|
+
The repository's fake-capability suite exercises those transitions. It is a
|
|
233
|
+
tested contract example, not proof that every agent or host integration
|
|
234
|
+
complies.
|
|
235
|
+
|
|
236
|
+
This workflow builds on Frank Chen's public notes about [designing a personal
|
|
237
|
+
knowledge base with an
|
|
238
|
+
agent](https://gist.github.com/fxchen/773397095d7a6bffda621e4237da0da9)
|
|
239
|
+
and [extending it with
|
|
240
|
+
skills](https://gist.github.com/fxchen/09cb410b22c9c5256d80243ee925b57e).
|
|
241
|
+
|
|
242
|
+
KB ships no `kb_role` metadata, lifecycle resolver or API, lifecycle CLI,
|
|
243
|
+
compatibility diagnostic, or metadata migration. A frozen Phase 0 value gate
|
|
244
|
+
must show that those surfaces improve deterministic agent decisions before they
|
|
245
|
+
are introduced. Current and historical plan routing remains derived from
|
|
246
|
+
existing type, path, and status conventions.
|
|
247
|
+
|
|
190
248
|
### Adopt the smallest useful split
|
|
191
249
|
|
|
192
250
|
Start with a short inherited `AGENTS.md` path for rules whose omission would make an edit wrong. A small knowledge base may need only Markdown, Git, an index page, and ordinary file search. Add source capture when evidence keeps disappearing. Add repository scopes when agents need to recover current memory from code paths. Add metadata or hybrid search when file search stops answering the repository's questions. Add links and graph views only when the relationships themselves help people make decisions.
|
|
193
251
|
|
|
194
252
|
Treat the knowledge base as repository-adjacent durable memory. Authored Markdown and Git are the record; catalogs, indexes, embeddings, and graph views are replaceable ways to find and inspect it. Checks can validate structure, captures can preserve a selected surface, and similarity can suggest candidates. None of those mechanisms proves that a source is trustworthy or an explanation is still true. People and agents must revise the knowledge as the repository changes.
|
|
195
253
|
|
|
196
|
-
## Upgrade to v0.18.0
|
|
197
|
-
|
|
198
|
-
Version 0.18.0 adds a review-only adoption seam for exact dependency closures
|
|
199
|
-
from an Oh working authority. Trusted host code creates a
|
|
200
|
-
`createOhAdoptionPreparerV1` facade with the expected binding and head,
|
|
201
|
-
destination, rights clearance, review route, and conflict policy. The narrow
|
|
202
|
-
`prepare` call accepts only a capsule plus transformation and redaction
|
|
203
|
-
disclosures, returns deeply immutable deterministic Markdown and manifest
|
|
204
|
-
bytes with status `prepared`, and has no vault, Git, Oh-store, or promotion
|
|
205
|
-
capability. KB pins `@hraness/oh` v0.2.0 and delegates closure integrity to its
|
|
206
|
-
official store verifier.
|
|
207
|
-
|
|
208
|
-
## Upgrade to v0.17.3
|
|
209
|
-
|
|
210
|
-
Version 0.17.3 restructures the README around an inspectable first task,
|
|
211
|
-
explicit operating boundaries, and a shorter path from installation to useful
|
|
212
|
-
output. Runtime APIs and package behavior are unchanged.
|
|
213
|
-
|
|
214
|
-
## Upgrade to v0.17.2
|
|
215
|
-
|
|
216
|
-
Version 0.17.2 improves package discovery through focused npm keywords, a more
|
|
217
|
-
specific README opening, and direct links between npm, GitHub, and the project
|
|
218
|
-
overview. Runtime APIs and package behavior are unchanged.
|
|
219
|
-
|
|
220
|
-
## Upgrade to v0.17.1
|
|
221
|
-
|
|
222
|
-
Version 0.17.1 adds the public `@hraness/kb` npm installation path without
|
|
223
|
-
changing the runtime API introduced in 0.17.0. Bun `1.3.14` or newer is now an
|
|
224
|
-
explicit package requirement. Consumers should review the package's declared
|
|
225
|
-
dual-use capture boundary and the lifecycle scripts used by optional browser
|
|
226
|
-
and native search adapters before enabling those scripts.
|
|
227
|
-
|
|
228
|
-
## Upgrade to v0.17.0
|
|
229
|
-
|
|
230
|
-
Version 0.17 adds selected portfolio federation, stable note identities,
|
|
231
|
-
qualified external relations, search rules, capture inspection, and untrusted
|
|
232
|
-
context packing. Consumers with typed fixtures or custom capture writers should
|
|
233
|
-
make these migrations before upgrading:
|
|
234
|
-
|
|
235
|
-
- Capture writers now emit manifest schema v4 and must provide the stored
|
|
236
|
-
document `path`, exact UTF-8 `bytes`, and lowercase SHA-256 digest. The reader
|
|
237
|
-
can inspect schema v1-v3, but verification reports their document integrity as
|
|
238
|
-
unavailable instead of success.
|
|
239
|
-
- `DecisionContextOutput.search` has been removed. Consume the bounded untrusted
|
|
240
|
-
`context` projection and its `truncated` flag instead of transporting the raw
|
|
241
|
-
search result into an agent prompt.
|
|
242
|
-
- `VaultAnalysis` fixtures must include `externalAuthoredRelations`, even when
|
|
243
|
-
the value is an empty array. This keeps qualified authored edges distinct
|
|
244
|
-
from locally resolved graph edges.
|
|
245
|
-
- `createNote` and `kb note create` now assign `document_id` to new ordinary
|
|
246
|
-
notes. Preserve that ID across renames and update snapshots that intentionally
|
|
247
|
-
assert the generated frontmatter.
|
|
248
|
-
|
|
249
|
-
Existing Markdown is not rewritten automatically. Add IDs to maintained legacy
|
|
250
|
-
notes only through reviewed edits, and keep every QMD, graph, portfolio, and
|
|
251
|
-
audit projection disposable.
|
|
252
|
-
|
|
253
254
|
## Installation reference
|
|
254
255
|
|
|
255
256
|
[Bun](https://bun.sh/docs/installation) is the required runtime.
|
|
@@ -259,9 +260,9 @@ audit projection disposable.
|
|
|
259
260
|
Copy this prompt into Codex, Claude Code, or another coding agent:
|
|
260
261
|
|
|
261
262
|
```text
|
|
262
|
-
Install the `kb` Agent Skill from `hraness/kb#v0.
|
|
263
|
+
Install the `kb` Agent Skill from `hraness/kb#v0.19.0` with the standard skills
|
|
263
264
|
CLI. Use the skill's runtime instructions to install the exact
|
|
264
|
-
`@hraness/kb@0.
|
|
265
|
+
`@hraness/kb@0.19.0` registry release only when the command is missing. Verify it
|
|
265
266
|
with `kb doctor` and `kb --help`, but do not initialize or modify a vault until
|
|
266
267
|
I ask.
|
|
267
268
|
```
|
|
@@ -269,25 +270,25 @@ I ask.
|
|
|
269
270
|
Install the single public skill with either runner:
|
|
270
271
|
|
|
271
272
|
```sh
|
|
272
|
-
npx skills add hraness/kb#v0.
|
|
273
|
-
bunx skills add hraness/kb#v0.
|
|
273
|
+
npx skills add hraness/kb#v0.19.0
|
|
274
|
+
bunx skills add hraness/kb#v0.19.0
|
|
274
275
|
```
|
|
275
276
|
|
|
276
277
|
Both commands discover the same `kb` skill and install it into the selected
|
|
277
278
|
agent runner. Skill installation is inert: it does not initialize a vault,
|
|
278
279
|
refresh a catalog, or edit Markdown. When invoked, the skill uses an existing
|
|
279
280
|
`kb` command or, when the command is missing, checks for Bun and installs the
|
|
280
|
-
CLI from the immutable `@hraness/kb@0.
|
|
281
|
+
CLI from the immutable `@hraness/kb@0.19.0` npm version.
|
|
281
282
|
|
|
282
283
|
The public skills CLI reads `skills/kb/` from the repository. The immutable
|
|
283
|
-
`0.
|
|
284
|
+
`0.19.0` npm package includes the same tree under
|
|
284
285
|
`node_modules/@hraness/kb/skills/kb/`, and the package check verifies that the
|
|
285
286
|
installed skill is byte-identical to the repository source.
|
|
286
287
|
|
|
287
288
|
Install the two global commands with Bun:
|
|
288
289
|
|
|
289
290
|
```sh
|
|
290
|
-
bun add --global @hraness/kb@0.
|
|
291
|
+
bun add --global @hraness/kb@0.19.0
|
|
291
292
|
kb --help
|
|
292
293
|
kb-evaluation-builder --help
|
|
293
294
|
```
|
|
@@ -295,7 +296,7 @@ kb-evaluation-builder --help
|
|
|
295
296
|
The same registry package can be installed with npm:
|
|
296
297
|
|
|
297
298
|
```sh
|
|
298
|
-
npm install --global --ignore-scripts @hraness/kb@0.
|
|
299
|
+
npm install --global --ignore-scripts @hraness/kb@0.19.0
|
|
299
300
|
kb --help
|
|
300
301
|
```
|
|
301
302
|
|
|
@@ -308,7 +309,7 @@ reviewed and enabled; run `kb doctor` to inspect the resulting capabilities.
|
|
|
308
309
|
For programmatic use, add the exact npm version to a Bun project:
|
|
309
310
|
|
|
310
311
|
```sh
|
|
311
|
-
bun add --exact @hraness/kb@0.
|
|
312
|
+
bun add --exact @hraness/kb@0.19.0
|
|
312
313
|
```
|
|
313
314
|
|
|
314
315
|
The resulting dependency should remain exact:
|
|
@@ -316,12 +317,12 @@ The resulting dependency should remain exact:
|
|
|
316
317
|
```json
|
|
317
318
|
{
|
|
318
319
|
"dependencies": {
|
|
319
|
-
"@hraness/kb": "0.
|
|
320
|
+
"@hraness/kb": "0.19.0"
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
```
|
|
323
324
|
|
|
324
|
-
Version 0.
|
|
325
|
+
Version 0.19.0 retains three public GitHub dependencies: `@hraness/oh` at
|
|
325
326
|
immutable release `v0.2.0` for closure verification,
|
|
326
327
|
`@steipete/sweet-cookie` at Hraness release `v0.4.2` for the cookie-scope safety
|
|
327
328
|
fork, and `@tobilu/qmd` at commit
|
|
@@ -507,7 +508,12 @@ Predicates use lower-kebab-case. Local targets use exact vault-root IDs without
|
|
|
507
508
|
`.md`; cross-vault targets use canonical stable `kb://` URIs. `kb graph`, `kb backlinks`, `kb relation list`, and `kb links` derive
|
|
508
509
|
inverse edges and bounded paths without injecting reciprocal or inferred facts into notes.
|
|
509
510
|
`kb percolate` proposes reusable concepts and missing connections with explicit
|
|
510
|
-
support; an agent reviews the cited prose before authoring anything.
|
|
511
|
+
support; an agent reviews the cited prose before authoring anything. In its V2
|
|
512
|
+
result, a missing relationship is an unordered endpoint pair with a required
|
|
513
|
+
predicate, never an executable directed assertion or an automatic
|
|
514
|
+
`related-to`. Common reviewed claims use `synthesizes`, `evidenced-by`,
|
|
515
|
+
`informed-by`, `supersedes`, or `contradicts`; other canonical custom predicates
|
|
516
|
+
remain valid when their meaning is supported.
|
|
511
517
|
|
|
512
518
|
Within a portfolio, a note can target a stable cross-vault identity such as
|
|
513
519
|
`kb://hraness/sleepyland/sound-wellness-expansion`. The target vault must be
|
|
@@ -580,20 +586,98 @@ diffs, and the explicit local job ledger are available from
|
|
|
580
586
|
The repository ships one reusable `kb` Agent Skill under `skills/kb/`. Its
|
|
581
587
|
intent router loads focused references only when a task needs them: querying
|
|
582
588
|
repository context and agent memory, capturing URLs or PDFs, writing durable
|
|
583
|
-
plans, promoting concepts and typed relationships,
|
|
584
|
-
|
|
589
|
+
plans, promoting concepts and typed relationships, refreshing and checking a
|
|
590
|
+
vault, or designing a setup through an interview and approved proposal. An
|
|
591
|
+
approved setup may scaffold a bounded companion skill for a distinct recurring
|
|
592
|
+
ritual. The package smoke test keeps future tagged packages byte-identical to
|
|
585
593
|
that source tree.
|
|
586
594
|
|
|
587
595
|
```sh
|
|
588
|
-
npx skills add hraness/kb#v0.
|
|
596
|
+
npx skills add hraness/kb#v0.19.0
|
|
589
597
|
# or
|
|
590
|
-
bunx skills add hraness/kb#v0.
|
|
598
|
+
bunx skills add hraness/kb#v0.19.0
|
|
591
599
|
```
|
|
592
600
|
|
|
593
601
|
The skill invokes the installed `kb` command without depending on a repository
|
|
594
|
-
checkout.
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
602
|
+
checkout. It routes setup and evolution before runtime preparation. For
|
|
603
|
+
execution workflows, runtime setup installs the pinned CLI only when the
|
|
604
|
+
command is missing, and it never initializes or mutates a vault as an
|
|
605
|
+
installation side effect. The repository's phase-orchestration skill remains
|
|
606
|
+
available to local repository agents but is marked internal, so public skill
|
|
607
|
+
discovery omits it.
|
|
598
608
|
|
|
599
609
|
See [Design](docs/design.md), [Portfolio federation](docs/portfolio.md), [Agent workflow](docs/agent-workflow.md), [PDF capture](docs/pdf.md), and [Contributing](CONTRIBUTING.md) for the durable contracts and development gate. hraness/kb is available under the [MIT License](LICENSE).
|
|
610
|
+
|
|
611
|
+
## Release notes
|
|
612
|
+
|
|
613
|
+
### Upgrade to v0.19.0
|
|
614
|
+
|
|
615
|
+
Version 0.19.0 adds interview-first setup and evolution guidance, a bounded
|
|
616
|
+
filesystem-only companion-skill scaffold contract, and Percolation Result V2.
|
|
617
|
+
V2 requires an explicit predicate and leaves relationship ownership and
|
|
618
|
+
direction to review. The release does not add lifecycle metadata, a resolver,
|
|
619
|
+
a lifecycle CLI, inferred edges, or automatic account and network actions.
|
|
620
|
+
|
|
621
|
+
### Upgrade to v0.18.1
|
|
622
|
+
|
|
623
|
+
Version 0.18.1 restructures the public README and hosted projection around one
|
|
624
|
+
durable note, the exact recovery workflow, inspectable retrieval signals, and
|
|
625
|
+
explicit authority boundaries. Runtime APIs and package behavior are
|
|
626
|
+
unchanged.
|
|
627
|
+
|
|
628
|
+
### Upgrade to v0.18.0
|
|
629
|
+
|
|
630
|
+
Version 0.18.0 adds a review-only adoption seam for exact dependency closures
|
|
631
|
+
from an Oh working authority. Trusted host code creates a
|
|
632
|
+
`createOhAdoptionPreparerV1` facade with the expected binding and head,
|
|
633
|
+
destination, rights clearance, review route, and conflict policy. The narrow
|
|
634
|
+
`prepare` call accepts only a capsule plus transformation and redaction
|
|
635
|
+
disclosures, returns deeply immutable deterministic Markdown and manifest
|
|
636
|
+
bytes with status `prepared`, and has no vault, Git, Oh-store, or promotion
|
|
637
|
+
capability. KB pins `@hraness/oh` v0.2.0 and delegates closure integrity to its
|
|
638
|
+
official store verifier.
|
|
639
|
+
|
|
640
|
+
### Upgrade to v0.17.3
|
|
641
|
+
|
|
642
|
+
Version 0.17.3 restructures the README around an inspectable first task,
|
|
643
|
+
explicit operating boundaries, and a shorter path from installation to useful
|
|
644
|
+
output. Runtime APIs and package behavior are unchanged.
|
|
645
|
+
|
|
646
|
+
### Upgrade to v0.17.2
|
|
647
|
+
|
|
648
|
+
Version 0.17.2 improves package discovery through focused npm keywords, a more
|
|
649
|
+
specific README opening, and direct links between npm, GitHub, and the project
|
|
650
|
+
overview. Runtime APIs and package behavior are unchanged.
|
|
651
|
+
|
|
652
|
+
### Upgrade to v0.17.1
|
|
653
|
+
|
|
654
|
+
Version 0.17.1 adds the public `@hraness/kb` npm installation path without
|
|
655
|
+
changing the runtime API introduced in 0.17.0. Bun `1.3.14` or newer is now an
|
|
656
|
+
explicit package requirement. Consumers should review the package's declared
|
|
657
|
+
dual-use capture boundary and the lifecycle scripts used by optional browser
|
|
658
|
+
and native search adapters before enabling those scripts.
|
|
659
|
+
|
|
660
|
+
### Upgrade to v0.17.0
|
|
661
|
+
|
|
662
|
+
Version 0.17 adds selected portfolio federation, stable note identities,
|
|
663
|
+
qualified external relations, search rules, capture inspection, and untrusted
|
|
664
|
+
context packing. Consumers with typed fixtures or custom capture writers should
|
|
665
|
+
make these migrations before upgrading:
|
|
666
|
+
|
|
667
|
+
- Capture writers now emit manifest schema v4 and must provide the stored
|
|
668
|
+
document `path`, exact UTF-8 `bytes`, and lowercase SHA-256 digest. The reader
|
|
669
|
+
can inspect schema v1-v3, but verification reports their document integrity as
|
|
670
|
+
unavailable instead of success.
|
|
671
|
+
- `DecisionContextOutput.search` has been removed. Consume the bounded untrusted
|
|
672
|
+
`context` projection and its `truncated` flag instead of transporting the raw
|
|
673
|
+
search result into an agent prompt.
|
|
674
|
+
- `VaultAnalysis` fixtures must include `externalAuthoredRelations`, even when
|
|
675
|
+
the value is an empty array. This keeps qualified authored edges distinct
|
|
676
|
+
from locally resolved graph edges.
|
|
677
|
+
- `createNote` and `kb note create` now assign `document_id` to new ordinary
|
|
678
|
+
notes. Preserve that ID across renames and update snapshots that intentionally
|
|
679
|
+
assert the generated frontmatter.
|
|
680
|
+
|
|
681
|
+
Existing Markdown is not rewritten automatically. Add IDs to maintained legacy
|
|
682
|
+
notes only through reviewed edits, and keep every QMD, graph, portfolio, and
|
|
683
|
+
audit projection disposable.
|
package/dist/authoring.js
CHANGED
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
normalizeRelationPredicate,
|
|
14
14
|
noteRevision,
|
|
15
15
|
removeNoteRelation
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-gxr0fctd.js";
|
|
17
17
|
import"./index-3rm7cz6h.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-ekpwvbra.js";
|
|
19
19
|
export {
|
|
20
20
|
removeNoteRelation,
|
|
21
21
|
noteRevision,
|
package/dist/benchmark.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
createSyntheticRankFusionFixture,
|
|
5
5
|
evaluateRanking,
|
|
6
6
|
evaluateRetrievalBenchmark
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-qwgsmtsz.js";
|
|
8
|
+
import"./index-gm9t95d9.js";
|
|
9
9
|
import"./index-d13v9ckt.js";
|
|
10
10
|
import"./index-48pz4jpc.js";
|
|
11
11
|
import"./index-06c9ctr6.js";
|
|
12
12
|
import"./index-5vwpzb5a.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-ekpwvbra.js";
|
|
14
14
|
export {
|
|
15
15
|
evaluateRetrievalBenchmark,
|
|
16
16
|
evaluateRanking,
|
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
loadPortfolioRegistry,
|
|
14
14
|
openKnowledgePortfolio,
|
|
15
15
|
snapshotPortfolioRegistry
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-ey46z1zf.js";
|
|
17
17
|
import {
|
|
18
18
|
diffCaptureBundle
|
|
19
19
|
} from "./index-j4zgmzjr.js";
|
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
MAX_PERCOLATION_NOTES,
|
|
35
35
|
MAX_SCOPED_PERCOLATION_MENTION_PAIRS,
|
|
36
36
|
percolateVault
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-nd6nynv2.js";
|
|
38
38
|
import {
|
|
39
39
|
knowledgeBaseEvaluationRetrieverIds,
|
|
40
40
|
openKnowledgeBaseEvaluation
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-xw9ac71d.js";
|
|
42
42
|
import {
|
|
43
43
|
DEFAULT_SEARCH_RESULTS,
|
|
44
44
|
MAX_SEARCH_CANDIDATES,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
MAX_SEARCH_RELATED_SEEDS,
|
|
47
47
|
MAX_SEARCH_RESULTS,
|
|
48
48
|
openKnowledgeBase
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-vxmf14m1.js";
|
|
50
50
|
import {
|
|
51
51
|
MAX_SEARCH_RULE_CONFIG_BYTES,
|
|
52
52
|
parseSearchRules
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
refreshVault,
|
|
60
60
|
scanVault,
|
|
61
61
|
sha256EmbeddingModelFile
|
|
62
|
-
} from "./index-
|
|
62
|
+
} from "./index-5m2ydj5q.js";
|
|
63
63
|
import"./index-4j3tt0c3.js";
|
|
64
64
|
import"./index-1gwbassd.js";
|
|
65
65
|
import {
|
|
@@ -79,11 +79,11 @@ import {
|
|
|
79
79
|
addNoteRelation,
|
|
80
80
|
createNote,
|
|
81
81
|
removeNoteRelation
|
|
82
|
-
} from "./index-
|
|
82
|
+
} from "./index-gxr0fctd.js";
|
|
83
83
|
import"./index-3rm7cz6h.js";
|
|
84
84
|
import {
|
|
85
85
|
validateSearchQuery
|
|
86
|
-
} from "./index-
|
|
86
|
+
} from "./index-gm9t95d9.js";
|
|
87
87
|
import {
|
|
88
88
|
navigateLinks
|
|
89
89
|
} from "./index-d13v9ckt.js";
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
lookupNote,
|
|
112
112
|
parseVaultKey,
|
|
113
113
|
renderCatalog
|
|
114
|
-
} from "./index-
|
|
114
|
+
} from "./index-ekpwvbra.js";
|
|
115
115
|
import {
|
|
116
116
|
main
|
|
117
117
|
} from "./index-0kavxzqj.js";
|
|
@@ -2885,7 +2885,7 @@ function renderPercolation(result, note) {
|
|
|
2885
2885
|
if (candidate.kind === "missing-concept") {
|
|
2886
2886
|
lines.push(` concept #${safe(candidate.tag)} \u2192 ${safe(candidate.suggestedId)} (${candidate.support} supporting notes)` + (candidate.collidesWith === null ? "" : `; natural ID is occupied by ${safe(candidate.collidesWith)}`));
|
|
2887
2887
|
} else if (candidate.kind === "missing-relation") {
|
|
2888
|
-
lines.push(` relation ${safe(candidate.source)} ${safe(candidate.
|
|
2888
|
+
lines.push(` relation pair {${safe(candidate.source)}, ${safe(candidate.target)}} (predicate required; ${candidate.support} shared signals)`);
|
|
2889
2889
|
} else if (candidate.kind === "unlinked-mention") {
|
|
2890
2890
|
lines.push(` mention ${safe(candidate.source)} \u2192 ${safe(candidate.target)} (${candidate.support})`);
|
|
2891
2891
|
} else {
|
|
@@ -2927,12 +2927,16 @@ async function runPercolate(command, output, dependencies) {
|
|
|
2927
2927
|
minSupport: command.minSupport,
|
|
2928
2928
|
limit: command.limit
|
|
2929
2929
|
});
|
|
2930
|
-
|
|
2930
|
+
const jsonOutput = {
|
|
2931
2931
|
root: snapshot.root,
|
|
2932
2932
|
note: command.note ?? null,
|
|
2933
2933
|
minSupport: command.minSupport,
|
|
2934
|
-
|
|
2935
|
-
|
|
2934
|
+
limit: command.limit,
|
|
2935
|
+
schemaVersion: result.schemaVersion,
|
|
2936
|
+
candidates: result.candidates,
|
|
2937
|
+
truncated: result.truncated
|
|
2938
|
+
};
|
|
2939
|
+
output.stdout(command.json ? terminalSafeJson(jsonOutput) : sanitizeTerminalText(renderPercolation(result, command.note)));
|
|
2936
2940
|
return 0;
|
|
2937
2941
|
}
|
|
2938
2942
|
async function runList(command, output, dependencies) {
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
knowledgeBaseEvaluationRetrieverIds,
|
|
5
5
|
openKnowledgeBaseEvaluation,
|
|
6
6
|
verifyFrozenEvaluationSnapshot
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-xw9ac71d.js";
|
|
8
|
+
import"./index-vxmf14m1.js";
|
|
9
9
|
import"./index-adx6khj5.js";
|
|
10
10
|
import {
|
|
11
11
|
indexSemanticVault,
|
|
12
12
|
recommendedEmbeddingModel,
|
|
13
13
|
recommendedEmbeddingModelSha256,
|
|
14
14
|
scanVault
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-5m2ydj5q.js";
|
|
16
16
|
import"./index-4j3tt0c3.js";
|
|
17
17
|
import {
|
|
18
18
|
runGitCommand
|
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
MAX_EVALUATION_EVIDENCE_BYTES,
|
|
23
23
|
MAX_EVALUATION_RESULTS_PER_QUERY
|
|
24
24
|
} from "./index-b88v3vtm.js";
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-gm9t95d9.js";
|
|
26
26
|
import"./index-d13v9ckt.js";
|
|
27
27
|
import"./index-48pz4jpc.js";
|
|
28
28
|
import"./index-06c9ctr6.js";
|
|
29
29
|
import"./index-5vwpzb5a.js";
|
|
30
|
-
import"./index-
|
|
30
|
+
import"./index-ekpwvbra.js";
|
|
31
31
|
import"./index-1xxnjn0d.js";
|
|
32
32
|
|
|
33
33
|
// src/evaluation-builder.ts
|
package/dist/evaluation-kb.js
CHANGED
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
knowledgeBaseEvaluationRetrieverIds,
|
|
5
5
|
openKnowledgeBaseEvaluation,
|
|
6
6
|
verifyFrozenEvaluationSnapshot
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-xw9ac71d.js";
|
|
8
|
+
import"./index-vxmf14m1.js";
|
|
9
9
|
import"./index-adx6khj5.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-5m2ydj5q.js";
|
|
11
11
|
import"./index-4j3tt0c3.js";
|
|
12
12
|
import"./index-1gwbassd.js";
|
|
13
13
|
import"./index-b88v3vtm.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-gm9t95d9.js";
|
|
15
15
|
import"./index-d13v9ckt.js";
|
|
16
16
|
import"./index-48pz4jpc.js";
|
|
17
17
|
import"./index-06c9ctr6.js";
|
|
18
18
|
import"./index-5vwpzb5a.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-ekpwvbra.js";
|
|
20
20
|
import"./index-1xxnjn0d.js";
|
|
21
21
|
export {
|
|
22
22
|
verifyFrozenEvaluationSnapshot,
|
package/dist/graph.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
catalogEnd,
|
|
10
10
|
catalogStart,
|
|
11
11
|
isCanonicalNoteId,
|
|
12
|
+
isCanonicalRelationPredicate,
|
|
12
13
|
lookupNote,
|
|
13
14
|
metadataValueFromUnknown,
|
|
14
15
|
normalizeVaultPath,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
replaceCatalog,
|
|
18
19
|
searchableMarkdown,
|
|
19
20
|
wikiLinks
|
|
20
|
-
} from "./index-
|
|
21
|
+
} from "./index-ekpwvbra.js";
|
|
21
22
|
export {
|
|
22
23
|
wikiLinks,
|
|
23
24
|
searchableMarkdown,
|
|
@@ -27,6 +28,7 @@ export {
|
|
|
27
28
|
normalizeVaultPath,
|
|
28
29
|
metadataValueFromUnknown,
|
|
29
30
|
lookupNote,
|
|
31
|
+
isCanonicalRelationPredicate,
|
|
30
32
|
isCanonicalNoteId,
|
|
31
33
|
catalogStart,
|
|
32
34
|
catalogEnd,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
fuseRankedCandidates,
|
|
4
4
|
validateSearchQuery
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-gm9t95d9.js";
|
|
6
6
|
import {
|
|
7
7
|
MAX_ANALYZED_NOTES,
|
|
8
8
|
analyzeVault,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
parseNote,
|
|
13
13
|
renderCatalog,
|
|
14
14
|
replaceCatalog
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-ekpwvbra.js";
|
|
16
16
|
|
|
17
17
|
// src/semantic.ts
|
|
18
18
|
import { createHash as createHash2 } from "crypto";
|