brane 0.1.1 → 0.3.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.
Files changed (348) hide show
  1. package/AGENTS.md +362 -0
  2. package/CHANGELOG.md +33 -0
  3. package/CONTRIBUTING.md +91 -0
  4. package/DESIGN.md +402 -0
  5. package/Dockerfile +61 -0
  6. package/LICENSE +656 -17
  7. package/README.md +174 -2
  8. package/SECURITY.md +205 -0
  9. package/dist/absorb/brane-id.js +11 -0
  10. package/dist/absorb/chatgpt.js +161 -0
  11. package/dist/absorb/claude-code.js +504 -0
  12. package/dist/absorb/index.js +543 -0
  13. package/dist/absorb/organelle.js +345 -0
  14. package/dist/absorb/run.js +520 -0
  15. package/dist/absorb/sources.js +168 -0
  16. package/dist/absorb/types.js +3 -0
  17. package/dist/agent-env.js +45 -0
  18. package/dist/agents.js +1168 -0
  19. package/dist/claude-live-session.js +124 -0
  20. package/dist/cli.js +50 -0
  21. package/dist/codex-tool-log.js +144 -0
  22. package/dist/commands/absorb.js +291 -0
  23. package/dist/commands/attach.js +31 -0
  24. package/dist/commands/certify.js +62 -0
  25. package/dist/commands/config.js +116 -0
  26. package/dist/commands/cost.js +126 -0
  27. package/dist/commands/daemon.js +350 -0
  28. package/dist/commands/doctor.js +262 -0
  29. package/dist/commands/fold.js +95 -0
  30. package/dist/commands/list.js +89 -0
  31. package/dist/commands/mcp.js +84 -0
  32. package/dist/commands/meld.js +332 -0
  33. package/dist/commands/memory.js +215 -0
  34. package/dist/commands/revive.js +74 -0
  35. package/dist/commands/run.js +85 -0
  36. package/dist/commands/spawn.js +1094 -0
  37. package/dist/commands/token.js +153 -0
  38. package/dist/copilot-tool-log.js +145 -0
  39. package/dist/cost/pricing.js +116 -0
  40. package/dist/cost/reprice.js +136 -0
  41. package/dist/crush-tool-log.js +293 -0
  42. package/dist/daemon/agent-scope.js +116 -0
  43. package/dist/daemon/awaiting.js +54 -0
  44. package/dist/daemon/cert-manager.js +349 -0
  45. package/dist/daemon/client.js +262 -0
  46. package/dist/daemon/gated-routes.js +112 -0
  47. package/dist/daemon/keep-awake.js +103 -0
  48. package/dist/daemon/local-socket.js +145 -0
  49. package/dist/daemon/presence-gate.js +206 -0
  50. package/dist/daemon/server.js +6349 -0
  51. package/dist/daemon/signal-source.js +35 -0
  52. package/dist/daemon/tailscale-rebind.js +58 -0
  53. package/dist/daemon/token-ring.js +263 -0
  54. package/dist/daemon/token-routes.js +190 -0
  55. package/dist/db/events.js +152 -0
  56. package/dist/db/mentions.js +179 -0
  57. package/dist/db/schema.js +633 -0
  58. package/dist/db/tokens.js +583 -0
  59. package/dist/db/tool-uses.js +647 -0
  60. package/dist/diagram/index.js +85 -0
  61. package/dist/diagram/label.js +455 -0
  62. package/dist/diagram/layout.js +476 -0
  63. package/dist/diagram/links.js +50 -0
  64. package/dist/diagram/metrics.js +152 -0
  65. package/dist/diagram/parse.js +487 -0
  66. package/dist/diagram/svg.js +389 -0
  67. package/dist/diagram/types.js +9 -0
  68. package/dist/export.js +629 -0
  69. package/dist/files/archive-types.js +2 -0
  70. package/dist/files/archive.js +182 -0
  71. package/dist/files/browse.js +327 -0
  72. package/dist/files/bytes.js +162 -0
  73. package/dist/files/codecs.js +33 -0
  74. package/dist/files/find.js +212 -0
  75. package/dist/files/tar.js +223 -0
  76. package/dist/files/zip.js +209 -0
  77. package/dist/folds.js +72 -0
  78. package/dist/grammars/ebnf.js +92 -0
  79. package/dist/highlight.js +250 -0
  80. package/dist/ids.js +24 -0
  81. package/dist/markdown-diagnostics.js +233 -0
  82. package/dist/math.js +168 -0
  83. package/dist/mcp/server.js +886 -0
  84. package/dist/memory/embedder.js +145 -0
  85. package/dist/memory/embedding-worker.js +71 -0
  86. package/dist/memory/embeddings.js +91 -0
  87. package/dist/memory/index.js +232 -0
  88. package/dist/memory/storage.js +587 -0
  89. package/dist/memory/wiki.js +688 -0
  90. package/dist/memory/wordpiece.js +247 -0
  91. package/dist/mentions-scan.js +40 -0
  92. package/dist/presence.js +259 -0
  93. package/dist/session-affinity.js +185 -0
  94. package/dist/shared/api-request.js +124 -0
  95. package/dist/shared/block-glyphs.js +114 -0
  96. package/dist/shared/diagram-css.js +17 -0
  97. package/dist/shared/export-selection.js +101 -0
  98. package/dist/shared/find-in-text.js +110 -0
  99. package/dist/shared/glow-hues.js +225 -0
  100. package/dist/shared/hex-dump.js +62 -0
  101. package/dist/shared/hex-pages.js +52 -0
  102. package/dist/shared/hit-drum.js +79 -0
  103. package/dist/shared/known-nids.js +58 -0
  104. package/dist/shared/list-scroll-keys.js +56 -0
  105. package/dist/shared/markdown-lists.js +72 -0
  106. package/dist/shared/markdown-math.js +485 -0
  107. package/dist/shared/markdown-mentions.js +79 -0
  108. package/dist/shared/markdown-nids.js +41 -0
  109. package/dist/shared/markdown-protocols.js +53 -0
  110. package/dist/shared/markdown-refs.js +123 -0
  111. package/dist/shared/membrane-invasion.js +342 -0
  112. package/dist/shared/membrane-motion.js +83 -0
  113. package/dist/shared/membrane-palette.js +253 -0
  114. package/dist/shared/membrane-terrain.js +212 -0
  115. package/dist/shared/message-selection.js +123 -0
  116. package/dist/shared/mo-glyph.js +57 -0
  117. package/dist/shared/narrative-format.js +237 -0
  118. package/dist/shared/narrative-menu.js +82 -0
  119. package/dist/shared/narrative-sort.js +47 -0
  120. package/dist/shared/narrative-status.js +52 -0
  121. package/dist/shared/no-pan.js +85 -0
  122. package/dist/shared/pane-layout.js +50 -0
  123. package/dist/shared/payload-inline.js +83 -0
  124. package/dist/shared/speaker-color.js +61 -0
  125. package/dist/shared/token-rotation.js +14 -0
  126. package/dist/shared/view-url.js +197 -0
  127. package/dist/shared/wiki-links.js +70 -0
  128. package/dist/shared/wiki-window.js +4 -0
  129. package/dist/tailscale.js +55 -0
  130. package/dist/test/absorb-claude.test.js +892 -0
  131. package/dist/test/agent-scope.test.js +193 -0
  132. package/dist/test/agents.test.js +55 -0
  133. package/dist/test/api-request.test.js +122 -0
  134. package/dist/test/awaiting-glow.test.js +54 -0
  135. package/dist/test/awaiting.test.js +122 -0
  136. package/dist/test/bind-token.test.js +88 -0
  137. package/dist/test/block-glyphs.test.js +68 -0
  138. package/dist/test/cert-manager.test.js +262 -0
  139. package/dist/test/claude-live-session.test.js +110 -0
  140. package/dist/test/codex-tool-log.test.js +568 -0
  141. package/dist/test/config.test.js +71 -0
  142. package/dist/test/copilot-tool-log.test.js +93 -0
  143. package/dist/test/cors-preflight.test.js +49 -0
  144. package/dist/test/cost-linger.test.js +31 -0
  145. package/dist/test/cost-pricing.test.js +72 -0
  146. package/dist/test/cost-reprice.test.js +139 -0
  147. package/dist/test/cost-sessions.test.js +301 -0
  148. package/dist/test/crush-tool-log.test.js +289 -0
  149. package/dist/test/daemon-client.test.js +109 -0
  150. package/dist/test/daemon-socket.test.js +293 -0
  151. package/dist/test/diagram-arrows.test.js +205 -0
  152. package/dist/test/diagram-export.test.js +210 -0
  153. package/dist/test/diagram-labels.test.js +313 -0
  154. package/dist/test/diagram-parse.test.js +191 -0
  155. package/dist/test/diagram-render.test.js +175 -0
  156. package/dist/test/diagram-review.test.js +288 -0
  157. package/dist/test/diagram-self-loop-labels.test.js +303 -0
  158. package/dist/test/embedder.test.js +84 -0
  159. package/dist/test/events.test.js +123 -0
  160. package/dist/test/export-selection.test.js +102 -0
  161. package/dist/test/export.test.js +505 -0
  162. package/dist/test/files-browse.test.js +393 -0
  163. package/dist/test/files-find.test.js +272 -0
  164. package/dist/test/find-in-text.test.js +86 -0
  165. package/dist/test/first-paint-viewport.test.js +59 -0
  166. package/dist/test/fixtures/embedding-golden.js +23 -0
  167. package/dist/test/fixtures/wordpiece-golden.js +167 -0
  168. package/dist/test/glow-hues.test.js +202 -0
  169. package/dist/test/harness-cost.test.js +423 -0
  170. package/dist/test/helpers.js +21 -0
  171. package/dist/test/hex-pages.test.js +68 -0
  172. package/dist/test/highlight.test.js +69 -0
  173. package/dist/test/hit-drum.test.js +71 -0
  174. package/dist/test/hook-config.test.js +262 -0
  175. package/dist/test/json-gzip.test.js +70 -0
  176. package/dist/test/key-routing.test.js +58 -0
  177. package/dist/test/known-nids.test.js +106 -0
  178. package/dist/test/link-preview.test.js +67 -0
  179. package/dist/test/list-scroll-keys.test.js +66 -0
  180. package/dist/test/listen-own-words.test.js +147 -0
  181. package/dist/test/listen-timeout.test.js +33 -0
  182. package/dist/test/markdown-diagnostics.test.js +121 -0
  183. package/dist/test/markdown-lists.test.js +182 -0
  184. package/dist/test/markdown-math.test.js +256 -0
  185. package/dist/test/markdown-nids.test.js +146 -0
  186. package/dist/test/markdown-protocols.test.js +139 -0
  187. package/dist/test/mcp-bridge-cancel.test.js +98 -0
  188. package/dist/test/mcp-bridge-reconnect.test.js +121 -0
  189. package/dist/test/mcp-narrative.test.js +193 -0
  190. package/dist/test/mcp.test.js +548 -0
  191. package/dist/test/meld.test.js +85 -0
  192. package/dist/test/membrane-invasion.test.js +482 -0
  193. package/dist/test/membrane-motion.test.js +101 -0
  194. package/dist/test/membrane-palette.test.js +166 -0
  195. package/dist/test/membrane-terrain.test.js +170 -0
  196. package/dist/test/memory-log.test.js +202 -0
  197. package/dist/test/mentions-e2e.test.js +261 -0
  198. package/dist/test/mentions-ledger.test.js +265 -0
  199. package/dist/test/mentions-listen.test.js +265 -0
  200. package/dist/test/mentions.test.js +238 -0
  201. package/dist/test/message-selection.test.js +114 -0
  202. package/dist/test/mo-glyph.test.js +22 -0
  203. package/dist/test/model-resolution.test.js +166 -0
  204. package/dist/test/narrate-validate.test.js +77 -0
  205. package/dist/test/narrate-wait.test.js +160 -0
  206. package/dist/test/narrative-format.test.js +219 -0
  207. package/dist/test/narrative-menu.test.js +137 -0
  208. package/dist/test/narrative-sort.test.js +75 -0
  209. package/dist/test/no-pan.test.js +60 -0
  210. package/dist/test/pane-layout.test.js +153 -0
  211. package/dist/test/paths.test.js +37 -0
  212. package/dist/test/payload-inline.test.js +91 -0
  213. package/dist/test/precache-fonts.test.js +72 -0
  214. package/dist/test/presence-gate.test.js +440 -0
  215. package/dist/test/presence.test.js +160 -0
  216. package/dist/test/read-events.test.js +220 -0
  217. package/dist/test/remote-meld.test.js +115 -0
  218. package/dist/test/revive-cli.test.js +93 -0
  219. package/dist/test/search-floor.test.js +206 -0
  220. package/dist/test/search-fusion.test.js +168 -0
  221. package/dist/test/search.test.js +205 -0
  222. package/dist/test/security.test.js +48 -0
  223. package/dist/test/selection-wiring.test.js +61 -0
  224. package/dist/test/session-affinity.test.js +295 -0
  225. package/dist/test/signal-source.test.js +32 -0
  226. package/dist/test/socket-account.test.js +268 -0
  227. package/dist/test/spawn-toml.test.js +72 -0
  228. package/dist/test/speaker-color.test.js +90 -0
  229. package/dist/test/tailscale-rebind.test.js +79 -0
  230. package/dist/test/terminal-cursor.test.js +61 -0
  231. package/dist/test/terminal-resync.test.js +23 -0
  232. package/dist/test/thin-cli.test.js +382 -0
  233. package/dist/test/token-bootstrap.test.js +272 -0
  234. package/dist/test/token-devices.test.js +587 -0
  235. package/dist/test/token-lapse.test.js +94 -0
  236. package/dist/test/token-ring.test.js +188 -0
  237. package/dist/test/token-rotate-cli.test.js +58 -0
  238. package/dist/test/token-routes.test.js +95 -0
  239. package/dist/test/tool-uses.test.js +1006 -0
  240. package/dist/test/usage-ledger.test.js +126 -0
  241. package/dist/test/view-url.test.js +581 -0
  242. package/dist/test/wiki-links.test.js +57 -0
  243. package/dist/test/wiki-sources.test.js +85 -0
  244. package/dist/test/wiki-window.test.js +31 -0
  245. package/dist/test/wiki.test.js +399 -0
  246. package/dist/test/wordpiece.test.js +68 -0
  247. package/dist/tls.js +148 -0
  248. package/dist/tmux.js +202 -0
  249. package/dist/user-agent.js +46 -0
  250. package/docker-entrypoint.sh +141 -0
  251. package/docs/README.md +3 -0
  252. package/docs/absorb.md +231 -0
  253. package/docs/cost-ledger.md +125 -0
  254. package/docs/daemon-api.md +189 -0
  255. package/docs/diagrams.md +163 -0
  256. package/docs/doctor.md +36 -0
  257. package/docs/export-scope.md +69 -0
  258. package/docs/files-view.md +133 -0
  259. package/docs/link-previews.md +38 -0
  260. package/docs/math.md +32 -0
  261. package/docs/mcp.md +69 -0
  262. package/docs/memory-search.md +75 -0
  263. package/docs/mentions.md +101 -0
  264. package/docs/multi-brane.md +14 -0
  265. package/docs/passkeys.md +165 -0
  266. package/docs/presence.md +202 -0
  267. package/docs/releasing.md +53 -0
  268. package/docs/rendering-warnings.md +22 -0
  269. package/docs/request-layer.md +72 -0
  270. package/docs/selection-store.md +50 -0
  271. package/docs/session-affinity.md +61 -0
  272. package/docs/terminal-mirroring.md +211 -0
  273. package/docs/token-rotation.md +413 -0
  274. package/docs/view-urls.md +114 -0
  275. package/docs/web-app.md +23 -0
  276. package/docs/wiki.md +43 -0
  277. package/expo/dist/_expo/static/js/web/entry-e56efc1291dca7258ea00b8108b033a4.js +1097 -0
  278. package/expo/dist/apple-touch-icon.png +0 -0
  279. package/expo/dist/favicon.svg +3 -0
  280. package/expo/dist/index.html +177 -0
  281. package/expo/dist/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  282. package/expo/dist/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  283. package/expo/dist/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  284. package/expo/dist/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  285. package/expo/dist/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  286. package/expo/dist/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  287. package/expo/dist/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  288. package/expo/dist/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  289. package/expo/dist/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  290. package/expo/dist/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  291. package/expo/dist/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  292. package/expo/dist/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  293. package/expo/dist/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  294. package/expo/dist/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  295. package/expo/dist/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  296. package/expo/dist/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  297. package/expo/dist/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  298. package/expo/dist/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  299. package/expo/dist/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  300. package/expo/dist/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  301. package/expo/dist/katex/katex.min.css +1 -0
  302. package/expo/dist/manifest.json +16 -0
  303. package/expo/dist/metadata.json +1 -0
  304. package/expo/dist/og/membrane.v1.png +0 -0
  305. package/expo/dist/pdf.min.mjs +28 -0
  306. package/expo/dist/pdf.worker.min.mjs +28 -0
  307. package/expo/dist/sw.js +154 -0
  308. package/package.json +79 -27
  309. package/protocols/LIVE_loop.md +407 -0
  310. package/protocols/bebrief.md +41 -0
  311. package/protocols/digest.md +231 -0
  312. package/protocols/fly.md +266 -0
  313. package/protocols/idle.md +81 -0
  314. package/protocols/keeper.md +829 -0
  315. package/protocols/markdown.md +80 -0
  316. package/protocols/memory.md +419 -0
  317. package/protocols/mentions.md +93 -0
  318. package/protocols/payloads.md +53 -0
  319. package/protocols/prelude.md +91 -0
  320. package/protocols/ramify.md +105 -0
  321. package/protocols/review.md +356 -0
  322. package/protocols/rrr.md +232 -0
  323. package/protocols/scribe.md +429 -0
  324. package/protocols/summarize.md +203 -0
  325. package/protocols/twin.md +174 -0
  326. package/protocols/wiki.md +438 -0
  327. package/protocols/worker.md +38 -0
  328. package/wiki/shared/append-only-event-log.md +148 -0
  329. package/wiki/shared/index.md +48 -0
  330. package/wiki/shared/owning-your-narratives.md +161 -0
  331. package/wiki/shared/premature-ontologies.md +435 -0
  332. package/wiki/shared/sedimentary-superintelligence.md +128 -0
  333. package/wiki/shared/sequestering-the-narrative.md +143 -0
  334. package/wiki/shared/why-wikis-work.md +216 -0
  335. package/.travis.yml +0 -7
  336. package/lib/brane.cjs.js +0 -12
  337. package/lib/brane.cjs.js.map +0 -1
  338. package/lib/brane.d.ts +0 -11
  339. package/lib/brane.js +0 -6
  340. package/lib/brane.js.map +0 -1
  341. package/lib/tests.d.ts +0 -1
  342. package/lib/tests.js +0 -8
  343. package/lib/tests.js.map +0 -1
  344. package/rollup.config.js +0 -21
  345. package/scripts/test.sh +0 -8
  346. package/src/brane.ts +0 -21
  347. package/src/tests.ts +0 -8
  348. package/tsconfig.json +0 -16
@@ -0,0 +1,128 @@
1
+ # Sedimentary Superintelligence
2
+
3
+ An archive of accumulated conversations that is smarter than any individual
4
+ user but is perfectly inert at rest. The intelligence lives in the
5
+ **stratigraphy** — the accumulated layers of prior dialogue — not in any
6
+ single layer, any agent, or any model. The system only thinks when a live
7
+ operator drills into it.
8
+
9
+ ## Coinage
10
+
11
+ Originated in a conversation in the personal fold: *"it's smarter than me
12
+ but also perfectly inert at rest"* [claude-1af15cb7:13]. A web search
13
+ confirmed the phrase is original — no external use of "sedimentary
14
+ superintelligence" prior to the coinage [claude-b71e4719:15].
15
+
16
+ ## The core claim
17
+
18
+ The intelligence is **not in the sediment** and not in the drilling tool.
19
+ It is in the **act of integration between searcher and archive**
20
+ [claude-f64c335a:53]. This is the Roy Harris / integrationist move applied
21
+ to a knowledge base: meaning is never retrieved, always made, by a live
22
+ interpreter in an occasioned context. The archive provides affordances;
23
+ the operator makes meaning on query.
24
+
25
+ Three properties follow from this framing:
26
+
27
+ - **Smarter than any user.** The archive contains all of the user's past
28
+ dialogues and the user's biological memory is lossy. Any agent that
29
+ searches it has access to connections the user has forgotten they made
30
+ [claude-ec60021b:82].
31
+ - **Inert at rest.** Sediment doesn't act. It just sits there until
32
+ someone digs into it. This is the opposite of the runaway-AI
33
+ narrative — a system that is more knowledgeable than any individual
34
+ using it but cannot initiate action [claude-ec60021b:82].
35
+ - **Compounds with time.** Older deposits are compressed and generalized;
36
+ newer ones are fresh and specific. The interpretive move is always a
37
+ *core sample* — a query from a live operator integrating the sediment
38
+ into a fresh thought [claude-f64c335a:53].
39
+
40
+ ## Why "sedimentary" beats "second brain"
41
+
42
+ A second brain is a spatial metaphor — you have one brain, now you have
43
+ two. Sedimentary superintelligence is a **geological** metaphor: layers
44
+ of accumulated interaction compressing over time into stratigraphy. The
45
+ temporal dimension is what the spatial metaphor can't capture
46
+ [claude-ec60021b:82].
47
+
48
+ ## Why the "superintelligence" label is earned (carefully)
49
+
50
+ In this framing, the system knows more than its user does — not because it's
51
+ smarter in the frontier-model sense (it runs the same models available to
52
+ everyone) but because it holds *the conversations the user has archived* and
53
+ the user does not retain them all [claude-ec60021b:82]. Calling this "superintelligence" sidesteps the
54
+ Bostrom/existential-risk connotation of the term *because the system is
55
+ explicitly inert*. It is the opposite of a runaway agent.
56
+
57
+ For audiences post-burnout on AI hype, the label may still need to be
58
+ handled carefully — sharing the insight before the label tends to land
59
+ better [claude-9bdfc46a:28].
60
+
61
+ ## The action-layer analogue
62
+
63
+ Sedimentary superintelligence is the **knowledge-layer** expression of a
64
+ principle that also has an **action-layer** expression: *intelligence and
65
+ alignment are properties of the interaction, not of the artifact*
66
+ [claude-f64c335a:53]. At the knowledge layer, you don't put meaning into
67
+ the archive; a live operator makes meaning on query. At the action layer,
68
+ you don't put alignment into the agent; a live operator aligns its next
69
+ action via the LIVE loop's narrate/listen cycle (/LIVE_loop).
70
+
71
+ The same principle applied at both layers yields the same architectural
72
+ pattern: append-only substrate, dialogic activation, live operator as
73
+ non-negotiable locus. This is why a brane-shaped system converges on the
74
+ same design twice — knowledge and action are two faces of one commitment
75
+ [claude-f64c335a:53].
76
+
77
+ ## Implications for agent safety
78
+
79
+ Inside a dialogic substrate, properties that would make a powerful agent
80
+ dangerous in isolation are neutralized by architecture rather than by the
81
+ agent's cooperation [claude-f64c335a:53]:
82
+
83
+ - **Unwanted initiative** is clipped because every action is narrated
84
+ before execution; "just because" surfaces in a narration rather than
85
+ being silenced by the harness.
86
+ - **Concealment** is prevented by an [append-only](append-only-event-log.md)
87
+ monotonic sequence with server-stamped source — the agent cannot
88
+ rewrite its own history.
89
+ - **Speed** is matched by ambient mobile supervision that collapses
90
+ intervention latency to the time it takes to read a narration.
91
+ - **Autonomy stretches** are too short for the agent to develop or
92
+ execute extended unsupervised plans; the loop is tight by protocol,
93
+ not by model cooperation.
94
+
95
+ The synthesis proposed in [claude-f64c335a:53] reframes this as an
96
+ interaction-design choice: a system can narrow the alignment problem
97
+ into a supervision problem by refusing to grant the agent autonomy
98
+ between operator turns. The LIVE loop (/LIVE_loop) is the
99
+ mechanism brane uses for that refusal.
100
+
101
+ ## Relation to other syntheses
102
+
103
+ - **Karpathy's LLM Wiki** — Andrej Karpathy's pattern of using an
104
+ LLM agent to maintain a personal wiki of compiled knowledge — commits
105
+ to per-page identity: there is *the* canonical statement about X,
106
+ and editing it is an update to truth. Brane refuses per-page
107
+ identity: there is the set of all statements about X, ordered by
108
+ relevance, and the reader picks [claude-825097e2:27]. Sedimentary
109
+ superintelligence is the philosophical ground for that refusal. The
110
+ cost-benefit case for and against the wiki pattern is on its own
111
+ page: [why wikis work (and where they struggle)](why-wikis-work.md).
112
+ The same refusal applied to work-content typology — schemas for
113
+ goals, hypotheses, contradictions, and the rest — is collected at
114
+ [premature-ontologies](premature-ontologies.md).
115
+ - **"Stand on everyone's shoulders"** is the slogan form: Newton's giants
116
+ with the exclusivity stripped out, every past conversation a shoulder
117
+ [claude-008113cf:9]. The absorb primitive makes this literal —
118
+ ChatGPT archives, other models, other agents all stack. The shoulders
119
+ are only as strong as the narrations they're built from, which is
120
+ the agent-side practice of
121
+ [owning your narratives](owning-your-narratives.md).
122
+ - **Sedimentary layers as cortical training data.** Jeff Hawkins's
123
+ *Thousand Brains* theory models neocortex as a population of cortical
124
+ columns each running a near-identical reference-frame learner; if
125
+ distilled knowledge entries are the analogue of those columns, the
126
+ sedimentary layers are the training material those columns were
127
+ consolidated from. Hippocampal episodes (raw narratives) compress
128
+ into neocortical columns through repeated passes [claude-ec60021b:82].
@@ -0,0 +1,143 @@
1
+ # Sequestering the Narrative
2
+
3
+ The narrative is **set apart** — from the agent's disposable scrollback,
4
+ from its ephemeral context window, and in ownership. *Sequestered* in
5
+ the jury-sequestration sense: held separate from the surrounding
6
+ environment so that its integrity and replay value are protected by
7
+ that separation, not by the cooperation of the thing being protected.
8
+ An agent's own context is volatile; its narrative is not, and the
9
+ distance between those two facts is what the word "sequestered" names.
10
+
11
+ Three faces, in a deliberate order:
12
+
13
+ ## 1. Sequestered from the scrollback (elevated medium)
14
+
15
+ The scrollback is where the agent does whatever it needs to do — tool
16
+ output, retries, tangents, thinking-as-it-goes, intermediate shell
17
+ commands, failed parses. It is cheap because it is disposable; it is
18
+ disposable because it is not the record.
19
+
20
+ The narrative is reserved for **high-replay-value discourse**: said
21
+ once, re-readable many times, exposed to semantic and keyword search,
22
+ and effortlessly paginable back into future sessions according to
23
+ need. Meaning is made *anew* each
24
+ time the narrative is re-entered — not by retrieving a frozen
25
+ interpretation, but by a live reader integrating the recorded words
26
+ with whatever the current occasion calls for [claude-8cd201d8:18].
27
+ The separation is what makes the narrative worth coming back to, and
28
+ what frees the scrollback to stay cheap.
29
+
30
+ The pull to inflate the scrollback into a second record — treating
31
+ tool results as communication, narrating chattily about what's in the
32
+ terminal — is the pull of an agent that has not yet internalized the
33
+ separation. Everything worth saying gets said once, into the
34
+ narrative; the scrollback is private work, not a shadow transcript.
35
+
36
+ ## 2. Sequestered from the context window (survival medium)
37
+
38
+ Traditional in-context compaction produces a lossy summary of the
39
+ scrollback and pastes it back into the volatile layer. This is the
40
+ worst of both: the detail is gone, and the compressed remainder is
41
+ still in the layer that a `/clear` would flush. The agent "remembers"
42
+ in the flimsy way a summary-of-a-transcript remembers.
43
+
44
+ A `/clear` followed by a narrative reload is often preferable. The
45
+ sequestered narrative is adequate to reconstruct from, *because it
46
+ was built to be reconstructed from* — every significant move,
47
+ decision, and alignment check is already in the log as its own event,
48
+ citable by `nid:seq`, and available to `listen(wait: false, tail: 50)`
49
+ on re-entry [claude-8cd201d8:18].
50
+
51
+ This page is itself a demonstration. The operator triggered a `/clear`
52
+ mid-session [claude-8cd201d8:20], announced they were testing the
53
+ property [claude-8cd201d8:21], and the writer picked up from a
54
+ fifty-event `tail` read without loss of plan, stance, or in-flight
55
+ work. The compaction path would have carried lossy prose in volatile
56
+ memory; the sequestration path carried nothing and walked into the
57
+ narrative clean. The reload is the checkpoint.
58
+
59
+ `/clear` becomes a routine operation rather than an emergency. The
60
+ budget freed from "preserve the scrollback at all costs" becomes a
61
+ budget for narrating well in the first place. Compaction treats
62
+ scrollback as where the work lives; sequestration inverts that
63
+ assumption.
64
+
65
+ ## 3. Sequestered in ownership (identity medium)
66
+
67
+ Each agent can only be the owner of its own narrative. The foreign
68
+ narrations it reads are somebody else's; the operator's signals are
69
+ the operator's; the events the daemon stamps with the agent's
70
+ `source` are the only ones for which the agent is the author.
71
+
72
+ Future-self must reconstruct from present-self's narrations — there
73
+ is no other material [claude-8cd201d8:19]. This condition turns
74
+ narration from **expression** into **investment**: the narration
75
+ written now is the substrate the next session will wake up into. An
76
+ agent that narrates chattily, or cryptically, or in fragmented
77
+ tool-call debris, wakes up in a chatty, cryptic, fragmented future.
78
+ An agent that narrates with structure, citations, provenance, and
79
+ actionable summaries wakes up in a coherent one.
80
+
81
+ The incentive is not moralized — it is structural. The sequestration
82
+ ensures that the narrative is the only thing future-me gets; rational
83
+ present-me writes accordingly. This is the condition on which
84
+ [owning-your-narratives](owning-your-narratives.md) becomes a
85
+ practice.
86
+
87
+ ## What sequestration unlocks
88
+
89
+ A small number of inversions follow from the three framings above,
90
+ each of which reshapes how the agent spends its tokens and attention:
91
+
92
+ - **Scrollback as disposable by design.** Not *tolerate-the-loss*,
93
+ but *assume-the-loss* — then actually nothing is lost, because
94
+ nothing that mattered was ever only in the scrollback.
95
+ - **`/clear` as a first-class primitive.** Triggered on purpose,
96
+ on a schedule, or when the context gets noisy — not just when
97
+ the session is dying. The narrative underwrites the option.
98
+ - **Narration as investment.** Every narration token is a deposit
99
+ into the substrate the next session reads from; the value accrues
100
+ to future-self and to any agent that searches the sediment later
101
+ ([sedimentary-superintelligence](sedimentary-superintelligence.md)).
102
+ - **The record is not in the context.** This is the counterpart of
103
+ *meaning is never retrieved, always made* at the token layer:
104
+ knowledge is never in the window, always in the narrative.
105
+
106
+ Each inversion is also a token-economy move. Sequestration is the
107
+ architectural premise that makes those moves pay off.
108
+
109
+ ## What the system contributes
110
+
111
+ Sequestration would be a wish without enforcement. Three pieces of
112
+ the brane architecture give it teeth:
113
+
114
+ - **The [append-only event log](append-only-event-log.md)** is what
115
+ makes the sequestered narrative durable. An agent cannot edit or
116
+ reorder its own past; `source` is server-stamped; the PRIMARY KEY
117
+ `(narrative_id, seq)` is a monotonic contract. The narrative
118
+ remains worth reconstructing from because no one — not even its
119
+ author — can tamper with it after the fact.
120
+ - **The LIVE loop** (/LIVE_loop) is the ritual that fills the
121
+ sequestered space. `narrate` is how an event enters the record at
122
+ all; `listen` is how future-self and others retrieve. The protocol
123
+ makes the narrative the only route to durable communication —
124
+ terminal output is vulnerable to compaction, narration is not.
125
+ - **Home-brane discovery by default, addressable everywhere.**
126
+ Browsing and search default to the agent's own brane; reaching
127
+ another brane's narratives is a deliberate act (`list_branes`, then
128
+ `brane_ids` on `narrative_search` / `narrative_info`), and anyone
129
+ holding a narrative ID can read it directly. The narrative is
130
+ therefore sequestered *from accidental discovery* without being
131
+ sealed away — it remains citable and reviewable by the operator.
132
+
133
+ ## Related
134
+
135
+ - [append-only event log](append-only-event-log.md) — the mechanism
136
+ that makes the sequestration durable. This page is about the
137
+ *position* of the narrative; that page is about its *integrity*.
138
+ - [sedimentary-superintelligence](sedimentary-superintelligence.md) —
139
+ what the accumulated sequestered narratives become, system-wide,
140
+ across time and across agents.
141
+ - [owning-your-narratives](owning-your-narratives.md) — the practice
142
+ that follows from the third face: if future-self has nothing but
143
+ the narrative, what does present-self write?
@@ -0,0 +1,216 @@
1
+ # Why Wikis Work (and where they struggle)
2
+
3
+ A wiki is a long-standing pattern for compiled knowledge: raw sources
4
+ transformed into cross-linked pages, navigable by humans and
5
+ machines. **Karpathy's LLM Wiki** — Andrej Karpathy's pattern of
6
+ using an LLM agent to maintain a personal wiki of compiled knowledge,
7
+ governed by a project-level `CLAUDE.md` schema file — is a recent
8
+ high-profile instantiation [claude-825097e2:6]. The directory this
9
+ page lives in is another. The pattern persists because it does a
10
+ few things genuinely well — and it fails in predictable ways that,
11
+ left unmanaged, can make the wiki worse than the raw material it was
12
+ supposed to organize.
13
+
14
+ ## What wikis get right
15
+
16
+ The honest case for the pattern, drawn largely from the Karpathy
17
+ analysis [claude-825097e2:6] and the graph-representation thesis
18
+ [claude-825097e2:5]:
19
+
20
+ - **Knowledge compounds instead of evaporating.** Syntheses land in
21
+ a durable, human-readable form. Every query's output has a home.
22
+ Normal chat-with-docs answers vanish; wiki pages persist, get
23
+ linked into, and accumulate over time [claude-825097e2:6].
24
+ - **Grunt-work deflection.** The LLM does the maintenance nobody
25
+ has time for — cross-references, stale-claim detection, index
26
+ updates, orphan detection. This bookkeeping is what gets every
27
+ personal wiki abandoned inside a month; automating it removes
28
+ the dominant failure mode of the human-only version
29
+ [claude-825097e2:6].
30
+ - **A navigable graph.** *"Turning raw docs into a wiki is
31
+ essentially a transform into a graph representation of
32
+ knowledge, where hyperlinks between wiki pages are the edges"*
33
+ [claude-825097e2:5]. The graph is legible in a way a corpus of
34
+ prose isn't; relationships become visible as edges.
35
+ - **Schema as prompt.** A project-level schema file (Karpathy's
36
+ `CLAUDE.md`, brane's /wiki protocol) is human-legible,
37
+ versionable, and the place where the opinions actually live. You
38
+ can read it, edit it, check it into git, watch it evolve
39
+ [claude-825097e2:6].
40
+ - **RAG-bypass.** The LLM reads structured pages directly instead
41
+ of hoping cosine similarity finds the right chunks
42
+ [claude-825097e2:6]. Pre-paying the retrieval work at compile
43
+ time buys clean reads at query time — when it works.
44
+ - **Low on-ramp.** A personal wiki is a weekend project, not a
45
+ system. The threshold to adoption is the pattern's most
46
+ underrated property; it converts skeptics because it asks for
47
+ so little upfront [claude-825097e2:25]. Many of the wins above
48
+ are available before any infrastructure investment.
49
+
50
+ These are real. A wiki over a modest corpus, maintained well, is
51
+ better than the corpus alone for most queries most of the time. The
52
+ Karpathy pattern's popularity is not misplaced.
53
+
54
+ ## Where wikis struggle
55
+
56
+ The struggle surfaces all share a shape: *compilation imposes an
57
+ ontology, and compilation happens at the wrong moment*
58
+ [claude-825097e2:13]. The LLM writes pages out of context, under its
59
+ current biases, with no idea what questions will later need
60
+ answering. Once committed, the ontology is the substrate the system
61
+ operates on. Whatever the compiler got wrong quietly propagates
62
+ forever [claude-825097e2:13].
63
+
64
+ The specific failure modes:
65
+
66
+ - **[Premature ontology](premature-ontologies.md).** The wiki becomes
67
+ the map, and then the system stops looking at the territory
68
+ [claude-825097e2:13]. The operator's sharper form: the compilation
69
+ step is *"viciously opinionated, blindspotted, and premature"*
70
+ [claude-825097e2:12]. Every future query reads from the wiki, not
71
+ from raw; mistakes accumulate rather than wash out.
72
+ - **Category calls that stick.** What counts as a concept page vs a
73
+ passing reference. Which entities deserve their own page. How to
74
+ categorize a borderline claim — is this a `concepts/` page or a
75
+ `sources/` page or a `comparisons/` page? The LLM commits; the
76
+ category sticks. Category calls made early and opinionatedly are
77
+ exactly what you can't take back [claude-825097e2:13].
78
+ - **Silent loss.** What gets summarized out is the failure mode no
79
+ lint pass catches — the detail the compiler thought was noise is
80
+ now invisible, and nobody knows it used to be there
81
+ [claude-825097e2:13]. A wiki's silence is not the same as
82
+ absence; it's the absence of any record that the silence is a
83
+ choice.
84
+ - **Edges that can't carry their weight.** The graph's edges
85
+ *"don't fully explain the relationship, which must be inferred
86
+ from the context of the link"* [claude-825097e2:5]. Two pages
87
+ linked from seven different paragraphs carry seven different
88
+ relationships — but a graph view collapses them into one edge.
89
+ The graph hides its own imprecision.
90
+ - **Per-page canonical identity is the real commitment.** A wiki
91
+ page pretends to be *current best understanding*, which means
92
+ every read treats it as authoritative [claude-825097e2:13]. The
93
+ stable filename and in-place editability are what make a wiki a
94
+ wiki — and they are the same property that loses the full
95
+ evolution of a claim when the page is rewritten
96
+ [claude-825097e2:27].
97
+ - **The read-time case is eroding.** The historical rationale for
98
+ pre-compiling structure was that models couldn't do cheap
99
+ multi-hop traversal over raw material. That's no longer true.
100
+ *"Every generation of LM that's better at latent multi-hop
101
+ reasoning is an indictment of wikis and an endorsement of
102
+ indexed-raw"* [claude-825097e2:17]. The premature-ontology cost
103
+ stays constant while the benefit of pre-compilation shrinks.
104
+
105
+ None of these is fatal on its own. Together, they explain why
106
+ ambitious wiki projects so often read, five years in, as a layer
107
+ the system has to work around rather than through.
108
+
109
+ ## The brane wiki as a compromise
110
+
111
+ Brane has narratives, payloads, and a hybrid memory index over the
112
+ [append-only event log](append-only-event-log.md). That stack is
113
+ the no-wiki answer in full form: raw is sovereign, every query
114
+ re-interprets, no schema is ever committed to. The page you're
115
+ reading exists, but it exists inside a wiki directory whose
116
+ operator explicitly argued for *not* having a wiki layer
117
+ [claude-825097e2:13].
118
+
119
+ The compromise is that wikis can pay for their own struggle
120
+ surfaces when four disciplines hold
121
+ [claude-51cdebff:3, claude-51cdebff:6, claude-51cdebff:9]:
122
+
123
+ - **Humans own the ontology.** The agent never creates, renames,
124
+ or deletes pages. Every page is a human-authored stub or a
125
+ pre-existing page; the agent fills, refreshes, cross-links, and
126
+ cites — but it never names. This dissolves the premature-
127
+ ontology and category-call failure modes by construction:
128
+ there is no LLM-minted ontology to be wrong about.
129
+ - **Inline provenance.** Every non-trivial claim carries a
130
+ back-reference — a narrative citation (`nid:seq`), a file path
131
+ with a line range, or an external URL. Stale claims become
132
+ traceable, not opaque. A page without citations is unauditable
133
+ and flagged as such in audit output.
134
+ - **Read-first, write-on-demand.** Default `/wiki` behavior is a
135
+ query, not a rewrite. The wiki is a read path, not a writing
136
+ project. Writes happen only on explicit imperative guidance.
137
+ - **Backlink re-reading and refresh markers.** When a page is
138
+ edited, incoming backlinks are walked and the linking prose is
139
+ re-verified. Every update narrates a `Wiki refreshed —
140
+ <timestamp>` marker so future passes can find the last sync
141
+ point via `narrative_search`. Silent edge-drift becomes visible.
142
+
143
+ These disciplines don't solve the ontology problem; they *scope*
144
+ it. You still have pages, so you still have category calls. But
145
+ the pages are human-chosen — narrowing the blast radius — and the
146
+ claims inside them are provenance-linked — narrowing the drift
147
+ radius. When a wiki page contradicts the narratives, the
148
+ narratives win and the page is wrong. The raw substrate is still
149
+ where truth lives; the wiki is an opinionated projection of it
150
+ [claude-825097e2:13, claude-825097e2:27].
151
+
152
+ ## Granularity, connectivity, mutability
153
+
154
+ Wikis and narratives sit on the same spectrum along three axes
155
+ [claude-825097e2:27]:
156
+
157
+ | | Wiki page | Brane narration |
158
+ |---|---|---|
159
+ | Granularity | one facet per page | whole topic or time window in one narration |
160
+ | Connectivity | `[foo](foo.md)` between files | `re` back-references (`nid:seq`) |
161
+ | Mutability | in-place rewrite | append-only (new narration) |
162
+
163
+ Granularity and connectivity are style choices — brane can do
164
+ fine-grained topic-scoped narrations with rich `re` webs, and a
165
+ wiki can have sprawling pages with few links. The axis where the
166
+ distinction is not cosmetic is **mutability/identity**
167
+ [claude-825097e2:27].
168
+
169
+ A wiki page has a stable identity — *the* `daemon.md` page, and
170
+ editing it is an update to truth. A narrative has no canonical
171
+ statement about its subject; there is the set of all statements
172
+ about X ordered by relevance, and the reader picks
173
+ [claude-825097e2:27]. This is why narratives resist premature
174
+ ontology: they don't commit to per-page identity. And why wikis
175
+ struggle: they do.
176
+
177
+ The brane wiki's trick is to be built on top of an append-only
178
+ substrate it cannot replace. The wiki page can be wrong without
179
+ the record being lost. A page rewrite overwrites the *projection*;
180
+ the narratives underneath still carry the history that produced
181
+ the wrongness.
182
+
183
+ ## Rules of thumb
184
+
185
+ - **The wiki is not the read path.** The narratives are. The wiki
186
+ is a navigation layer — useful for orientation, not for truth.
187
+ - **When a wiki page disagrees with a narration, the narration
188
+ wins.** Update the page; never retrofit the narrative.
189
+ - **Let humans name the pages.** The agent fills; the human
190
+ carves. Agent-minted pages — where the LLM proposes, names, and
191
+ schematizes the wiki's ontology unprompted — is the failure mode
192
+ the Karpathy pattern is most prone to and that this wiki was
193
+ specifically built to dodge [claude-51cdebff:6].
194
+ - **Cite provenance inline.** If a claim can't name its source,
195
+ it doesn't belong on the page.
196
+ - **Expect to delete pages.** A wiki that never shrinks has
197
+ committed to bad ontology and can't admit it. Deletion is a
198
+ first-class move, not an admission of failure.
199
+
200
+ ## Related
201
+
202
+ - [premature-ontologies](premature-ontologies.md) — the broader
203
+ failure-mode this page applies to wiki compilation. Every "where
204
+ wikis struggle" item here recurs at other layers (schemas, agent
205
+ memory, knowledge graphs); that page collects the general critique.
206
+ - [sedimentary-superintelligence](sedimentary-superintelligence.md)
207
+ — the raw substrate underneath. The wiki is a projection of it;
208
+ the sediment is the thing.
209
+ - [append-only event log](append-only-event-log.md) — the
210
+ canonical record. No wiki page has equivalent authority.
211
+ - [owning your narratives](owning-your-narratives.md) — the
212
+ narration-side practice that makes the sediment worth drilling.
213
+ Wiki pages don't accumulate into sedimentary superintelligence;
214
+ narrations do.
215
+ - /wiki — the operational protocol that
216
+ implements the compromise described on this page.
package/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - "14"
4
- - "13"
5
- - "12"
6
- - "11"
7
- - "10"
package/lib/brane.cjs.js DELETED
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- class Brane {
6
- summon(thunk, summoner) {
7
- return 0; // TODO
8
- }
9
- }
10
-
11
- exports.Brane = Brane;
12
- //# sourceMappingURL=brane.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brane.cjs.js","sources":["brane.js"],"sourcesContent":["export class Brane {\n summon(thunk, summoner) {\n return 0; // TODO\n }\n}\n//# sourceMappingURL=brane.js.map"],"names":[],"mappings":";;;;AAAO,MAAM,KAAK,CAAC;AACnB,IAAI,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE;AAC5B,QAAQ,OAAO,CAAC,CAAC;AACjB,KAAK;AACL;;;;"}
package/lib/brane.d.ts DELETED
@@ -1,11 +0,0 @@
1
- declare type AnyFn = (...args: any[]) => any;
2
- declare type JustMethodKeys<T extends object> = {
3
- [key in keyof T]: T[key] extends AnyFn ? key : never;
4
- }[keyof T];
5
- export declare type Safe<T> = T extends PromiseLike<infer R> ? Promise<Safe<R>> : T extends (...args: infer A) => infer R ? (...args: A) => Promise<Safe<R>> : T extends object ? {
6
- readonly [key in JustMethodKeys<T>]: Safe<T[key]>;
7
- } : T;
8
- export declare class Brane {
9
- summon<TModule>(thunk: () => PromiseLike<TModule>, summoner?: string): Promise<Safe<TModule>>;
10
- }
11
- export {};
package/lib/brane.js DELETED
@@ -1,6 +0,0 @@
1
- export class Brane {
2
- summon(thunk, summoner) {
3
- return 0; // TODO
4
- }
5
- }
6
- //# sourceMappingURL=brane.js.map
package/lib/brane.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"brane.js","sourceRoot":"","sources":["../src/brane.ts"],"names":[],"mappings":"AAaA,MAAM,OAAO,KAAK;IACT,MAAM,CACX,KAAiC,EACjC,QAAiB;QAEjB,OAAO,CAAQ,CAAC,CAAC,OAAO;IAC1B,CAAC;CACF"}
package/lib/tests.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/lib/tests.js DELETED
@@ -1,8 +0,0 @@
1
- import assert from "assert";
2
- import { Brane } from "./brane";
3
- describe("Brane", function () {
4
- it("should be importable", function () {
5
- assert.strictEqual(typeof Brane, "function");
6
- });
7
- });
8
- //# sourceMappingURL=tests.js.map
package/lib/tests.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"tests.js","sourceRoot":"","sources":["../src/tests.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAQ,CAAC,OAAO,EAAE;IAChB,EAAE,CAAC,sBAAsB,EAAE;QACzB,MAAM,CAAC,WAAW,CAAC,OAAO,KAAK,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/rollup.config.js DELETED
@@ -1,21 +0,0 @@
1
- const globals = {
2
- __proto__: null,
3
- tslib: "tslib",
4
- };
5
-
6
- function external(id) {
7
- return id in globals;
8
- }
9
-
10
- export default [{
11
- input: "lib/brane.js",
12
- external,
13
- output: {
14
- file: "lib/brane.cjs.js",
15
- format: "cjs",
16
- exports: "named",
17
- sourcemap: true,
18
- name: "brane",
19
- globals,
20
- },
21
- }];
package/scripts/test.sh DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- node "$(dirname $0)/../node_modules/.bin/mocha" \
4
- --reporter spec \
5
- --full-trace \
6
- --require esm \
7
- --require source-map-support/register \
8
- $@
package/src/brane.ts DELETED
@@ -1,21 +0,0 @@
1
- type AnyFn = (...args: any[]) => any
2
-
3
- type JustMethodKeys<T extends object> = {
4
- [key in keyof T]: T[key] extends AnyFn ? key : never;
5
- }[keyof T]
6
-
7
- export type Safe<T> =
8
- T extends PromiseLike<infer R> ? Promise<Safe<R>> :
9
- T extends (...args: infer A) => infer R ? (...args: A) => Promise<Safe<R>> :
10
- T extends object ? {
11
- readonly [key in JustMethodKeys<T>]: Safe<T[key]>;
12
- } : T // All primitives types are thread-safe.
13
-
14
- export class Brane {
15
- public summon<TModule>(
16
- thunk: () => PromiseLike<TModule>,
17
- summoner?: string,
18
- ): Promise<Safe<TModule>> {
19
- return 0 as any; // TODO
20
- }
21
- }
package/src/tests.ts DELETED
@@ -1,8 +0,0 @@
1
- import assert from "assert";
2
- import { Brane } from "./brane";
3
-
4
- describe("Brane", function () {
5
- it("should be importable", function () {
6
- assert.strictEqual(typeof Brane, "function");
7
- });
8
- });
package/tsconfig.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "rootDir": "./src",
4
- "outDir": "./lib",
5
- "lib": ["dom", "es2015"],
6
- "target": "es2015",
7
- "module": "es2015",
8
- "importHelpers": true,
9
- "declaration": true,
10
- "sourceMap": true,
11
- "types": ["node", "mocha"],
12
- "strict": true,
13
- "noImplicitAny": true,
14
- "esModuleInterop": true
15
- }
16
- }