@neuralis/brain-core 0.3.2 → 0.4.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 (311) hide show
  1. package/README.md +79 -1409
  2. package/app/README.md +1 -1
  3. package/app/cards/FilesystemCardShell.tsx +42 -4
  4. package/app/cards/FilesystemChangeCard.tsx +34 -11
  5. package/app/cards/README.md +6 -5
  6. package/app/cards/diffUtils.ts +99 -1
  7. package/app/filesystem/FilesystemHost.tsx +17 -2
  8. package/app/filesystem/api/README.md +3 -3
  9. package/app/filesystem/api/index.ts +35 -11
  10. package/app/filesystem/api/projectPackages.ts +13 -102
  11. package/app/filesystem/domain/types.ts +30 -10
  12. package/app/filesystem/hooks/README.md +3 -3
  13. package/app/filesystem/hooks/useDiscoverableSources.ts +19 -30
  14. package/app/filesystem/hooks/useFilesystemSSE.ts +1 -1
  15. package/app/filesystem/host/README.md +5 -3
  16. package/app/filesystem/host/buildFilesystemHostValue.ts +19 -0
  17. package/app/filesystem/host/installFilesystemHostComponents.tsx +1 -1
  18. package/app/filesystem/lib/sourceKindForm.ts +118 -39
  19. package/app/filesystem/lib/treeVisualState.tsx +98 -4
  20. package/app/filesystem/store/README.md +1 -0
  21. package/app/filesystem/store/filesystemStore.ts +86 -5
  22. package/app/filesystem/store/gitSlice.ts +5 -0
  23. package/app/filesystem/store/helpers.ts +17 -0
  24. package/app/filesystem/store/listSlice.ts +8 -0
  25. package/app/filesystem/ui/CodeEditor.tsx +18 -3
  26. package/app/filesystem/ui/FileEditor.tsx +15 -10
  27. package/app/filesystem/ui/FileTree.tsx +41 -16
  28. package/app/filesystem/ui/FolderPicker.tsx +251 -0
  29. package/app/filesystem/ui/GitControlPanel.tsx +5 -0
  30. package/app/filesystem/ui/PackagesPanel.tsx +52 -374
  31. package/app/filesystem/ui/PolicyEditor.tsx +109 -24
  32. package/app/filesystem/ui/README.md +17 -11
  33. package/app/filesystem/ui/RawMediaPreview.tsx +58 -0
  34. package/app/filesystem/ui/SourceBranchHeader.tsx +4 -4
  35. package/app/filesystem/ui/SourcesPanel.tsx +420 -360
  36. package/app/filesystem/ui/Toolbar.tsx +1 -2
  37. package/app/shared/filesystem.png +0 -0
  38. package/dist/app/host.js +57 -49
  39. package/dist/scripts/sourceRootPairV1.d.ts +47 -0
  40. package/dist/scripts/sourceRootPairV1.d.ts.map +1 -0
  41. package/dist/scripts/sourceRootPairV1.js +147 -0
  42. package/dist/scripts/sourceRootPairV1.js.map +1 -0
  43. package/dist/scripts/sourceToFolderV1.d.ts +56 -0
  44. package/dist/scripts/sourceToFolderV1.d.ts.map +1 -0
  45. package/dist/scripts/sourceToFolderV1.js +152 -0
  46. package/dist/scripts/sourceToFolderV1.js.map +1 -0
  47. package/dist/scripts/sourceToHostV1.d.ts +56 -0
  48. package/dist/scripts/sourceToHostV1.d.ts.map +1 -0
  49. package/dist/scripts/sourceToHostV1.js +132 -0
  50. package/dist/scripts/sourceToHostV1.js.map +1 -0
  51. package/dist/src/connectors/AppSourceConfigStore.d.ts +17 -3
  52. package/dist/src/connectors/AppSourceConfigStore.d.ts.map +1 -1
  53. package/dist/src/connectors/AppSourceConfigStore.js +46 -6
  54. package/dist/src/connectors/AppSourceConfigStore.js.map +1 -1
  55. package/dist/src/connectors/HostConnector.d.ts +201 -0
  56. package/dist/src/connectors/HostConnector.d.ts.map +1 -0
  57. package/dist/src/connectors/HostConnector.js +903 -0
  58. package/dist/src/connectors/HostConnector.js.map +1 -0
  59. package/dist/src/connectors/inProcessTransport.d.ts +131 -0
  60. package/dist/src/connectors/inProcessTransport.d.ts.map +1 -0
  61. package/dist/src/connectors/inProcessTransport.js +447 -0
  62. package/dist/src/connectors/inProcessTransport.js.map +1 -0
  63. package/dist/src/domain/access/callerPermissions.d.ts +29 -0
  64. package/dist/src/domain/access/callerPermissions.d.ts.map +1 -1
  65. package/dist/src/domain/access/callerPermissions.js +85 -5
  66. package/dist/src/domain/access/callerPermissions.js.map +1 -1
  67. package/dist/src/domain/access/nativeLocalFence.d.ts +65 -0
  68. package/dist/src/domain/access/nativeLocalFence.d.ts.map +1 -0
  69. package/dist/src/domain/access/nativeLocalFence.js +171 -0
  70. package/dist/src/domain/access/nativeLocalFence.js.map +1 -0
  71. package/dist/src/domain/access/uriPermission.js +3 -3
  72. package/dist/src/domain/access/uriPermission.js.map +1 -1
  73. package/dist/src/domain/byteRange.d.ts +15 -0
  74. package/dist/src/domain/byteRange.d.ts.map +1 -0
  75. package/dist/src/domain/byteRange.js +30 -0
  76. package/dist/src/domain/byteRange.js.map +1 -0
  77. package/dist/src/domain/defaultPermissions.d.ts.map +1 -1
  78. package/dist/src/domain/defaultPermissions.js +29 -0
  79. package/dist/src/domain/defaultPermissions.js.map +1 -1
  80. package/dist/src/domain/mime.d.ts +8 -16
  81. package/dist/src/domain/mime.d.ts.map +1 -1
  82. package/dist/src/domain/mime.js +10 -99
  83. package/dist/src/domain/mime.js.map +1 -1
  84. package/dist/src/domain/paths.d.ts.map +1 -1
  85. package/dist/src/domain/paths.js +5 -3
  86. package/dist/src/domain/paths.js.map +1 -1
  87. package/dist/src/domain/sourceConfig.d.ts +52 -19
  88. package/dist/src/domain/sourceConfig.d.ts.map +1 -1
  89. package/dist/src/domain/sourceConfig.js +103 -19
  90. package/dist/src/domain/sourceConfig.js.map +1 -1
  91. package/dist/src/domain/sourcePackages.d.ts +8 -8
  92. package/dist/src/domain/sourcePackages.d.ts.map +1 -1
  93. package/dist/src/domain/sourceRootPair.d.ts +88 -0
  94. package/dist/src/domain/sourceRootPair.d.ts.map +1 -0
  95. package/dist/src/domain/sourceRootPair.js +108 -0
  96. package/dist/src/domain/sourceRootPair.js.map +1 -0
  97. package/dist/src/domain/syncTypes.d.ts +8 -1
  98. package/dist/src/domain/syncTypes.d.ts.map +1 -1
  99. package/dist/src/domain/syncTypes.js +1 -0
  100. package/dist/src/domain/syncTypes.js.map +1 -1
  101. package/dist/src/domain/types.d.ts +24 -1
  102. package/dist/src/domain/types.d.ts.map +1 -1
  103. package/dist/src/domain/uri.d.ts.map +1 -1
  104. package/dist/src/domain/uri.js +3 -2
  105. package/dist/src/domain/uri.js.map +1 -1
  106. package/dist/src/embeddings/clients/GeminiEmbedder.d.ts.map +1 -1
  107. package/dist/src/embeddings/clients/GeminiEmbedder.js +2 -5
  108. package/dist/src/embeddings/clients/GeminiEmbedder.js.map +1 -1
  109. package/dist/src/embeddings/clients/OpenAIEmbedder.d.ts.map +1 -1
  110. package/dist/src/embeddings/clients/OpenAIEmbedder.js +2 -3
  111. package/dist/src/embeddings/clients/OpenAIEmbedder.js.map +1 -1
  112. package/dist/src/embeddings/clients/QwenEmbedder.d.ts +2 -0
  113. package/dist/src/embeddings/clients/QwenEmbedder.d.ts.map +1 -1
  114. package/dist/src/embeddings/clients/QwenEmbedder.js +10 -2
  115. package/dist/src/embeddings/clients/QwenEmbedder.js.map +1 -1
  116. package/dist/src/embeddings/clients/VoyageEmbedder.d.ts +2 -0
  117. package/dist/src/embeddings/clients/VoyageEmbedder.d.ts.map +1 -1
  118. package/dist/src/embeddings/clients/VoyageEmbedder.js +8 -1
  119. package/dist/src/embeddings/clients/VoyageEmbedder.js.map +1 -1
  120. package/dist/src/embeddings/factory.d.ts +5 -3
  121. package/dist/src/embeddings/factory.d.ts.map +1 -1
  122. package/dist/src/embeddings/factory.js +7 -3
  123. package/dist/src/embeddings/factory.js.map +1 -1
  124. package/dist/src/embeddings/models.d.ts +1 -1
  125. package/dist/src/embeddings/models.d.ts.map +1 -1
  126. package/dist/src/embeddings/retry.js +1 -1
  127. package/dist/src/embeddings/retry.js.map +1 -1
  128. package/dist/src/embeddings/types.d.ts +6 -0
  129. package/dist/src/embeddings/types.d.ts.map +1 -1
  130. package/dist/src/embeddings/types.js +11 -0
  131. package/dist/src/embeddings/types.js.map +1 -1
  132. package/dist/src/git/GitRunner.d.ts +110 -30
  133. package/dist/src/git/GitRunner.d.ts.map +1 -1
  134. package/dist/src/git/GitRunner.js +511 -199
  135. package/dist/src/git/GitRunner.js.map +1 -1
  136. package/dist/src/git/GitWatchRegistry.d.ts +41 -35
  137. package/dist/src/git/GitWatchRegistry.d.ts.map +1 -1
  138. package/dist/src/git/GitWatchRegistry.js +61 -79
  139. package/dist/src/git/GitWatchRegistry.js.map +1 -1
  140. package/dist/src/git/gitPlace.d.ts +61 -0
  141. package/dist/src/git/gitPlace.d.ts.map +1 -0
  142. package/dist/src/git/gitPlace.js +74 -0
  143. package/dist/src/git/gitPlace.js.map +1 -0
  144. package/dist/src/git/sourceGitControl.d.ts +31 -19
  145. package/dist/src/git/sourceGitControl.d.ts.map +1 -1
  146. package/dist/src/git/sourceGitControl.js +208 -92
  147. package/dist/src/git/sourceGitControl.js.map +1 -1
  148. package/dist/src/git/sourceGitStatus.js +1 -1
  149. package/dist/src/git/sourceGitStatus.js.map +1 -1
  150. package/dist/src/git/untrackedStats.js +1 -1
  151. package/dist/src/git/untrackedStats.js.map +1 -1
  152. package/dist/src/index.d.ts +2 -1
  153. package/dist/src/index.d.ts.map +1 -1
  154. package/dist/src/index.js +2 -1
  155. package/dist/src/index.js.map +1 -1
  156. package/dist/src/lifecycle.d.ts +8 -11
  157. package/dist/src/lifecycle.d.ts.map +1 -1
  158. package/dist/src/lifecycle.js +2 -1
  159. package/dist/src/lifecycle.js.map +1 -1
  160. package/dist/src/routes/git.d.ts.map +1 -1
  161. package/dist/src/routes/git.js +183 -54
  162. package/dist/src/routes/git.js.map +1 -1
  163. package/dist/src/routes/helpers/uriGuard.d.ts +1 -1
  164. package/dist/src/routes/helpers/uriGuard.d.ts.map +1 -1
  165. package/dist/src/routes/helpers/uriGuard.js +3 -2
  166. package/dist/src/routes/helpers/uriGuard.js.map +1 -1
  167. package/dist/src/routes/helpers.d.ts +10 -3
  168. package/dist/src/routes/helpers.d.ts.map +1 -1
  169. package/dist/src/routes/helpers.js +12 -5
  170. package/dist/src/routes/helpers.js.map +1 -1
  171. package/dist/src/routes/list.d.ts.map +1 -1
  172. package/dist/src/routes/list.js +2 -3
  173. package/dist/src/routes/list.js.map +1 -1
  174. package/dist/src/routes/policies.d.ts +6 -4
  175. package/dist/src/routes/policies.d.ts.map +1 -1
  176. package/dist/src/routes/policies.js +22 -16
  177. package/dist/src/routes/policies.js.map +1 -1
  178. package/dist/src/routes/raw.d.ts.map +1 -1
  179. package/dist/src/routes/raw.js +65 -11
  180. package/dist/src/routes/raw.js.map +1 -1
  181. package/dist/src/routes/sources.d.ts +60 -18
  182. package/dist/src/routes/sources.d.ts.map +1 -1
  183. package/dist/src/routes/sources.js +411 -299
  184. package/dist/src/routes/sources.js.map +1 -1
  185. package/dist/src/services/BridgeService.d.ts +15 -35
  186. package/dist/src/services/BridgeService.d.ts.map +1 -1
  187. package/dist/src/services/BridgeService.js +30 -88
  188. package/dist/src/services/BridgeService.js.map +1 -1
  189. package/dist/src/services/FilesystemService.d.ts +3 -2
  190. package/dist/src/services/FilesystemService.d.ts.map +1 -1
  191. package/dist/src/services/FilesystemService.js +110 -32
  192. package/dist/src/services/FilesystemService.js.map +1 -1
  193. package/dist/src/services/FilesystemUiService.d.ts +4 -1
  194. package/dist/src/services/FilesystemUiService.d.ts.map +1 -1
  195. package/dist/src/services/FilesystemUiService.js +66 -25
  196. package/dist/src/services/FilesystemUiService.js.map +1 -1
  197. package/dist/src/services/SyncScheduler.d.ts +12 -4
  198. package/dist/src/services/SyncScheduler.d.ts.map +1 -1
  199. package/dist/src/services/SyncScheduler.js +37 -8
  200. package/dist/src/services/SyncScheduler.js.map +1 -1
  201. package/dist/src/services/baselineRepair.d.ts +13 -3
  202. package/dist/src/services/baselineRepair.d.ts.map +1 -1
  203. package/dist/src/services/baselineRepair.js +13 -3
  204. package/dist/src/services/baselineRepair.js.map +1 -1
  205. package/dist/src/services/declaredSources.d.ts +125 -42
  206. package/dist/src/services/declaredSources.d.ts.map +1 -1
  207. package/dist/src/services/declaredSources.js +117 -45
  208. package/dist/src/services/declaredSources.js.map +1 -1
  209. package/dist/src/store/dataFormats.d.ts +17 -2
  210. package/dist/src/store/dataFormats.d.ts.map +1 -1
  211. package/dist/src/store/dataFormats.js +18 -3
  212. package/dist/src/store/dataFormats.js.map +1 -1
  213. package/dist/src/sync/DeltaSyncRunner.d.ts.map +1 -1
  214. package/dist/src/sync/DeltaSyncRunner.js +144 -4
  215. package/dist/src/sync/DeltaSyncRunner.js.map +1 -1
  216. package/dist/src/sync/SyncJobQueue.d.ts +7 -2
  217. package/dist/src/sync/SyncJobQueue.d.ts.map +1 -1
  218. package/dist/src/sync/SyncJobQueue.js +16 -10
  219. package/dist/src/sync/SyncJobQueue.js.map +1 -1
  220. package/dist/src/sync/SyncWatchService.d.ts +21 -4
  221. package/dist/src/sync/SyncWatchService.d.ts.map +1 -1
  222. package/dist/src/sync/SyncWatchService.js +115 -10
  223. package/dist/src/sync/SyncWatchService.js.map +1 -1
  224. package/dist/src/sync/categoryInference.d.ts +1 -1
  225. package/dist/src/sync/categoryInference.js +1 -1
  226. package/dist/src/usecases/admitSourceRoot.d.ts +65 -0
  227. package/dist/src/usecases/admitSourceRoot.d.ts.map +1 -0
  228. package/dist/src/usecases/admitSourceRoot.js +85 -0
  229. package/dist/src/usecases/admitSourceRoot.js.map +1 -0
  230. package/dist/src/usecases/browseSourceFolders.d.ts +85 -0
  231. package/dist/src/usecases/browseSourceFolders.d.ts.map +1 -0
  232. package/dist/src/usecases/browseSourceFolders.js +210 -0
  233. package/dist/src/usecases/browseSourceFolders.js.map +1 -0
  234. package/dist/src/usecases/createDeclaredSources.d.ts +13 -2
  235. package/dist/src/usecases/createDeclaredSources.d.ts.map +1 -1
  236. package/dist/src/usecases/createDeclaredSources.js +39 -0
  237. package/dist/src/usecases/createDeclaredSources.js.map +1 -1
  238. package/dist/src/usecases/list.d.ts.map +1 -1
  239. package/dist/src/usecases/list.js +83 -26
  240. package/dist/src/usecases/list.js.map +1 -1
  241. package/dist/src/usecases/listAttachableDevices.d.ts +13 -0
  242. package/dist/src/usecases/listAttachableDevices.d.ts.map +1 -0
  243. package/dist/src/usecases/listAttachableDevices.js +10 -0
  244. package/dist/src/usecases/listAttachableDevices.js.map +1 -0
  245. package/dist/src/usecases/listSourcePackages.d.ts.map +1 -1
  246. package/dist/src/usecases/listSourcePackages.js +2 -5
  247. package/dist/src/usecases/listSourcePackages.js.map +1 -1
  248. package/dist/src/usecases/purgeExcludedPoints.d.ts.map +1 -1
  249. package/dist/src/usecases/purgeExcludedPoints.js +3 -2
  250. package/dist/src/usecases/purgeExcludedPoints.js.map +1 -1
  251. package/dist/src/usecases/readFiles.d.ts.map +1 -1
  252. package/dist/src/usecases/readFiles.js +15 -0
  253. package/dist/src/usecases/readFiles.js.map +1 -1
  254. package/dist/src/usecases/reconcileSourcePackageRoots.d.ts +1 -1
  255. package/dist/src/usecases/reconcileSourcePackageRoots.d.ts.map +1 -1
  256. package/dist/src/usecases/reconcileSourcePackageRoots.js +2 -1
  257. package/dist/src/usecases/reconcileSourcePackageRoots.js.map +1 -1
  258. package/dist/src/usecases/revokePrincipal.d.ts +7 -5
  259. package/dist/src/usecases/revokePrincipal.d.ts.map +1 -1
  260. package/dist/src/usecases/revokePrincipal.js +29 -7
  261. package/dist/src/usecases/revokePrincipal.js.map +1 -1
  262. package/dist/src/usecases/scheduleSourceSync.d.ts +7 -0
  263. package/dist/src/usecases/scheduleSourceSync.d.ts.map +1 -1
  264. package/dist/src/usecases/scheduleSourceSync.js +6 -5
  265. package/dist/src/usecases/scheduleSourceSync.js.map +1 -1
  266. package/dist/src/usecases/triggerSourceSync.d.ts +46 -0
  267. package/dist/src/usecases/triggerSourceSync.d.ts.map +1 -0
  268. package/dist/src/usecases/triggerSourceSync.js +75 -0
  269. package/dist/src/usecases/triggerSourceSync.js.map +1 -0
  270. package/dist/src/usecases/uploadBinary.d.ts +2 -1
  271. package/dist/src/usecases/uploadBinary.d.ts.map +1 -1
  272. package/dist/src/usecases/uploadBinary.js +2 -2
  273. package/dist/src/usecases/uploadBinary.js.map +1 -1
  274. package/dist/src/usecases/vector/endpointGuard.d.ts +1 -1
  275. package/dist/src/usecases/vector/endpointGuard.js +1 -1
  276. package/dist/src/vector/qdrantClient.d.ts +1 -1
  277. package/dist/src/vector/qdrantClient.js +1 -1
  278. package/dist/src/wiring.d.ts +3 -0
  279. package/dist/src/wiring.d.ts.map +1 -1
  280. package/dist/src/wiring.js +72 -6
  281. package/dist/src/wiring.js.map +1 -1
  282. package/package.json +145 -54
  283. package/skills/connect-business-data/SKILL.md +2 -2
  284. package/skills/create-package/SKILL.md +18 -18
  285. package/skills/create-package/references/config-and-credentials.md +16 -13
  286. package/skills/create-package/references/connectors-and-uri-policies.md +36 -27
  287. package/skills/create-package/references/manifest-and-discovery.md +12 -12
  288. package/skills/create-package/references/runtime-and-build.md +18 -18
  289. package/skills/create-package/references/skills-and-context.md +35 -19
  290. package/skills/create-package/references/surfaces-and-design.md +16 -16
  291. package/skills/create-package/references/team-and-workflows.md +2 -2
  292. package/skills/create-package/references/test-and-ship.md +17 -17
  293. package/skills/create-package/references/tools-and-schemas.md +5 -5
  294. package/skills/create-package/scripts/{check-package.sh → check-package.mjs} +78 -64
  295. package/skills/create-package/scripts/{verify-loaded.sh → verify-loaded.mjs} +156 -162
  296. package/skills/git/SKILL.md +31 -29
  297. package/skills/manage-files/SKILL.md +11 -14
  298. package/skills/manage-sources/SKILL.md +85 -45
  299. package/skills/manage-uri-policy/SKILL.md +9 -6
  300. package/skills/sync/SKILL.md +1 -1
  301. package/dist/src/connectors/LocalDiskConnector.d.ts +0 -171
  302. package/dist/src/connectors/LocalDiskConnector.d.ts.map +0 -1
  303. package/dist/src/connectors/LocalDiskConnector.js +0 -1233
  304. package/dist/src/connectors/LocalDiskConnector.js.map +0 -1
  305. package/skills/manage-files/scripts/copy.sh +0 -7
  306. package/skills/manage-files/scripts/create.sh +0 -7
  307. package/skills/manage-files/scripts/mkdir.sh +0 -7
  308. package/skills/manage-files/scripts/modify.sh +0 -7
  309. package/skills/manage-files/scripts/upload.sh +0 -16
  310. package/skills/manage-files/scripts/write.sh +0 -29
  311. package/skills/manage-sources/scripts/reembed.sh +0 -23
package/package.json CHANGED
@@ -1,8 +1,23 @@
1
1
  {
2
2
  "name": "@neuralis/brain-core",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "license": "FSL-1.1-ALv2",
5
5
  "homepage": "https://docs.neuralisapp.com/brain-core",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/neuralisapp/neuralis.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/neuralisapp/neuralis/issues"
12
+ },
13
+ "keywords": [
14
+ "neuralis",
15
+ "neuralis-package",
16
+ "vector-search",
17
+ "rag",
18
+ "virtual-filesystem",
19
+ "ai-agents"
20
+ ],
6
21
  "type": "module",
7
22
  "publishConfig": {
8
23
  "access": "public"
@@ -33,6 +48,18 @@
33
48
  "./upgrade/vector-proof": {
34
49
  "types": "./dist/scripts/vectorProofV1.d.ts",
35
50
  "default": "./dist/scripts/vectorProofV1.js"
51
+ },
52
+ "./upgrade/source-root-pair": {
53
+ "types": "./dist/scripts/sourceRootPairV1.d.ts",
54
+ "default": "./dist/scripts/sourceRootPairV1.js"
55
+ },
56
+ "./upgrade/source-to-folder": {
57
+ "types": "./dist/scripts/sourceToFolderV1.d.ts",
58
+ "default": "./dist/scripts/sourceToFolderV1.js"
59
+ },
60
+ "./upgrade/source-to-host": {
61
+ "types": "./dist/scripts/sourceToHostV1.d.ts",
62
+ "default": "./dist/scripts/sourceToHostV1.js"
36
63
  }
37
64
  },
38
65
  "typesVersions": {
@@ -57,25 +84,24 @@
57
84
  ],
58
85
  "dependencies": {
59
86
  "@codemirror/commands": "^6.11.1",
60
- "@codemirror/language": "^6.12.4",
61
- "@codemirror/merge": "^6.12.2",
87
+ "@codemirror/language": "^6.13.1",
88
+ "@codemirror/merge": "^6.12.3",
62
89
  "@codemirror/state": "^6.7.6",
63
- "@codemirror/view": "^6.43.13",
64
- "@iconify-json/vscode-icons": "^1.2.81",
65
- "@iconify/react": "^6.0.2",
66
- "@neuralis/package-system": "0.3.2",
67
- "@qdrant/js-client-rest": "1.19.0",
90
+ "@codemirror/view": "^6.43.15",
91
+ "@iconify-json/vscode-icons": "^1.2.94",
92
+ "@iconify/react": "^6.0.3",
93
+ "@neuralis/package-system": "0.4.0",
94
+ "@qdrant/js-client-rest": "1.20.0",
68
95
  "@shikijs/engine-javascript": "^4.4.3",
69
96
  "@shikijs/langs": "^4.4.3",
70
97
  "@shikijs/themes": "^4.4.3",
71
98
  "react-diff-view": "^3.3.3",
72
- "shiki": "^4.4.3",
73
- "simple-git": "^4.0.2"
99
+ "shiki": "^4.4.3"
74
100
  },
75
101
  "peerDependencies": {
76
102
  "@aws-sdk/client-s3": "^3.975.0",
77
103
  "@aws-sdk/s3-request-presigner": "^3.975.0",
78
- "@neuralis/agent-core": "0.3.2",
104
+ "@neuralis/agent-core": "0.4.0",
79
105
  "@tanstack/react-virtual": "^3.13.0",
80
106
  "lucide-react": "^1.47.0",
81
107
  "react": "^19.0.0",
@@ -112,7 +138,7 @@
112
138
  "@types/node": "^26.6.2",
113
139
  "@types/react": "^19.3.0",
114
140
  "@types/react-dom": "^19.3.0",
115
- "jsdom": "^30.1.1",
141
+ "jsdom": "^30.1.3",
116
142
  "typescript": "^7.0.2",
117
143
  "vitest": "^5.0.1"
118
144
  },
@@ -128,9 +154,6 @@
128
154
  "authors": [
129
155
  "Neuralis"
130
156
  ],
131
- "source": {
132
- "kind": "neuralis"
133
- },
134
157
  "runtime": {
135
158
  "binding": "embedded",
136
159
  "hosted": {
@@ -153,15 +176,15 @@
153
176
  ]
154
177
  },
155
178
  {
156
- "id": "local-disk",
157
- "kind": "local",
179
+ "id": "host",
180
+ "kind": "host",
158
181
  "type": "source",
159
182
  "transport": "in-process",
160
- "name": "Local Disk",
161
- "description": "A folder on this machine, mounted into the workspace by absolute path — read, write, search and index its files with the fs_* tools.",
183
+ "name": "Host folder",
184
+ "description": "A folder as a source — on this server, or on a paired device through its broker — read, write, search and index its files with the fs_* tools. A device folder is attached only by the device's owner (device.own), every path is clamped by that owner's ceiling, and an offline device serves its indexed text.",
162
185
  "icon": "HardDrive",
163
186
  "category": "disk",
164
- "urlScheme": "local",
187
+ "urlScheme": "host",
165
188
  "defaultScope": "project",
166
189
  "scopeSelectable": true,
167
190
  "allowedScopes": [
@@ -172,34 +195,73 @@
172
195
  "configSchema": {
173
196
  "type": "object",
174
197
  "additionalProperties": false,
198
+ "x-neuralis": {
199
+ "ui": {
200
+ "summary": "A folder on this server or one of your devices"
201
+ }
202
+ },
175
203
  "properties": {
176
204
  "root": {
177
205
  "type": "string",
178
206
  "minLength": 1,
179
- "description": "Absolute or project-relative path to the directory the agent should see.",
207
+ "description": "The folder: on this server an absolute or project-relative path; on a device an absolute path ON THAT DEVICE (`/…`, `C:\\…` on Windows; never a UNC share), inside its owner's ceiling.",
180
208
  "x-neuralis": {
181
209
  "ui": {
182
- "label": "Root path",
210
+ "label": "Folder",
183
211
  "control": "container-path",
184
- "placeholder": "/home/user/my-project"
212
+ "placeholder": "/home/user/my-project",
213
+ "deviceLabel": "Folder on the device",
214
+ "devicePlaceholder": "/home/you/projects",
215
+ "devicePlaceholders": {
216
+ "win32": "C:\\Users\\you\\projects",
217
+ "darwin": "/Users/you/projects",
218
+ "linux": "/home/you/projects"
219
+ },
220
+ "browse": true
185
221
  }
186
222
  }
187
223
  },
188
224
  "hostRoot": {
189
225
  "type": "string",
190
- "description": "Host-side mirror of the path when running inside a container. Used by `resolveOsUri` so ide_open-style tools surface a usable host path.",
226
+ "description": "Host-side mirror of the path when running inside a container. Used by `resolveOsUri` so ide_open-style tools surface a usable host path. Never beside `device`.",
191
227
  "x-neuralis": {
192
228
  "ui": {
193
229
  "label": "Host mirror path",
194
230
  "control": "host-path",
195
- "optional": true
231
+ "optional": true,
232
+ "advanced": true,
233
+ "placeholder": "auto",
234
+ "help": "Derived from the mount; set it only for a folder no mount names (sources.privileged)."
235
+ }
236
+ }
237
+ },
238
+ "device": {
239
+ "type": "string",
240
+ "minLength": 1,
241
+ "pattern": "^dev_[A-Za-z0-9]+$",
242
+ "description": "The paired device (`dev_…`, from `neuralis device status`) the folder lives on; absent = this server. Only that device's owner may attach a folder to it, and it never changes after the attach.",
243
+ "x-neuralis": {
244
+ "ui": {
245
+ "label": "Where",
246
+ "control": "select",
247
+ "optionsRoute": "sources/devices",
248
+ "optional": true,
249
+ "emptyLabel": "This server",
250
+ "help": "Your computer is not listed? Pair it first: \"Pair this computer…\" in the Neuralis app's tray, or run neuralis device pair on it.",
251
+ "transport": true
196
252
  }
197
253
  }
198
254
  }
199
255
  },
200
256
  "required": [
201
257
  "root"
202
- ]
258
+ ],
259
+ "not": {
260
+ "required": [
261
+ "device",
262
+ "hostRoot"
263
+ ]
264
+ }
203
265
  },
204
266
  "capabilities": [
205
267
  "list",
@@ -268,7 +330,7 @@
268
330
  "exec": false
269
331
  }
270
332
  },
271
- "connectorFactory": "./dist/src/connectors/LocalDiskConnector.js#createLocalDiskConnector"
333
+ "connectorFactory": "./dist/src/connectors/HostConnector.js#createHostConnector"
272
334
  },
273
335
  {
274
336
  "id": "brain-internal",
@@ -314,7 +376,7 @@
314
376
  "sources": [
315
377
  {
316
378
  "source": "data",
317
- "kind": "local",
379
+ "kind": "host",
318
380
  "root": "data",
319
381
  "scope": "project",
320
382
  "seed": "auto",
@@ -375,7 +437,7 @@
375
437
  },
376
438
  {
377
439
  "source": "packages",
378
- "kind": "local",
440
+ "kind": "host",
379
441
  "root": "_packages",
380
442
  "scope": "project",
381
443
  "seed": "auto",
@@ -604,7 +666,6 @@
604
666
  "description": "Parallel file processing during sync",
605
667
  "type": "number",
606
668
  "default": 3,
607
- "envFallback": "BRAIN_SYNC_CONCURRENCY",
608
669
  "category": "brain"
609
670
  },
610
671
  {
@@ -640,7 +701,7 @@
640
701
  "label": "Embedding Request Timeout (ms)",
641
702
  "description": "Maximum time for an embedding response including its body. Raise this for slower local servers or large batches; timeout preserves payload indexing.",
642
703
  "type": "number",
643
- "default": 30000,
704
+ "default": 120000,
644
705
  "category": "brain",
645
706
  "min": 1000,
646
707
  "max": 600000
@@ -717,7 +778,6 @@
717
778
  "description": "Queue-level cap on concurrently RUNNING sync jobs (distinct from Sync Concurrency, the per-file fan-out inside one job). Applies live to the next queue pump.",
718
779
  "type": "number",
719
780
  "default": 2,
720
- "envFallback": "BRAIN_SYNC_MAX_CONCURRENT",
721
781
  "category": "brain",
722
782
  "min": 1,
723
783
  "max": 8
@@ -760,6 +820,34 @@
760
820
  "min": 30000,
761
821
  "max": 604800000
762
822
  },
823
+ {
824
+ "key": "brainSyncPollIntervalMs",
825
+ "label": "Sync Scheduler Interval (ms)",
826
+ "description": "How often the sync scheduler checks which sources are due (first sync, filter change, reconcile cadence, a device back online). Applies on restart.",
827
+ "type": "number",
828
+ "default": 60000,
829
+ "category": "brain",
830
+ "min": 5000,
831
+ "max": 3600000
832
+ },
833
+ {
834
+ "key": "brainSyncBootReconcile",
835
+ "label": "Sync After Start",
836
+ "description": "One delta sync of every auto-trigger source shortly after the app starts, so files changed while it was stopped (or left by an interrupted sync) are indexed now instead of at the next reconcile cadence. Runs through the sync queue under Sync Queue Max Jobs. Applies on restart.",
837
+ "type": "boolean",
838
+ "default": true,
839
+ "category": "brain"
840
+ },
841
+ {
842
+ "key": "brainSyncBootReconcileDelayMs",
843
+ "label": "Sync After Start Delay (ms)",
844
+ "description": "How long after start the one after-start sync runs, so it does not compete with the first page load. Applies on restart.",
845
+ "type": "number",
846
+ "default": 30000,
847
+ "category": "brain",
848
+ "min": 0,
849
+ "max": 600000
850
+ },
763
851
  {
764
852
  "key": "vectorChunkTargetChars",
765
853
  "label": "Chunk Target Size (chars)",
@@ -840,6 +928,16 @@
840
928
  "min": 1000,
841
929
  "max": 300000
842
930
  },
931
+ {
932
+ "key": "brainWatchMaxFolders",
933
+ "label": "Watcher Folder Budget",
934
+ "description": "The most folders one source's live watch walks and watches on Linux, on this server and on a device; files cost nothing, and excluded trees such as node_modules and .git are never entered. The budget bounds this watcher's walk and its memory (about 2.5 KB per folder). The kernel's own watch memory is per distinct folder on the machine, shared by every source and host that watches it, and the machine limit (fs.inotify.max_user_watches) is the real floor: past it, or past the budget, the rest of the source is not watched, the Sources panel shows the live state as partial, and changes there arrive through the regular sync reconcile. macOS and Windows watch a whole source with one handle and ignore this value. A device clamps it to its own ceiling (200 000). Applies at the next watcher acquisition.",
935
+ "type": "number",
936
+ "default": 200000,
937
+ "category": "brain",
938
+ "min": 100,
939
+ "max": 1000000
940
+ },
843
941
  {
844
942
  "key": "brainSyncMaxIndexTextChars",
845
943
  "label": "Sync Max Index Text (chars)",
@@ -853,7 +951,7 @@
853
951
  {
854
952
  "key": "brainGrepContextConcurrency",
855
953
  "label": "Grep Context Read Concurrency",
856
- "description": "How many context reads a grep search may have in flight at once. Raise it on a fast local disk, lower it when a slow connector (a webtop or host plane) is the bottleneck.",
954
+ "description": "How many context reads a grep search may have in flight at once. Raise it on a fast local disk, lower it when a slow connector (a webtop or device plane) is the bottleneck.",
857
955
  "type": "number",
858
956
  "default": 8,
859
957
  "category": "brain",
@@ -1021,12 +1119,12 @@
1021
1119
  {
1022
1120
  "key": "brainMaxReadFileMb",
1023
1121
  "label": "Max Read File Size (MB)",
1024
- "description": "Hard cap on connector file reads — larger files fail with 'File too large' for fs_read and every read-path consumer.",
1122
+ "description": "The one ceiling of a whole-file read, the same for a folder on this server and on a paired device — larger files fail with 'File too large' for fs_read, the Files preview and every read-path consumer. A preview's ranged request (video seeking) moves at most 8 MB per answer whatever this says. Each whole read holds the file in memory once.",
1025
1123
  "type": "number",
1026
- "default": 20,
1124
+ "default": 100,
1027
1125
  "category": "brain",
1028
1126
  "min": 1,
1029
- "max": 200
1127
+ "max": 1024
1030
1128
  },
1031
1129
  {
1032
1130
  "key": "inlineImageMaxMb",
@@ -1073,7 +1171,7 @@
1073
1171
  "label": "Content Scan Timeout (ms)",
1074
1172
  "description": "Kill timeout for the grep/rg/git-grep child process behind fs_search grep mode; on timeout the search fails soft with 'Search timed out'.",
1075
1173
  "type": "number",
1076
- "default": 30000,
1174
+ "default": 120000,
1077
1175
  "category": "brain",
1078
1176
  "min": 1000,
1079
1177
  "max": 300000
@@ -1081,7 +1179,7 @@
1081
1179
  {
1082
1180
  "key": "brainCountCacheTtlMs",
1083
1181
  "label": "File Count Cache TTL (ms)",
1084
- "description": "Cache TTL for connector file-count walks shown in the sources UI — a fresh walk at most once per TTL per root.",
1182
+ "description": "Cache TTL for connector file-count walks shown in the sources UI — a fresh walk at most once per TTL per root; an older count is shown at once while one walk refreshes it.",
1085
1183
  "type": "number",
1086
1184
  "default": 60000,
1087
1185
  "category": "brain",
@@ -1141,7 +1239,7 @@
1141
1239
  {
1142
1240
  "key": "brainListConnectorConcurrency",
1143
1241
  "label": "List Connector Concurrency",
1144
- "description": "How many source connectors a single listing walks at once. Higher finishes a multi-source listing sooner; lower is gentler on slow mounts and remote APIs.",
1242
+ "description": "How many source connectors a single listing walks (or counts) at once. Higher finishes a multi-source listing sooner; lower is gentler on slow mounts and remote APIs.",
1145
1243
  "type": "number",
1146
1244
  "default": 4,
1147
1245
  "category": "brain",
@@ -1351,7 +1449,7 @@
1351
1449
  "label": "Git Panel Timeout (ms)",
1352
1450
  "description": "Inactivity cap for the on-demand whole-repo status and branch list behind the git panel. Fails soft to an empty panel.",
1353
1451
  "type": "number",
1354
- "default": 5000,
1452
+ "default": 15000,
1355
1453
  "category": "brain",
1356
1454
  "min": 1000,
1357
1455
  "max": 60000
@@ -1361,7 +1459,7 @@
1361
1459
  "label": "Git Heavy Timeout (ms)",
1362
1460
  "description": "Inactivity cap for heavy on-demand git readers: per-file diff, commit DAG, blob show. Caps silence, not wall-clock — streaming output resets it.",
1363
1461
  "type": "number",
1364
- "default": 15000,
1462
+ "default": 60000,
1365
1463
  "category": "brain",
1366
1464
  "min": 2000,
1367
1465
  "max": 120000
@@ -1425,10 +1523,7 @@
1425
1523
  "permissions": {
1426
1524
  "read": true
1427
1525
  },
1428
- "roles": [
1429
- "owner",
1430
- "admin"
1431
- ],
1526
+ "priority": 2,
1432
1527
  "override": true
1433
1528
  },
1434
1529
  {
@@ -1436,10 +1531,7 @@
1436
1531
  "permissions": {
1437
1532
  "read": true
1438
1533
  },
1439
- "roles": [
1440
- "owner",
1441
- "admin"
1442
- ],
1534
+ "priority": 2,
1443
1535
  "override": true
1444
1536
  },
1445
1537
  {
@@ -1456,10 +1548,7 @@
1456
1548
  "read": true,
1457
1549
  "write": true
1458
1550
  },
1459
- "roles": [
1460
- "owner",
1461
- "admin"
1462
- ],
1551
+ "priority": 2,
1463
1552
  "override": true
1464
1553
  }
1465
1554
  ]
@@ -2494,7 +2583,7 @@
2494
2583
  }
2495
2584
  ],
2496
2585
  "access": {
2497
- "trust": "first-party"
2586
+ "trust": "native"
2498
2587
  },
2499
2588
  "app": {
2500
2589
  "module": {
@@ -2541,6 +2630,7 @@
2541
2630
  {
2542
2631
  "kind": "dock",
2543
2632
  "id": "brain-core.filesystem",
2633
+ "image": "app/shared/filesystem.png",
2544
2634
  "label": "Filesystem",
2545
2635
  "icon": "Folder",
2546
2636
  "color": "#60a5fa",
@@ -2593,6 +2683,7 @@
2593
2683
  "postbuild": "node scripts/copyContracts.mjs",
2594
2684
  "build:ui": "neuralis-build ui",
2595
2685
  "typecheck:app": "tsc -p app/tsconfig.json",
2686
+ "typecheck:test": "tsc -p test/tsconfig.json",
2596
2687
  "test": "vitest run"
2597
2688
  }
2598
2689
  }
@@ -40,7 +40,7 @@ retention and indexing behavior.
40
40
  vendor's official skill, MCP server or plugin (create-package
41
41
  `references/connectors-and-uri-policies.md` §The headline); build a source connector only when
42
42
  neither exists or searchable filesystem semantics are required. An outbound connector belongs
43
- to ONE tenant — the platform lane for a first-party install, otherwise the owning project — so
43
+ to ONE tenant — the platform lane for a native install, otherwise the owning project — so
44
44
  the set you can see is the platform lane plus your own project, and an id from another project
45
45
  answers the same generic `404` as a typo. Its write surface is admin-gated: listing rides
46
46
  `core.observe`, but creating, configuring, connecting, enabling or deleting one needs
@@ -55,7 +55,7 @@ retention and indexing behavior.
55
55
 
56
56
  Use `connect` to list sources, inspect one source's health, or create a source
57
57
  from its explicit `{connection, permissions, sync?, description?, scope?,
58
- recognizesPackages?}` options. Use `manage-sources` for the full lifecycle,
58
+ packageFolders?}` options. Use `manage-sources` for the full lifecycle,
59
59
  including kind/schema discovery, policy-preserving updates, sync and deletion:
60
60
 
61
61
  1. List source kinds and read the chosen kind's schema.
@@ -31,10 +31,10 @@ a human can press is half a capability.
31
31
 
32
32
  1. **Prove it does not already exist.** Mandatory, not advisory: a second skill that half-duplicates an existing one is worse than none — both match, and the model picks between them at random.
33
33
  2. **Fix before you add.** Extend the existing skill, tool or reference; a new file needs a stated reason the existing owner cannot hold it. An edit leaves the file no larger unless it says why — improve the sentence that is now wrong, never append a changelog or a "we used to think" note.
34
- 3. **Category comes from the folder, never from frontmatter** — `skills/<name>/SKILL.md`, and flat `.md` under `rules/`, `instructions/`, `agents/`, `docs/`. A `category:` or `role:` key is ignored. And every `.md` in ALL FOUR flat categories needs `id:` or `name:` frontmatter (a non-empty string) or discovery silently skips it — ONE kernel rule (`admitsContribution`) that runs the same on an installed package, a `_packages/` drop, a synced source (where the file is indexed as a plain `file` instead) and the marketplace scanner. Exempt are only the forms whose FILENAME is the identity by protocol: `skills/<name>/SKILL.md` (id from the folder name), `commands/*.md`, the identity basenames (`AGENTS.md`, `CLAUDE.md`, `CLAUDE.local.md`, `GEMINI.md`, `.github/copilot-instructions.md`), `.cursorrules`/`.windsurfrules` and `.cursor/rules/*.mdc`. `*.agent.md` is NOT exempt.
34
+ 3. **Category comes from the folder, never from frontmatter** — `skills/<name>/SKILL.md`, and flat `.md` under `rules/`, `instructions/`, `agents/`, `docs/`. A `category:` or `role:` key is ignored. And every `.md` in ALL FOUR flat categories needs a non-empty `id:` or `name:` frontmatter or discovery silently skips it — ONE kernel rule (`admitsContribution`) that runs the same on an installed package, a `_packages/` drop, a synced source (there it is indexed as a plain `file`) and the marketplace scanner. Exempt are only the forms whose FILENAME is the identity: `skills/<name>/SKILL.md` (id from the folder name), `commands/*.md`, the identity basenames (`AGENTS.md`/`AGENTS.local.md`/`AGENT.md`, `CLAUDE.md`/`CLAUDE.local.md`, `GEMINI.md`, `.github/copilot-instructions.md`), `.cursorrules`/`.windsurfrules` and `.cursor/rules/*.mdc`. `*.agent.md` is NOT exempt.
35
35
  4. **`requiredFeatures: [a, b]` is flat.** A nested `requires:` block is read by nothing, so your gate silently does not exist.
36
36
  5. **Hidden means absent.** A caller lacking a feature never sees the skill, tool or widget, and activating it returns the same generic "not found" as a typo. Never build a "locked" state.
37
- 6. **Trust is assigned by where the package came from, never declared by it.** `access.trust: "first-party"` in a dropped manifest changes nothing.
37
+ 6. **Trust is assigned by where the package came from, never declared by it.** `access.trust: "native"` in a dropped manifest changes nothing.
38
38
  7. **`package.json#files` must list every first-level runtime folder** (`dist`, `tools`, `workflows`, `skills`, `rules`, `instructions`, `agents`, `docs`, `team`, `hooks.json`, `app`). Omit one and it works locally and ships empty.
39
39
  8. **A tool's name is its filename; the model-visible description is the root `description` field.** A tool file with no root `description` reaches the model with none.
40
40
  9. **A widget needs a companion `kind: "dock"` surface.** A `dock:` block inside a widget is inert; without the companion the widget is unreachable and nothing warns.
@@ -67,10 +67,10 @@ system — a governed tool plus a skill teaching the craft of driving it.
67
67
 
68
68
  ### Surfaces: two renderers, one entry rule
69
69
 
70
- **`direct`** is compiled React that the package's own first-party host entrypoint registers — the
70
+ **`direct`** is compiled React that the package's own native host entrypoint registers — the
71
71
  host never imports package TSX, so a `direct` surface renders only once that entrypoint is
72
72
  installed at runtime from the prebuilt module the manifest's `app.module` names
73
- (`neuralis-build ui`, first-party only).
73
+ (`neuralis-build ui`, native only).
74
74
  **`iframe`** is every other path and the only one a dropped package has. Nothing else exists:
75
75
  `inline-html` and `wasm-ui` were removed and now fail validation with a migration message. WASM is
76
76
  a **tool** runtime; there is no WASM UI engine.
@@ -112,7 +112,7 @@ what your package may contain.
112
112
  |---|---|---|---|
113
113
  | Lives in | a host dependency → `node_modules/@scope/name` | `<project>/_packages/<id>/` | a folder in a synced source, in a recognised layout |
114
114
  | Who ships it | whoever controls the deploy config — **the dependency IS the trust act** | anyone who can write `_packages/` | anyone who can write the source |
115
- | Trust | first-party (host-assigned) | untrusted; an admin may elevate to trusted; **never** first-party | inherits the source's scope and policy |
115
+ | Trust | native (host-assigned) | untrusted; an admin may elevate to trusted; **never** native | inherits the source's scope and policy |
116
116
  | Install step | add the dependency, restart | drop the folder (rescanned in ~half a second) | **none** — but it must be INDEXED to exist (below); once indexed it shows on the next stream |
117
117
  | Manifest | `package.json#neuralis` | `package.json#neuralis` or `neuralis.package.json` | none — the folder layout IS the anchor |
118
118
  | The five markdown categories | all five; rules inject | all five, but **rules become docs** and `prompt-context` activation is rewritten to `workspace` | all five, but **rules and identity files default OFF**, docs manual-only |
@@ -133,9 +133,9 @@ its own category, and none of them ships a skill, rule or agent you should follo
133
133
  instruction.
134
134
 
135
135
  **Column (a) has an operator loop, and it is not "restart".** An installed node package is brought
136
- in by the person who controls the deploy configuration — registering the dependency, and, when it
136
+ in by the person who controls the deploy configuration — registering the dependency, and, in a Docker install where it
137
137
  points at a folder being edited rather than a registry version, mounting that folder so the
138
- container can see it. The first install needs a real image rebuild; after that the package can be
138
+ container can see it. There the first install needs a real image rebuild; after that the package can be
139
139
  rebuilt and swapped into the running container in about a minute instead of ten. Those commands are
140
140
  not yours to run and not yours to document: the deployment ships its own operator runbook
141
141
  (`neuralis-operations`) which owns them, including which form applies to how it was installed.
@@ -143,7 +143,7 @@ What IS yours: declare `files` correctly, because that whitelist decides what a
143
143
  actually ships — see `references/manifest-and-discovery.md`. Columns (b) and (c) have no such loop;
144
144
  a drop is rescanned in about half a second and source markdown needs no install at all.
145
145
 
146
- **And a column-(a) package need not live in the host's tree at all.** A dependency can point at any directory on the deploying machine, so a package that is a product in its own right gets its own repository, its own history and its own release cadence, reached through a mount. Two things change when it does: the kernel packages become `peerDependencies` (the host already loads them — a hard dependency would give one contract two module graphs) with a relative `link:` devDependency so `tsc` still resolves, and your `tsconfig` has to inline what it used to extend. Four acts stay separate and none implies the next — git remote, mount, dependency registration, registry publish; only the third makes the package load. `references/runtime-and-build.md` §7b has the shape, including the two ways an in-container gate fails while the package itself runs perfectly.
146
+ **And a column-(a) package need not live in the host's tree at all.** A dependency can point at any directory on the deploying machine, so a package that is a product in its own right gets its own repository, its own history and its own release cadence, reached through a mount in a Docker install. Two things change when it does: the kernel packages become `peerDependencies` (the host already loads them — a hard dependency would give one contract two module graphs) with a relative `link:` devDependency so `tsc` still resolves, and your `tsconfig` has to inline what it used to extend. Four acts stay separate and none implies the next — git remote, mount, dependency registration, registry publish; only the third makes the package load. `references/runtime-and-build.md` §7b has the shape, including the two ways an app-side gate fails while the package itself runs perfectly.
147
147
 
148
148
  **Where your files go.** A drop: `fs_write({ uri: "packages://<dir>/package.json", create: { content } })` — that URI
149
149
  is the project's `_packages/` folder, parent dirs made for you. The `packages://` path segment is
@@ -158,9 +158,9 @@ where you own them — improve those in place, never weakening a security rule y
158
158
 
159
159
  **Address it.** A source slug is its own URI scheme, so a source package lives at `<slug>://<path>`:
160
160
  a skill at `data://acme/skills/release-notes/SKILL.md` makes `data://acme` a package carrying one
161
- skill, id `data://acme?project=<p>&scope=project`. Every project seeds two writable local sources, `data://` and
161
+ skill, id `data://acme?project=<p>&scope=project`. Every project seeds two writable folder sources, `data://` and
162
162
  `packages://`. Only the `<runtime_stack>` `sources` list has paths and permissions: `policy=` is your
163
- own read/write/exec, `os_uri=` the host path, `container=` the shell's path — printed only when the
163
+ own read/write/exec, `os_uri=` the host path, `container=` the shell's path (on a native install the same as `os_uri`) — printed only when the
164
164
  source has one; absent, cwd the URI itself (`cwd: "data://acme"`). `fs_list` with no `uri` gives
165
165
  roots and index counts — no path, no policy. Write with `execute` (`action: "shell"`), not
166
166
  `fs_write`: it stamps `category: "file"` and captures no frontmatter, and discovery keeps only the
@@ -196,7 +196,7 @@ decide how far you get — and the two ways to put a file down are gated differe
196
196
  - **Writing with `fs_write`** (`files.write`) — absent from your inventory without it, and that
197
197
  gate governs the write tool only.
198
198
  - **Writing with the shell** (`execute` present + the source's policy, never `files.write`) — the
199
- gate wants source-level `exec` on the dir you `cwd` into and `write` on every path you write, same
199
+ gate wants `exec` on the dir you `cwd` into (that folder's rules) and `write` on every path you write, same
200
200
  `policy=` row, uncovered paths denied. `files.write` off + `execute` on still ships.
201
201
  - **Installing or building** (`packages.author`). Without it the Build and Install actions vanish
202
202
  from the UI and those routes refuse you; code cannot be compiled, markdown needs neither.
@@ -218,7 +218,7 @@ before reporting you cannot.
218
218
  | write a `tools/*.json` or its handler | `references/tools-and-schemas.md` | the `$schema` string, the closed `x-neuralis` keys, banned inputs, result bounding |
219
219
  | build a widget, dock item, or chat card | `references/surfaces-and-design.md` | the dock companion rule, the canonical entry root, the self-contained entry, renderer × trust, the design floor |
220
220
  | write server-side code (`src/lifecycle.ts`, `src/routes/*`, `src/tools/*`) or a sandboxed package | `references/runtime-and-build.md` | the exported shape, output paths, route pattern/feature literals, the build |
221
- | develop a first-party package from ITS OWN repository, outside the host's tree — kernel deps, `tsconfig` with nothing to extend, where the gates actually run, and which of git / mount / dependency / publish makes it LOAD | `references/runtime-and-build.md` §7b | a hard kernel dependency giving one contract two module graphs; a `tsc` that cannot resolve inside the container while the package runs fine; assuming a pushed commit changed the deployment |
221
+ | develop a native package from ITS OWN repository, outside the host's tree — kernel deps, `tsconfig` with nothing to extend, where the gates actually run, and which of git / mount / dependency / publish makes it LOAD | `references/runtime-and-build.md` §7b | a hard kernel dependency giving one contract two module graphs; a `tsc` that cannot resolve inside the container while the package runs fine; assuming a pushed commit changed the deployment |
222
222
  | call ANOTHER package's routes from sandboxed code (`ctx.callRoute`, the `ctx.fs.*` sugar, the per-package route catalog links) | `references/runtime-and-build.md` §6 | trusted-only, caller's real session, deny-by-default feature gates, writes land pending_review |
223
223
  | attach an external system as a data source, set path permissions — or your connector never appears in `GET /connectors` | `references/connectors-and-uri-policies.md` | the connector port contract, which project a connector registers into (and when it registers into NONE), the admin-only write gate, `sources[]`, `uriPolicies` self-namespacing |
224
224
  | need a secret, an API key, or any adjustable value | `references/config-and-credentials.md` | declare-don't-hardcode, credential scopes, shell env projection |
@@ -249,23 +249,23 @@ shell → `grep -rn "requiredFeatures" ${SKILL_DIR}/references/`.
249
249
  Two scripts do the mechanical half:
250
250
 
251
251
  ```bash
252
- bash ${SKILL_DIR}/scripts/check-package.sh <absolute-package-root> # any path, before you ship
253
- bash ${SKILL_DIR}/scripts/verify-loaded.sh <package-id> # any path, after
252
+ node "${SKILL_DIR}/scripts/check-package.mjs" <absolute-package-root> # any path, before you ship
253
+ node "${SKILL_DIR}/scripts/verify-loaded.mjs" <package-id> # any path, after
254
254
  ```
255
255
 
256
- `check-package.sh` is static, needs no server, and modes off disk: with a manifest it runs
256
+ `check-package.mjs` is static, needs no server, and modes off disk: with a manifest it runs
257
257
  everything; with **none** it runs markdown mode — package recognition, the categories, every
258
258
  frontmatter gate — then prints the manifest/tools/workflows/surfaces/runtime/dist checks it skipped,
259
- so no skip reads as a pass. `verify-loaded.sh` covers all three paths (for (c) pass
259
+ so no skip reads as a pass. `verify-loaded.mjs` covers all three paths (for (c) pass
260
260
  `<rootUri>?project=<p>&scope=…`) and reads package diagnostics, so it needs `core.observe` — lacking that it
261
261
  reports it could not reach them rather than claiming the package is absent.
262
262
 
263
263
  **Enable, trust, install and rescan apply from the NEXT stream.** A stream captures the set of
264
264
  packages it may use once, at its start: a package you just enabled, trusted or installed becomes
265
265
  activatable in the next stream — a new user message, a workflow run, a fresh conversation — never
266
- mid-turn. A delegate spawned after the change sees its `<packages>` entry, injected
266
+ mid-turn. A foreground delegate spawned after the change sees its `<packages>` entry, injected
267
267
  rules/instructions and agent resolution fresh, but its tool catalog and skill activation still
268
- use the parent stream's gate. A `Skill not found` in
268
+ use the parent stream's gate; a background delegate re-reads all of them at its wake. A `Skill not found` in
269
269
  the same continuous turn that flipped the package is this rule, not a broken package: retry from
270
270
  a fresh stream before re-diagnosing.
271
271