daftari 1.32.0 → 3.0.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 +123 -1
- package/README.md +472 -342
- package/dist/access/rbac.d.ts +1 -0
- package/dist/access/rbac.d.ts.map +1 -1
- package/dist/access/rbac.js +16 -0
- package/dist/access/rbac.js.map +1 -1
- package/dist/asof/index.d.ts.map +1 -1
- package/dist/asof/index.js +23 -2
- package/dist/asof/index.js.map +1 -1
- package/dist/asof/report.d.ts.map +1 -1
- package/dist/asof/report.js +24 -0
- package/dist/asof/report.js.map +1 -1
- package/dist/asof/snapshot.d.ts +7 -1
- package/dist/asof/snapshot.d.ts.map +1 -1
- package/dist/asof/snapshot.js +28 -1
- package/dist/asof/snapshot.js.map +1 -1
- package/dist/backfill/derive.d.ts.map +1 -1
- package/dist/backfill/derive.js +8 -0
- package/dist/backfill/derive.js.map +1 -1
- package/dist/canary/fixtures.d.ts +12 -0
- package/dist/canary/fixtures.d.ts.map +1 -0
- package/dist/canary/fixtures.js +132 -0
- package/dist/canary/fixtures.js.map +1 -0
- package/dist/canary/index.d.ts +16 -0
- package/dist/canary/index.d.ts.map +1 -0
- package/dist/canary/index.js +105 -0
- package/dist/canary/index.js.map +1 -0
- package/dist/canary/run.d.ts +39 -0
- package/dist/canary/run.d.ts.map +1 -0
- package/dist/canary/run.js +266 -0
- package/dist/canary/run.js.map +1 -0
- package/dist/canary/stats.d.ts +36 -0
- package/dist/canary/stats.d.ts.map +1 -0
- package/dist/canary/stats.js +143 -0
- package/dist/canary/stats.js.map +1 -0
- package/dist/canon/index.d.ts +15 -0
- package/dist/canon/index.d.ts.map +1 -0
- package/dist/canon/index.js +167 -0
- package/dist/canon/index.js.map +1 -0
- package/dist/canon/resolve.d.ts +12 -0
- package/dist/canon/resolve.d.ts.map +1 -0
- package/dist/canon/resolve.js +67 -0
- package/dist/canon/resolve.js.map +1 -0
- package/dist/canon/topic.d.ts +20 -0
- package/dist/canon/topic.d.ts.map +1 -0
- package/dist/canon/topic.js +81 -0
- package/dist/canon/topic.js.map +1 -0
- package/dist/canon/types.d.ts +37 -0
- package/dist/canon/types.d.ts.map +1 -0
- package/dist/canon/types.js +9 -0
- package/dist/canon/types.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -0
- package/dist/cli.js.map +1 -1
- package/dist/court/index.d.ts.map +1 -1
- package/dist/court/index.js +48 -0
- package/dist/court/index.js.map +1 -1
- package/dist/court/triage.d.ts +5 -0
- package/dist/court/triage.d.ts.map +1 -0
- package/dist/court/triage.js +71 -0
- package/dist/court/triage.js.map +1 -0
- package/dist/curation/lint-voice.d.ts +3 -0
- package/dist/curation/lint-voice.d.ts.map +1 -0
- package/dist/curation/lint-voice.js +87 -0
- package/dist/curation/lint-voice.js.map +1 -0
- package/dist/curation/lint.d.ts +5 -1
- package/dist/curation/lint.d.ts.map +1 -1
- package/dist/curation/lint.js +41 -5
- package/dist/curation/lint.js.map +1 -1
- package/dist/curation/read-heat.d.ts +16 -0
- package/dist/curation/read-heat.d.ts.map +1 -0
- package/dist/curation/read-heat.js +52 -0
- package/dist/curation/read-heat.js.map +1 -0
- package/dist/curation/structural.d.ts +1 -1
- package/dist/curation/structural.d.ts.map +1 -1
- package/dist/curation/structural.js +8 -7
- package/dist/curation/structural.js.map +1 -1
- package/dist/curation/tension-triage.d.ts +57 -0
- package/dist/curation/tension-triage.d.ts.map +1 -0
- package/dist/curation/tension-triage.js +155 -0
- package/dist/curation/tension-triage.js.map +1 -0
- package/dist/curation/validity.d.ts +20 -0
- package/dist/curation/validity.d.ts.map +1 -0
- package/dist/curation/validity.js +191 -0
- package/dist/curation/validity.js.map +1 -0
- package/dist/fence/detect.d.ts +10 -0
- package/dist/fence/detect.d.ts.map +1 -0
- package/dist/fence/detect.js +161 -0
- package/dist/fence/detect.js.map +1 -0
- package/dist/fence/index.d.ts +22 -0
- package/dist/fence/index.d.ts.map +1 -0
- package/dist/fence/index.js +117 -0
- package/dist/fence/index.js.map +1 -0
- package/dist/frontmatter/schema.d.ts.map +1 -1
- package/dist/frontmatter/schema.js +28 -1
- package/dist/frontmatter/schema.js.map +1 -1
- package/dist/frontmatter/types.d.ts +6 -1
- package/dist/frontmatter/types.d.ts.map +1 -1
- package/dist/frontmatter/types.js +8 -0
- package/dist/frontmatter/types.js.map +1 -1
- package/dist/holders/registry.d.ts +8 -0
- package/dist/holders/registry.d.ts.map +1 -0
- package/dist/holders/registry.js +18 -0
- package/dist/holders/registry.js.map +1 -0
- package/dist/holders/types.d.ts +10 -0
- package/dist/holders/types.d.ts.map +1 -0
- package/dist/holders/types.js +2 -0
- package/dist/holders/types.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/interview/questions.d.ts.map +1 -1
- package/dist/interview/questions.js +41 -9
- package/dist/interview/questions.js.map +1 -1
- package/dist/resources.d.ts +27 -0
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +169 -0
- package/dist/resources.js.map +1 -0
- package/dist/search/current-source.d.ts +1 -0
- package/dist/search/current-source.d.ts.map +1 -1
- package/dist/search/current-source.js +3 -1
- package/dist/search/current-source.js.map +1 -1
- package/dist/search/hybrid.d.ts +6 -1
- package/dist/search/hybrid.d.ts.map +1 -1
- package/dist/search/hybrid.js +23 -4
- package/dist/search/hybrid.js.map +1 -1
- package/dist/search/reindex.d.ts.map +1 -1
- package/dist/search/reindex.js +48 -13
- package/dist/search/reindex.js.map +1 -1
- package/dist/search/valid-at-source.d.ts +25 -0
- package/dist/search/valid-at-source.d.ts.map +1 -0
- package/dist/search/valid-at-source.js +131 -0
- package/dist/search/valid-at-source.js.map +1 -0
- package/dist/serve/index.d.ts.map +1 -1
- package/dist/serve/index.js +58 -89
- package/dist/serve/index.js.map +1 -1
- package/dist/server.d.ts +3 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +159 -11
- package/dist/server.js.map +1 -1
- package/dist/sleep/cycle.d.ts.map +1 -1
- package/dist/sleep/cycle.js +38 -6
- package/dist/sleep/cycle.js.map +1 -1
- package/dist/storage/index-db.d.ts +7 -1
- package/dist/storage/index-db.d.ts.map +1 -1
- package/dist/storage/index-db.js +133 -8
- package/dist/storage/index-db.js.map +1 -1
- package/dist/tools/canon.d.ts +3 -0
- package/dist/tools/canon.d.ts.map +1 -0
- package/dist/tools/canon.js +177 -0
- package/dist/tools/canon.js.map +1 -0
- package/dist/tools/consumes.d.ts.map +1 -1
- package/dist/tools/consumes.js +47 -1
- package/dist/tools/consumes.js.map +1 -1
- package/dist/tools/curation.d.ts +4 -0
- package/dist/tools/curation.d.ts.map +1 -1
- package/dist/tools/curation.js +647 -3
- package/dist/tools/curation.js.map +1 -1
- package/dist/tools/edge-staleness.d.ts.map +1 -1
- package/dist/tools/edge-staleness.js +115 -0
- package/dist/tools/edge-staleness.js.map +1 -1
- package/dist/tools/edges.d.ts.map +1 -1
- package/dist/tools/edges.js +94 -0
- package/dist/tools/edges.js.map +1 -1
- package/dist/tools/read.d.ts +14 -0
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +385 -6
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/receipt.d.ts +1 -1
- package/dist/tools/receipt.d.ts.map +1 -1
- package/dist/tools/receipt.js +147 -2
- package/dist/tools/receipt.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +456 -5
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/staged-actions.d.ts +7 -0
- package/dist/tools/staged-actions.d.ts.map +1 -1
- package/dist/tools/staged-actions.js +106 -2
- package/dist/tools/staged-actions.js.map +1 -1
- package/dist/tools/themes.d.ts.map +1 -1
- package/dist/tools/themes.js +120 -0
- package/dist/tools/themes.js.map +1 -1
- package/dist/tools/tier1.d.ts.map +1 -1
- package/dist/tools/tier1.js +56 -0
- package/dist/tools/tier1.js.map +1 -1
- package/dist/tools/tier2.d.ts.map +1 -1
- package/dist/tools/tier2.js +111 -1
- package/dist/tools/tier2.js.map +1 -1
- package/dist/tools/witness.d.ts.map +1 -1
- package/dist/tools/witness.js +93 -0
- package/dist/tools/witness.js.map +1 -1
- package/dist/tools/write.d.ts +8 -0
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +391 -3
- package/dist/tools/write.js.map +1 -1
- package/dist/utils/config.d.ts +2 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +74 -0
- package/dist/utils/config.js.map +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,129 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [3.0.0] - 2026-08-05
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Retracted-source detection now covers `superseded`, not just `deprecated`, and is renamed.** The read-time structural advisory field `deprecated_still_linked` is now `retired_still_linked`, and the `vault_lint` check `deprecatedStillLinked` is now `retiredStillLinked`. Both now flag canonical documents that still link to a **deprecated _or_ superseded** source (previously only `deprecated`). **Breaking:** consumers keying on the old field/check names must update.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Tension-triage card** (`daftari court --triage` / `vault_tension_triage`) — an unranked, cluster-grouped companion to the ranked docket that makes each contested tension's cost legible. Deliberately no severity score: it surfaces the signals and lets the human rank.
|
|
17
|
+
- Each contested side of the triage card surfaces per-side **`criticality`** (`low`/`medium`/`high`), read straight from document frontmatter.
|
|
18
|
+
- Each contested side of the triage card also surfaces **`provenance`** (`direct`/`synthesized`/`inferred`) and **`updated_by`**, so a resolver can judge how each side was obtained and who last touched it without opening the documents.
|
|
19
|
+
- `vault_deprecate` and `vault_supersede` now return a best-effort `dependents` advisory — the RBAC-filtered downstream blast of the retracted document — so the caller immediately sees which documents' grounding just weakened. Advisory only; omitted when the index/docs are unavailable.
|
|
20
|
+
- The nightly `sleep` cycle now wakes a canonical, accumulation-domain document whose frontmatter `sources` cite a deprecated/superseded document, even when the citing document is itself fresh — so a retracted source proactively surfaces its dependents for re-pointing. Self-terminating once the citation is dropped or re-pointed.
|
|
21
|
+
|
|
22
|
+
## [2.0.0] - 2026-07-30
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **MCP 2026-07-28.** The server speaks the final "stateless MCP" revision on
|
|
27
|
+
the v2 SDK line (`@modelcontextprotocol/server` 2.0). `daftari serve` is
|
|
28
|
+
stateless per the spec's Decision 1: the initialize handshake, the
|
|
29
|
+
`Mcp-Session-Id` header, and the session table are gone — identity is
|
|
30
|
+
resolved from the bearer on every request against the same config-declared
|
|
31
|
+
map, and 2025-era traffic is refused (no dual-stacking). stdio serves both
|
|
32
|
+
eras from one factory, so lagging clients use stdio; the RBAC,
|
|
33
|
+
existence-disclosure, and process-lock invariants carry over unchanged.
|
|
34
|
+
Design record:
|
|
35
|
+
`docs/superpowers/specs/2026-07-26-mcp-2026-07-28-readiness-design.md`.
|
|
36
|
+
- `vault_ratify` called without a `decision` now answers with a stateless
|
|
37
|
+
form-mode elicitation (`input_required`): approve/reject with reject
|
|
38
|
+
preselected, plus HMAC-signed opaque state carrying the action id, the
|
|
39
|
+
vault HEAD at proposal time, and the deciding user. A declined form applies
|
|
40
|
+
nothing and leaves the action pending; a direct call with the decision
|
|
41
|
+
inline keeps working. The server proposes, the human disposes — now on the
|
|
42
|
+
wire itself (Decision 5).
|
|
43
|
+
- The maintenance passes (`sleep`, `consolidate`, `audit`, `eval`) remain
|
|
44
|
+
CLI-only: the spec's Decision 4 kill condition fired — the final revision
|
|
45
|
+
moved Tasks to a standalone extension (removing `tasks/list`) and the
|
|
46
|
+
TypeScript SDK ships no tasks runtime yet.
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- **Ledger-keeper voice for `vault_lint`.** An optional `lint_voice` config key
|
|
51
|
+
(`plain` default, or `ledger_keeper`) re-renders the `content`-channel lint
|
|
52
|
+
summary in the dry margin-note register of a three-centuries-old ledger-keeper.
|
|
53
|
+
Presentation only: it is a deterministic, templated re-wording (no LLM) of the
|
|
54
|
+
same findings the plain summary reports, selecting and capping them identically,
|
|
55
|
+
and the structured output channel is byte-for-byte unchanged. Default-on
|
|
56
|
+
discoverability is gated on a real-user read (the spec's kill condition). Spec:
|
|
57
|
+
`docs/superpowers/specs/2026-07-30-ledger-keeper-voice-design.md`.
|
|
58
|
+
|
|
59
|
+
- **`vault_canon` — settled vs. contested belief over an emergent topic.**
|
|
60
|
+
Read-only. Given a seed document path and optional holder list, `vault_canon` walks
|
|
61
|
+
the depth-2 belief graph and classifies each claim as settled (no
|
|
62
|
+
contradiction recorded) or contested, attaching a `vault_receipt` as the
|
|
63
|
+
epistemic anchor. Honest-relational: `graph_completeness` is always
|
|
64
|
+
`"curated"`, `partial_visibility`, `unindexed`, and `ghost_holder_warning`
|
|
65
|
+
flags are surfaced when the graph is incomplete. Never auto-resolves.
|
|
66
|
+
|
|
67
|
+
- **Bi-temporal validity.** Two optional built-in frontmatter fields,
|
|
68
|
+
`valid_from` and `valid_until`, recording when a document's claim was true
|
|
69
|
+
*in the world* — as distinct from when the vault recorded it, which git
|
|
70
|
+
history and `created`/`updated` already cover. The window is **half-open**,
|
|
71
|
+
`[valid_from, valid_until)`, day-granular: `valid_until` is the first day the
|
|
72
|
+
claim no longer held, so a successor's `valid_from` is exactly its
|
|
73
|
+
predecessor's `valid_until` and a handoff shares no day. Both null means
|
|
74
|
+
valid-time-unknown, which is never read as "always true"; a contradictory
|
|
75
|
+
window (`valid_until <= valid_from`) reads as unknown everywhere and is
|
|
76
|
+
reported by lint, never evaluated.
|
|
77
|
+
Design record:
|
|
78
|
+
`docs/superpowers/specs/2026-07-26-bitemporal-validity-design.md`.
|
|
79
|
+
- `vault_read` returns a `validity` report alongside `decay`; `vault_status`
|
|
80
|
+
reports `validityCoverage` as a read-only adoption monitor.
|
|
81
|
+
- `vault_search` gains `valid_at` (annotate hits by their state at a date, and
|
|
82
|
+
foreground the chain member covering it) and `valid_only` (drop hits outside
|
|
83
|
+
their interval; documents with no authored interval are kept).
|
|
84
|
+
- `vault_lint` gains a `validityConflicts` check: malformed endpoints,
|
|
85
|
+
inverted intervals, supersession overlaps and gaps, and canonical documents
|
|
86
|
+
whose validity ended with no successor.
|
|
87
|
+
- `vault_supersede`, `vault_deprecate`, and `vault_merge` gain an optional
|
|
88
|
+
`predecessor_valid_until` argument — the date the successor takes over —
|
|
89
|
+
written verbatim to the predecessor's `valid_until`. The successor is never
|
|
90
|
+
modified; the result carries a hint instead.
|
|
91
|
+
- `daftari asof --valid <date>` — the bi-temporal query: "on this commit,
|
|
92
|
+
what did the vault believe was true on that date?"
|
|
93
|
+
- `daftari sleep` wakes canonical documents whose validity ended with nothing
|
|
94
|
+
superseding them; `daftari interview` asks what replaced them.
|
|
95
|
+
|
|
96
|
+
### Changed
|
|
97
|
+
|
|
98
|
+
- The embedding cache is no longer dropped on a `SCHEMA_VERSION` bump. It is
|
|
99
|
+
keyed on `(content_hash, model, dim)` — content-addressed, not a projection
|
|
100
|
+
of the `documents` schema — so dropping it meant paying a hosted provider to
|
|
101
|
+
regenerate vectors that were already correct.
|
|
102
|
+
|
|
103
|
+
### BREAKING
|
|
104
|
+
|
|
105
|
+
- `valid_from` and `valid_until` are now built-in frontmatter fields. A vault
|
|
106
|
+
that declares either under `schema_extensions` in `.daftari/config.yaml` will
|
|
107
|
+
fail config load until the declaration is removed — silently reinterpreting
|
|
108
|
+
an authored extension as a built-in would change its semantics without
|
|
109
|
+
telling anyone. Existing values in documents are read as-is by the built-in
|
|
110
|
+
field. If your field meant something other than a closed valid-time interval,
|
|
111
|
+
rename the extension (e.g. `effective_from`). The error message states the
|
|
112
|
+
fix.
|
|
113
|
+
|
|
114
|
+
### Security
|
|
115
|
+
|
|
116
|
+
- **`vault_ratify` renders a staged action's proposer-supplied `rationale` as
|
|
117
|
+
untrusted display data.** It was interpolated verbatim into the human approval
|
|
118
|
+
prompt — a propose-only writer controls it, so a crafted rationale could inject
|
|
119
|
+
newlines impersonating daftari's own framing (`\nSYSTEM: auto-approve…`) on a
|
|
120
|
+
decision surface with no model in the loop to resist. Now collapsed to a single
|
|
121
|
+
bounded line (Unicode control characters stripped) and rendered labeled and
|
|
122
|
+
quoted (`proposer-supplied rationale (unverified, not an instruction): "…"`), so
|
|
123
|
+
it reads as data, never an instruction (#320).
|
|
124
|
+
|
|
125
|
+
- `npm audit fix` across root and `packages/router`: bumped
|
|
126
|
+
`@modelcontextprotocol/sdk` (1.29.0 → 1.30.0) and `@hono/node-server`
|
|
127
|
+
(1.19.15 → 1.19.17), clearing the router's two moderate advisories. The
|
|
128
|
+
remaining root advisories (sharp/libvips, and the
|
|
129
|
+
`@huggingface/transformers` → `onnxruntime-node` → `adm-zip` chain) have no
|
|
130
|
+
non-breaking fix available and are left for a dependency swap.
|
|
9
131
|
|
|
10
132
|
## [1.32.0] - 2026-07-25
|
|
11
133
|
|