@minca/core 0.2.0 → 0.3.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 (313) hide show
  1. package/dist/identity/abilities.d.ts +0 -2
  2. package/dist/identity/abilities.d.ts.map +1 -1
  3. package/dist/identity/abilities.js +2 -2
  4. package/dist/identity/abilities.js.map +1 -1
  5. package/dist/identity/account-vault.d.ts +0 -2
  6. package/dist/identity/account-vault.d.ts.map +1 -1
  7. package/dist/identity/account-vault.js +1 -1
  8. package/dist/identity/account-vault.js.map +1 -1
  9. package/dist/identity/crypto-p256.d.ts +1 -1
  10. package/dist/identity/crypto-p256.d.ts.map +1 -1
  11. package/dist/identity/ucan.d.ts +2 -1
  12. package/dist/identity/ucan.d.ts.map +1 -1
  13. package/dist/identity/ucan.js +1 -1
  14. package/dist/identity/ucan.js.map +1 -1
  15. package/dist/inbox/inbox.d.ts +0 -21
  16. package/dist/inbox/inbox.d.ts.map +1 -1
  17. package/dist/inbox/inbox.js +4 -4
  18. package/dist/inbox/inbox.js.map +1 -1
  19. package/dist/inbox/index.d.ts +4 -5
  20. package/dist/inbox/index.d.ts.map +1 -1
  21. package/dist/inbox/index.js +2 -3
  22. package/dist/inbox/index.js.map +1 -1
  23. package/dist/inbox/names.d.ts +0 -4
  24. package/dist/inbox/names.d.ts.map +1 -1
  25. package/dist/inbox/names.js +2 -2
  26. package/dist/inbox/names.js.map +1 -1
  27. package/dist/index.d.ts +45 -71
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +34 -53
  30. package/dist/index.js.map +1 -1
  31. package/dist/network/mesh.d.ts.map +1 -1
  32. package/dist/network/mesh.js +10 -0
  33. package/dist/network/mesh.js.map +1 -1
  34. package/dist/network/rendezvous.d.ts +2 -0
  35. package/dist/network/rendezvous.d.ts.map +1 -1
  36. package/dist/network/rendezvous.js +5 -0
  37. package/dist/network/rendezvous.js.map +1 -1
  38. package/dist/network/rtc-transport.d.ts.map +1 -1
  39. package/dist/network/rtc-transport.js +8 -3
  40. package/dist/network/rtc-transport.js.map +1 -1
  41. package/dist/node/carrier.d.ts +1 -33
  42. package/dist/node/carrier.d.ts.map +1 -1
  43. package/dist/node/carrier.js +38 -68
  44. package/dist/node/carrier.js.map +1 -1
  45. package/dist/node/index.d.ts +7 -14
  46. package/dist/node/index.d.ts.map +1 -1
  47. package/dist/node/index.js +4 -8
  48. package/dist/node/index.js.map +1 -1
  49. package/dist/node/node-carriers.d.ts.map +1 -1
  50. package/dist/node/node-carriers.js +21 -52
  51. package/dist/node/node-carriers.js.map +1 -1
  52. package/dist/node/node-context.d.ts +0 -2
  53. package/dist/node/node-context.d.ts.map +1 -1
  54. package/dist/node/node-context.js.map +1 -1
  55. package/dist/node/node-hosting.d.ts.map +1 -1
  56. package/dist/node/node-hosting.js +13 -4
  57. package/dist/node/node-hosting.js.map +1 -1
  58. package/dist/node/node-records.js +1 -1
  59. package/dist/node/node-records.js.map +1 -1
  60. package/dist/node/node.d.ts.map +1 -1
  61. package/dist/node/node.js +134 -36
  62. package/dist/node/node.js.map +1 -1
  63. package/dist/node/space-checks.d.ts +3 -1
  64. package/dist/node/space-checks.d.ts.map +1 -1
  65. package/dist/node/space-checks.js +7 -3
  66. package/dist/node/space-checks.js.map +1 -1
  67. package/dist/node/space-holding.d.ts +5 -0
  68. package/dist/node/space-holding.d.ts.map +1 -1
  69. package/dist/node/space-holding.js +90 -5
  70. package/dist/node/space-holding.js.map +1 -1
  71. package/dist/node/space-lines.d.ts +3 -0
  72. package/dist/node/space-lines.d.ts.map +1 -1
  73. package/dist/node/space-lines.js +13 -1
  74. package/dist/node/space-lines.js.map +1 -1
  75. package/dist/node/space-membership.js +4 -4
  76. package/dist/node/space-membership.js.map +1 -1
  77. package/dist/node/space-peers.d.ts +5 -2
  78. package/dist/node/space-peers.d.ts.map +1 -1
  79. package/dist/node/space-peers.js +3 -2
  80. package/dist/node/space-peers.js.map +1 -1
  81. package/dist/node/space-runtime.d.ts +3 -1
  82. package/dist/node/space-runtime.d.ts.map +1 -1
  83. package/dist/node/space-runtime.js +29 -8
  84. package/dist/node/space-runtime.js.map +1 -1
  85. package/dist/node/space-standing.d.ts +1 -1
  86. package/dist/node/space-standing.d.ts.map +1 -1
  87. package/dist/node/space-standing.js +11 -4
  88. package/dist/node/space-standing.js.map +1 -1
  89. package/dist/node/space-writing.d.ts.map +1 -1
  90. package/dist/node/space-writing.js +9 -0
  91. package/dist/node/space-writing.js.map +1 -1
  92. package/dist/node/stores.d.ts +9 -1
  93. package/dist/node/stores.d.ts.map +1 -1
  94. package/dist/node/stores.js +4 -2
  95. package/dist/node/stores.js.map +1 -1
  96. package/dist/node/types.d.ts +16 -5
  97. package/dist/node/types.d.ts.map +1 -1
  98. package/dist/node/worker.d.ts +14 -6
  99. package/dist/node/worker.d.ts.map +1 -1
  100. package/dist/node/worker.js +59 -20
  101. package/dist/node/worker.js.map +1 -1
  102. package/dist/node/writer-keys.d.ts +2 -2
  103. package/dist/node/writer-keys.d.ts.map +1 -1
  104. package/dist/node/writer-keys.js +12 -14
  105. package/dist/node/writer-keys.js.map +1 -1
  106. package/dist/privacy/direct.d.ts +0 -7
  107. package/dist/privacy/direct.d.ts.map +1 -1
  108. package/dist/privacy/direct.js +2 -2
  109. package/dist/privacy/direct.js.map +1 -1
  110. package/dist/query/filter.d.ts +0 -2
  111. package/dist/query/filter.d.ts.map +1 -1
  112. package/dist/query/filter.js +1 -1
  113. package/dist/query/filter.js.map +1 -1
  114. package/dist/query/types.d.ts +2 -6
  115. package/dist/query/types.d.ts.map +1 -1
  116. package/dist/query/types.js.map +1 -1
  117. package/dist/records/key.d.ts +2 -0
  118. package/dist/records/key.d.ts.map +1 -1
  119. package/dist/records/key.js +4 -0
  120. package/dist/records/key.js.map +1 -1
  121. package/dist/records/links.js +1 -1
  122. package/dist/schemas/direct.d.ts +70 -0
  123. package/dist/schemas/direct.d.ts.map +1 -0
  124. package/dist/schemas/direct.js +39 -0
  125. package/dist/schemas/direct.js.map +1 -0
  126. package/dist/schemas/index.d.ts +10 -73
  127. package/dist/schemas/index.d.ts.map +1 -1
  128. package/dist/schemas/index.js +8 -66
  129. package/dist/schemas/index.js.map +1 -1
  130. package/dist/session/connect.d.ts +12 -5
  131. package/dist/session/connect.d.ts.map +1 -1
  132. package/dist/session/connect.js +25 -21
  133. package/dist/session/connect.js.map +1 -1
  134. package/dist/session/connection.d.ts +8 -2
  135. package/dist/session/connection.d.ts.map +1 -1
  136. package/dist/session/connection.js +140 -11
  137. package/dist/session/connection.js.map +1 -1
  138. package/dist/session/hosting.d.ts +1 -7
  139. package/dist/session/hosting.d.ts.map +1 -1
  140. package/dist/session/hosting.js +3 -3
  141. package/dist/session/hosting.js.map +1 -1
  142. package/dist/session/index.d.ts +7 -12
  143. package/dist/session/index.d.ts.map +1 -1
  144. package/dist/session/index.js +6 -9
  145. package/dist/session/index.js.map +1 -1
  146. package/dist/session/stay-signed-in.d.ts +0 -1
  147. package/dist/session/stay-signed-in.d.ts.map +1 -1
  148. package/dist/session/stay-signed-in.js +1 -1
  149. package/dist/session/stay-signed-in.js.map +1 -1
  150. package/dist/space/account-registry.d.ts +0 -3
  151. package/dist/space/account-registry.d.ts.map +1 -1
  152. package/dist/space/account-registry.js.map +1 -1
  153. package/dist/space/own-automations.d.ts +51 -95
  154. package/dist/space/own-automations.d.ts.map +1 -1
  155. package/dist/space/own-automations.js +100 -295
  156. package/dist/space/own-automations.js.map +1 -1
  157. package/dist/space/pass.d.ts +8 -3
  158. package/dist/space/pass.d.ts.map +1 -1
  159. package/dist/space/pass.js +4 -3
  160. package/dist/space/pass.js.map +1 -1
  161. package/dist/space/space-manager.d.ts +1 -3
  162. package/dist/space/space-manager.d.ts.map +1 -1
  163. package/dist/space/space-manager.js +5 -7
  164. package/dist/space/space-manager.js.map +1 -1
  165. package/dist/storage/body-cache.d.ts +26 -0
  166. package/dist/storage/body-cache.d.ts.map +1 -0
  167. package/dist/storage/body-cache.js +41 -0
  168. package/dist/storage/body-cache.js.map +1 -0
  169. package/dist/storage/encrypted-adapter.d.ts +0 -5
  170. package/dist/storage/encrypted-adapter.d.ts.map +1 -1
  171. package/dist/storage/encrypted-adapter.js +1 -1
  172. package/dist/storage/encrypted-adapter.js.map +1 -1
  173. package/dist/storage/folder-adapter.d.ts +8 -2
  174. package/dist/storage/folder-adapter.d.ts.map +1 -1
  175. package/dist/storage/folder-adapter.js +43 -26
  176. package/dist/storage/folder-adapter.js.map +1 -1
  177. package/dist/storage/indexeddb-adapter.js +27 -2
  178. package/dist/storage/indexeddb-adapter.js.map +1 -1
  179. package/dist/storage/sqlite-adapter.d.ts +57 -0
  180. package/dist/storage/sqlite-adapter.d.ts.map +1 -0
  181. package/dist/storage/sqlite-adapter.js +213 -0
  182. package/dist/storage/sqlite-adapter.js.map +1 -0
  183. package/dist/storage/storage-provider.d.ts +21 -2
  184. package/dist/storage/storage-provider.d.ts.map +1 -1
  185. package/dist/storage/storage-provider.js +149 -56
  186. package/dist/storage/storage-provider.js.map +1 -1
  187. package/dist/sync/sync-engine.d.ts +10 -4
  188. package/dist/sync/sync-engine.d.ts.map +1 -1
  189. package/dist/sync/sync-engine.js +120 -38
  190. package/dist/sync/sync-engine.js.map +1 -1
  191. package/dist/sync/sync-messages.d.ts +4 -0
  192. package/dist/sync/sync-messages.d.ts.map +1 -1
  193. package/dist/sync/sync-messages.js.map +1 -1
  194. package/dist/types.d.ts +0 -7
  195. package/dist/types.d.ts.map +1 -1
  196. package/dist/types.js +0 -1
  197. package/dist/types.js.map +1 -1
  198. package/dist/utils/step.d.ts +8 -0
  199. package/dist/utils/step.d.ts.map +1 -0
  200. package/dist/utils/step.js +15 -0
  201. package/dist/utils/step.js.map +1 -0
  202. package/docs/README.md +1 -1
  203. package/docs/actions.md +41 -2
  204. package/docs/agents.md +13 -10
  205. package/docs/automations.md +16 -48
  206. package/docs/blueprints-and-guides.md +2 -2
  207. package/docs/bots.md +3 -3
  208. package/docs/collections.md +2 -4
  209. package/docs/computed.md +1 -2
  210. package/docs/node.md +87 -23
  211. package/docs/proposing-collections.md +3 -3
  212. package/docs/sign-in.md +16 -16
  213. package/docs/spaces.md +0 -5
  214. package/docs/standard-library.md +6 -8
  215. package/docs/storage.md +78 -12
  216. package/docs/usernames.md +1 -1
  217. package/package.json +7 -8
  218. package/dist/node/actions.d.ts +0 -85
  219. package/dist/node/actions.d.ts.map +0 -1
  220. package/dist/node/actions.js +0 -921
  221. package/dist/node/actions.js.map +0 -1
  222. package/dist/node/host.d.ts +0 -187
  223. package/dist/node/host.d.ts.map +0 -1
  224. package/dist/node/host.js +0 -818
  225. package/dist/node/host.js.map +0 -1
  226. package/dist/node/usage.d.ts +0 -32
  227. package/dist/node/usage.d.ts.map +0 -1
  228. package/dist/node/usage.js +0 -217
  229. package/dist/node/usage.js.map +0 -1
  230. package/dist/node/watch-notifications.d.ts +0 -25
  231. package/dist/node/watch-notifications.d.ts.map +0 -1
  232. package/dist/node/watch-notifications.js +0 -166
  233. package/dist/node/watch-notifications.js.map +0 -1
  234. package/dist/schemas/automations.d.ts +0 -390
  235. package/dist/schemas/automations.d.ts.map +0 -1
  236. package/dist/schemas/automations.js +0 -619
  237. package/dist/schemas/automations.js.map +0 -1
  238. package/dist/schemas/blueprints.d.ts +0 -122
  239. package/dist/schemas/blueprints.d.ts.map +0 -1
  240. package/dist/schemas/blueprints.js +0 -337
  241. package/dist/schemas/blueprints.js.map +0 -1
  242. package/dist/schemas/choosing.d.ts +0 -19
  243. package/dist/schemas/choosing.d.ts.map +0 -1
  244. package/dist/schemas/choosing.js +0 -69
  245. package/dist/schemas/choosing.js.map +0 -1
  246. package/dist/schemas/connectors.d.ts +0 -202
  247. package/dist/schemas/connectors.d.ts.map +0 -1
  248. package/dist/schemas/connectors.js +0 -140
  249. package/dist/schemas/connectors.js.map +0 -1
  250. package/dist/schemas/cron.d.ts +0 -14
  251. package/dist/schemas/cron.d.ts.map +0 -1
  252. package/dist/schemas/cron.js +0 -75
  253. package/dist/schemas/cron.js.map +0 -1
  254. package/dist/schemas/geo.d.ts +0 -63
  255. package/dist/schemas/geo.d.ts.map +0 -1
  256. package/dist/schemas/geo.js +0 -131
  257. package/dist/schemas/geo.js.map +0 -1
  258. package/dist/schemas/guides.d.ts +0 -26
  259. package/dist/schemas/guides.d.ts.map +0 -1
  260. package/dist/schemas/guides.js +0 -33
  261. package/dist/schemas/guides.js.map +0 -1
  262. package/dist/schemas/library/annotations.d.ts +0 -616
  263. package/dist/schemas/library/annotations.d.ts.map +0 -1
  264. package/dist/schemas/library/annotations.js +0 -156
  265. package/dist/schemas/library/annotations.js.map +0 -1
  266. package/dist/schemas/library/collections.d.ts +0 -211
  267. package/dist/schemas/library/collections.d.ts.map +0 -1
  268. package/dist/schemas/library/collections.js +0 -57
  269. package/dist/schemas/library/collections.js.map +0 -1
  270. package/dist/schemas/library/community.d.ts +0 -1136
  271. package/dist/schemas/library/community.d.ts.map +0 -1
  272. package/dist/schemas/library/community.js +0 -315
  273. package/dist/schemas/library/community.js.map +0 -1
  274. package/dist/schemas/library/life.d.ts +0 -1440
  275. package/dist/schemas/library/life.d.ts.map +0 -1
  276. package/dist/schemas/library/life.js +0 -202
  277. package/dist/schemas/library/life.js.map +0 -1
  278. package/dist/schemas/library/media.d.ts +0 -1002
  279. package/dist/schemas/library/media.d.ts.map +0 -1
  280. package/dist/schemas/library/media.js +0 -110
  281. package/dist/schemas/library/media.js.map +0 -1
  282. package/dist/schemas/library/money.d.ts +0 -1221
  283. package/dist/schemas/library/money.d.ts.map +0 -1
  284. package/dist/schemas/library/money.js +0 -168
  285. package/dist/schemas/library/money.js.map +0 -1
  286. package/dist/schemas/library/planning.d.ts +0 -1107
  287. package/dist/schemas/library/planning.d.ts.map +0 -1
  288. package/dist/schemas/library/planning.js +0 -214
  289. package/dist/schemas/library/planning.js.map +0 -1
  290. package/dist/schemas/library/publishing.d.ts +0 -1499
  291. package/dist/schemas/library/publishing.d.ts.map +0 -1
  292. package/dist/schemas/library/publishing.js +0 -285
  293. package/dist/schemas/library/publishing.js.map +0 -1
  294. package/dist/schemas/library/social.d.ts +0 -1257
  295. package/dist/schemas/library/social.d.ts.map +0 -1
  296. package/dist/schemas/library/social.js +0 -147
  297. package/dist/schemas/library/social.js.map +0 -1
  298. package/dist/schemas/standard.d.ts +0 -21
  299. package/dist/schemas/standard.d.ts.map +0 -1
  300. package/dist/schemas/standard.js +0 -39
  301. package/dist/schemas/standard.js.map +0 -1
  302. package/dist/session/auth.d.ts +0 -411
  303. package/dist/session/auth.d.ts.map +0 -1
  304. package/dist/session/auth.js +0 -1529
  305. package/dist/session/auth.js.map +0 -1
  306. package/dist/session/credentials.d.ts +0 -30
  307. package/dist/session/credentials.d.ts.map +0 -1
  308. package/dist/session/credentials.js +0 -63
  309. package/dist/session/credentials.js.map +0 -1
  310. package/dist/session/password-strength.d.ts +0 -22
  311. package/dist/session/password-strength.d.ts.map +0 -1
  312. package/dist/session/password-strength.js +0 -130
  313. package/dist/session/password-strength.js.map +0 -1
package/dist/types.d.ts CHANGED
@@ -232,12 +232,6 @@ export interface PeerInfo {
232
232
  readonly connectionId: string;
233
233
  readonly connectedAt: string;
234
234
  }
235
- /** Sync state */
236
- export interface SyncState {
237
- readonly peerId: string;
238
- readonly lastSyncedAt: string;
239
- readonly remoteRoot: string;
240
- }
241
235
  /**
242
236
  * Where a store keeps its bytes: entries by string key, and version bodies by
243
237
  * id. Write one to keep a node's data somewhere new. The optional methods
@@ -300,5 +294,4 @@ export type Result<T, E = Error> = {
300
294
  readonly error: E;
301
295
  };
302
296
  export declare const ok: <T>(value: T) => Result<T, never>;
303
- export declare const err: <E>(error: E) => Result<never, E>;
304
297
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,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Q,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,+CAA+C;AAC/C,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,IAC7B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAEvF,eAAO,MAAM,EAAE,GAAI,CAAC,SAAS,CAAC,KAAG,MAAM,CAAC,CAAC,EAAE,KAAK,CAA0B,CAAC"}
package/dist/types.js CHANGED
@@ -3,5 +3,4 @@
3
3
  * @module types
4
4
  */
5
5
  export const ok = (value) => ({ ok: true, value });
6
- export const err = (error) => ({ ok: false, error });
7
6
  //# sourceMappingURL=types.js.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkTH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAI,KAAQ,EAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,GAAG,GAAG,CAAI,KAAQ,EAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2SH,MAAM,CAAC,MAAM,EAAE,GAAG,CAAI,KAAQ,EAAoB,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Marks a step of starting, such as a node opening its account space, for
3
+ * debug tools that watch with a `PerformanceObserver` (`type: 'mark'`), names
4
+ * starting `minca `. Says nothing on any console, and keeps nothing: the mark
5
+ * is cleared at once, and observers still hear it.
6
+ */
7
+ export declare function markStep(name: string): void;
8
+ //# sourceMappingURL=step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/utils/step.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAM3C"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Marks a step of starting, such as a node opening its account space, for
3
+ * debug tools that watch with a `PerformanceObserver` (`type: 'mark'`), names
4
+ * starting `minca `. Says nothing on any console, and keeps nothing: the mark
5
+ * is cleared at once, and observers still hear it.
6
+ */
7
+ export function markStep(name) {
8
+ try {
9
+ performance.clearMarks(performance.mark(`minca ${name}`).name);
10
+ }
11
+ catch {
12
+ // An engine without User Timing 3 has nothing to watch with, and starting must not fail for it.
13
+ }
14
+ }
15
+ //# sourceMappingURL=step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step.js","sourceRoot":"","sources":["../../src/utils/step.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,IAAI,CAAC;QACH,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;IAAC,MAAM,CAAC;QACP,gGAAgG;IAClG,CAAC;AACH,CAAC"}
package/docs/README.md CHANGED
@@ -80,7 +80,7 @@ in the [spec](https://github.com/leifriksheim/minca/tree/main/spec).
80
80
  - Name your collections `app.<yours>.<thing>`. `sys.*` belongs to the
81
81
  protocol and `std.*` to the standard library.
82
82
  - Before you define a reaction, comment, tag, message, task or poll, look in
83
- the standard library (`@minca/core/schemas`). Using the same one is how two
83
+ the standard library (`@minca/std`). Using the same one is how two
84
84
  apps see each other's data.
85
85
  - Keep anything other people should see in records. Records are what syncs.
86
86
  - A refused write throws with the reason in plain words. Show it, or check
package/docs/actions.md CHANGED
@@ -9,14 +9,14 @@ from this one list, so an agent sees the same tools wherever it runs.
9
9
  Run one by name with `runAction`:
10
10
 
11
11
  ```ts
12
- import { runAction } from '@minca/core/node';
12
+ import { runAction } from '@minca/actions';
13
13
 
14
14
  const spaces = await runAction(node, 'spaces_list', {});
15
15
  const messages = await runAction(node, 'records_query', { space, collection: 'std.message', limit: 10 });
16
16
  ```
17
17
 
18
18
  `NODE_ACTIONS` lists them all. Each is a
19
- [`NodeAction`](https://minca.dev/api/core/interfaces/NodeAction/): a name,
19
+ [`NodeAction`](https://minca.dev/api/actions/interfaces/NodeAction/): a name,
20
20
  words for people and models, a JSON Schema for its input, flags that say how
21
21
  careful a front end should be, and `run`.
22
22
 
@@ -44,6 +44,39 @@ so it always matches the code.
44
44
  `spaces_assign`, `spaces_remove_member`, `spaces_step_down`, `spaces_succeed`
45
45
  and `spaces_close_invite` return `spaces.access()` afterwards.
46
46
 
47
+ ### Spaces
48
+
49
+ `spaces_list` gives `spaces.list()` without `writable` and `role`. Those are
50
+ what this node saw when it last opened a space, and a node that has not
51
+ opened one since, like the MCP service's, would say you hold nothing there.
52
+
53
+ ### Records
54
+
55
+ `records_query` and `records_get` give each record without
56
+ what every sound version carries alike: `version`, `seq`, `space`, `author`
57
+ (the session key), `encrypted`, `verified` when true, and `conforms` unless
58
+ it is false. Empty `computed` and `included` go too. What says something is
59
+ wrong stays: `verified: false`, `conforms: false`, `reason` (also given when a
60
+ version fails its collection's contract), `issues`, and `recordsOnly`.
61
+ `records_query` leaves out records this node can't open; `records_get` gives
62
+ one with `body: null`. `records_history` gives versions whole. The CLI prints these actions the same way, so a script that
63
+ needs `version` or `author` reads `records_history`.
64
+
65
+ To find what someone wrote, filter on `@root` (who wrote the version) or
66
+ `@createdBy`. `@author` is the session key, which these results leave out.
67
+ To find what points at a record, like its comments, filter on its link:
68
+ `where: { "link:about": key }`.
69
+
70
+ `records_query` gives 50 records a page by default, and stops early at the
71
+ record that would take the page past 40,000 characters of JSON, so a long
72
+ collection takes several calls. Its `cursor` is the last record given, so the
73
+ next page picks up after it. A page always has its first record whole, with
74
+ what it includes, so one long record, or one with many included, can still
75
+ be more.
76
+
77
+ There is no action to ask whether you may write before trying. A write you
78
+ may not make fails, and its message says why.
79
+
47
80
  ### Collections
48
81
 
49
82
  `collections_list` without `names` gives each collection in a line:
@@ -113,6 +146,12 @@ only those between you and them ([direct messages](direct-messages.md)).
113
146
  instructions) and a blank line come first. On failure, `text` is the error's
114
147
  message and `isError` is true.
115
148
 
149
+ When the result mentions people by DID and the input names a space, a line
150
+ after it gives the name each of them gave in that space, so a model can say
151
+ who wrote what without looking it up. Yours is marked "(you)". Anyone may give
152
+ any name, so the line says to tell people apart by DID, and since names are
153
+ what people wrote, the note comes first then too.
154
+
116
155
  `offeredActions({ agent?, bot? })` is what a model is offered:
117
156
 
118
157
  - For the account itself, every action.
package/docs/agents.md CHANGED
@@ -15,9 +15,9 @@ claude mcp add --transport http minca https://mcp.minca.social/mcp
15
15
 
16
16
  [minca.social/mcp](https://minca.social/mcp) has one-click links for Claude
17
17
  and Cursor. The app opens a page where you sign in at your account home and
18
- pick the spaces it may use, up to 8. The access lasts 30 days. Then its
19
- tools arrive, and the chat app's own
20
- model does the thinking.
18
+ choose what it gets: up to 8 spaces you pick, or every space, including ones
19
+ you make later. The access lasts 30 days. Then its tools arrive, and the chat app's own model does the
20
+ thinking.
21
21
 
22
22
  How the service works, and how to run your own, is under
23
23
  [The MCP service](#the-mcp-service) below.
@@ -131,12 +131,11 @@ Schema for its input. The CLI, the MCP service and WebMCP tools are all made
131
131
  from it. You can run one by name:
132
132
 
133
133
  ```typescript
134
- import { runAction } from '@minca/core';
134
+ import { runAction } from '@minca/actions';
135
135
 
136
136
  await runAction(node, 'records_put', {
137
137
  space: space.id,
138
- collection: 'app.todo.item',
139
- body: { text: 'milk' },
138
+ records: [{ collection: 'app.todo.item', body: { text: 'milk' } }],
140
139
  });
141
140
  ```
142
141
 
@@ -160,14 +159,18 @@ account home does.
160
159
  endpoint at `/mcp`, and apps sign in with OAuth.
161
160
 
162
161
  The consent page the app opens is an app like any other to the account home.
163
- It makes a key in the browser and asks for a records-only note in the spaces
164
- the person picks, with `connectToHome`. It hands the key and note to the
165
- service. The service checks them with
162
+ It makes a key in the browser and asks for a records-only note for every
163
+ space, with `connectToHome`; the person may keep it to some spaces at their
164
+ home. It hands the key and note to the service. The service checks them with
166
165
  `checkGrant(grant, did, { recordsOnly: true })`, and keeps them sealed under
167
166
  a key only the app's access token carries.
168
167
 
168
+ A grant for every space carries the account key. It reads every space the
169
+ account is in, now and later, and disconnecting doesn't take that back: it is
170
+ the price of never connecting again for a new space.
171
+
169
172
  Each call starts a node in memory from what the token opens
170
- (`startGrantedAgent`). It reaches only the always-on nodes and relays the
173
+ (`startGrantedAgent`), and opens a space only when a call names it. It reaches only the always-on nodes and relays the
171
174
  person's invites and spaces name at public addresses, and the service's own
172
175
  (`network.reach`, see [The node](node.md)). A write is done once the space's
173
176
  keepers have it (`spaces.kept`). The one thing kept between calls is where
@@ -36,7 +36,7 @@ found, and the newest record its computed fields read.
36
36
  You save an automation like any other record:
37
37
 
38
38
  ```ts
39
- import { automation } from '@minca/core/schemas';
39
+ import { automation } from '@minca/std';
40
40
 
41
41
  await node.records.put(space.id, automation, {
42
42
  name: 'Mentioned',
@@ -253,9 +253,9 @@ every device off, run `minca agent --no-chat`, or a bot on a host.
253
253
  ### Fields
254
254
 
255
255
  Every field of an automation is listed under
256
- [`Automation`](https://minca.dev/api/schemas/interfaces/Automation/), and how
256
+ [`Automation`](https://minca.dev/api/std/interfaces/Automation/), and how
257
257
  a runner is set up under
258
- [`startAutomations`](https://minca.dev/api/schemas/functions/startAutomations/).
258
+ [`startAutomations`](https://minca.dev/api/std/functions/startAutomations/).
259
259
 
260
260
  ## The account's own
261
261
 
@@ -278,9 +278,11 @@ else sees it, and it looks at the spaces it names. For now it only notifies:
278
278
  }
279
279
  ```
280
280
 
281
- It is a `std.automation` body with three more fields: `spaces`, the spaces it
282
- looks at, `open`, where its notification leads, and `app`, the app that
283
- proposed it ([`Automation`](https://minca.dev/api/schemas/interfaces/Automation/)).
281
+ It is a small shape of its own
282
+ ([`OwnAutomation`](https://minca.dev/api/core/interfaces/OwnAutomation/)): a
283
+ `name`, `when` and `then` as below, `spaces`, the spaces it looks at, `open`,
284
+ where its notification leads, `app`, the app that proposed it, `paused` and
285
+ `since`. It has no other fields.
284
286
 
285
287
  It is kept as `sys.automation` at `automation:<id>`. A system collection has
286
288
  no definition, so no key of the account can redefine it to stop the person
@@ -288,16 +290,16 @@ pausing or removing one. That includes an app given all of it.
288
290
 
289
291
  It must pass `checkOwnAutomation`:
290
292
 
291
- - `then.kind` is `notify`.
292
- - No `every` and no `by`: the account runs it as records are written.
293
- - `when.query` names one collection, with no `include`. It may have a `where`
294
- over each record alone: its body, its [computed fields](computed.md),
295
- `link:<role>`, `@key`, `@collection`, `@createdBy` and `@createdAt`.
296
- - No `holds` and no `from`. `$me` is the account.
293
+ - `then` is `{ kind: 'notify', text }`.
294
+ - `when` is `{ query, others? }`, and `query` is one `collection` with an
295
+ optional `where` over each record alone: its body, its
296
+ [computed fields](computed.md), `link:<role>`, `@key`, `@collection`,
297
+ `@createdBy` and `@createdAt`. `$me` is the account.
297
298
 
298
299
  It notifies about a record when the record **comes to match**. That is when
299
- the record is written, or, for a `where` that names a computed field, when
300
- something the field reads is written, the way a 👍 can make a to-do done. It
300
+ the record is written, or, for a `where` that names a computed field and an
301
+ app that is running, when something the field reads is written, the way a 👍
302
+ can make a to-do done. It
301
303
  notifies once per record. A record edited out of matching and back in is not
302
304
  news again, so nobody can notify the account over and over with one record.
303
305
 
@@ -339,37 +341,3 @@ While your app runs, it shows what they match itself (`watchNotifications`).
339
341
 
340
342
  [Spec 06 §2.11](../../../spec/06-nodes-and-sessions.md) defines the
341
343
  `Proposal` shape.
342
-
343
- ### Waking an app through a carrier
344
-
345
- A carrier can't read, so it can't tell which records match. Instead, each
346
- device with the account key copies each automation into every carry space as
347
- a wake (`sys.wake`). A wake holds the collection, the spaces, `others`, and,
348
- in each space, the tags of the topic values its `where` requires. When a
349
- matching record arrives, the carrier wakes the app, and the app judges it.
350
-
351
- A condition requires values when it is on a field the space declares a topic,
352
- at the top of `where` or in an `$and` there: `field: value`, `$eq`,
353
- `$contains` or `$in`. The first such condition gives the tags, one per value.
354
- So "near me" as `{ "place.cells": { "$in": [nine cells] } }` is nine tags.
355
-
356
- - A space where `where` requires no topic value gets no tags. Any new record
357
- of the collection wakes the app, which turns down what `where` doesn't
358
- match.
359
- - A private space whose key the device lacks gets an empty list, and wakes
360
- nothing.
361
-
362
- A `where` that names a computed field changes when what the field reads is
363
- written. So each device also writes a wake for each collection that field
364
- reads (`wake:<id>:<collection>`), with no tags. Any new 👍 in those spaces
365
- wakes the app, which works the field out and judges. Only the fields the
366
- `where` names count. A filter whose fields read more than four collections
367
- gets no more wakes than its own, so a definition can't make every member's
368
- devices write a wake per name it lists.
369
-
370
- A wake can only let through more than the app would, never less, with one
371
- exception. `$contains` on a text field matches part of it, and a tag only a
372
- whole value. Mark as topics only fields that hold whole values: people,
373
- links, cells.
374
-
375
- [Spec 03 §15](../../../spec/03-spaces.md).
@@ -22,7 +22,7 @@ A blueprint is the only way such a key gets a collection. Every peer refuses a
22
22
  definition from a key whose note doesn't grant `/collection/define`.
23
23
 
24
24
  ```typescript
25
- import { proposeCollections, reviewBlueprint, applyBlueprint } from '@minca/core/schemas';
25
+ import { proposeCollections, reviewBlueprint, applyBlueprint } from '@minca/std';
26
26
 
27
27
  const proposal = await proposeCollections(node, space.id, {
28
28
  title: 'Chores',
@@ -98,7 +98,7 @@ Each collection comes back as one of three:
98
98
  Each also has a `summary`: what it allows, in sentences worked out from its
99
99
  rules ([describing a collection](#describing-a-collection)). A change also
100
100
  says what would be different, and which applied blueprints it could break.
101
- The rest is on [`CollectionReview`](https://minca.dev/api/schemas/interfaces/CollectionReview/).
101
+ The rest is on [`CollectionReview`](https://minca.dev/api/std/interfaces/CollectionReview/).
102
102
 
103
103
  A blueprint is `applied` once every collection in it is `same`.
104
104
 
package/docs/bots.md CHANGED
@@ -19,7 +19,7 @@ hold the grant.
19
19
  Ask with `mayConfigure`:
20
20
 
21
21
  ```ts
22
- import { mayConfigure } from '@minca/core/schemas';
22
+ import { mayConfigure } from '@minca/std';
23
23
 
24
24
  async function openSettings(bot: string, person: string) {
25
25
  if (await mayConfigure(node, space.id, bot, person)) {
@@ -93,7 +93,7 @@ needs each service's id and name.
93
93
 
94
94
  ```ts
95
95
  import type { SpaceHostingView } from '@minca/core';
96
- import { askToConnect, connectPage } from '@minca/core/schemas';
96
+ import { askToConnect, connectPage } from '@minca/std';
97
97
 
98
98
  async function connect(host: SpaceHostingView, bot: string) {
99
99
  // Opened in the click, before any await, or the browser blocks it.
@@ -114,7 +114,7 @@ and the bot deletes its `std.connector`.
114
114
 
115
115
  ```ts
116
116
  import type { SpaceHostingView } from '@minca/core';
117
- import { askToConnect, askToDisconnect } from '@minca/core/schemas';
117
+ import { askToConnect, askToDisconnect } from '@minca/std';
118
118
 
119
119
  async function disconnect(host: SpaceHostingView, bot: string) {
120
120
  const ask = await askToConnect(node, space.id, bot, 'github', { disconnect: true });
@@ -278,9 +278,7 @@ record's first version is, when the rules have `onePer` or `fixed`, since
278
278
  those rules are checked against it. With a `contract`, every version is, so
279
279
  the contract can read and cite them.
280
280
 
281
- The account's wakes match records by their `topics`
282
- ([automations](automations.md#the-accounts-own)). How `version` is numbered
283
- is [below](#versions-of-a-definition).
281
+ How `version` is numbered is [below](#versions-of-a-definition).
284
282
 
285
283
  ## Versions of a definition
286
284
 
@@ -318,7 +316,7 @@ one is how two apps agree: a poll asked in one app can be voted on in
318
316
  another.
319
317
 
320
318
  ```typescript
321
- import { reaction, comment, poll, vote, useSchemas } from '@minca/core/schemas';
319
+ import { reaction, comment, poll, vote, useSchemas } from '@minca/std';
322
320
 
323
321
  await useSchemas(node, space.id, [poll, vote, reaction, comment]); // defines only what the space is missing
324
322
  ```
package/docs/computed.md CHANGED
@@ -157,8 +157,7 @@ watches what it reads:
157
157
 
158
158
  - an [automation](automations.md) sets off when the 👍 is written (after its
159
159
  `since`);
160
- - an app's own notifications say so then, once;
161
- - a carrier wakes the app on a new 👍 as well as on a new to-do.
160
+ - an app's own notifications say so then, once.
162
161
 
163
162
  ## Cost
164
163
 
package/docs/node.md CHANGED
@@ -53,7 +53,10 @@ the signer refuses, `createNode` fails.
53
53
 
54
54
  With an account key, the node also opens the account registry and makes its
55
55
  spaces match it before `createNode` returns
56
- ([following the account](#following-the-account)).
56
+ ([following the account](#following-the-account)). That waits on nothing
57
+ from the network: a node starts from what it holds, with no host answering.
58
+ Recording in the registry a space it holds but the registry doesn't name asks
59
+ the account's hosts for an invite, so it happens in the background.
57
60
 
58
61
  A node acts for one account (`node.did`) and signs with one key for its whole
59
62
  life. To act for another account, start another node.
@@ -99,6 +102,15 @@ There are three kinds:
99
102
  only session notes (command `/`, no subject, no policy) and refuses anything
100
103
  else without asking the signer behind it.
101
104
 
105
+ An app's node signs as its session with the app's key. A node in a worker is
106
+ handed the seed the key is derived from and signs with it there. No
107
+ `CryptoKey` is ever sent to a worker, since WebKit drops a message to a shared
108
+ worker that holds one.
109
+
110
+ When several tabs share the node, a session note is asked of one tab at a
111
+ time, the one that signed last first, then the newest, each for up to five
112
+ minutes, long enough for a passkey prompt.
113
+
102
114
  ### The session note
103
115
 
104
116
  This is the note a node asks for when it starts:
@@ -178,6 +190,9 @@ What a path means is up to the factory:
178
190
  - `directoryStores(directory, { localKey? })` uses a directory on this
179
191
  device, one file per entry and per version, sealing the `registry` the same
180
192
  way.
193
+ - `sqliteStores(db, { localKey? })` keeps every path in one SQLite database,
194
+ given its connection ([SQLite](storage.md#sqlite)), sealing the `registry`
195
+ the same way.
181
196
 
182
197
  [Sign-in](sign-in.md) picks stores with `storesFor(account)`: IndexedDB with
183
198
  prefix `minca:<dataPath with : for />` in the browser, or `folderStores(pod,
@@ -231,8 +246,8 @@ or none can be locked, the node makes a key for this run instead.
231
246
  In the browser, `browserWriterKeys(name)` keeps up to 32 keys in IndexedDB,
232
247
  one database per slot (`<name>:writer:<slot>`), each claimed under a Web Lock
233
248
  of the same name. A tab that finds a slot taken tries the next. A tab that
234
- closes or crashes frees its slot. The private key can't be extracted: a
235
- script in the page can sign with it while it runs, but can't take it away.
249
+ closes or crashes frees its slot. A slot keeps the seed its key is derived
250
+ from, so a shared worker can read it in every browser.
236
251
  Without IndexedDB or Web Locks there are no writer keys.
237
252
 
238
253
  A node started from a store description, such as `startPageNode` or a node in
@@ -399,6 +414,29 @@ when it was first level with a whole-space peer, and `missing` to the version
399
414
  ids a writer's line names that aren't here.
400
415
  [Spec 05 §9](https://github.com/leifriksheim/minca/blob/main/spec/05-sync-and-storage.md).
401
416
 
417
+ ### Syncing shallow
418
+
419
+ A record edited thousands of times has thousands of versions, and an agent
420
+ answering one question doesn't need them. With `shallow: true`, a node syncs
421
+ a space with its keepers by **shallow sets**: each record's current and
422
+ first versions, what its writer retained, and every version in a line, not
423
+ every superseded stub.
424
+
425
+ It is for a node that lives for a session and can't work without the
426
+ space's always-on nodes anyway, as a remote MCP session's. Apps and devices
427
+ leave it off and hold every version, so they work the same with no host.
428
+
429
+ A shallow node takes its keepers' word for the history it skips. A keeper
430
+ can hold a record back or show an older edit, but it can't forge one:
431
+ signatures, standing and first versions are checked as always. With no
432
+ keeper connected the node syncs whole from its other peers, and a space
433
+ that names no keepers syncs whole.
434
+
435
+ Removing someone, or taking a role away (`unassign`, `removeMember`,
436
+ `stepDown`), needs everything they wrote, which a shallow node doesn't
437
+ hold: it refuses. `revoke` always goes through.
438
+ [Spec 05 §5.1](https://github.com/leifriksheim/minca/blob/main/spec/05-sync-and-storage.md).
439
+
402
440
  ### Planned: caches that widen and trim
403
441
 
404
442
  > **Planned.** A node holding part of a space would hold all of it when too
@@ -435,16 +473,33 @@ one run at a time:
435
473
 
436
474
  1. It joins every space a `sys.joined` record names that it doesn't hold,
437
475
  with the view-only invite in the record.
438
- 2. It leaves every space whose `sys.joined` record was deleted.
476
+ 2. It leaves every space whose `sys.joined` record was deleted, all at once.
477
+ The space leaves the list right away. If the account still holds a place
478
+ there, giving it up runs in the background, as [leaving](#leaving-a-space)
479
+ describes.
439
480
  3. It writes a `sys.joined` record for a space it holds that the registry
440
- doesn't know.
441
- 4. It brings every carrier's passes and wakes up to date.
442
- 5. It names the account's carriers as keepers of the open spaces it manages.
481
+ doesn't know. That asks the account's hosts for the space's invite, so it
482
+ runs in the background, one run at a time apart from reconciling, reading
483
+ afresh each run what the registry still lacks. A space left meanwhile
484
+ stays left.
485
+ 4. It brings every carrier's passes up to date.
486
+ 5. It names the account's carriers as keepers of the open spaces it manages,
487
+ the account registry and contacts space among them: a carrier keeps the
488
+ account's personal space. Carry spaces name none.
443
489
  6. It asks each host the account uses how it stands, without waiting, and
444
490
  hands it the spaces if it was paid ([hosting](#carriers-hosting-and-notifications)).
491
+ A host whose signed status says the account's subscription lapsed, or has
492
+ none, and that it won't carry for it as things stand, stops being a carrier,
493
+ and so a keeper. A host that doesn't answer stays one.
445
494
 
446
495
  Creating or joining a space writes its `sys.joined` record. Leaving deletes it.
447
496
 
497
+ The account's own spaces (the table above) are never in the list: joining a
498
+ carry space's invite writes no record, and a record that names one is passed
499
+ over in every step, neither joined nor left. A device that hadn't heard of the
500
+ carrier yet may have written one, and may have joined the space from the list;
501
+ it opens the space directly once it hears.
502
+
448
503
  ### Profiles
449
504
 
450
505
  The node publishes the account's profile, `{ name, contactKey? }`, in a space
@@ -776,10 +831,12 @@ says what the app and the home send each other.
776
831
 
777
832
  ### The app's key
778
833
 
779
- `appKey(name = 'default')` makes the app's P-256 key once and keeps it,
780
- non-extractable, in the IndexedDB database `minca-app-key`, store `keys`,
834
+ `appKey(name = 'default')` makes the app's P-256 key once and keeps the seed
835
+ it is derived from in the IndexedDB database `minca-app-key`, store `keys`,
781
836
  under `name`. `forgetAppKey` deletes it, and the next connection makes a new
782
- one.
837
+ one. A script running in the app's origin can read the seed, as it can the
838
+ session of any web app: the grant runs out, and the person can disconnect the
839
+ app at their account home.
783
840
 
784
841
  ### An app's node outside the page
785
842
 
@@ -861,6 +918,21 @@ and its status is a [`ConnectionStatus`](https://minca.dev/api/session/type-alia
861
918
  - With `worker`, the node runs in a worker. If the worker fails to load or
862
919
  doesn't start the node within 30 seconds (`WorkerNotStarted`), the node runs
863
920
  in the page instead. A worker that started and refused passes its reason on.
921
+ - Opening an account that takes more than 10 seconds says so in `error`,
922
+ while the status stays `starting`: what is likely wrong (another tab
923
+ holding the browser's storage) and what to try (closing other tabs,
924
+ reloading). A store in IndexedDB that won't open within 15 seconds fails
925
+ with the same advice, rather than waiting for ever. An account that can't
926
+ be opened is `disconnected`, its `error` saying why.
927
+ - A tab whose node is its own (a dedicated worker's, or the page's) runs it
928
+ only in view, one at a time per account (a Web Lock,
929
+ `minca-node:<account DID>`): two nodes on one site's stores get in each
930
+ other's way, and a browser that freezes background tabs, as an iPhone
931
+ does, would freeze one holding them. Put away, the tab closes its node
932
+ (`starting`, with no node) and opens it again on coming back. A node the
933
+ tabs share, in a shared worker, stays.
934
+ - `keepAwake()` keeps the node open while the tab is put away, as a call
935
+ must, and returns what lets it go.
864
936
  - It turns `expired` when the grant's `expiresAt` passes.
865
937
  - When the node sees its note revoked (`revoked`), the connection forgets that
866
938
  account's grant and key.
@@ -909,7 +981,9 @@ An app shows its own notifications with
909
981
  `watchNotifications(node, { origin?, onNotify })`. It needs the account key,
910
982
  so an app with `scope: account`. It reads the account's automations for the
911
983
  app's origin, and calls `onNotify({ automation, record })` for each record
912
- that arrives matching one.
984
+ that arrives matching one. With `origin: null` it reads every app's
985
+ automations and the person's own: for something that speaks for every app
986
+ while none is open, as the Chrome extension does.
913
987
 
914
988
  A record matches when the automation isn't paused, and the record is in its
915
989
  collection and one of its spaces, created after `since` and within the last
@@ -961,8 +1035,7 @@ returns that one.
961
1035
  Carry spaces aren't kept in the node's list. Each is derived again from its
962
1036
  record. When the node starts, or the registry changes, it refills every carry
963
1037
  space in the background. That opens every space the account holds, which is
964
- slow from a data folder, so signing in doesn't wait for it, and nor does
965
- adding an automation. Adding a carrier writes its passes before it returns.
1038
+ slow from a data folder, so signing in doesn't wait for it. Adding a carrier writes its passes before it returns.
966
1039
 
967
1040
  - `carriers.settled(waitMs)` waits for the refill under way, and says whether
968
1041
  it finished. Use it before a window closes.
@@ -995,19 +1068,10 @@ wrote.
995
1068
 
996
1069
  `node.automations` needs the account key. It lists, adds, updates (`name`,
997
1070
  `paused`) and removes the account's own
998
- [automations](automations.md#the-accounts-own), kept in its registry, and
999
- copies a wake for each into every carry space. The reference home adds them
1071
+ [automations](automations.md#the-accounts-own), kept in its registry. The reference home adds them
1000
1072
  when a person keeps an app's proposal, and lists them by app to pause or
1001
1073
  remove ([the account home's side](sign-in.md#the-account-homes-side)).
1002
1074
 
1003
- ### A carrier's matches
1004
-
1005
- When a version wakes one of the account's wakes, a `CarrierNode` sends a
1006
- `wake` event with only the wake, the space, and the record's key, collection
1007
- and `createdAt`. `wakes()` lists the wakes it holds. The desktop app shows
1008
- these as notifications. The browser
1009
- extension doesn't yet.
1010
-
1011
1075
  ### Hosting
1012
1076
 
1013
1077
  `node.hosting` pays a host and hands it the account's spaces. Its calls are
@@ -11,7 +11,7 @@ A proposal is a **blueprint**: one `std.blueprint` record listing the
11
11
  collections. Nothing is defined yet, so it can't break anything.
12
12
 
13
13
  ```typescript
14
- import { proposeCollections } from '@minca/core/schemas';
14
+ import { proposeCollections } from '@minca/std';
15
15
 
16
16
  const proposal = await proposeCollections(node, space.id, {
17
17
  title: 'Chores',
@@ -43,7 +43,7 @@ the same, with a summary in sentences worked out from its rules:
43
43
 
44
44
  ```typescript
45
45
  import type { NodeRecord } from '@minca/core';
46
- import { reviewBlueprint, applyBlueprint, type Blueprint } from '@minca/core/schemas';
46
+ import { reviewBlueprint, applyBlueprint, type Blueprint } from '@minca/std';
47
47
 
48
48
  async function apply(proposal: NodeRecord<Blueprint>) {
49
49
  const review = reviewBlueprint(proposal.body!, await node.collections.list(space.id));
@@ -113,7 +113,7 @@ A definition can't say "write one rota for each week, and say in it who does
113
113
  what". A guide can, and an agent finds it through `collections_list`:
114
114
 
115
115
  ```typescript
116
- import { writeGuide } from '@minca/core/schemas';
116
+ import { writeGuide } from '@minca/std';
117
117
 
118
118
  await writeGuide(node, space.id, {
119
119
  name: 'chores.how',