@hraness/kb 0.17.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 (200) hide show
  1. package/DISCLOSURE +43 -0
  2. package/LICENSE +21 -0
  3. package/README.md +545 -0
  4. package/dist/agent-context.js +35 -0
  5. package/dist/agent-guide-audit.js +18 -0
  6. package/dist/attachments.js +19 -0
  7. package/dist/authoring.js +33 -0
  8. package/dist/benchmark.js +19 -0
  9. package/dist/capture.js +49 -0
  10. package/dist/cli.js +3646 -0
  11. package/dist/clip/acquire.js +57 -0
  12. package/dist/clip/args.js +21 -0
  13. package/dist/clip/bounded-byte-buffer.js +9 -0
  14. package/dist/clip/browser-profiles.js +17 -0
  15. package/dist/clip/bundle-reader.js +11 -0
  16. package/dist/clip/cli.js +27 -0
  17. package/dist/clip/cookies.js +21 -0
  18. package/dist/clip/defuddle-worker.js +84 -0
  19. package/dist/clip/doctor.js +32 -0
  20. package/dist/clip/jobs.js +784 -0
  21. package/dist/clip/network-proxy.js +9 -0
  22. package/dist/clip/network.js +28 -0
  23. package/dist/clip/persist.js +30 -0
  24. package/dist/clip/refresh.js +11 -0
  25. package/dist/clip/terminal.js +11 -0
  26. package/dist/evaluation-builder.js +12238 -0
  27. package/dist/evaluation-kb.js +26 -0
  28. package/dist/evaluation.js +35 -0
  29. package/dist/git.js +39 -0
  30. package/dist/graph.js +39 -0
  31. package/dist/index-01jj6rbv.js +1103 -0
  32. package/dist/index-06c9ctr6.js +738 -0
  33. package/dist/index-0kavxzqj.js +2480 -0
  34. package/dist/index-1gwbassd.js +743 -0
  35. package/dist/index-1n418kb9.js +827 -0
  36. package/dist/index-1vrd1rmn.js +56 -0
  37. package/dist/index-1xxnjn0d.js +171 -0
  38. package/dist/index-3rm7cz6h.js +373 -0
  39. package/dist/index-3v2z4f0q.js +328 -0
  40. package/dist/index-48pz4jpc.js +392 -0
  41. package/dist/index-4j3tt0c3.js +234 -0
  42. package/dist/index-5n05se68.js +307 -0
  43. package/dist/index-5vwpzb5a.js +764 -0
  44. package/dist/index-6g2pv9d2.js +370 -0
  45. package/dist/index-7fzc32gf.js +712 -0
  46. package/dist/index-84x0vjjp.js +432 -0
  47. package/dist/index-adx6khj5.js +488 -0
  48. package/dist/index-b88v3vtm.js +805 -0
  49. package/dist/index-cv6fh7z5.js +462 -0
  50. package/dist/index-cxfrakt7.js +1067 -0
  51. package/dist/index-d13v9ckt.js +150 -0
  52. package/dist/index-dycjbhw2.js +1943 -0
  53. package/dist/index-dyqwejk5.js +531 -0
  54. package/dist/index-e5fbsywq.js +658 -0
  55. package/dist/index-f984hw45.js +927 -0
  56. package/dist/index-gh719d91.js +63 -0
  57. package/dist/index-hgve9rh2.js +2046 -0
  58. package/dist/index-hya40gb2.js +474 -0
  59. package/dist/index-j4zgmzjr.js +152 -0
  60. package/dist/index-jsmvyyvf.js +1166 -0
  61. package/dist/index-kh0pwvdd.js +1974 -0
  62. package/dist/index-mqx4nd6v.js +119 -0
  63. package/dist/index-mxxxytys.js +1254 -0
  64. package/dist/index-n5dd7r0v.js +711 -0
  65. package/dist/index-npg9z1a4.js +431 -0
  66. package/dist/index-pj501bh1.js +140 -0
  67. package/dist/index-qry4vhxk.js +1041 -0
  68. package/dist/index-s2gw5aw9.js +199 -0
  69. package/dist/index-vvdj6kca.js +70 -0
  70. package/dist/index-w2zc0vwa.js +571 -0
  71. package/dist/index-x3fthpsc.js +585 -0
  72. package/dist/index-zr53sf63.js +44 -0
  73. package/dist/index-zxdy5pby.js +2728 -0
  74. package/dist/index-zzhgcwyt.js +966 -0
  75. package/dist/index.js +453 -0
  76. package/dist/navigation.js +13 -0
  77. package/dist/pdf.js +85 -0
  78. package/dist/percolate.js +24 -0
  79. package/dist/portfolio.js +77 -0
  80. package/dist/query.js +29 -0
  81. package/dist/repository-memory.js +60 -0
  82. package/dist/sdk.js +36 -0
  83. package/dist/search-rules.js +34 -0
  84. package/dist/search.js +22 -0
  85. package/dist/semantic.js +39 -0
  86. package/dist/source-inbox.js +17 -0
  87. package/dist/untrusted-content.js +32 -0
  88. package/dist/url-intelligence.js +74 -0
  89. package/dist/workflow.js +23 -0
  90. package/dist/workflows/decision-context.js +20 -0
  91. package/dist/workflows/explain-change.js +8 -0
  92. package/dist/workflows/index.js +28 -0
  93. package/dist/workflows/plan-radar.js +10 -0
  94. package/package.json +409 -0
  95. package/skills/kb/AGENTS.md +19 -0
  96. package/skills/kb/SKILL.md +82 -0
  97. package/skills/kb/agents/openai.yaml +4 -0
  98. package/skills/kb/references/pdf-review.md +51 -0
  99. package/skills/kb/references/percolate.md +144 -0
  100. package/skills/kb/references/plan-structure.md +105 -0
  101. package/skills/kb/references/plan.md +115 -0
  102. package/skills/kb/references/query.md +231 -0
  103. package/skills/kb/references/refresh.md +133 -0
  104. package/skills/kb/references/save-pdf.md +125 -0
  105. package/skills/kb/references/save-url.md +178 -0
  106. package/skills/kb/references/url-authentication.md +75 -0
  107. package/skills/kb/references/url-platforms.md +25 -0
  108. package/src/agent-context.ts +1241 -0
  109. package/src/agent-guide-audit.ts +750 -0
  110. package/src/attachments.ts +723 -0
  111. package/src/authoring.ts +1725 -0
  112. package/src/benchmark.ts +362 -0
  113. package/src/capture.ts +68 -0
  114. package/src/cli.ts +3660 -0
  115. package/src/clip/acquire.ts +1273 -0
  116. package/src/clip/archive-today.ts +402 -0
  117. package/src/clip/args.ts +423 -0
  118. package/src/clip/assets.ts +262 -0
  119. package/src/clip/bounded-byte-buffer.ts +75 -0
  120. package/src/clip/browser-profiles.ts +372 -0
  121. package/src/clip/bundle-reader.ts +608 -0
  122. package/src/clip/capture.ts +1054 -0
  123. package/src/clip/cli.ts +181 -0
  124. package/src/clip/cookies.ts +512 -0
  125. package/src/clip/doctor.ts +1110 -0
  126. package/src/clip/extract.ts +868 -0
  127. package/src/clip/jobs.ts +959 -0
  128. package/src/clip/lib.ts +861 -0
  129. package/src/clip/media.ts +1474 -0
  130. package/src/clip/metadata-search-tool/Cargo.lock +2498 -0
  131. package/src/clip/metadata-search-tool/Cargo.toml +18 -0
  132. package/src/clip/metadata-search-tool/runner.ts +685 -0
  133. package/src/clip/metadata-search-tool/src/main.rs +389 -0
  134. package/src/clip/metadata-search.ts +687 -0
  135. package/src/clip/network-proxy.ts +627 -0
  136. package/src/clip/network.ts +950 -0
  137. package/src/clip/package-root.ts +54 -0
  138. package/src/clip/persist.ts +1472 -0
  139. package/src/clip/platforms.ts +1824 -0
  140. package/src/clip/refresh.ts +197 -0
  141. package/src/clip/structured.ts +432 -0
  142. package/src/clip/terminal.ts +197 -0
  143. package/src/clip/url-intelligence.ts +581 -0
  144. package/src/clip/url-metadata-backfill.ts +616 -0
  145. package/src/clip/url-metadata-cli.ts +251 -0
  146. package/src/clip/url-metadata.ts +1397 -0
  147. package/src/evaluation-analysis-v2.ts +1440 -0
  148. package/src/evaluation-builder.ts +2539 -0
  149. package/src/evaluation-corpus-authoring.ts +2052 -0
  150. package/src/evaluation-evidence.ts +1147 -0
  151. package/src/evaluation-execution-v2.ts +426 -0
  152. package/src/evaluation-implementation.ts +131 -0
  153. package/src/evaluation-kb-closure.ts +1430 -0
  154. package/src/evaluation-kb-runner-v2.ts +735 -0
  155. package/src/evaluation-kb-v2.ts +2567 -0
  156. package/src/evaluation-kb.ts +1018 -0
  157. package/src/evaluation-measurement-v2.ts +1462 -0
  158. package/src/evaluation-packing-v2.ts +452 -0
  159. package/src/evaluation-redaction.ts +28 -0
  160. package/src/evaluation-v2.ts +3857 -0
  161. package/src/evaluation.ts +1220 -0
  162. package/src/git.ts +1276 -0
  163. package/src/graph.ts +1487 -0
  164. package/src/index.ts +20 -0
  165. package/src/init.ts +123 -0
  166. package/src/navigation.ts +277 -0
  167. package/src/note-lock.ts +529 -0
  168. package/src/pdf/args.ts +202 -0
  169. package/src/pdf/capture.ts +298 -0
  170. package/src/pdf/cli.ts +159 -0
  171. package/src/pdf/extract.ts +303 -0
  172. package/src/pdf/layout.ts +618 -0
  173. package/src/pdf/markdown.ts +154 -0
  174. package/src/pdf/model.ts +234 -0
  175. package/src/pdf/ocr.ts +190 -0
  176. package/src/pdf/persist.ts +314 -0
  177. package/src/pdf/source.ts +135 -0
  178. package/src/pdf/tools.ts +146 -0
  179. package/src/pdf.ts +92 -0
  180. package/src/percolate.ts +877 -0
  181. package/src/portfolio-audit.ts +574 -0
  182. package/src/portfolio-identity.ts +162 -0
  183. package/src/portfolio-registry.ts +473 -0
  184. package/src/portfolio.ts +765 -0
  185. package/src/query.ts +646 -0
  186. package/src/repository-memory.ts +1150 -0
  187. package/src/sdk.ts +1452 -0
  188. package/src/search-rules.ts +712 -0
  189. package/src/search.ts +710 -0
  190. package/src/semantic-runtime.ts +1139 -0
  191. package/src/semantic.ts +2480 -0
  192. package/src/source-inbox.ts +232 -0
  193. package/src/untrusted-content.ts +401 -0
  194. package/src/url-intelligence.ts +104 -0
  195. package/src/vault.ts +636 -0
  196. package/src/workflow.ts +653 -0
  197. package/src/workflows/decision-context.ts +81 -0
  198. package/src/workflows/explain-change.ts +73 -0
  199. package/src/workflows/index.ts +3 -0
  200. package/src/workflows/plan-radar.ts +101 -0
package/package.json ADDED
@@ -0,0 +1,409 @@
1
+ {
2
+ "name": "@hraness/kb",
3
+ "version": "0.17.1",
4
+ "description": "A knowledge base for coding agents, built from Markdown, backlinks, semantic search, and Git context.",
5
+ "license": "MIT",
6
+ "contentPolicy": {
7
+ "class": "dual-use"
8
+ },
9
+ "type": "module",
10
+ "sideEffects": [
11
+ "./src/agent-context.ts",
12
+ "./src/agent-guide-audit.ts",
13
+ "./src/attachments.ts",
14
+ "./src/authoring.ts",
15
+ "./src/benchmark.ts",
16
+ "./src/capture.ts",
17
+ "./src/cli.ts",
18
+ "./src/clip/acquire.ts",
19
+ "./src/clip/args.ts",
20
+ "./src/clip/bounded-byte-buffer.ts",
21
+ "./src/clip/browser-profiles.ts",
22
+ "./src/clip/bundle-reader.ts",
23
+ "./src/clip/cli.ts",
24
+ "./src/clip/cookies.ts",
25
+ "./src/clip/defuddle-worker.ts",
26
+ "./src/clip/doctor.ts",
27
+ "./src/clip/jobs.ts",
28
+ "./src/clip/network-proxy.ts",
29
+ "./src/clip/network.ts",
30
+ "./src/clip/persist.ts",
31
+ "./src/clip/refresh.ts",
32
+ "./src/clip/terminal.ts",
33
+ "./src/evaluation-builder.ts",
34
+ "./src/evaluation-kb.ts",
35
+ "./src/evaluation.ts",
36
+ "./src/git.ts",
37
+ "./src/graph.ts",
38
+ "./src/index.ts",
39
+ "./src/navigation.ts",
40
+ "./src/pdf.ts",
41
+ "./src/percolate.ts",
42
+ "./src/portfolio.ts",
43
+ "./src/portfolio-audit.ts",
44
+ "./src/portfolio-identity.ts",
45
+ "./src/portfolio-registry.ts",
46
+ "./src/query.ts",
47
+ "./src/repository-memory.ts",
48
+ "./src/sdk.ts",
49
+ "./src/search.ts",
50
+ "./src/search-rules.ts",
51
+ "./src/semantic.ts",
52
+ "./src/source-inbox.ts",
53
+ "./src/untrusted-content.ts",
54
+ "./src/url-intelligence.ts",
55
+ "./src/workflow.ts",
56
+ "./src/workflows/decision-context.ts",
57
+ "./src/workflows/explain-change.ts",
58
+ "./src/workflows/index.ts",
59
+ "./src/workflows/plan-radar.ts"
60
+ ],
61
+ "packageManager": "bun@1.3.14",
62
+ "engines": {
63
+ "bun": ">=1.3.14"
64
+ },
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "git+https://github.com/hraness/kb.git"
68
+ },
69
+ "homepage": "https://hraness.com/kb",
70
+ "bugs": {
71
+ "url": "https://github.com/hraness/kb/issues"
72
+ },
73
+ "keywords": [
74
+ "knowledge-base",
75
+ "markdown",
76
+ "obsidian",
77
+ "web-clipper",
78
+ "backlinks",
79
+ "knowledge-graph",
80
+ "semantic-search",
81
+ "agent-memory",
82
+ "agents-md",
83
+ "context-engineering",
84
+ "local-first"
85
+ ],
86
+ "exports": {
87
+ ".": {
88
+ "types": "./src/index.ts",
89
+ "import": "./dist/index.js"
90
+ },
91
+ "./agent-context": {
92
+ "types": "./src/agent-context.ts",
93
+ "import": "./dist/agent-context.js"
94
+ },
95
+ "./agent-guide-audit": {
96
+ "types": "./src/agent-guide-audit.ts",
97
+ "import": "./dist/agent-guide-audit.js"
98
+ },
99
+ "./attachments": {
100
+ "types": "./src/attachments.ts",
101
+ "import": "./dist/attachments.js"
102
+ },
103
+ "./authoring": {
104
+ "types": "./src/authoring.ts",
105
+ "import": "./dist/authoring.js"
106
+ },
107
+ "./benchmark": {
108
+ "types": "./src/benchmark.ts",
109
+ "import": "./dist/benchmark.js"
110
+ },
111
+ "./browser-profiles": {
112
+ "types": "./src/clip/browser-profiles.ts",
113
+ "import": "./dist/clip/browser-profiles.js"
114
+ },
115
+ "./capture": {
116
+ "types": "./src/capture.ts",
117
+ "import": "./dist/capture.js"
118
+ },
119
+ "./cli": {
120
+ "types": "./src/cli.ts",
121
+ "import": "./dist/cli.js"
122
+ },
123
+ "./clip/acquire": {
124
+ "types": "./src/clip/acquire.ts",
125
+ "import": "./dist/clip/acquire.js"
126
+ },
127
+ "./clip/args": {
128
+ "types": "./src/clip/args.ts",
129
+ "import": "./dist/clip/args.js"
130
+ },
131
+ "./clip/bounded-byte-buffer": {
132
+ "types": "./src/clip/bounded-byte-buffer.ts",
133
+ "import": "./dist/clip/bounded-byte-buffer.js"
134
+ },
135
+ "./clip/bundle-reader": {
136
+ "types": "./src/clip/bundle-reader.ts",
137
+ "import": "./dist/clip/bundle-reader.js"
138
+ },
139
+ "./clip/cli": {
140
+ "types": "./src/clip/cli.ts",
141
+ "import": "./dist/clip/cli.js"
142
+ },
143
+ "./clip/cookies": {
144
+ "types": "./src/clip/cookies.ts",
145
+ "import": "./dist/clip/cookies.js"
146
+ },
147
+ "./clip/doctor": {
148
+ "types": "./src/clip/doctor.ts",
149
+ "import": "./dist/clip/doctor.js"
150
+ },
151
+ "./clip/jobs": {
152
+ "types": "./src/clip/jobs.ts",
153
+ "import": "./dist/clip/jobs.js"
154
+ },
155
+ "./clip/network": {
156
+ "types": "./src/clip/network.ts",
157
+ "import": "./dist/clip/network.js"
158
+ },
159
+ "./clip/network-proxy": {
160
+ "types": "./src/clip/network-proxy.ts",
161
+ "import": "./dist/clip/network-proxy.js"
162
+ },
163
+ "./clip/persist": {
164
+ "types": "./src/clip/persist.ts",
165
+ "import": "./dist/clip/persist.js"
166
+ },
167
+ "./clip/refresh": {
168
+ "types": "./src/clip/refresh.ts",
169
+ "import": "./dist/clip/refresh.js"
170
+ },
171
+ "./clip/terminal": {
172
+ "types": "./src/clip/terminal.ts",
173
+ "import": "./dist/clip/terminal.js"
174
+ },
175
+ "./evaluation": {
176
+ "types": "./src/evaluation.ts",
177
+ "import": "./dist/evaluation.js"
178
+ },
179
+ "./evaluation-builder": {
180
+ "types": "./src/evaluation-builder.ts",
181
+ "import": "./dist/evaluation-builder.js"
182
+ },
183
+ "./evaluation-kb": {
184
+ "types": "./src/evaluation-kb.ts",
185
+ "import": "./dist/evaluation-kb.js"
186
+ },
187
+ "./git": {
188
+ "types": "./src/git.ts",
189
+ "import": "./dist/git.js"
190
+ },
191
+ "./graph": {
192
+ "types": "./src/graph.ts",
193
+ "import": "./dist/graph.js"
194
+ },
195
+ "./navigation": {
196
+ "types": "./src/navigation.ts",
197
+ "import": "./dist/navigation.js"
198
+ },
199
+ "./pdf": {
200
+ "types": "./src/pdf.ts",
201
+ "import": "./dist/pdf.js"
202
+ },
203
+ "./percolate": {
204
+ "types": "./src/percolate.ts",
205
+ "import": "./dist/percolate.js"
206
+ },
207
+ "./portfolio": {
208
+ "types": "./src/portfolio.ts",
209
+ "import": "./dist/portfolio.js"
210
+ },
211
+ "./query": {
212
+ "types": "./src/query.ts",
213
+ "import": "./dist/query.js"
214
+ },
215
+ "./repository-memory": {
216
+ "types": "./src/repository-memory.ts",
217
+ "import": "./dist/repository-memory.js"
218
+ },
219
+ "./sdk": {
220
+ "types": "./src/sdk.ts",
221
+ "import": "./dist/sdk.js"
222
+ },
223
+ "./search": {
224
+ "types": "./src/search.ts",
225
+ "import": "./dist/search.js"
226
+ },
227
+ "./search-rules": {
228
+ "types": "./src/search-rules.ts",
229
+ "import": "./dist/search-rules.js"
230
+ },
231
+ "./semantic": {
232
+ "types": "./src/semantic.ts",
233
+ "import": "./dist/semantic.js"
234
+ },
235
+ "./source-inbox": {
236
+ "types": "./src/source-inbox.ts",
237
+ "import": "./dist/source-inbox.js"
238
+ },
239
+ "./untrusted-content": {
240
+ "types": "./src/untrusted-content.ts",
241
+ "import": "./dist/untrusted-content.js"
242
+ },
243
+ "./url-intelligence": {
244
+ "types": "./src/url-intelligence.ts",
245
+ "import": "./dist/url-intelligence.js"
246
+ },
247
+ "./workflow": {
248
+ "types": "./src/workflow.ts",
249
+ "import": "./dist/workflow.js"
250
+ },
251
+ "./workflows": {
252
+ "types": "./src/workflows/index.ts",
253
+ "import": "./dist/workflows/index.js"
254
+ },
255
+ "./workflows/decision-context": {
256
+ "types": "./src/workflows/decision-context.ts",
257
+ "import": "./dist/workflows/decision-context.js"
258
+ },
259
+ "./workflows/explain-change": {
260
+ "types": "./src/workflows/explain-change.ts",
261
+ "import": "./dist/workflows/explain-change.js"
262
+ },
263
+ "./workflows/plan-radar": {
264
+ "types": "./src/workflows/plan-radar.ts",
265
+ "import": "./dist/workflows/plan-radar.js"
266
+ }
267
+ },
268
+ "bin": {
269
+ "kb": "./dist/cli.js",
270
+ "kb-evaluation-builder": "./dist/evaluation-builder.js"
271
+ },
272
+ "main": "./dist/index.js",
273
+ "types": "./src/index.ts",
274
+ "files": [
275
+ "dist",
276
+ "src/agent-context.ts",
277
+ "src/agent-guide-audit.ts",
278
+ "src/authoring.ts",
279
+ "src/attachments.ts",
280
+ "src/benchmark.ts",
281
+ "src/capture.ts",
282
+ "src/url-intelligence.ts",
283
+ "src/cli.ts",
284
+ "src/clip/acquire.ts",
285
+ "src/clip/archive-today.ts",
286
+ "src/clip/args.ts",
287
+ "src/clip/assets.ts",
288
+ "src/clip/bounded-byte-buffer.ts",
289
+ "src/clip/browser-profiles.ts",
290
+ "src/clip/bundle-reader.ts",
291
+ "src/clip/capture.ts",
292
+ "src/clip/cli.ts",
293
+ "src/clip/cookies.ts",
294
+ "src/clip/doctor.ts",
295
+ "src/clip/jobs.ts",
296
+ "src/clip/extract.ts",
297
+ "src/clip/lib.ts",
298
+ "src/clip/media.ts",
299
+ "src/clip/network-proxy.ts",
300
+ "src/clip/network.ts",
301
+ "src/clip/package-root.ts",
302
+ "src/clip/persist.ts",
303
+ "src/clip/refresh.ts",
304
+ "src/clip/platforms.ts",
305
+ "src/clip/structured.ts",
306
+ "src/clip/terminal.ts",
307
+ "src/clip/metadata-search.ts",
308
+ "src/clip/url-intelligence.ts",
309
+ "src/clip/url-metadata.ts",
310
+ "src/clip/url-metadata-backfill.ts",
311
+ "src/clip/url-metadata-cli.ts",
312
+ "src/clip/metadata-search-tool/Cargo.toml",
313
+ "src/clip/metadata-search-tool/Cargo.lock",
314
+ "src/clip/metadata-search-tool/runner.ts",
315
+ "src/clip/metadata-search-tool/src/main.rs",
316
+ "src/git.ts",
317
+ "src/evaluation-analysis-v2.ts",
318
+ "src/evaluation-builder.ts",
319
+ "src/evaluation-corpus-authoring.ts",
320
+ "src/evaluation-evidence.ts",
321
+ "src/evaluation-execution-v2.ts",
322
+ "src/evaluation-implementation.ts",
323
+ "src/evaluation-kb-closure.ts",
324
+ "src/evaluation-kb-runner-v2.ts",
325
+ "src/evaluation-kb-v2.ts",
326
+ "src/evaluation-redaction.ts",
327
+ "src/evaluation-kb.ts",
328
+ "src/evaluation-measurement-v2.ts",
329
+ "src/evaluation-packing-v2.ts",
330
+ "src/evaluation-v2.ts",
331
+ "src/evaluation.ts",
332
+ "src/graph.ts",
333
+ "src/index.ts",
334
+ "src/init.ts",
335
+ "src/navigation.ts",
336
+ "src/note-lock.ts",
337
+ "src/percolate.ts",
338
+ "src/portfolio.ts",
339
+ "src/portfolio-audit.ts",
340
+ "src/portfolio-identity.ts",
341
+ "src/portfolio-registry.ts",
342
+ "src/pdf.ts",
343
+ "src/pdf/args.ts",
344
+ "src/pdf/capture.ts",
345
+ "src/pdf/cli.ts",
346
+ "src/pdf/extract.ts",
347
+ "src/pdf/layout.ts",
348
+ "src/pdf/markdown.ts",
349
+ "src/pdf/model.ts",
350
+ "src/pdf/ocr.ts",
351
+ "src/pdf/persist.ts",
352
+ "src/pdf/source.ts",
353
+ "src/pdf/tools.ts",
354
+ "src/query.ts",
355
+ "src/repository-memory.ts",
356
+ "src/search.ts",
357
+ "src/search-rules.ts",
358
+ "src/semantic-runtime.ts",
359
+ "src/semantic.ts",
360
+ "src/sdk.ts",
361
+ "src/source-inbox.ts",
362
+ "src/untrusted-content.ts",
363
+ "src/vault.ts",
364
+ "src/workflow.ts",
365
+ "src/workflows/decision-context.ts",
366
+ "src/workflows/explain-change.ts",
367
+ "src/workflows/index.ts",
368
+ "src/workflows/plan-radar.ts",
369
+ "skills/kb",
370
+ "README.md",
371
+ "DISCLOSURE",
372
+ "LICENSE"
373
+ ],
374
+ "scripts": {
375
+ "kb:refresh": "bunx --bun github:hraness/kb#v0.15.1 refresh --root kb",
376
+ "kb:check:lane": "bunx --bun github:hraness/kb#v0.15.1 check --root kb --no-catalog",
377
+ "kb:check": "bunx --bun github:hraness/kb#v0.15.1 check --root kb && bunx --bun github:hraness/kb#v0.15.1 agents check --root kb --repo .",
378
+ "kb:catalog": "bunx --bun github:hraness/kb#v0.15.1 catalog --root kb",
379
+ "build": "bun -e 'await (await import(\"node:fs/promises\")).rm(\"./dist\", { recursive: true, force: true })' && bun build ./src/index.ts ./src/agent-context.ts ./src/agent-guide-audit.ts ./src/attachments.ts ./src/authoring.ts ./src/benchmark.ts ./src/clip/browser-profiles.ts ./src/capture.ts ./src/cli.ts ./src/clip/acquire.ts ./src/clip/args.ts ./src/clip/bounded-byte-buffer.ts ./src/clip/bundle-reader.ts ./src/clip/cli.ts ./src/clip/cookies.ts ./src/clip/doctor.ts ./src/clip/jobs.ts ./src/clip/network.ts ./src/clip/network-proxy.ts ./src/clip/persist.ts ./src/clip/refresh.ts ./src/clip/terminal.ts ./src/evaluation.ts ./src/evaluation-builder.ts ./src/evaluation-kb.ts ./src/git.ts ./src/graph.ts ./src/navigation.ts ./src/pdf.ts ./src/percolate.ts ./src/portfolio.ts ./src/query.ts ./src/repository-memory.ts ./src/sdk.ts ./src/search.ts ./src/search-rules.ts ./src/semantic.ts ./src/source-inbox.ts ./src/untrusted-content.ts ./src/url-intelligence.ts ./src/workflow.ts ./src/workflows/index.ts ./src/workflows/decision-context.ts ./src/workflows/explain-change.ts ./src/workflows/plan-radar.ts ./src/clip/defuddle-worker.ts --outdir ./dist --root ./src --target bun --format esm --splitting --packages external",
380
+ "check:workflows": "bun ./scripts/check-workflow-yaml.ts",
381
+ "check:installed-command-docs": "bun ./scripts/check-installed-command-docs.ts",
382
+ "check:portfolio-inventory": "bun ./scripts/check-portfolio-inventory.ts",
383
+ "typecheck": "tsc --noEmit",
384
+ "test": "bun test ./src ./scripts",
385
+ "url-metadata:backfill": "bun ./dist/cli.js url-metadata backfill",
386
+ "url-metadata:tool:build": "bun ./dist/cli.js url-metadata tool build",
387
+ "url-metadata:tool:check": "bun ./dist/cli.js url-metadata tool check",
388
+ "test:package": "bun run ./scripts/package-smoke.ts",
389
+ "check": "bun run check:workflows && bun run check:portfolio-inventory && bun run check:installed-command-docs && bun run typecheck && bun run build && bun run test:package && bun run test && bun run url-metadata:tool:check",
390
+ "prepack": "bun run check"
391
+ },
392
+ "dependencies": {
393
+ "@steipete/sweet-cookie": "github:hraness/sweet-cookie#v0.4.2",
394
+ "@tobilu/qmd": "git+https://github.com/hraness/qmd.git#aa993dceb3ef8cfb71d470554ca437570f5a2b3c",
395
+ "agent-browser": "0.32.3",
396
+ "defuddle": "0.19.1",
397
+ "yaml": "^2.9.0",
398
+ "zod": "^4.4.3"
399
+ },
400
+ "devDependencies": {
401
+ "@types/bun": "^1.3.14",
402
+ "fast-check": "^4.8.0",
403
+ "typescript": "^6.0.3"
404
+ },
405
+ "publishConfig": {
406
+ "access": "public",
407
+ "registry": "https://registry.npmjs.org"
408
+ }
409
+ }
@@ -0,0 +1,19 @@
1
+ # Contents
2
+
3
+ - `SKILL.md` – public entrypoint, runtime contract, and intent router for all hraness/kb agent workflows.
4
+ - `references/query.md` – scoped retrieval through exact metadata, hybrid search, graph structure, and Git provenance.
5
+ - `references/save-url.md`, `url-authentication.md`, and `url-platforms.md` – auditable web capture, signed-in source handling, and platform-specific completeness boundaries.
6
+ - `references/save-pdf.md` and `pdf-review.md` – PDF ingestion, OCR, image evidence, and mixed-media review.
7
+ - `references/plan.md` and `plan-structure.md` – durable plan authoring and its adaptable Markdown contract.
8
+ - `references/percolate.md` and `refresh.md` – evidence-backed graph edits, catalog maintenance, and vault validation.
9
+ - `agents/openai.yaml` – user-facing skill metadata and invocation prompt.
10
+
11
+ # Guidelines
12
+
13
+ - Keep `kb` as the only public skill entrypoint. Preserve substantial workflows as focused references and keep the router compact enough to load by default.
14
+ - Keep discovery language grounded in real user requests for knowledge bases, coding-agent memory, Markdown or Obsidian vaults, source capture, repository context, plans, and knowledge graphs. Exclude generic research, PDF reading, and planning outside hraness/kb.
15
+ - Invoke the installed `kb` CLI without depending on a source checkout. Check for an existing command first, require Bun when installation is needed, and pin installation to the current immutable repository tag.
16
+ - Never initialize or mutate a vault as part of skill or CLI installation.
17
+ - Keep Markdown authoritative. Preserve incomplete source boundaries, read cited evidence before graph edits, and never generate reciprocal, inferred, transitive, or similarity-derived relationships.
18
+ - In parallel managed-catalog work, defer refresh to the integrating agent and use the catalog-skipping check in each edit lane. Authored-catalog refreshes leave the front door unchanged.
19
+ - Update `agents/openai.yaml`, README installation text, package inventory checks, and the pinned CLI tag together when the skill identity or package release changes.
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: kb
3
+ description: >-
4
+ Operate a hraness/kb local-first Markdown knowledge base for coding-agent
5
+ memory. Use when a user asks to search or query a KB or Obsidian vault; load
6
+ repository context, plans, decisions, concepts, backlinks, semantic search,
7
+ or Git provenance; save, clip, scrape, or archive a URL, article, social
8
+ thread, signed-in browser page, or PDF as auditable Markdown; create or
9
+ update a durable plan in the vault; or refresh, check, percolate, and
10
+ maintain its knowledge graph. Do not use for generic web research, generic
11
+ PDF reading, or ordinary planning that will not use a hraness/kb vault.
12
+ ---
13
+
14
+ # Work with KB
15
+
16
+ Use hraness/kb to preserve and retrieve inspectable agent memory in Markdown
17
+ and Git. Select the smallest workflow that matches the request, then load only
18
+ its references.
19
+
20
+ ## Prepare the runtime
21
+
22
+ Use an existing `kb` command when one is available. Do not reinstall or upgrade
23
+ it merely because this skill loaded.
24
+
25
+ If `kb` is missing, check for Bun. Bun is the required runtime. When Bun is
26
+ also missing, install it with the official instructions at
27
+ <https://bun.sh/docs/installation> under the environment's normal approval
28
+ rules, then repeat command discovery. Install KB only while `kb` remains
29
+ missing:
30
+
31
+ ```sh
32
+ command -v kb >/dev/null 2>&1 || {
33
+ command -v bun >/dev/null 2>&1 || exit 1
34
+ bun add --global @hraness/kb@0.17.1
35
+ }
36
+ kb --help
37
+ ```
38
+
39
+ The exact npm version is the immutable release owned by this skill. Do not
40
+ replace it with `latest`, a branch, or an unpinned package source. Both installed
41
+ commands require Bun `1.3.14` or newer in `PATH`. Run `kb doctor` when the
42
+ chosen workflow may need browser capture, media tools, PDF extraction, OCR, or
43
+ local semantic search.
44
+
45
+ Installation ends after command verification. Never run `kb init`, create a
46
+ vault, refresh a catalog, or edit Markdown as an installation side effect.
47
+ Initialize or mutate a vault only when the user's request requires that change.
48
+
49
+ ## Route the request
50
+
51
+ | User intent | Read |
52
+ | --- | --- |
53
+ | Find notes, search one vault or an authorized portfolio, load repository-path context, inspect plans or decisions, follow backlinks or relationships, audit vault organization, or retrieve Git provenance | [Query the knowledge base](references/query.md) |
54
+ | Save, clip, scrape, or archive a URL, article, social post or thread, GitHub or Discourse discussion, signed-in page, feed, inbox, private document, WhatsApp conversation, or YouTube page | [Capture web content](references/save-url.md); add [browser authentication](references/url-authentication.md) for signed-in sources and [platform routing](references/url-platforms.md) when route choice or completeness matters |
55
+ | Import, extract, archive, OCR, or convert a local or public PDF into Markdown | [Save a PDF](references/save-pdf.md); add [PDF image review](references/pdf-review.md) for scans, screenshots, conversations, charts, or mixed media |
56
+ | Create or update an implementation plan, proposal, RFC, migration plan, execution audit, or phased checklist in the vault | [Write a durable plan](references/plan.md) and [use its structure](references/plan-structure.md) |
57
+ | Review recurring ideas, promote concepts, or add and verify typed relationships | [Percolate concepts and relationships](references/percolate.md) |
58
+ | Refresh or validate the catalog, graph, attachments, repository scopes, context mappings, or overall vault health | [Refresh and check the knowledge base](references/refresh.md) |
59
+
60
+ Read more than one primary reference only when the request spans those
61
+ workflows. For example, saving a source and linking it from a maintained note
62
+ uses the capture workflow followed by the relevant percolation and refresh
63
+ steps.
64
+
65
+ ## Preserve the KB contract
66
+
67
+ - Resolve `KB_ROOT` to the existing vault directory that contains its managed
68
+ or authored `index.md`. Read the applicable repository and vault
69
+ `AGENTS.md` files before writing. Do not assume the session started in the
70
+ vault.
71
+ - Treat authored Markdown and Git as the record. Catalogs, backlinks, graph
72
+ reports, search indexes, embeddings, and percolation candidates are derived
73
+ views.
74
+ - Open cited notes and source records before turning search results, tags,
75
+ mentions, or similarity into a conclusion. Author only relationships that
76
+ the source note's prose and evidence support.
77
+ - Keep source capture separate from synthesis. Preserve access, pagination,
78
+ extraction, OCR, and configured-limit failures instead of upgrading partial
79
+ evidence to complete.
80
+ - Follow the selected reference's final checks. In a managed-catalog vault,
81
+ parallel edit lanes use `kb check --root "$KB_ROOT" --no-catalog`; the
82
+ integrating agent performs one refresh and normal check.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "KB"
3
+ short_description: "Query, capture, plan, and maintain Markdown memory"
4
+ default_prompt: "Use $kb to work with this hraness/kb knowledge base and load only the workflow references needed for the request."
@@ -0,0 +1,51 @@
1
+ # Review PDF image-derived text
2
+
3
+ Read this guide when a PDF contains screenshots, scans, or mixed text and
4
+ visual media.
5
+
6
+ ## Keep the source inspectable
7
+
8
+ - Retain every extracted image in `assets/`.
9
+ - Embed primarily visual images.
10
+ - Keep a source-image link beside OCR-derived or manually corrected text.
11
+ - Preserve page number, image index, bounding box, extraction method, and
12
+ confidence in `capture.json`.
13
+ - Never replace a mixed image with text alone. Screenshots can contain a
14
+ message, chart, photograph, code sample, or UI state at the same time.
15
+ - The renderer embeds the source image and adds its metadata and “Text visible
16
+ in…” heading. Annotation `markdown` should contain only the transcription.
17
+
18
+ ## Structure conversations
19
+
20
+ When the surface is recognizable, use available metadata rather than flattening
21
+ the screenshot into one paragraph:
22
+
23
+ ```markdown
24
+ > bg @ Oct 15, 2024 at 4:26 PM
25
+ > Substrate did look very well designed and ambitious from the outside...
26
+ ```
27
+
28
+ Use the platform's visible display name. Include channel, thread, or reply
29
+ context only when the screenshot shows it. Split a multi-message screenshot
30
+ into distinct message blocks, including each visible message author and
31
+ timestamp in that message's Markdown header. Annotation metadata describes
32
+ shared or whole-image context: use its scalar `author` or `timestamp` only when
33
+ one value accurately characterizes the image, and use `participants` for
34
+ multiple visible authors. The generated image embed is the shared source-image
35
+ reference.
36
+
37
+ Do not invent missing authors, dates, channels, or thread relationships. Mark
38
+ uncertain OCR as `[unclear]`; do not silently turn a plausible guess into source
39
+ text.
40
+
41
+ ## Distinguish image roles
42
+
43
+ - `text`: a scan or crop is adequately represented by its prose, code, table,
44
+ or labels, although the source asset is still retained.
45
+ - `visual`: the image remains meaningful without recognized text.
46
+ - `mixed`: both recognized text and non-text visual or spatial context matter.
47
+ Use this for most message and application screenshots because avatars,
48
+ grouping, thread layout, reactions, and UI state can remain evidentiary.
49
+
50
+ When classification is uncertain, choose `mixed`, keep the image visible, and
51
+ preserve the OCR warning.