daftari 3.11.0 → 3.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +210 -937
  3. package/dist/access/rbac.d.ts +1 -0
  4. package/dist/access/rbac.d.ts.map +1 -1
  5. package/dist/access/rbac.js +5 -0
  6. package/dist/access/rbac.js.map +1 -1
  7. package/dist/distill/state.d.ts +9 -1
  8. package/dist/distill/state.d.ts.map +1 -1
  9. package/dist/distill/state.js +58 -7
  10. package/dist/distill/state.js.map +1 -1
  11. package/dist/eval/llm-openrouter.d.ts.map +1 -1
  12. package/dist/eval/llm-openrouter.js +5 -22
  13. package/dist/eval/llm-openrouter.js.map +1 -1
  14. package/dist/hooks/loader.d.ts.map +1 -1
  15. package/dist/hooks/loader.js +8 -0
  16. package/dist/hooks/loader.js.map +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +47 -14
  20. package/dist/index.js.map +1 -1
  21. package/dist/integrations/distill.d.ts +16 -0
  22. package/dist/integrations/distill.d.ts.map +1 -0
  23. package/dist/integrations/distill.js +164 -0
  24. package/dist/integrations/distill.js.map +1 -0
  25. package/dist/integrations/engine.d.ts +134 -0
  26. package/dist/integrations/engine.d.ts.map +1 -0
  27. package/dist/integrations/engine.js +571 -0
  28. package/dist/integrations/engine.js.map +1 -0
  29. package/dist/integrations/google.d.ts +13 -0
  30. package/dist/integrations/google.d.ts.map +1 -0
  31. package/dist/integrations/google.js +551 -0
  32. package/dist/integrations/google.js.map +1 -0
  33. package/dist/integrations/notion.d.ts +16 -0
  34. package/dist/integrations/notion.d.ts.map +1 -0
  35. package/dist/integrations/notion.js +485 -0
  36. package/dist/integrations/notion.js.map +1 -0
  37. package/dist/integrations/oauth.d.ts +14 -0
  38. package/dist/integrations/oauth.d.ts.map +1 -0
  39. package/dist/integrations/oauth.js +141 -0
  40. package/dist/integrations/oauth.js.map +1 -0
  41. package/dist/integrations/queue.d.ts +30 -0
  42. package/dist/integrations/queue.d.ts.map +1 -0
  43. package/dist/integrations/queue.js +255 -0
  44. package/dist/integrations/queue.js.map +1 -0
  45. package/dist/integrations/review.d.ts +5 -0
  46. package/dist/integrations/review.d.ts.map +1 -0
  47. package/dist/integrations/review.js +36 -0
  48. package/dist/integrations/review.js.map +1 -0
  49. package/dist/integrations/routes.d.ts +26 -0
  50. package/dist/integrations/routes.d.ts.map +1 -0
  51. package/dist/integrations/routes.js +258 -0
  52. package/dist/integrations/routes.js.map +1 -0
  53. package/dist/integrations/runtime.d.ts +33 -0
  54. package/dist/integrations/runtime.d.ts.map +1 -0
  55. package/dist/integrations/runtime.js +280 -0
  56. package/dist/integrations/runtime.js.map +1 -0
  57. package/dist/integrations/state.d.ts +10 -0
  58. package/dist/integrations/state.d.ts.map +1 -0
  59. package/dist/integrations/state.js +238 -0
  60. package/dist/integrations/state.js.map +1 -0
  61. package/dist/integrations/types.d.ts +45 -0
  62. package/dist/integrations/types.d.ts.map +1 -0
  63. package/dist/integrations/types.js +4 -0
  64. package/dist/integrations/types.js.map +1 -0
  65. package/dist/lifecycle/lock.d.ts.map +1 -1
  66. package/dist/lifecycle/lock.js +15 -1
  67. package/dist/lifecycle/lock.js.map +1 -1
  68. package/dist/resources.js +5 -1
  69. package/dist/resources.js.map +1 -1
  70. package/dist/search/coverage.d.ts.map +1 -1
  71. package/dist/search/coverage.js +5 -5
  72. package/dist/search/coverage.js.map +1 -1
  73. package/dist/search/graph-expansion.d.ts +55 -0
  74. package/dist/search/graph-expansion.d.ts.map +1 -0
  75. package/dist/search/graph-expansion.js +160 -0
  76. package/dist/search/graph-expansion.js.map +1 -0
  77. package/dist/search/hybrid.d.ts +4 -0
  78. package/dist/search/hybrid.d.ts.map +1 -1
  79. package/dist/search/hybrid.js.map +1 -1
  80. package/dist/serve/index.d.ts +16 -0
  81. package/dist/serve/index.d.ts.map +1 -1
  82. package/dist/serve/index.js +325 -18
  83. package/dist/serve/index.js.map +1 -1
  84. package/dist/serve/limits.d.ts +13 -0
  85. package/dist/serve/limits.d.ts.map +1 -1
  86. package/dist/serve/limits.js +47 -0
  87. package/dist/serve/limits.js.map +1 -1
  88. package/dist/serve/proxy-trust.d.ts +19 -0
  89. package/dist/serve/proxy-trust.d.ts.map +1 -0
  90. package/dist/serve/proxy-trust.js +167 -0
  91. package/dist/serve/proxy-trust.js.map +1 -0
  92. package/dist/storage/backends/fs.d.ts.map +1 -1
  93. package/dist/storage/backends/fs.js +13 -0
  94. package/dist/storage/backends/fs.js.map +1 -1
  95. package/dist/storage/sync.d.ts.map +1 -1
  96. package/dist/storage/sync.js +11 -0
  97. package/dist/storage/sync.js.map +1 -1
  98. package/dist/tools/board.test.js +3 -0
  99. package/dist/tools/board.test.js.map +1 -1
  100. package/dist/tools/read.d.ts.map +1 -1
  101. package/dist/tools/read.js +7 -1
  102. package/dist/tools/read.js.map +1 -1
  103. package/dist/tools/search.d.ts.map +1 -1
  104. package/dist/tools/search.js +31 -3
  105. package/dist/tools/search.js.map +1 -1
  106. package/dist/utils/config.d.ts +15 -0
  107. package/dist/utils/config.d.ts.map +1 -1
  108. package/dist/utils/config.js +172 -5
  109. package/dist/utils/config.js.map +1 -1
  110. package/dist/utils/realpath-confine.d.ts +4 -0
  111. package/dist/utils/realpath-confine.d.ts.map +1 -0
  112. package/dist/utils/realpath-confine.js +61 -0
  113. package/dist/utils/realpath-confine.js.map +1 -0
  114. package/dist/utils/vault-gitignore.d.ts +1 -1
  115. package/dist/utils/vault-gitignore.d.ts.map +1 -1
  116. package/dist/utils/vault-gitignore.js +23 -3
  117. package/dist/utils/vault-gitignore.js.map +1 -1
  118. package/package.json +2 -2
  119. package/templates/config.yaml +3 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.12.1] - 2026-08-27
11
+
12
+ ### Security
13
+
14
+ Hardening pass from an internal security audit (advisories GHSA-8896-gmfh-87m5 and a companion advisory covering the serve findings).
15
+
16
+ - **RBAC read gated on the canonical path** — `vault_read` and the `daftari://` resource read now derive the access-control collection from the resolved canonical path, not the caller-supplied path, closing a read-authorization bypass via noncanonical paths.
17
+ - **Backups no longer carry executable hook modules** — vault hook modules are excluded from the sync/backup channel in both directions and the hook loader is realpath-confined, so a poisoned restore cannot deliver code a later write would execute.
18
+ - **Bounded `/mcp` request body** — the request body is capped (`server.limits.max_body_bytes`, default 4 MiB) and read under an absolute deadline before processing, bounding memory/slot exhaustion from oversized or slow bodies.
19
+ - **Trusted-proxy CIDRs** — `X-Forwarded-For` is honored only from configured `server.trusted_proxies` CIDRs, with the client taken from the first non-proxy hop, so a direct client cannot forge their rate-limit/penalty key. **Breaking:** the boolean `server.trust_proxy` is removed — set `server.trusted_proxies` (a CIDR list) instead.
20
+ - **Filesystem storage backend realpath-confined** — the fs backend rejects symlinked path components that escape the vault root.
21
+ - **CI security-review action pinned** — the third-party GitHub Action that holds repository secrets is pinned to a commit SHA.
22
+ - **Penalty box hard cap** — the per-source auth-failure penalty box stays bounded under source-IP churn.
23
+
24
+ ## [3.12.0] - 2026-08-26
25
+
26
+ ### Added
27
+
28
+ - **Continuous Google Docs and Notion distillation** (#490) — a provider-neutral integration engine ingests external documents (Google Docs, Notion) into the distill pipeline on a refresh/webhook contract, with encrypted integration state, validated adapter capabilities, verified webhook result contracts, deduplicated unavailable-source events, and preserved review retries.
29
+ - **Containerized `daftari serve`** (#488) — a multi-stage Dockerfile (native modules built in-image, git for the auto-commit layer, default embedding model baked in for offline cold starts, non-root under `tini`) plus a `.dockerignore` and Azure Container Apps deployment guidance in `docs/deployment.md` (single pinned replica, Azure Files mount with `nobrl` for SQLite over SMB, secrets as env vars). Also fixes a container-specific process-lock footgun: a crash-orphaned lock naming the replacement process's own pid is now treated as stale rather than mistaken for a live holder.
30
+ - **Graph-augmented retrieval** (#453) — `vault_search` can expand results across the belief graph, surfacing documents connected to a hit rather than only lexical/vector matches. Opt-in and default-off, so existing retrieval behavior is unchanged unless enabled.
31
+
32
+ ### Changed
33
+
34
+ - **Outcome-driven README** (#482) — the README is reworked into an outcome-driven front door that leads with what Daftari does for a reader before the mechanics.
35
+ - **Dependency bump** (#484) — the npm-minor-and-patch group is bumped with 5 updates.
36
+
37
+ ### Fixed
38
+
39
+ - **Robust model-JSON parsing** (#486) — `completeJson` in the OpenRouter eval path now parses model JSON robustly instead of failing on well-formed-but-unexpected shapes.
40
+ - **Load-sensitive test suite stabilized under concurrency** (#485, mpn.1) — teardown races and tight timeouts in the concurrency-sensitive suite are fixed, eliminating CI false-reds under load.
41
+
10
42
  ## [3.11.0] - 2026-08-23
11
43
 
12
44
  ### Added