Commit 90f9f96
committed
Export createKnowledgePlane for out-of-band capture and search
The KnowledgePlane type was exported but not its constructor, and the exports
map only allows ".", "./migrations", and "./config" — so there was no way in.
That left mountKnowledgeEngine as the only way to obtain a plane, and it
requires a Hono app and mounts three HTTP routes as a side effect. Any caller
wanting to capture or search outside a request had nowhere to go: CLI seeders,
batch ingesters, tests that exercise capture without standing up an app.
Odd given knowledge.ts advertises the plane as the no-HTTP-hop path ("Wraps the
capture and hybrid-search services directly") — you could only reach it by
going through the thing that adds HTTP.
Exports createKnowledgePlane, KnowledgeError, and the param types. The README
now shows both the in-process case (plane returned from mountKnowledgeEngine)
and the standalone case, and notes that the standalone path bypasses
requireGrant — so a caller acting for a user has to check the capability itself.
Per-document visibility is not a substitute for that.
Refs CL-4508
Claude-Session: https://claude.ai/code/session_017GTgGzn5xAwvkU2GAPAHpF1 parent 8d29d5f commit 90f9f96
2 files changed
Lines changed: 60 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
54 | 99 | | |
55 | 100 | | |
56 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
| |||
0 commit comments