blacksmith-organization-system 1.0.0-dev.3 → 1.2.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 (491) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +77 -70
  3. package/dist/bridges/git.d.ts +9 -0
  4. package/dist/bridges/git.js +30 -0
  5. package/dist/bridges/git.js.map +1 -0
  6. package/dist/bridges/github.d.ts +28 -0
  7. package/dist/bridges/github.js +71 -0
  8. package/dist/bridges/github.js.map +1 -0
  9. package/dist/cli.d.ts +2 -0
  10. package/dist/cli.js +53 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/core/context.d.ts +18 -0
  13. package/dist/core/context.js +14 -0
  14. package/dist/core/context.js.map +1 -0
  15. package/dist/core/element.d.ts +49 -0
  16. package/dist/core/element.js +97 -0
  17. package/dist/core/element.js.map +1 -0
  18. package/dist/core/host.d.ts +32 -0
  19. package/dist/core/host.js +5 -0
  20. package/dist/core/host.js.map +1 -0
  21. package/dist/core/paths.d.ts +5 -0
  22. package/dist/core/paths.js +42 -0
  23. package/dist/core/paths.js.map +1 -0
  24. package/dist/core/procedure.d.ts +11 -0
  25. package/dist/core/procedure.js +24 -0
  26. package/dist/core/procedure.js.map +1 -0
  27. package/dist/core/tool.d.ts +33 -0
  28. package/dist/core/tool.js +44 -0
  29. package/dist/core/tool.js.map +1 -0
  30. package/dist/core/version.d.ts +6 -0
  31. package/dist/core/version.js +37 -0
  32. package/dist/core/version.js.map +1 -0
  33. package/dist/hosts/node.d.ts +21 -0
  34. package/dist/hosts/node.js +76 -0
  35. package/dist/hosts/node.js.map +1 -0
  36. package/dist/hosts/watch-tree.d.ts +8 -0
  37. package/dist/hosts/watch-tree.js +86 -0
  38. package/dist/hosts/watch-tree.js.map +1 -0
  39. package/dist/index.d.ts +14 -0
  40. package/dist/index.js +18 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/main.d.ts +55 -0
  43. package/dist/main.js +99 -0
  44. package/dist/main.js.map +1 -0
  45. package/dist/models/_index.d.ts +20 -0
  46. package/dist/models/_index.js +22 -0
  47. package/dist/models/_index.js.map +1 -0
  48. package/dist/models/archive/class.d.ts +5 -0
  49. package/dist/models/archive/class.js +7 -0
  50. package/dist/models/archive/class.js.map +1 -0
  51. package/dist/models/authors/entry.d.ts +20 -0
  52. package/dist/models/authors/entry.js +73 -0
  53. package/dist/models/authors/entry.js.map +1 -0
  54. package/dist/models/authors/file.d.ts +9 -0
  55. package/dist/models/authors/file.js +19 -0
  56. package/dist/models/authors/file.js.map +1 -0
  57. package/dist/models/craftbook/class.d.ts +10 -0
  58. package/dist/models/craftbook/class.js +13 -0
  59. package/dist/models/craftbook/class.js.map +1 -0
  60. package/dist/models/devarmory/class.d.ts +11 -0
  61. package/dist/models/devarmory/class.js +8 -0
  62. package/dist/models/devarmory/class.js.map +1 -0
  63. package/dist/models/devlog/class.d.ts +19 -0
  64. package/dist/models/devlog/class.js +61 -0
  65. package/dist/models/devlog/class.js.map +1 -0
  66. package/dist/models/forge/class.d.ts +9 -0
  67. package/dist/models/forge/class.js +24 -0
  68. package/dist/models/forge/class.js.map +1 -0
  69. package/dist/models/loop/class.d.ts +16 -0
  70. package/dist/models/loop/class.js +56 -0
  71. package/dist/models/loop/class.js.map +1 -0
  72. package/dist/models/loop/data.d.ts +12 -0
  73. package/dist/models/loop/data.js +20 -0
  74. package/dist/models/loop/data.js.map +1 -0
  75. package/dist/models/loop/load.d.ts +5 -0
  76. package/dist/models/loop/load.js +14 -0
  77. package/dist/models/loop/load.js.map +1 -0
  78. package/dist/models/project/anatomy.d.ts +2 -0
  79. package/dist/models/project/anatomy.js +15 -0
  80. package/dist/models/project/anatomy.js.map +1 -0
  81. package/dist/models/project/around.d.ts +3 -0
  82. package/dist/models/project/around.js +13 -0
  83. package/dist/models/project/around.js.map +1 -0
  84. package/dist/models/project/class.d.ts +21 -0
  85. package/dist/models/project/class.js +23 -0
  86. package/dist/models/project/class.js.map +1 -0
  87. package/dist/models/project/git.d.ts +8 -0
  88. package/dist/models/project/git.js +26 -0
  89. package/dist/models/project/git.js.map +1 -0
  90. package/dist/models/project/version.d.ts +6 -0
  91. package/dist/models/project/version.js +23 -0
  92. package/dist/models/project/version.js.map +1 -0
  93. package/dist/models/scope/class.d.ts +21 -0
  94. package/dist/models/scope/class.js +49 -0
  95. package/dist/models/scope/class.js.map +1 -0
  96. package/dist/models/settings/data.d.ts +12 -0
  97. package/dist/models/settings/data.js +9 -0
  98. package/dist/models/settings/data.js.map +1 -0
  99. package/dist/models/settings/load.d.ts +9 -0
  100. package/dist/models/settings/load.js +32 -0
  101. package/dist/models/settings/load.js.map +1 -0
  102. package/dist/models/system/class.d.ts +16 -0
  103. package/dist/models/system/class.js +21 -0
  104. package/dist/models/system/class.js.map +1 -0
  105. package/dist/models/system/parts.d.ts +21 -0
  106. package/dist/models/system/parts.js +22 -0
  107. package/dist/models/system/parts.js.map +1 -0
  108. package/dist/models/system/storylines.d.ts +39 -0
  109. package/dist/models/system/storylines.js +42 -0
  110. package/dist/models/system/storylines.js.map +1 -0
  111. package/dist/models/workshop/class.d.ts +20 -0
  112. package/dist/models/workshop/class.js +43 -0
  113. package/dist/models/workshop/class.js.map +1 -0
  114. package/dist/models/workshop/locate.d.ts +16 -0
  115. package/dist/models/workshop/locate.js +54 -0
  116. package/dist/models/workshop/locate.js.map +1 -0
  117. package/dist/procedures/_index.d.ts +8 -0
  118. package/dist/procedures/_index.js +11 -0
  119. package/dist/procedures/_index.js.map +1 -0
  120. package/dist/procedures/automerging/_index.d.ts +4 -0
  121. package/dist/procedures/automerging/_index.js +8 -0
  122. package/dist/procedures/automerging/_index.js.map +1 -0
  123. package/dist/procedures/automerging/context.d.ts +11 -0
  124. package/dist/procedures/automerging/context.js +2 -0
  125. package/dist/procedures/automerging/context.js.map +1 -0
  126. package/dist/procedures/automerging/steps.d.ts +4 -0
  127. package/dist/procedures/automerging/steps.js +34 -0
  128. package/dist/procedures/automerging/steps.js.map +1 -0
  129. package/dist/procedures/bootstrapping/_index.d.ts +4 -0
  130. package/dist/procedures/bootstrapping/_index.js +8 -0
  131. package/dist/procedures/bootstrapping/_index.js.map +1 -0
  132. package/dist/procedures/bootstrapping/context.d.ts +5 -0
  133. package/dist/procedures/bootstrapping/context.js +2 -0
  134. package/dist/procedures/bootstrapping/context.js.map +1 -0
  135. package/dist/procedures/bootstrapping/ensure-tree.d.ts +2 -0
  136. package/dist/procedures/bootstrapping/ensure-tree.js +5 -0
  137. package/dist/procedures/bootstrapping/ensure-tree.js.map +1 -0
  138. package/dist/procedures/bootstrapping/record.d.ts +2 -0
  139. package/dist/procedures/bootstrapping/record.js +12 -0
  140. package/dist/procedures/bootstrapping/record.js.map +1 -0
  141. package/dist/procedures/bumping/_index.d.ts +4 -0
  142. package/dist/procedures/bumping/_index.js +9 -0
  143. package/dist/procedures/bumping/_index.js.map +1 -0
  144. package/dist/procedures/bumping/context.d.ts +18 -0
  145. package/dist/procedures/bumping/context.js +4 -0
  146. package/dist/procedures/bumping/context.js.map +1 -0
  147. package/dist/procedures/bumping/steps.d.ts +4 -0
  148. package/dist/procedures/bumping/steps.js +50 -0
  149. package/dist/procedures/bumping/steps.js.map +1 -0
  150. package/dist/procedures/crediting/_index.d.ts +4 -0
  151. package/dist/procedures/crediting/_index.js +9 -0
  152. package/dist/procedures/crediting/_index.js.map +1 -0
  153. package/dist/procedures/crediting/context.d.ts +17 -0
  154. package/dist/procedures/crediting/context.js +4 -0
  155. package/dist/procedures/crediting/context.js.map +1 -0
  156. package/dist/procedures/crediting/steps.d.ts +4 -0
  157. package/dist/procedures/crediting/steps.js +51 -0
  158. package/dist/procedures/crediting/steps.js.map +1 -0
  159. package/dist/procedures/inspecting/_index.d.ts +4 -0
  160. package/dist/procedures/inspecting/_index.js +11 -0
  161. package/dist/procedures/inspecting/_index.js.map +1 -0
  162. package/dist/procedures/inspecting/judge.d.ts +2 -0
  163. package/dist/procedures/inspecting/judge.js +6 -0
  164. package/dist/procedures/inspecting/judge.js.map +1 -0
  165. package/dist/procedures/inspecting/read-areas.d.ts +2 -0
  166. package/dist/procedures/inspecting/read-areas.js +5 -0
  167. package/dist/procedures/inspecting/read-areas.js.map +1 -0
  168. package/dist/procedures/inspecting/read-forge.d.ts +2 -0
  169. package/dist/procedures/inspecting/read-forge.js +14 -0
  170. package/dist/procedures/inspecting/read-forge.js.map +1 -0
  171. package/dist/procedures/inspecting/report.d.ts +32 -0
  172. package/dist/procedures/inspecting/report.js +11 -0
  173. package/dist/procedures/inspecting/report.js.map +1 -0
  174. package/dist/procedures/inspecting/rules.d.ts +12 -0
  175. package/dist/procedures/inspecting/rules.js +75 -0
  176. package/dist/procedures/inspecting/rules.js.map +1 -0
  177. package/dist/procedures/proposing/_index.d.ts +4 -0
  178. package/dist/procedures/proposing/_index.js +9 -0
  179. package/dist/procedures/proposing/_index.js.map +1 -0
  180. package/dist/procedures/proposing/context.d.ts +16 -0
  181. package/dist/procedures/proposing/context.js +4 -0
  182. package/dist/procedures/proposing/context.js.map +1 -0
  183. package/dist/procedures/proposing/steps.d.ts +4 -0
  184. package/dist/procedures/proposing/steps.js +46 -0
  185. package/dist/procedures/proposing/steps.js.map +1 -0
  186. package/dist/procedures/versioning/_index.d.ts +16 -0
  187. package/dist/procedures/versioning/_index.js +22 -0
  188. package/dist/procedures/versioning/_index.js.map +1 -0
  189. package/dist/procedures/watching/_index.d.ts +5 -0
  190. package/dist/procedures/watching/_index.js +9 -0
  191. package/dist/procedures/watching/_index.js.map +1 -0
  192. package/dist/procedures/watching/classify.d.ts +5 -0
  193. package/dist/procedures/watching/classify.js +30 -0
  194. package/dist/procedures/watching/classify.js.map +1 -0
  195. package/dist/procedures/watching/context.d.ts +21 -0
  196. package/dist/procedures/watching/context.js +2 -0
  197. package/dist/procedures/watching/context.js.map +1 -0
  198. package/dist/procedures/watching/start.d.ts +2 -0
  199. package/dist/procedures/watching/start.js +24 -0
  200. package/dist/procedures/watching/start.js.map +1 -0
  201. package/dist/procedures/watching/wait.d.ts +2 -0
  202. package/dist/procedures/watching/wait.js +12 -0
  203. package/dist/procedures/watching/wait.js.map +1 -0
  204. package/dist/tools/_index.d.ts +3 -0
  205. package/dist/tools/_index.js +25 -0
  206. package/dist/tools/_index.js.map +1 -0
  207. package/dist/tools/devlog.d.ts +1 -0
  208. package/dist/tools/devlog.js +43 -0
  209. package/dist/tools/devlog.js.map +1 -0
  210. package/dist/tools/flow.d.ts +1 -0
  211. package/dist/tools/flow.js +81 -0
  212. package/dist/tools/flow.js.map +1 -0
  213. package/dist/tools/project.d.ts +1 -0
  214. package/dist/tools/project.js +18 -0
  215. package/dist/tools/project.js.map +1 -0
  216. package/dist/tools/scope.d.ts +1 -0
  217. package/dist/tools/scope.js +51 -0
  218. package/dist/tools/scope.js.map +1 -0
  219. package/dist/tools/version.d.ts +1 -0
  220. package/dist/tools/version.js +23 -0
  221. package/dist/tools/version.js.map +1 -0
  222. package/dist/tools/workshop.d.ts +1 -0
  223. package/dist/tools/workshop.js +56 -0
  224. package/dist/tools/workshop.js.map +1 -0
  225. package/dist/views/devlog.d.ts +15 -0
  226. package/dist/views/devlog.js +31 -0
  227. package/dist/views/devlog.js.map +1 -0
  228. package/dist/views/event.d.ts +2 -0
  229. package/dist/views/event.js +6 -0
  230. package/dist/views/event.js.map +1 -0
  231. package/dist/views/flow.d.ts +12 -0
  232. package/dist/views/flow.js +26 -0
  233. package/dist/views/flow.js.map +1 -0
  234. package/dist/views/help.d.ts +2 -0
  235. package/dist/views/help.js +22 -0
  236. package/dist/views/help.js.map +1 -0
  237. package/dist/views/project.d.ts +2 -0
  238. package/dist/views/project.js +11 -0
  239. package/dist/views/project.js.map +1 -0
  240. package/dist/views/status.d.ts +5 -0
  241. package/dist/views/status.js +50 -0
  242. package/dist/views/status.js.map +1 -0
  243. package/package.json +31 -54
  244. package/resources/cli-art/big-logo-title.txt +24 -0
  245. package/resources/cli-art/big-shortcut-logo-title.txt +10 -0
  246. package/resources/cli-art/medium-logo-title.txt +13 -0
  247. package/resources/cli-art/minimenu-header.ptxml +13 -0
  248. package/resources/cli-art/minimenu-header.txt +11 -0
  249. package/resources/cli-art/small-logo-title.txt +10 -0
  250. package/resources/cli-art/wellcome.txt +10 -0
  251. package/resources/docs-templates/Home.md +7 -0
  252. package/resources/docs-templates/README.md +14 -0
  253. package/resources/docs-templates/_Footer.md +1 -0
  254. package/resources/docs-templates/_Sidebar.md +7 -0
  255. package/.claude-plugin/marketplace.json +0 -17
  256. package/.claude-plugin/mcp.json +0 -8
  257. package/.claude-plugin/plugin.json +0 -16
  258. package/AGENTS.md +0 -114
  259. package/CLAUDE.md +0 -1
  260. package/bin/bos +0 -3
  261. package/hooks/hooks.json +0 -40
  262. package/resources/house/HOUSE.md +0 -22
  263. package/resources/house/bloodlines.json +0 -35
  264. package/resources/house/children/deepseeks-of-anubis.json +0 -4
  265. package/resources/house/children/eon.json +0 -7
  266. package/resources/house/children/hermetic-officer.json +0 -1
  267. package/resources/house/children/ifrit.json +0 -1
  268. package/resources/house/children/license-keepers.json +0 -4
  269. package/resources/house/children/sebas.json +0 -10
  270. package/resources/house/children/shakespeare.json +0 -10
  271. package/resources/house/orders/ravensarmy.json +0 -6
  272. package/resources/house/orders/seiaic-ucdi.json +0 -5
  273. package/resources/ravens/skryba.md +0 -19
  274. package/resources/workshop-root/AGENTS.md +0 -92
  275. package/resources/workshop-root/CLAUDE.md +0 -1
  276. package/resources/workshop.default.json +0 -6
  277. package/skills/bos-archive/SKILL.md +0 -28
  278. package/skills/bos-craftbook/SKILL.md +0 -32
  279. package/skills/bos-craftset/SKILL.md +0 -36
  280. package/skills/bos-devarmory/SKILL.md +0 -34
  281. package/skills/bos-exhibit/SKILL.md +0 -28
  282. package/skills/bos-forge/SKILL.md +0 -28
  283. package/skills/bos-house/SKILL.md +0 -52
  284. package/skills/bos-project/SKILL.md +0 -27
  285. package/skills/bos-sarcophag/SKILL.md +0 -26
  286. package/skills/bos-scope/SKILL.md +0 -33
  287. package/skills/bos-sheme/SKILL.md +0 -38
  288. package/skills/bos-throwbox/SKILL.md +0 -27
  289. package/skills/bos-workshop/SKILL.md +0 -65
  290. package/skills/bos-workshop/assets/.gitkeep +0 -0
  291. package/skills/bos-workshop/references/bos-codebase.md +0 -116
  292. package/skills/bos-workshop/references/bos-concept.md +0 -121
  293. package/skills/bos-workshop/scripts/find-workshop.sh +0 -30
  294. package/src/agent-hook.mjs +0 -28
  295. package/src/bridge/_index.mjs +0 -24
  296. package/src/bridge/bos-instances-link/_index.mjs +0 -18
  297. package/src/bridge/docker-host/_index.mjs +0 -43
  298. package/src/bridge/docker-host/container.mjs +0 -32
  299. package/src/bridge/docker-host/image.mjs +0 -23
  300. package/src/bridge/docker-host/volume.mjs +0 -12
  301. package/src/bridge/docker-publish/_index.mjs +0 -24
  302. package/src/bridge/git-client/_index.mjs +0 -121
  303. package/src/bridge/git-client/author.mjs +0 -26
  304. package/src/bridge/gitea-api/_index.mjs +0 -62
  305. package/src/bridge/github-api/_index.mjs +0 -45
  306. package/src/bridge/npm-publish/_index.mjs +0 -19
  307. package/src/bridge/ollama-link/_index.mjs +0 -93
  308. package/src/bridge/ollama-link/ravens.mjs +0 -29
  309. package/src/bridge/ssh-link/_index.mjs +0 -33
  310. package/src/bridge/subprocess-runner/_index.mjs +0 -33
  311. package/src/cli.mjs +0 -29
  312. package/src/commands/_index.mjs +0 -51
  313. package/src/commands/bootstrap/exec.mjs +0 -7
  314. package/src/commands/bootstrap/help.md +0 -5
  315. package/src/commands/bootstrap/index.json +0 -7
  316. package/src/commands/close/exec.mjs +0 -4
  317. package/src/commands/close/help.md +0 -5
  318. package/src/commands/close/index.json +0 -7
  319. package/src/commands/describe/exec.mjs +0 -11
  320. package/src/commands/describe/help.md +0 -5
  321. package/src/commands/describe/index.json +0 -7
  322. package/src/commands/help/exec.mjs +0 -6
  323. package/src/commands/help/help.md +0 -3
  324. package/src/commands/help/index.json +0 -6
  325. package/src/commands/hook/exec.mjs +0 -3
  326. package/src/commands/hook/help.md +0 -4
  327. package/src/commands/hook/index.json +0 -7
  328. package/src/commands/hooks/exec.mjs +0 -5
  329. package/src/commands/hooks/help.md +0 -4
  330. package/src/commands/hooks/index.json +0 -7
  331. package/src/commands/house/exec.mjs +0 -8
  332. package/src/commands/house/help.md +0 -8
  333. package/src/commands/house/index.json +0 -7
  334. package/src/commands/locate/exec.mjs +0 -2
  335. package/src/commands/locate/help.md +0 -6
  336. package/src/commands/locate/index.json +0 -6
  337. package/src/commands/mode/exec.mjs +0 -17
  338. package/src/commands/mode/help.md +0 -14
  339. package/src/commands/mode/index.json +0 -8
  340. package/src/commands/mode/repl.mjs +0 -18
  341. package/src/commands/open/exec.mjs +0 -5
  342. package/src/commands/open/help.md +0 -4
  343. package/src/commands/open/index.json +0 -7
  344. package/src/commands/promote/exec.mjs +0 -5
  345. package/src/commands/promote/help.md +0 -6
  346. package/src/commands/promote/index.json +0 -7
  347. package/src/commands/repl/exec.mjs +0 -3
  348. package/src/commands/repl/help.md +0 -4
  349. package/src/commands/repl/index.json +0 -6
  350. package/src/commands/seal/exec.mjs +0 -8
  351. package/src/commands/seal/help.md +0 -4
  352. package/src/commands/seal/index.json +0 -7
  353. package/src/commands/sink/exec.mjs +0 -2
  354. package/src/commands/sink/help.md +0 -6
  355. package/src/commands/sink/index.json +0 -7
  356. package/src/commands/skills/exec.mjs +0 -5
  357. package/src/commands/skills/help.md +0 -5
  358. package/src/commands/skills/index.json +0 -7
  359. package/src/commands/status/exec.mjs +0 -2
  360. package/src/commands/status/help.md +0 -6
  361. package/src/commands/status/index.json +0 -7
  362. package/src/commands/status/repl.mjs +0 -14
  363. package/src/commands/verify/exec.mjs +0 -9
  364. package/src/commands/verify/help.md +0 -4
  365. package/src/commands/verify/index.json +0 -7
  366. package/src/controllers/_index.mjs +0 -5
  367. package/src/controllers/skills-controll.mjs +0 -13
  368. package/src/controllers/workshop-controll.mjs +0 -48
  369. package/src/core/basic-bridge.mjs +0 -29
  370. package/src/core/basic-controll.mjs +0 -26
  371. package/src/core/basic-element.mjs +0 -149
  372. package/src/core/basic-model.mjs +0 -7
  373. package/src/core/basic-procedure.mjs +0 -37
  374. package/src/core/basic-submodule.mjs +0 -21
  375. package/src/core/basic-view.mjs +0 -21
  376. package/src/core/self.mjs +0 -10
  377. package/src/index.mjs +0 -24
  378. package/src/main.ts +0 -82
  379. package/src/mcp.mjs +0 -8
  380. package/src/models/_index.mjs +0 -43
  381. package/src/models/archive/class.mjs +0 -9
  382. package/src/models/craftbook/class.mjs +0 -11
  383. package/src/models/craftbook/hang.scrapnotes.mjs +0 -10
  384. package/src/models/craftset/class.mjs +0 -14
  385. package/src/models/devarmory/class.mjs +0 -10
  386. package/src/models/exhibit/class.mjs +0 -8
  387. package/src/models/forge/class.mjs +0 -19
  388. package/src/models/house/bloodlines.mjs +0 -27
  389. package/src/models/house/class.mjs +0 -53
  390. package/src/models/house/groups.mjs +0 -38
  391. package/src/models/project/anatomy.mjs +0 -11
  392. package/src/models/project/class.mjs +0 -20
  393. package/src/models/sarcophag/class.mjs +0 -8
  394. package/src/models/scope/class.mjs +0 -19
  395. package/src/models/sheme/class.mjs +0 -8
  396. package/src/models/throwbox/class.mjs +0 -9
  397. package/src/models/workshop/class.mjs +0 -30
  398. package/src/models/workshop/hang.data.mjs +0 -10
  399. package/src/models/workshop/hang.nests.mjs +0 -14
  400. package/src/models/workshop/hang.setup.mjs +0 -10
  401. package/src/models/workshop/hang.storylines.logs.mjs +0 -10
  402. package/src/models/workshop/hang.storylines.manifests.mjs +0 -10
  403. package/src/models/workshop/hang.storylines.mjs +0 -39
  404. package/src/models/workshop/hang.storylines.ttystories.mjs +0 -10
  405. package/src/models/workshop/hang.system.mjs +0 -25
  406. package/src/models/workshop/host-roles.mjs +0 -9
  407. package/src/models/workshop/locate.mjs +0 -60
  408. package/src/models/workshop/modes.mjs +0 -31
  409. package/src/models/workshop/taskfile.mjs +0 -21
  410. package/src/procedures/_index.mjs +0 -32
  411. package/src/procedures/agent-recording/_index.mjs +0 -34
  412. package/src/procedures/agent-recording/situate.mjs +0 -11
  413. package/src/procedures/bootstrapping/DESCRIPTION.md +0 -6
  414. package/src/procedures/bootstrapping/_index.mjs +0 -13
  415. package/src/procedures/bootstrapping/deploy-guides.mjs +0 -15
  416. package/src/procedures/bootstrapping/ensure-tree.mjs +0 -4
  417. package/src/procedures/closing/DESCRIPTION.md +0 -6
  418. package/src/procedures/closing/_index.mjs +0 -11
  419. package/src/procedures/closing/capture-ttystory.mjs +0 -14
  420. package/src/procedures/closing/record-closing.mjs +0 -6
  421. package/src/procedures/describing/DESCRIPTION.md +0 -23
  422. package/src/procedures/describing/_index.mjs +0 -15
  423. package/src/procedures/describing/ask-skryba.mjs +0 -82
  424. package/src/procedures/describing/compose-message.mjs +0 -25
  425. package/src/procedures/describing/read-staged.mjs +0 -7
  426. package/src/procedures/describing/scopes.mjs +0 -38
  427. package/src/procedures/describing/staged-diff.mjs +0 -25
  428. package/src/procedures/describing/write-message.mjs +0 -15
  429. package/src/procedures/gathering/DESCRIPTION.md +0 -13
  430. package/src/procedures/gathering/_index.mjs +0 -13
  431. package/src/procedures/gathering/list-served.mjs +0 -9
  432. package/src/procedures/gathering/merge-residents.mjs +0 -31
  433. package/src/procedures/gathering/read-registry.mjs +0 -7
  434. package/src/procedures/hooking/DESCRIPTION.md +0 -6
  435. package/src/procedures/hooking/_index.mjs +0 -12
  436. package/src/procedures/hooking/hooks.mjs +0 -10
  437. package/src/procedures/hooking/install-hooks.mjs +0 -34
  438. package/src/procedures/hooking/record-hook.mjs +0 -13
  439. package/src/procedures/inspecting/DESCRIPTION.md +0 -3
  440. package/src/procedures/inspecting/_index.mjs +0 -9
  441. package/src/procedures/loading/DESCRIPTION.md +0 -4
  442. package/src/procedures/loading/_index.mjs +0 -15
  443. package/src/procedures/loading/load-config.mjs +0 -16
  444. package/src/procedures/loading/validate-mode.mjs +0 -8
  445. package/src/procedures/loading/validate-role.mjs +0 -8
  446. package/src/procedures/locating/DESCRIPTION.md +0 -6
  447. package/src/procedures/locating/_index.mjs +0 -13
  448. package/src/procedures/locating/locate-self.mjs +0 -7
  449. package/src/procedures/locating/locate-workshop.mjs +0 -16
  450. package/src/procedures/locating/read-environment.mjs +0 -12
  451. package/src/procedures/mode-switching/DESCRIPTION.md +0 -7
  452. package/src/procedures/mode-switching/_index.mjs +0 -10
  453. package/src/procedures/mode-switching/record-mode.mjs +0 -8
  454. package/src/procedures/mode-switching/switch-mode.mjs +0 -16
  455. package/src/procedures/opening/DESCRIPTION.md +0 -6
  456. package/src/procedures/opening/_index.mjs +0 -8
  457. package/src/procedures/opening/record-opening.mjs +0 -4
  458. package/src/procedures/promoting/DESCRIPTION.md +0 -8
  459. package/src/procedures/promoting/_index.mjs +0 -14
  460. package/src/procedures/promoting/apply.mjs +0 -28
  461. package/src/procedures/promoting/branch-flow.mjs +0 -23
  462. package/src/procedures/promoting/plan.mjs +0 -14
  463. package/src/procedures/promoting/read-position.mjs +0 -15
  464. package/src/procedures/sinking/DESCRIPTION.md +0 -8
  465. package/src/procedures/sinking/_index.mjs +0 -12
  466. package/src/procedures/sinking/inventory-forge.mjs +0 -18
  467. package/src/procedures/sinking/inventory-tools.mjs +0 -7
  468. package/src/procedures/skilling/DESCRIPTION.md +0 -11
  469. package/src/procedures/skilling/_index.mjs +0 -15
  470. package/src/procedures/skilling/collect-models.mjs +0 -15
  471. package/src/procedures/skilling/compose-skill.mjs +0 -49
  472. package/src/procedures/skilling/glossary.mjs +0 -23
  473. package/src/procedures/skilling/register-skills.mjs +0 -21
  474. package/src/procedures/skilling/write-skills.mjs +0 -19
  475. package/src/views/_index.mjs +0 -23
  476. package/src/views/agent/_index.mjs +0 -2
  477. package/src/views/agent/brief.mjs +0 -34
  478. package/src/views/help/_index.mjs +0 -41
  479. package/src/views/house/_index.mjs +0 -56
  480. package/src/views/inventory/_index.mjs +0 -27
  481. package/src/views/mcp/_index.mjs +0 -31
  482. package/src/views/mcp/tools.mjs +0 -87
  483. package/src/views/mode/_index.mjs +0 -34
  484. package/src/views/mode/chooser.mjs +0 -37
  485. package/src/views/promotion/_index.mjs +0 -20
  486. package/src/views/repl/_index.mjs +0 -30
  487. package/src/views/skills/_index.mjs +0 -24
  488. package/src/views/status/_index.mjs +0 -57
  489. package/src/views/status/tree.mjs +0 -19
  490. package/src/views/terminal/paint.mjs +0 -22
  491. package/template/SKILL.md +0 -16
@@ -1,149 +0,0 @@
1
- // Element anatomy shared by models and submodules: a directory plus descriptor
2
- // files (metadata.json, manifest.json, .index.json, Taskfile.yaml, .omnis.toml…).
3
- // A model stands on its own (built from a path); a submodule hangs on its owner
4
- // (built from the owner). Moving a class between the two is one `extends` line.
5
- import { createHash } from "node:crypto";
6
- import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
7
- import { basename, join, relative, sep } from "node:path";
8
-
9
- const MANIFEST_NAMES = ["manifest.json", ".manifest.json"];
10
- const NEVER_SEALED = new Set([".git", "node_modules", ...MANIFEST_NAMES]);
11
-
12
- export class BasicElement {
13
- static type = "element";
14
- static dirname = null; // fixed directory name (relative to the parent or owner); null for freely named assets
15
- static mandatory = true; // created together with its parent when missing
16
- static children = []; // fixed child models (areas)
17
- static submodules = {}; // { property: Submodule } organs hanging on this element
18
- static descriptors = {}; // { filename: (element, context) => default content }
19
-
20
- constructor(path, parent = null) {
21
- this.path = path;
22
- this.parent = parent;
23
- // every submodule becomes a lazy property: workshop.storylines
24
- for (const [name, Submodule] of Object.entries(this.constructor.submodules)) {
25
- let cached;
26
- Object.defineProperty(this, name, { get: () => (cached ??= new Submodule(this)), enumerable: false });
27
- }
28
- }
29
-
30
- get type() {
31
- return this.constructor.type;
32
- }
33
- get name() {
34
- return basename(this.path);
35
- }
36
- file(...names) {
37
- return join(this.path, ...names);
38
- }
39
- exists() {
40
- return existsSync(this.path);
41
- }
42
-
43
- // fixed children: areas first, then organs, in declaration order
44
- childElements() {
45
- return [
46
- ...this.constructor.children.map((Child) => new Child(this.file(Child.dirname), this)),
47
- ...Object.keys(this.constructor.submodules).map((name) => this[name]),
48
- ];
49
- }
50
-
51
- // create what is missing and never overwrite; with context.dryRun only plan it
52
- ensure(context = {}) {
53
- createIfMissing(this.path, () => mkdirSync(this.path, { recursive: true }), context);
54
- for (const [name, content] of Object.entries(this.constructor.descriptors)) {
55
- const target = this.file(name);
56
- createIfMissing(target, () => writeFileSync(target, serialize(content(this, context))), context);
57
- }
58
- for (const child of this.childElements()) {
59
- if (child.constructor.mandatory) child.ensure(context);
60
- }
61
- return this;
62
- }
63
-
64
- // state of this element and its fixed areas, without touching the disk
65
- inspect(parentMandatory = true) {
66
- const mandatory = parentMandatory && this.constructor.mandatory;
67
- const nodes = this.childElements().map((child) => child.inspect(mandatory));
68
- return { type: this.type, path: this.path, exists: this.exists(), mandatory, children: nest(nodes) };
69
- }
70
-
71
- readJSON(name, fallback = null) {
72
- try {
73
- return JSON.parse(readFileSync(this.file(name), "utf8"));
74
- } catch {
75
- return fallback;
76
- }
77
- }
78
-
79
- get manifestName() {
80
- return (
81
- MANIFEST_NAMES.find((name) => existsSync(this.file(name))) ??
82
- Object.keys(this.constructor.descriptors).find((name) => MANIFEST_NAMES.includes(name)) ??
83
- MANIFEST_NAMES[0]
84
- );
85
- }
86
-
87
- // record checksums of every file into the manifest (integrity guard)
88
- seal(context = {}) {
89
- const manifest = this.readJSON(this.manifestName, {});
90
- manifest.files = Object.fromEntries(walkFiles(this.path).map((path) => [relative(this.path, path), sha256(path)]));
91
- manifest.sealedAt = Date.now();
92
- if (!context.dryRun) writeFileSync(this.file(this.manifestName), serialize(manifest));
93
- return manifest;
94
- }
95
-
96
- // compare the manifest checksums with the files on disk
97
- verify() {
98
- const manifest = this.readJSON(this.manifestName);
99
- if (!manifest) return { ok: false, reason: `no ${this.manifestName}`, missing: [], changed: [], unlisted: [] };
100
- const listed = manifest.files ?? {};
101
- const missing = [];
102
- const changed = [];
103
- for (const [rel, expected] of Object.entries(listed)) {
104
- const target = this.file(rel);
105
- if (!existsSync(target)) missing.push(rel);
106
- else if (sha256(target) !== expected) changed.push(rel);
107
- }
108
- const unlisted = walkFiles(this.path)
109
- .map((path) => relative(this.path, path))
110
- .filter((rel) => !(rel in listed));
111
- return { ok: !missing.length && !changed.length, missing, changed, unlisted };
112
- }
113
- }
114
-
115
- // organs declared with deeper paths (.BOS/storylines) sit under the node of their folder (.BOS)
116
- function nest(nodes) {
117
- const inside = (node, other) => node !== other && node.path.startsWith(other.path + sep);
118
- const tops = nodes.filter((node) => !nodes.some((other) => inside(node, other)));
119
- return tops.map((top) => ({
120
- ...top,
121
- children: [...top.children, ...nest(nodes.filter((node) => inside(node, top)))],
122
- }));
123
- }
124
-
125
- export function createIfMissing(target, create, context = {}) {
126
- context.changes ??= [];
127
- if (existsSync(target)) return false;
128
- if (!context.dryRun) create();
129
- context.changes.push(target);
130
- return true;
131
- }
132
-
133
- export function sha256(path) {
134
- return createHash("sha256").update(readFileSync(path)).digest("hex");
135
- }
136
-
137
- export function walkFiles(root) {
138
- if (!existsSync(root)) return [];
139
- return readdirSync(root, { withFileTypes: true }).flatMap((entry) => {
140
- if (NEVER_SEALED.has(entry.name)) return [];
141
- const path = join(root, entry.name);
142
- if (entry.isDirectory()) return walkFiles(path);
143
- return entry.isFile() ? [path] : [];
144
- });
145
- }
146
-
147
- function serialize(content) {
148
- return typeof content === "string" ? content : `${JSON.stringify(content, null, 2)}\n`;
149
- }
@@ -1,7 +0,0 @@
1
- // A model is an asset of the workshop that stands on its own: built from any path.
2
- // new Project("/home/smith/__WORKSHOP/forge/scope/project")
3
- import { BasicElement } from "./basic-element.mjs";
4
-
5
- export class BasicModel extends BasicElement {}
6
-
7
- export { createIfMissing, sha256, walkFiles } from "./basic-element.mjs";
@@ -1,37 +0,0 @@
1
- // A procedure is an ordered list of named steps sharing one context object.
2
- // Every logicflow is a procedure; every run leaves a trace in context.trace.
3
-
4
- export class BasicProcedure {
5
- constructor(name, steps = [], { description = "" } = {}) {
6
- this.name = name;
7
- this.steps = steps;
8
- this.description = description;
9
- }
10
-
11
- step(name, action) {
12
- this.steps.push({ name, action, owner: this.name });
13
- return this;
14
- }
15
-
16
- // a new procedure made of this one's steps followed by the other's
17
- chain(other, name = `${this.name}+${other.name}`) {
18
- return new BasicProcedure(name, [...this.steps, ...other.steps], { description: this.description });
19
- }
20
-
21
- async run(context = {}) {
22
- context.trace ??= [];
23
- context.changes ??= [];
24
- for (const { name, action, owner } of this.steps) {
25
- const started = Date.now();
26
- try {
27
- await action(context);
28
- context.trace.push({ procedure: owner, step: name, ok: true, ms: Date.now() - started });
29
- } catch (error) {
30
- context.trace.push({ procedure: owner, step: name, ok: false, error: error.message });
31
- error.procedure ??= `${owner} › ${name}`;
32
- throw error;
33
- }
34
- }
35
- return context;
36
- }
37
- }
@@ -1,21 +0,0 @@
1
- // A submodule is an organ of its owner: it exists only inside that owner and is
2
- // built from it, never from a bare path. Its dirname is relative to the owner.
3
- // workshop.storylines (declared as static submodules = { storylines: Storylines })
4
- import { BasicElement } from "./basic-element.mjs";
5
-
6
- export class BasicSubmodule extends BasicElement {
7
- static ownerType = null; // the type of element this organ belongs to, e.g. "workshop"
8
-
9
- constructor(owner) {
10
- const { ownerType, dirname, name } = new.target;
11
- if (!owner || !(owner instanceof BasicElement))
12
- throw new Error(`${name} is a submodule: build it from its owner, not from a path`);
13
- if (ownerType && owner.type !== ownerType)
14
- throw new Error(`${name} hangs on a ${ownerType}, not on a ${owner.type}`);
15
- super(owner.file(dirname), owner);
16
- }
17
-
18
- get owner() {
19
- return this.parent;
20
- }
21
- }
@@ -1,21 +0,0 @@
1
- // One shared handler for every way BOS presents state (CLI text, JSON for
2
- // web / OpenAPI / MCP, ...). Subclasses only describe how state reads as text.
3
-
4
- export class BasicView {
5
- static formats = ["text", "json"];
6
-
7
- render(state, format = "text") {
8
- if (format === "json") return JSON.stringify(this.data(state), null, 2);
9
- if (format === "text") return this.text(state);
10
- throw new Error(`unknown view format "${format}" (known: ${this.constructor.formats.join(", ")})`);
11
- }
12
-
13
- // what a machine interface receives; defaults to the whole state
14
- data(state) {
15
- return state;
16
- }
17
-
18
- text(state) {
19
- return String(state);
20
- }
21
- }
package/src/core/self.mjs DELETED
@@ -1,10 +0,0 @@
1
- // Where this BOS installation itself lives on the machine, and which version it is.
2
- // BOS is a project like any other: normally forge/<scope>/<project> inside a workshop.
3
- import { readFileSync } from "node:fs";
4
- import { join, resolve } from "node:path";
5
- import { fileURLToPath } from "node:url";
6
-
7
- export const REPO_ROOT = resolve(fileURLToPath(new URL("../..", import.meta.url)));
8
- export const RESOURCES = join(REPO_ROOT, "resources");
9
- export const CLI = join(REPO_ROOT, "src", "cli.mjs");
10
- export const VERSION = JSON.parse(readFileSync(join(REPO_ROOT, "package.json"), "utf8")).version;
package/src/index.mjs DELETED
@@ -1,24 +0,0 @@
1
- // Library entry: the spine, and every part by name.
2
- // import { BOS } from "blacksmith-organization-system";
3
- // const bos = await new BOS().load(); await bos.workshop.status();
4
-
5
- export { default as bridges } from "./bridge/_index.mjs";
6
- export { loadCommands } from "./commands/_index.mjs";
7
- export { default as controllers } from "./controllers/_index.mjs";
8
- export { createIfMissing, sha256, walkFiles } from "./core/basic-element.mjs";
9
- export { CLI, REPO_ROOT, RESOURCES, VERSION } from "./core/self.mjs";
10
- export { BOS, default } from "./main.ts";
11
- export {
12
- default as models,
13
- findAncestorWorkshop,
14
- HOST_ROLES,
15
- listWorkshops,
16
- MODES,
17
- modeByDigit,
18
- placeOf,
19
- resolveWorkshop,
20
- submodules,
21
- } from "./models/_index.mjs";
22
- export { default as procedures } from "./procedures/_index.mjs";
23
- export { BRANCHES, PROMOTION, REJECTION } from "./procedures/promoting/branch-flow.mjs";
24
- export { default as views } from "./views/_index.mjs";
package/src/main.ts DELETED
@@ -1,82 +0,0 @@
1
- // The spine of BOS: one class that binds the core mechanics together and
2
- // lazily loads the parts. Core classes hang on it as BOS.Bridge, BOS.Model,
3
- // BOS.Submodule…,
4
- // so every part extends them through this one import:
5
- // import { BOS } from "../main.ts"; class DockerHost extends BOS.Bridge {}
6
- import { EventEmitter } from "node:events";
7
-
8
- import { BasicBridge } from "./core/basic-bridge.mjs";
9
- import { BasicControll } from "./core/basic-controll.mjs";
10
- import { BasicModel } from "./core/basic-model.mjs";
11
- import { BasicProcedure } from "./core/basic-procedure.mjs";
12
- import { BasicSubmodule } from "./core/basic-submodule.mjs";
13
- import { BasicView } from "./core/basic-view.mjs";
14
-
15
- type Options = { workshop?: string; dryRun?: boolean; [key: string]: unknown };
16
- // parts are loaded at runtime (bos.load()) and differ per part, so their registries stay open
17
- // biome-ignore lint/suspicious/noExplicitAny: dynamic registries of classes and functions
18
- type Registry = Record<string, any>;
19
-
20
- export class BOS extends EventEmitter {
21
- static Bridge = BasicBridge;
22
- static Controll = BasicControll;
23
- static Model = BasicModel;
24
- static Procedure = BasicProcedure;
25
- static Submodule = BasicSubmodule;
26
- static View = BasicView;
27
-
28
- options: Options;
29
- bridges: Registry = {};
30
- models: Registry = {};
31
- procedures: Registry = {};
32
- controllers: Registry = {};
33
- commands: Registry = {};
34
- views: Registry = {};
35
-
36
- constructor(options: Options = {}) {
37
- super();
38
- this.options = options;
39
- }
40
-
41
- // parts import this file, so they are loaded here on demand, never at import time
42
- async load(): Promise<this> {
43
- const [bridges, models, procedures, controllers, commands, views] = await Promise.all([
44
- import("./bridge/_index.mjs"),
45
- import("./models/_index.mjs"),
46
- import("./procedures/_index.mjs"),
47
- import("./controllers/_index.mjs"),
48
- import("./commands/_index.mjs"),
49
- import("./views/_index.mjs"),
50
- ]);
51
- this.bridges = bridges.default;
52
- this.models = models.default;
53
- this.procedures = procedures.default;
54
- this.controllers = controllers.default;
55
- this.views = views.default;
56
- this.commands = await commands.loadCommands();
57
- this.emit("loaded", this);
58
- return this;
59
- }
60
-
61
- // the workshop as one easy handle: bos.workshop.status(), .open(), .close()…
62
- get workshop() {
63
- return new this.controllers.WorkshopControll(this.options);
64
- }
65
-
66
- // the agent skills of this repository: bos.skills.scaffold()
67
- get skills() {
68
- return new this.controllers.SkillsControll(this.options);
69
- }
70
-
71
- async command(name: string, operands: string[] = [], flags: Options = {}) {
72
- const command = this.commands[name];
73
- if (!command) throw new Error(`unknown command "${name}" (known: ${Object.keys(this.commands).join(", ")})`);
74
- return command.inline({ bos: this, operands, flags: { ...this.options, ...flags } });
75
- }
76
-
77
- toString() {
78
- return `[<Blacksmith_Organization_System::${this.constructor.name}>]`;
79
- }
80
- }
81
-
82
- export default BOS;
package/src/mcp.mjs DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- // bos-mcp: BOS as an MCP server over stdio (Claude Code loads it from .claude-plugin/mcp.json).
3
- // stdout belongs to the protocol: nothing else may print there.
4
- import { BOS } from "./main.ts";
5
- import { startMcpServer } from "./views/mcp/_index.mjs";
6
-
7
- const bos = await new BOS({ workshop: process.env.BOS_WORKSHOP }).load();
8
- await startMcpServer(bos);
@@ -1,43 +0,0 @@
1
- // Models: assets of the working environment that stand on their own, one directory each.
2
- // Submodules: organs that exist only inside their owner (models/<owner>/hang.<name>.mjs).
3
- import Archive from "./archive/class.mjs";
4
- import Craftbook from "./craftbook/class.mjs";
5
- import Scrapnotes from "./craftbook/hang.scrapnotes.mjs";
6
- import Craftset from "./craftset/class.mjs";
7
- import Devarmory from "./devarmory/class.mjs";
8
- import Exhibit from "./exhibit/class.mjs";
9
- import Forge from "./forge/class.mjs";
10
- import House from "./house/class.mjs";
11
- import Project from "./project/class.mjs";
12
- import Sarcophag from "./sarcophag/class.mjs";
13
- import Scope from "./scope/class.mjs";
14
- import Sheme from "./sheme/class.mjs";
15
- import Throwbox from "./throwbox/class.mjs";
16
- import Workshop from "./workshop/class.mjs";
17
- import Data from "./workshop/hang.data.mjs";
18
- import Nests from "./workshop/hang.nests.mjs";
19
- import Setup from "./workshop/hang.setup.mjs";
20
- import Storylines from "./workshop/hang.storylines.mjs";
21
- import System from "./workshop/hang.system.mjs";
22
-
23
- export { HOST_ROLES } from "./workshop/host-roles.mjs";
24
- export * from "./workshop/locate.mjs";
25
- export { MODES, modeByDigit } from "./workshop/modes.mjs";
26
-
27
- export const submodules = { System, Setup, Data, Nests, Storylines, Scrapnotes };
28
-
29
- export default {
30
- Workshop,
31
- Devarmory,
32
- Forge,
33
- Craftbook,
34
- Archive,
35
- Scope,
36
- Project,
37
- Sheme,
38
- Throwbox,
39
- Sarcophag,
40
- Exhibit,
41
- Craftset,
42
- House,
43
- };
@@ -1,9 +0,0 @@
1
- // work at rest: sarcophags, exhibits, mirrors (glossary: archive)
2
- import { BOS } from "../../main.ts";
3
-
4
- export class Archive extends BOS.Model {
5
- static type = "archive";
6
- static dirname = "archive";
7
- }
8
-
9
- export default Archive;
@@ -1,11 +0,0 @@
1
- // Knowledge: scrapnotes, craftsets, collections, recipes (glossary: craftbook).
2
- import { BOS } from "../../main.ts";
3
- import Scrapnotes from "./hang.scrapnotes.mjs";
4
-
5
- export class Craftbook extends BOS.Model {
6
- static type = "craftbook";
7
- static dirname = "craftbook";
8
- static submodules = { scrapnotes: Scrapnotes };
9
- }
10
-
11
- export default Craftbook;
@@ -1,10 +0,0 @@
1
- // craftbook/scrapnotes: every note not yet promoted to a document (glossary: scrapnote).
2
- import { BOS } from "../../main.ts";
3
-
4
- export class Scrapnotes extends BOS.Submodule {
5
- static type = "scrapnotes";
6
- static ownerType = "craftbook";
7
- static dirname = "scrapnotes";
8
- }
9
-
10
- export default Scrapnotes;
@@ -1,14 +0,0 @@
1
- // Reusable kit of notes, notebooks, scripts and session setup (glossary: craftset).
2
- import { BOS } from "../../main.ts";
3
-
4
- export class Craftset extends BOS.Model {
5
- static type = "craftset";
6
- static descriptors = {
7
- ".omnis.toml": () => "# [TODO] contents of .omnis.toml are not defined yet\n",
8
- "metadata.json": (element) => ({ name: element.name, created: Date.now() }),
9
- "manifest.json": () => ({ files: {} }),
10
- "Taskfile.yaml": () => "version: '3'\n\ntasks: {}\n",
11
- };
12
- }
13
-
14
- export default Craftset;
@@ -1,10 +0,0 @@
1
- // Tools, listed with checksums so missing or damaged ones can be found (glossary: devarmory).
2
- import { BOS } from "../../main.ts";
3
-
4
- export class Devarmory extends BOS.Model {
5
- static type = "devarmory";
6
- static dirname = "devarmory";
7
- static descriptors = { "manifest.json": () => ({ tools: {}, files: {} }) }; // format still open
8
- }
9
-
10
- export default Devarmory;
@@ -1,8 +0,0 @@
1
- // view built from sarcophags (glossary: exhibit)
2
- import { BOS } from "../../main.ts";
3
-
4
- export class Exhibit extends BOS.Model {
5
- static type = "exhibit";
6
- }
7
-
8
- export default Exhibit;
@@ -1,19 +0,0 @@
1
- // Active work, the desk: scopes of projects (glossary: forge).
2
- import { readdirSync } from "node:fs";
3
-
4
- import { BOS } from "../../main.ts";
5
- import Scope from "../scope/class.mjs";
6
-
7
- export class Forge extends BOS.Model {
8
- static type = "forge";
9
- static dirname = "forge";
10
-
11
- scopes() {
12
- if (!this.exists()) return [];
13
- return readdirSync(this.path, { withFileTypes: true })
14
- .filter((entry) => entry.isDirectory() && !entry.name.startsWith("."))
15
- .map((entry) => new Scope(this.file(entry.name), this));
16
- }
17
- }
18
-
19
- export default Forge;
@@ -1,27 +0,0 @@
1
- // Bloodline: follow a model's parent_model back to its root; the root names the releaser.
2
- import { existsSync, readFileSync } from "node:fs";
3
-
4
- import { sameModel } from "./groups.mjs";
5
-
6
- export function readReleasers(path) {
7
- return existsSync(path) ? JSON.parse(readFileSync(path, "utf8")).releasers : [];
8
- }
9
-
10
- // catalog: [{ name, family, parent }] as ollama lists it; a parent that is a file path ends the chain
11
- export function rootOf(catalog, model) {
12
- const seen = new Set();
13
- let current = catalog.find((entry) => sameModel(entry.name, model));
14
- while (current?.parent && !current.parent.startsWith("/") && !seen.has(current.name)) {
15
- seen.add(current.name);
16
- const parent = catalog.find((entry) => sameModel(entry.name, current.parent));
17
- if (!parent) return { name: current.parent, family: current.family };
18
- current = parent;
19
- }
20
- return current ? { name: current.name, family: current.family } : { name: model, family: null };
21
- }
22
-
23
- export function bloodlineOf(catalog, releasers, model) {
24
- const root = rootOf(catalog, model);
25
- const rule = releasers.find(({ match }) => root.name.toLowerCase().replace(/^.*\//, "").startsWith(match));
26
- return { root: root.name, releaser: rule?.releaser ?? (root.family ? `${root.family} (architecture)` : "unknown") };
27
- }
@@ -1,53 +0,0 @@
1
- // The House of Anubis (resources/house/): bloodlines derived from what ollama serves,
2
- // children adopted by name, orders with duties. Every call to a resident asks here first.
3
-
4
- import { listRavens } from "../../bridge/ollama-link/ravens.mjs";
5
- import { RESOURCES } from "../../core/self.mjs";
6
- import { BOS } from "../../main.ts";
7
- import { bloodlineOf, readReleasers } from "./bloodlines.mjs";
8
- import { groupOf, readGroups, sameModel } from "./groups.mjs";
9
-
10
- export const STATES = ["active", "resting", "frozen"];
11
-
12
- export class House extends BOS.Model {
13
- static type = "house";
14
-
15
- constructor(path = `${RESOURCES}/house`, parent = null) {
16
- super(path, parent);
17
- }
18
-
19
- children() {
20
- return readGroups(this.file("children"));
21
- }
22
- orders() {
23
- return readGroups(this.file("orders"), listRavens());
24
- }
25
- releasers() {
26
- return readReleasers(this.file("bloodlines.json"));
27
- }
28
-
29
- bloodlineOf(catalog, model) {
30
- return bloodlineOf(catalog, this.releasers(), model);
31
- }
32
-
33
- // a member's own state wins over its group's; a resident nobody adopted is active
34
- stateOf(model) {
35
- for (const group of [...this.children(), ...this.orders()]) {
36
- if (groupOf([group], model)) {
37
- const member = group.members.find((m) => m.model && sameModel(m.model, model));
38
- return {
39
- state: member?.state ?? group.state,
40
- group: group.name,
41
- reason: member?.reason ?? group.reason ?? null,
42
- };
43
- }
44
- }
45
- return { state: "active", group: null, reason: null };
46
- }
47
-
48
- mayCall(model) {
49
- return this.stateOf(model).state === "active";
50
- }
51
- }
52
-
53
- export default House;
@@ -1,38 +0,0 @@
1
- // Children (adopted by name) and orders (duties): one JSON file per group,
2
- // with explicit members and/or name patterns that claim served models.
3
- import { existsSync, readdirSync, readFileSync } from "node:fs";
4
- import { basename, join } from "node:path";
5
-
6
- // "tulu3:latest" and "tulu3" are the same resident
7
- export const sameModel = (a, b) =>
8
- a?.replace(/:latest$/i, "").toLowerCase() === b?.replace(/:latest$/i, "").toLowerCase();
9
-
10
- export function readGroups(dir, ravens = []) {
11
- if (!existsSync(dir)) return [];
12
- return readdirSync(dir)
13
- .filter((file) => file.endsWith(".json"))
14
- .sort()
15
- .map((file) => {
16
- const group = {
17
- name: basename(file, ".json"),
18
- state: "active",
19
- patterns: [],
20
- members: [],
21
- ...JSON.parse(readFileSync(join(dir, file), "utf8")),
22
- };
23
- const fromRavens = group.fromRavens
24
- ? ravens.map((raven) => ({ name: raven.name, model: raven.model, duty: raven.duty }))
25
- : [];
26
- group.members = [...fromRavens, ...group.members].map((member) => ({
27
- kind: member.model ? "local" : "remote",
28
- ...member,
29
- }));
30
- return group;
31
- });
32
- }
33
-
34
- const claims = (group, model) =>
35
- group.members.some((member) => member.model && sameModel(member.model, model)) ||
36
- group.patterns.some((pattern) => model.toLowerCase().includes(pattern.toLowerCase()));
37
-
38
- export const groupOf = (groups, model) => groups.find((group) => claims(group, model ?? ""));
@@ -1,11 +0,0 @@
1
- // What every project carries (glossary: project → Anatomy).
2
- export const ANATOMY = {
3
- "README.md": "what it is and how to use it",
4
- LICENSE: "terms of use",
5
- "AGENTS.md": "instructions for AI agents (CLAUDE.md imports it)",
6
- "Taskfile.yml": "procedures: build, test, run",
7
- src: "source code",
8
- docs: "documentation",
9
- tests: "tests",
10
- ".github": "community files and CI workflows",
11
- };
@@ -1,20 +0,0 @@
1
- // One concrete project repository (glossary: project).
2
- import { existsSync } from "node:fs";
3
-
4
- import { BOS } from "../../main.ts";
5
- import { ANATOMY } from "./anatomy.mjs";
6
-
7
- export class Project extends BOS.Model {
8
- static type = "project";
9
- static anatomy = ANATOMY;
10
-
11
- anatomyCheck() {
12
- const parts = Object.keys(ANATOMY);
13
- return {
14
- present: parts.filter((part) => existsSync(this.file(part))),
15
- missing: parts.filter((part) => !existsSync(this.file(part))),
16
- };
17
- }
18
- }
19
-
20
- export default Project;
@@ -1,8 +0,0 @@
1
- // encrypted container holding one bare repository (glossary: sarcophag)
2
- import { BOS } from "../../main.ts";
3
-
4
- export class Sarcophag extends BOS.Model {
5
- static type = "sarcophag";
6
- }
7
-
8
- export default Sarcophag;