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.
- package/LICENSE +1 -1
- package/README.md +77 -70
- package/dist/bridges/git.d.ts +9 -0
- package/dist/bridges/git.js +30 -0
- package/dist/bridges/git.js.map +1 -0
- package/dist/bridges/github.d.ts +28 -0
- package/dist/bridges/github.js +71 -0
- package/dist/bridges/github.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +53 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/context.d.ts +18 -0
- package/dist/core/context.js +14 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/element.d.ts +49 -0
- package/dist/core/element.js +97 -0
- package/dist/core/element.js.map +1 -0
- package/dist/core/host.d.ts +32 -0
- package/dist/core/host.js +5 -0
- package/dist/core/host.js.map +1 -0
- package/dist/core/paths.d.ts +5 -0
- package/dist/core/paths.js +42 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/procedure.d.ts +11 -0
- package/dist/core/procedure.js +24 -0
- package/dist/core/procedure.js.map +1 -0
- package/dist/core/tool.d.ts +33 -0
- package/dist/core/tool.js +44 -0
- package/dist/core/tool.js.map +1 -0
- package/dist/core/version.d.ts +6 -0
- package/dist/core/version.js +37 -0
- package/dist/core/version.js.map +1 -0
- package/dist/hosts/node.d.ts +21 -0
- package/dist/hosts/node.js +76 -0
- package/dist/hosts/node.js.map +1 -0
- package/dist/hosts/watch-tree.d.ts +8 -0
- package/dist/hosts/watch-tree.js +86 -0
- package/dist/hosts/watch-tree.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +55 -0
- package/dist/main.js +99 -0
- package/dist/main.js.map +1 -0
- package/dist/models/_index.d.ts +20 -0
- package/dist/models/_index.js +22 -0
- package/dist/models/_index.js.map +1 -0
- package/dist/models/archive/class.d.ts +5 -0
- package/dist/models/archive/class.js +7 -0
- package/dist/models/archive/class.js.map +1 -0
- package/dist/models/authors/entry.d.ts +20 -0
- package/dist/models/authors/entry.js +73 -0
- package/dist/models/authors/entry.js.map +1 -0
- package/dist/models/authors/file.d.ts +9 -0
- package/dist/models/authors/file.js +19 -0
- package/dist/models/authors/file.js.map +1 -0
- package/dist/models/craftbook/class.d.ts +10 -0
- package/dist/models/craftbook/class.js +13 -0
- package/dist/models/craftbook/class.js.map +1 -0
- package/dist/models/devarmory/class.d.ts +11 -0
- package/dist/models/devarmory/class.js +8 -0
- package/dist/models/devarmory/class.js.map +1 -0
- package/dist/models/devlog/class.d.ts +19 -0
- package/dist/models/devlog/class.js +61 -0
- package/dist/models/devlog/class.js.map +1 -0
- package/dist/models/forge/class.d.ts +9 -0
- package/dist/models/forge/class.js +24 -0
- package/dist/models/forge/class.js.map +1 -0
- package/dist/models/loop/class.d.ts +16 -0
- package/dist/models/loop/class.js +56 -0
- package/dist/models/loop/class.js.map +1 -0
- package/dist/models/loop/data.d.ts +12 -0
- package/dist/models/loop/data.js +20 -0
- package/dist/models/loop/data.js.map +1 -0
- package/dist/models/loop/load.d.ts +5 -0
- package/dist/models/loop/load.js +14 -0
- package/dist/models/loop/load.js.map +1 -0
- package/dist/models/project/anatomy.d.ts +2 -0
- package/dist/models/project/anatomy.js +15 -0
- package/dist/models/project/anatomy.js.map +1 -0
- package/dist/models/project/around.d.ts +3 -0
- package/dist/models/project/around.js +13 -0
- package/dist/models/project/around.js.map +1 -0
- package/dist/models/project/class.d.ts +21 -0
- package/dist/models/project/class.js +23 -0
- package/dist/models/project/class.js.map +1 -0
- package/dist/models/project/git.d.ts +8 -0
- package/dist/models/project/git.js +26 -0
- package/dist/models/project/git.js.map +1 -0
- package/dist/models/project/version.d.ts +6 -0
- package/dist/models/project/version.js +23 -0
- package/dist/models/project/version.js.map +1 -0
- package/dist/models/scope/class.d.ts +21 -0
- package/dist/models/scope/class.js +49 -0
- package/dist/models/scope/class.js.map +1 -0
- package/dist/models/settings/data.d.ts +12 -0
- package/dist/models/settings/data.js +9 -0
- package/dist/models/settings/data.js.map +1 -0
- package/dist/models/settings/load.d.ts +9 -0
- package/dist/models/settings/load.js +32 -0
- package/dist/models/settings/load.js.map +1 -0
- package/dist/models/system/class.d.ts +16 -0
- package/dist/models/system/class.js +21 -0
- package/dist/models/system/class.js.map +1 -0
- package/dist/models/system/parts.d.ts +21 -0
- package/dist/models/system/parts.js +22 -0
- package/dist/models/system/parts.js.map +1 -0
- package/dist/models/system/storylines.d.ts +39 -0
- package/dist/models/system/storylines.js +42 -0
- package/dist/models/system/storylines.js.map +1 -0
- package/dist/models/workshop/class.d.ts +20 -0
- package/dist/models/workshop/class.js +43 -0
- package/dist/models/workshop/class.js.map +1 -0
- package/dist/models/workshop/locate.d.ts +16 -0
- package/dist/models/workshop/locate.js +54 -0
- package/dist/models/workshop/locate.js.map +1 -0
- package/dist/procedures/_index.d.ts +8 -0
- package/dist/procedures/_index.js +11 -0
- package/dist/procedures/_index.js.map +1 -0
- package/dist/procedures/automerging/_index.d.ts +4 -0
- package/dist/procedures/automerging/_index.js +8 -0
- package/dist/procedures/automerging/_index.js.map +1 -0
- package/dist/procedures/automerging/context.d.ts +11 -0
- package/dist/procedures/automerging/context.js +2 -0
- package/dist/procedures/automerging/context.js.map +1 -0
- package/dist/procedures/automerging/steps.d.ts +4 -0
- package/dist/procedures/automerging/steps.js +34 -0
- package/dist/procedures/automerging/steps.js.map +1 -0
- package/dist/procedures/bootstrapping/_index.d.ts +4 -0
- package/dist/procedures/bootstrapping/_index.js +8 -0
- package/dist/procedures/bootstrapping/_index.js.map +1 -0
- package/dist/procedures/bootstrapping/context.d.ts +5 -0
- package/dist/procedures/bootstrapping/context.js +2 -0
- package/dist/procedures/bootstrapping/context.js.map +1 -0
- package/dist/procedures/bootstrapping/ensure-tree.d.ts +2 -0
- package/dist/procedures/bootstrapping/ensure-tree.js +5 -0
- package/dist/procedures/bootstrapping/ensure-tree.js.map +1 -0
- package/dist/procedures/bootstrapping/record.d.ts +2 -0
- package/dist/procedures/bootstrapping/record.js +12 -0
- package/dist/procedures/bootstrapping/record.js.map +1 -0
- package/dist/procedures/bumping/_index.d.ts +4 -0
- package/dist/procedures/bumping/_index.js +9 -0
- package/dist/procedures/bumping/_index.js.map +1 -0
- package/dist/procedures/bumping/context.d.ts +18 -0
- package/dist/procedures/bumping/context.js +4 -0
- package/dist/procedures/bumping/context.js.map +1 -0
- package/dist/procedures/bumping/steps.d.ts +4 -0
- package/dist/procedures/bumping/steps.js +50 -0
- package/dist/procedures/bumping/steps.js.map +1 -0
- package/dist/procedures/crediting/_index.d.ts +4 -0
- package/dist/procedures/crediting/_index.js +9 -0
- package/dist/procedures/crediting/_index.js.map +1 -0
- package/dist/procedures/crediting/context.d.ts +17 -0
- package/dist/procedures/crediting/context.js +4 -0
- package/dist/procedures/crediting/context.js.map +1 -0
- package/dist/procedures/crediting/steps.d.ts +4 -0
- package/dist/procedures/crediting/steps.js +51 -0
- package/dist/procedures/crediting/steps.js.map +1 -0
- package/dist/procedures/inspecting/_index.d.ts +4 -0
- package/dist/procedures/inspecting/_index.js +11 -0
- package/dist/procedures/inspecting/_index.js.map +1 -0
- package/dist/procedures/inspecting/judge.d.ts +2 -0
- package/dist/procedures/inspecting/judge.js +6 -0
- package/dist/procedures/inspecting/judge.js.map +1 -0
- package/dist/procedures/inspecting/read-areas.d.ts +2 -0
- package/dist/procedures/inspecting/read-areas.js +5 -0
- package/dist/procedures/inspecting/read-areas.js.map +1 -0
- package/dist/procedures/inspecting/read-forge.d.ts +2 -0
- package/dist/procedures/inspecting/read-forge.js +14 -0
- package/dist/procedures/inspecting/read-forge.js.map +1 -0
- package/dist/procedures/inspecting/report.d.ts +32 -0
- package/dist/procedures/inspecting/report.js +11 -0
- package/dist/procedures/inspecting/report.js.map +1 -0
- package/dist/procedures/inspecting/rules.d.ts +12 -0
- package/dist/procedures/inspecting/rules.js +75 -0
- package/dist/procedures/inspecting/rules.js.map +1 -0
- package/dist/procedures/proposing/_index.d.ts +4 -0
- package/dist/procedures/proposing/_index.js +9 -0
- package/dist/procedures/proposing/_index.js.map +1 -0
- package/dist/procedures/proposing/context.d.ts +16 -0
- package/dist/procedures/proposing/context.js +4 -0
- package/dist/procedures/proposing/context.js.map +1 -0
- package/dist/procedures/proposing/steps.d.ts +4 -0
- package/dist/procedures/proposing/steps.js +46 -0
- package/dist/procedures/proposing/steps.js.map +1 -0
- package/dist/procedures/versioning/_index.d.ts +16 -0
- package/dist/procedures/versioning/_index.js +22 -0
- package/dist/procedures/versioning/_index.js.map +1 -0
- package/dist/procedures/watching/_index.d.ts +5 -0
- package/dist/procedures/watching/_index.js +9 -0
- package/dist/procedures/watching/_index.js.map +1 -0
- package/dist/procedures/watching/classify.d.ts +5 -0
- package/dist/procedures/watching/classify.js +30 -0
- package/dist/procedures/watching/classify.js.map +1 -0
- package/dist/procedures/watching/context.d.ts +21 -0
- package/dist/procedures/watching/context.js +2 -0
- package/dist/procedures/watching/context.js.map +1 -0
- package/dist/procedures/watching/start.d.ts +2 -0
- package/dist/procedures/watching/start.js +24 -0
- package/dist/procedures/watching/start.js.map +1 -0
- package/dist/procedures/watching/wait.d.ts +2 -0
- package/dist/procedures/watching/wait.js +12 -0
- package/dist/procedures/watching/wait.js.map +1 -0
- package/dist/tools/_index.d.ts +3 -0
- package/dist/tools/_index.js +25 -0
- package/dist/tools/_index.js.map +1 -0
- package/dist/tools/devlog.d.ts +1 -0
- package/dist/tools/devlog.js +43 -0
- package/dist/tools/devlog.js.map +1 -0
- package/dist/tools/flow.d.ts +1 -0
- package/dist/tools/flow.js +81 -0
- package/dist/tools/flow.js.map +1 -0
- package/dist/tools/project.d.ts +1 -0
- package/dist/tools/project.js +18 -0
- package/dist/tools/project.js.map +1 -0
- package/dist/tools/scope.d.ts +1 -0
- package/dist/tools/scope.js +51 -0
- package/dist/tools/scope.js.map +1 -0
- package/dist/tools/version.d.ts +1 -0
- package/dist/tools/version.js +23 -0
- package/dist/tools/version.js.map +1 -0
- package/dist/tools/workshop.d.ts +1 -0
- package/dist/tools/workshop.js +56 -0
- package/dist/tools/workshop.js.map +1 -0
- package/dist/views/devlog.d.ts +15 -0
- package/dist/views/devlog.js +31 -0
- package/dist/views/devlog.js.map +1 -0
- package/dist/views/event.d.ts +2 -0
- package/dist/views/event.js +6 -0
- package/dist/views/event.js.map +1 -0
- package/dist/views/flow.d.ts +12 -0
- package/dist/views/flow.js +26 -0
- package/dist/views/flow.js.map +1 -0
- package/dist/views/help.d.ts +2 -0
- package/dist/views/help.js +22 -0
- package/dist/views/help.js.map +1 -0
- package/dist/views/project.d.ts +2 -0
- package/dist/views/project.js +11 -0
- package/dist/views/project.js.map +1 -0
- package/dist/views/status.d.ts +5 -0
- package/dist/views/status.js +50 -0
- package/dist/views/status.js.map +1 -0
- package/package.json +31 -54
- package/resources/cli-art/big-logo-title.txt +24 -0
- package/resources/cli-art/big-shortcut-logo-title.txt +10 -0
- package/resources/cli-art/medium-logo-title.txt +13 -0
- package/resources/cli-art/minimenu-header.ptxml +13 -0
- package/resources/cli-art/minimenu-header.txt +11 -0
- package/resources/cli-art/small-logo-title.txt +10 -0
- package/resources/cli-art/wellcome.txt +10 -0
- package/resources/docs-templates/Home.md +7 -0
- package/resources/docs-templates/README.md +14 -0
- package/resources/docs-templates/_Footer.md +1 -0
- package/resources/docs-templates/_Sidebar.md +7 -0
- package/.claude-plugin/marketplace.json +0 -17
- package/.claude-plugin/mcp.json +0 -8
- package/.claude-plugin/plugin.json +0 -16
- package/AGENTS.md +0 -114
- package/CLAUDE.md +0 -1
- package/bin/bos +0 -3
- package/hooks/hooks.json +0 -40
- package/resources/house/HOUSE.md +0 -22
- package/resources/house/bloodlines.json +0 -35
- package/resources/house/children/deepseeks-of-anubis.json +0 -4
- package/resources/house/children/eon.json +0 -7
- package/resources/house/children/hermetic-officer.json +0 -1
- package/resources/house/children/ifrit.json +0 -1
- package/resources/house/children/license-keepers.json +0 -4
- package/resources/house/children/sebas.json +0 -10
- package/resources/house/children/shakespeare.json +0 -10
- package/resources/house/orders/ravensarmy.json +0 -6
- package/resources/house/orders/seiaic-ucdi.json +0 -5
- package/resources/ravens/skryba.md +0 -19
- package/resources/workshop-root/AGENTS.md +0 -92
- package/resources/workshop-root/CLAUDE.md +0 -1
- package/resources/workshop.default.json +0 -6
- package/skills/bos-archive/SKILL.md +0 -28
- package/skills/bos-craftbook/SKILL.md +0 -32
- package/skills/bos-craftset/SKILL.md +0 -36
- package/skills/bos-devarmory/SKILL.md +0 -34
- package/skills/bos-exhibit/SKILL.md +0 -28
- package/skills/bos-forge/SKILL.md +0 -28
- package/skills/bos-house/SKILL.md +0 -52
- package/skills/bos-project/SKILL.md +0 -27
- package/skills/bos-sarcophag/SKILL.md +0 -26
- package/skills/bos-scope/SKILL.md +0 -33
- package/skills/bos-sheme/SKILL.md +0 -38
- package/skills/bos-throwbox/SKILL.md +0 -27
- package/skills/bos-workshop/SKILL.md +0 -65
- package/skills/bos-workshop/assets/.gitkeep +0 -0
- package/skills/bos-workshop/references/bos-codebase.md +0 -116
- package/skills/bos-workshop/references/bos-concept.md +0 -121
- package/skills/bos-workshop/scripts/find-workshop.sh +0 -30
- package/src/agent-hook.mjs +0 -28
- package/src/bridge/_index.mjs +0 -24
- package/src/bridge/bos-instances-link/_index.mjs +0 -18
- package/src/bridge/docker-host/_index.mjs +0 -43
- package/src/bridge/docker-host/container.mjs +0 -32
- package/src/bridge/docker-host/image.mjs +0 -23
- package/src/bridge/docker-host/volume.mjs +0 -12
- package/src/bridge/docker-publish/_index.mjs +0 -24
- package/src/bridge/git-client/_index.mjs +0 -121
- package/src/bridge/git-client/author.mjs +0 -26
- package/src/bridge/gitea-api/_index.mjs +0 -62
- package/src/bridge/github-api/_index.mjs +0 -45
- package/src/bridge/npm-publish/_index.mjs +0 -19
- package/src/bridge/ollama-link/_index.mjs +0 -93
- package/src/bridge/ollama-link/ravens.mjs +0 -29
- package/src/bridge/ssh-link/_index.mjs +0 -33
- package/src/bridge/subprocess-runner/_index.mjs +0 -33
- package/src/cli.mjs +0 -29
- package/src/commands/_index.mjs +0 -51
- package/src/commands/bootstrap/exec.mjs +0 -7
- package/src/commands/bootstrap/help.md +0 -5
- package/src/commands/bootstrap/index.json +0 -7
- package/src/commands/close/exec.mjs +0 -4
- package/src/commands/close/help.md +0 -5
- package/src/commands/close/index.json +0 -7
- package/src/commands/describe/exec.mjs +0 -11
- package/src/commands/describe/help.md +0 -5
- package/src/commands/describe/index.json +0 -7
- package/src/commands/help/exec.mjs +0 -6
- package/src/commands/help/help.md +0 -3
- package/src/commands/help/index.json +0 -6
- package/src/commands/hook/exec.mjs +0 -3
- package/src/commands/hook/help.md +0 -4
- package/src/commands/hook/index.json +0 -7
- package/src/commands/hooks/exec.mjs +0 -5
- package/src/commands/hooks/help.md +0 -4
- package/src/commands/hooks/index.json +0 -7
- package/src/commands/house/exec.mjs +0 -8
- package/src/commands/house/help.md +0 -8
- package/src/commands/house/index.json +0 -7
- package/src/commands/locate/exec.mjs +0 -2
- package/src/commands/locate/help.md +0 -6
- package/src/commands/locate/index.json +0 -6
- package/src/commands/mode/exec.mjs +0 -17
- package/src/commands/mode/help.md +0 -14
- package/src/commands/mode/index.json +0 -8
- package/src/commands/mode/repl.mjs +0 -18
- package/src/commands/open/exec.mjs +0 -5
- package/src/commands/open/help.md +0 -4
- package/src/commands/open/index.json +0 -7
- package/src/commands/promote/exec.mjs +0 -5
- package/src/commands/promote/help.md +0 -6
- package/src/commands/promote/index.json +0 -7
- package/src/commands/repl/exec.mjs +0 -3
- package/src/commands/repl/help.md +0 -4
- package/src/commands/repl/index.json +0 -6
- package/src/commands/seal/exec.mjs +0 -8
- package/src/commands/seal/help.md +0 -4
- package/src/commands/seal/index.json +0 -7
- package/src/commands/sink/exec.mjs +0 -2
- package/src/commands/sink/help.md +0 -6
- package/src/commands/sink/index.json +0 -7
- package/src/commands/skills/exec.mjs +0 -5
- package/src/commands/skills/help.md +0 -5
- package/src/commands/skills/index.json +0 -7
- package/src/commands/status/exec.mjs +0 -2
- package/src/commands/status/help.md +0 -6
- package/src/commands/status/index.json +0 -7
- package/src/commands/status/repl.mjs +0 -14
- package/src/commands/verify/exec.mjs +0 -9
- package/src/commands/verify/help.md +0 -4
- package/src/commands/verify/index.json +0 -7
- package/src/controllers/_index.mjs +0 -5
- package/src/controllers/skills-controll.mjs +0 -13
- package/src/controllers/workshop-controll.mjs +0 -48
- package/src/core/basic-bridge.mjs +0 -29
- package/src/core/basic-controll.mjs +0 -26
- package/src/core/basic-element.mjs +0 -149
- package/src/core/basic-model.mjs +0 -7
- package/src/core/basic-procedure.mjs +0 -37
- package/src/core/basic-submodule.mjs +0 -21
- package/src/core/basic-view.mjs +0 -21
- package/src/core/self.mjs +0 -10
- package/src/index.mjs +0 -24
- package/src/main.ts +0 -82
- package/src/mcp.mjs +0 -8
- package/src/models/_index.mjs +0 -43
- package/src/models/archive/class.mjs +0 -9
- package/src/models/craftbook/class.mjs +0 -11
- package/src/models/craftbook/hang.scrapnotes.mjs +0 -10
- package/src/models/craftset/class.mjs +0 -14
- package/src/models/devarmory/class.mjs +0 -10
- package/src/models/exhibit/class.mjs +0 -8
- package/src/models/forge/class.mjs +0 -19
- package/src/models/house/bloodlines.mjs +0 -27
- package/src/models/house/class.mjs +0 -53
- package/src/models/house/groups.mjs +0 -38
- package/src/models/project/anatomy.mjs +0 -11
- package/src/models/project/class.mjs +0 -20
- package/src/models/sarcophag/class.mjs +0 -8
- package/src/models/scope/class.mjs +0 -19
- package/src/models/sheme/class.mjs +0 -8
- package/src/models/throwbox/class.mjs +0 -9
- package/src/models/workshop/class.mjs +0 -30
- package/src/models/workshop/hang.data.mjs +0 -10
- package/src/models/workshop/hang.nests.mjs +0 -14
- package/src/models/workshop/hang.setup.mjs +0 -10
- package/src/models/workshop/hang.storylines.logs.mjs +0 -10
- package/src/models/workshop/hang.storylines.manifests.mjs +0 -10
- package/src/models/workshop/hang.storylines.mjs +0 -39
- package/src/models/workshop/hang.storylines.ttystories.mjs +0 -10
- package/src/models/workshop/hang.system.mjs +0 -25
- package/src/models/workshop/host-roles.mjs +0 -9
- package/src/models/workshop/locate.mjs +0 -60
- package/src/models/workshop/modes.mjs +0 -31
- package/src/models/workshop/taskfile.mjs +0 -21
- package/src/procedures/_index.mjs +0 -32
- package/src/procedures/agent-recording/_index.mjs +0 -34
- package/src/procedures/agent-recording/situate.mjs +0 -11
- package/src/procedures/bootstrapping/DESCRIPTION.md +0 -6
- package/src/procedures/bootstrapping/_index.mjs +0 -13
- package/src/procedures/bootstrapping/deploy-guides.mjs +0 -15
- package/src/procedures/bootstrapping/ensure-tree.mjs +0 -4
- package/src/procedures/closing/DESCRIPTION.md +0 -6
- package/src/procedures/closing/_index.mjs +0 -11
- package/src/procedures/closing/capture-ttystory.mjs +0 -14
- package/src/procedures/closing/record-closing.mjs +0 -6
- package/src/procedures/describing/DESCRIPTION.md +0 -23
- package/src/procedures/describing/_index.mjs +0 -15
- package/src/procedures/describing/ask-skryba.mjs +0 -82
- package/src/procedures/describing/compose-message.mjs +0 -25
- package/src/procedures/describing/read-staged.mjs +0 -7
- package/src/procedures/describing/scopes.mjs +0 -38
- package/src/procedures/describing/staged-diff.mjs +0 -25
- package/src/procedures/describing/write-message.mjs +0 -15
- package/src/procedures/gathering/DESCRIPTION.md +0 -13
- package/src/procedures/gathering/_index.mjs +0 -13
- package/src/procedures/gathering/list-served.mjs +0 -9
- package/src/procedures/gathering/merge-residents.mjs +0 -31
- package/src/procedures/gathering/read-registry.mjs +0 -7
- package/src/procedures/hooking/DESCRIPTION.md +0 -6
- package/src/procedures/hooking/_index.mjs +0 -12
- package/src/procedures/hooking/hooks.mjs +0 -10
- package/src/procedures/hooking/install-hooks.mjs +0 -34
- package/src/procedures/hooking/record-hook.mjs +0 -13
- package/src/procedures/inspecting/DESCRIPTION.md +0 -3
- package/src/procedures/inspecting/_index.mjs +0 -9
- package/src/procedures/loading/DESCRIPTION.md +0 -4
- package/src/procedures/loading/_index.mjs +0 -15
- package/src/procedures/loading/load-config.mjs +0 -16
- package/src/procedures/loading/validate-mode.mjs +0 -8
- package/src/procedures/loading/validate-role.mjs +0 -8
- package/src/procedures/locating/DESCRIPTION.md +0 -6
- package/src/procedures/locating/_index.mjs +0 -13
- package/src/procedures/locating/locate-self.mjs +0 -7
- package/src/procedures/locating/locate-workshop.mjs +0 -16
- package/src/procedures/locating/read-environment.mjs +0 -12
- package/src/procedures/mode-switching/DESCRIPTION.md +0 -7
- package/src/procedures/mode-switching/_index.mjs +0 -10
- package/src/procedures/mode-switching/record-mode.mjs +0 -8
- package/src/procedures/mode-switching/switch-mode.mjs +0 -16
- package/src/procedures/opening/DESCRIPTION.md +0 -6
- package/src/procedures/opening/_index.mjs +0 -8
- package/src/procedures/opening/record-opening.mjs +0 -4
- package/src/procedures/promoting/DESCRIPTION.md +0 -8
- package/src/procedures/promoting/_index.mjs +0 -14
- package/src/procedures/promoting/apply.mjs +0 -28
- package/src/procedures/promoting/branch-flow.mjs +0 -23
- package/src/procedures/promoting/plan.mjs +0 -14
- package/src/procedures/promoting/read-position.mjs +0 -15
- package/src/procedures/sinking/DESCRIPTION.md +0 -8
- package/src/procedures/sinking/_index.mjs +0 -12
- package/src/procedures/sinking/inventory-forge.mjs +0 -18
- package/src/procedures/sinking/inventory-tools.mjs +0 -7
- package/src/procedures/skilling/DESCRIPTION.md +0 -11
- package/src/procedures/skilling/_index.mjs +0 -15
- package/src/procedures/skilling/collect-models.mjs +0 -15
- package/src/procedures/skilling/compose-skill.mjs +0 -49
- package/src/procedures/skilling/glossary.mjs +0 -23
- package/src/procedures/skilling/register-skills.mjs +0 -21
- package/src/procedures/skilling/write-skills.mjs +0 -19
- package/src/views/_index.mjs +0 -23
- package/src/views/agent/_index.mjs +0 -2
- package/src/views/agent/brief.mjs +0 -34
- package/src/views/help/_index.mjs +0 -41
- package/src/views/house/_index.mjs +0 -56
- package/src/views/inventory/_index.mjs +0 -27
- package/src/views/mcp/_index.mjs +0 -31
- package/src/views/mcp/tools.mjs +0 -87
- package/src/views/mode/_index.mjs +0 -34
- package/src/views/mode/chooser.mjs +0 -37
- package/src/views/promotion/_index.mjs +0 -20
- package/src/views/repl/_index.mjs +0 -30
- package/src/views/skills/_index.mjs +0 -24
- package/src/views/status/_index.mjs +0 -57
- package/src/views/status/tree.mjs +0 -19
- package/src/views/terminal/paint.mjs +0 -22
- 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
|
-
}
|
package/src/core/basic-model.mjs
DELETED
|
@@ -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
|
-
}
|
package/src/core/basic-view.mjs
DELETED
|
@@ -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);
|
package/src/models/_index.mjs
DELETED
|
@@ -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,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,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;
|